From 2698387e653c6a25059c3ae9976f18b814eba892 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期五, 12 九月 2025 15:16:46 +0800
Subject: [PATCH] 医疗权限
---
src/views/project/unitCost/index.vue | 281 ++++++++++++++++++++-----------------------------------
1 files changed, 103 insertions(+), 178 deletions(-)
diff --git a/src/views/project/unitCost/index.vue b/src/views/project/unitCost/index.vue
index 5cd6c8e..11d4e41 100644
--- a/src/views/project/unitCost/index.vue
+++ b/src/views/project/unitCost/index.vue
@@ -1,196 +1,85 @@
<template>
<div class="app-container">
- <el-form
- :model="queryParams"
- ref="queryForm"
- :inline="true"
- v-show="showSearch"
- label-width="120px"
- >
- <el-form-item label="浠樻鍖婚櫌" prop="name">
- <el-input
- v-model="queryParams.name"
- placeholder="璇疯緭鍏ュ鍚�"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
+ <el-form-item label="鍖荤枟鏈烘瀯" prop="name">
+ <el-input v-model="queryParams.name" placeholder="璇疯緭鍏ュ尰鐤楁満鏋�" clearable size="small"
+ @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="鏀舵骞村害" prop="donationcategory">
- <el-input
- v-model="queryParams.donationcategory"
- placeholder="璇疯緭鍏ユ崘鐚被鍒�"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
+ <el-input v-model="queryParams.donationcategory" placeholder="璇疯緭鍏ユ煡璇㈡椂闂�" clearable size="small"
+ @keyup.enter.native="handleQuery" />
</el-form-item>
- <el-form-item label="鏀舵鐘舵��" prop="chargeamount">
- <el-input
- v-model="queryParams.chargeamount"
- placeholder="璇疯緭鍏ヨ垂鐢ㄩ噾棰�"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
+ <el-form-item label="鏀舵閲戦" prop="chargeamount">
+ <el-input v-model="queryParams.chargeamount" placeholder="璇疯緭鍏ユ敹娆鹃噾棰�" clearable size="small"
+ @keyup.enter.native="handleQuery" />
</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-row :gutter="10" class="mb8">
<el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-plus"
- size="mini"
- @click="handleAdd"
- v-hasPermi="['system:donorcharge:add']"
- >鏂板</el-button
- >
+ <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
+ v-hasPermi="['system:donorcharge:add']">鏂板</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="success"
- plain
- icon="el-icon-edit"
- size="mini"
- :disabled="single"
- @click="handleUpdate"
- v-hasPermi="['system:donorcharge:edit']"
- >淇敼</el-button
- >
+ <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
+ v-hasPermi="['system:donorcharge:edit']">淇敼</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['system:donorcharge:remove']"
- >鍒犻櫎</el-button
- >
+ <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
+ v-hasPermi="['system:donorcharge:remove']">鍒犻櫎</el-button>
</el-col>
- <right-toolbar
- :showSearch.sync="showSearch"
- @queryTable="getList"
- ></right-toolbar>
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
- <el-table
- v-loading="loading"
- :data="donorchargeList"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- label="鐢宠鏃堕棿"
- align="center"
- prop="createTime"
- width="180"
- >
+ <el-table v-loading="loading" :data="donorchargeList" @selection-change="handleSelectionChange">
+ <el-table-column label="鐢宠鏃堕棿" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
- <el-table-column label="鏀舵鍗曞彿" align="center" prop="paymentno" />
- <el-table-column
- label="浠樻鍖婚櫌"
- width="180"
- align="center"
- prop="hospitalname"
- />
+ <el-table-column label="鐢宠鍗曞彿" align="center" prop="paymentno" />
+ <el-table-column label="鍖荤枟鏈烘瀯" width="180" align="center" prop="hospitalname" />
- <el-table-column label="鐘舵��" align="center" prop="paystatus">
+ <el-table-column label="浠樻鐘舵��" align="center" prop="paystatus">
<template slot-scope="scope">
- <dict-tag
- :options="dict.type.sys_gathering"
- :value="scope.row.paystatus"
- />
+ <dict-tag :options="dict.type.Collection_status" :value="scope.row.paystatus" />
</template>
</el-table-column>
- <el-table-column
- label="搴旀敹閲戦"
- align="center"
- prop="receivableamount"
- />
- <el-table-column label="宸叉敹閲戦" align="center" prop="receivedamount" />
- <el-table-column label="鏀舵鏃ユ湡" align="center" prop="receivedtime" />
- <el-table-column label="缁忓姙浜�" align="center" prop="updateBy" />
+ <el-table-column label="搴旀敹閲戦" align="center" prop="receivableamount" />
+ <el-table-column label="瀹炴敹閲戦" align="center" prop="receivedamount" />
+ <el-table-column label="鏀舵鏃ユ湡" width="180" align="center" prop="receivedtime"><template slot-scope="scope">
+ <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="缁忓姙浜�" align="center" prop="userName" />
<el-table-column label="鎿嶄綔" width="280" align="center">
<template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['system:donorcharge:edit']"
- >淇敼</el-button
- >
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleDetail(scope.row)"
- v-hasPermi="['system:donorcharge:edit']"
- >璇︽儏</el-button
- >
- <el-button
- size="mini"
- type="text"
- @click="handleDelete(scope.row)"
- v-hasPermi="['system:donorcharge:remove']"
- ><span class="button-delete"
- ><i class="el-icon-delete"></i>鍒犻櫎</span
- ></el-button
- >
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+ v-hasPermi="['system:donorcharge:edit']">淇敼</el-button>
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)"
+ v-hasPermi="['system:donorcharge:edit']">璇︽儏</el-button>
+ <el-button size="mini" type="text" @click="handleDelete(scope.row)"
+ v-hasPermi="['system:donorcharge:remove']"><span class="button-delete"><i
+ class="el-icon-delete"></i>鍒犻櫎</span></el-button>
+ <el-button size="mini" type="primary" @click="download(scope.row.id)" icon="el-icon-download"
+ circle></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"
- />
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+ @pagination="getList" />
-
-
- <el-dialog
- :visible.sync="showSelectionDialog"
- :close-on-click-modal="false"
- :title="'璇烽�夋嫨鎹愮尞妗堜緥'"
- width="500px"
- style="text-align: center"
- v-loading="loading"
- >
- <el-form ref="selectionForm" :model="selectionForm">
+ <el-dialog :visible.sync="showSelectionDialog" :close-on-click-modal="false" :title="'璇烽�夋嫨鏀舵鍗曠殑鍖荤枟鏈烘瀯'" width="500px"
+ style="text-align: center" v-loading="loading">
+ <el-form ref="selectionForm" :model="selectionForm" label-width="100px">
<el-row>
- <el-form-item
- align="left"
- label="鍖荤枟鏈烘瀯"
- prop="treatmenthospitalno"
- >
- <org-selecter
- ref="addOrgSelect"
- :org-type="'4'"
- v-model="selectionForm.donorid"
- />
+ <el-form-item align="left" label="鍖荤枟鏈烘瀯锛�" prop="treatmenthospitalno">
+ <org-selecter ref="addOrgSelect" :org-type="'4'" v-model="selectionForm.itemid" />
</el-form-item>
</el-row>
</el-form>
@@ -211,15 +100,17 @@
addDonorcharge,
updateDonorcharge,
exportDonorcharge,
- listDonorpayment
+ listDonorpayment,
+ dyDonorpayment
} from "@/api/project/donorcharge";
import { listOrganization } from "@/api/project/organization";
import OrgSelecter from "@/views/project/components/orgselect";
+import { getToken } from "@/utils/auth";
export default {
name: "Donorcharge",
- dicts: ["sys_gathering"],
+ dicts: ["Collection_status"],
components: {
OrgSelecter
},
@@ -244,15 +135,15 @@
// 鎹愮尞妗堜緥鍣ㄥ畼鍒楄〃鏍兼暟鎹�
donorchargeList: [],
donorchargerogans: [],
-
+
//鎹愮尞妗堜緥閫夋嫨
showSelectionDialog: false,
donorlist: [],
donorinfolist: [],
selectionForm: {
index: null,
- donorid: null,
- donorname: null
+ itemid: null,
+ itemname: null
},
loadingdonorlist: false,
@@ -280,6 +171,9 @@
pageSize: 10,
donorchargeid: null
},
+ headers: {
+ Authorization: "Bearer " + getToken()
+ },
// 琛ㄥ崟鍙傛暟
form: {},
// 琛ㄥ崟鏍¢獙
@@ -294,15 +188,15 @@
//涓撳/鍖荤枟鏈烘瀯/璐圭敤鎶ラ攢鏈烘瀯閫夋嫨
confirmSelection() {
var curdonorinfo = null;
- console.log(this.selectionForm.donorid, "donorid");
+ console.log(this.selectionForm.itemid, "itemid");
//浠庢渚嬪垪琛ㄨ幏鍙栦俊鎭�
this.donorinfolist.map(item => {
- if (this.selectionForm.donorid == item.id) {
+ if (this.selectionForm.itemid == item.id) {
curdonorinfo = item;
}
});
let searchData = {
- organizationid: this.selectionForm.donorid //浼犲叆鐨勭被鍨�
+ organizationid: this.selectionForm.itemid //浼犲叆鐨勭被鍨�
}; //鎼滅储鏉′欢
listOrganization(searchData).then(res => {
if (res.code == 200) {
@@ -327,7 +221,6 @@
this.loading = false;
});
},
-
// 琛ㄥ崟閲嶇疆
reset() {
@@ -372,8 +265,8 @@
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
this.selectionForm.index = null;
- this.selectionForm.donorid = null;
- this.selectionForm.donorname = null;
+ this.selectionForm.itemid = null;
+ this.selectionForm.itemname = null;
if (this.donorlist[0]) {
this.showSelectionDialog = true;
@@ -392,8 +285,8 @@
this.donorinfolist.forEach(item1 => {
this.donorlist.push({
- donorid: item1.id,
- donorname: item1.name
+ itemid: item1.id,
+ itemname: item1.name
});
});
console.log(this.donorinfolist, " this.donorinfolist");
@@ -403,8 +296,6 @@
this.showSelectionDialog = true;
}
-
-
},
/** 淇敼鎸夐挳鎿嶄綔 */
@@ -422,20 +313,55 @@
query: { id: row.id, operation: "detail", data: row }
});
},
+ // 鎵撳嵃
+ download(id) {
+ // const id =this.row.id
+ dyDonorpayment(id).then(res => {
+ var fileUrl = res;
+ //鑾峰彇褰撳墠缃戝潃
+ var urlBase = process.env.VUE_APP_BASE_API;
+ var curWWWPath = window.document.location.href;
+ var pos = curWWWPath.indexOf(window.document.location.pathname);
+ // 鍒涘缓a鏍囩
+ var aEle = document.createElement("a");
+ aEle.href =
+ curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
+ console.log(aEle.href);
+ // 娣诲姞Authorization澶撮儴
+ fetch(aEle.href, {
+ headers: this.headers
+ })
+ .then(response => {
+ // 灏嗘枃浠朵笅杞介摼鎺ヤ綔涓篵lob瀵硅薄杩涜涓嬭浇
+ return response.blob();
+ })
+ .then(blob => {
+ const url = window.URL.createObjectURL(new Blob([blob]));
+ console.log(url);
+ const link = document.createElement("a");
+ link.href = url;
+ const name = fileUrl["downloadName"];
+ link.setAttribute("download", name); // 鏇挎崲file.pdf涓哄疄闄呯殑鏂囦欢鍚�
+ document.body.appendChild(link);
+ link.click();
+ link.parentNode.removeChild(link);
+ });
+ });
+ },
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('鏄惁纭鍒犻櫎鎹愮尞妗堜緥鍣ㄥ畼鍒楃紪鍙蜂负"' + ids + '"鐨勬暟鎹」锛�')
- .then(function() {
+ .then(function () {
return delDonorpayment(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
})
- .catch(() => {});
+ .catch(() => { });
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
@@ -451,9 +377,8 @@
this.$download.name(response.msg);
this.exportLoading = false;
})
- .catch(() => {});
- },
-
+ .catch(() => { });
+ }
}
};
</script>
--
Gitblit v1.9.3