From 6b37f2218dab3ca3ff701ab82cc54ecb14299433 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 8 May 2024 17:12:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E5=BC=80=E7=A5=A8=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/supplierinvoiceRequestMain/index.ts | 6 ++++++ .../supplierinvoiceRequestMain/index.vue | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/api/wms/supplierinvoiceRequestMain/index.ts b/src/api/wms/supplierinvoiceRequestMain/index.ts index f3846f143..89ef00539 100644 --- a/src/api/wms/supplierinvoiceRequestMain/index.ts +++ b/src/api/wms/supplierinvoiceRequestMain/index.ts @@ -56,6 +56,12 @@ export const deleteSupplierinvoiceRequestMain = async (id: number) => { return await request.delete({ url: `/wms/supplierinvoice-request-main/delete?id=` + id }) } +// 校验控制是否可以开票逻辑 +export const checkInvoicingCalendar = async (params) => { + return await request.get({ url: `/wms/supplierinvoice-request-main/checkInvoicingCalendar`, params }) +} + + // 打开供应商发货申请主 export const opeSupplierinvoiceRequestMain = async (id: number) => { return await request.post({ url: `/wms/supplierinvoice-request-main/open?id=` + id }) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index b835723b1..64e72c704 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -395,8 +395,15 @@ const handleImport = () => { /** 添加/修改操作 */ const formRef = ref() const openForm = async (type : string, row ?: number) => { - tableData.value = [] // 重置明细数据 - formRef.value.open(type, row) + // 校验是否可以开票 + SupplierinvoiceRequestMainApi.checkInvoicingCalendar({}).then(res => { + if(res.flag){ + message.alertWarning(res.msg) + return + } + tableData.value = [] // 重置明细数据 + formRef.value.open(type, row) + }) } // 获取部门 用于详情 部门回显