From 87baeadec09aa59236d6e8b8fb424470d5de3579 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期五, 30 十月 2026 16:10:10 +0800
Subject: [PATCH] 器官费用调整
---
src/views/project/unitCost/organfee/index.vue | 109 +++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 94 insertions(+), 15 deletions(-)
diff --git a/src/views/project/unitCost/organfee/index.vue b/src/views/project/unitCost/organfee/index.vue
index 09566e2..9f36211 100644
--- a/src/views/project/unitCost/organfee/index.vue
+++ b/src/views/project/unitCost/organfee/index.vue
@@ -8,10 +8,10 @@
v-show="showSearch"
label-width="90px"
>
- <el-form-item label="鎺ユ敹鍖婚櫌" prop="hospitalno">
+ <el-form-item label="浠樻鍖婚櫌" prop="hospitalno">
<el-select
v-model="queryParams.hospitalno"
- placeholder="璇烽�夋嫨鎺ユ敹鍖婚櫌"
+ placeholder="璇烽�夋嫨浠樻鍖婚櫌"
clearable
filterable
size="small"
@@ -34,7 +34,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="鎶ュ憡鏃ユ湡">
+ <el-form-item label="鎹愮尞鏃ユ湡">
<el-date-picker
v-model="donatetimeRange"
type="daterange"
@@ -62,6 +62,17 @@
</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"
@@ -72,7 +83,7 @@
<el-table-column type="index" label="搴忓彿" width="55" align="center" />
<el-table-column
prop="donatetime"
- label="鎶ュ憡鏃ユ湡"
+ label="鎹愮尞鏃ユ湡"
width="120"
align="center"
>
@@ -80,6 +91,12 @@
<span>{{ parseTime(scope.row.donatetime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
+ <el-table-column
+ prop="hospitalname"
+ label="浠樻鍖婚櫌"
+ width="200"
+ align="center"
+ />
<el-table-column
prop="donorname"
label="鎹愮尞鑰�"
@@ -99,11 +116,7 @@
show-overflow-tooltip
/>
<el-table-column prop="name" label="鍙椾綋濮撴皬" width="120" align="center" />
- <el-table-column label="绉绘鏃ユ湡" width="120" align="center">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.receiveTime, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
+
<el-table-column label="鍣ㄥ畼鐘舵��" width="120" align="center">
<template slot-scope="scope">
<span>{{ selectOrganState(scope.row.organState) }}</span>
@@ -115,12 +128,28 @@
width="120"
align="center"
/>
+ <el-table-column label="浠樻鐘舵��" width="100" align="center">
+ <template slot-scope="scope">
+ <span>{{ payStatus(scope.row) }}</span>
+ </template>
+ </el-table-column>
<el-table-column
prop="amount"
label="瀹炴敹閲戦"
width="120"
align="center"
/>
+ <el-table-column label="鏈粯閲戦" width="160" align="center">
+ <template slot-scope="scope">
+ <span>{{ formatReceivableDiff(scope.row) }}</span>
+ </template>
+ </el-table-column>
+
+ <el-table-column label="鏀舵鏃ユ湡" width="120" align="center">
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.organtime, "{y}-{m}-{d}") }}</span>
+ </template>
+ </el-table-column>
<el-table-column
prop="organchargedesc"
label="澶囨敞"
@@ -208,7 +237,8 @@
<script>
import {
listDonorchargeorgan,
- updateDonorchargeorgan
+ updateDonorchargeorgan,
+ exportOrganfee
} from "@/api/project/donorcharge";
import { listOrganization } from "@/api/project/organization";
@@ -218,6 +248,8 @@
return {
// 閬僵灞�
loading: false,
+ // 瀵煎嚭閬僵灞�
+ exportLoading: false,
// 鏄剧ず鎼滅储鏉′欢
showSearch: true,
// 鎬绘潯鏁�
@@ -231,12 +263,12 @@
// 鍣ㄥ畼鐘舵�侊紙瀵瑰簲 service_donorchargeorgan.organ_state锛�
organStateList: [
{ value: "1", label: "绉绘" },
- { value: "2", label: "澶卞姛" },
+ { value: "2", label: "寮冪敤" },
{ value: "3", label: "搴撳瓨" },
- { value: "4", label: "宸茬Щ妞�" },
- { value: "5", label: "寮冪敤" },
- { value: "6", label: "鐩寸郴鍏嶉櫎" },
- { value: "7", label: "涓嶈壇浜嬩欢" }
+ { value: "4", label: "澶卞姛" },
+ { value: "5", label: "鐩寸郴鍏嶉櫎" },
+ { value: "6", label: "涓嶈壇浜嬩欢" },
+ { value: "7", label: "绉戠爺" }
],
// 淇敼寮圭獥
editOpen: false,
@@ -278,6 +310,53 @@
this.loading = false;
});
},
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ const queryParams = this.queryParams;
+ this.$modal
+ .confirm("鏄惁纭瀵煎嚭鍣ㄥ畼璐圭敤鏁版嵁锛�")
+ .then(() => {
+ this.exportLoading = true;
+ return exportOrganfee(queryParams);
+ })
+ .then(response => {
+ this.$download.name(response.msg);
+ })
+ .catch(() => {})
+ .finally(() => {
+ this.exportLoading = false;
+ });
+ },
+ /** 搴旀敹閲戦-瀹炴敹閲戦鐨勫樊棰濓紙淇濈暀涓や綅灏忔暟锛夛紝搴旀敹閲戦涓虹┖鏃惰繑鍥� null */
+ receivableDiff(row) {
+ if (
+ row.organcharge === null ||
+ row.organcharge === undefined ||
+ row.organcharge === ""
+ ) {
+ return null;
+ }
+ const receivable = Number(row.organcharge);
+ if (isNaN(receivable)) {
+ return null;
+ }
+ const received = Number(row.amount);
+ const diff = receivable - (isNaN(received) ? 0 : received);
+ return Math.round(diff * 100) / 100;
+ },
+ /** 宸灞曠ず鏂囨湰锛屽浐瀹氫袱浣嶅皬鏁� */
+ formatReceivableDiff(row) {
+ const diff = this.receivableDiff(row);
+ return diff === null ? "" : diff.toFixed(2);
+ },
+ /** 宸涓� 0 涓哄凡浠橈紝鍏跺畠涓烘湭浠� */
+ payStatus(row) {
+ const diff = this.receivableDiff(row);
+ if (diff === null) {
+ return "";
+ }
+ return diff === 0 ? "宸蹭粯" : "鏈粯";
+ },
/** 鏄惁鏈敹璐癸細organ_charge_state 涓� 0 鎴栦负绌� */
isUncharged(row) {
const state = row.organChargeState;
--
Gitblit v1.9.3