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) + }) } // 获取部门 用于详情 部门回显