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