|
@ -69,6 +69,7 @@ |
|
|
:apiDelete="TransferissueRequestDetailApi.deleteTransferissueRequestDetail" |
|
|
:apiDelete="TransferissueRequestDetailApi.deleteTransferissueRequestDetail" |
|
|
:Echo="Echo" |
|
|
:Echo="Echo" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
|
|
:detailValidate="detailValidate" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
@ -361,7 +362,24 @@ const handleDeleteTable = (item, index) => { |
|
|
const submitForm = async (formType, data) => { |
|
|
const submitForm = async (formType, data) => { |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
try { |
|
|
try { |
|
|
|
|
|
console.log("【调拨出库子列表】",data.subList) |
|
|
if (formType === 'create') { |
|
|
if (formType === 'create') { |
|
|
|
|
|
if(data.subList.length == 0){ |
|
|
|
|
|
message.warning("请添加子列表数据") |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
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 TransferissueRequestMainApi.createTransferissueRequestMain(data) |
|
|
await TransferissueRequestMainApi.createTransferissueRequestMain(data) |
|
|
message.success(t('common.createSuccess')) |
|
|
message.success(t('common.createSuccess')) |
|
|
} else { |
|
|
} else { |
|
@ -376,6 +394,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 importFormRef = ref() |
|
|
const handleImport = () => { |
|
|
const handleImport = () => { |
|
|