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;