From b8c28119e3989c06193e8df208a6177e49dab6b8 Mon Sep 17 00:00:00 2001 From: "YEJIAXING-PC\\lenovo" <591141169@qq.com> Date: Tue, 19 Nov 2024 22:23:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E7=B4=A2=E8=B5=94=E4=BF=AE?= =?UTF-8?q?=E6=94=B9BUG=20=20YT-309?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/purchaseClaimRequestMain/index.ts | 9 +++++ .../PurchaseClaimRecordMain.data.ts | 10 ++++++ .../PurchaseClaimRequestMain.data.ts | 2 +- .../purchaseClaimRequest/index.vue | 33 ++++++++++++++++--- 4 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/api/wms/purchaseClaimRequestMain/index.ts b/src/api/wms/purchaseClaimRequestMain/index.ts index 9a7356333..e9805950d 100644 --- a/src/api/wms/purchaseClaimRequestMain/index.ts +++ b/src/api/wms/purchaseClaimRequestMain/index.ts @@ -44,6 +44,15 @@ export const deletePurchaseClaimRequestMain = async (id: number) => { return await request.delete({ url: `/wms/purchaseClaim-request-main/delete?id=` + id }) } +// 关闭审批采购索赔 +export const closePurchaseClaimRequestMain = async (id: number) => { + return await request.put({ url: `/wms/purchaseClaim-request-main/close?id=` + id }) +} +// 关闭审批采购索赔 +export const reAddPurchaseClaimRequestMain = async (id: number) => { + return await request.put({ url: `/wms/purchaseClaim-request-main/reAdd?id=` + id }) +} + // 提交审批采购索赔 export const subPurchaseClaimRequestMain = async (id: number) => { return await request.post({ url: `/wms/purchaseClaim-request-main/sub?id=` + id }) diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts index da43783a0..daa19d2c8 100644 --- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts +++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts @@ -29,6 +29,16 @@ export const PurchaseClaimRecordMain = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 150 + }, + }, { label: '供应商代码', field: 'supplierCode', diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts index 1de46e92e..95be795cd 100644 --- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts +++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts @@ -118,7 +118,7 @@ export const PurchaseClaimRequestMain = useCrudSchemas(reactive([ { label: '状态', field: 'status', - dictType: DICT_TYPE.PURCHASECLAIM_REQUEST_STATUS, + dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isTable: true, isForm:false, diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue index 69b98c380..e4fb200fc 100644 --- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue +++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue @@ -239,7 +239,7 @@ const butttondata = (row, $index) => { } return [ defaultButtons.mainListPlanSubBtn({ - hide: isShowMainButton(row, ['0']), + hide: isShowMainButton(row, ['1']), hasPermi: `wms:purchaseClaimRequest:sub` }), // 提交审批 defaultButtons.mainListPlanAppBtn({ @@ -251,9 +251,12 @@ const butttondata = (row, $index) => { hasPermi: `wms:purchaseClaimRequest:reject` }), // 驳回 defaultButtons.mainListEditBtn({ - hide: isShowMainButton(row, ['0','2']), + hide: isShowMainButton(row, ['1']), hasPermi: `wms:purchaseClaimRequest:update` - }) // 编辑 + }), // 编辑 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3']),hasPhasPermiermi:`wms:purchaseClaimRequest:close`}), // 关闭 + + defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4']),hasPhasPermiermi:`wms:purchaseClaimRequest:reAdd`}), // 重新添加 ] } @@ -277,7 +280,29 @@ const buttonTableClick = async (val, row) => { else if (val == 'delete') { // 删除 handleDelete(row.masterId) - } + }else if (val == 'mainClose') { // 关闭 + await message.confirm('确认要关闭吗?') + tableObject.loading = true + PurchaseClaimRequestMainApi.closePurchaseClaimRequestMain(row.masterId).then(() => { + message.success(t('common.updateSuccess')) + tableObject.loading = false + buttonBaseClick('refresh',null) + }).catch(err => { + tableObject.loading = false + console.log(err) + }) + } else if (val == 'mainReAdd') { // 重新添加 +    await message.confirm('确认要重新添加吗?') +    tableObject.loading = true +    PurchaseClaimRequestMainApi.reAddPurchaseClaimRequestMain(row.masterId).then(() => { +      message.success(t('common.updateSuccess')) +      tableObject.loading = false +      buttonBaseClick('refresh',null) +    }).catch(err => { +      tableObject.loading = false +      console.log(err) +    }) +  } }