From 06c4da9da121526d3bc00e1afcc8fb1b9003c486 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 25 Sep 2024 13:03:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=BA=E9=99=B7:HL-6011=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/purchasereceiptRecordMain/index.ts | 5 +++++ src/locales/en-US.ts | 3 +++ src/locales/zh-CN.ts | 3 +++ src/utils/disposition/defaultButtons.ts | 13 +++++++++++++ .../purchasereceiptRecordMain/index.vue | 15 +++++++++++++++ 5 files changed, 39 insertions(+) diff --git a/src/api/wms/purchasereceiptRecordMain/index.ts b/src/api/wms/purchasereceiptRecordMain/index.ts index 017f12336..13ff984b6 100644 --- a/src/api/wms/purchasereceiptRecordMain/index.ts +++ b/src/api/wms/purchasereceiptRecordMain/index.ts @@ -134,3 +134,8 @@ export const createPutawayRequest = async (number:string) => { export const createInspectRequest = async (number:string) => { return await request.post({ url: `/wms/purchasereceipt-record-main/createInspectRequest?number=`+number }) } + +// 创建采购退货记录申请 +export const createPurchasereturnRecord = async (number:string) => { + return await request.post({ url: `/wms/purchasereceipt-record-main/createPurchasereturnRecord?number=`+number }) +} \ No newline at end of file diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index ab2bdf9bf..9d4a6b2c2 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -996,6 +996,7 @@ export default { 生成采购收货申请:'Generate purchase receipt request', 发送到货检验申请:'Send the arrival inspection request', 生成采购上架申请:'Generate a purchase listing request', + 生成采购退货记录:'Generate purchase return records', 生成制品上架申请:'Generate a purchase listing request', 生成盘点调整申请:'Generate inventory adjustment request', 重盘:'New Inventory', @@ -1041,7 +1042,9 @@ export default { '确认生成上架申请吗?':'Are you sure to generate a listing application?', 上架申请生成成功:'The listing application was successfully generated', '确认生成到货检验申请吗?':'Is the arrival inspection application confirmed to be generated?', + '确认生成采购退货记录吗?':'Are you sure to generate a purchase return record?', 到货检验申请生成成功:'The arrival inspection application was successfully generated', + 采购退货记录生成成功:'Purchase return record generated successfully', 采购收货记录主:'Purchase receipt record master data', 采购退货记录主:'Purchase return record master data', 合同附件:'Appendix to the contract', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 7c72bc20a..dc482ff9c 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -998,6 +998,7 @@ export default { 生成采购收货申请:'生成采购收货申请', 发送到货检验申请:'发送到货检验申请', 生成采购上架申请:'生成采购上架申请', + 生成采购退货记录:'生成采购退货记录', 生成制品上架申请:'生成制品上架申请', 生成盘点调整申请:'生成盘点调整申请', 重盘:'重盘', @@ -1043,7 +1044,9 @@ export default { '确认生成上架申请吗?':'确认生成上架申请吗?', 上架申请生成成功:'上架申请生成成功', '确认生成到货检验申请吗?':'确认生成到货检验申请吗?', + '确认生成采购退货记录吗?':'确认生成采购退货记录吗?', 到货检验申请生成成功:'到货检验申请生成成功', + 采购退货记录生成成功:'采购退货记录生成成功', 采购收货记录主:'采购收货记录主', 采购退货记录主:'采购退货记录主', 采购拒收记录主:'采购拒收记录主', diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index d06beb311..73b968041 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -1175,6 +1175,19 @@ export function mainPutawayRequestBtn(option: any) { }) } +// 主列表-生成采购退货记录 +export function mainPurchasereturnRecordBtn(option: any) { + return __defaultBtnOption(option, { + label: t(`ts.生成采购退货记录`).replace('ts.', ''), + name: 'purchasereturnRecord', + hide: false, + type: 'primary', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} + // 主列表-生成制品上架申请 export function mainPutawayRequestCpBtn(option: any) { return __defaultBtnOption(option, { diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue index 4d2541053..e5f926a9b 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue @@ -188,6 +188,7 @@ const butttondata = (row,$index) => { return [ defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),// 生成采购上架申请 + defaultButtons.mainPurchasereturnRecordBtn({hasPermi:'wms:purchasereceipt-record-main:createPurchasereturnRecord',hide:row.purchasereturnRecordFlag == "FALSE" }),// 生成采购退后记录申请 //defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), // 查看质检报告 defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), // 查看质检报告 defaultButtons.mainListPrintInspectionBtn({hide:routeName.value.includes('SCP')}) @@ -200,6 +201,8 @@ const buttonTableClick = async (val, row) => { handleCreatePutawayRequest(row.number) }else if(val == 'inspectRequest'){//生成到货检验申请 handleCreateInspectRequest(row.number) + }else if(val == 'purchasereturnRecord'){//生成采购退后记录申请 + handleCreatePurchasereturnRecord(row.number) }else if(val == 'mainPlanCheckQualityReport'){ // 查看质检报告 checkQualityReport(row) @@ -262,6 +265,18 @@ const handleCreateInspectRequest = async (number:string) => { } } +/** 生成采购退货记录按钮操作 */ +const handleCreatePurchasereturnRecord = async (number:string) => { + try{ + await message.confirm(t('ts.确认生成采购退货记录吗?')) + tableObject.loading = true + await PurchasereceiptRecordMainApi.createPurchasereturnRecord(number) + message.success(t('ts.采购退货记录生成成功')) + buttonBaseClick('refresh',null) + }catch{}finally{ + tableObject.loading = false + } +} // 子包装数据 const detailParenPackingRef = ref()