From e1dd822239ce5b1fd85462c95b264b300153a4cf Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期二, 03 十一月 2026 21:45:00 +0800
Subject: [PATCH] 修改了回款名字
---
src/views/project/donorcharge/donorchargedetail/index.vue | 55 +++++++++++++++++++------------------------------------
1 files changed, 19 insertions(+), 36 deletions(-)
diff --git a/src/views/project/donorcharge/donorchargedetail/index.vue b/src/views/project/donorcharge/donorchargedetail/index.vue
index 953e979..693ecbb 100644
--- a/src/views/project/donorcharge/donorchargedetail/index.vue
+++ b/src/views/project/donorcharge/donorchargedetail/index.vue
@@ -179,7 +179,7 @@
size="small"
style="width: 100%"
v-model="scope.row.amounttime"
- type="date"
+ type="date" format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="瀹炴敹鏃堕棿"
>
@@ -242,7 +242,7 @@
size="small"
style="width: 100%"
v-model="scope.row.organtime"
- type="date"
+ type="date" format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="绉绘鏃堕棿"
>
@@ -294,6 +294,7 @@
import Li_area_select from "@/components/Address";
import { getUserProfile } from "@/api/system/user";
import { getToken } from "@/utils/auth";
+import { moneySum, moneyRound } from "@/utils/money";
import debounce from "lodash/debounce";
export default {
components: {
@@ -471,14 +472,8 @@
handleUploadError() {},
// 鑾峰彇璇锋眰澶�
Getnetworkheader() {
- let string = window.location.href;
- if (string.includes("9091")) {
- const index = string.indexOf("9091");
- this.Networkheader = string.slice(0, index + 4); // 鎴彇9091鍙婂叾鍓嶉儴瀛楃
- } else {
- const index = string.indexOf("8032");
- this.Networkheader = string.slice(0, index + 4); // 鎴彇8032鍙婂叾鍓嶉儴瀛楃
- }
+ // 浠ュ綋鍓嶉〉闈� origin 涓哄噯锛屽吋瀹� 80/8032/9091 鍙婂悗缁鍙h皟鏁�
+ this.Networkheader = window.location.origin;
},
// 鍙戠エ鍒囨崲
handleClick(tab, event) {
@@ -667,27 +662,23 @@
submitForm: debounce(function(data) {
this.$refs["form"].validate(valid => {
if (valid) {
- //鏍¢獙銆佽垂鐢ㄥ悎璁�
- let ChargeSum = 0;
- let ChargeamountSum = 0;
+ //鏍¢獙銆佽垂鐢ㄥ悎璁★紙閲戦涓�寰嬭蛋绮剧‘杩愮畻锛�
let organname = "";
try {
for (let i = 0; i < this.donorchargeorgans.length; i++) {
organname += this.donorchargeorgans[i].organname + ",";
- if (!isNaN(parseFloat(this.donorchargeorgans[i].organcharge))) {
- ChargeSum += parseFloat(this.donorchargeorgans[i].organcharge);
- }
- if (!isNaN(parseFloat(this.donorchargeorgans[i].amount))) {
- ChargeamountSum += parseFloat(this.donorchargeorgans[i].amount);
- }
}
this.form.donateorgan = organname.substring(
0,
organname.lastIndexOf(",")
);
- this.form.chargeamount = ChargeSum.toFixed(2);
- this.form.chargeamounted = ChargeamountSum.toFixed(2);
+ this.form.chargeamount = moneyRound(
+ moneySum(this.donorchargeorgans, "organcharge")
+ ).toFixed(2);
+ this.form.chargeamounted = moneyRound(
+ moneySum(this.donorchargeorgans, "amount")
+ ).toFixed(2);
} catch {}
//淇濆瓨
@@ -728,24 +719,16 @@
});
}, 500),
- //璁$畻璐圭敤鍚堣
+ //璁$畻璐圭敤鍚堣锛堥噾棰濅竴寰嬭蛋绮剧‘杩愮畻锛�
chargeSum() {
- let ChargeSum = 0;
- let ChargeamountSum = 0;
-
//璐圭敤鍚堣
try {
- for (let i = 0; i < this.donorchargeorgans.length; i++) {
- if (!isNaN(parseFloat(this.donorchargeorgans[i].organcharge))) {
- ChargeSum += parseFloat(this.donorchargeorgans[i].organcharge);
- }
- if (!isNaN(parseFloat(this.donorchargeorgans[i].amount))) {
- ChargeamountSum += parseFloat(this.donorchargeorgans[i].amount);
- }
- }
-
- this.form.chargeamount = ChargeSum.toFixed(2);
- this.form.chargeamounted = ChargeamountSum.toFixed(2);
+ this.form.chargeamount = moneyRound(
+ moneySum(this.donorchargeorgans, "organcharge")
+ ).toFixed(2);
+ this.form.chargeamounted = moneyRound(
+ moneySum(this.donorchargeorgans, "amount")
+ ).toFixed(2);
} catch {}
},
--
Gitblit v1.9.3