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 | 823 ++++++++++++++++++++++++++--------------------------------
1 files changed, 375 insertions(+), 448 deletions(-)
diff --git a/src/views/project/unitCost/index.vue b/src/views/project/unitCost/index.vue
index 4483273..11d4e41 100644
--- a/src/views/project/unitCost/index.vue
+++ b/src/views/project/unitCost/index.vue
@@ -1,463 +1,390 @@
<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-item>
- <el-form-item label="鏀舵骞村害" prop="donationcategory">
- <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>
- <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-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-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-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-col>
+ <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-item>
+ <el-form-item label="鏀舵骞村害" prop="donationcategory">
+ <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>
+ <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-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-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-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-col>
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
- </el-row>
-
- <el-table v-loading="loading" :data="donorchargeList" @selection-change="handleSelectionChange">
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column label="鐢宠鏃堕棿" align="center" prop="donatetime" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.donatetime, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鏀舵鍗曞彿" align="center" prop="donateno" />
- <el-table-column label="浠樻鍖婚櫌" align="center" prop="name" />
- <el-table-column label="鏀舵鐘舵��" align="center" prop="donationcategory" />
- <el-table-column label="搴旀敹閲戦" align="center" prop="donateorgan" />
- <el-table-column label="宸叉敹閲戦" align="center" prop="chargeamounted" />
- <el-table-column label="鏀舵鏃ユ湡" align="center" prop="chargeamount" />
- <el-table-column label="缁忓姙浜�" align="center" prop="agent" />
- <el-table-column label="鎿嶄綔" 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>
- </template>
- </el-table-column>
- </el-table>
-
- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
- @pagination="getList" />
-
- <!-- 娣诲姞鎴栦慨鏀规崘鐚渚嬪櫒瀹樺垪瀵硅瘽妗� -->
- <el-dialog :title="title" :visible.sync="open" append-to-body align="center" :close-on-click-modal="false"
- width="1200px">
- <el-form ref="form" :model="form" :rules="rules" label-width="100px">
- <el-row>
- <el-col :span="12"><el-form-item label="OPO缂栧彿" prop="donateno">
- <el-input v-model="form.donateno" placeholder="璇疯緭鍏PO缂栧彿" />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="濮撳悕" prop="name">
- <el-input v-model="form.name" placeholder="璇疯緭鍏ュ鍚�" />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="鎹愮尞鏃堕棿" prop="donatetime">
- <el-date-picker clearable size="small" v-model="form.donatetime" type="date" value-format="yyyy-MM-dd"
- style="width: 174px" placeholder="閫夋嫨鎹愮尞鏃堕棿">
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6"><el-form-item label="鍑虹敓骞存湀" prop="borthdate">
- <el-date-picker clearable size="small" v-model="form.borthdate" type="date" value-format="yyyy-MM-dd"
- style="width: 174px" placeholder="閫夋嫨鍑虹敓骞存湀">
- </el-date-picker>
- </el-form-item></el-col>
- <el-col :span="6"><el-form-item label="骞撮緞" prop="age">
- <el-input v-model="form.age" placeholder="璇疯緭鍏ュ勾榫�" />
- </el-form-item></el-col>
- <el-col :span="6"> <el-form-item label="鎬у埆" prop="sex">
- <el-select v-model="form.sex" placeholder="璇烽�夋嫨鎬у埆">
- <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" />
- </el-select>
- </el-form-item></el-col>
- <el-col :span="6"><el-form-item label="鎹愮尞绫诲埆" prop="donationcategory">
- <el-input v-model="form.donationcategory" placeholder="璇疯緭鍏ユ崘鐚被鍒�" />
- </el-form-item></el-col>
- </el-row>
- <el-row>
- <el-col :span="6"><el-form-item label="鎹愮尞妗堜緥ID" prop="infoid">
- <el-input v-model="form.infoid" placeholder="璇疯緭鍏ユ崘鐚渚婭D" />
- </el-form-item></el-col>
- <el-col :span="6"><el-form-item label="鎹愮尞鍣ㄥ畼" prop="donateorgan">
- <el-input v-model="form.donateorgan" placeholder="璇疯緭鍏ユ崘鐚殑鍣ㄥ畼" />
- </el-form-item></el-col>
- <el-col :span="6"><el-form-item label="搴旀敹璐圭敤" prop="chargeamount">
- <el-input v-model="form.chargeamount" placeholder="璇疯緭鍏ュ簲鏀惰垂鐢�" />
- </el-form-item></el-col>
- <el-col :span="6"><el-form-item label="宸叉敹璐圭敤" prop="chargeamounted">
- <el-input v-model="form.chargeamounted" placeholder="璇疯緭鍏ュ凡鏀惰垂鐢�" />
- </el-form-item></el-col>
- </el-row><el-row>
- <el-col :span="24"><el-form-item label="澶囨敞" prop="remark">
- <el-input v-model="form.remark" placeholder="璇疯緭鍏ュ娉�" />
- </el-form-item></el-col>
- </el-row>
- <el-row>
- <el-table :data="donorchargerogans" v-loading="loading" max-height="1200" border highlight-current-row>
- <el-table-column prop="orderno" align="center" label="搴忓彿" width="80">
- <template slot-scope="scope">
- <el-input v-model="scope.row.orderno" placeholder="搴忓彿" />
- </template>
- </el-table-column>
- <el-table-column prop="organno" align="center" label="鍣ㄥ畼缂栧彿" width="90">
- <template slot-scope="scope">
- <el-input v-model="scope.row.organno" placeholder="鍣ㄥ畼缂栧彿" />
- </template>
- </el-table-column>
- <el-table-column prop="organname" align="center" label="鍣ㄥ畼鍚嶇О" width="100">
- <template slot-scope="scope">
- <el-input v-model="scope.row.organname" placeholder="鍣ㄥ畼鍚嶇О" />
- </template>
- </el-table-column>
- <el-table-column prop="hospitalname" align="center" label="鎺ユ敹鍖婚櫌" width="200">
- <template slot-scope="scope">
- <el-input v-model="scope.row.hospitalname" placeholder="鎺ユ敹鍖婚櫌" />
- </template>
- </el-table-column>
- <el-table-column prop="amounttime" align="center" label="鎺ユ敹鏃堕棿" width="120">
- <template slot-scope="scope">
- <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.amounttime" type="date"
- value-format="yyyy-MM-dd HH:mm:ss" placeholder="鎺ユ敹鏃堕棿">
- </el-date-picker> </template>
- </el-table-column>
- <el-table-column prop="amount" align="center" label="宸叉敹璐圭敤" width="120">
- <template slot-scope="scope">
- <el-input v-model="scope.row.amount" placeholder="宸叉敹璐圭敤" />
- </template>
- </el-table-column>
- <el-table-column prop="amounttime" align="center" label="鏀舵鏃堕棿" width="120">
- <template slot-scope="scope">
- <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.amounttime" type="date"
- value-format="yyyy-MM-dd HH:mm:ss" placeholder="鏀舵鏃堕棿" @blur="getdays(scope.row)">
- </el-date-picker> </template>
- </el-table-column>
- <el-table-column prop="organcharge" align="center" label="鏍囧噯璐圭敤" width="120">
- <template slot-scope="scope">
- <el-input v-model="scope.row.organcharge" placeholder="宸叉敹璐圭敤" />
- </template>
- </el-table-column>
- <el-table-column prop="remark" align="center" label="澶囨敞">
- <template slot-scope="scope">
- <el-input v-model="scope.row.remark" placeholder="澶囨敞" />
- </template>
- </el-table-column>
- </el-table>
- </el-row>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
- <el-button @click="cancel">鍙� 娑�</el-button>
- </div>
- </el-dialog>
-
- <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-row>
- <el-form-item label="鎹愮尞鑰呭悕瀛楋細" prop="donorname" label-width="120px">
- <el-select v-model="selectionForm.donorid" filterable reserve-keyword default-first-option
- placeholder="璇疯緭鍏ユ崘鐚�呯殑濮撳悕" style="width: 100%">
- <el-option v-for="item in donorlist" :key="item.donorid" :label="item.donorname" :value="item.donorid">
- </el-option>
- </el-select>
- </el-form-item>
- </el-row>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="showSelectionDialog = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="confirmSelection()">纭� 瀹�</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
-
- <script>
- import { listDonatebaseinfo } from "@/api/project/donatebaseinfo";
- import { listDonorcharge, getDonorcharge, delDonorcharge, addDonorcharge, updateDonorcharge, exportDonorcharge, listDonorchargeorgan, delDonorchargeorgan, addDonorchargeorgan, updateDonorchargeorgan, exportDonorchargeorgan } from "@/api/project/donorcharge";
- export default {
- name: "Donorcharge",
- data() {
- return {
- // 閬僵灞�
- loading: true,
- // 瀵煎嚭閬僵灞�
- exportLoading: false,
- // 閫変腑鏁扮粍
- ids: [],
- // 闈炲崟涓鐢�
- single: true,
- // 闈炲涓鐢�
- multiple: true,
- // 鏄剧ず鎼滅储鏉′欢
- showSearch: true,
- // 鎬绘潯鏁�
- total: 0,
- //褰撳墠妗堜緥id
- curInfoId: 0,
- // 鎹愮尞妗堜緥鍣ㄥ畼鍒楄〃鏍兼暟鎹�
- donorchargeList: [],
- donorchargerogans: [],
- //鎹愮尞妗堜緥閫夋嫨
- showSelectionDialog: false,
- donorlist: [],
- donorinfolist: [],
- selectionForm: {
- index: null,
- donorid: null,
- donorname: null
- },
- loadingdonorlist: false,
-
- // 寮瑰嚭灞傛爣棰�
- title: "",
- // 鏄惁鏄剧ず寮瑰嚭灞�
- open: false,
- // 鏌ヨ璐圭敤琛ㄥ弬鏁�
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- infoid: null,
- name: null,
- donationcategory: null,
- donateorgan: null,
- chargeamounted: null,
- },
- //鏌ヨ妗堜緥鍙傛暟
- donorParams: {
- pageNum: 1,
- pageSize: 1000,
- },
- // 鏌ヨ璐圭敤鍣ㄥ畼琛ㄥ弬鏁�
- organParams: {
- pageNum: 1,
- pageSize: 10,
- donorchargeid: null,
- },
- // 琛ㄥ崟鍙傛暟
- form: {},
- // 琛ㄥ崟鏍¢獙
- rules: {
+ <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">
+ <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="paystatus">
+ <template slot-scope="scope">
+ <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="鏀舵鏃ユ湡" 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="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" />
+
+ <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.itemid" />
+ </el-form-item>
+ </el-row>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="showSelectionDialog = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="confirmSelection()">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import { listDonatebaseinfo } from "@/api/project/donatebaseinfo";
+import {
+ listDonorcharge,
+ getDonorcharge,
+ delDonorpayment,
+ addDonorcharge,
+ updateDonorcharge,
+ exportDonorcharge,
+ 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: ["Collection_status"],
+ components: {
+ OrgSelecter
+ },
+ data() {
+ return {
+ // 閬僵灞�
+ loading: true,
+ // 瀵煎嚭閬僵灞�
+ exportLoading: false,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 鎬绘潯鏁�
+ total: 0,
+ //褰撳墠妗堜緥id
+ curInfoId: 0,
+ // 鎹愮尞妗堜緥鍣ㄥ畼鍒楄〃鏍兼暟鎹�
+ donorchargeList: [],
+ donorchargerogans: [],
+
+ //鎹愮尞妗堜緥閫夋嫨
+ showSelectionDialog: false,
+ donorlist: [],
+ donorinfolist: [],
+ selectionForm: {
+ index: null,
+ itemid: null,
+ itemname: null
+ },
+ loadingdonorlist: false,
+
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ // 鏌ヨ璐圭敤琛ㄥ弬鏁�
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ infoid: null,
+ name: null,
+ donationcategory: null,
+ donateorgan: null,
+ chargeamounted: null
+ },
+ //鏌ヨ妗堜緥鍙傛暟
+ donorParams: {
+ pageNum: 1,
+ pageSize: 1000
+ },
+ // 鏌ヨ璐圭敤鍣ㄥ畼琛ㄥ弬鏁�
+ organParams: {
+ pageNum: 1,
+ pageSize: 10,
+ donorchargeid: null
+ },
+ headers: {
+ Authorization: "Bearer " + getToken()
+ },
+ // 琛ㄥ崟鍙傛暟
+ form: {},
+ // 琛ㄥ崟鏍¢獙
+ rules: {}
+ };
+ },
+ created() {
+ this.getList();
+ },
+
+ methods: {
+ //涓撳/鍖荤枟鏈烘瀯/璐圭敤鎶ラ攢鏈烘瀯閫夋嫨
+ confirmSelection() {
+ var curdonorinfo = null;
+ console.log(this.selectionForm.itemid, "itemid");
+ //浠庢渚嬪垪琛ㄨ幏鍙栦俊鎭�
+ this.donorinfolist.map(item => {
+ if (this.selectionForm.itemid == item.id) {
+ curdonorinfo = item;
}
- };
+ });
+ let searchData = {
+ organizationid: this.selectionForm.itemid //浼犲叆鐨勭被鍨�
+ }; //鎼滅储鏉′欢
+ listOrganization(searchData).then(res => {
+ if (res.code == 200) {
+ curdonorinfo = res.rows[0];
+ this.$router.push({
+ path: "/cost/particulars",
+ query: { id: 0, operation: "add", data: curdonorinfo }
+ });
+ } else {
+ this.$message.error(res.msg);
+ }
+ });
+ this.showSelectionDialog = false;
},
- created() {
+
+ /** 鏌ヨ鎹愮尞妗堜緥鍣ㄥ畼鍒楀垪琛� */
+ getList() {
+ this.loading = true;
+ listDonorpayment(this.queryParams).then(response => {
+ this.donorchargeList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+
+ // 琛ㄥ崟閲嶇疆
+ reset() {
+ this.form = {
+ id: null,
+ infoid: null,
+ donateno: null,
+ donatetime: null,
+ name: null,
+ borthdate: null,
+ sex: null,
+ age: null,
+ donationcategory: null,
+ donateorgan: null,
+ chargeamount: null,
+ chargeamounted: null,
+ remark: null,
+ delFlag: null,
+ createBy: null,
+ createTime: null,
+ updateBy: null,
+ updateTime: null
+ };
+ this.resetForm("form");
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
this.getList();
},
-
- methods: {
- //涓撳/鍖荤枟鏈烘瀯/璐圭敤鎶ラ攢鏈烘瀯閫夋嫨
- confirmSelection() {
- var curdonorinfo = null;
- //浠庢渚嬪垪琛ㄨ幏鍙栦俊鎭�
- this.donorinfolist.map(item => {
- if (this.selectionForm.donorid == item.id) {
- curdonorinfo = item;
- }
- });
- this.showSelectionDialog = false;
- this.$router.push({
- path: "/cost/particulars",
- query: { id: 0, operation: "add", data: curdonorinfo }
- });
- },
-
- /** 鏌ヨ鎹愮尞妗堜緥鍣ㄥ畼鍒楀垪琛� */
- getList() {
- this.loading = true;
- listDonorcharge(this.queryParams).then(response => {
- this.donorchargeList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
-
- // 鍙栨秷鎸夐挳
- cancel() {
- this.open = false;
- this.reset();
- },
- // 琛ㄥ崟閲嶇疆
- reset() {
- this.form = {
- id: null,
- infoid: null,
- donateno: null,
- donatetime: null,
- name: null,
- borthdate: null,
- sex: null,
- age: null,
- donationcategory: null,
- donateorgan: null,
- chargeamount: null,
- chargeamounted: null,
- remark: null,
- delFlag: null,
- createBy: null,
- createTime: null,
- updateBy: null,
- updateTime: null
- };
- this.resetForm("form");
- },
- /** 鎼滅储鎸夐挳鎿嶄綔 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 閲嶇疆鎸夐挳鎿嶄綔 */
- resetQuery() {
- this.resetForm("queryForm");
- this.handleQuery();
- },
- // 澶氶�夋閫変腑鏁版嵁
- handleSelectionChange(selection) {
- this.ids = selection.map(item => item.id)
- this.single = selection.length !== 1
- this.multiple = !selection.length
- },
- /** 鏂板鎸夐挳鎿嶄綔 */
- handleAdd() {
- this.selectionForm.index = null;
- this.selectionForm.donorid = null;
- this.selectionForm.donorname = null;
-
- if (this.donorlist[0]) {
- this.showSelectionDialog = true;
- }
- else {
- //鑾峰彇鎹愮尞妗堜緥鍒楄〃
- if (this.donorlist.length > 0) { }
- else {
- this.loading = true;
- listDonatebaseinfo(this.donorParams).then(res => {
- // this.donorinfolist = res.rows;
- res.rows.forEach(item => {
- if (item.workflow >= 6) {
- this.donorinfolist.push(item);
- }
- });
-
- this.donorinfolist.forEach(item1 => {
- this.donorlist.push({
- donorid: item1.id,
- donorname: item1.name
- });
- });
- console.log(this.donorinfolist,' this.donorinfolist');
- this.loading = false;
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.resetForm("queryForm");
+ this.handleQuery();
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ this.ids = selection.map(item => item.id);
+ this.single = selection.length !== 1;
+ this.multiple = !selection.length;
+ },
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ this.selectionForm.index = null;
+ this.selectionForm.itemid = null;
+ this.selectionForm.itemname = null;
+
+ if (this.donorlist[0]) {
+ this.showSelectionDialog = true;
+ } else {
+ //鑾峰彇鎹愮尞妗堜緥鍒楄〃
+ if (this.donorlist.length > 0) {
+ } else {
+ this.loading = true;
+ listDonatebaseinfo(this.donorParams).then(res => {
+ // this.donorinfolist = res.rows;
+ res.rows.forEach(item => {
+ if (item.workflow >= 6) {
+ this.donorinfolist.push(item);
+ }
});
- }
-
- this.showSelectionDialog = true;
- };
-
- /**
- this.reset();
- this.open = true;
- this.title = "鎹愮尞妗堜緥鍣ㄥ畼璐圭敤鎯呭喌";
- this.donorchargerogans = [];
- */
- },
-
- /** 淇敼鎸夐挳鎿嶄綔 */
- handleUpdate(row) {
- this.$router.push({
- path: "/cost/particulars",
- query: { id: row.id, operation: "update", data: row }
- });
- },
-
- /** 璇︽儏鏌ョ湅鎸夐挳鎿嶄綔 */
- handleDetail(row) {
- this.$router.push({
- path: "/cost/particulars",
- query: { id: row.id, operation: "detail", data: row }
- });
- },
-
- /** 鍒犻櫎鎸夐挳鎿嶄綔 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$modal.confirm('鏄惁纭鍒犻櫎鎹愮尞妗堜緥鍣ㄥ畼鍒楃紪鍙蜂负"' + ids + '"鐨勬暟鎹」锛�').then(function () {
- return delDonorcharge(ids);
- }).then(() => {
+
+ this.donorinfolist.forEach(item1 => {
+ this.donorlist.push({
+ itemid: item1.id,
+ itemname: item1.name
+ });
+ });
+ console.log(this.donorinfolist, " this.donorinfolist");
+ this.loading = false;
+ });
+ }
+
+ this.showSelectionDialog = true;
+ }
+ },
+
+ /** 淇敼鎸夐挳鎿嶄綔 */
+ handleUpdate(row) {
+ this.$router.push({
+ path: "/cost/particulars",
+ query: { id: row.id, operation: "update", data: row }
+ });
+ },
+
+ /** 璇︽儏鏌ョ湅鎸夐挳鎿嶄綔 */
+ handleDetail(row) {
+ this.$router.push({
+ path: "/cost/particulars",
+ 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 () {
+ return delDonorpayment(ids);
+ })
+ .then(() => {
this.getList();
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => { });
- },
-
- /** 瀵煎嚭鎸夐挳鎿嶄綔 */
- handleExport() {
- const queryParams = this.queryParams;
- this.$modal.confirm('鏄惁纭瀵煎嚭鎵�鏈夋崘鐚渚嬪櫒瀹樺垪鏁版嵁椤癸紵').then(() => {
+ })
+ .catch(() => { });
+ },
+
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ const queryParams = this.queryParams;
+ this.$modal
+ .confirm("鏄惁纭瀵煎嚭鎵�鏈夋崘鐚渚嬪櫒瀹樺垪鏁版嵁椤癸紵")
+ .then(() => {
this.exportLoading = true;
return exportDonorcharge(queryParams);
- }).then(response => {
+ })
+ .then(response => {
this.$download.name(response.msg);
this.exportLoading = false;
- }).catch(() => { });
- },
-
- /** 鎻愪氦鎸夐挳 */
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- if (this.form.id != null) {
- updateDonorcharge(this.form).then(response => {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- });
- } else {
- addDonorcharge(this.form).then(response => {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
+ })
+ .catch(() => { });
}
- };
- </script>
- <style scoped>
- /* @import url(); 寮曞叆鍏叡css绫� */
- .button-delete{
- color: rgb(236, 69, 69);
}
- </style>
\ No newline at end of file
+};
+</script>
+<style scoped>
+/* @import url(); 寮曞叆鍏叡css绫� */
+.button-delete {
+ color: rgb(236, 69, 69);
+}
+</style>
--
Gitblit v1.9.3