From 22449e0279eff502e4496b57da2ba602360e5b13 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期三, 25 十一月 2026 13:50:03 +0800
Subject: [PATCH] 回款明细修改

---
 src/views/project/unitCost/organfee/index.vue |   84 +++++++++++++++++++++++++++++++++--------
 1 files changed, 67 insertions(+), 17 deletions(-)

diff --git a/src/views/project/unitCost/organfee/index.vue b/src/views/project/unitCost/organfee/index.vue
index 202e73b..95ec9de 100644
--- a/src/views/project/unitCost/organfee/index.vue
+++ b/src/views/project/unitCost/organfee/index.vue
@@ -17,7 +17,6 @@
           size="small"
           style="width: 200px"
           @change="handleHospitalFilterChange" 
-          filterable鈥�
           allow-create
         >
          <el-option label="鏈~鍐欏洖娆惧尰闄�" value="__EMPTY__" />
@@ -61,6 +60,16 @@
           placeholder="璇疯緭鍏ユ崘鐚�呭鍚�"
           clearable
           size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="鍣ㄥ畼鍚嶇О" prop="organname">
+        <el-input
+          v-model="queryParams.organname"
+          placeholder="璇疯緭鍏ュ櫒瀹樺悕绉�"
+          clearable
+          size="small"
+          style="width: 160px"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
@@ -126,6 +135,8 @@
       v-loading="loading"
       border
       :data="organfeeList"
+      show-summary
+      :summary-method="getSummaries"
       highlight-current-row
       @current-change="handleCurrentChange"
     >
@@ -196,17 +207,12 @@
       
       <el-table-column label="鍥炴鏃ユ湡" width="120" align="center">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.organtime, "{y}-{m}-{d}") }}</span>
+          
+          <span>{{ parseTime(scope.row.amounttime, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
       <el-table-column prop="name" label="鍙椾綋" width="120" align="center" />
-      <el-table-column
-        prop="payOrganName"
-        label="鍣ㄥ畼鍚嶇О-缁撶畻"
-        width="140"
-        align="center"
-        show-overflow-tooltip
-      />
+      
       <el-table-column
         prop="organchargedesc"
         label="澶囨敞"
@@ -215,7 +221,7 @@
       />
       <el-table-column
         label="鎿嶄綔"
-        width="210"
+        width="230"
         align="center"
         fixed="right"
       >
@@ -281,11 +287,11 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="(缁撶畻)鍣ㄥ畼鍚嶇О" prop="payOrganName">
+            <el-form-item label="鍣ㄥ畼鍚嶇О" prop="organname">
               <el-input
-                v-model="editForm.payOrganName"
+                v-model="editForm.organname"
                 maxlength="100"
-                placeholder="璇疯緭鍏�(缁撶畻)鍣ㄥ畼鍚嶇О"
+                placeholder="璇疯緭鍏ュ櫒瀹樺悕绉�"
               />
             </el-form-item>
           </el-col>
@@ -540,7 +546,8 @@
   addDonorchargeorgan,
   updateDonorchargeorgan,
   delDonorchargeorgan,
-  exportOrganfee
+  exportOrganfee,
+  getOrganfeeSummary
 } from "@/api/project/donorcharge";
 import { listOrganization } from "@/api/project/organization";
 
@@ -575,6 +582,12 @@
       showSearch: true,
       // 鎬绘潯鏁�
       total: 0,
+      // 鍚堣锛堝簲鏀�/瀹炴敹/鏈洖娆撅級
+      summary: {
+        organchargeTotal: 0,
+        amountTotal: 0,
+        unreceivedTotal: 0
+      },
       // 鍣ㄥ畼璐圭敤鍒楄〃
       organfeeList: [],
       // 琛ㄦ牸褰撳墠閫変腑琛�
@@ -591,7 +604,8 @@
         { value: "4", label: "澶卞姛" },
         { value: "5", label: "鐩寸郴鍏嶉櫎" },
         { value: "6", label: "涓嶈壇浜嬩欢" },
-        { value: "7", label: "绉戠爺" }
+        { value: "7", label: "绉戠爺" },
+        { value: "8", label: "鍥炵撼" }
       ],
       // 淇敼寮圭獥
       editOpen: false,
@@ -600,7 +614,7 @@
         id: null,
         hospitalno: null,
         hospitalname: null,
-        payOrganName: null,
+        organname: null,
         caseno: null,
         name: null,
         organcharge: null,
@@ -633,6 +647,7 @@
         hospitalno: null,
         hospitalnoIsNull: false,
         donorname: null,
+        organname: null,
         organState: null,
         payStatus: null,
         paymentid: null,
@@ -660,6 +675,40 @@
         .finally(() => {
           this.loading = false;
         });
+      this.getSummary();
+    },
+    /** 鏌ヨ鍚堣锛堝簲鏀�/瀹炴敹/鏈洖娆撅級锛屾寜褰撳墠鏌ヨ鏉′欢缁熻鍏ㄩ儴缁撴灉 */
+    getSummary() {
+      getOrganfeeSummary(this.queryParams)
+        .then(response => {
+          const data = response.data || {};
+          this.summary = {
+            organchargeTotal: Number(data.organchargeTotal || 0),
+            amountTotal: Number(data.amountTotal || 0),
+            unreceivedTotal: Number(data.unreceivedTotal || 0)
+          };
+        })
+        .catch(() => {});
+    },
+    /** 琛ㄦ牸搴曢儴鍚堣琛� */
+    getSummaries({ columns }) {
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = "鍚堣";
+          return;
+        }
+        if (column.property === "organcharge") {
+          sums[index] = this.summary.organchargeTotal.toFixed(2);
+        } else if (column.property === "amount") {
+          sums[index] = this.summary.amountTotal.toFixed(2);
+        } else if (column.label === "鏈洖娆鹃噾棰�") {
+          sums[index] = this.summary.unreceivedTotal.toFixed(2);
+        } else {
+          sums[index] = "";
+        }
+      });
+      return sums;
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
@@ -828,7 +877,7 @@
             ? null
             : String(row.hospitalno),
         hospitalname: row.hospitalname || null,
-        payOrganName: row.payOrganName || "",
+        organname: row.organname ,
         caseno: row.caseno || "",
         name: row.name || "",
         organcharge:
@@ -885,6 +934,7 @@
       this.queryParams.hospitalnoIsNull = false;
       this.queryParams.hospitalno = null;
       this.queryParams.donorname = null;
+      this.queryParams.organname = null;
       this.queryParams.organState = null;
       this.queryParams.payStatus = null;
       this.queryParams.starttime = null;

--
Gitblit v1.9.3