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/tallage/computingBill/index.vue |  184 ++++++++++++++++++++++++---------------------
 1 files changed, 97 insertions(+), 87 deletions(-)

diff --git a/src/views/project/tallage/computingBill/index.vue b/src/views/project/tallage/computingBill/index.vue
index bc2a741..b1412ce 100644
--- a/src/views/project/tallage/computingBill/index.vue
+++ b/src/views/project/tallage/computingBill/index.vue
@@ -43,7 +43,7 @@
               <el-date-picker
                 v-model="form.taxedtime"
                 value-format="yyyy-MM-dd HH:mm:ss"
-                type="datetime"
+                type="datetime" format="yyyy-MM-dd HH:mm"
                 :disabled="true"
                 placeholder="閫夋嫨鏃堕棿"
               >
@@ -298,6 +298,7 @@
             <el-row :gutter="20">
               <!--鐢ㄦ埛鏁版嵁-->
               <el-form
+                class="opo-query-form"
                 :model="patientqueryParams"
                 ref="queryForm"
                 size="small"
@@ -306,19 +307,29 @@
               >
                 <el-form-item label="鎹愮尞妗堜緥" prop="status">
                   <el-select
-                    v-model="patientqueryParams.donorno"
+                    v-model="patientqueryParams.donorname"
                     filterable
+                    allow-create
+                    default-first-option
                     placeholder="璇烽�夋嫨"
                   >
                     <el-option
                       v-for="item in donorchargeanlList"
                       :key="item.id"
                       :label="item.name"
-                      :value="item.id"
+                      :value="item.name"
                     >
                     </el-option>
-                  </el-select> </el-form-item
-                ><el-form-item label="绠楃◣鐘舵��" prop="status">
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="鐢宠浜�" prop="name">
+                  <el-input
+                    v-model="patientqueryParams.pausername"
+                    placeholder="璇疯緭鍏ョ敵璇蜂汉濮撳悕"
+                    @keyup.enter.native="handleAddpatient"
+                  />
+                </el-form-item>
+                <!-- <el-form-item label="绠楃◣鐘舵��" prop="status">
                   <el-select
                     v-model="patientqueryParams.istax"
                     filterable
@@ -332,7 +343,7 @@
                     >
                     </el-option>
                   </el-select>
-                </el-form-item>
+                </el-form-item> -->
 
                 <el-form-item>
                   <el-button
@@ -428,8 +439,17 @@
         :close-on-click-modal="false"
         :title="pdftitle"
         :visible.sync="pdfVisible"
+        :fullscreen="pdfFullscreen"
         width="60%"
+        custom-class="pdf-resize-dialog"
+        @closed="pdfFullscreen = false"
       >
+        <template slot="title">
+          <span>{{ pdftitle }}</span>
+          <el-button class="pdf-fullscreen-btn" size="mini"
+            :icon="pdfFullscreen ? 'el-icon-close' : 'el-icon-full-screen'"
+            @click="pdfFullscreen = !pdfFullscreen">{{ pdfFullscreen ? "杩樺師" : "鍏ㄥ睆" }}</el-button>
+        </template>
         <div class="pdfimg">
           <div class="box-pdf">
             <div>
@@ -515,19 +535,7 @@
             </div>
           </div>
 
-          <div v-if="this.previewpdf && pdfimgsrcList.length" class="pdfimgmin">
-            <!-- <img :src="pdfimg" /> -->
-            <el-image
-              style="width: 95%; height: 90%"
-              :src="pdfimg"
-              :preview-src-list="pdfimgsrcList"
-            >
-              <!-- <div slot="error" class="image-slot">
-                <i class="el-icon-picture-outline"></i>
-              </div> -->
-            </el-image>
-          </div>
-          <div v-else class="pdfimgmins">{{ hintitle }}</div>
+          <attachment-preview-pane :file="embeddedFile" style="flex: 1; min-width: 0;" />
         </div>
       </el-dialog>
     </div>
@@ -560,6 +568,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,
@@ -581,8 +590,8 @@
   data() {
     return {
       swgatheringlist: [
-        { label: "鏈畻绋�", value: 0 },
-        { label: "宸茬畻绋�", value: 1 }
+        { label: "宸茬畻绋�", value: 1 },
+        { label: "鏈畻绋�", value: 0 }
       ],
       gatheringlist: [
         { label: "鏈粯娆�", value: "0" },
@@ -594,9 +603,9 @@
       overallCase: [],
       patientqueryParams: {
         paApplyType: 1,
-        pacheckno: "047",
-        checkstatus: 0,
-        istax: 0,
+        // pacheckno: "047",
+        // checkstatus: 0,
+        pfundtaxid: 0,
         pageNum: 1,
         pageSize: 10
       },
@@ -739,6 +748,7 @@
 
   created() {
     console.log(234);
+    this.Networkheader = window.location.origin;
     this.GetMaxTaxid();
 
     //鑾峰彇鍙傛暟
@@ -783,18 +793,24 @@
     },
     handleQuery() {},
     resetQuery() {
-      this.patientqueryParams.donorno = null;
-      this.patientqueryParams.donorchargeid = null;
+      this.patientqueryParams.pausername = null;
+      this.patientqueryParams.donorname = null;
       this.handleAddpatient();
     },
     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);
@@ -862,7 +878,6 @@
       if (this.multipleSelection.length <= selection.length) {
         this.multipleSelection = selection;
       } else {
-        console.log(11);
         this.multipleSelection.forEach(item => {
           if (selection.includes(item)) {
           } else {
@@ -970,11 +985,11 @@
       });
     },
 
-    /** 閲嶇疆鎸夐挳鎿嶄綔 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
+    // /** 閲嶇疆鎸夐挳鎿嶄綔 */
+    // resetQuery() {
+    //   this.resetForm("queryForm");
+    //   this.handleQuery();
+    // },
 
     // 鍙栨秷鎸夐挳
     cancel() {
@@ -987,7 +1002,7 @@
       this.title = "鏂板涓撳璐规眹鎬诲崟";
       //鑾峰彇鐧诲綍鑰呬俊鎭�
       getUserProfile().then(res => {
-        this.form.username = res.createBy;
+        this.form.username = res.data.createBy;
       });
     },
 
@@ -1095,23 +1110,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 {}
     },
 
@@ -1191,25 +1199,23 @@
       const config = {
         headers: { Authorization: "Bearer " + this.ICDtoken }
       };
-      const pdfimg = this.Networkheader + "/prod-api" + response.fileName;
+      const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + response.fileName;
       //鑾峰彇绁ㄦ嵁淇℃伅浣嶇疆
       if (response.code == 200) {
         this.previewpdf = true;
-        fetch(pdfimg, config)
-          .then(response => response.blob())
-          .then(blob => {
-            // 灏嗚幏鍙栫殑鏁版嵁娴佽浆鎹负URL
-            this.pdfimg = URL.createObjectURL(blob);
-            this.pdfimgsrcList.push(URL.createObjectURL(blob));
-            this.fileListto.push({
-              name: file.name,
-              url: URL.createObjectURL(blob)
-            });
-          })
-          .catch(error => {
-            console.error("Error loading image", error);
-            return;
-          });
+        const localBlob = file.raw;
+        const localUrl = URL.createObjectURL(localBlob);
+        this.pdfimg = localUrl;
+        this.embeddedFile = {
+          name: file.name,
+          url: localUrl,
+          type: /\.pdf$/i.test(file.name) ? "pdf" : "image"
+        };
+        this.pdfimgsrcList.push(localUrl);
+        this.fileListto.push({
+          name: file.name,
+          url: localUrl
+        });
 
         this.$modal.msgSuccess(response.msg);
 
@@ -1247,7 +1253,7 @@
       if (this.donorchargeorgans[index].annexFilesList) {
         const fetchPromises = this.donorchargeorgans[index].annexFilesList.map(
           (value, indexson) => {
-            const pdfimg = this.Networkheader + "/prod-api" + value.url;
+            const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + value.url;
             return fetch(pdfimg, config)
               .then(response => response.blob())
               .then(blob => {
@@ -1286,28 +1292,32 @@
       );
     },
 
-    // 鐐瑰嚮宸蹭笂浼犳枃浠�
+    // 鐐瑰嚮宸蹭笂浼犳枃浠讹細鍦ㄩ檮浠跺脊绐楀彸渚у唴宓岄瑙�
     downFile(item) {
+      if (this.operationType == "detail") {
+        const list = (this.fileListto || []).map(f => ({
+          name: f.name,
+          url: f.url
+        }));
+        const index = list.findIndex(f => f.url === item.url);
+        this.$previewFile(list, index > -1 ? index : 0);
+        return;
+      }
+      const ext = String(item.name || "").toLowerCase().split(".").pop();
+      const isImage = ["jpg", "jpeg", "png", "gif", "bmp", "webp"].includes(ext);
+      if (ext !== "pdf" && !isImage) {
+        this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
+        this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
+        return;
+      }
+      this.embeddedFile = {
+        name: item.name,
+        url: item.url,
+        type: ext === "pdf" ? "pdf" : "image"
+      };
       this.pdftitle =
         "鍏�" + this.pdfimgsrcList.length + "椤癸紝褰撳墠閫変腑" + item.name;
-      let name = item.name.split(".");
-      if (name[1] == "pdf") {
-        this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
-        this.previewpdf = false;
-        this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
-      } else if (name[1] == "jpg" || "png") {
-        console.log(item, "灞曠ず");
-        this.previewpdf = true;
-        if (item.url) {
-          this.pdfimg = item.url;
-        } else {
-          this.pdfimg = "";
-        }
-      } else {
-        this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
-        this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
-        this.previewpdf = false;
-      }
+      this.pdfVisible = true;
     },
     getIndexInArray(arr, obj) {
       return arr.indexOf(obj);

--
Gitblit v1.9.3