From 92f525f33c30cf97a115485785d7e837fb3b37e5 Mon Sep 17 00:00:00 2001 From: chenfang <1057876684@qq.com> Date: Tue, 19 Nov 2024 10:34:41 +0800 Subject: [PATCH 1/3] =?UTF-8?q?HL-6421=20=E6=81=A2=E5=A4=8D=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=B7=B2=E5=BC=80=E5=8F=91=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/supplierinvoiceInvoiced/index.ts | 6 +++++ src/utils/disposition/defaultButtons.ts | 12 +++++++++ .../index.vue | 26 ++++++++++++++++++- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/api/wms/supplierinvoiceInvoiced/index.ts b/src/api/wms/supplierinvoiceInvoiced/index.ts index 88e303e78..2be01466c 100644 --- a/src/api/wms/supplierinvoiceInvoiced/index.ts +++ b/src/api/wms/supplierinvoiceInvoiced/index.ts @@ -96,4 +96,10 @@ export const agreeSupplierinvoiceInvoiced = async (id: number) => { // 审批拒绝待开票 export const refuseSupplierinvoiceInvoiced = async (id: number) => { return await request.post({ url: `/wms/supplierinvoice-invoiced/refuse?id=` + id }) +} + + +// 恢复被删除的待开票 +export const receverySupplierinvoiceInvoiced = async (id: number) => { + return await request.post({ url: `/wms/supplierinvoice-invoiced/recevery?id=` + id }) } \ No newline at end of file diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index e693de83d..ee1e4b756 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -463,6 +463,18 @@ export function mainListFinishBtn(option: any) { }) } +// 待开票被删除数据-恢复按钮 +export function mainListReceveryBtn(option: any) { + return __defaultBtnOption(option, { + label: t(`ts.恢复`).replace('ts.', ''), + name: 'recevery', + hide: false, + type: 'primary', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} export function mainListSendBtn(option: any) { return __defaultBtnOption(option, { label: t(`ts.发送邮件`).replace('ts.', ''), diff --git a/src/views/wms/supplierManage/supplierinvoiceInvoicedScheduleDeleted/index.vue b/src/views/wms/supplierManage/supplierinvoiceInvoicedScheduleDeleted/index.vue index 88ea8b7fb..5bdfc78f5 100644 --- a/src/views/wms/supplierManage/supplierinvoiceInvoicedScheduleDeleted/index.vue +++ b/src/views/wms/supplierManage/supplierinvoiceInvoicedScheduleDeleted/index.vue @@ -146,7 +146,7 @@ const butttondata = (row) =>{ return [ // defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), // 删除 - // defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), + defaultButtons.mainListReceveryBtn({hasPermi:'wms:supplierinvoice-invoiced:recevery'}),//恢复 { label: t('ts.审核通过'), name: 'agree', @@ -164,6 +164,15 @@ const butttondata = (row) =>{ color: '', link: true, // 文本展现按钮 hasPermi: 'wms:supplierinvoice-invoiced:refuse' + }, + { + label: t('ts.恢复'), + name: 'recevery', + hide: isShowMainButton(row, ['1']), + type: 'danger', + color: '', + link: true, // 文本展现按钮 + hasPermi: 'wms:supplierinvoice-invoiced:recevery' } ] } @@ -178,6 +187,8 @@ const buttonTableClick = async (val, row) => { handleAgree(row.id) } else if(val == 'refuse'){//作废 handleRefuse(row.id) + }else if(val == 'recevery'){//恢复 + handleRecevery(row.id) } } @@ -230,6 +241,19 @@ const handleDelete = async (id: number) => { } catch {} } +/** 恢复按钮操作 */ +const handleRecevery = async (id: number) => { + try { + // 恢复的二次确认 + await message.delConfirm() + // 发起恢复 + await SupplierinvoiceInvoicedApi.receverySupplierinvoiceInvoiced(id) + message.success(t('common.delSuccess')) + // 刷新列表 + await getList() + } catch {} +} + /** 审批通过按钮操作 */ const handleAgree = async (id : number) => { try { From 842a3091d8e6cb7b020f9e417341fc66e377c2dc Mon Sep 17 00:00:00 2001 From: chenfang <1057876684@qq.com> Date: Tue, 19 Nov 2024 11:10:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=BE=85=E5=BC=80=E7=A5=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=B1=95=E7=A4=BA=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierManage/supplierinvoiceInvoicedDiscrete/index.vue | 2 +- .../supplierManage/supplierinvoiceInvoicedSchedule/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/wms/supplierManage/supplierinvoiceInvoicedDiscrete/index.vue b/src/views/wms/supplierManage/supplierinvoiceInvoicedDiscrete/index.vue index 6796b9b69..f94068de2 100644 --- a/src/views/wms/supplierManage/supplierinvoiceInvoicedDiscrete/index.vue +++ b/src/views/wms/supplierManage/supplierinvoiceInvoicedDiscrete/index.vue @@ -145,7 +145,7 @@ const buttonBaseClick = (val, item) => { const butttondata = (row) =>{ return [ // defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), // 删除 + defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), // 删除 // defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), { label: t('ts.审核通过'), diff --git a/src/views/wms/supplierManage/supplierinvoiceInvoicedSchedule/index.vue b/src/views/wms/supplierManage/supplierinvoiceInvoicedSchedule/index.vue index caebb3108..ce444d982 100644 --- a/src/views/wms/supplierManage/supplierinvoiceInvoicedSchedule/index.vue +++ b/src/views/wms/supplierManage/supplierinvoiceInvoicedSchedule/index.vue @@ -145,7 +145,7 @@ const buttonBaseClick = (val, item) => { const butttondata = (row) =>{ return [ // defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), // 删除 + defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), // 删除 // defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), { label: t('ts.审核通过'), From dd0441b99f49be56c455055b5d86be103dd79d94 Mon Sep 17 00:00:00 2001 From: chenfang <1057876684@qq.com> Date: Tue, 19 Nov 2024 11:18:02 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierinvoiceInvoicedScheduleDeleted/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/wms/supplierManage/supplierinvoiceInvoicedScheduleDeleted/index.vue b/src/views/wms/supplierManage/supplierinvoiceInvoicedScheduleDeleted/index.vue index 5bdfc78f5..0b739ebb6 100644 --- a/src/views/wms/supplierManage/supplierinvoiceInvoicedScheduleDeleted/index.vue +++ b/src/views/wms/supplierManage/supplierinvoiceInvoicedScheduleDeleted/index.vue @@ -245,10 +245,10 @@ const handleDelete = async (id: number) => { const handleRecevery = async (id: number) => { try { // 恢复的二次确认 - await message.delConfirm() + await message.confirm(t('是否恢复所选中数据?')) // 发起恢复 await SupplierinvoiceInvoicedApi.receverySupplierinvoiceInvoiced(id) - message.success(t('common.delSuccess')) + message.success(t('恢复成功!')) // 刷新列表 await getList() } catch {}