From 87baeadec09aa59236d6e8b8fb424470d5de3579 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期五, 30 十月 2026 16:10:10 +0800
Subject: [PATCH] 器官费用调整
---
src/api/project/donorcharge.js | 9 ++++
src/views/project/unitCost/organfee/index.vue | 92 +++++++++++++++++++++++++++++++++++++++++----
src/views/project/unitCost/particulars/index.vue | 7 ++-
3 files changed, 96 insertions(+), 12 deletions(-)
diff --git a/src/api/project/donorcharge.js b/src/api/project/donorcharge.js
index dccd327..0eef1e1 100644
--- a/src/api/project/donorcharge.js
+++ b/src/api/project/donorcharge.js
@@ -143,6 +143,15 @@
})
}
+// 瀵煎嚭鍣ㄥ畼璐圭敤鍒楄〃
+export function exportOrganfee(query) {
+ return request({
+ url: '/project/donorchargeorgan/exportOrganfee',
+ method: 'get',
+ params: query
+ })
+}
+
//鏂板鎴栦慨鏀规崘鐚櫒瀹樺垎閰�
export function saveDonorchargeorgan(data) {
diff --git a/src/views/project/unitCost/organfee/index.vue b/src/views/project/unitCost/organfee/index.vue
index d71aa18..9f36211 100644
--- a/src/views/project/unitCost/organfee/index.vue
+++ b/src/views/project/unitCost/organfee/index.vue
@@ -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"
>
@@ -105,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>
@@ -121,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="澶囨敞"
@@ -214,7 +237,8 @@
<script>
import {
listDonorchargeorgan,
- updateDonorchargeorgan
+ updateDonorchargeorgan,
+ exportOrganfee
} from "@/api/project/donorcharge";
import { listOrganization } from "@/api/project/organization";
@@ -224,6 +248,8 @@
return {
// 閬僵灞�
loading: false,
+ // 瀵煎嚭閬僵灞�
+ exportLoading: false,
// 鏄剧ず鎼滅储鏉′欢
showSearch: true,
// 鎬绘潯鏁�
@@ -241,7 +267,8 @@
{ value: "3", label: "搴撳瓨" },
{ value: "4", label: "澶卞姛" },
{ value: "5", label: "鐩寸郴鍏嶉櫎" },
- { value: "6", label: "涓嶈壇浜嬩欢" }
+ { value: "6", label: "涓嶈壇浜嬩欢" },
+ { value: "7", label: "绉戠爺" }
],
// 淇敼寮圭獥
editOpen: false,
@@ -283,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;
diff --git a/src/views/project/unitCost/particulars/index.vue b/src/views/project/unitCost/particulars/index.vue
index 8910b17..b3e2771 100644
--- a/src/views/project/unitCost/particulars/index.vue
+++ b/src/views/project/unitCost/particulars/index.vue
@@ -372,7 +372,7 @@
placeholder="璇疯緭鍏ユ崘鐚�呭鍚�"
/>
</el-form-item>
- <el-form-item label="鎶ュ憡鏃ユ湡" prop="donatetime">
+ <el-form-item label="鎹愮尞鏃ユ湡" prop="donatetime">
<el-date-picker style="width: 220px;"
v-model="donatetimeRange"
type="daterange"
@@ -416,7 +416,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"> </el-table-column>
- <el-table-column prop="donatetime" label="鎶ュ憡鏃ユ湡" width="120">
+ <el-table-column prop="donatetime" label="鎹愮尞鏃ユ湡" width="120">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.donatetime, "{y}-{m}-{d}") }}</span>
</template>
@@ -663,7 +663,8 @@
{ value: "3", label: "搴撳瓨" },
{ value: "4", label: "澶卞姛" },
{ value: "5", label: "鐩寸郴鍏嶉櫎" },
- { value: "6", label: "涓嶈壇浜嬩欢" }
+ { value: "6", label: "涓嶈壇浜嬩欢" },
+ { value: "7", label: "绉戠爺" }
],
gatheringlist: [
{ label: "鏂板缓", value: "1" },
--
Gitblit v1.9.3