优化供应商和客户的校验逻辑
This commit is contained in:
@@ -91,7 +91,7 @@ const checkUnit = (params)=>getAction("/unit/checkIsNameExist",params);
|
|||||||
//供应商|客户|会员
|
//供应商|客户|会员
|
||||||
const addSupplier = (params)=>postAction("/supplier/add",params);
|
const addSupplier = (params)=>postAction("/supplier/add",params);
|
||||||
const editSupplier = (params)=>putAction("/supplier/update",params);
|
const editSupplier = (params)=>putAction("/supplier/update",params);
|
||||||
const checkSupplier = (params)=>getAction("/supplier/checkIsNameExist",params);
|
const checkSupplier = (params)=>getAction("/supplier/checkIsNameAndTypeExist",params);
|
||||||
const findBySelectSup = (params)=>postAction("/supplier/findBySelect_sup",params);
|
const findBySelectSup = (params)=>postAction("/supplier/findBySelect_sup",params);
|
||||||
const findBySelectCus = (params)=>postAction("/supplier/findBySelect_cus",params);
|
const findBySelectCus = (params)=>postAction("/supplier/findBySelect_cus",params);
|
||||||
const findBySelectRetail = (params)=>postAction("/supplier/findBySelect_retail",params);
|
const findBySelectRetail = (params)=>postAction("/supplier/findBySelect_retail",params);
|
||||||
|
|||||||
@@ -182,6 +182,7 @@
|
|||||||
validateSupplierName(rule, value, callback){
|
validateSupplierName(rule, value, callback){
|
||||||
let params = {
|
let params = {
|
||||||
name: value,
|
name: value,
|
||||||
|
type: '客户',
|
||||||
id: this.model.id?this.model.id:0
|
id: this.model.id?this.model.id:0
|
||||||
};
|
};
|
||||||
checkSupplier(params).then((res)=>{
|
checkSupplier(params).then((res)=>{
|
||||||
|
|||||||
@@ -141,6 +141,7 @@
|
|||||||
validateSupplierName(rule, value, callback){
|
validateSupplierName(rule, value, callback){
|
||||||
let params = {
|
let params = {
|
||||||
name: value,
|
name: value,
|
||||||
|
type: '会员',
|
||||||
id: this.model.id?this.model.id:0
|
id: this.model.id?this.model.id:0
|
||||||
};
|
};
|
||||||
checkSupplier(params).then((res)=>{
|
checkSupplier(params).then((res)=>{
|
||||||
|
|||||||
@@ -177,6 +177,7 @@
|
|||||||
validateSupplierName(rule, value, callback){
|
validateSupplierName(rule, value, callback){
|
||||||
let params = {
|
let params = {
|
||||||
name: value,
|
name: value,
|
||||||
|
type: '供应商',
|
||||||
id: this.model.id?this.model.id:0
|
id: this.model.id?this.model.id:0
|
||||||
};
|
};
|
||||||
checkSupplier(params).then((res)=>{
|
checkSupplier(params).then((res)=>{
|
||||||
|
|||||||
Reference in New Issue
Block a user