From 3c8c8133595398ce7bbaa1ee44338fd309ec0eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Mon, 15 Jan 2024 17:04:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=AD=90=E8=A1=A8=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=98=BE=E7=A4=BA=E9=9A=90=E8=97=8F=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 121 ++++++++---------- .../countManage/count/countPlanMain/index.vue | 1 + .../customerreceiptRequestMain/index.vue | 5 +- .../customerreturnRequestMain/index.vue | 6 - .../customersettleRequestMain/index.vue | 3 +- .../deliver/deliverRequestMain/index.vue | 8 +- .../transferreceiptRequestMain/index.vue | 7 +- .../purchasereceiptRequestMain/index.vue | 6 +- .../putaway/putawayRequestMain/index.vue | 6 +- 9 files changed, 65 insertions(+), 98 deletions(-) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index c3f9b9649..663938c91 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -272,11 +272,29 @@ const props = defineProps({ required: false, default: null }, - // 子列表 新增 编辑 删除的展示与隐藏,默认展示 - detailButtonIsShow:{ + // 子列表 筛选 展示与隐藏 ,默认展示 + detailButtonIsShowFilter:{ type: Boolean, required: false, - default: false + default: true + }, + // 子列表 新增 展示与隐藏 ,默认展示 + detailButtonIsShowAdd:{ + type: Boolean, + required: false, + default: true + }, + // 子列表 编辑 展示与隐藏 ,默认展示 + detailButtonIsShowEdit:{ + type: Boolean, + required: false, + default: true + }, + // 子列表 删除 展示与隐藏 ,默认展示 + detailButtonIsShowDelete:{ + type: Boolean, + required: false, + default: true } }) const isShowDrawer = ref(false) @@ -388,81 +406,52 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: getRemarkList() getFileList() getChangeRecordList() - // 判断详情新增按钮是否显示 + // 判断详情按钮是否显示 + let detailButtonFilter: any = [] + let detailButtonAdd: any = [] + if (props.detailButtonIsShowFilter) { + // 筛选 + detailButtonFilter = [ + defaultButtons.defaultFilterBtn(null) + ] + } + if (props.detailButtonIsShowAdd) { + // 新增 + detailButtonAdd = [ + defaultButtons.defaultAddBtn({ + hide: isShowMainButton(row, ['1']) + }) + ] + } + HeadButttondata.value = [...detailButtonFilter,...detailButtonAdd] + + // 针对特殊处理 当业务是任务的 只显示筛选 正常情况下应在业务页面设置 后期再作优化 if (routeName.value.indexOf('Job') > -1) { HeadButttondata.value = [ defaultButtons.defaultFilterBtn(null) // 筛选 ] - } else { - if(!props.detailButtonIsShow){ - HeadButttondata.value = [ - defaultButtons.defaultAddBtn({ - hide: isShowMainButton(row, ['1']) - }), // 新增 - defaultButtons.defaultFilterBtn(null) // 筛选 - ] - } - //盘点计划详情筛选 - if (props.fromeWhere == 'countPlan') { - HeadButttondata.value = [ - defaultButtons.defaultAddBtn({ - hide: isShowMainButton(row, ['1']) - }) // 新增 - ] - } - //盘点计划详情筛选 - if (props.fromeWhere == 'putawayRequest') { - HeadButttondata.value = [ - defaultButtons.defaultFilterBtn(null) // 筛选 - ] - } - //盘点调整申请筛选 - if (props.fromeWhere == 'countadjustRequest') { - HeadButttondata.value = [ - defaultButtons.defaultFilterBtn(null) // 筛选 - ] - } - //采购收货详情筛选 - if (props.fromeWhere == 'purchasereceipt') { - HeadButttondata.value = [ - defaultButtons.defaultFilterBtn(null) // 筛选 - ] - } - //客户收货详情筛选 - if (props.fromeWhere == 'customerreceipt') { - HeadButttondata.value = [ - defaultButtons.defaultFilterBtn(null) // 筛选 - ] - } - //发货申请详情筛选 - if (props.fromeWhere == 'DeliverRequestMain') { - HeadButttondata.value = [ - defaultButtons.defaultFilterBtn(null) // 筛选 - ] - } } - // 动态显示操作列按钮 - if(!props.detailButtonIsShow){ - buttondata.value = [...[ + let detailButtonEdit: any = [] + let detailButtonDelete: any = [] + if (props.detailButtonIsShowEdit) { + // 编辑 + detailButtonEdit = [ defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']) - }), // 编辑 + }) + ] + } + if (props.detailButtonIsShowDelete) { + // 删除 + detailButtonDelete = [ defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, ['1']) - })], // 删除 - ...props.buttondataTable + }) ] } - //发货申请详情筛选 - if (props.fromeWhere == 'DeliverRequestMain') { - buttondata.value = [...[ - defaultButtons.mainListEditBtn({ - hide: isShowMainButton(row, ["1"]) - })], // 编辑 - ...props.buttondataTable - ] - } + buttondata.value = [...detailButtonEdit,...detailButtonDelete,...props.buttondataTable] + } finally { detailLoading.value = false } diff --git a/src/views/wms/countManage/count/countPlanMain/index.vue b/src/views/wms/countManage/count/countPlanMain/index.vue index 820d76109..185022072 100644 --- a/src/views/wms/countManage/count/countPlanMain/index.vue +++ b/src/views/wms/countManage/count/countPlanMain/index.vue @@ -88,6 +88,7 @@ :formTypeDetail="formTypeDetail" :countPlanAllList="countPlanAllList" @detailOpenForm="detailOpenForm" + :detailButtonIsShowFilter="false" /> diff --git a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue index 0e91a07db..c13b413bc 100644 --- a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue @@ -71,7 +71,7 @@ :apiPage="CustomerreceiptRequestDetailApi.getCustomerreceiptRequestDetailPage" :apiDelete="CustomerreceiptRequestDetailApi.deleteCustomerreceiptRequestDetail" fromeWhere="customerreceipt" - :Echo="Echo" + :detailButtonIsShowAdd="false" /> @@ -134,9 +134,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } }) } -// 子表新增的时候选择表格之后需要会显得字段 -// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] -const Echo = [] const { tableObject, tableMethods } = useTable({ getListApi: CustomerreceiptRequestMainApi.getCustomerreceiptRequestMainPage // 分页接口 diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index 48b57b8cc..a2d6419ad 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -67,9 +67,7 @@ :apiUpdate="CustomerreturnRequestDetailApi.updateCustomerreturnRequestDetail" :apiPage="CustomerreturnRequestDetailApi.getCustomerreturnRequestDetailPage" :apiDelete="CustomerreturnRequestDetailApi.deleteCustomerreturnRequestDetail" - :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" - :detailButtonIsShow = trueFalse /> @@ -167,10 +165,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { }) } -// 子表新增的时候选择表格之后需要会显得字段 -// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] -const Echo = [] - const { tableObject, tableMethods } = useTable({ getListApi: CustomerreturnRequestMainApi.getCustomerreturnRequestMainPage // 分页接口 }) diff --git a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue index 4f0706dc0..9c6cd29a7 100644 --- a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue @@ -69,7 +69,8 @@ :apiDelete="CustomersettleRequestDetailApi.deleteCustomersettleRequestDetail" :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" - :detailButtonIsShow = true + :detailButtonIsShowEdit="false" + :detailButtonIsShowDelete="false" /> diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index 57cfeb9d3..114af73b4 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -71,10 +71,10 @@ :apiUpdate="DeliverRequestDetailApi.updateDeliverRequestDetail" :apiPage="DeliverRequestDetailApi.getDeliverRequestDetailPage" :apiDelete="DeliverRequestDetailApi.deleteDeliverRequestDetail" - :Echo="Echo" fromeWhere="DeliverRequestMain" @searchTableSuccessDetail="searchTableSuccessDetail" - + :detailButtonIsShowAdd="false" + :detailButtonIsShowDelete="false" /> @@ -168,10 +168,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { }) } -// 子表新增的时候选择表格之后需要会显得字段 -// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] -const Echo = [] - const { tableObject, tableMethods } = useTable({ getListApi: DeliverRequestMainApi.getDeliverRequestMainPage // 分页接口 }) diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue index 5854628d6..59a15585d 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue @@ -69,8 +69,8 @@ :apiUpdate="TransferreceiptRequestDetailApi.updateTransferreceiptRequestDetail" :apiPage="TransferreceiptRequestDetailApi.getTransferreceiptRequestDetailPage" :apiDelete="TransferreceiptRequestDetailApi.deleteTransferreceiptRequestDetail" - :Echo="Echo" - :detailButtonIsShow="true" + :detailButtonIsShowEdit="false" + :detailButtonIsShowDelete="false" /> @@ -137,9 +137,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } }) } -// 子表新增的时候选择表格之后需要会显得字段 -// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] -const Echo = [] const { tableObject, tableMethods } = useTable({ getListApi: TransferreceiptRequestMainApi.getTransferreceiptRequestMainPage // 分页接口 diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index 3049de49e..c7b82c7f0 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -67,9 +67,9 @@ :apiUpdate="PurchasereceiptRequestDetailApi.updatePurchasereceiptRequestDetail" :apiPage="apiPage" :apiDelete="PurchasereceiptRequestDetailApi.deletePurchasereceiptRequestDetail" - :Echo="Echo" fromeWhere="purchasereceipt" @searchTableSuccessDetail="searchTableSuccessDetail" + :detailButtonIsShowAdd="false" /> @@ -141,10 +141,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { }) } -// 子表新增的时候选择表格之后需要会显得字段 -// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] -const Echo = [] - const { tableObject, tableMethods } = useTable({ getListApi: PurchasereceiptRequestMainApi.getPurchasereceiptRequestMainPage // 分页接口 }) diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue index f398fc4a1..7bf021629 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue @@ -67,9 +67,9 @@ :apiUpdate="PutawayRequestDetailApi.updatePutawayRequestDetail" :apiPage="PutawayRequestDetailApi.getPutawayRequestDetailPage" :apiDelete="PutawayRequestDetailApi.deletePutawayRequestDetail" - :Echo="Echo" fromeWhere="putawayRequest" @searchTableSuccessDetail="searchTableSuccessDetail" + :detailButtonIsShowAdd="false" /> @@ -132,10 +132,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { }) } -// 子表新增的时候选择表格之后需要会显得字段 -// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] -const Echo = [] - const { tableObject, tableMethods } = useTable({ getListApi: PutawayRequestMainApi.getPutawayRequestMainPage // 分页接口 })