增加财务状态页面 客户管理财务状态优化
This commit is contained in:
@@ -52,7 +52,8 @@
|
|||||||
<KLPTable v-loading="loading" :data="receivableList" @selection-change="handleSelectionChange">
|
<KLPTable v-loading="loading" :data="receivableList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<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="应收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">
|
<el-table-column label="收款日期" align="center" prop="dueDate" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.dueDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.dueDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
|||||||
@@ -17,13 +17,6 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</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>
|
<el-descriptions title="收款明细"></el-descriptions>
|
||||||
|
|
||||||
@@ -54,7 +47,9 @@
|
|||||||
<span>{{ parseTime(scope.row.dueDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.dueDate, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -156,6 +151,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.loadContracts(); // 加载所有合同编号,支持独立查询
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
@@ -177,17 +173,16 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
handleCustomerChange(customer) {
|
handleCustomerChange(customer) {
|
||||||
// 清空合同选择
|
// 根据客户ID获取合同列表(可选)
|
||||||
this.queryParams.contractCode = undefined;
|
|
||||||
// 根据客户ID获取合同列表
|
|
||||||
if (customer && customer.customerId) {
|
if (customer && customer.customerId) {
|
||||||
this.loadContracts(customer.customerId);
|
this.loadContracts(customer.customerId);
|
||||||
} else {
|
} else {
|
||||||
this.contractOptions = [];
|
// 不传客户ID,加载所有合同
|
||||||
|
this.loadContracts();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadContracts(customerId) {
|
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 => ({
|
this.contractOptions = (res.rows || []).map(item => ({
|
||||||
value: item.contractCode,
|
value: item.contractCode,
|
||||||
label: item.contractCode
|
label: item.contractCode
|
||||||
|
|||||||
Reference in New Issue
Block a user