From 7fa43bd47b64ff1e419b4db18ccd613e14799ac9 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期五, 30 十月 2026 10:12:47 +0800
Subject: [PATCH] tst

---
 src/views/project/statistics/chargeStatistics/index.vue |  239 +++++++++++++++++++++++++++--------------------------------
 1 files changed, 111 insertions(+), 128 deletions(-)

diff --git a/src/views/project/statistics/chargeStatistics/index.vue b/src/views/project/statistics/chargeStatistics/index.vue
index c12a510..7503d9d 100644
--- a/src/views/project/statistics/chargeStatistics/index.vue
+++ b/src/views/project/statistics/chargeStatistics/index.vue
@@ -6,35 +6,35 @@
       :model="queryParams"
       ref="queryForm"
       :inline="true"
-      label-width="70px"
+      v-show="showSearch"
+      label-width="80px"
     >
       <el-row :gutter="8">
         <el-col :span="8">
-          <el-form-item label="鍖婚櫌鍚嶇О">
-            <org-selecter
-              ref="orgSelecter"
-              :org-type="'4'"
-              v-model="queryParams.pahospitalno"
+          <el-form-item label="妗堜緥鏃堕棿">
+            <el-date-picker
+              v-model="selecttime"
+              type="daterange"
+              range-separator="鑷�"
+              start-placeholder="寮�濮嬫棩鏈�"
+              end-placeholder="缁撴潫鏃ユ湡"
+              value-format="yyyy-MM-dd"
+              style="width: 100%"
+              @change="getTimeList"
             />
           </el-form-item>
         </el-col>
-        <el-col :span="12">
-          <el-form-item label="缁熻鏃ユ湡">
-            <el-date-picker
-              style="width: 100%"
-              v-model="selecttime"
-              type="monthrange"
-              range-separator="鑷�"
-              start-placeholder="寮�濮嬫湀浠�"
-              end-placeholder="缁撴潫鏈堜唤"
-              value-format="yyyy-MM-dd"
-              @change="getTimeList"
-            >
-            </el-date-picker>
+        <el-col :span="7">
+          <el-form-item label="鍖婚櫌鍚嶇О">
+            <el-input
+              v-model="queryParams.pahospitalname"
+              placeholder="璇疯緭鍏ュ尰闄㈠悕绉�"
+              clearable
+              size="small"
+              @keyup.enter.native="handleQuery"
+            />
           </el-form-item>
         </el-col>
-      </el-row>
-      <el-row :gutter="8">
         <el-col :span="6">
           <el-form-item>
             <el-button
@@ -52,7 +52,24 @@
       </el-row>
     </el-form>
 
-    <!--<el-table v-loading="loading" border :data="donatebaseinfoList">     -->
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          >瀵煎嚭</el-button
+        >
+      </el-col>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
+
     <el-table
       v-loading="loading"
       :data="jxidata"
@@ -63,36 +80,11 @@
       :summary-method="getSummaries"
       show-summary
     >
-      <el-table-column label="搴忓彿" align="center" prop="id" width="100">
-      </el-table-column>
-
-      <el-table-column label="缁熻鏈堜唤" align="center" prop="receivemonth" />
-      <el-table-column label="鍖婚櫌鍚嶇О" align="center" prop="hospitalname">
-      </el-table-column>
-      <el-table-column label="宸叉敹閲戦" align="center" prop="amount">
-      </el-table-column>
-      <el-table-column label="鏈敹閲戦" align="center" prop="nonpayment">
-      </el-table-column>
-      <el-table-column label="搴旀敹閲戦" align="center" prop="organcharge">
-      </el-table-column>
-
-      <el-table-column
-        label="鎿嶄綔"
-        align="center"
-        class-name="small-padding fixed-width"
-        fixed="right"
-      >
-        <template slot-scope="scope">
-          <!--           v-if="scope.row.recordstate==2"
- -->
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            >璇存槑</el-button
-          >
-        </template>
-      </el-table-column>
+      <el-table-column label="搴忓彿" align="center" prop="id" width="80" />
+      <el-table-column label="鍖婚櫌鍚嶇О" align="center" prop="hospitalname" show-overflow-tooltip width="260" />
+      <el-table-column label="搴旀敹閲戦" align="center" prop="organcharge" width="160" :formatter="amountFormatter" />
+      <el-table-column label="宸叉敹閲戦" align="center" prop="amount" width="160" :formatter="amountFormatter" />
+      <el-table-column label="鏈敹閲戦" align="center" prop="nonpayment" width="160" :formatter="amountFormatter" />
     </el-table>
 
     <div style="margin: 10px;text-align: right;">
@@ -113,7 +105,8 @@
   listsfeistatistics,
   listbxiaostatistics,
   listjixstatistics,
-  listanlstatistics
+  listanlstatistics,
+  exportChargeStatistics
 } from "@/api/project/statistics";
 
 import { listUser } from "@/api/project/organization";
@@ -139,7 +132,7 @@
       countyname: "",
       cuuntry: "",
 
-      selecttime: "",
+      selecttime: [],
       reportervalue: "",
       reportlist: [
         { label: "鏈敹娆�", value: "0" },
@@ -207,7 +200,13 @@
       // 鑾峰彇缁勭粐鍚嶇О鏃堕棿鑼冨洿
       daterangeReporttime: [],
       // 鏌ヨ鍙傛暟
-      queryParams: {},
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        pabegtime: "",
+        paendtime: "",
+        pahospitalname: ""
+      },
 
       // 琛ㄥ崟鍙傛暟
       form: {},
@@ -246,15 +245,42 @@
       return Arr;
     },
 
-    /** 鏌ヨ鎹愮尞鍩虹鍒楄〃 */
+    /** 鏌ヨ鏀舵缁熻 */
     getList() {
-      listsfeistatistics(this.queryParams).then(res => {
-        this.jxidata = res.rows;
-        this.jxidata.forEach(($obj, $index) => {
-          $obj.id = $index + 1;
+      this.loading = true;
+      listsfeistatistics(this.queryParams)
+        .then(res => {
+          this.jxidata = res.rows || [];
+          this.jxidata.forEach(($obj, $index) => {
+            $obj.id = $index + 1;
+          });
+          this.total = res.total;
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
         });
-        this.total = res.total;
-      });
+    },
+    /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+    handleExport() {
+      const queryParams = {
+        pabegtime: this.queryParams.pabegtime,
+        paendtime: this.queryParams.paendtime,
+        pahospitalname: this.queryParams.pahospitalname
+      };
+      this.$modal
+        .confirm("鏄惁纭瀵煎嚭褰撳墠绛涢�夋潯浠朵笅鐨勬敹娆剧粺璁℃暟鎹紵")
+        .then(() => {
+          this.exportLoading = true;
+          return exportChargeStatistics(queryParams);
+        })
+        .then(response => {
+          this.$download.name(response.msg);
+          this.exportLoading = false;
+        })
+        .catch(() => {
+          this.exportLoading = false;
+        });
     },
 
     // 琛ㄥ崟閲嶇疆
@@ -268,82 +294,39 @@
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
     resetQuery() {
-      this.daterangeReporttime = [];
-
-      this.reportervalue = "";
-
-      this.queryParams = {};
       this.selecttime = [];
-      this.getTimeList();
-      this.searchAddress = {
-        sheng: "",
-        shi: "",
-        qu: "",
-        organizationname: null
+      this.queryParams = {
+        pageNum: 1,
+        pageSize: 20,
+        pabegtime: "",
+        paendtime: "",
+        pahospitalname: ""
       };
-
       this.resetForm("queryForm");
-      this.handleQuery();
+      this.getList();
     },
-    getTimeList(e) {
-      if (this.selecttime != 0) {
-        this.queryParams.pabegtime = this.selecttime[0];
-        this.queryParams.paendtime = this.selecttime[1];
-        // if (this.queryParams.paendtime == this.queryParams.pabegtime) {
-        let num = Number(this.queryParams.paendtime.slice(5, 7));
-        if (num < 9) {
-          let mon = Number(this.queryParams.paendtime.slice(6, 7));
-          this.queryParams.paendtime =
-            this.queryParams.paendtime.slice(0, 5) +
-            "0" +
-            (mon + 1) +
-            "-" +
-            "01" +
-            " " +
-            "00" +
-            ":" +
-            "00" +
-            ":" +
-            "00";
-        }
-        // this.queryParams.paendtime=this.queryParams.paendtime.slice(0,5)骞�
-        else if (num >= 10) {
-          this.queryParams.paendtime =
-            this.queryParams.paendtime.slice(0, 5) +
-            (num + 1) +
-            "-" +
-            "01" +
-            " " +
-            "00" +
-            ":" +
-            "00" +
-            ":" +
-            "00";
-        } else {
-          this.queryParams.paendtime =
-            this.queryParams.paendtime.slice(0, 5) +
-            "10" +
-            "-" +
-            "01" +
-            " " +
-            "00" +
-            ":" +
-            "00" +
-            ":" +
-            "00";
-        }
-        this.queryParams.pabegtime =
-          this.queryParams.pabegtime + " " + "00" + ":" + "00" + ":" + "00";
-        // }
+    /** 鏃ユ湡鑼冨洿锛氭渚嬫椂闂达紝寮�濮� 00:00:00锛岀粨鏉� 23:59:59 */
+    getTimeList() {
+      if (this.selecttime && this.selecttime.length === 2) {
+        this.queryParams.pabegtime = this.selecttime[0] + " 00:00:00";
+        this.queryParams.paendtime = this.selecttime[1] + " 23:59:59";
       } else {
-        // this.queryParams.pabegtime = "1998-01-01 00:00:00";
-        // this.queryParams.paendtime = "2998-01-01 00:00:00";
+        this.queryParams.pabegtime = "";
+        this.queryParams.paendtime = "";
       }
+    },
+    /** 閲戦鏄剧ず锛氫繚鐣欎袱浣嶅皬鏁帮紝0 鏄剧ず 0.00 */
+    amountFormatter(row, column, cellValue) {
+      if (cellValue === null || cellValue === undefined || cellValue === "") {
+        return "0.00";
+      }
+      const num = Number(cellValue);
+      return Number.isFinite(num) ? num.toFixed(2) : "0.00";
     },
     getSummaries(param) {
       const { columns, data } = param;
       const sums = [];
-      var columnnames = ["receivemonth", "hospitalname"];
+      var columnnames = ["hospitalname"];
       columns.forEach((column, index) => {
         if (index === 0) {
           sums[index] = "鍚堣";

--
Gitblit v1.9.3