fix: 北向输出bug修复

This commit is contained in:
100011797 2023-07-18 12:00:01 +08:00
parent dabc73b589
commit 161c9f8ec1
2 changed files with 7 additions and 3 deletions

View File

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

View File

@ -779,7 +779,9 @@ const onActiveProduct = () => {
const _validator = (_rule: any, value: string): Promise<any> =>
new Promise((resolve, reject) => {
const _item = productList.value.find((item) => item.id === value);
if (!_item) {
if(!modelRef.id || modelRef.id === ':id') {
return resolve('');
} else if (!_item) {
productChange(value);
return reject('关联产品已被删除,请重新选择');
} else {
@ -789,8 +791,8 @@ const _validator = (_rule: any, value: string): Promise<any> =>
} else {
_error.value = '';
}
return resolve('');
}
return resolve('');
});
const saveBtn = async () => {