From 76e9149ff5bb8f77c97894bac17deb685abcc94b Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Fri, 17 Nov 2023 13:37:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=87=87=E8=B4=AD=E6=94=B6?= =?UTF-8?q?=E8=B4=A7=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/purchasereceiptJobMain/index.ts | 7 ++++++- .../purchasereceiptJobMain/index.vue | 20 ++++++++++++++----- .../purchasereceiptRecordMain/index.vue | 2 +- .../purchasereceiptRequestMain/index.vue | 20 +++++++++---------- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/api/wms/purchasereceiptJobMain/index.ts b/src/api/wms/purchasereceiptJobMain/index.ts index 5193fc506..6c8965e80 100644 --- a/src/api/wms/purchasereceiptJobMain/index.ts +++ b/src/api/wms/purchasereceiptJobMain/index.ts @@ -86,4 +86,9 @@ export const exportPurchasereceiptJobMain = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/purchasereceipt-job-main/get-import-template' }) -} \ No newline at end of file +} + +// 关闭采购收货任务主 +export const closePurchasereceiptJobMain = (id: number) => { + return request.download({ url: '/wms/purchasereceipt-job-main/close?id=' + id }) +} diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue index 77ce1c8e3..1b2e08a0a 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue @@ -174,9 +174,9 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 - defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 - defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 + // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 + defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // 关闭 + // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 ] } @@ -188,12 +188,22 @@ const buttonTableClick = async (val, row) => { } else if (val == 'mainJobAba') { // 放弃 console.log('列表-操作按钮事件-放弃') } else if (val == 'mainJobClo') { // 关闭 - console.log('列表-操作按钮事件-关闭') + handleClose(row.id) } else if (val == 'mainJobAcc') { // 承接 console.log('列表-操作按钮事件-承接') } } +/** 关闭按钮操作 */ +const handleClose = async (id: number) => { + try { + await message.confirm(t('common.confirmColse')) + await PurchasereceiptJobMainApi.closePurchasereceiptJobMain(id) + message.success(t('common.closeSuccess')) + await getList() + } catch {} +} + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { @@ -209,7 +219,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PurchasereceiptJobMainApi.exportPurchasereceiptJobMain(setSearchParams) - download.excel(data, '采购收货任务主.xls') + download.excel(data, '采购收货任务主.xlsx') } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue index c4e90160c..f01c9b15f 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue @@ -142,7 +142,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMain(setSearchParams) - download.excel(data, '采购收货记录主.xls') + download.excel(data, '采购收货记录主.xlsx') } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index ebc221e49..341e3d6f5 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -177,15 +177,15 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { - return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // 关闭 - defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5'])}), //重新添加 - defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批 - defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回 - defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 - defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3'])}), // 处理 - defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), // 编辑 - ] + return [ + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), // 关闭 + defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:purchasereceipt-request-main:reAdd'}), //重新添加 + defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:submit'}), // 提交审批 + defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:refused'}), // 驳回 + defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:agree'}), // 审批通过 + defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), // 处理 + defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), // 编辑 + ] } // 列表-操作按钮事件 @@ -289,7 +289,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await PurchasereceiptRequestMainApi.exportPurchasereceiptRequestMain(setSearchParams) - download.excel(data, '采购收货申请主.xls') + download.excel(data, '采购收货申请主.xlsx') } catch { } finally { exportLoading.value = false