From 733457daf115deb6088984c3c55dc5bcc906d28c Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期三, 09 八月 2023 23:53:58 +0800
Subject: [PATCH] yxh
---
src/views/project/fund/overheadcosts/index.vue | 499 +++++++++++++++++++++++++------------------------------
1 files changed, 228 insertions(+), 271 deletions(-)
diff --git a/src/views/project/fund/overheadcosts/index.vue b/src/views/project/fund/overheadcosts/index.vue
index 1ebc354..a070cfc 100644
--- a/src/views/project/fund/overheadcosts/index.vue
+++ b/src/views/project/fund/overheadcosts/index.vue
@@ -4,8 +4,8 @@
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="70px">
<el-row align="left">
<el-col :span="6">
- <el-form-item label="濮撳悕" prop="name">
- <el-input v-model="queryParams.name" placeholder="璇疯緭鍏ュ鍚�" clearable size="small"
+ <el-form-item label="缁忓姙浜�" prop="name">
+ <el-input v-model="queryParams.name" placeholder="璇疯緭鍏ョ粡鍔炰汉" clearable size="small"
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
@@ -28,18 +28,6 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['project:medicalfund:add']">鍒涘缓鐢宠鍗�</el-button>
</el-col>
-
- <el-col :span="9">
- <el-form-item label="鎹愮尞缂栧彿">
- <el-input v-model="curCase.donorno" :disabled="true"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="9">
- <el-form-item label="濮撳悕">
- <el-input v-model="curCase.name" :disabled="true"></el-input>
- </el-form-item>
- </el-col>
- <el-col> </el-col>
</el-row>
<el-row>
<el-table v-loading="loading" border :data="donateconsolationfundList">
@@ -195,7 +183,7 @@
</template>
</el-table-column>
- <el-table-column prop="beneficiaryno" align="center" label="濮撳悕" width="120" v-if="form.applytype != 3">
+ <el-table-column prop="beneficiaryno" align="center" label="濮撳悕" width="120" v-if="form.applytype=='1' || form.applytype=='2'">
<template slot-scope="scope">
<el-button type="primary" plain @click="ShowDetailDialog(scope, 'name')">{{ scope.row.beneficiaryname
}}</el-button>
@@ -536,7 +524,7 @@
data() {
//杩欓噷瀛樻斁鏁版嵁
return {
- currentApplyType: "3",
+ businesstype: "4",
// 閬僵灞�
loading: true,
// 瀵煎嚭閬僵灞�
@@ -582,10 +570,7 @@
},
//鎹愮尞妗堜緥鍒楄〃鏁版嵁
- // donationCaseTableData:[],
donatebaseinfoList: [],
- //褰撳墠閫変腑鎹愮尞妗堜緥
- curCase: {},
//鏄惁鏄剧ず璐圭敤鐢宠寮圭獥
dialogOpen: false,
// title: "",
@@ -801,37 +786,12 @@
this.resetForm("queryForm");
this.handleQuery();
},
- /** 鏌ヨ鎹愮尞浜洪亾鎱伴棶閲戝垪琛� */
- getList() {
- this.loading = true;
- this.queryParams.params = {};
- if (null != this.daterangeReporttime && "" != this.daterangeReporttime) {
- this.queryParams.params["beginReporttime"] =
- this.daterangeReporttime[0];
- this.queryParams.params["endReporttime"] = this.daterangeReporttime[1];
- }
- // this.queryParams.residencetown = this.$refs.areaSelect.getQu();
- listDonatebaseinfo(this.queryParams).then((response) => {
- this.donatebaseinfoList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
-
- getBaseInfoList() {
- this.loading = true;
- listDonatebaseinfo(this.queryParams).then((response) => {
- this.donatebaseinfoList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
this.$router.push({
- path: "/finance/funddetail/",
- query: { id: 0, pos: 2,routerparam:this.defaultperson }
+ path: "/finance/fundcontext/",
+ query: { id: 0, businessType: "4", operationtype: "add" }
});
this.istrue += 2;
@@ -852,17 +812,232 @@
this.title = "娣诲姞璐圭敤鐢宠";
this.dialogType = "edit";
},
+ /** 淇敼鎸夐挳鎿嶄綔 */
+ handleUpdate(row) {
+ this.$router.push({
+ path: "/finance/fundcontext/",
+ query: { id: row.id, businessType: "4", operationtype: "edit" }
+ });
-
- getfundList() {
- this.loading = true;
+ this.isopen = 0;
this.reset();
- this.fundQueryParam.infoid = this.curCase.id;
+ this.queryParams.params = {};
+ this.dialogType = "edit";
+ this.dialogOpen = true;
+ this.title = "淇敼璐圭敤鐢宠";
+
+
+ const id = row.id || this.ids;
+ getFund(id).then((response) => {
+ this.form = response.data;
+ //闄勪欢澶勭悊
+ this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
+
+ getownFundDetail(id).then(async (res) => {
+ this.fundDetails = res.data;
+ for (let m = 0; m < this.fundDetails.length; m++) {
+ this.fundDetails[m].itemArr = [];
+ this.getItemArr(m, this.fundDetails[m]);
+ }
+ });
+ });
+ },
+
+ /** 鏌ョ湅鎸夐挳鎿嶄綔 */
+ handleDetail(row) {
+ this.$router.push({
+ path: "/finance/fundcontext/",
+ query: { id: row.id, businessType: "4", operationtype: "detail" }
+ });
+
+ this.isopen = 0;
+ this.reset();
+ this.queryParams.params = {};
+ this.dialogOpen = true;
+ this.title = "鏌ョ湅璐圭敤鐢宠";
+ this.dialogType = "detail";
+ const id = row.id || this.ids;
+
+ getFund(id).then((response) => {
+ this.form = response.data;
+ let listFundflowparams = {
+ fundid: row.id,
+ fundtype: 4,
+ };
+ //闄勪欢澶勭悊
+ this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
+
+ listFundflow(listFundflowparams).then((res) => {
+ this.fundflowList = res.rows;
+ });
+ getownFundDetail(id).then((res) => {
+ this.fundDetails = res.data;
+ for (let m = 0; m < this.fundDetails.length; m++) {
+ this.fundDetails[m].itemArr = [];
+ this.getItemArr(m, this.fundDetails[m]);
+ this.fundDetails[m].fundblock = [];
+ this.fundDetails[m].fundblock.push({
+ expense: this.fundDetails[m].expense,
+ expensedescribe: this.fundDetails[m].servicesscopename,
+ remark: this.fundDetails[m].servicesscope,
+ servicesscope: this.fundDetails[m].servicesscope,
+ });
+ }
+ });
+ });
+ },
+
+ handleDelete(row) {
+ const ids = row.id || this.ids;
+ this.$modal
+ .confirm("鏄惁纭鍒犻櫎璇ヨ褰曪紵")
+ .then(function () {
+ return delFund(ids);
+ })
+ .then(() => {
+ getownFundDetail(ids).then((res) => {
+ let listdetails = res.data;
+ for (let i = 0; i < listdetails.length; i++) {
+ delFunddetail(listdetails[i].id);
+ }
+ });
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => { });
+ },
+
+ /** 鎻愪氦鎸夐挳 */
+ submitForm() {
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ let formData = this.form;
+ for (let k = 0; k < this.fundDetails.length; k++) {
+ let tempDetail = this.fundDetails[k];
+ if (tempDetail.itemid == null) {
+ this.$modal.msgWarning("璇烽�夋嫨鏈嶅姟椤圭洰");
+ return;
+ }
+ //鍒ゆ柇鍗曚綅 unitSel
+ // try {
+ // //鑾峰彇鏈嶅姟椤圭洰鏄庣粏
+ // let unitIndex = this.bankaccountlist.findIndex(
+ // (item) => tempDetail.unitno == item.reportNo
+ // );
+ // if (unitIndex > -1) {
+ // tempDetail.unitname = this.bankaccountlist[unitIndex].reportName;
+ // } else {
+ // tempDetail.unitname = tempDetail.unitno;
+ // }
+ // } catch {
+ // tempDetail.unitname = tempDetail.unitno;
+ // }
+ }
+ try {
+ this.form.unitname = this.$refs.orgSelecter.getOptionByValue(
+ this.form.unitno
+ ).organizationname;
+ } catch {
+ this.form.treatmenthospitalname = this.form.treatmenthospitalno;
+ }
+ this.loading = true;
+ //闄勪欢澶勭悊
+ let list = this.fileList;
+ if (list.length > 0) {
+ this.form.annexbankcard = list.map(item => item.url).join(",");
+ }
+
+ this.form.pretaxcost = parseFloat(this.form.amountrequested).toFixed(
+ 2
+ );
+
+ if (this.form.id != null) {
+ updateFund(this.form).then((response) => {
+ this.dialogOpen = false;
+ this.getList();
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ this.loading = false;
+ for (let m = 0; m < this.fundDetails.length; m++) {
+ let tempData = this.fundDetails[m];
+ let tempItemArr = tempData.itemArr;
+ tempData.fundid = formData.id;
+ //鑾峰彇鏈嶅姟椤圭洰鏄庣粏
+ let itemIndex = tempItemArr.findIndex(
+ (item) => tempData.itemid == item.id
+ );
+ if (itemIndex > -1) {
+ tempData.itemname = tempItemArr[itemIndex].itemName;
+ tempData.itemid = tempItemArr[itemIndex].id;
+ }
+ if (tempData.id > 0) {
+ updateFunddetail(tempData).then((response2) => { });
+ } else {
+ addFunddetail(tempData).then((response2) => { });
+ }
+ }
+ });
+ } else {
+ //淇濆瓨璐圭敤鐢宠
+ for (let m = 0; m < this.fundDetails.length; m++) {
+ let tempData = this.fundDetails[m];
+ let tempUtemArr = tempData.itemArr;
+
+ //鑾峰彇鏈嶅姟椤圭洰鏄庣粏
+ let itemIndex = tempUtemArr.findIndex(
+ (item) => tempData.itemid == item.id
+ );
+ if (itemIndex > -1) {
+ tempData.itemname = tempUtemArr[itemIndex].itemName;
+ tempData.itemid = tempUtemArr[itemIndex].id;
+ }
+ //鑾峰彇applytypename
+ let applytypeIndex = this.fundtypeArr.findIndex(
+ (item) => tempData.applytype == item.value
+ );
+ if (applytypeIndex > -1) {
+ tempData.applytypename = this.fundtypeArr[applytypeIndex].label;
+ }
+ this.fundDetails[m] = tempData;
+ }
+
+ this.form.serviceFunddetails = this.fundDetails;
+ addorupdateFund(this.form).then((response) => {
+ if (response.code === 200) {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.loading = false;
+ } else {
+ this.$modal.msgError("鏂板澶辫触锛�" + response.msg);
+ this.loading = false;
+ }
+ });
+
+ //鍏抽棴绐楀彛
+ this.loading = false;
+ this.dialogOpen = false;
+ this.getList();
+ }
+ }
+ });
+ },
+ /** 鏌ヨ鍒楄〃 */
+ getList() {
+ this.loading = true;
+ this.queryParams.params = {};
+ this.reset();
listFund(this.fundQueryParam).then((response) => {
this.loading = false;
this.donateconsolationfundList = response.rows;
});
},
+
+ getBaseInfoList() {
+ this.loading = true;
+ listDonatebaseinfo(this.queryParams).then((response) => {
+ this.donatebaseinfoList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
// 鍙栨秷鎸夐挳
cancel() {
@@ -988,124 +1163,6 @@
// });
},
- /** 鎻愪氦鎸夐挳 */
- submitForm() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- let formData = this.form;
- for (let k = 0; k < this.fundDetails.length; k++) {
- let tempDetail = this.fundDetails[k];
- if (tempDetail.itemid == null) {
- this.$modal.msgWarning("璇烽�夋嫨鏈嶅姟椤圭洰");
- return;
- }
- //鍒ゆ柇鍗曚綅 unitSel
- // try {
- // //鑾峰彇鏈嶅姟椤圭洰鏄庣粏
- // let unitIndex = this.bankaccountlist.findIndex(
- // (item) => tempDetail.unitno == item.reportNo
- // );
- // if (unitIndex > -1) {
- // tempDetail.unitname = this.bankaccountlist[unitIndex].reportName;
- // } else {
- // tempDetail.unitname = tempDetail.unitno;
- // }
- // } catch {
- // tempDetail.unitname = tempDetail.unitno;
- // }
- }
- try {
- this.form.unitname = this.$refs.orgSelecter.getOptionByValue(
- this.form.unitno
- ).organizationname;
- } catch {
- this.form.treatmenthospitalname = this.form.treatmenthospitalno;
- }
- this.loading = true;
- //闄勪欢澶勭悊
- let list = this.fileList;
- if (list.length > 0) {
- this.form.annexbankcard = list.map(item => item.url).join(",");
- }
-
- this.form.donorname = this.curCase.name;
- this.form.pretaxcost = parseFloat(this.form.amountrequested).toFixed(
- 2
- );
-
- if (this.form.id != null) {
- updateFund(this.form).then((response) => {
- this.getfundList();
-
- this.dialogOpen = false;
- this.getList();
- this.selectDonotor(this.curCase);
- this.$modal.msgSuccess("淇敼鎴愬姛");
- this.loading = false;
- for (let m = 0; m < this.fundDetails.length; m++) {
- let tempData = this.fundDetails[m];
- let tempItemArr = tempData.itemArr;
- tempData.fundid = formData.id;
- //鑾峰彇鏈嶅姟椤圭洰鏄庣粏
- let itemIndex = tempItemArr.findIndex(
- (item) => tempData.itemid == item.id
- );
- if (itemIndex > -1) {
- tempData.itemname = tempItemArr[itemIndex].itemName;
- tempData.itemid = tempItemArr[itemIndex].id;
- }
- if (tempData.id > 0) {
- updateFunddetail(tempData).then((response2) => { });
- } else {
- addFunddetail(tempData).then((response2) => { });
- }
- }
- });
- } else {
- //淇濆瓨璐圭敤鐢宠
- for (let m = 0; m < this.fundDetails.length; m++) {
- let tempData = this.fundDetails[m];
- let tempUtemArr = tempData.itemArr;
-
- //鑾峰彇鏈嶅姟椤圭洰鏄庣粏
- let itemIndex = tempUtemArr.findIndex(
- (item) => tempData.itemid == item.id
- );
- if (itemIndex > -1) {
- tempData.itemname = tempUtemArr[itemIndex].itemName;
- tempData.itemid = tempUtemArr[itemIndex].id;
- }
- //鑾峰彇applytypename
- let applytypeIndex = this.fundtypeArr.findIndex(
- (item) => tempData.applytype == item.value
- );
- if (applytypeIndex > -1) {
- tempData.applytypename = this.fundtypeArr[applytypeIndex].label;
- }
- this.fundDetails[m] = tempData;
- }
-
- this.form.serviceFunddetails = this.fundDetails;
- addorupdateFund(this.form).then((response) => {
- if (response.code === 200) {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- this.loading = false;
- } else {
- this.$modal.msgError("鏂板澶辫触锛�" + response.msg);
- this.loading = false;
- }
- });
-
- //鍏抽棴绐楀彛
- this.loading = false;
- this.dialogOpen = false;
- this.getList();
- }
-
-
- }
- });
- },
getBankAccount() {
//鑾峰彇閾惰璐﹀彿鍒楄〃锛岀被鍨嬫槸鏈烘瀯
@@ -1121,105 +1178,6 @@
});
},
- /** 淇敼鎸夐挳鎿嶄綔 */
- handleUpdate(row) {
- this.$router.push({
- path: "/finance/funddetail/",
- query: { id: row.id, pos: 2 }
- });
-
- this.isopen = 0;
- this.reset();
- this.queryParams.params = {};
- this.dialogType = "edit";
- this.dialogOpen = true;
- this.title = "淇敼璐圭敤鐢宠";
-
-
- const id = row.id || this.ids;
- getFund(id).then((response) => {
- this.form = response.data;
- this.form.name = this.curCase.name;
- //闄勪欢澶勭悊
- this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
-
- getownFundDetail(id).then(async (res) => {
- this.fundDetails = res.data;
- for (let m = 0; m < this.fundDetails.length; m++) {
- this.fundDetails[m].itemArr = [];
- this.getItemArr(m, this.fundDetails[m]);
- }
- });
- });
- },
-
- /** 鏌ョ湅鎸夐挳鎿嶄綔 */
- handleDetail(row) {
- this.$router.push({
- path: "/finance/funddetail/",
- query: { id: row.id, pos: 2 }
- });
-
- this.isopen = 0;
- this.reset();
- this.queryParams.params = {};
- this.form.donorno = this.curCase.donorno;
- this.form.infoid = this.curCase.id;
- this.dialogOpen = true;
- this.title = "鏌ョ湅璐圭敤鐢宠";
- this.dialogType = "detail";
- const id = row.id || this.ids;
-
- getFund(id).then((response) => {
- this.form = response.data;
- this.form.name = this.curCase.name;
- let listFundflowparams = {
- fundid: row.id,
- fundtype: 2,
- };
- //闄勪欢澶勭悊
- this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
-
- listFundflow(listFundflowparams).then((res) => {
- this.fundflowList = res.rows;
- });
- getownFundDetail(id).then((res) => {
- this.fundDetails = res.data;
- for (let m = 0; m < this.fundDetails.length; m++) {
- this.fundDetails[m].itemArr = [];
- this.getItemArr(m, this.fundDetails[m]);
- this.fundDetails[m].fundblock = [];
- this.fundDetails[m].fundblock.push({
- expense: this.fundDetails[m].expense,
- expensedescribe: this.fundDetails[m].servicesscopename,
- remark: this.fundDetails[m].servicesscope,
- servicesscope: this.fundDetails[m].servicesscope,
- });
- }
- });
- });
- },
-
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$modal
- .confirm("鏄惁纭鍒犻櫎璇ヨ褰曪紵")
- .then(function () {
- return delFund(ids);
- })
- .then(() => {
- getownFundDetail(ids).then((res) => {
- let listdetails = res.data;
- for (let i = 0; i < listdetails.length; i++) {
- delFunddetail(listdetails[i].id);
- }
- });
- // this.getList();
- this.getfundList();
- this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- })
- .catch(() => { });
- },
deleteRows(row, index, rows) {
this.$confirm("鏄惁纭鍒犻櫎?", "鎻愮ず", {
@@ -1295,7 +1253,7 @@
//鑾峰彇璐圭敤绫诲瀷
getCurFundType() {
- getFundTypeAll(this.currentApplyType).then((res) => {
+ getFundTypeAll(this.businesstype).then((res) => {
let dataList = res.data;
this.fundtypeArrAll = dataList;
this.fundtypeArr = [];
@@ -1499,12 +1457,11 @@
//鐢熷懡鍛ㄦ湡 - 鍒涘缓瀹屾垚锛堝彲浠ヨ闂綋鍓峵his瀹炰緥锛�
created() {
- this.getList();
this.getBaseInfoList();
-
this.getCurFundType();
this.getlistUser();
- // this.getUnitList();
+ this.getUnitList();
+ this.getList();
},
//鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛�
--
Gitblit v1.9.3