From 3008ffd45e269841caf52387d80137b8eadaf066 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Tue, 22 Oct 2024 10:41:53 +0800 Subject: [PATCH] =?UTF-8?q?HL-6303EDI=E8=AE=A2=E5=8D=95=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=A0=87=E7=AD=BE=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/purchasereceiptRequestMain/index.ts | 5 ++ .../purchasereceiptRequestMain/index.vue | 67 ++++++++++++++++++- 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/src/api/wms/purchasereceiptRequestMain/index.ts b/src/api/wms/purchasereceiptRequestMain/index.ts index 0ae9b85cd..6b7c235de 100644 --- a/src/api/wms/purchasereceiptRequestMain/index.ts +++ b/src/api/wms/purchasereceiptRequestMain/index.ts @@ -153,3 +153,8 @@ export const genLabel = async (data) => { export const queryPurchasePlan = async (data) => { return await request.post({ url: `/wms/purchasereceipt-request-main/queryPurchasePlan`, data }) } +// 重新生成标签前先删除标签 +export const deleteOldLabels = async (id) => { + return await request.post({ url: `/wms/purchasereceipt-request-main/deleteOldLabels?id=`+ id }) +} + diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index 7710bb23a..04f4256ed 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -420,13 +420,34 @@ const butttondata = (row,$index) => { hasPermi: '', link: true // 文本展现按钮 }, + { + label: t('ts.重新生成标签'), + name: 'ressbq', + hide: isReGenLabelShowMainButtonLabel(row, ['3']), + type: 'primary', + icon: '', + color: '', + hasPermi: 'wms:purchasereceipt-request-main:genLabels', + link: true // 文本展现按钮 + }, defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','6','8']) }), // 标签打印 defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), // 处理 defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), // 关闭 defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), // 查看质检报告 ] } - +// 根据状态返回该按钮是否显示 +const isReGenLabelShowMainButtonLabel = (row, val) => { + if (val.indexOf(row.status) > -1) { + if (row.labelStatus == '1') { + return true + } else { + return false + } + } else { + return true + } +} // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'mainClose') { // 关闭 @@ -466,6 +487,50 @@ const buttonTableClick = async (val, row) => { await getGenerateLabelList(row) count.value++ formLabelRef.value.open('create', row, null,'createLabel')//创建标签页面 createLabel 标题 + } else if (val == 'ressbq') { + console.log('重新生成标签') + // ElMessageBox.confirm(`