|
|
@ -51,11 +51,13 @@ |
|
|
|
:apiUpdate="DeliverRequestMainApi.updateDeliverRequestMain" |
|
|
|
:apiCreate="DeliverRequestMainApi.createDeliverRequestMain" |
|
|
|
:isBusiness="true" |
|
|
|
fromeWhere="DeliverRequestMain" |
|
|
|
@handleAddTable="handleAddTable" |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" |
|
|
|
:isShowButton = isShowButton |
|
|
|
:isShowReduceButton = isShowButton |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
@ -70,8 +72,9 @@ |
|
|
|
:apiPage="DeliverRequestDetailApi.getDeliverRequestDetailPage" |
|
|
|
:apiDelete="DeliverRequestDetailApi.deleteDeliverRequestDetail" |
|
|
|
:Echo="Echo" |
|
|
|
fromeWhere="DeliverRequestMain" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
:detailButtonIsShow = trueFalse |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
@ -99,8 +102,9 @@ routeName.value = route.name |
|
|
|
const tableColumns = ref(DeliverRequestMain.allSchemas.tableColumns) |
|
|
|
|
|
|
|
const isShowButton = ref(true) |
|
|
|
|
|
|
|
//定义 展示子表数据时是否显示新增/修改/删除按钮 |
|
|
|
const trueFalse = ref(true) |
|
|
|
const trueFalse = ref(false) |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
@ -318,9 +322,9 @@ 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 |
|
|
|
}else { |
|
|
|
trueFalse.value = false |
|
|
|
} |
|
|
|
detailRef.value.openDetail(row, titleName, titleValue,'requestDeliverMain') |
|
|
|
} |
|
|
@ -377,12 +381,6 @@ 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){ |
|
|
@ -397,6 +395,12 @@ const submitForm = async (formType, data) => { |
|
|
|
} |
|
|
|
try { |
|
|
|
if (formType === 'create') { |
|
|
|
if(tableData.value.length <= 0){ |
|
|
|
message.warning(`子表明细不能为空!`) |
|
|
|
flag.value = true |
|
|
|
formRef.value.formLoading = false |
|
|
|
return; |
|
|
|
} |
|
|
|
await DeliverRequestMainApi.createDeliverRequestMain(data) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
|