From 957f1346682f5240925960679201481efa01aeb4 Mon Sep 17 00:00:00 2001 From: yinq Date: Wed, 29 Oct 2025 14:07:53 +0800 Subject: [PATCH] =?UTF-8?q?1.0.21=20=E5=90=88=E5=90=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/enums/OAEnum.ts | 46 ++++++++++++++++++++++++++ src/views/oa/erp/contractInfo/edit.vue | 37 ++++++++++++--------- 2 files changed, 67 insertions(+), 16 deletions(-) create mode 100644 src/enums/OAEnum.ts diff --git a/src/enums/OAEnum.ts b/src/enums/OAEnum.ts new file mode 100644 index 0000000..9973dc6 --- /dev/null +++ b/src/enums/OAEnum.ts @@ -0,0 +1,46 @@ +/** + * 编号规则代码枚举 + */ +export enum CodeRuleEnum { + /** + * 合同编号规则 + */ + CONTRACT = '1001', + + /** + * 项目编号规则(销售项目、预投项目) + */ + PROJECT = '1002', + + /** + * 研发项目编号规则 + */ + PROJECT_RD = '1003', +} + +/** + * 项目类别枚举 + */ +export enum ProjectCategoryEnum { + /** + * 销售项目(实施、物流) + */ + SALE_IMPLEMENT = '1', + + /** + * 销售项目(备件) + */ + SALE_SPARE = '2', + + /** + * 研发项目 + */ + RD = '3', + + /** + * 预投项目 + */ + PRE_INVEST = '4', +} + + diff --git a/src/views/oa/erp/contractInfo/edit.vue b/src/views/oa/erp/contractInfo/edit.vue index 48cfff1..c87db1a 100644 --- a/src/views/oa/erp/contractInfo/edit.vue +++ b/src/views/oa/erp/contractInfo/edit.vue @@ -173,30 +173,31 @@ - - - + + + + - - + + - + - + - + @@ -273,15 +274,18 @@ - + filterable + allow-create + default-first-option + > + + + @@ -376,6 +380,7 @@ import { ref } from 'vue'; import { allListDept, listDept } from '@/api/system/dept'; import { getCrmCustomerInfoList } from '@/api/oa/crm/customerInfo'; import { getBasePrintTemplateList } from '@/api/oa/base/printTemplate'; +import { CodeRuleEnum } from '@/enums/OAEnum'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const route = useRoute(); @@ -550,7 +555,7 @@ watch( const generateContractCode = async () => { if (isCodeGenerated.value) return; // 如果已经生成过,直接返回 try { - const params = { codeRuleCode: '1001' } as any; + const params = { codeRuleCode: CodeRuleEnum.CONTRACT } as any; const res = await getRuleGenerateCode(params); form.value.contractCode = res.msg; isCodeGenerated.value = true; // 标记为已生成 @@ -858,7 +863,7 @@ const handleApprovalRecord = () => { // 提交回调 const submitCallback = async () => { - await proxy?.$tab.closePage(); + await proxy.$tab.closePage(proxy.$route); router.go(-1); };