feat(contract): 启用产品内容组件并优化合同相关功能

- 在合同页面启用ProductContent组件替代注释代码
- 优化ProductContent组件数值计算和空值处理
- 修改ContractList组件从productContent字段获取数据
- 在OrderDetail组件添加"写入合同"功能
- 优化ReceiveTable组件未收款金额计算逻辑
This commit is contained in:
2026-04-23 11:47:30 +08:00
parent 8897a2ad9f
commit 84c26a2990
6 changed files with 186 additions and 89 deletions

View File

@@ -182,13 +182,13 @@
// 计算总数量
totalQuantity() {
return this.products.reduce((total, item) => {
return total + (item.quantity || 0);
return total + (parseFloat(item.quantity) || 0);
}, 0);
},
// 计算总含税总额
totalTaxTotal() {
return this.products.reduce((total, item) => {
return total + (item.taxTotal || 0);
return total + (parseFloat(item.taxTotal) || 0);
}, 0);
},
// 计算大写金额
@@ -283,6 +283,12 @@
// 监听value变化更新内部数据
value: {
handler(newValue) {
if (!newValue) {
this.products = [{}];
this.remark = '';
this.productName = '';
return;
}
this.parseContent(newValue);
},
immediate: true