增加财务状态页面 客户管理财务状态优化

This commit is contained in:
jhd
2026-05-23 16:46:40 +08:00
parent eb8e797a4d
commit dc3f20ebc9
2 changed files with 10 additions and 14 deletions

View File

@@ -52,7 +52,8 @@
<KLPTable v-loading="loading" :data="receivableList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="应收ID" align="center" prop="receivableId" v-if="false"/>
<!-- <el-table-column label="客户" align="center" prop="customerName" /> -->
<el-table-column label="客户" align="center" prop="customerName" />
<el-table-column label="合同编号" align="center" prop="contractCode" />
<el-table-column label="收款日期" align="center" prop="dueDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.dueDate, '{y}-{m}-{d}') }}</span>

View File

@@ -17,13 +17,6 @@
</el-form-item>
</el-form>
<!-- 财务状态概览 -->
<el-descriptions :column="3" title="财务状态" border>
<el-descriptions-item label="订单总金额">{{ totalAmount }}万元</el-descriptions-item>
<el-descriptions-item label="已收款金额">{{ receivedAmount }}万元</el-descriptions-item>
<el-descriptions-item label="未收款金额">{{ unreceivedAmount }}万元</el-descriptions-item>
</el-descriptions>
<!-- 收款明细标题 -->
<el-descriptions title="收款明细"></el-descriptions>
@@ -54,7 +47,9 @@
<span>{{ parseTime(scope.row.dueDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="收金额" align="center" prop="amount" />
<el-table-column label="收金额" align="center" prop="amount" />
<el-table-column label="已收款" align="center" prop="paidAmount" />
<el-table-column label="未收款" align="center" prop="balanceAmount" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@@ -156,6 +151,7 @@ export default {
},
created() {
this.getList();
this.loadContracts(); // 加载所有合同编号,支持独立查询
},
methods: {
getList() {
@@ -177,17 +173,16 @@ export default {
this.reset();
},
handleCustomerChange(customer) {
// 清空合同选择
this.queryParams.contractCode = undefined;
// 根据客户ID获取合同列表
// 根据客户ID获取合同列表可选
if (customer && customer.customerId) {
this.loadContracts(customer.customerId);
} else {
this.contractOptions = [];
// 不传客户ID加载所有合同
this.loadContracts();
}
},
loadContracts(customerId) {
listOrder({ customerId, pageNum: 1, pageSize: 100 }).then(res => {
listOrder({ customerId: customerId || undefined, pageNum: 1, pageSize: 100 }).then(res => {
this.contractOptions = (res.rows || []).map(item => ({
value: item.contractCode,
label: item.contractCode