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