From 7a46adff3aae94ca4dabc24d9c4921a752d3a827 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 30 七月 2023 23:54:11 +0800
Subject: [PATCH] yxh
---
src/views/project/fund/expertFeeFundApply/index.vue | 882 +++++++++++++++++++++--------------------
vue.config.js | 2
src/views/project/travelexpenseslist/index.vue | 12
src/layout/components/Navbar.vue | 24
src/views/project/travelexpenseslist/Modifydetails/index.vue | 193 +++++---
src/views/project/fund/medicalCostFundApply/index.vue | 133 +++--
6 files changed, 666 insertions(+), 580 deletions(-)
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 9cbc66b..166cfcd 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -113,20 +113,20 @@
};
},
mounted() {
- this.returs();
+ // this.returs();
},
methods: {
- async returs() {
- await listSystemmessageCount()
- .then((res) => {
- this.badgeVal = res.data;
-
- if (this.badgeVal > 0) {
- this.isBadgeHidden = false;
- }
- })
- .catch((error) => {});
- },
+// async returs() {
+// await listSystemmessageCount()
+// .then((res) => {
+// this.badgeVal = res.data;
+// console.log('璺�');
+// if (this.badgeVal > 0) {
+// this.isBadgeHidden = false;
+// }
+// })
+// .catch((error) => {});
+// },
clickMessage() {
this.$router.push({
path: "/message",
diff --git a/src/views/project/fund/expertFeeFundApply/index.vue b/src/views/project/fund/expertFeeFundApply/index.vue
index ab81308..3ece74b 100644
--- a/src/views/project/fund/expertFeeFundApply/index.vue
+++ b/src/views/project/fund/expertFeeFundApply/index.vue
@@ -96,10 +96,10 @@
<template slot-scope="scope">
<el-button v-if="scope.row.recordstatus == -1 ||
scope.row.recordstatus == 1
- " size="mini" type="text" icon="el-icon-edit" @click="handleup(scope.row)">涓婃姤</el-button>
+ " size="mini" type="text" icon="el-icon-edit" @click="(scope.row)">涓婃姤</el-button>
<el-button v-if="scope.row.recordstatus == -1 ||
scope.row.recordstatus == 1
- " size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">淇敼</el-button>
+ " size="mini" type="text" icon="el-icon-edit" @click="date(scope.row)">淇敼</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)">鏌ョ湅</el-button>
<!-- v-hasPermi="['project:expretfund:edit']" -->
<el-button v-if="scope.row.recordstatus == -1 ||
@@ -409,7 +409,7 @@
<el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileList" multiple
:limit="20" :headers="headers" :on-success="(response, file, fileList) =>
uploadSccess(response, file, fileList)
- " :on-preview="downFile" :disabled='dialogType == "detail"' :on-error="handleUploadError"
+ " :on-preview="downFile" :disabled='dialogType == "detail"' :on-error="loadError"
:on-exceed="handleExceed" :on-remove="remove" accept="image/*,.pdf">
<el-button :disabled='dialogType == "detail"' size="small" type="primary">涓婁紶</el-button>
</el-upload>
@@ -622,7 +622,6 @@
data() {
//杩欓噷瀛樻斁鏁版嵁
return {
-
// 閬僵灞�
loading: true,
// 瀵煎嚭閬僵灞�
@@ -801,6 +800,440 @@
// },
//鏂规硶闆嗗悎
methods: {
+ //鐢熷懡鍛ㄦ湡 - 鍒涘缓瀹屾垚锛堝彲浠ヨ闂綋鍓峵his瀹炰緥锛�
+ created() {
+ this.getUnitList();
+ this.getList();
+ this.getBaseInfoList();
+ this.getlistUser();
+ this.getCurFundType();
+ },
+ //鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛�
+ mounted() {
+ this.selectReporters();
+ this.getUsermsg();
+ this.getlistExternalperson();
+ },
+ beforeCreate() { }, //鐢熷懡鍛ㄦ湡 - 鍒涘缓涔嬪墠
+ beforeMount() { }, //鐢熷懡鍛ㄦ湡 - 鎸傝浇涔嬪墠
+ beforeUpdate() { }, //鐢熷懡鍛ㄦ湡 - 鏇存柊涔嬪墠
+ updated() { }, //鐢熷懡鍛ㄦ湡 - 鏇存柊涔嬪悗
+ beforeDestroy() { }, //鐢熷懡鍛ㄦ湡 - 閿�姣佷箣鍓�
+ destroyed() { }, //鐢熷懡鍛ㄦ湡 - 閿�姣佸畬鎴�
+ activated() { }, //濡傛灉椤甸潰鏈塳eep-alive缂撳瓨鍔熻兘锛岃繖涓嚱鏁颁細瑙﹀彂
+
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.daterangeReporttime = [];
+ this.resetForm("queryForm");
+ this.handleQuery();
+ },
+
+ /** 涓嬭浇鏂囦欢鎸夐挳鎿嶄綔 */
+ downFile(item) {
+ const url = process.env.VUE_APP_BASE_API + item.url
+ var a = document.createElement('a');
+ var event = new MouseEvent('click');
+ a.download = item.name;
+ a.href = url;
+ a.dispatchEvent(event);
+ },
+
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ if (this.curCase.id) {
+ this.istrue += 2;
+ this.reset();
+ this.queryParams.params = {};
+ this.form.donorno = this.curCase.donorno;
+ this.form.name = this.curCase.name;
+ this.form.infoid = this.curCase.id;
+ this.form.username = this.defaultperson.nickName;
+ this.form.userno = this.defaultperson.userName;
+ // this.form.phone = this.defaultperson.phone;
+
+ this.form.deptmentname = this.defaultperson.dept.deptName;
+ this.form.deptmentno = this.defaultperson.dept.deptId;
+ this.form.managername = this.defaultperson.dept.leader;
+ // this.form.createTime = nowdate;
+ //this.open = true;
+ //this.initFundApplyForm();
+ this.fundDetails = [];
+ this.addRow();
+ this.dialogOpen = true;
+ this.dialogType = "edit";
+ this.title = "璐圭敤鐢宠";
+ } else {
+ const h = this.$createElement;
+ this.$message({
+ message: h("p", null, [h("span", null, "璇峰厛閫夋嫨宸︽柟鎹愮尞妗堜緥 ")]),
+ });
+ }
+ },
+
+ /** 淇敼鎸夐挳鎿嶄綔 */
+ handleUpdate(row) {
+ 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 = "edit";
+
+ const id = row.id || this.ids;
+ getFund(id).then((response) => {
+ this.form = response.data;
+ // this.form.recordstate =-1;
+ // this.form.recordstatus = response.data.recordstatus + "";
+ this.form.name = this.curCase.name;
+ //闄勪欢澶勭悊
+ this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
+ 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].rowfeeblocks = [];
+
+ this.fundDetails[m].rowfeeblocks.push({
+ servicesscope: this.fundDetails[m].servicesscope,
+ expensedescribe: this.fundDetails[m].servicesscopename,
+ expense: this.fundDetails[m].expense,
+ remark: this.fundDetails[m].servicesscopename,
+ });
+ // getdetailsByItemId(this.fundDetails[m].itemid).then((res) => {
+ // let fundmsg = res.data;
+ // fundmsg.forEach((item) => {
+ // this.fundDetails[m].rowfeeblocks.push({
+ // servicesscope: item.id,
+ // expensedescribe: item.expensedescribe,
+ // expense: item.expense,
+ // remark: item.expensedescribe,
+ // });
+ // });
+ // });
+ }
+
+ if (this.fundDetails.length == 0) {
+ this.addRow();
+ }
+ });
+ });
+ },
+
+ /** 鏌ョ湅鎸夐挳鎿嶄綔 */
+ handleDetail(row) {
+ 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].rowfeeblocks = [];
+ this.fundDetails[m].rowfeeblocks.push({
+ expense: this.fundDetails[m].expense,
+ expensedescribe: this.fundDetails[m].servicesscopename,
+ remark: this.fundDetails[m].servicesscope,
+ servicesscope: this.fundDetails[m].servicesscope,
+ });
+ }
+
+ if (this.fundDetails.length == 0) {
+ this.addRow();
+ }
+ });
+ });
+ },
+
+ 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(() => { });
+ },
+
+ /** 涓婃姤鎸夐挳鎿嶄綔 */
+ handleup(row) {
+ this.$confirm("鏄惁纭灏嗙櫥璁拌褰曚笂鎶ワ紵", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ //鏌ユ壘鏄惁瀛樺湪鐧昏瀹屾垚璁板綍
+ //鍒ゆ柇鏄惁瀛樺湪涓婃姤璁板綍
+ row.recordstatus = 0;
+
+ updateFund(row).then((response) => {
+ if (response.code == 200) {
+ this.$message({
+ type: "success",
+ message: "鐢宠鎴愬姛",
+ });
+ } else {
+ this.$message({
+ type: "error",
+ message: "鐢宠澶辫触",
+ });
+ }
+ this.loading = false;
+ });
+ })
+ .catch(() => {
+ this.$message({
+ type: "info",
+ message: "宸插彇娑堢敵璇�",
+ });
+ });
+ },
+
+ /** 鎻愪氦鎸夐挳 */
+ submitForm() {
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ this.formData = this.form;
+ // let totalPreTaxAmount = 0.0;
+ // let totalAfterTaxAmount = 0.0;
+ // let totalAmount = 0.0;
+
+ //淇濆瓨鍓嶆牎楠屾暟鎹�
+ for (let k = 0; k < this.fundDetails.length; k++) {
+ let tempDetail = this.fundDetails[k];
+ if (tempDetail.itemid == null) {
+ this.$modal.msgWarning("鏈嶅姟椤圭洰琛ㄤ腑锛岀" + (k + 1).toString() + "琛岀殑鏈嶅姟椤圭洰鏈�夋嫨锛岃鍏堥�夋嫨鏈嶅姟椤圭洰鍚庡啀鎻愪氦淇濆瓨锛�");
+ return;
+ }
+
+ if (tempDetail.servicesscope == null) {
+ this.$modal.msgWarning("鏈嶅姟椤圭洰琛ㄤ腑锛岀" + (k + 1).toString() + "琛岀殑璐圭敤璇存槑鏈�夋嫨,璇烽�夋嫨璐圭敤璇存槑鍚庡啀鎻愪氦淇濆瓨锛�");
+ return;
+ }
+
+ if (tempDetail.beneficiaryno == null) {
+ this.$modal.msgWarning("鏈嶅姟椤圭洰琛ㄤ腑锛岀" + (k + 1).toString() + "琛岀殑鏈嶅姟浜哄憳濮撳悕涓洪�夋嫨,璇烽�夋嫨浜哄憳鍚庡啀鎻愪氦淇濆瓨锛�");
+ return;
+ }
+
+ // //鍒ゆ柇鍗曚綅 unitSel
+ // try {
+ // let unitIndex = this.unitList.findIndex(
+ // (item) => tempDetail.unitno == item.organizationid
+ // );
+ // if (unitIndex > -1) {
+ // tempDetail.unitname = this.unitList[unitIndex].organizationname;
+ // } else {
+ // tempDetail.unitname = tempDetail.unitno;
+ // }
+ // } catch {
+ // tempDetail.unitname = tempDetail.unitno;
+ // }
+ }
+
+ //闄勪欢澶勭悊
+ let list = this.fileList;
+ if (list.length > 0) {
+ this.form.annexfiles = list.map(item => item.url).join(",");
+ }
+
+ //澶勭悊鏄庣粏
+ for (let i = 0; i < this.fundDetails.length; i++) {
+ let tempDetail = this.fundDetails[i];
+ //鑾峰彇鏈嶅姟椤圭洰鏄庣粏
+ let tempItemArr = tempDetail.itemArr;
+ let itemIndex = tempItemArr.findIndex(
+ (item) => tempDetail.itemid == item.id
+ );
+ if (itemIndex > -1) {
+ tempDetail.itemname = tempItemArr[itemIndex].itemName;
+ tempDetail.itemid = tempItemArr[itemIndex].id;
+ }
+
+ //鑾峰彇applytypename銆佹湇鍔¤垂鐢ㄥぇ绫�
+ let applytypeIndex = this.rowfeeItemTypes.findIndex(
+ (item) => tempDetail.applytype == item.value
+ );
+ if (applytypeIndex > -1) {
+ tempDetail.applytypename = this.rowfeeItemTypes[applytypeIndex].label;
+ tempDetail.subjecttype = this.rowfeeItemTypes[applytypeIndex].subjecttype;
+ tempDetail.subjecttypename = this.rowfeeItemTypes[applytypeIndex].subjecttypename;
+ }
+ this.fundDetails[i] = tempDetail;
+ /*
+ //璁$畻涓◣
+ //if (isNaN(parseFloat(tempDetail.taxedamount)))
+ //鑾峰彇鍙傛暟
+ this.taxParam.beneficiaryNo = tempDetail.beneficiaryno;
+ this.taxParam.startTime = this.form.createTime.substring(0, 10);
+ // 璁$畻绋庡悗閲戦
+ if (tempDetail.taxedamount == undefined || tempDetail.taxedamount == null || tempDetail.taxedamount == 0 || tempDetail.taxedamount == '') {
+ //鑾峰彇鍙傛暟
+ this.taxParam.money = tempDetail.amount.toString();
+ getTaxByBeneFiciaryNo(this.taxParam).then((res) => {
+ if (res.code == 200) {
+ tempDetail.taxamount = res.data;
+ tempDetail.taxedamount = tempDetail.amount - tempDetail.taxamount;
+ this.fundDetails[k] = tempDetail;
+
+ this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount);
+ this.totalAmount += parseFloat(tempDetail.amount);
+ }
+ });
+ }
+
+ // 璁$畻绋庡墠閲戦
+ if (tempDetail.amount == undefined || tempDetail.amount == null || tempDetail.amount == 0 || tempDetail.amount == '') {
+ //鑾峰彇鍙傛暟
+ this.taxParam.money = tempDetail.taxedamount.toString();
+ getTaxBeforeByAfterMoney(this.taxParam).then((res) => {
+ if (res.code == 200) {
+ tempDetail.taxamount = res.data.nowTax;
+ tempDetail.amount = parseFloat(res.data.nowTaxBeforeMoney);
+ this.fundDetails[k] = tempDetail;
+
+ this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount);
+ this.totalAmount += parseFloat(tempDetail.amount);
+ console.log("1", this.amount);
+ }
+ });
+ }
+ */
+ }
+ //璐圭敤鍚堣
+ // this.form.pretaxcost = parseFloat(this.totalPreTaxAmount).toFixed(2);
+ // this.form.taxedcost = parseFloat(this.totalAfterTaxAmount).toFixed(2);
+ // this.form.amountrequested = this.totalAmount.toFixed(2);
+
+ //淇濆瓨鏁版嵁
+ this.loading = true;
+ this.form.serviceFunddetails = 0;
+ this.fundDetails.map((item) => {
+ this.form.serviceFunddetails += item.amount;
+ });
+ this.form.serviceFunddetails = this.fundDetails;
+
+ if (this.form.id != null) {
+ //鎹愮尞鑰�
+ this.form.donorname = this.curCase.name;
+ }
+ else {
+ this.form.recordstatus = -1;
+ }
+
+ batchUploadFund(this.form).then((response) => {
+ if (response.code === 200) {
+ this.$modal.msgSuccess("涓撳鍔冲姟璐逛繚瀛樻垚鍔燂紒");
+ this.selectDonotor(this.curCase);
+ } else {
+ this.$modal.msgError("涓撳鍔冲姟璐逛繚瀛樺け璐ワ細" + response.msg);
+ }
+ });
+
+ //鍏抽棴绐楀彛
+ this.loading = false;
+ this.dialogOpen = false;
+ }
+ });
+ },
+
+ // 鍙栨秷鎸夐挳
+ cancel() {
+ this.dialogOpen = false;
+ this.reset();
+ },
+
+ // 琛ㄥ崟閲嶇疆
+ reset() {
+ this.form = {
+ recordstate: -1,
+ userno: null,
+ username: null,
+ id: null,
+ infoid: null,
+ donorno: null,
+ delFlag: null,
+ createBy: null,
+ createTime: null,
+ updateBy: null,
+ updateTime: null,
+ familyrelations: null,
+ name: null,
+ remark: null,
+ doname: null,
+ unitname: null,
+ unitno: null,
+ sex: null,
+ idcardtype: null,
+ idcardno: null,
+ phone: null,
+ donorname: null,
+ depositbank: null,
+ bankprovince: null,
+ bankprovincename: null,
+ bankcity: null,
+ bankcityname: null,
+ banktown: null,
+ banktownname: null,
+ branchbankname: null,
+ bankcardno: null,
+ annexbankcard: null,
+ annexregistform: null,
+ consolationmoney: null,
+ applytype: "1",
+ servicetypename: null,
+ servicesscope: null,
+ servicesscopename: null,
+ };
+ this.resetForm("form");
+ //娓呯┖闄勪欢
+ this.fileList = []
+ },
+
ShowDetailDialog(spoce, showType) {
this.expertfrom = "1";
this.funddetailForm.index = spoce.$index;
@@ -928,44 +1361,11 @@
this.showDetailInfoDialog = false;
},
- handleup(row) {
- this.$confirm("鏄惁纭灏嗙櫥璁拌褰曚笂鎶ワ紵", "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
- .then(() => {
- //鏌ユ壘鏄惁瀛樺湪鐧昏瀹屾垚璁板綍
- //鍒ゆ柇鏄惁瀛樺湪涓婃姤璁板綍
- row.recordstatus = 0;
-
- updateFund(row).then((response) => {
- if (response.code == 200) {
- this.$message({
- type: "success",
- message: "鐢宠鎴愬姛",
- });
- } else {
- this.$message({
- type: "error",
- message: "鐢宠澶辫触",
- });
- }
- this.loading = false;
- });
- })
- .catch(() => {
- this.$message({
- type: "info",
- message: "宸插彇娑堢敵璇�",
- });
- });
- },
-
//鑾峰彇褰撳墠鐢ㄦ埛淇℃伅
getUsermsg() {
getUserProfile().then((response) => {
this.defaultperson = response.data;
+ console.log("this.defaultperson", this.defaultperson);
this.standardlevel = response.data.standardlevel;
if (this.defaultperson.createBy == "admin" || this.defaultperson.createBy == "001" || this.defaultperson.createBy == "002") {
this.ismanager = true;
@@ -1043,17 +1443,6 @@
});
},
- /** 鎼滅储鎸夐挳鎿嶄綔 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 閲嶇疆鎸夐挳鎿嶄綔 */
- resetQuery() {
- this.daterangeReporttime = [];
- this.resetForm("queryForm");
- this.handleQuery();
- },
/** 鏌ヨ鎹愮尞浜洪亾鎱伴棶閲戝垪琛� */
getList() {
this.loading = true;
@@ -1066,6 +1455,8 @@
// this.queryParams.residencetown = this.$refs.areaSelect.getQu();
listDonatebaseinfo(this.queryParams).then((response) => {
this.donatebaseinfoList = response.rows;
+ console.log("this.queryParams", this.queryParams)
+ console.log("this.donatebaseinfoList", this.donatebaseinfoList)
this.total = response.total;
this.loading = false;
});
@@ -1090,36 +1481,6 @@
});
},
- /** 鏂板鎸夐挳鎿嶄綔 */
- handleAdd() {
- if (this.curCase.id) {
- this.istrue += 2;
- this.reset();
- this.queryParams.params = {};
- this.form.donorno = this.curCase.donorno;
- this.form.name = this.curCase.name;
- this.form.infoid = this.curCase.id;
- this.form.username = this.defaultperson.nickName;
- this.form.userno = this.defaultperson.userName;
-
- this.form.deptmentname = this.defaultperson.dept.deptName;
- this.form.deptmentno = this.defaultperson.dept.deptId;
- this.form.managername = this.defaultperson.dept.leader;
- // this.form.createTime = nowdate;
- //this.open = true;
- //this.initFundApplyForm();
- this.fundDetails = [];
- this.addRow();
- this.dialogOpen = true;
- this.dialogType = "edit";
- this.title = "璐圭敤鐢宠";
- } else {
- const h = this.$createElement;
- this.$message({
- message: h("p", null, [h("span", null, "璇峰厛閫夋嫨宸︽柟鎹愮尞妗堜緥 ")]),
- });
- }
- },
//鐐瑰嚮鎹愮尞妗堜緥鍒楄〃瑙﹀彂鏂规硶
selectDonotor(row, column, event) {
this.curCase = row;
@@ -1133,59 +1494,6 @@
this.loading = false;
this.donateconsolationfundList = response.rows;
});
- },
-
- // 鍙栨秷鎸夐挳
- cancel() {
- this.dialogOpen = false;
- this.reset();
- },
-
- // 琛ㄥ崟閲嶇疆
- reset() {
- this.form = {
- recordstate: -1,
- userno: null,
- username: null,
- id: null,
- infoid: null,
- donorno: null,
- delFlag: null,
- createBy: null,
- createTime: null,
- updateBy: null,
- updateTime: null,
- familyrelations: null,
- name: null,
- remark: null,
- doname: null,
- unitname: null,
- unitno: null,
- sex: null,
- idcardtype: null,
- idcardno: null,
- phone: null,
- donorname: null,
- depositbank: null,
- bankprovince: null,
- bankprovincename: null,
- bankcity: null,
- bankcityname: null,
- banktown: null,
- banktownname: null,
- branchbankname: null,
- bankcardno: null,
- annexbankcard: null,
- annexregistform: null,
- consolationmoney: null,
- applytype: "1",
- servicetypename: null,
- servicesscope: null,
- servicesscopename: null,
- };
- this.resetForm("form");
- //娓呯┖闄勪欢
- this.fileList = []
},
//瀵煎叆鎵�鏈夐」鐩�
@@ -1350,155 +1658,7 @@
// row.itemArr = res.data;
// this.$forceUpdate();
// });
- },
-
- /** 鎻愪氦鎸夐挳 */
- submitForm() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- this.formData = this.form;
- // let totalPreTaxAmount = 0.0;
- // let totalAfterTaxAmount = 0.0;
- // let totalAmount = 0.0;
-
- //淇濆瓨鍓嶆牎楠屾暟鎹�
- for (let k = 0; k < this.fundDetails.length; k++) {
- let tempDetail = this.fundDetails[k];
- if (tempDetail.itemid == null) {
- this.$modal.msgWarning("鏈嶅姟椤圭洰琛ㄤ腑锛岀" + (k + 1).toString() + "琛岀殑鏈嶅姟椤圭洰鏈�夋嫨锛岃鍏堥�夋嫨鏈嶅姟椤圭洰鍚庡啀鎻愪氦淇濆瓨锛�");
- return;
- }
-
- if (tempDetail.servicesscope == null) {
- this.$modal.msgWarning("鏈嶅姟椤圭洰琛ㄤ腑锛岀" + (k + 1).toString() + "琛岀殑璐圭敤璇存槑鏈�夋嫨,璇烽�夋嫨璐圭敤璇存槑鍚庡啀鎻愪氦淇濆瓨锛�");
- return;
- }
-
- if (tempDetail.beneficiaryno == null) {
- this.$modal.msgWarning("鏈嶅姟椤圭洰琛ㄤ腑锛岀" + (k + 1).toString() + "琛岀殑鏈嶅姟浜哄憳濮撳悕涓洪�夋嫨,璇烽�夋嫨浜哄憳鍚庡啀鎻愪氦淇濆瓨锛�");
- return;
- }
-
- // //鍒ゆ柇鍗曚綅 unitSel
- // try {
- // let unitIndex = this.unitList.findIndex(
- // (item) => tempDetail.unitno == item.organizationid
- // );
- // if (unitIndex > -1) {
- // tempDetail.unitname = this.unitList[unitIndex].organizationname;
- // } else {
- // tempDetail.unitname = tempDetail.unitno;
- // }
- // } catch {
- // tempDetail.unitname = tempDetail.unitno;
- // }
- }
-
- //闄勪欢澶勭悊
- let list = this.fileList;
- if (list.length > 0) {
- this.form.annexfiles = list.map(item => item.url).join(",");
- }
-
- //澶勭悊鏄庣粏
- for (let i = 0; i < this.fundDetails.length; i++) {
- let tempDetail = this.fundDetails[i];
- //鑾峰彇鏈嶅姟椤圭洰鏄庣粏
- let tempItemArr = tempDetail.itemArr;
- let itemIndex = tempItemArr.findIndex(
- (item) => tempDetail.itemid == item.id
- );
- if (itemIndex > -1) {
- tempDetail.itemname = tempItemArr[itemIndex].itemName;
- tempDetail.itemid = tempItemArr[itemIndex].id;
- }
-
- //鑾峰彇applytypename銆佹湇鍔¤垂鐢ㄥぇ绫�
- let applytypeIndex = this.rowfeeItemTypes.findIndex(
- (item) => tempDetail.applytype == item.value
- );
- if (applytypeIndex > -1) {
- tempDetail.applytypename = this.rowfeeItemTypes[applytypeIndex].label;
- tempDetail.subjecttype = this.rowfeeItemTypes[applytypeIndex].subjecttype;
- tempDetail.subjecttypename = this.rowfeeItemTypes[applytypeIndex].subjecttypename;
- }
- this.fundDetails[i] = tempDetail;
- /*
- //璁$畻涓◣
- //if (isNaN(parseFloat(tempDetail.taxedamount)))
- //鑾峰彇鍙傛暟
- this.taxParam.beneficiaryNo = tempDetail.beneficiaryno;
- this.taxParam.startTime = this.form.createTime.substring(0, 10);
- // 璁$畻绋庡悗閲戦
- if (tempDetail.taxedamount == undefined || tempDetail.taxedamount == null || tempDetail.taxedamount == 0 || tempDetail.taxedamount == '') {
- //鑾峰彇鍙傛暟
- this.taxParam.money = tempDetail.amount.toString();
- getTaxByBeneFiciaryNo(this.taxParam).then((res) => {
- if (res.code == 200) {
- tempDetail.taxamount = res.data;
- tempDetail.taxedamount = tempDetail.amount - tempDetail.taxamount;
- this.fundDetails[k] = tempDetail;
-
- this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount);
- this.totalAmount += parseFloat(tempDetail.amount);
- }
- });
- }
-
- // 璁$畻绋庡墠閲戦
- if (tempDetail.amount == undefined || tempDetail.amount == null || tempDetail.amount == 0 || tempDetail.amount == '') {
- //鑾峰彇鍙傛暟
- this.taxParam.money = tempDetail.taxedamount.toString();
- getTaxBeforeByAfterMoney(this.taxParam).then((res) => {
- if (res.code == 200) {
- tempDetail.taxamount = res.data.nowTax;
- tempDetail.amount = parseFloat(res.data.nowTaxBeforeMoney);
- this.fundDetails[k] = tempDetail;
-
- this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount);
- this.totalAmount += parseFloat(tempDetail.amount);
- console.log("1", this.amount);
- }
- });
- }
- */
- }
- //璐圭敤鍚堣
- // this.form.pretaxcost = parseFloat(this.totalPreTaxAmount).toFixed(2);
- // this.form.taxedcost = parseFloat(this.totalAfterTaxAmount).toFixed(2);
- // this.form.amountrequested = this.totalAmount.toFixed(2);
-
- //淇濆瓨鏁版嵁
- this.loading = true;
- this.form.serviceFunddetails = 0;
- this.fundDetails.map((item) => {
- this.form.serviceFunddetails += item.amount;
- });
- this.form.serviceFunddetails = this.fundDetails;
-
- if (this.form.id != null) {
- //鎹愮尞鑰�
- this.form.donorname = this.curCase.name;
- }
- else {
- this.form.recordstatus = -1;
- }
-
- batchUploadFund(this.form).then((response) => {
- if (response.code === 200) {
- this.$modal.msgSuccess("涓撳鍔冲姟璐逛繚瀛樻垚鍔燂紒");
- this.selectDonotor(this.curCase);
- } else {
- this.$modal.msgError("涓撳鍔冲姟璐逛繚瀛樺け璐ワ細" + response.msg);
- }
- });
-
- //鍏抽棴绐楀彛
- this.loading = false;
- this.dialogOpen = false;
- }
- });
- },
+ },
//鑾峰彇涓撳鍒楄〃
getlistExternalperson() {
@@ -1535,7 +1695,7 @@
row.branchbankname = res.branchbankname;
row.depositbank = res.depositbank;
row.idcardno = res.idcardno;
- row.phone = res.telephone;
+ row.phone = res.phonenumber;
row.title = res.title;
row.unitname = res.unitname;
row.unitno = res.unitno;
@@ -1547,130 +1707,10 @@
getlistUser() {
listUser().then((res) => {
+ console.log("listUser", res);
this.userlist = res.data;
});
- },
-
- /** 淇敼鎸夐挳鎿嶄綔 */
- handleUpdate(row) {
- 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 = "edit";
-
- const id = row.id || this.ids;
- getFund(id).then((response) => {
- this.form = response.data;
- // this.form.recordstate =-1;
- // this.form.recordstatus = response.data.recordstatus + "";
- this.form.name = this.curCase.name;
- //闄勪欢澶勭悊
- this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
- 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].rowfeeblocks = [];
-
- this.fundDetails[m].rowfeeblocks.push({
- servicesscope: this.fundDetails[m].servicesscope,
- expensedescribe: this.fundDetails[m].servicesscopename,
- expense: this.fundDetails[m].expense,
- remark: this.fundDetails[m].servicesscopename,
- });
- // getdetailsByItemId(this.fundDetails[m].itemid).then((res) => {
- // let fundmsg = res.data;
- // fundmsg.forEach((item) => {
- // this.fundDetails[m].rowfeeblocks.push({
- // servicesscope: item.id,
- // expensedescribe: item.expensedescribe,
- // expense: item.expense,
- // remark: item.expensedescribe,
- // });
- // });
- // });
- }
-
- if (this.fundDetails.length == 0) {
- this.addRow();
- }
- });
- });
- },
-
- /** 鏌ョ湅鎸夐挳鎿嶄綔 */
- handleDetail(row) {
- 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].rowfeeblocks = [];
- this.fundDetails[m].rowfeeblocks.push({
- expense: this.fundDetails[m].expense,
- expensedescribe: this.fundDetails[m].servicesscopename,
- remark: this.fundDetails[m].servicesscope,
- servicesscope: this.fundDetails[m].servicesscope,
- });
- }
-
- if (this.fundDetails.length == 0) {
- this.addRow();
- }
- });
- });
- },
-
- 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("鏄惁纭鍒犻櫎?", "鎻愮ず", {
@@ -1872,41 +1912,11 @@
} else {
this.$modal.msgError(response.msg);
}
- },
-
- // 涓嬭浇鏂囦欢
- downFile(item) {
- const url = process.env.VUE_APP_BASE_API + item.url
- var a = document.createElement('a');
- var event = new MouseEvent('click');
- a.download = item.name;
- a.href = url;
- a.dispatchEvent(event);
- },
+ },
},
- //鐢熷懡鍛ㄦ湡 - 鍒涘缓瀹屾垚锛堝彲浠ヨ闂綋鍓峵his瀹炰緥锛�
- created() {
- this.getUnitList();
- this.getList();
- this.getBaseInfoList();
- this.getlistUser();
- this.getCurFundType();
- },
- //鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛�
- mounted() {
- this.selectReporters();
- this.getUsermsg();
- this.getlistExternalperson();
- },
- beforeCreate() { }, //鐢熷懡鍛ㄦ湡 - 鍒涘缓涔嬪墠
- beforeMount() { }, //鐢熷懡鍛ㄦ湡 - 鎸傝浇涔嬪墠
- beforeUpdate() { }, //鐢熷懡鍛ㄦ湡 - 鏇存柊涔嬪墠
- updated() { }, //鐢熷懡鍛ㄦ湡 - 鏇存柊涔嬪悗
- beforeDestroy() { }, //鐢熷懡鍛ㄦ湡 - 閿�姣佷箣鍓�
- destroyed() { }, //鐢熷懡鍛ㄦ湡 - 閿�姣佸畬鎴�
- activated() { }, //濡傛灉椤甸潰鏈塳eep-alive缂撳瓨鍔熻兘锛岃繖涓嚱鏁颁細瑙﹀彂
+
};
</script>
<style scoped>
diff --git a/src/views/project/fund/medicalCostFundApply/index.vue b/src/views/project/fund/medicalCostFundApply/index.vue
index 70bcfdf..2fe9dd2 100644
--- a/src/views/project/fund/medicalCostFundApply/index.vue
+++ b/src/views/project/fund/medicalCostFundApply/index.vue
@@ -207,7 +207,7 @@
</el-col>
</el-row>
<el-row style="margin-top: 5px; margin-bottom: 5px">
- <el-table :data="fundDetailArr" border highlight-current-row>
+ <el-table :data="fundDetails" 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="鎺掑簭" />
@@ -364,9 +364,14 @@
<template slot-scope="scope">
<el-button type="text" size="mini" @click="addRow(scope.$index)">鏂板</el-button>
<el-button @click.native.prevent="
- deleteRows(scope.row, scope.$index, fundDetailArr)
+ deleteRows(scope.row, scope.$index, fundDetails)
" type="text" size="small">
鍒犻櫎
+ </el-button>
+ <el-button @click.native.prevent="
+ Filepopup(scope.$index, fundDetails, scope.row)
+ " type="text" size="small">
+ 绁ㄦ嵁
</el-button>
</template>
</el-table-column>
@@ -629,7 +634,8 @@
// 鎹愮尞浜洪亾鎱伴棶閲戣〃鏍兼暟鎹�
donateconsolationfundList: [],
- fundDetailArr: [],
+ //鏄庣粏璁板綍
+ fundDetails: [],
// 寮瑰嚭灞傛爣棰�
title: "",
@@ -687,7 +693,7 @@
let tempIndex = this.funddetailForm.index;
let tempName = this.funddetailForm.beneficiaryname;
let tempUnitname = this.funddetailForm.unitname;
- let singleDetail = this.fundDetailArr[tempIndex];
+ let singleDetail = this.fundDetails[tempIndex];
if (this.detailInfoDialogShowType == "name") {
this.personlist.map((res) => {
if (tempName == res.username) {
@@ -727,7 +733,7 @@
}
}
console.log("singleDetail",singleDetail);
- this.fundDetailArr[tempIndex] = singleDetail;
+ this.fundDetails[tempIndex] = singleDetail;
this.detailInfoDialogShow = false;
},
selectremark(row) {
@@ -736,7 +742,7 @@
row.servivesscope = item.servivesscope;
row.amount = item.expense;
this.form.serviceFunddetails = 0;
- this.fundDetailArr.map((item) => {
+ this.fundDetails.map((item) => {
this.form.serviceFunddetails += item.amount;
});
// row.remark
@@ -784,7 +790,7 @@
}
});
var repeatNum = 0;
- this.fundDetailArr.map((res) => {
+ this.fundDetails.map((res) => {
if (res.applytype === row.applytype && res.itemid == row.itemid) {
repeatNum++;
}
@@ -878,7 +884,7 @@
// this.form.createTime = nowdate;
//this.open = true;
//this.initFundApplyForm();
- this.fundDetailArr = [];
+ this.fundDetails = [];
this.addRow();
this.dialogOpen = true;
this.title = "娣诲姞璐圭敤鐢宠";
@@ -1005,12 +1011,12 @@
servivesscope: null,
};
if (rowIndex == undefined || rowIndex == null || rowIndex < 0) {
- this.fundDetailArr.push(rowData);
+ this.fundDetails.push(rowData);
} else {
- this.fundDetailArr.splice(rowIndex + 1, 0, rowData);
+ this.fundDetails.splice(rowIndex + 1, 0, rowData);
}
- for (let i = 0; i < this.fundDetailArr.length; i++) {
- this.fundDetailArr[i].orderno = i + 1;
+ for (let i = 0; i < this.fundDetails.length; i++) {
+ this.fundDetails[i].orderno = i + 1;
}
},
@@ -1034,8 +1040,8 @@
this.$refs["form"].validate((valid) => {
if (valid) {
let formData = this.form;
- for (let k = 0; k < this.fundDetailArr.length; k++) {
- let tempDetail = this.fundDetailArr[k];
+ for (let k = 0; k < this.fundDetails.length; k++) {
+ let tempDetail = this.fundDetails[k];
if (tempDetail.itemid == null) {
this.$modal.msgWarning("璇烽�夋嫨鏈嶅姟椤圭洰");
return;
@@ -1081,8 +1087,8 @@
this.selectDonotor(this.curCase);
this.$modal.msgSuccess("淇敼鎴愬姛");
this.loading = false;
- for (let m = 0; m < this.fundDetailArr.length; m++) {
- let tempData = this.fundDetailArr[m];
+ for (let m = 0; m < this.fundDetails.length; m++) {
+ let tempData = this.fundDetails[m];
let tempItemArr = tempData.itemArr;
tempData.fundid = formData.id;
//鑾峰彇鏈嶅姟椤圭洰鏄庣粏
@@ -1102,8 +1108,8 @@
});
} else {
//淇濆瓨璐圭敤鐢宠
- for (let m = 0; m < this.fundDetailArr.length; m++) {
- let tempData = this.fundDetailArr[m];
+ for (let m = 0; m < this.fundDetails.length; m++) {
+ let tempData = this.fundDetails[m];
let tempUtemArr = tempData.itemArr;
//鑾峰彇鏈嶅姟椤圭洰鏄庣粏
@@ -1121,10 +1127,10 @@
if (applytypeIndex > -1) {
tempData.applytypename = this.fundtypeArr[applytypeIndex].label;
}
- this.fundDetailArr[m] = tempData;
+ this.fundDetails[m] = tempData;
}
- this.form.serviceFunddetails = this.fundDetailArr;
+ this.form.serviceFunddetails = this.fundDetails;
batchUploadFund(this.form).then((response) => {
if (response.code === 200) {
this.$modal.msgSuccess("鏂板鎴愬姛");
@@ -1174,10 +1180,10 @@
this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
getownFundDetail(id).then(async (res) => {
- this.fundDetailArr = res.data;
- for (let m = 0; m < this.fundDetailArr.length; m++) {
- this.fundDetailArr[m].itemArr = [];
- this.getItemArr(m, this.fundDetailArr[m]);
+ this.fundDetails = res.data;
+ for (let m = 0; m < this.fundDetails.length; m++) {
+ this.fundDetails[m].itemArr = [];
+ this.getItemArr(m, this.fundDetails[m]);
}
});
});
@@ -1209,16 +1215,16 @@
this.fundflowList = res.rows;
});
getownFundDetail(id).then((res) => {
- this.fundDetailArr = res.data;
- for (let m = 0; m < this.fundDetailArr.length; m++) {
- this.fundDetailArr[m].itemArr = [];
- this.getItemArr(m, this.fundDetailArr[m]);
- this.fundDetailArr[m].fundblock = [];
- this.fundDetailArr[m].fundblock.push({
- expense: this.fundDetailArr[m].expense,
- expensedescribe: this.fundDetailArr[m].servicesscopename,
- remark: this.fundDetailArr[m].servicesscope,
- servicesscope: this.fundDetailArr[m].servicesscope,
+ 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,
});
}
});
@@ -1263,9 +1269,9 @@
}).then(() => {
this.$set(rows, rows.splice(index, 1));
getownFundDetail(this.form.id).then((res) => {
- this.$set(this.fundDetailArr, res.data);
+ this.$set(this.fundDetails, res.data);
this.sumTotalFee(row);
- // this.fundDetailArr = res.data
+ // this.fundDetails = res.data
});
});
}
@@ -1284,31 +1290,31 @@
sumTotalFee(row) {
let allSum = 0;
if (this.form.applytype != null) {
- for (let i = 0; i < this.fundDetailArr.length; i++) {
+ for (let i = 0; i < this.fundDetails.length; i++) {
let totalFee = 0;
let taxFee = 0;
if (this.form.applytype == 1 || this.form.applytype == 2) {
//璁$畻褰撳墠鎶ラ攢鍐呭璐圭敤鍚堣
- if (!isNaN(parseFloat(this.fundDetailArr[i].amount))) {
- totalFee += parseFloat(this.fundDetailArr[i].amount);
- taxFee += parseFloat(this.fundDetailArr[i].amount);
+ if (!isNaN(parseFloat(this.fundDetails[i].amount))) {
+ totalFee += parseFloat(this.fundDetails[i].amount);
+ taxFee += parseFloat(this.fundDetails[i].amount);
}
- if (!isNaN(parseFloat(this.fundDetailArr[i].taxamount))) {
- totalFee -= parseFloat(this.fundDetailArr[i].taxamount);
- taxFee -= parseFloat(this.fundDetailArr[i].taxamount);
+ if (!isNaN(parseFloat(this.fundDetails[i].taxamount))) {
+ totalFee -= parseFloat(this.fundDetails[i].taxamount);
+ taxFee -= parseFloat(this.fundDetails[i].taxamount);
}
} else if (this.form.applytype == 3) {
if (
- !isNaN(parseFloat(this.fundDetailArr[i].price)) &&
- !isNaN(parseFloat(this.fundDetailArr[i].quantity))
+ !isNaN(parseFloat(this.fundDetails[i].price)) &&
+ !isNaN(parseFloat(this.fundDetails[i].quantity))
) {
totalFee +=
- parseFloat(this.fundDetailArr[i].price) *
- parseFloat(this.fundDetailArr[i].quantity);
+ parseFloat(this.fundDetails[i].price) *
+ parseFloat(this.fundDetails[i].quantity);
}
}
if (!isNaN(parseFloat(taxFee))) {
- this.fundDetailArr[i].taxedamount = taxFee.toFixed(2);
+ this.fundDetails[i].taxedamount = taxFee.toFixed(2);
}
allSum += totalFee;
}
@@ -1336,25 +1342,25 @@
getItemArr(rowindex, row) {
let list = this.fundtypeArrAll.filter((r) => r.itemType == row.applytype);
row.itemArr = list[0].itemDetails;
- this.$set(this.fundDetailArr, rowindex, row);
+ this.$set(this.fundDetails, rowindex, row);
//this.loading = true;
// getItemNames(row.applytype).then((res) => {
// this.loading = false;
// row.itemArr = res.data;
- // this.$set(this.fundDetailArr, rowindex, row);
+ // this.$set(this.fundDetails, rowindex, row);
// });
},
addAlls() {
this.loading = true;
- this.fundDetailArr = this.fundDetailArr.filter(
+ this.fundDetails = this.fundDetails.filter(
(r) => r.applytype != "" && r.applytype != null
);
let listAdd = [];
- //let listAdd = this.fundDetailArr;
+ //let listAdd = this.fundDetails;
for (let i = 0; i < this.fundtypeArrAll.length; i++) {
for (let j = 0; j < this.fundtypeArrAll[i].itemDetails.length; j++) {
- let list = this.fundDetailArr.filter(
+ let list = this.fundDetails.filter(
(r) =>
r.applytype == this.fundtypeArrAll[i].itemType &&
r.itemid == this.fundtypeArrAll[i].itemDetails[j].id
@@ -1375,9 +1381,9 @@
}
}
}
- this.fundDetailArr = listAdd;
+ this.fundDetails = listAdd;
this.loading = false;
- // let Outerarr = this.fundDetailArr;
+ // let Outerarr = this.fundDetails;
// Outerarr.map((res) => {
// let onelist = this.fundtypeArr;
// onelist.map((item) => {
@@ -1469,7 +1475,7 @@
} else {
getItemNames(scope.row.applytype).then((res) => {
scope.row.itemArr = res.data;
- //this.$set(this.fundDetailArr, rowindex, row);
+ //this.$set(this.fundDetails, rowindex, row);
});
}
},
@@ -1507,6 +1513,21 @@
},
},
+ // 鐐瑰嚮鏂囦欢
+ Filepopup(index, rows, row) {
+ console.log(index, rows, row);
+ this.atpresent = index;
+ console.log(this.atpresent);
+ this.pdfVisible = true;
+ if (this.fundDetails[index].annexfilesList) {
+ this.fileListto = this.rbDetails[index].annexfilesList;
+ } else {
+ this.fileListto = [];
+ this.pdfimg = "";
+ this.pdftitle = "";
+ }
+ },
+
//鐢熷懡鍛ㄦ湡 - 鍒涘缓瀹屾垚锛堝彲浠ヨ闂綋鍓峵his瀹炰緥锛�
created() {
this.getList();
diff --git a/src/views/project/travelexpenseslist/Modifydetails/index.vue b/src/views/project/travelexpenseslist/Modifydetails/index.vue
index e0e38ae..be3fc18 100644
--- a/src/views/project/travelexpenseslist/Modifydetails/index.vue
+++ b/src/views/project/travelexpenseslist/Modifydetails/index.vue
@@ -166,7 +166,7 @@
<el-col :span="20">鎶ラ攢鏄庣粏褰曞叆锛�</el-col>
</el-row>
<el-row>
- <el-table :data="rbDetails" border highlight-current-row show-summary>
+ <el-table :data="rbDetails" border highlight-current-row :summary-method="getSummaries" show-summary>
<el-table-column prop="orderno" slot="" label="搴忓彿" align="center" fixed width="65">
<template slot-scope="scope">
<el-input v-model="scope.row.orderno" placeholder="搴忓彿" />
@@ -274,8 +274,8 @@
<el-table-column prop="trafficexpense" label="浜ら�氳垂" align="center" width="80">
<template slot-scope="scope">
<el-input v-model="scope.row.trafficexpense" placeholder="浜ら�氳垂" @blur="val => {
- sumRowFee(scope.row);
- }
+ sumRowFee(scope.row);
+ }
" />
</template>
</el-table-column>
@@ -294,8 +294,8 @@
<el-table-column prop="hotelexpense" label="浣忓璐�" align="center" width="80">
<template slot-scope="scope">
<el-input v-model="scope.row.hotelexpense" placeholder="浣忓璐�" @blur="val => {
- sumRowFee(scope.row);
- }
+ sumRowFee(scope.row);
+ }
" />
</template>
</el-table-column>
@@ -303,24 +303,24 @@
<el-table-column prop="foodexpenses" label="椁愯垂鎶ラ攢" align="center" width="80">
<template slot-scope="scope">
<el-input v-model="scope.row.foodexpenses" placeholder="浼欓璐规姤閿�" @blur="val => {
- sumRowFee(scope.row);
- }
+ sumRowFee(scope.row);
+ }
" />
</template>
</el-table-column>
<el-table-column prop="foodallowance" label="浼欓琛ュ姪" align="center" width="80">
<template slot-scope="scope">
<el-input v-model="scope.row.foodallowance" placeholder="浼欓璐硅ˉ鍔�" @blur="val => {
- sumRowFee(scope.row);
- }
+ sumRowFee(scope.row);
+ }
" />
</template>
</el-table-column>
<el-table-column prop="otherexpense" label="鍏潅璐硅ˉ鍔�" align="center" width="80">
<template slot-scope="scope">
<el-input v-model="scope.row.otherexpense" placeholder="鏉傝垂" @blur="val => {
- sumRowFee(scope.row);
- }
+ sumRowFee(scope.row);
+ }
" />
</template>
</el-table-column>
@@ -328,8 +328,8 @@
<el-table-column prop="otherfeeamount" label="鍏朵粬璐圭敤" align="center" width="90">
<template slot-scope="scope">
<el-input v-model="scope.row.otherfeeamount" placeholder="鍏朵粬璐圭敤" @blur="val => {
- sumRowFee(scope.row);
- }
+ sumRowFee(scope.row);
+ }
" />
</template>
</el-table-column>
@@ -344,19 +344,14 @@
<el-input v-model="scope.row.total" placeholder="鍚堣" />
</template>
</el-table-column>
- <el-table-column fixed="right" label="鎿嶄綔" align="center" width="120" v-if="dialogType == 'edit'">
+ <el-table-column fixed="right" label="鎿嶄綔" align="center" width="120">
<template slot-scope="scope">
- <el-button type="text" size="mini" @click="addDetailRow(scope.$index)">鏂板</el-button>
- <el-button @click.native.prevent="
- deleteDetailRow(scope.$index, rbDetails, scope.row)
- " type="text" size="small">
- 鍒犻櫎
- </el-button>
- <el-button @click.native.prevent="
- Filepopup(scope.$index, rbDetails, scope.row)
- " type="text" size="small">
- 闄勪欢
- </el-button>
+ <el-button type="text" size="mini" @click="addDetailRow(scope.$index)"
+ v-if="dialogType == 'edit'">鏂板</el-button>
+ <el-button @click.native.prevent="deleteDetailRow(scope.$index, rbDetails, scope.row)" type="text"
+ size="small" v-if="dialogType == 'edit'">鍒犻櫎</el-button>
+ <el-button @click.native.prevent="Filepopup(scope.$index, rbDetails, scope.row)" type="text"
+ size="small">绁ㄦ嵁</el-button>
</template>
</el-table-column>
</el-table>
@@ -365,7 +360,7 @@
<el-col :span="20">鎶ラ攢璇锋鏄庣粏锛�</el-col>
</el-row>
<el-row style="margin-top: 30px">
- <el-table :data="rbPayees" border highlight-current-row show-summary>
+ <el-table :data="rbPayees" border highlight-current-row :summary-method="getSummaries" show-summary>
<el-table-column prop="orderno" slot="" label="搴忓彿" align="center" fixed width="65">
<template slot-scope="scope">
<el-input v-model="scope.row.orderno" placeholder="搴忓彿" />
@@ -418,17 +413,19 @@
<el-input v-model="scope.row.amount" placeholder="鎵撴閲戦" />
</template>
</el-table-column>
- <el-table-column prop="remark" slot="" label="璇锋璇存槑" align="center" fixed width="280">
+ <el-table-column prop="remark" slot="" label="璇锋璇存槑" align="center" fixed>
<template slot-scope="scope">
<el-input v-model="scope.row.remark" placeholder="璇存槑" />
- </template> </el-table-column><el-table-column prop="paiddate" slot="" label="鎵撴鏃ユ湡" fixed align="center"
- width="150">
+ </template>
+ </el-table-column>
+ <!--
+ <el-table-column prop="paiddate" slot="" label="鎵撴鏃ユ湡" fixed align="center" width="150">
<template slot-scope="scope">
<el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date"
value-format="yyyy-MM-dd HH:mm:ss" placeholder="鎵撴鏃ユ湡" :disabled="true">
</el-date-picker>
</template>
- </el-table-column>
+ </el-table-column>-->
<el-table-column label="鎿嶄綔" align="center" width="100" v-if="dialogType == 'edit'">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="addPayeeRow(scope.$index)">鏂板</el-button>
@@ -456,7 +453,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" v-if="dialogType == 'edit'">淇� 瀛�</el-button>
- <el-button @click="cancel">鍙� 娑�</el-button>
+ <!--<el-button @click="cancel">閫� 鍑�</el-button>-->
</div>
</div>
@@ -466,7 +463,7 @@
<div>
<el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileListto" multiple
:limit="20" :headers="headers" :on-success="(response, file, fileList) =>
- uploadSccess(response, file, fileList)
+ uploadSccess(response, file, fileList)
" :on-preview="downFile" :disabled="dialogType == 'detail'" :on-error="handleUploadError"
:on-exceed="handleExceed" :on-remove="remove" accept="image/*,.pdf">
<el-button :disabled="dialogType == 'detail'" size="small" type="primary">涓婁紶</el-button>
@@ -566,7 +563,9 @@
//涓嬫媺鍙互閫夋嫨浜哄憳鍒楄〃
personsSel: [],
// 閮ㄩ棬鏍戦�夐」
+
deptOptions: undefined,
+ //绁ㄦ嵁鏂囦欢
pdftitle: "",
pdfimg: "",
pdfVisible: false,
@@ -574,6 +573,7 @@
value: 0,
label: ""
},
+
hintitle: "閫変腑宸︿晶宸蹭笂浼犳枃浠堕瑙堟煡鐪�",
atpresent: "",
iframeurl: "",
@@ -672,13 +672,19 @@
created() {
//鑾峰彇璁板綍鍒楄〃
- this.getList();
- this.gainee();
+ // this.getList();
+
//鑾峰彇鎶ラ攢涓殑浜哄憳淇℃伅
this.getPersonList();
- },
- mounted() {
+ //鑾峰彇鐧诲綍鑰呬俊鎭�
+ getUserProfile().then(response => {
+ this.defaultperson = response.data;
+ this.standardlevel = response.data.standardlevel;
+ console.log("this.defaultperson", this.defaultperson);
+
+ });
+
//鑾峰彇鎹愮尞鑰呭鍚�
listDonatebaseinfo().then(res => {
let list = res.rows;
@@ -696,10 +702,24 @@
}
});
- //鑾峰彇鐧诲綍鑰呬俊鎭�
- this.getUsermsg();
//鑾峰彇閮ㄩ棬淇℃伅
//this.getTreeselect();
+
+ },
+
+ mounted() {
+ //閫夋嫨涓氬姟绫诲瀷:1銆佹柊澧烇紱2銆佷慨鏀癸紱3銆佹煡鐪�
+ let ids = this.$route.query.id;
+ let pos = this.$route.query.pos;
+ this.defaultperson = this.$route.query.routerparam;
+ if (pos == 1) {
+ this.handleAdd(ids);
+ } else if (pos == 2) {
+ this.handleUpdate(ids);
+ }
+ else if (pos == 3) {
+ this.handleDetail(ids);
+ }
},
methods: {
@@ -724,7 +744,7 @@
console.log(fileList);
this.rbDetails;
- //鑾峰彇闄勪欢淇℃伅浣嶇疆
+ //鑾峰彇绁ㄦ嵁淇℃伅浣嶇疆
if (response.code == 200) {
this.form.filename = file.raw.name;
console.log(this.fileList);
@@ -737,7 +757,7 @@
this.$modal.msgError(response.msg);
}
},
- // 鐐瑰嚮鏂囦欢
+ // 鐐瑰嚮绁ㄦ嵁
Filepopup(index, rows, row) {
console.log(index, rows, row);
this.atpresent = index;
@@ -773,14 +793,6 @@
this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
this.previewpdf = false;
}
- },
-
- //鑾峰彇鐧诲綍鐢ㄦ埛淇℃伅
- getUsermsg() {
- getUserProfile().then(response => {
- this.defaultperson = response.data;
- this.standardlevel = response.data.standardlevel;
- });
},
/** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */
@@ -1061,10 +1073,12 @@
this.loading = false;
});
},
+
// 鍙栨秷鎸夐挳
cancel() {
- this.open = false;
+ window.close();
},
+
// 琛ㄥ崟閲嶇疆
reset() {
this.fileListto = [];
@@ -1116,6 +1130,7 @@
this.rbPayees = [];
this.resetForm("form");
},
+
//
handup(e) {
console.log("涓婃姤", e);
@@ -1133,7 +1148,7 @@
// this.queryParams.paprovincecode= this.$refs["residenceSelect" ].getSheng();
// this.queryParams.patowncode= this.$refs["residenceSelect" ].getQu();
this.queryParams.pageNum = 1;
- this.getList();
+ // this.getList();
},
/** 閲嶇疆鎸夐挳鎿嶄綔 */
@@ -1151,11 +1166,12 @@
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
this.reset();
-
- this.open = true;
- this.title = "鏂板鎶ラ攢鐢宠";
+ // this.open = true;
+ this.title = "鏂板宸梾鐢宠鍗�";
this.dialogType = "edit";
this.fundflowList = [];
+
+ console.log(this.title, this.defaultperson);
this.form.userno = this.defaultperson.userName;
this.form.username = this.defaultperson.nickName;
@@ -1166,23 +1182,14 @@
this.addDetailRow(0);
this.addPayeeRow(0);
},
- gainee() {
- let ids = this.$route.query.id;
- let pos = this.$route.query.pos;
- console.log(ids, pos);
- if (pos == 2) {
- this.handleDetail(ids);
- } else if (pos == 1) {
- this.handleUpdate(ids);
- }
- },
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(ids) {
- this.$router.push({
- path: "/finance/travelexpenseslist/Modifydetails/",
- query: { id: ids }
- });
+ // this.$router.push({
+ // path: "/finance/travelexpenseslist/Modifydetails/",
+ // query: { id: ids }
+ // });
+
this.dialogType = "edit";
this.reset();
// this.open = true;
@@ -1246,7 +1253,7 @@
getReimbursement(id).then(response => {
this.form = response.data;
- //闄勪欢
+ //绁ㄦ嵁
this.fileListto = this.form.annexfiles
? this.form.annexfiles
.split(",")
@@ -1353,7 +1360,7 @@
}
*/
- //闄勪欢鏂囦欢澶勭悊
+ //绁ㄦ嵁鏂囦欢澶勭悊
let list = this.fileListto;
console.log(list);
@@ -1405,7 +1412,7 @@
this.$modal.msgSuccess("淇敼鎶ラ攢鍗曚繚瀛樻垚鍔�!");
this.open = false;
- this.getList();
+ // this.getList();
// })
// .catch(err => {
// this.$modal.msgError("淇敼鎶ラ攢鍗曚繚瀛樺け璐ワ紒");
@@ -1430,7 +1437,7 @@
this.$modal.msgSuccess("鏂板鎶ラ攢鍗曚繚瀛樻垚鍔�!");
this.open = false;
- this.getList();
+ // this.getList();
})
.catch(err => {
this.$modal.msgError("鏂板鎶ラ攢鍗曚繚瀛樺け璐ワ紒");
@@ -1854,9 +1861,42 @@
chineseStr += cnInteger;
}
return chineseStr;
- }
+ },
+
+ //琛ㄦ牸鍚堣
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+ var columnnames = ["bankname", "bankcardno", "remark", "personname", "starttime", "endtime", "departure", "destination", "traffictype", "traffictype2", "departure"];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = '鍚堣';
+ return;
+ }
+ //鍘婚櫎閮ㄥ垎瀛楁璁$畻
+ if (columnnames.indexOf(column.property) > -1) { return; }
+
+ const values = data.map(item => Number(item[column.property]));
+ if (!values.every(value => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr);
+ if (!isNaN(value)) {
+ return prev + curr;
+ } else {
+ return prev;
+ }
+ }, 0);
+ sums[index] += '';
+ } else {
+ sums[index] = '';
+ }
+ });
+ return sums;
+ },
+
}
};
+
</script>
<style lang="scss" scoped>
@@ -1900,6 +1940,7 @@
border: 1px solid #dcdfe6;
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
0 0 6px 0 rgba(0, 0, 0, 0.04);
+ box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); // <- Add this to fix.
}
.pdftit {
@@ -1925,5 +1966,13 @@
width: 60%;
text-align: center;
}
+
+
+}
+
+::v-deep .el-input--medium .el-input__inner {
+ height: 36px;
+ line-height: 36px;
+ text-align: center;
}
</style>
diff --git a/src/views/project/travelexpenseslist/index.vue b/src/views/project/travelexpenseslist/index.vue
index 7fbe379..e1aebcb 100644
--- a/src/views/project/travelexpenseslist/index.vue
+++ b/src/views/project/travelexpenseslist/index.vue
@@ -1845,8 +1845,13 @@
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
- this.reset();
+ console.log("defaultperson",this.defaultperson);
+ this.$router.push({
+ path: "/finance/travelexpenseslist/Modifydetails/",
+ query: { id: 0, pos: 1,routerparam:this.defaultperson}
+ });
+ this.reset();
this.open = true;
this.title = "鏂板鎶ラ攢鐢宠";
this.dialogType = "edit";
@@ -1866,7 +1871,7 @@
handleUpdate(row) {
this.$router.push({
path: "/finance/travelexpenseslist/Modifydetails/",
- query: { id: row.id, pos: 1 }
+ query: { id: row.id, pos: 2 }
});
this.dialogType = "edit";
this.reset();
@@ -1923,8 +1928,9 @@
handleDetail(row) {
this.$router.push({
path: "/finance/travelexpenseslist/Modifydetails/",
- query: { id: row.id, pos: 2 }
+ query: { id: row.id, pos: 3 }
});
+
this.dialogType = "detail";
this.title = "鏌ョ湅鎶ラ攢鐢宠";
diff --git a/vue.config.js b/vue.config.js
index 09f43f3..3096dad 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -35,7 +35,7 @@
[process.env.VUE_APP_BASE_API]: {
target:`http://localhost:8086`,
// target:`http://116.62.18.175:8080`,
- // target:`http://192.168.1.4:8080`,
+ // target:`http://192.168.1.4:8086`,
// target: `https://slb.hospitalstar.com:9093`,
changeOrigin: true,
pathRewrite: {
--
Gitblit v1.9.3