From 0e10e10157b90002b99996914eaf1e5574924ddf Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期一, 12 十月 2026 11:15:50 +0800
Subject: [PATCH] 修改了报销校验

---
 src/views/project/tallage/computingBill/index.vue |   51 +++++++++++++++++++++++++--------------------------
 1 files changed, 25 insertions(+), 26 deletions(-)

diff --git a/src/views/project/tallage/computingBill/index.vue b/src/views/project/tallage/computingBill/index.vue
index 6c8d2e1..95e1304 100644
--- a/src/views/project/tallage/computingBill/index.vue
+++ b/src/views/project/tallage/computingBill/index.vue
@@ -42,8 +42,8 @@
             ><el-form-item label="绠楃◣鏃堕棿" prop="donateno">
               <el-date-picker
                 v-model="form.taxedtime"
-                value-format="yyyy-MM-dd HH:mm:ss"
-                type="datetime"
+                value-format="yyyy-MM-dd HH:mm"
+                type="datetime" format="yyyy-MM-dd HH:mm"
                 :disabled="true"
                 placeholder="閫夋嫨鏃堕棿"
               >
@@ -308,6 +308,8 @@
                   <el-select
                     v-model="patientqueryParams.donorname"
                     filterable
+                    allow-create
+                    default-first-option
                     placeholder="璇烽�夋嫨"
                   >
                     <el-option
@@ -568,6 +570,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 {
   ExpertfeeListnb,
   getFundtax,
@@ -589,9 +592,8 @@
   data() {
     return {
       swgatheringlist: [
-        { label: "瀹℃牳涓�", value: 1 },
-        { label: "鍏佽绠楃◣", value: 0 },
-        { label: "宸茬畻绋�", value: 2 }
+        { label: "宸茬畻绋�", value: 1 },
+        { label: "鏈畻绋�", value: 0 }
       ],
       gatheringlist: [
         { label: "鏈粯娆�", value: "0" },
@@ -606,7 +608,6 @@
         // pacheckno: "047",
         // checkstatus: 0,
         pfundtaxid: 0,
-        departid: 0,
         pageNum: 1,
         pageSize: 10
       },
@@ -800,11 +801,17 @@
     handleUploadError() {},
     // 寮规娣诲姞
     AddDispatchpatients() {
-      this.donorchargeorgans = this.donorchargeorgans.concat(this.overallCase);
-      console.log(this.donorchargeorgans, "donorchargeorgans");
-      this.donorchargeorgans.forEach(item => {
-        CalculationDetail({ id: item.id, fundTaxId: this.form.id });
+      let newArr = this.donorchargeorgans.concat(this.overallCase);
+      this.donorchargeorgans = newArr.filter((item, index, self) => {
+        return !self.slice(index + 1).some(other => other.id === item.id);
       });
+
+      console.log(this.donorchargeorgans, "donorchargeorgans");
+      if (this.form.id) {
+        this.donorchargeorgans.forEach(item => {
+          CalculationDetail({ id: item.id, fundTaxId: this.form.id });
+        });
+      }
       this.donorchargeorgans.forEach(item => {
         item.taXmoney = item.pretaxcost - item.taxedcost;
         item.taXmoney = item.taXmoney.toFixed(2);
@@ -872,7 +879,6 @@
       if (this.multipleSelection.length <= selection.length) {
         this.multipleSelection = selection;
       } else {
-        console.log(11);
         this.multipleSelection.forEach(item => {
           if (selection.includes(item)) {
           } else {
@@ -997,7 +1003,7 @@
       this.title = "鏂板涓撳璐规眹鎬诲崟";
       //鑾峰彇鐧诲綍鑰呬俊鎭�
       getUserProfile().then(res => {
-        this.form.username = res.createBy;
+        this.form.username = res.data.createBy;
       });
     },
 
@@ -1105,23 +1111,16 @@
         this.$modal.msgError("娉ㄦ剰瀹炴敹閲戦涓嶇瓑浜庡簲鏀堕噾棰濓紝璇锋牳瀵规暟鎹紒");
       }
     },
-    //淇敼瀹炴敹鎴栧簲鏀跺悗瑙﹀彂
+    //淇敼瀹炴敹鎴栧簲鏀跺悗瑙﹀彂锛堥噾棰濅竴寰嬭蛋绮剧‘杩愮畻锛�
     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.receivableamount = ChargeSum.toFixed(2);
-        this.form.receivedamount = ChargeamountSum.toFixed(2);
+        this.form.receivableamount = moneyRound(
+          moneySum(this.donorchargeorgans, "organcharge")
+        ).toFixed(2);
+        this.form.receivedamount = moneyRound(
+          moneySum(this.donorchargeorgans, "amount")
+        ).toFixed(2);
       } catch {}
     },
 

--
Gitblit v1.9.3