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) +    }) +  } }