|
|
@ -77,6 +77,7 @@ |
|
|
|
:apiDelete="PurchasereturnRequestDetailApi.deletePurchasereturnRequestDetail" |
|
|
|
:Echo="Echo" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
:detailValidate="detailValidate" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
@ -584,6 +585,18 @@ const submitForm = async (formType, data) => { |
|
|
|
} |
|
|
|
try { |
|
|
|
if (formType === 'create') { |
|
|
|
let flag = false; |
|
|
|
data.subList.forEach((item) => { |
|
|
|
if(item.qty == 0){ |
|
|
|
message.warning("数量不能为0") |
|
|
|
flag = true; |
|
|
|
return; |
|
|
|
} |
|
|
|
}) |
|
|
|
if(flag){ |
|
|
|
formRef.value.formLoading = false |
|
|
|
return |
|
|
|
} |
|
|
|
await PurchasereturnRequestMainApi.createPurchasereturnRequestMain(data) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
@ -598,6 +611,19 @@ const submitForm = async (formType, data) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 子表新增/编辑校验 |
|
|
|
const detailValidate = (data) => { |
|
|
|
let tag = false; |
|
|
|
if(data.qty <= 0){ |
|
|
|
message.warning('数量必须大于0') |
|
|
|
tag = false; |
|
|
|
return tag; |
|
|
|
}else { |
|
|
|
tag = true; |
|
|
|
return tag; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 导入 */ |
|
|
|
const importFormRef = ref() |
|
|
|
const handleImport = () => { |
|
|
|