From 8f059b6cc8daf96433ac699543996c9e1260023c Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期五, 30 十月 2026 09:58:04 +0800
Subject: [PATCH] Merge branch 'master' of http://116.62.18.175:6699/r/~yxh/opo-web
---
src/views/project/fund/performancedetails/index.vue | 55 ++
src/views/project/statistics/casePanorama/index.vue | 374 ++++++++++++++
src/api/project/casePanorama.js | 27 +
src/api/project/statistics.js | 32 +
src/views/project/statistics/caseStatistics/index.vue | 166 ++++-
src/views/project/statistics/chargeStatistics/index.vue | 199 ++++---
src/views/project/components/fundsummary/index.vue | 121 ++-
src/views/project/statistics/applyStatistics/index.vue | 155 ++++-
src/views/project/statistics/performanceStaristics/index.vue | 140 +++-
src/views/project/externalperson/index.vue | 71 ++
src/views/project/fundstatistics/index.vue | 166 +----
11 files changed, 1,104 insertions(+), 402 deletions(-)
diff --git a/src/api/project/casePanorama.js b/src/api/project/casePanorama.js
new file mode 100644
index 0000000..2233f66
--- /dev/null
+++ b/src/api/project/casePanorama.js
@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+// 鏌ヨ妗堜緥鍏ㄦ櫙
+export function listCasePanorama(query) {
+ return request({
+ url: '/project/casePanorama/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 瀵煎嚭妗堜緥鍏ㄦ櫙
+export function exportCasePanorama(query) {
+ return request({
+ url: '/project/casePanorama/export',
+ method: 'get',
+ params: query
+ })
+}
+
+// 涓氬姟缁勪笅鎷夐�夐」
+export function getCasePanoramaDeptOptions() {
+ return request({
+ url: '/project/casePanorama/deptOptions',
+ method: 'get'
+ })
+}
diff --git a/src/api/project/statistics.js b/src/api/project/statistics.js
index 6e1fa32..3648e94 100644
--- a/src/api/project/statistics.js
+++ b/src/api/project/statistics.js
@@ -16,6 +16,14 @@
params: query
})
}
+// 瀵煎嚭妗堜緥缁熻锛堟寜涓氬姟缁勶級
+export function exportCaseDeptStatistics(query) {
+ return request({
+ url: '/project/spstatcase/exportDept',
+ method: 'get',
+ params: query
+ })
+}
// 鏌ヨ缁╂晥缁熻
export function listjixstatistics(query) {
return request({
@@ -28,6 +36,14 @@
export function exportPerformanceStatistics(query) {
return request({
url: '/project/funddetail/exportBonus',
+ method: 'get',
+ params: query
+ })
+ }
+ // 瀵煎嚭缁╂晥缁熻锛堟寜涓氬姟缁勶級
+export function exportPerformanceDeptStatistics(query) {
+ return request({
+ url: '/project/funddetail/exportBonusDept',
method: 'get',
params: query
})
@@ -48,6 +64,14 @@
params: query
})
}
+ // 瀵煎嚭璐圭敤缁熻锛堟寜涓氬姟缁勶級
+export function exportExpenseDeptStatistics(query) {
+ return request({
+ url: '/project/spstatexpense/exportDept',
+ method: 'get',
+ params: query
+ })
+ }
// 鏌ヨ鏀惰垂缁熻
export function listsfeistatistics(query) {
return request({
@@ -55,4 +79,12 @@
method: 'post',
data: query
})
+ }
+ // 瀵煎嚭鏀舵缁熻
+export function exportChargeStatistics(query) {
+ return request({
+ url: '/project/donorchargeorgan/exportChange',
+ method: 'get',
+ params: query
+ })
}
\ No newline at end of file
diff --git a/src/views/project/components/fundsummary/index.vue b/src/views/project/components/fundsummary/index.vue
index 4911f64..96585be 100644
--- a/src/views/project/components/fundsummary/index.vue
+++ b/src/views/project/components/fundsummary/index.vue
@@ -1,8 +1,18 @@
<!-- -->
<template>
<div class="app-container" :donorno="donorno">
+ <el-alert
+ v-if="noCostData"
+ title="璇ユ渚嬫殏鏃犳垚鏈暟鎹�"
+ type="info"
+ :closable="false"
+ show-icon
+ style="margin-bottom: 10px"
+ />
<el-table
+ v-loading="costLoading"
border
+ class="table-bordered"
:data="fundList"
:span-method="objectSpanMethod"
label-width="96px"
@@ -622,19 +632,22 @@
organMedicineSupportCostRowIndex: 0,
//鍣ㄥ畼鑾峰彇鎵嬫湳鎴愭湰鍚堝苟琛屾暟
organMedicineSupportCostRowSpan: 0,
- curdorno: null,
+ // 鎴愭湰鏄庣粏鍔犺浇涓�
+ costLoading: false,
+ // 褰撳墠妗堜緥鏄惁娌℃湁鎴愭湰鏁版嵁
+ noCostData: false,
};
},
//鐩戝惉灞炴�� 绫讳技浜巇ata姒傚康
computed: {},
//鐩戞帶data涓殑鏁版嵁鍙樺寲
watch: {
- //鐩戝惉donorno鍙戠敓鏀瑰彉鏃惰Е鍙�
- curdorno(newVal) {
- this.curdorno = newVal;
- //alert(this.donorno);
- //console.log("鐩戝惉鍒版崘鐚紪鍙峰彉鍖�" + this.curdorno);
- this.getCostData(this.curdorno);
+ // 鐩戝惉妗堜緥 ID 鍙樺寲锛岀珛鍗冲姞杞芥垚鏈槑缁�
+ donorno: {
+ immediate: true,
+ handler(val) {
+ this.getCostData(val);
+ },
},
},
//鏂规硶闆嗗悎
@@ -911,55 +924,65 @@
//璋冪敤鎺ュ彛鑾峰彇鎴愭湰鏁版嵁
getCostData(donorno) {
- getDonationCost(donorno).then((res) => {
- if (res.code == 200) {
- let resList = res.data;
- var arr = [];
- for (var i in resList) {
- arr.push(resList[i]);
+ if (donorno === null || donorno === undefined || donorno === "") {
+ this.costLoading = false;
+ this.noCostData = false;
+ return;
+ }
+ this.costLoading = true;
+ this.noCostData = false;
+ this.resetCostAmounts();
+ getDonationCost(donorno)
+ .then((res) => {
+ if (res.code == 200) {
+ const data = res.data || {};
+ const before = [];
+ for (let i = 1; i <= 52; i++) {
+ before.push(data["fy" + i]);
+ }
+ before.push(data.fyhj);
+ const after = [];
+ for (let i = 1; i <= 52; i++) {
+ after.push(data["sh" + i]);
+ }
+ after.push(data.shhj);
+
+ let hasData = false;
+ before.forEach((value, index) => {
+ const num = Number(value);
+ if (!Number.isNaN(num) && num !== 0) {
+ this.fundList[index].amount = num.toFixed(2);
+ hasData = true;
+ }
+ });
+ after.forEach((value, index) => {
+ const num = Number(value);
+ if (!Number.isNaN(num) && num !== 0) {
+ this.fundList[index].amounted = num.toFixed(2);
+ hasData = true;
+ }
+ });
+ this.noCostData = !hasData;
+ } else {
+ this.$modal.msgError(res.msg || "鑾峰彇鎴愭湰鏄庣粏澶辫触");
}
-
- let arr1 = arr.slice(0, 53);
- arr1.forEach((item, i) => {
- if (item !== 0) {
- this.fundList[i].amount = item.toFixed(2);
- }
- });
-
- arr1 = arr.slice(53, 106);
- arr1.forEach((item, i) => {
- if (item !== 0) {
- this.fundList[i].amounted = item.toFixed(2);
- }
- });
-
- // this.fundList = resList
- // for (let i = 0; i < resList.length; i++) {
- // let itemIndex = this.fundList.findIndex(
- // (item) => resList[i].itemname == item.itemname
- // );
- // console.log(itemIndex);
- // if (itemIndex > -1) {
- // if(resList[i].amount != "0.00"){
- // this.fundList[itemIndex].amount =
- // resList[i].amount;
- // }else{
- // this.fundList[itemIndex].amount =
- // ""
- // }
- // }
- // }
- }
+ this.costLoading = false;
+ })
+ .catch(() => {
+ this.costLoading = false;
+ this.$modal.msgError("鑾峰彇鎴愭湰鏄庣粏澶辫触");
+ });
+ },
+ resetCostAmounts() {
+ this.fundList.forEach((item) => {
+ item.amount = "";
+ item.amounted = "";
});
},
},
//鐢熷懡鍛ㄦ湡 - 鍒涘缓瀹屾垚锛堝彲浠ヨ闂綋鍓峵his瀹炰緥锛�
created() {
this.calculateRowSpanConfig();
- },
- //鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛�
- mounted() {
- this.curdorno = this.donorno;
},
beforeCreate() {}, //鐢熷懡鍛ㄦ湡 - 鍒涘缓涔嬪墠
beforeMount() {}, //鐢熷懡鍛ㄦ湡 - 鎸傝浇涔嬪墠
diff --git a/src/views/project/externalperson/index.vue b/src/views/project/externalperson/index.vue
index cbc851f..043b51e 100644
--- a/src/views/project/externalperson/index.vue
+++ b/src/views/project/externalperson/index.vue
@@ -56,6 +56,7 @@
</el-table-column>
<el-table-column label="璐﹀彿缂栧彿" align="center" prop="userno" />
<el-table-column label="璐﹀彿鍚嶇О" align="center" prop="username" />
+ <el-table-column label="缁╂晥绉戝" align="center" prop="deptName" width="140" />
<el-table-column label="韬唤璇佸彿" width="200" align="center" prop="idcardno" />
<el-table-column label="鑱岀О" align="center" prop="title">
<template slot-scope="scope">
@@ -117,6 +118,27 @@
dict.label
}}</el-radio>
</el-radio-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row v-if="hasUserType(form.usertype, 'performance')">
+ <el-col :span="12">
+ <el-form-item label="缁╂晥绉戝" prop="deptId">
+ <el-select
+ v-model="form.deptId"
+ placeholder="璇烽�夋嫨缁╂晥绉戝"
+ clearable
+ filterable
+ style="width: 100%"
+ @change="handleDeptChange"
+ >
+ <el-option
+ v-for="dept in deptList"
+ :key="dept.deptId"
+ :label="dept.deptName"
+ :value="dept.deptId"
+ />
+ </el-select>
</el-form-item>
</el-col>
</el-row>
@@ -217,6 +239,7 @@
} from "@/api/project/organization";
import { getUserProfile } from "@/api/system/user";
+import { listDept } from "@/api/system/dept";
export default {
name: "Externalperson",
@@ -242,6 +265,8 @@
//鍖荤枟鏈烘瀯鍒楄〃
unitList: [],
+ // 缁╂晥绉戝鍒楄〃
+ deptList: [],
// 寮瑰嚭灞傛爣棰�
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
@@ -293,6 +318,20 @@
],
depositbank: [
{ required: true, message: "璇疯緭鍏ュ紑鎴烽摱琛�", trigger: "blur" }
+ ],
+ deptId: [
+ {
+ validator: (rule, value, callback) => {
+ if (
+ this.hasUserType(this.form.usertype, "performance") &&
+ (value === null || value === undefined || value === "")
+ ) {
+ return callback(new Error("璇烽�夋嫨缁╂晥绉戝"));
+ }
+ return callback();
+ },
+ trigger: "change"
+ }
]
},
};
@@ -306,6 +345,7 @@
created() {
this.getUserProfile();
this.getUnitList();
+ this.getDeptList();
// 榛樿涓嶆墦寮�
// this.getList();
},
@@ -381,7 +421,9 @@
updateBy: null,
updateTime: null,
pym: null,
- wbm: null
+ wbm: null,
+ deptId: null,
+ deptName: null
};
this.resetForm("form");
},
@@ -427,6 +469,9 @@
this.form = response.data;
//璐﹀彿绫诲埆涓哄鍊硷紙閫楀彿鍒嗛殧锛夛紝琛ㄥ崟鐢ㄦ暟缁勫洖鏄�
this.form.usertype = this.splitUserType(response.data.usertype);
+ if (this.form.deptId !== null && this.form.deptId !== undefined && this.form.deptId !== "") {
+ this.form.deptId = Number(this.form.deptId);
+ }
this.open = true;
this.title = "浜哄憳/鍗曚綅璐﹀彿淇℃伅淇敼";
});
@@ -440,6 +485,13 @@
if (res.organizationid == this.form.unitno)
this.form.unitname = res.organizationname;
});
+ //缁╂晥绉戝锛氭彁浜ゅ墠鎸� deptId 鍥炲~ deptName
+ if (this.form.deptId !== null && this.form.deptId !== undefined && this.form.deptId !== "") {
+ const dept = this.deptList.find(
+ item => String(item.deptId) === String(this.form.deptId)
+ );
+ this.form.deptName = dept ? dept.deptName : this.form.deptName;
+ }
//璐﹀彿绫诲埆涓哄鍊硷細鎻愪氦鍓嶈浆鍥為�楀彿鍒嗛殧鐨勫瓧绗︿覆
this.form.usertype = this.joinUserType(this.form.usertype);
console.log(this.form);
@@ -525,6 +577,23 @@
console.log(this.unitList);
}
});
+ },
+ /** 缁╂晥绉戝鍒楄〃 */
+ getDeptList() {
+ listDept({}).then(response => {
+ this.deptList = response.data || [];
+ });
+ },
+ /** 缁╂晥绉戝閫夋嫨鍙樺寲锛氬悓姝ュ悕绉� */
+ handleDeptChange(deptId) {
+ if (deptId === null || deptId === undefined || deptId === "") {
+ this.form.deptName = null;
+ return;
+ }
+ const dept = this.deptList.find(
+ item => String(item.deptId) === String(deptId)
+ );
+ this.form.deptName = dept ? dept.deptName : null;
}
}
};
diff --git a/src/views/project/fund/performancedetails/index.vue b/src/views/project/fund/performancedetails/index.vue
index fcc2577..bbddd00 100644
--- a/src/views/project/fund/performancedetails/index.vue
+++ b/src/views/project/fund/performancedetails/index.vue
@@ -296,6 +296,31 @@
</template>
</el-table-column>
<el-table-column
+ prop="deptName"
+ align="center"
+ label="缁╂晥绉戝"
+ width="160"
+ >
+ <template slot-scope="scope">
+ <el-select
+ v-model="scope.row.deptId"
+ size="mini"
+ clearable
+ filterable
+ placeholder="璇烽�夋嫨缁╂晥绉戝"
+ style="width: 100%"
+ @change="value => handleRowDeptChange(scope.row, value)"
+ >
+ <el-option
+ v-for="dept in deptList"
+ :key="dept.deptId"
+ :label="dept.deptName"
+ :value="dept.deptId"
+ />
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column
prop="isunit"
align="center"
label="浜哄憳绫诲埆"
@@ -871,7 +896,8 @@
:label="city"
:key="city.id"
>{{ city.username }}{{ city.isUnitPerson ? "锛堝崟浣嶏級" : ""
- }}{{ city.unitname ? " 路 " + city.unitname : "" }}</el-checkbox
+ }}{{ city.unitname ? " 路 " + city.unitname : ""
+ }}{{ city.deptName ? " 路 绉戝锛�" + city.deptName : "" }}</el-checkbox
>
</el-checkbox-group>
</div>
@@ -928,6 +954,7 @@
import { listItemexpense } from "@/api/project/itemexpense";
import { getUserProfile } from "@/api/system/user";
+import { listDept } from "@/api/system/dept";
import Li_area_select from "@/components/Address";
import OrgSelecter from "@/views/project/components/orgselect";
import { getToken } from "@/utils/auth";
@@ -983,6 +1010,8 @@
expertlist: [],
//鍖荤枟鏈烘瀯鍒楄〃
unitList: [],
+ //缁╂晥绉戝鍒楄〃
+ deptList: [],
//璐圭敤鎶ラ攢鏈烘瀯鍒楄〃
feeUnitList: [],
batchdialogVisible: false,
@@ -2015,6 +2044,25 @@
});
},
+ /** 缁╂晥绉戝鍒楄〃 */
+ getDeptList() {
+ listDept({}).then(res => {
+ this.deptList = res.data || [];
+ });
+ },
+
+ /** 琛ㄦ牸鍐呯洿鎺ヤ慨鏀圭哗鏁堢瀹わ細鍚屾鍚嶇О */
+ handleRowDeptChange(row, deptId) {
+ if (deptId === null || deptId === undefined || deptId === "") {
+ this.$set(row, "deptName", null);
+ return;
+ }
+ const dept = this.deptList.find(
+ item => String(item.deptId) === String(deptId)
+ );
+ this.$set(row, "deptName", dept ? dept.deptName : null);
+ },
+
//鑾峰彇鍖荤枟鏈烘瀯鍒楄〃
getUnitList() {
listOrganization(3).then(response => {
@@ -2522,6 +2570,8 @@
isunit: isunit ? 1 : 0,
unitname: item.unitname,
unitno: item.unitno,
+ deptId: item.deptId,
+ deptName: item.deptName,
uintuserno: null,
title: item.title,
idcardtype: null,
@@ -2747,6 +2797,8 @@
singleDetail.title = person.title;
singleDetail.unitname = person.unitname;
singleDetail.unitno = person.unitno;
+ singleDetail.deptId = person.deptId;
+ singleDetail.deptName = person.deptName;
} else {
// 鎵嬪伐杈撳叆鐨勪汉鍛橈細鍙啓濮撳悕锛岃韩浠借瘉鍙�/閾惰璐﹀彿鐢辩粡鍔炰汉濉啓
singleDetail.beneficiaryname = String(key);
@@ -3175,6 +3227,7 @@
this.getExternalList();
this.getFeeUnitList();
this.listperformance();
+ this.getDeptList();
},
//鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛�
diff --git a/src/views/project/fundstatistics/index.vue b/src/views/project/fundstatistics/index.vue
index 585ce95..ff5dbbd 100644
--- a/src/views/project/fundstatistics/index.vue
+++ b/src/views/project/fundstatistics/index.vue
@@ -3,162 +3,77 @@
<div class="app-container">
<el-col :span="24" v-if="showType == 'list'">
<el-card shadow="never">
- <el-form
- class="opo-query-form" :model="queryParams" ref="queryForm" :inline="true">
+ <el-form class="opo-query-form" :model="queryParams" ref="queryForm" :inline="true">
<el-form-item label="濮撳悕" prop="name">
- <el-input
- v-model="queryParams.name"
- placeholder="璇疯緭鍏ュ鍚�"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
+ <el-input v-model="queryParams.name" placeholder="璇疯緭鍏ュ鍚�" clearable size="small"
+ @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="鎹愮尞杩涘害" prop="recordstate">
- <el-select
- v-model="queryParams.recordstate"
- placeholder="璇烽�夋嫨褰撳墠杩涘害"
- clearable
- size="small"
- >
- <el-option
- v-for="dict in dict.type.sys_DonationStatus"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- />
+ <el-select v-model="queryParams.recordstate" placeholder="璇烽�夋嫨褰撳墠杩涘害" clearable size="small">
+ <el-option v-for="dict in dict.type.sys_DonationStatus" :key="dict.value" :label="dict.label"
+ :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
- <el-button
- type="primary"
- icon="el-icon-search"
- size="mini"
- @click="handleQuery"
- >鎼滅储</el-button
- >
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
- >閲嶇疆</el-button
- >
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
<!-- 鎹愮尞妗堜緥鍒楄〃 -->
- <el-table
- v-loading="loading"
- style="width: 1240px"
- fit
- highlight-current-row
- header-align
- border
- :data="donationCaseTableData"
- >
- <el-table-column
- label="妗堜緥鏃堕棿"
- align="center"
- prop="reporttime"
- width="150"
- >
+ <el-table v-loading="loading" fit highlight-current-row header-align border
+ :data="donationCaseTableData">
+ <el-table-column label="妗堜緥鏃堕棿" align="center" prop="reporttime" width="150">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.reporttime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
- <el-table-column
- label="濮撳悕"
- width="120"
- align="center"
- prop="name"
- />
+ <el-table-column label="濮撳悕" width="120" align="center" prop="name" />
+ <el-table-column label="鎬у埆" width="120" align="center" prop="sex">
<el-table-column label="骞撮緞" align="center" prop="age" width="100">
<template slot-scope="scope">
{{
- `${
- scope.row.age && scope.row.age !== 0
+ `${scope.row.age && scope.row.age !== 0
? `${scope.row.age}${scope.row.ageunit}`
: ""
- } ${
- scope.row.age2 && scope.row.age2 !== 0
+ } ${scope.row.age2 && scope.row.age2 !== 0
? `${scope.row.age2}${scope.row.ageunit2}`
: ""
- }`.trim()
+ }`.trim()
}}
</template>
</el-table-column>
- <el-table-column label="鎬у埆" width="120" align="center" prop="sex">
<template slot-scope="scope">
- <dict-tag
- :options="dict.type.sys_user_sex"
- :value="scope.row.sex"
- />
+ <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
</template>
</el-table-column>
- <el-table-column
- label="涓撹亴浜哄憳"
- align="center"
- prop="reportername"
- width="100"
- />
- <el-table-column
- label="涓氬姟缁�"
- align="center"
- prop="treatmenthospitalname"
- />
<el-table-column label="鎹愮尞杩涘害" align="center" prop="recordstate">
<template slot-scope="scope">
- <dict-tag
- :options="dict.type.sys_donornode"
- :value="scope.row.workflow"
- />
+ <dict-tag :options="dict.type.sys_donornode" :value="scope.row.workflow" />
</template>
- </el-table-column>
-
- <el-table-column
- label="鎿嶄綔"
- align="center"
- class-name="small-padding fixed-width"
- width="200"
- fixed="right"
- >
+ </el-table-column> <el-table-column label="鎹愮尞鍖婚櫌"align="center" prop="
+treatmenthospitalname
+" />
+ <el-table-column label="涓撹亴浜哄憳" align="center" prop="reportername"/>
+ <el-table-column label="涓氬姟缁�" align="center" prop="deptname" />
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" width="200" fixed="right">
<template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-download"
- @click="exportSummary(scope.row.id)"
- v-hasPermi="['project:fundstatistics:summaryexoprt']"
- >瀵煎嚭</el-button
- >
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="jumptocost(scope.row)"
- v-hasPermi="['project:fundstatistics:list']"
- >鏌ョ湅鎴愭湰姹囨��</el-button
- >
+ <el-button size="mini" type="text" icon="el-icon-download" @click="exportSummary(scope.row.id)"
+ v-hasPermi="['project:fundstatistics:summaryexoprt']">瀵煎嚭</el-button>
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="jumptocost(scope.row)"
+ v-hasPermi="['project:fundstatistics:list']">鏌ョ湅鏄庣粏</el-button>
</template>
</el-table-column>
</el-table>
<!-- hide-on-single-page -->
- <pagination
- v-show="total > 0"
- style="margin-left: 100px"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getBaseInfoList"
- />
+ <pagination v-show="total > 0" style="margin-left: 100px" :total="total" :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize" @pagination="getBaseInfoList" />
</el-card>
</el-col>
<el-col :span="24" v-if="showType == 'costinfo'">
<el-form :model="curCaseInfo" ref="infoForm" :inline="true">
<el-row>
<el-col :span="3">
- <el-button
- type="primary"
- icon="el-icon-back"
- @click="backDonateList"
- >鎹愮尞鍒楄〃</el-button
- >
+ <el-button type="primary" icon="el-icon-back" @click="backDonateList">鎹愮尞鍒楄〃</el-button>
</el-col>
<el-form-item label="鎹愮尞缂栧彿" prop="donorno">
<el-input v-model="curCaseInfo.donorno" disabled />
@@ -247,11 +162,10 @@
});
},
jumptocost(row) {
- this.showType = "costinfo";
this.curdonorno = row.id;
this.curCaseInfo.donorno = row.donorno;
this.curCaseInfo.name = row.name;
- //console.log("dononro:" + this.curdonorno);
+ this.showType = "costinfo";
},
backDonateList() {
@@ -308,14 +222,14 @@
this.getBaseInfoList();
},
//鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛�
- mounted() {},
- beforeCreate() {}, //鐢熷懡鍛ㄦ湡 - 鍒涘缓涔嬪墠
- beforeMount() {}, //鐢熷懡鍛ㄦ湡 - 鎸傝浇涔嬪墠
- beforeUpdate() {}, //鐢熷懡鍛ㄦ湡 - 鏇存柊涔嬪墠
- updated() {}, //鐢熷懡鍛ㄦ湡 - 鏇存柊涔嬪悗
- beforeDestroy() {}, //鐢熷懡鍛ㄦ湡 - 閿�姣佷箣鍓�
- destroyed() {}, //鐢熷懡鍛ㄦ湡 - 閿�姣佸畬鎴�
- activated() {} //濡傛灉椤甸潰鏈塳eep-alive缂撳瓨鍔熻兘锛岃繖涓嚱鏁颁細瑙﹀彂
+ mounted() { },
+ beforeCreate() { }, //鐢熷懡鍛ㄦ湡 - 鍒涘缓涔嬪墠
+ beforeMount() { }, //鐢熷懡鍛ㄦ湡 - 鎸傝浇涔嬪墠
+ beforeUpdate() { }, //鐢熷懡鍛ㄦ湡 - 鏇存柊涔嬪墠
+ updated() { }, //鐢熷懡鍛ㄦ湡 - 鏇存柊涔嬪悗
+ beforeDestroy() { }, //鐢熷懡鍛ㄦ湡 - 閿�姣佷箣鍓�
+ destroyed() { }, //鐢熷懡鍛ㄦ湡 - 閿�姣佸畬鎴�
+ activated() { } //濡傛灉椤甸潰鏈塳eep-alive缂撳瓨鍔熻兘锛岃繖涓嚱鏁颁細瑙﹀彂
};
</script>
<style scoped>
diff --git a/src/views/project/statistics/applyStatistics/index.vue b/src/views/project/statistics/applyStatistics/index.vue
index b5e3653..a534727 100644
--- a/src/views/project/statistics/applyStatistics/index.vue
+++ b/src/views/project/statistics/applyStatistics/index.vue
@@ -24,21 +24,6 @@
>
</el-date-picker>
</el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="璐圭敤绫诲瀷">
- <el-select
- v-model="queryParams.paexpensetype"
- 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 align="left" label="鎶ラ攢閮ㄩ棬" prop="padeptno">
@@ -111,39 +96,48 @@
></right-toolbar>
</el-row>
- <!--<el-table v-loading="loading" border :data="donatebaseinfoList"> -->
- <el-table
- :data="jxidata"
- ref="table"
- border
- max-height="700"
- highlight-current-row
- :summary-method="getSummaries"
- show-summary
- >
- <el-table-column label="搴忓彿" align="center" prop="id" width="50" />
- <el-table-column label="缁熻鏈堜唤" align="center" prop="applymonth" />
- <el-table-column label="涓氬姟缁�" align="center" prop="deptmentName" />
- <el-table-column label="涓撹亴浜哄憳" align="center" prop="username" />
- <el-table-column label="鎶ラ攢鎬婚噾棰�" align="center" prop="amount" width="180" :formatter="amountFormatter" />
- <el-table-column label="涓撳璐�" align="center" prop="expertfee" width="160" :formatter="amountFormatter" />
- <el-table-column label="浼︾悊涓撳璐�" align="center" prop="ethicalistfee" width="160" :formatter="amountFormatter" />
- <el-table-column label="鍖诲鎴愭湰" align="center" prop="medicalcost" width="160" :formatter="amountFormatter" />
- <el-table-column label="鍔炲叕璐�" align="center" prop="officecost" width="160" :formatter="amountFormatter" />
- <el-table-column label="宸梾璐�" align="center" prop="reimcost" width="160" :formatter="amountFormatter" />
+ <el-tabs v-model="activeTab">
+ <el-tab-pane label="鎸変笟鍔$粍" name="dept">
+ <el-table :data="deptData" ref="deptTable" border max-height="700" highlight-current-row
+ :summary-method="getDeptSummaries" show-summary>
+ <el-table-column label="搴忓彿" align="center" prop="id" width="50" />
+ <el-table-column label="涓氬姟缁�" align="center" prop="deptname" />
+ <el-table-column label="鎶ラ攢鎬婚噾棰�" align="center" prop="amount" width="180" :formatter="amountFormatter" />
+ <el-table-column label="涓撳璐�" align="center" prop="expertfee" width="160" :formatter="amountFormatter" />
+ <el-table-column label="浼︾悊涓撳璐�" align="center" prop="ethicalistfee" width="160" :formatter="amountFormatter" />
+ <el-table-column label="鍖诲鎴愭湰" align="center" prop="medicalcost" width="160" :formatter="amountFormatter" />
+ <el-table-column label="鍔炲叕璐�" align="center" prop="officecost" width="160" :formatter="amountFormatter" />
+ <el-table-column label="宸梾璐�" align="center" prop="reimcost" width="160" :formatter="amountFormatter" />
+ </el-table>
+ </el-tab-pane>
- <!-- <el-table-column label="鎿嶄綔" align="center">
- <template slot-scope="scope">
- <el-button size="mini" type="text" icon="el-icon-edit"
- >鏄庣粏</el-button
- >
- </template>
- </el-table-column> -->
- </el-table>
+ <el-tab-pane label="鎸変汉鍛�" name="person">
+ <el-table :data="jxidata" ref="personTable" border max-height="700" highlight-current-row
+ :summary-method="getSummaries" show-summary>
+ <el-table-column label="搴忓彿" align="center" prop="id" width="50" />
+ <el-table-column label="涓氬姟缁�" align="center" prop="deptmentName" />
+ <el-table-column label="涓撹亴浜哄憳" align="center" prop="username" />
+ <el-table-column label="鎶ラ攢鎬婚噾棰�" align="center" prop="amount" width="180" :formatter="amountFormatter" />
+ <el-table-column label="涓撳璐�" align="center" prop="expertfee" width="160" :formatter="amountFormatter" />
+ <el-table-column label="浼︾悊涓撳璐�" align="center" prop="ethicalistfee" width="160" :formatter="amountFormatter" />
+ <el-table-column label="鍖诲鎴愭湰" align="center" prop="medicalcost" width="160" :formatter="amountFormatter" />
+ <el-table-column label="鍔炲叕璐�" align="center" prop="officecost" width="160" :formatter="amountFormatter" />
+ <el-table-column label="宸梾璐�" align="center" prop="reimcost" width="160" :formatter="amountFormatter" />
+
+ <!-- <el-table-column label="鎿嶄綔" align="center">
+ <template slot-scope="scope">
+ <el-button size="mini" type="text" icon="el-icon-edit"
+ >鏄庣粏</el-button
+ >
+ </template>
+ </el-table-column> -->
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
<div style="margin: 10px;text-align: right;">
<div>
- 鍏� <span style="color:#1890FF ;">{{ total }}</span> 鏉℃暟鎹�
+ 鍏� <span style="color:#1890FF ;">{{ tableTotal }}</span> 鏉℃暟鎹�
</div>
</div>
@@ -160,7 +154,8 @@
listbxiaostatistics,
listjixstatistics,
listanlstatistics,
- exportExpenseStatistics
+ exportExpenseStatistics,
+ exportExpenseDeptStatistics
} from "@/api/project/statistics";
import { listUser } from "@/api/project/organization";
@@ -252,6 +247,10 @@
donatebaseinfoList: [],
// 鎹愮尞鍩虹琛ㄦ牸鏁版嵁
jxidata: [],
+ // 褰撳墠椤电锛歞ept=鎸変笟鍔$粍锛宲erson=鎸変汉鍛�
+ activeTab: "dept",
+ // 鎸変笟鍔$粍鑱氬悎鏁版嵁
+ deptData: [],
// 寮瑰嚭灞傛爣棰�
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
@@ -282,7 +281,11 @@
};
},
//鐩戝惉灞炴�� 绫讳技浜巇ata姒傚康
- computed: {},
+ computed: {
+ tableTotal() {
+ return this.activeTab === "dept" ? this.deptData.length : this.jxidata.length;
+ }
+ },
activated() {},
mounted() {},
@@ -341,6 +344,36 @@
this.jxidata.forEach(($obj, $index) => {
$obj.id = $index + 1;
});
+ this.buildDeptData();
+ });
+ },
+ /** 鎸変笟鍔$粍鑱氬悎锛�6 涓噾棰濆垎鍒眰鍜� */
+ buildDeptData() {
+ const map = new Map();
+ this.jxidata.forEach(row => {
+ const key = row.deptmentno || row.deptmentName || "鏈垎缁�";
+ if (!map.has(key)) {
+ map.set(key, {
+ deptname: row.deptmentName || "鏈垎缁�",
+ amount: 0,
+ expertfee: 0,
+ ethicalistfee: 0,
+ medicalcost: 0,
+ officecost: 0,
+ reimcost: 0
+ });
+ }
+ const item = map.get(key);
+ item.amount += Number(row.amount) || 0;
+ item.expertfee += Number(row.expertfee) || 0;
+ item.ethicalistfee += Number(row.ethicalistfee) || 0;
+ item.medicalcost += Number(row.medicalcost) || 0;
+ item.officecost += Number(row.officecost) || 0;
+ item.reimcost += Number(row.reimcost) || 0;
+ });
+ this.deptData = Array.from(map.values()).map((item, index) => {
+ item.id = index + 1;
+ return item;
});
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
@@ -352,11 +385,15 @@
pauserno: this.queryParams.pauserno,
paexpensetype: this.queryParams.paexpensetype
};
+ const exportApi =
+ this.activeTab === "dept"
+ ? exportExpenseDeptStatistics
+ : exportExpenseStatistics;
this.$modal
- .confirm("鏄惁纭瀵煎嚭褰撳墠绛涢�夋潯浠朵笅鐨勮垂鐢ㄧ粺璁℃暟鎹紵")
+ .confirm("鏄惁纭瀵煎嚭褰撳墠鍒楄〃鐨勮垂鐢ㄧ粺璁℃暟鎹紵")
.then(() => {
this.exportLoading = true;
- return exportExpenseStatistics(queryParams);
+ return exportApi(queryParams);
})
.then(response => {
this.$download.name(response.msg);
@@ -412,7 +449,7 @@
getSummaries(param) {
const { columns, data } = param;
const sums = [];
- var columnnames = ["applymonth", "deptmentName", "username"];
+ var columnnames = ["deptmentName", "username"];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = "鍚堣";
@@ -440,6 +477,26 @@
}
});
return sums;
+ },
+ /** 鎸変笟鍔$粍琛ㄦ牸鍚堣 */
+ getDeptSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ return;
+ }
+ if (column.property === "deptname") {
+ return;
+ }
+ const total = data.reduce(
+ (prev, item) => prev + (Number(item[column.property]) || 0),
+ 0
+ );
+ sums[index] = total === 0 ? "" : Number(total).toFixed(2);
+ });
+ return sums;
}
},
diff --git a/src/views/project/statistics/casePanorama/index.vue b/src/views/project/statistics/casePanorama/index.vue
new file mode 100644
index 0000000..6f0e584
--- /dev/null
+++ b/src/views/project/statistics/casePanorama/index.vue
@@ -0,0 +1,374 @@
+<!-- 妗堜緥鍏ㄦ櫙 -->
+<template>
+ <div class="app-container">
+ <el-form
+ class="opo-query-form"
+ :model="queryParams"
+ ref="queryForm"
+ :inline="true"
+ v-show="showSearch"
+ label-width="65px"
+ >
+ <el-row :gutter="0">
+ <el-col :span="5">
+ <el-form-item label="鎹愮尞鑰�" prop="donorName">
+ <el-input
+ v-model="queryParams.donorName"
+ placeholder="璇疯緭鍏ユ崘鐚�呭鍚�"
+ clearable
+ size="small"
+ style="width: 140px"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="7">
+ <el-form-item label="鎹愮尞鏃ユ湡">
+ <el-date-picker
+ v-model="dateRange"
+ type="daterange"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ value-format="yyyy-MM-dd"
+ style="width: 250px"
+ @change="handleDateChange"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="4">
+ <el-form-item label="涓氬姟缁�" prop="deptName">
+ <el-select
+ v-model="queryParams.deptName"
+ placeholder="璇烽�夋嫨涓氬姟缁�"
+ clearable
+ filterable
+ style="width: 140px"
+ >
+ <el-option
+ v-for="item in deptOptions"
+ :key="item"
+ :label="item"
+ :value="item"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="4">
+ <el-form-item label="浜哄憳" prop="reporterName">
+ <el-input
+ v-model="queryParams.reporterName"
+ placeholder="璇疯緭鍏ヤ笟鍔″鍚�"
+ clearable
+ size="small"
+ style="width: 140px"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="4">
+ <el-form-item>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="mini"
+ @click="handleQuery"
+ >鎼滅储</el-button
+ >
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+ >閲嶇疆</el-button
+ >
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+
+ <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="caseList"
+ border
+ class="table-bordered"
+ max-height="700"
+ highlight-current-row
+ :summary-method="getSummaries"
+ show-summary
+ style="width: 100%"
+ >
+ <el-table-column type="index" label="搴忓彿" width="55" align="center" fixed="left" />
+ <el-table-column label="鎹愮尞鑰呭鍚�" prop="donorName" width="110" align="center" fixed="left" show-overflow-tooltip />
+ <el-table-column label="鎹愮尞鏃ユ湡" prop="donateTime" width="110" align="center" fixed="left" />
+ <el-table-column label="涓婃姤鏃ユ湡" prop="reportTime" width="110" align="center" fixed="left" />
+ <el-table-column label="涓氬姟缁�" prop="deptName" width="130" align="center" show-overflow-tooltip />
+ <el-table-column label="涓氬姟浜哄憳" prop="reporterName" width="110" align="center" show-overflow-tooltip />
+ <el-table-column label="妗堜緥缁堟" prop="terminationFlag" width="90" align="center" />
+ <el-table-column label="褰撳墠鐘舵��" prop="workflow" width="120" align="center">
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.sys_donornode" :value="scope.row.workflow" />
+ </template>
+ </el-table-column>
+ <el-table-column label="鎹愮尞鍖婚櫌" prop="donationHospital" width="200" align="center" show-overflow-tooltip />
+
+ <el-table-column label="鎹愮尞鍣ㄥ畼" prop="organName" width="120" align="left">
+ <template slot-scope="scope">
+ <div class="organ-cell" v-html="formatOrganName(scope.row.organName)"></div>
+ </template>
+ </el-table-column>
+ <el-table-column label="鑾峰彇鍣ㄥ畼" prop="organProcurement" width="120" align="center">
+ <template slot-scope="scope">
+ <div class="organ-cell" v-html="highlightOrgan(scope.row.organProcurement)"></div>
+ </template>
+ </el-table-column>
+ <el-table-column label="绉绘鍣ㄥ畼" prop="organTransplantation" width="120" align="center">
+ <template slot-scope="scope">
+ <div class="organ-cell" v-html="highlightOrgan(scope.row.organTransplantation)"></div>
+ </template>
+ </el-table-column>
+
+ <el-table-column label="鎴愭湰鍚堣" prop="totalCost" width="130" align="right" :formatter="amountFormatter" />
+ <el-table-column label="瀹跺睘璐圭敤" prop="donorFamilyCost" width="120" align="right" :formatter="amountFormatter" />
+ <el-table-column label="鍖诲鎴愭湰灏忚" prop="medCost" width="130" align="right" :formatter="amountFormatter" />
+ <el-table-column label="涓撳鎴愭湰灏忚" prop="expertCost" width="130" align="right" :formatter="amountFormatter" />
+ <el-table-column label="鍏朵粬鎴愭湰灏忚" prop="itemCode34" width="130" align="right" :formatter="amountFormatter" />
+ <el-table-column label="鎵嬫湳瀹や娇鐢ㄨ垂" prop="itemCode42" width="120" align="right" :formatter="amountFormatter" />
+ <el-table-column label="鍣ㄥ畼淇濆瓨鐏屾敞" prop="itemCode46" width="120" align="right" :formatter="amountFormatter" />
+ <el-table-column label="鍣ㄥ畼淇濆瓨璁惧" prop="itemCode50" width="120" align="right" :formatter="amountFormatter" />
+ <el-table-column label="鑲濊剰涓夌淮閲嶅缓" prop="itemCode44" width="120" align="right" :formatter="amountFormatter" />
+ <el-table-column label="鐥呯悊绌垮埡娲绘" prop="itemCode47" width="120" align="right" :formatter="amountFormatter" />
+ <el-table-column label="HLA閰嶅瀷" prop="itemCode48" width="110" align="right" :formatter="amountFormatter" />
+ <el-table-column label="鐣欏瓨鏍囨湰鎴愭湰" prop="itemCode21" width="120" align="right" :formatter="amountFormatter" />
+ <el-table-column label="鏍囨湰杩愯緭璐�" prop="itemCode12" width="110" align="right" :formatter="amountFormatter" />
+ <el-table-column label="杞繍杞﹁垂" prop="itemCode17" width="110" align="right" :formatter="amountFormatter" />
+ <el-table-column label="閬椾綋杩愯緭" prop="itemCode23" width="110" align="right" :formatter="amountFormatter" />
+ <el-table-column label="灏告" prop="itemCode25" width="90" align="right" :formatter="amountFormatter" />
+ </el-table>
+
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize"
+ @pagination="getList"
+ />
+ </div>
+</template>
+
+<script>
+import {
+ listCasePanorama,
+ exportCasePanorama,
+ getCasePanoramaDeptOptions
+} from "@/api/project/casePanorama";
+
+export default {
+ name: "CasePanorama",
+ dicts: ["sys_donornode"],
+ data() {
+ return {
+ // 閬僵灞�
+ loading: false,
+ // 瀵煎嚭閬僵灞�
+ exportLoading: false,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 鎬绘潯鏁�
+ total: 0,
+ // 妗堜緥鍏ㄦ櫙鏁版嵁
+ caseList: [],
+ // 涓氬姟缁勯�夐」
+ deptOptions: [],
+ // 妗堜緥鏃堕棿鑼冨洿
+ dateRange: [],
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ pageNum: 1,
+ pageSize: 20,
+ donorName: null,
+ donateTimeBegin: null,
+ donateTimeEnd: null,
+ deptName: null,
+ reporterName: null
+ }
+ };
+ },
+ created() {
+ this.getDeptOptions();
+ this.getList();
+ },
+ methods: {
+ /** 鏌ヨ妗堜緥鍏ㄦ櫙 */
+ getList() {
+ this.loading = true;
+ listCasePanorama(this.queryParams)
+ .then(res => {
+ this.caseList = res.rows;
+ this.total = res.total;
+ this.loading = false;
+ })
+ .catch(() => {
+ this.loading = false;
+ });
+ },
+ /** 涓氬姟缁勯�夐」 */
+ getDeptOptions() {
+ getCasePanoramaDeptOptions().then(res => {
+ this.deptOptions = res.data || [];
+ });
+ },
+ /** 妗堜緥鏃堕棿鑼冨洿鍙樺寲 */
+ handleDateChange(val) {
+ if (val && val.length === 2) {
+ this.queryParams.donateTimeBegin = val[0];
+ this.queryParams.donateTimeEnd = val[1];
+ } else {
+ this.queryParams.donateTimeBegin = null;
+ this.queryParams.donateTimeEnd = null;
+ }
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.dateRange = [];
+ this.queryParams = {
+ pageNum: 1,
+ pageSize: 20,
+ donorName: null,
+ donateTimeBegin: null,
+ donateTimeEnd: null,
+ deptName: null,
+ reporterName: null
+ };
+ this.resetForm("queryForm");
+ this.getList();
+ },
+ /** 鎹愮尞鍣ㄥ畼锛氭寜鍣ㄥ畼閫愪釜鎹㈣鏄剧ず */
+ formatOrganName(text) {
+ if (!text) {
+ return "";
+ }
+ const escaped = String(text)
+ .replace(/&/g, "&")
+ .replace(/</g, "<")
+ .replace(/>/g, ">");
+ return escaped
+ .split(/[,锛屻�乗n]/)
+ .map(item => item.trim())
+ .filter(item => item)
+ .join("<br/>");
+ },
+ /** 鍣ㄥ畼鑾峰彇/绉绘锛氬~绾炽�佸純鐢ㄦ爣绾紱淇濈暀鎹㈣ */
+ highlightOrgan(text) {
+ if (!text) {
+ return "";
+ }
+ const escaped = String(text)
+ .replace(/&/g, "&")
+ .replace(/</g, "<")
+ .replace(/>/g, ">")
+ .replace(/\n/g, "<br/>");
+ return escaped
+ .replace(/\(濉撼\)/g, '<span style="color:#F56C6C">(濉撼)</span>')
+ .replace(/\(寮冪敤\)/g, '<span style="color:#F56C6C">(寮冪敤)</span>');
+ },
+ /** 閲戦鏄剧ず锛氫繚鐣欎袱浣嶅皬鏁帮紝0 鏄剧ず涓虹┖ */
+ formatAmount(value) {
+ if (value === null || value === undefined || value === "") {
+ return "";
+ }
+ const num = Number(value);
+ if (!Number.isFinite(num) || num === 0) {
+ return "";
+ }
+ return num.toFixed(2);
+ },
+ amountFormatter(row, column, cellValue) {
+ return this.formatAmount(cellValue);
+ },
+ /** 璐圭敤鍒楀悎璁� */
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+ const textColumns = [
+ "donorName",
+ "reportTime",
+ "deptName",
+ "reporterName",
+ "terminationFlag",
+ "workflow",
+ "donateTime",
+ "donationHospital",
+ "organName",
+ "organProcurement",
+ "organTransplantation"
+ ];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ return;
+ }
+ if (textColumns.indexOf(column.property) > -1) {
+ return;
+ }
+ const total = data.reduce(
+ (prev, item) => prev + (Number(item[column.property]) || 0),
+ 0
+ );
+ sums[index] = total === 0 ? "" : Number(total).toFixed(2);
+ });
+ return sums;
+ },
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ const queryParams = { ...this.queryParams };
+ delete queryParams.pageNum;
+ delete queryParams.pageSize;
+ this.$modal
+ .confirm("鏄惁纭瀵煎嚭褰撳墠绛涢�夋潯浠朵笅鐨勬渚嬪叏鏅暟鎹紵")
+ .then(() => {
+ this.exportLoading = true;
+ return exportCasePanorama(queryParams);
+ })
+ .then(response => {
+ this.$download.name(response.msg);
+ this.exportLoading = false;
+ })
+ .catch(() => {
+ this.exportLoading = false;
+ });
+ }
+ }
+};
+</script>
+<style scoped>
+.opo-query-form ::v-deep .el-form-item {
+ margin-right: 8px;
+ margin-bottom: 0;
+}
+.organ-cell {
+ white-space: normal;
+ line-height: 1.4;
+ text-align: left;
+ word-break: break-all;
+}
+</style>
diff --git a/src/views/project/statistics/caseStatistics/index.vue b/src/views/project/statistics/caseStatistics/index.vue
index 1f64c67..c2a3f02 100644
--- a/src/views/project/statistics/caseStatistics/index.vue
+++ b/src/views/project/statistics/caseStatistics/index.vue
@@ -86,50 +86,71 @@
></right-toolbar>
</el-row>
- <!--<el-table v-loading="loading" border :data="donatebaseinfoList"> -->
- <el-table
- v-loading="loading"
- :data="jxidata"
- ref="table"
- border
- max-height="700"
- highlight-current-row
- :summary-method="getSummaries"
- show-summary
- >
- <el-table-column label="搴忓彿" align="center" prop="id" width="50" />
- <el-table-column label="缁熻鏈堜唤" align="center" prop="donationmonth" />
- <el-table-column label="涓氬姟缁�" align="center" prop="deptname"> </el-table-column>
- <el-table-column label="涓撹亴浜哄憳" align="center" prop="reportername" />
- <el-table-column label="妗堜緥绱" align="center" prop="casesum" />
- <el-table-column label="娼滃湪鎹愮尞" align="center" prop="workflow0" width="100" />
- <el-table-column label="鍖诲璇勪及" align="center" prop="workflow1" width="100" />
- <el-table-column label="瀹跺睘纭" align="center" prop="workflow2" width="100" />
- <el-table-column label="浼︾悊瀹℃煡" align="center" prop="workflow3" width="100" />
- <el-table-column label="鍣ㄥ畼鍒嗛厤" align="center" prop="workflow4" width="100" />
- <el-table-column label="鑾峰彇瑙佽瘉" align="center" prop="workflow5" width="100" />
- <el-table-column label="鎹愮尞瀹屾垚" align="center" prop="workflow6" width="100" />
- <el-table-column label="褰掓。鎾ら攢" align="center" prop="workflow7" width="100" />
- <el-table-column label="妗堜緥褰掓。" align="center" prop="workflow8" width="100" />
- <!-- <el-table-column label="妗堜緥缁堟" align="center" prop="workflow9" width="90" /> -->
- <el-table-column label="缁堟妗堜緥" align="center" prop="terminationcase" width="100" />
+ <el-tabs v-model="activeTab">
+ <el-tab-pane label="鎸変笟鍔$粍" name="dept">
+ <el-table
+ v-loading="loading"
+ :data="deptData"
+ ref="deptTable"
+ border
+ max-height="700"
+ highlight-current-row
+ :summary-method="getDeptSummaries"
+ show-summary
+ >
+ <el-table-column label="搴忓彿" align="center" prop="id" width="50" />
+ <el-table-column label="涓氬姟缁�" align="center" prop="deptname" width="250" />
+ <el-table-column label="绱妗堜緥" align="center" prop="caseTotal" width="150" />
+ <el-table-column label="缁堟妗堜緥" align="center" prop="terminationTotal" width="150" />
+ </el-table>
+ </el-tab-pane>
- <!-- <el-table-column
- label="鎿嶄綔"
- align="center"
- class-name="small-padding fixed-width"
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button size="mini" type="text" icon="el-icon-edit"
- >鏄庣粏</el-button
+ <el-tab-pane label="鎸変汉鍛�" name="person">
+ <el-table
+ v-loading="loading"
+ :data="jxidata"
+ ref="personTable"
+ border
+ max-height="700"
+ highlight-current-row
+ :summary-method="getSummaries"
+ show-summary
+ >
+ <el-table-column label="搴忓彿" align="center" prop="id" width="50" />
+ <el-table-column label="涓氬姟缁�" align="center" prop="deptname" width="250" > </el-table-column>
+ <el-table-column label="涓撹亴浜哄憳" align="center" prop="reportername" width="150" />
+ <!-- <el-table-column label="鐧昏妗堜緥绱" align="center" prop="casesum" width="100" /> -->
+ <!-- <el-table-column label="娼滃湪鎹愮尞" align="center" prop="workflow0" width="100" />
+ <el-table-column label="鍖诲璇勪及" align="center" prop="workflow1" width="100" />
+ <el-table-column label="瀹跺睘纭" align="center" prop="workflow2" width="100" />
+ <el-table-column label="浼︾悊瀹℃煡" align="center" prop="workflow3" width="100" />
+ <el-table-column label="鍣ㄥ畼鍒嗛厤" align="center" prop="workflow4" width="100" />
+ <el-table-column label="鑾峰彇瑙佽瘉" align="center" prop="workflow5" width="100" />
+ <el-table-column label="鎹愮尞瀹屾垚" align="center" prop="workflow6" width="100" />
+ <el-table-column label="褰掓。鎾ら攢" align="center" prop="workflow7" width="100" />
+ <el-table-column label="妗堜緥褰掓。" align="center" prop="workflow8" width="100" /> -->
+ <el-table-column label="妗堜緥绱" align="center" prop="workflowsum" width="200" />
+ <el-table-column label="缁堟妗堜緥" align="center" prop="terminationcase" width="100" />
+
+ <!-- <el-table-column
+ label="鎿嶄綔"
+ align="center"
+ class-name="small-padding fixed-width"
+ fixed="right"
>
- </template>
- </el-table-column> -->
- </el-table>
+ <template slot-scope="scope">
+ <el-button size="mini" type="text" icon="el-icon-edit"
+ >鏄庣粏</el-button
+ >
+ </template>
+ </el-table-column> -->
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+
<div style="margin: 10px;text-align: right;">
<div>
- 鍏� <span style="color:#1890FF ;">{{ total }}</span> 鏉℃暟鎹�
+ 鍏� <span style="color:#1890FF ;">{{ tableTotal }}</span> 鏉℃暟鎹�
</div>
</div>
@@ -146,7 +167,8 @@
listbxiaostatistics,
listjixstatistics,
listanlstatistics,
- exportCaseStatistics
+ exportCaseStatistics,
+ exportCaseDeptStatistics
} from "@/api/project/statistics";
import { listUser } from "@/api/project/organization";
@@ -230,6 +252,10 @@
donatebaseinfoList: [],
// 鎹愮尞鍩虹琛ㄦ牸鏁版嵁
jxidata: [],
+ // 褰撳墠椤电锛歞ept=鎸変笟鍔$粍锛宲erson=鎸変汉鍛�
+ activeTab: "dept",
+ // 鎸変笟鍔$粍鑱氬悎鏁版嵁
+ deptData: [],
// 寮瑰嚭灞傛爣棰�
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
@@ -260,7 +286,11 @@
};
},
//鐩戝惉灞炴�� 绫讳技浜巇ata姒傚康
- computed: {},
+ computed: {
+ tableTotal() {
+ return this.activeTab === "dept" ? this.deptData.length : this.jxidata.length;
+ }
+ },
activated() {},
mounted() {},
@@ -316,6 +346,28 @@
$obj.id = $index + 1;
});
this.total = res.total;
+ this.buildDeptData();
+ });
+ },
+ /** 鎸変笟鍔$粍鑱氬悎锛氱疮璁℃渚� = 危workflowsum锛岀粓姝㈡渚� = 危terminationcase */
+ buildDeptData() {
+ const map = new Map();
+ this.jxidata.forEach(row => {
+ const key = row.deptid || row.deptname || "鏈垎缁�";
+ if (!map.has(key)) {
+ map.set(key, {
+ deptname: row.deptname || "鏈垎缁�",
+ caseTotal: 0,
+ terminationTotal: 0
+ });
+ }
+ const item = map.get(key);
+ item.caseTotal += Number(row.workflowsum) || 0;
+ item.terminationTotal += Number(row.terminationcase) || 0;
+ });
+ this.deptData = Array.from(map.values()).map((item, index) => {
+ item.id = index + 1;
+ return item;
});
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
@@ -326,11 +378,15 @@
padeptno: this.queryParams.padeptno,
pausername: this.queryParams.pausername
};
+ const exportApi =
+ this.activeTab === "dept"
+ ? exportCaseDeptStatistics
+ : exportCaseStatistics;
this.$modal
- .confirm("鏄惁纭瀵煎嚭褰撳墠绛涢�夋潯浠朵笅鐨勬渚嬬粺璁℃暟鎹紵")
+ .confirm("鏄惁纭瀵煎嚭褰撳墠鍒楄〃鐨勬渚嬬粺璁℃暟鎹紵")
.then(() => {
this.exportLoading = true;
- return exportCaseStatistics(queryParams);
+ return exportApi(queryParams);
})
.then(response => {
this.$download.name(response.msg);
@@ -343,7 +399,7 @@
getSummaries(param) {
const { columns, data } = param;
const sums = [];
- var columnnames = ["donationmonth", "deptname", "reportername"];
+ var columnnames = ["deptname", "reportername"];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = "鍚堣";
@@ -371,6 +427,26 @@
});
return sums;
},
+ /** 鎸変笟鍔$粍琛ㄦ牸鍚堣 */
+ getDeptSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ return;
+ }
+ if (column.property === "deptname") {
+ return;
+ }
+ const total = data.reduce(
+ (prev, item) => prev + (Number(item[column.property]) || 0),
+ 0
+ );
+ sums[index] = data.length === 0 ? "" : total;
+ });
+ return sums;
+ },
// 琛ㄥ崟閲嶇疆
reset() {
diff --git a/src/views/project/statistics/chargeStatistics/index.vue b/src/views/project/statistics/chargeStatistics/index.vue
index 3431cd4..7503d9d 100644
--- a/src/views/project/statistics/chargeStatistics/index.vue
+++ b/src/views/project/statistics/chargeStatistics/index.vue
@@ -6,33 +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="鏈堜唤鑼冨洿">
+ <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: 100%"
@change="getTimeList"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="鍖婚櫌鍚嶇О">
- <org-selecter
- ref="orgSelecter"
- :org-type="'4'"
- v-model="queryParams.pahospitalno"
/>
</el-form-item>
- </el-col>
+ </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
@@ -50,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"
@@ -61,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;">
@@ -111,7 +105,8 @@
listsfeistatistics,
listbxiaostatistics,
listjixstatistics,
- listanlstatistics
+ listanlstatistics,
+ exportChargeStatistics
} from "@/api/project/statistics";
import { listUser } from "@/api/project/organization";
@@ -137,7 +132,7 @@
countyname: "",
cuuntry: "",
- selecttime: "",
+ selecttime: [],
reportervalue: "",
reportlist: [
{ label: "鏈敹娆�", value: "0" },
@@ -205,7 +200,13 @@
// 鑾峰彇缁勭粐鍚嶇О鏃堕棿鑼冨洿
daterangeReporttime: [],
// 鏌ヨ鍙傛暟
- queryParams: {},
+ queryParams: {
+ pageNum: 1,
+ pageSize: 20,
+ pabegtime: "",
+ paendtime: "",
+ pahospitalname: ""
+ },
// 琛ㄥ崟鍙傛暟
form: {},
@@ -244,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;
+ });
},
// 琛ㄥ崟閲嶇疆
@@ -266,48 +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) {
- // 缁撴潫鏃堕棿鍙�"鎵�閫夌粨鏉熸湀鐨勬鏈� 1 鍙�"锛屼互鍖呭惈鏁翠釜缁撴潫鏈堛��
- // 鍘熷疄鐜版妸鏈堜唤 +1 鍚庣洿鎺ユ嫾瀛楃涓诧紝12 鏈堜細寰楀埌 13 鏈堬紙2026-13-01锛夛紝
- // MySQL 鎶� Incorrect datetime value锛屽瓨鍌ㄨ繃绋嬬洿鎺� 500銆�
- this.queryParams.paendtime = this.$moment(this.queryParams.paendtime)
- .startOf("month")
- .add(1, "month")
- .format("YYYY-MM")
- .concat("-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] = "鍚堣";
diff --git a/src/views/project/statistics/performanceStaristics/index.vue b/src/views/project/statistics/performanceStaristics/index.vue
index f2b1ac5..a93897b 100644
--- a/src/views/project/statistics/performanceStaristics/index.vue
+++ b/src/views/project/statistics/performanceStaristics/index.vue
@@ -25,14 +25,7 @@
</el-date-picker>
</el-form-item>
</el-col>
- <el-col :span="5">
- <el-form-item label="缁╂晥绫诲瀷">
- <el-radio-group v-model="queryParams.pabonustype">
- <el-radio v-for="item in reporttype" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
- <el-col :span="5">
+ <el-col :span="10">
<el-form-item label="缁╂晥浜哄憳" prop="pauserno">
<el-input v-model="queryParams.pausername" placeholder="璇疯緭鍏ュ鍚�" clearable size="small"
@keyup.enter.native="handleQuery" />
@@ -55,24 +48,41 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
- <!--<el-table v-loading="loading" border :data="donatebaseinfoList"> -->
- <el-table v-loading="loading" :data="jxidata" ref="table" border max-height="700" highlight-current-row
- :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="bonusmonth" />
- <el-table-column label="绉戝涓氬姟缁�" align="center" prop="deptName"> </el-table-column>
- <el-table-column label="缁╂晥浜哄憳/鍖婚櫌" align="center" prop="beneficiaryname" />
- <el-table-column label="缁╂晥閲戦" align="center" prop="amount" :formatter="amountFormatter" />
- <!-- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right">
- <template slot-scope="scope">
- <el-button size="mini" type="text" icon="el-icon-edit">鏄庣粏</el-button>
- </template>
- </el-table-column> -->
- </el-table>
+ <el-tabs v-model="activeTab">
+ <el-tab-pane label="鎸変笟鍔$粍" name="dept">
+ <el-table v-loading="loading" :data="deptData" ref="deptTable" border max-height="700"
+ highlight-current-row :summary-method="getDeptSummaries" show-summary>
+ <el-table-column label="搴忓彿" align="center" prop="id" width="80" />
+ <el-table-column label="涓氬姟缁�" align="center" prop="deptname" />
+ <el-table-column label="缁╂晥閲戦" align="center" prop="amount" :formatter="amountFormatter" />
+ <el-table-column label="鏈堝害缁╂晥" align="center" prop="mamount" :formatter="amountFormatter" />
+ <el-table-column label="瀛e害缁╂晥" align="center" prop="samount" :formatter="amountFormatter" />
+ <el-table-column label="骞村害缁╂晥" align="center" prop="yamount" :formatter="amountFormatter" />
+ </el-table>
+ </el-tab-pane>
+
+ <el-tab-pane label="鎸変汉鍛�" name="person">
+ <el-table v-loading="loading" :data="jxidata" ref="personTable" border max-height="700"
+ highlight-current-row :summary-method="getSummaries" show-summary>
+ <el-table-column label="搴忓彿" align="center" prop="id" width="80" />
+ <el-table-column label="涓氬姟缁�" align="center" prop="deptName" />
+ <el-table-column label="缁╂晥浜哄憳/鍖婚櫌" align="center" prop="beneficiaryname" />
+ <el-table-column label="缁╂晥閲戦" align="center" prop="amount" :formatter="amountFormatter" />
+ <el-table-column label="鏈堝害缁╂晥" align="center" prop="mamount" :formatter="amountFormatter" />
+ <el-table-column label="瀛e害缁╂晥" align="center" prop="samount" :formatter="amountFormatter" />
+ <el-table-column label="骞村害缁╂晥" align="center" prop="yamount" :formatter="amountFormatter" />
+ <!-- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right">
+ <template slot-scope="scope">
+ <el-button size="mini" type="text" icon="el-icon-edit">鏄庣粏</el-button>
+ </template>
+ </el-table-column> -->
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+
<div style="margin: 10px;text-align: right;">
<div>
- 鍏� <span style="color:#1890FF ;">{{ total }}</span> 鏉℃暟鎹�
+ 鍏� <span style="color:#1890FF ;">{{ tableTotal }}</span> 鏉℃暟鎹�
</div>
</div>
@@ -90,7 +100,8 @@
listbxiaostatistics,
listjixstatistics,
listanlstatistics,
- exportPerformanceStatistics
+ exportPerformanceStatistics,
+ exportPerformanceDeptStatistics
} from "@/api/project/statistics";
import { listUser } from "@/api/project/organization";
@@ -120,12 +131,6 @@
selecttime: "",
reportervalue: "",
- reporttype: [
- { label: "鍏ㄩ儴", value: "0" },
- { label: "鏈堝害", value: "68" },
- { label: "瀛e害", value: "69" },
- { label: "骞村害", value: "70" }
- ],
//鐪佸競鍖�
//榛樿鍊艰缃紝鍙负绌�
searchAddress: {
@@ -182,6 +187,10 @@
donatebaseinfoList: [],
// 鎹愮尞鍩虹琛ㄦ牸鏁版嵁
jxidata: [],
+ // 褰撳墠椤电锛歞ept=鎸変笟鍔$粍锛宲erson=鎸変汉鍛�
+ activeTab: "dept",
+ // 鎸変笟鍔$粍鑱氬悎鏁版嵁
+ deptData: [],
// 寮瑰嚭灞傛爣棰�
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
@@ -190,7 +199,6 @@
daterangeReporttime: [],
// 鏌ヨ鍙傛暟
queryParams: {
- pabonustype: "0",
pabegtime: null,
paendtime: null,
pausername: "",
@@ -215,7 +223,11 @@
};
},
//鐩戝惉灞炴�� 绫讳技浜巇ata姒傚康
- computed: {},
+ computed: {
+ tableTotal() {
+ return this.activeTab === "dept" ? this.deptData.length : this.jxidata.length;
+ }
+ },
activated() { },
mounted() { },
@@ -256,16 +268,13 @@
return Arr;
},
- /** 缁勮鏌ヨ鍙傛暟锛氭湭閫夋嫨缁熻鏃ユ湡鏃舵煡鍏ㄩ儴锛岀哗鏁堢被鍨嬩负绌烘寜鍏ㄩ儴 */
+ /** 缁勮鏌ヨ鍙傛暟锛氭湭閫夋嫨缁熻鏃ユ湡鏃舵煡鍏ㄩ儴 */
buildQueryParams() {
const query = { ...this.queryParams };
if (!query.pabegtime || !query.paendtime) {
// 鏂� SP 榛樿鍙栬繎 6 涓湀锛岃�岀哗鏁� jxrq 鏁版嵁闆嗕腑鍦� 2023-08~2024-01锛岄粯璁や細鏌ヤ笉鍒�
query.pabegtime = "2000-01-01 00:00:00";
query.paendtime = "2999-12-31 23:59:59";
- }
- if (!query.pabonustype) {
- query.pabonustype = "0";
}
return query;
},
@@ -278,16 +287,46 @@
$obj.id = $index + 1;
});
this.total = res.total;
+ this.buildDeptData();
+ });
+ },
+ /** 鎸変笟鍔$粍鑱氬悎锛氱哗鏁堥噾棰�/鏈堝害/瀛e害/骞村害鍒嗗埆姹傚拰 */
+ buildDeptData() {
+ const map = new Map();
+ this.jxidata.forEach(row => {
+ const key = row.deptId || row.deptName || "鏈垎缁�";
+ if (!map.has(key)) {
+ map.set(key, {
+ deptname: row.deptName || "鏈垎缁�",
+ amount: 0,
+ mamount: 0,
+ samount: 0,
+ yamount: 0
+ });
+ }
+ const item = map.get(key);
+ item.amount += Number(row.amount) || 0;
+ item.mamount += Number(row.mamount) || 0;
+ item.samount += Number(row.samount) || 0;
+ item.yamount += Number(row.yamount) || 0;
+ });
+ this.deptData = Array.from(map.values()).map((item, index) => {
+ item.id = index + 1;
+ return item;
});
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
const queryParams = this.buildQueryParams();
+ const exportApi =
+ this.activeTab === "dept"
+ ? exportPerformanceDeptStatistics
+ : exportPerformanceStatistics;
this.$modal
- .confirm("鏄惁纭瀵煎嚭褰撳墠绛涢�夋潯浠朵笅鐨勭哗鏁堢粺璁℃暟鎹紵")
+ .confirm("鏄惁纭瀵煎嚭褰撳墠鍒楄〃鐨勭哗鏁堢粺璁℃暟鎹紵")
.then(() => {
this.exportLoading = true;
- return exportPerformanceStatistics(queryParams);
+ return exportApi(queryParams);
})
.then(response => {
this.$download.name(response.msg);
@@ -320,7 +359,6 @@
this.queryParams = {
- pabonustype: "0",
pabegtime: null,
paendtime: null,
pausername: "",
@@ -355,7 +393,7 @@
getSummaries(param) {
const { columns, data } = param;
const sums = [];
- var columnnames = ["applymonth", "deptmentName", "username", "deptName", "beneficiaryname"];
+ var columnnames = ["deptName", "beneficiaryname"];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = "鍚堣";
@@ -383,6 +421,26 @@
}
});
return sums;
+ },
+ /** 鎸変笟鍔$粍琛ㄦ牸鍚堣 */
+ getDeptSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ return;
+ }
+ if (column.property === "deptname") {
+ return;
+ }
+ const total = data.reduce(
+ (prev, item) => prev + (Number(item[column.property]) || 0),
+ 0
+ );
+ sums[index] = total === 0 ? "" : Number(total).toFixed(2);
+ });
+ return sums;
}
},
--
Gitblit v1.9.3