From 2b9953a0e735cae7bb4609024427158eea3affe3 Mon Sep 17 00:00:00 2001 From: yinq Date: Mon, 22 Jun 2026 15:20:28 +0800 Subject: [PATCH] =?UTF-8?q?1.1.68=20=E5=BC=80=E7=A5=A8=E6=97=B6=E5=BD=93?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=B1=BB=E5=9E=8B=E4=B8=BA=E5=A4=87=E4=BB=B6?= =?UTF-8?q?=E7=B1=BB=E6=97=B6=E4=B8=8D=E8=83=BD=E6=8F=90=E5=89=8D=E5=BC=80?= =?UTF-8?q?=E7=A5=A8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/oa/erp/finInvoiceInfo/edit.vue | 32 +++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/views/oa/erp/finInvoiceInfo/edit.vue b/src/views/oa/erp/finInvoiceInfo/edit.vue index c539f3b..7df509b 100644 --- a/src/views/oa/erp/finInvoiceInfo/edit.vue +++ b/src/views/oa/erp/finInvoiceInfo/edit.vue @@ -139,7 +139,14 @@ - {{ dict.label }} + + {{ dict.label }} + @@ -399,6 +406,14 @@ const EARLY_FLAG = reactive({ NO: '0' //否 }); +/** 项目类型:1实施类 2备件类 */ +const INVOICE_CATEGORY = { + IMPLEMENTATION: '1', + SPARE: '2' +}; + +const isSpareInvoiceCategory = computed(() => form.value.invoiceCategory === INVOICE_CATEGORY.SPARE); + const FLOW_STATUS = reactive({ DRAFT: 'draft', WAITING: 'waiting' @@ -501,6 +516,16 @@ const data = reactive>({ const { form, rules } = toRefs(data); +watch( + () => form.value.invoiceCategory, + (category) => { + if (category === INVOICE_CATEGORY.SPARE && form.value.earlyFlag === EARLY_FLAG.YES) { + form.value.earlyFlag = EARLY_FLAG.NO; + form.value.earlyReason = undefined; + } + } +); + // 附件ID字符串转换(用于FileUpload组件) const ossIdString = computed({ get: () => { @@ -1109,6 +1134,11 @@ const handleSave = async (status: string, mode: boolean) => { return; } + if (form.value.invoiceCategory === INVOICE_CATEGORY.SPARE && form.value.earlyFlag === EARLY_FLAG.YES) { + ElMessage.warning('备件类项目不能选择提前开票'); + return; + } + if (form.value.returnedRate != null && Number(form.value.returnedRate) > 100) { ElMessage.warning('累计回款比例不能超过100%'); return;