|
|
@ -69,6 +69,7 @@ |
|
|
|
:apiDelete="CustomerreturnRequestDetailApi.deleteCustomerreturnRequestDetail" |
|
|
|
:Echo="Echo" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
:detailButtonIsShow = trueFalse |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
@ -176,7 +177,7 @@ const { tableObject, tableMethods } = useTable({ |
|
|
|
|
|
|
|
// 获得表格的各种操作 |
|
|
|
const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
const trueFalse = ref() |
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:customerreturn-request-main:create'}), // 新增——需要手动修改下权限 |
|
|
@ -302,6 +303,12 @@ const openForm =async (type: string, row?: number) => { |
|
|
|
/** 详情操作 */ |
|
|
|
const detailRef = ref() |
|
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
|
console.log(999,row.deliverPlanNumber); |
|
|
|
if(row.deliverPlanNumber != null){ |
|
|
|
trueFalse.value = false |
|
|
|
}else { |
|
|
|
trueFalse.value = true |
|
|
|
} |
|
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
|
} |
|
|
|
|
|
|
@ -352,9 +359,22 @@ const handleDeleteTable = (item, index) => { |
|
|
|
tableData.value.splice(index, 1) |
|
|
|
} |
|
|
|
|
|
|
|
//为true表示子表数据中存在数量为0的数据 |
|
|
|
const flag = ref() |
|
|
|
|
|
|
|
// 主子数据 提交 |
|
|
|
const submitForm = async (formType, data) => { |
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
data.subList.forEach(obj => { |
|
|
|
if(obj.qty == 0){ |
|
|
|
message.error(`数量不能为0!`) |
|
|
|
flag.value = true |
|
|
|
return; |
|
|
|
} |
|
|
|
}) |
|
|
|
if(flag){ |
|
|
|
return |
|
|
|
} |
|
|
|
try { |
|
|
|
if (formType === 'create') { |
|
|
|
await CustomerreturnRequestMainApi.createCustomerreturnRequestMain(data) |
|
|
|