From 4afb944c92aed7287cc4691fc9019f3b9faea1c0 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期二, 03 十一月 2026 16:04:37 +0800
Subject: [PATCH] 增加对pdf预览支持,统计分析对时间范围的限定要求

---
 src/views/project/unitCost/particulars/index.vue |  133 ++++++++++++++++++++++++++++++++-----------
 1 files changed, 98 insertions(+), 35 deletions(-)

diff --git a/src/views/project/unitCost/particulars/index.vue b/src/views/project/unitCost/particulars/index.vue
index 2c237ca..4cbc82a 100644
--- a/src/views/project/unitCost/particulars/index.vue
+++ b/src/views/project/unitCost/particulars/index.vue
@@ -6,7 +6,7 @@
         <el-row>
           <el-col :span="5">
             <el-form-item label="鐢宠鏃ユ湡" prop="createTime">
-              <el-date-picker
+              <el-date-picker style="width: 130px;"
                 v-model="form.createTime"
                 value-format="yyyy-MM-dd "
                 type="date"
@@ -189,7 +189,7 @@
               prop="receiveTime"
               align="center"
               label="鎺ユ敹鏃ユ湡"
-              width="200"
+              width="150"
             >
               <template slot-scope="scope">
                 <el-date-picker
@@ -203,6 +203,28 @@
                   placeholder="鎺ユ敹鏃ユ湡"
                 >
                 </el-date-picker>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="organState"
+              align="center"
+              label="鍣ㄧ鐘舵��"
+              width="120"
+            >
+              <template slot-scope="scope">
+                <el-select
+                  v-model="scope.row.organState"
+                  placeholder="璇烽�夋嫨鍣ㄧ鐘舵��"
+                  clearable
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in chargetypelist"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
               </template>
             </el-table-column>
             <el-table-column
@@ -266,7 +288,7 @@
             <el-table-column
               label="鎿嶄綔"
               fixed="right"
-              width="260"
+              width="200"
               align="center"
             >
               <template slot-scope="scope">
@@ -334,7 +356,7 @@
                 ref="queryForm"
                 size="small"
                 :inline="true"
-                label-width="98px"
+                label-width="70px"
               >
                 <el-form-item label="鎺ユ敹鍖婚櫌" prop="status">
                   <el-input
@@ -344,10 +366,22 @@
                   />
                 </el-form-item>
                 <el-form-item label="鎹愮尞鑰�" prop="status">
-                  <el-input
+                  <el-input style="width: 100px;"
                     v-model="patientqueryParams.donorname"
                     @keyup.enter.native="handleAddpatient"
                     placeholder="璇疯緭鍏ユ崘鐚�呭鍚�"
+                  />
+                </el-form-item>
+                <el-form-item label="鎹愮尞鏃ユ湡" prop="donatetime">
+                  <el-date-picker style="width: 220px;"
+                    v-model="donatetimeRange"
+                    type="daterange"
+                    range-separator="鑷�"
+                    start-placeholder="寮�濮嬫棩鏈�"
+                    end-placeholder="缁撴潫鏃ユ湡"
+                    value-format="yyyy-MM-dd"
+                    clearable
+                    @change="handleDonatetimeChange"
                   />
                 </el-form-item>
                 <!-- <el-form-item label="鎹愮尞鑰�" prop="status">
@@ -382,6 +416,11 @@
                 @selection-change="handleSelectionChange"
               >
                 <el-table-column type="selection" width="55"> </el-table-column>
+                <el-table-column prop="donatetime" label="鎹愮尞鏃ユ湡" width="120">
+                  <template slot-scope="scope">
+                    <span>{{ parseTime(scope.row.donatetime, "{y}-{m}-{d}") }}</span>
+                  </template>
+                </el-table-column>
                 <el-table-column label="鎹愮尞鑰�" width="120">
                   <template slot-scope="scope">{{
                     scope.row.donorname
@@ -393,11 +432,10 @@
                   show-overflow-tooltip
                 >
                 </el-table-column>
-                <el-table-column prop="organno" label="鍣ㄥ畼缂栧彿" width="120">
-                </el-table-column>
+         
                 <el-table-column
                   prop="caseno"
-                  label="鍒嗛厤绯荤粺缂栧彿"
+                  label="鍣ㄥ畼鍒嗛厤缂栧彿"
                   show-overflow-tooltip
                 >
                 </el-table-column>
@@ -408,8 +446,14 @@
                 >
                 </el-table-column>
                 <el-table-column
-                  prop="receiveTime"
-                  label="绉绘鏃ユ湡"
+                  prop="organcharge"
+                  label="搴旀敹璐圭敤"
+                  show-overflow-tooltip
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="amount"
+                  label="瀹炴敹璐圭敤"
                   show-overflow-tooltip
                 >
                 </el-table-column>
@@ -445,6 +489,7 @@
         :title="pdftitle"
         :visible.sync="pdfVisible"
         width="60%"
+        custom-class="pdf-resize-dialog"
       >
         <div class="pdfimg">
           <div class="box-pdf">
@@ -612,17 +657,31 @@
           address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�"
         }
       ],
+      // 鏀惰垂椤圭洰涓嬫媺閫夐」
+      chargetypelist: [
+        { value: "1", label: "绉绘" },
+        { value: "2", label: "寮冪敤" },
+        { value: "3", label: "搴撳瓨" },
+        { value: "4", label: "澶卞姛" },
+        { value: "5", label: "鐩寸郴鍏嶉櫎" },
+        { value: "6", label: "涓嶈壇浜嬩欢" },
+        { value: "7", label: "绉戠爺" }
+      ],
       gatheringlist: [
         { label: "鏂板缓", value: "1" },
         { label: "寰呮敹娆�", value: "2" },
         { label: "宸叉敹娆�", value: "3" }
       ],
       multipleSelection: [],
+      // 鎶ュ憡鏃ユ湡鍖洪棿锛堝搴斿悗绔� starttime/endtime锛屾寜 donatebaseinfo.donatetime 杩囨护锛�
+      donatetimeRange: [],
       patientqueryParams: {
         pageNum: 1,
         pageSize: 10,
         hospitalno: null,
-        paymentid: null
+        paymentid: null,
+        starttime: null,
+        endtime: null
       },
       // 鎬婚�変腑鏁版嵁
       overallCase: [],
@@ -811,7 +870,21 @@
     resetQuery() {
       this.patientqueryParams.donorname = null;
       this.patientqueryParams.donorchargeid = null;
+      this.patientqueryParams.pageNum = 1;
+      this.donatetimeRange = [];
+      this.handleDonatetimeChange(null);
       this.handleAddpatient();
+    },
+    // 鎶ュ憡鏃ユ湡鍖洪棿 -> 鏌ヨ鍙傛暟锛屾湭閫夋嫨鏃朵紶 null锛岄伩鍏嶅悗绔嫾鍑� donatetime >= ''
+    handleDonatetimeChange(val) {
+      if (val && val.length === 2) {
+        this.patientqueryParams.starttime = val[0] + " 00:00:00";
+        this.patientqueryParams.endtime = val[1] + " 23:59:59";
+      } else {
+        this.patientqueryParams.starttime = null;
+        this.patientqueryParams.endtime = null;
+      }
+      this.patientqueryParams.pageNum = 1;
     },
     handleUploadError() {},
     // 寮规娣诲姞
@@ -909,14 +982,8 @@
     },
     // 鑾峰彇璇锋眰澶�
     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;
     },
     // 琛ㄥ崟閲嶇疆
     reset() {
@@ -987,6 +1054,7 @@
         this.form.hospitalname = this.curCase.organizationname;
         this.form.hospitalno = this.curCase.organizationid;
         this.form.borthdate = this.curCase.birthday;
+        this.form.paymentno = this.$moment().format("YYYYMM") + this.curCase.organizationname ;
       }
     },
 
@@ -1138,7 +1206,8 @@
         "remark",
         "name",
         "caseno",
-        "receiveTime"
+        "receiveTime",
+        "organState"
       ];
       columns.forEach((column, index) => {
         if (index === 0) {
@@ -1181,7 +1250,7 @@
       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;
@@ -1237,7 +1306,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 => {
@@ -1280,19 +1349,13 @@
     downFile(item) {
       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 = "";
-        }
+      const ext = String(item.name || "pdf").toLowerCase().split(".").pop();
+      if (ext === "pdf") {
+        this.$previewFile([{ name: item.name, url: item.url }]);
+        return;
+      } else if (["jpg", "jpeg", "png", "gif", "bmp", "webp"].includes(ext)) {
+        this.$previewFile([{ name: item.name, url: item.url }]);
+        return;
       } else {
         this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
         this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");

--
Gitblit v1.9.3