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 // 分页接口 })