From d3f66f66a0fa684bdc80bca582adb726b102966f Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期三, 04 十一月 2026 09:55:41 +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