|
|
@ -100,7 +100,7 @@ const tableColumns = ref(DeliverRequestMain.allSchemas.tableColumns) |
|
|
|
|
|
|
|
const isShowButton = ref(true) |
|
|
|
//定义 展示子表数据时是否显示新增/修改/删除按钮 |
|
|
|
const trueFalse = ref() |
|
|
|
const trueFalse = ref(true) |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
@ -124,7 +124,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
// 获取子表数据 getBomDisassemble |
|
|
|
DeliverPlanDetailApi.selectDetailByMasterID(val[0]['id']) |
|
|
|
.then(res => { |
|
|
|
console.log(120,res) |
|
|
|
res.forEach(item => { |
|
|
|
item.qty = item.planQty |
|
|
|
}) |
|
|
@ -374,19 +373,26 @@ const handleDeleteTable = (item, index) => { |
|
|
|
} |
|
|
|
|
|
|
|
//为true表示子表数据中存在数量为0的数据 |
|
|
|
const flag = ref() |
|
|
|
const flag = ref(false) |
|
|
|
|
|
|
|
// 主子数据 提交 |
|
|
|
const submitForm = async (formType, data) => { |
|
|
|
if(tableData.value.length <= 0){ |
|
|
|
message.warning(`子表明细不能为空!`) |
|
|
|
flag.value = true |
|
|
|
formRef.value.formLoading = false |
|
|
|
return; |
|
|
|
} |
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
data.subList.forEach(obj => { |
|
|
|
if(obj.qty == 0){ |
|
|
|
message.error(`数量不能为0!`) |
|
|
|
message.warning(`数量不能为0!`) |
|
|
|
flag.value = true |
|
|
|
formRef.value.formLoading = false |
|
|
|
return; |
|
|
|
} |
|
|
|
}) |
|
|
|
if(flag){ |
|
|
|
if(flag.value){ |
|
|
|
return |
|
|
|
} |
|
|
|
try { |
|
|
|