From 2f6cdbb3cdf72b4a04fdc95dfd80dce08a27917e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=AB=E5=9C=B0=E5=83=A7?= <357099073@qq.com> Date: Sun, 13 Sep 2026 14:09:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=9E=E6=AC=BE=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/components.d.ts | 1 + backend/src/api/crmPayback.js | 19 + .../crm/contract/components/ProductList.vue | 48 +- .../apps/crm/contract/components/create.vue | 7 + .../contract/components/detail_payback.vue | 211 +++--- .../apps/crm/contract/components/utils.js | 3 + .../apps/crm/payback/components/detail.vue | 349 +++++++--- backend/src/views/apps/crm/payback/index.vue | 608 ++++-------------- go/controllers/backend_crm_contract.go | 18 +- go/controllers/backend_crm_payback.go | 188 +++++- go/models/init.go | 33 + go/models/tenant_crm_payback_record.go | 34 + go/routers/backend/backend.go | 4 + 13 files changed, 855 insertions(+), 668 deletions(-) create mode 100644 go/models/tenant_crm_payback_record.go diff --git a/backend/components.d.ts b/backend/components.d.ts index 2f3d0d6..db5e9e8 100644 --- a/backend/components.d.ts +++ b/backend/components.d.ts @@ -15,6 +15,7 @@ declare module 'vue' { CommonHeader: typeof import('./src/components/CommonHeader.vue')['default'] ElAlert: typeof import('element-plus/es')['ElAlert'] ElAside: typeof import('element-plus/es')['ElAside'] + ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElBacktop: typeof import('element-plus/es')['ElBacktop'] ElBadge: typeof import('element-plus/es')['ElBadge'] diff --git a/backend/src/api/crmPayback.js b/backend/src/api/crmPayback.js index 272497f..140d31f 100644 --- a/backend/src/api/crmPayback.js +++ b/backend/src/api/crmPayback.js @@ -47,3 +47,22 @@ export function getPaybackProgress(params) { export function registerPaybackReceive(id, data) { return request({ url: `/backend/crm/payback/${id}/receive`, method: "post", data }); } + +/* ============================ 回款记录(回款进度流水) ============================ + * 以「回款计划」为先导条件:每次「新建回款」追加一条记录,构成回款进度列表。 + * ============================================================================== */ + +/** 回款记录列表:按合同 / 计划查询一笔笔实际回款(含计划总额与已回款汇总) */ +export function getPaybackRecordList(params) { + return request({ url: "/backend/crm/payback/record/list", method: "get", params }); +} + +/** 新建回款:追加一条回款记录 */ +export function createPaybackRecord(data) { + return request({ url: "/backend/crm/payback/record", method: "post", data }); +} + +/** 删除回款记录 */ +export function deletePaybackRecord(id) { + return request({ url: `/backend/crm/payback/record/${id}`, method: "delete" }); +} diff --git a/backend/src/views/apps/crm/contract/components/ProductList.vue b/backend/src/views/apps/crm/contract/components/ProductList.vue index 3883933..7b46fc9 100644 --- a/backend/src/views/apps/crm/contract/components/ProductList.vue +++ b/backend/src/views/apps/crm/contract/components/ProductList.vue @@ -41,29 +41,25 @@ maxlength="80" /> + - +
回款进度
@@ -57,49 +57,29 @@ 已回款:¥{{ formatMoney(progressSummary.total_received) }} 待回款:¥{{ formatMoney((progressSummary.total_planned || 0) - (progressSummary.total_received || 0)) }}
- + - - 新建回款计划 + + 新建回款
- - - - - - - - - - - - - - - - - - - + - + - + + + + - - + + - - + + - + @@ -131,21 +111,26 @@ - - + + - - {{ receiveForm.name || `第${receiveForm.seq}期` }} + + + + - - ¥{{ formatMoney(receiveForm.amount) }} - - + @@ -158,6 +143,11 @@ style="width: 100%" /> + + + + +
+ + +