fix: 修改北向输出

This commit is contained in:
100011797 2023-07-18 13:36:08 +08:00
parent 161c9f8ec1
commit c305f45727
2 changed files with 2 additions and 3 deletions

View File

@ -619,7 +619,7 @@ const _validator = (_rule: any, value: string): Promise<any> =>
const _item = productList.value.find((item) => item.id === value);
if(!modelRef.id || modelRef.id === ':id') {
return resolve('');
} else if (!_item) {
} else if (!_item && value) {
return reject('关联产品已被删除,请重新选择');
}
return resolve('');

View File

@ -781,13 +781,12 @@ const _validator = (_rule: any, value: string): Promise<any> =>
const _item = productList.value.find((item) => item.id === value);
if(!modelRef.id || modelRef.id === ':id') {
return resolve('');
} else if (!_item) {
} else if (!_item && value) {
productChange(value);
return reject('关联产品已被删除,请重新选择');
} else {
if (!_item?.state) {
_error.value = `当前选择的${_item.name}产品为禁用状态`;
// return reject(`${_item.name}`)
} else {
_error.value = '';
}