From c5c7aeaa61891cadbcbeed2f3ac54a67467fa7fd Mon Sep 17 00:00:00 2001 From: Maple <869445424@qq.com> Date: Fri, 15 Aug 2025 10:07:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E7=82=B9=E7=82=B9=E9=97=AE=E9=A2=98=EF=BC=8C=E7=9B=AE=E5=89=8D?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=94=A8=E6=88=B7=E8=AF=A6=E6=83=85=E7=9A=84?= =?UTF-8?q?=E8=AF=9D=E5=B7=B2=E6=9C=89=E7=9A=84=E8=A7=92=E8=89=B2=E4=BC=9A?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BA=86=EF=BC=8C=E7=84=B6=E5=90=8E=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BA=86=E8=A7=92=E8=89=B2=E5=90=AF=E7=94=A8=E5=92=8C?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E7=9A=84=E7=8A=B6=E6=80=81=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E5=81=9A=E5=8F=8D=E4=BA=86=EF=BC=8C=E5=90=88=E5=90=8C=E4=B8=AD?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=86=E5=90=88=E5=90=8C=E7=B1=BB=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../expense-contract/ContractDetail.vue | 5 + .../expense-contract/ContractEdit.vue | 15 +++ .../contract/expense-contract/index.vue | 25 ++++ .../revenue-contract/ContractDetail.vue | 5 + .../revenue-contract/ContractEdit.vue | 14 +++ .../contract/revenue-contract/index.vue | 22 ++++ src/views/system/role/RoleAddDrawer.vue | 4 +- src/views/system/user/UserAddDrawer.vue | 108 ++++++++++++++---- 8 files changed, 172 insertions(+), 26 deletions(-) diff --git a/src/views/project-management/contract/expense-contract/ContractDetail.vue b/src/views/project-management/contract/expense-contract/ContractDetail.vue index 56f99f1..8ac7258 100644 --- a/src/views/project-management/contract/expense-contract/ContractDetail.vue +++ b/src/views/project-management/contract/expense-contract/ContractDetail.vue @@ -18,6 +18,10 @@ ¥{{ (contractDetail.amount || 0).toLocaleString() }} + + {{ contractDetail.category || '-' }} + + ¥{{ (contractDetail.receivedAmount || 0).toLocaleString() }} @@ -74,6 +78,7 @@ interface ContractDetail { code: string projectId: string type: string + category?: string productService: string paymentDate: string | null performanceDeadline: string | null diff --git a/src/views/project-management/contract/expense-contract/ContractEdit.vue b/src/views/project-management/contract/expense-contract/ContractEdit.vue index 5908dcb..9f3daf5 100644 --- a/src/views/project-management/contract/expense-contract/ContractEdit.vue +++ b/src/views/project-management/contract/expense-contract/ContractEdit.vue @@ -46,6 +46,21 @@ + + + + + 框架协议 + 单次合同 + 三年长协 + 两年长协 + 派工单 + + + + + + diff --git a/src/views/project-management/contract/expense-contract/index.vue b/src/views/project-management/contract/expense-contract/index.vue index 3f2e5f0..1264f42 100644 --- a/src/views/project-management/contract/expense-contract/index.vue +++ b/src/views/project-management/contract/expense-contract/index.vue @@ -135,6 +135,7 @@ interface ContractItem { code: string projectId: string type: string + category?: string productService: string paymentDate: string | null performanceDeadline: string | null @@ -165,6 +166,7 @@ const searchForm = reactive({ contractCode: '', client: '', status: '', + category: '', signDateRange: [] as [string, string] | [], page: 1, size: 10, @@ -196,6 +198,21 @@ const queryFormColumns = [ ], }, }, + { + field: 'category', + label: '合同类别', + type: 'select' as const, + props: { + placeholder: '请选择合同类别', + options: [ + { label: '框架协议', value: '框架协议' }, + { label: '单次合同', value: '单次合同' }, + { label: '三年长协', value: '三年长协' }, + { label: '两年长协', value: '两年长协' }, + { label: '派工单', value: '派工单' } + ] + } + }, { field: 'signDateRange', label: '签署时间', @@ -218,6 +235,7 @@ const tableColumns: TableColumnData[] = [ { title: '签署日期', dataIndex: 'signDate', slotName: 'signDate', width: 120 }, { title: '履约期限', dataIndex: 'performanceDeadline', slotName: 'performanceDeadline', width: 120 }, { title: '付款日期', dataIndex: 'paymentDate', slotName: 'paymentDate', width: 120 }, + { title: '合同类别', dataIndex: 'category', width: 120 }, { title: '合同状态', dataIndex: 'contractStatus', slotName: 'status', width: 100 }, { title: '销售人员', dataIndex: 'salespersonName', width: 100 }, { title: '销售部门', dataIndex: 'salespersonDeptName', width: 100 }, @@ -239,6 +257,7 @@ const fetchContractList = async () => { code: searchForm.contractCode, customer: searchForm.client, contractStatus: searchForm.status, + category: (searchForm as any).category || undefined, signDateStart: Array.isArray(searchForm.signDateRange) && searchForm.signDateRange.length === 2 ? searchForm.signDateRange[0] : undefined, signDateEnd: Array.isArray(searchForm.signDateRange) && searchForm.signDateRange.length === 2 ? searchForm.signDateRange[1] : undefined, } @@ -325,6 +344,8 @@ const reset = () => { status: '', signDateRange: [], page: 1, + category: '', + size: 10, }) pagination.current = 1 @@ -354,6 +375,7 @@ const newContractData = ref({ code: '', projectId: '', type: '支出合同', + category: '', productService: '', paymentDate: null, performanceDeadline: null, @@ -387,6 +409,7 @@ const openAddModal = () => { code: '', projectId: '', type: '支出合同', + category: '', productService: '', paymentDate: null, performanceDeadline: null, @@ -444,6 +467,7 @@ const handleAddSubmit = async () => { salespersonId: (newContractData.value as any).salespersonId || '', signDate: newContractData.value.signDate || null, type: newContractData.value.type || '支出合同', + category: newContractData.value.category || '', } // 如果没有合同ID则不传 @@ -535,6 +559,7 @@ const handleEditSubmit = async () => { productService: editedContractData.value.productService || '', projectId: editedContractData.value.projectId || '', salespersonId: editedContractData.value.salespersonId || '', + category: editedContractData.value.category || '', signDate: editedContractData.value.signDate || null, type: editedContractData.value.type || '', }; diff --git a/src/views/project-management/contract/revenue-contract/ContractDetail.vue b/src/views/project-management/contract/revenue-contract/ContractDetail.vue index 56f99f1..8ac7258 100644 --- a/src/views/project-management/contract/revenue-contract/ContractDetail.vue +++ b/src/views/project-management/contract/revenue-contract/ContractDetail.vue @@ -18,6 +18,10 @@ ¥{{ (contractDetail.amount || 0).toLocaleString() }} + + {{ contractDetail.category || '-' }} + + ¥{{ (contractDetail.receivedAmount || 0).toLocaleString() }} @@ -74,6 +78,7 @@ interface ContractDetail { code: string projectId: string type: string + category?: string productService: string paymentDate: string | null performanceDeadline: string | null diff --git a/src/views/project-management/contract/revenue-contract/ContractEdit.vue b/src/views/project-management/contract/revenue-contract/ContractEdit.vue index d1a4ae5..d5be870 100644 --- a/src/views/project-management/contract/revenue-contract/ContractEdit.vue +++ b/src/views/project-management/contract/revenue-contract/ContractEdit.vue @@ -46,6 +46,20 @@ + + + + + 框架协议 + 单次合同 + 三年长协 + 两年长协 + 派工单 + + + + + diff --git a/src/views/project-management/contract/revenue-contract/index.vue b/src/views/project-management/contract/revenue-contract/index.vue index eaa3b9a..69e4bbb 100644 --- a/src/views/project-management/contract/revenue-contract/index.vue +++ b/src/views/project-management/contract/revenue-contract/index.vue @@ -136,6 +136,7 @@ interface ContractItem { code: string projectId: string type: string + category?: string productService: string paymentDate: string | null performanceDeadline: string | null @@ -166,6 +167,7 @@ const searchForm = reactive({ contractCode: '', client: '', status: '', + category: '', signDateRange: [] as [string, string] | [], page: 1, size: 10, @@ -186,6 +188,17 @@ const queryFormColumns = [ ], }, }, + { field: 'category', label: '合同类别', type: 'select' as const, props: { + placeholder: '请选择合同类别', + options: [ + { label: '框架协议', value: '框架协议' }, + { label: '单次合同', value: '单次合同' }, + { label: '三年长协', value: '三年长协' }, + { label: '两年长协', value: '两年长协' }, + { label: '派工单', value: '派工单' }, + ], + } + }, { field: 'signDateRange', label: '签署时间', type: 'range-picker' as const, props: { placeholder: ['开始日期', '结束日期'], format: 'YYYY-MM-DD', } @@ -198,6 +211,7 @@ const tableColumns: TableColumnData[] = [ { title: '项目名称', dataIndex: 'projectName', width: 250, ellipsis: true, tooltip: true }, { title: '客户名称', dataIndex: 'customer', width: 200, ellipsis: true, tooltip: true }, { title: '合同金额', dataIndex: 'amount', slotName: 'contractAmount', width: 120 }, + { title: '合同类别', dataIndex: 'category', width: 120 }, { title: '已收款金额', dataIndex: 'receivedAmount', slotName: 'receivedAmount', width: 120 }, { title: '未收款金额', dataIndex: 'pendingAmount', width: 120 }, { title: '签署日期', dataIndex: 'signDate', slotName: 'signDate', width: 120 }, @@ -312,6 +326,9 @@ const fetchContractList = async () => { pageSize: searchForm.size, code: searchForm.contractCode, customer: searchForm.client, + + category: (searchForm as any).category || undefined, + contractStatus: searchForm.status, signDateStart: Array.isArray(searchForm.signDateRange) && searchForm.signDateRange.length === 2 ? searchForm.signDateRange[0] : undefined, signDateEnd: Array.isArray(searchForm.signDateRange) && searchForm.signDateRange.length === 2 ? searchForm.signDateRange[1] : undefined, @@ -393,6 +410,7 @@ const reset = () => { contractCode: '', client: '', status: '', + category: '', signDateRange: [], page: 1, size: 10, @@ -421,6 +439,7 @@ const showAddModal = ref(false) const newContractData = ref({ contractId: '', customer: '', code: '', projectId: '', type: '收入合同', productService: '', paymentDate: null, performanceDeadline: null, + category: '', paymentAddress: '', amount: 0, accountNumber: '', notes: '', contractStatus: '未执行', contractText: '', projectName: '', salespersonName: null, salespersonDeptName: '', settlementAmount: null, @@ -432,6 +451,7 @@ const openAddModal = () => { Object.assign(newContractData.value, { contractId: '', customer: '', code: '', projectId: '', type: '收入合同', productService: '', paymentDate: null, performanceDeadline: null, + category: '', paymentAddress: '', amount: 0, accountNumber: '', notes: '', contractStatus: '未执行', contractText: '', projectName: '', salespersonName: null, salespersonDeptName: '', settlementAmount: null, @@ -464,6 +484,7 @@ const handleAddSubmit = async () => { // 新建时不传 projectId,而是传项目名称 projectName: newContractData.value.projectName || '', salespersonId: (newContractData.value as any).salespersonId || '', + category: newContractData.value.category || '', signDate: newContractData.value.signDate || null, type: newContractData.value.type || '收入合同', } @@ -534,6 +555,7 @@ const handleEditSubmit = async () => { productService: editedContractData.value.productService || '', projectId: editedContractData.value.projectId || '', salespersonId: editedContractData.value.salespersonId || '', + category: editedContractData.value.category || '', signDate: editedContractData.value.signDate || null, type: editedContractData.value.type || '', }; diff --git a/src/views/system/role/RoleAddDrawer.vue b/src/views/system/role/RoleAddDrawer.vue index f3ea6e2..e44f9d9 100644 --- a/src/views/system/role/RoleAddDrawer.vue +++ b/src/views/system/role/RoleAddDrawer.vue @@ -22,8 +22,8 @@ - - + + diff --git a/src/views/system/user/UserAddDrawer.vue b/src/views/system/user/UserAddDrawer.vue index addf87d..2ff5d83 100644 --- a/src/views/system/user/UserAddDrawer.vue +++ b/src/views/system/user/UserAddDrawer.vue @@ -15,6 +15,7 @@