From 2482fbb29f11ff22b928507b3597851d9ee24a06 Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Wed, 19 Nov 2025 09:13:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(erp):=20=E6=96=B0=E5=A2=9E=E9=AA=8C?= =?UTF-8?q?=E6=94=B6=E5=92=8C=E6=94=B6=E8=B4=A7=E7=8A=B6=E6=80=81=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=8F=8A=E5=85=B6=E6=98=A0=E5=B0=84=E5=92=8C=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在ErpProjectAcceptance和ErpProjectReceiving的Mapper XML中新增acceptanceStatus和receivingStatus字段映射 - 在相关SQL查询中添加acceptance_status和receiving_status字段的查询和关联 - 在ErpProjectAcceptanceVo和ErpProjectReceivingVo中新增acceptanceStatus和receivingStatus属性 - 为新增状态字段添加Excel导出注解,支持状态信息展示 - 状态字段含义为项目状态,值包括1暂存、2审批中、3可用 --- src/views/oa/erp/projectAcceptance/edit.vue | 32 ++++++++------- src/views/oa/erp/projectAcceptance/index.vue | 28 ++++++++----- src/views/oa/erp/projectReceiving/edit.vue | 41 ++++++++++++-------- src/views/oa/erp/projectReceiving/index.vue | 18 ++++++--- 4 files changed, 74 insertions(+), 45 deletions(-) diff --git a/src/views/oa/erp/projectAcceptance/edit.vue b/src/views/oa/erp/projectAcceptance/edit.vue index 5b02998..27cd7cf 100644 --- a/src/views/oa/erp/projectAcceptance/edit.vue +++ b/src/views/oa/erp/projectAcceptance/edit.vue @@ -18,8 +18,13 @@ - - 生成编号 + + + @@ -88,6 +93,7 @@ import type { ProjectAcceptanceForm } from '@/api/oa/erp/projectAcceptance/types import SubmitVerify from '@/components/Process/submitVerify.vue' const { proxy } = getCurrentInstance() as any +const { wf_business_status } = toRefs(proxy?.useDict('wf_business_status')) const route = useRoute() // 兼容 path 参数 :acceptanceId 和 query 参数 id const routeParams = reactive<{ id?: string | number; type?: string; taskId?: string | number }>({ @@ -132,15 +138,15 @@ const initFormData: ProjectAcceptanceForm = { const form = ref({ ...initFormData }) const isCodeGenerated = ref(false) -// 将后端返回的中文流程状态映射为审批按钮组件需要的英文状态 -const approvalStatus = computed(() => { - const s = form.value.flowStatus as any - if (!s || s === '草稿') return 'draft' - if (s === '审批中') return 'waiting' - if (s === '驳回') return 'back' - if (s === '撤销') return 'cancel' - return s -}) +const normalizeFlowStatus = (status?: string) => { + if (!status) return 'draft' + const dictList = wf_business_status.value || [] + const match = dictList.find((item: any) => item?.value === status || item?.label === status) + return match?.value || status +} + +// 将后端返回的流程状态统一映射为审批按钮组件需要的英文状态 +const approvalStatus = computed(() => normalizeFlowStatus(form.value.flowStatus as any)) const pageTypeForButton = computed(() => { if (routeParams.taskId) { @@ -266,8 +272,8 @@ const handleApprovalRecord = () => { } const formDisabled = computed(() => { - const s = form.value.flowStatus as any - const byStatus = !!s && s !== '草稿' && s !== '驳回' + const status = normalizeFlowStatus(form.value.flowStatus as any) + const byStatus = !!status && status !== 'draft' && status !== 'back' return pageTypeForButton.value === 'view' || pageTypeForButton.value === 'approval' || byStatus }) diff --git a/src/views/oa/erp/projectAcceptance/index.vue b/src/views/oa/erp/projectAcceptance/index.vue index dfc9d21..f59a5ed 100644 --- a/src/views/oa/erp/projectAcceptance/index.vue +++ b/src/views/oa/erp/projectAcceptance/index.vue @@ -50,8 +50,8 @@ - + @@ -74,7 +74,12 @@ - + + + + @@ -102,7 +107,7 @@ - + @@ -110,15 +115,17 @@ diff --git a/src/views/oa/erp/projectReceiving/index.vue b/src/views/oa/erp/projectReceiving/index.vue index 000b36c..5612431 100644 --- a/src/views/oa/erp/projectReceiving/index.vue +++ b/src/views/oa/erp/projectReceiving/index.vue @@ -50,8 +50,8 @@ - + @@ -74,7 +74,12 @@ - + + + + @@ -113,7 +118,9 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance; const router = useRouter(); const route = useRoute(); - const { wf_business_status } = toRefs(proxy?.useDict('wf_business_status')); + const { wf_business_status, receiving_status } = toRefs( + proxy?.useDict('wf_business_status', 'receiving_status') + ); const projectReceivingList = ref([]); const buttonLoading = ref(false); @@ -137,7 +144,7 @@ const columns = ref([ { key: 0, label: `序号`, visible: true }, { key: 1, label: `收货确认编号`, visible: true }, - { key: 2, label: `项目号`, visible: true }, + { key: 2, label: `项目号`, visible: false }, { key: 3, label: `项目名称`, visible: true }, { key: 4, label: `项目经理`, visible: true }, { key: 5, label: `到货日期`, visible: true }, @@ -145,7 +152,8 @@ { key: 7, label: `部门负责人`, visible: true }, { key: 8, label: `分管副总`, visible: true }, { key: 9, label: `备注`, visible: true }, - { key: 10, label: `流程状态`, visible: true }, + { key: 10, label: `业务状态`, visible: true }, + { key: 11, label: `流程状态`, visible: false }, ]); const initFormData: ProjectReceivingForm = {