master
xy 2 years ago
parent 0bd258cbb9
commit 71cfb56029

@ -347,34 +347,35 @@ export default {
: "支出金额(元)", : "支出金额(元)",
width: 140, width: 140,
align: "right", align: "right",
formatter: (cell, data, value) => {
return Number(value)
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
}
}, },
{ {
prop: "use_money_total", prop: "apply_money_total",
label: label:
this.$route.path.split("_")[1] == 2 this.$route.path.split("_")[1] == 2
? "实际报销金额(元)" ? "实际报销金额(元)"
: "实际支出金额(元)", : "实际支出金额(元)",
width: 140, width: 140,
align: "right", align: "right",
customFn: (row) => { formatter: (cell, data, value) => {
let total = 0; return Number(value)
row.plans?.forEach((i) => { .toFixed(2)
total += Number(i.money) || 0; .replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
}); }
return <span>{total}</span>;
},
}, },
{ {
prop: "has_money_total", prop: "fund_log_total",
label: "已付金额", label: "已付金额",
width: 140, width: 140,
align: "right", align: "right",
customFn: (row) => { formatter: (cell, data, value) => {
let total = 0; return Number(value)
row.plans?.forEach((i) => { .toFixed(2)
total += Number(i.end_money) || 0; .replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
});
return <span>{total}</span>;
}, },
}, },
{ {

Loading…
Cancel
Save