|
|
@ -472,6 +472,19 @@ const handleDeleteTable = (item, index) => { |
|
|
|
// 主子数据 提交 |
|
|
|
const submitForm = async (formType, data) => { |
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
// 判断 bom 是否添加 |
|
|
|
let childListRs = true |
|
|
|
// 根据 填写的数量 为基准 不填写数量的忽略 |
|
|
|
tableData.value.forEach((item) => { |
|
|
|
if (!item.childList) { |
|
|
|
childListRs = false |
|
|
|
} |
|
|
|
}) |
|
|
|
if (!childListRs) { |
|
|
|
message.warning('请填写Bom信息!') |
|
|
|
formRef.value.dialogVisible = false |
|
|
|
return |
|
|
|
} |
|
|
|
try { |
|
|
|
if (formType === 'create') { |
|
|
|
await ProductrepairRequestMainApi.createProductrepairRequestMain(data) |
|
|
|