From 79678b7a83c996193fcefd284c972475af55c9d4 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期一, 02 十一月 2026 16:12:22 +0800
Subject: [PATCH] 回款统计样式调整
---
src/views/project/statistics/chargeStatistics/index.vue | 438 ++++++++++++++++++++++++++++++++----------------------
1 files changed, 258 insertions(+), 180 deletions(-)
diff --git a/src/views/project/statistics/chargeStatistics/index.vue b/src/views/project/statistics/chargeStatistics/index.vue
index dedf037..826eacf 100644
--- a/src/views/project/statistics/chargeStatistics/index.vue
+++ b/src/views/project/statistics/chargeStatistics/index.vue
@@ -1,62 +1,40 @@
<!-- -->
<template>
<div class="app-container">
- 缁╂晥
<el-form
+ class="opo-query-form"
:model="queryParams"
ref="queryForm"
:inline="true"
- label-width="70px"
+ v-show="showSearch"
+ label-width="80px"
>
<el-row :gutter="8">
- <el-col :span="6">
- <el-form-item label="鍖婚櫌鍚嶇О">
- <el-select
- v-model="queryParams.pabonustype"
- placeholder="璇烽�夋嫨妗堜緥鐘舵��"
- >
- <el-option
- v-for="item in reportlist"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="缁熻绫诲瀷">
- <el-select
- v-model="queryParams.pabonustype"
- placeholder="璇烽�夋嫨妗堜緥鐘舵��"
- >
- <el-option
- v-for="item in reportlist"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="8">
- <el-col :span="12">
- <el-form-item label="缁熻鏃ユ湡">
+ <el-col :span="8">
+ <el-form-item label="妗堜緥鏃堕棿">
<el-date-picker
- style="width: 100%"
v-model="selecttime"
- type="monthrange"
+ type="daterange"
range-separator="鑷�"
- start-placeholder="寮�濮嬫湀浠�"
- end-placeholder="缁撴潫鏈堜唤"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
value-format="yyyy-MM-dd"
+ style="width: 220px"
@change="getTimeList"
- >
- </el-date-picker>
+ />
</el-form-item>
</el-col>
-
+ <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-col :span="6">
<el-form-item>
<el-button
@@ -74,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"
@@ -85,48 +80,93 @@
: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="name" />
-
- <el-table-column label="涓氬姟缁�" align="center" prop="name">
- </el-table-column>
- <el-table-column label="涓撹亴浜哄憳" align="center" prop="age" />
-
- <el-table-column
- label="閲戦"
- align="center"
- prop="amount"
- />
-
- <el-table-column
- label="鎿嶄綔"
- align="center"
- class-name="small-padding fixed-width"
- fixed="right"
- >
+ <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">
<template slot-scope="scope">
- <!-- v-if="scope.row.recordstate==2"
- -->
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleAdd(scope.row)"
- >鍖诲璇勪及</el-button
- >
+ <el-button type="text" @click="handleDetail(scope.row, '1')">{{
+ amountFormatter(scope.row, null, scope.row.amount)
+ }}</el-button>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏈敹閲戦" align="center" prop="nonpayment" width="160">
+ <template slot-scope="scope">
+ <el-button type="text" @click="handleDetail(scope.row, '0')">{{
+ amountFormatter(scope.row, null, scope.row.nonpayment)
+ }}</el-button>
</template>
</el-table-column>
</el-table>
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
+ <div style="margin: 10px;text-align: right;">
+ <div>
+ 鍏� <span style="color:#1890FF ;">{{ total }}</span> 鏉℃暟鎹�
+ </div>
+ </div>
+
+ <!-- 宸叉敹 / 鏈敹閲戦鏄庣粏 -->
+ <el-dialog
+ :title="detailTitle"
+ :visible.sync="detailOpen"
+ width="1100px"
+ append-to-body
+ :close-on-click-modal="false"
+ >
+ <el-table
+ v-loading="detailLoading"
+ border
+ :data="detailList"
+ max-height="520"
+ show-summary
+ :summary-method="getDetailSummaries"
+ >
+ <el-table-column type="index" label="搴忓彿" width="55" align="center" />
+ <el-table-column label="妗堜緥鏃堕棿" width="110" align="center">
+ <template slot-scope="scope">
+ {{ parseTime(scope.row.donatetime, "{y}-{m}-{d}") }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="donorname" label="鎹愮尞鑰�" width="100" align="center" />
+ <el-table-column prop="organname" label="鍣ㄥ畼鍚嶇О" width="100" align="center" />
+ <el-table-column prop="name" label="鍙椾綋濮撴皬" width="100" align="center" />
+ <el-table-column
+ prop="caseno"
+ label="鍣ㄥ畼鍒嗛厤缂栧彿"
+ min-width="140"
+ align="center"
+ show-overflow-tooltip
+ />
+ <el-table-column
+ prop="organcharge"
+ label="搴旀敹閲戦"
+ width="120"
+ align="center"
+ :formatter="amountFormatter"
+ />
+ <el-table-column
+ prop="amount"
+ label="宸叉敹閲戦"
+ width="120"
+ align="center"
+ :formatter="amountFormatter"
+ />
+ <el-table-column
+ prop="nonpayment"
+ label="鏈敹閲戦"
+ width="120"
+ align="center"
+ :formatter="amountFormatter"
+ />
+ </el-table>
+ <pagination
+ v-show="detailTotal > 0"
+ :total="detailTotal"
+ :page.sync="detailQuery.pageNum"
+ :limit.sync="detailQuery.pageSize"
+ @pagination="getDetailList"
+ />
+ </el-dialog>
<!-- 娣诲姞鎴栦慨鏀瑰灞炵‘璁ゅ璇濇 -->
</div>
@@ -140,7 +180,9 @@
listsfeistatistics,
listbxiaostatistics,
listjixstatistics,
- listanlstatistics
+ listanlstatistics,
+ getChargeStatisticsDetail,
+ exportChargeStatistics
} from "@/api/project/statistics";
import { listUser } from "@/api/project/organization";
@@ -166,12 +208,11 @@
countyname: "",
cuuntry: "",
- selecttime: "",
+ selecttime: [],
reportervalue: "",
reportlist: [
- { label: "鏈堝害", value: "1" },
- { label: "瀛e害", value: "2" },
- { label: "骞村害", value: "3" }
+ { label: "鏈敹娆�", value: "0" },
+ { label: "宸叉敹娆�", value: "1" }
],
//鐪佸競鍖�
//榛樿鍊艰缃紝鍙负绌�
@@ -237,7 +278,10 @@
// 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
- pageSize: 10
+ pageSize: 20,
+ pabegtime: "",
+ paendtime: "",
+ pahospitalname: ""
},
// 琛ㄥ崟鍙傛暟
@@ -254,7 +298,21 @@
//鏄惁鏄剧ず纭鐧昏琛�
isShowConfirmationDialog: false,
//纭鐧昏琛╰itle
- confirmationTitle: ""
+ confirmationTitle: "",
+ // 宸叉敹/鏈敹閲戦鏄庣粏閽诲彇
+ detailOpen: false,
+ detailLoading: false,
+ detailTitle: "",
+ detailList: [],
+ detailTotal: 0,
+ detailQuery: {
+ pageNum: 1,
+ pageSize: 10,
+ pabegtime: "",
+ paendtime: "",
+ pahospitalname: "",
+ pachargestate: ""
+ }
};
},
//鐩戝惉灞炴�� 绫讳技浜巇ata姒傚康
@@ -266,61 +324,6 @@
watch: {},
//鏂规硶闆嗗悎
methods: {
- getTimeList(e) {
- if (this.selecttime != 0) {
- this.endtime = this.selecttime[1];
- this.starttime = this.selecttime[0];
- // if (this.endtime == this.starttime) {
- let num = Number(this.endtime.slice(5, 7));
- if (num < 9) {
- let mon = Number(this.endtime.slice(6, 7));
- this.endtime =
- this.endtime.slice(0, 5) +
- "0" +
- (mon + 1) +
- "-" +
- "01" +
- " " +
- "00" +
- ":" +
- "00" +
- ":" +
- "00";
- }
- // this.endtime=this.endtime.slice(0,5)骞�
- else if (num >= 10) {
- this.endtime =
- this.endtime.slice(0, 5) +
- (num + 1) +
- "-" +
- "01" +
- " " +
- "00" +
- ":" +
- "00" +
- ":" +
- "00";
- } else {
- this.endtime =
- this.endtime.slice(0, 5) +
- "10" +
- "-" +
- "01" +
- " " +
- "00" +
- ":" +
- "00" +
- ":" +
- "00";
- }
- this.starttime = this.starttime + " " + "00" + ":" + "00" + ":" + "00";
- // }
- } else {
- // this.starttime = "1998-01-01 00:00:00";
- // this.endtime = "2998-01-01 00:00:00";
- }
- },
-
resetArr(Arr) {
var hash = {};
Arr = Arr.reduce(function(arr, current) {
@@ -332,11 +335,93 @@
return Arr;
},
- /** 鏌ヨ鎹愮尞鍩虹鍒楄〃 */
+ /** 鏌ヨ鏀舵缁熻 */
getList() {
- listsfeistatistics(this.queryParams).then(res => {
- this.jxidata = res.rows;
+ 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;
+ });
+ },
+ /** 鐐瑰嚮宸叉敹/鏈敹閲戦锛屾煡璇㈣鍖婚櫌鏄庣粏 */
+ handleDetail(row, chargeState) {
+ this.detailQuery = {
+ pageNum: 1,
+ pageSize: 10,
+ pabegtime: this.queryParams.pabegtime,
+ paendtime: this.queryParams.paendtime,
+ pahospitalname: row.hospitalname,
+ pachargestate: chargeState
+ };
+ this.detailTitle =
+ (row.hospitalname || "") +
+ " - " +
+ (chargeState === "1" ? "宸叉敹閲戦鏄庣粏" : "鏈敹閲戦鏄庣粏");
+ this.detailOpen = true;
+ this.getDetailList();
+ },
+ /** 鏌ヨ鏄庣粏鍒楄〃 */
+ getDetailList() {
+ this.detailLoading = true;
+ getChargeStatisticsDetail(this.detailQuery)
+ .then(res => {
+ this.detailList = res.rows || [];
+ this.detailTotal = res.total || 0;
+ })
+ .finally(() => {
+ this.detailLoading = false;
+ });
+ },
+ /** 鏄庣粏鍚堣 */
+ getDetailSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+ const moneyProps = ["organcharge", "amount", "nonpayment"];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ return;
+ }
+ if (moneyProps.indexOf(column.property) === -1) {
+ sums[index] = "";
+ return;
+ }
+ const total = data.reduce((prev, item) => {
+ const value = Number(item[column.property]);
+ return prev + (isNaN(value) ? 0 : value);
+ }, 0);
+ sums[index] = total.toFixed(2);
});
+ return sums;
+ },
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ 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;
+ });
},
// 琛ㄥ崟閲嶇疆
@@ -350,46 +435,39 @@
},
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
- this.daterangeReporttime = [];
-
- this.reportervalue = "";
-
- this.form.treatmenthospitalno = "";
-
- this.queryParams = {
- doname: null,
- pageNum: 1,
- pageSize: 10,
- name: null,
- idcardno: null,
- residenceprovince: null,
- residencecity: null,
- residencetown: null,
- // "2"
- recordstate: null,
- treatmenthospitalname: null,
- donorno: null,
- acquisitiontissueno: null,
- reportername: null,
- reporttime: null,
- city: null
- };
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();
+ },
+ /** 鏃ユ湡鑼冨洿锛氭渚嬫椂闂达紝寮�濮� 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 = "";
+ 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 = ["applymonth", "deptmentName", "username"];
+ var columnnames = ["hospitalname"];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = "鍚堣";
@@ -422,7 +500,7 @@
//鐢熷懡鍛ㄦ湡 - 鍒涘缓瀹屾垚锛堝彲浠ヨ闂綋鍓峵his瀹炰緥锛�
created() {
//鑾峰彇鍒楄〃
- this.getList();
+ //this.getList();
}
// //鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛�
// mounted() {},
--
Gitblit v1.9.3