优化供应商和客户的校验逻辑

This commit is contained in:
季圣华
2021-12-03 00:28:58 +08:00
parent 3abb818f5e
commit f504a1a0ea
4 changed files with 4 additions and 1 deletions

View File

@@ -91,7 +91,7 @@ const checkUnit = (params)=>getAction("/unit/checkIsNameExist",params);
//供应商|客户|会员
const addSupplier = (params)=>postAction("/supplier/add",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 findBySelectCus = (params)=>postAction("/supplier/findBySelect_cus",params);
const findBySelectRetail = (params)=>postAction("/supplier/findBySelect_retail",params);

View File

@@ -182,6 +182,7 @@
validateSupplierName(rule, value, callback){
let params = {
name: value,
type: '客户',
id: this.model.id?this.model.id:0
};
checkSupplier(params).then((res)=>{

View File

@@ -141,6 +141,7 @@
validateSupplierName(rule, value, callback){
let params = {
name: value,
type: '会员',
id: this.model.id?this.model.id:0
};
checkSupplier(params).then((res)=>{

View File

@@ -177,6 +177,7 @@
validateSupplierName(rule, value, callback){
let params = {
name: value,
type: '供应商',
id: this.model.id?this.model.id:0
};
checkSupplier(params).then((res)=>{