From e5e3e1a5bc8aa300c580126703bb6067221dee96 Mon Sep 17 00:00:00 2001 From: yxh <172933527@qq.com> Date: 星期四, 15 六月 2023 10:09:08 +0800 Subject: [PATCH] 主要修改了个税计算 --- src/views/project/travelexpenseslist/index.vue | 286 ++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 184 insertions(+), 102 deletions(-) diff --git a/src/views/project/travelexpenseslist/index.vue b/src/views/project/travelexpenseslist/index.vue index 6c1658e..f153007 100644 --- a/src/views/project/travelexpenseslist/index.vue +++ b/src/views/project/travelexpenseslist/index.vue @@ -17,7 +17,6 @@ @keyup.enter.native="handleQuery" /> </el-form-item> </el-col> - <el-col :span="8"> <el-form-item label="鎶ラ攢鏃ユ湡" prop="createTime"> <el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="value1" type="daterange" @blur="onpick" @@ -58,13 +57,7 @@ </el-row> <el-table border v-loading="loading" :data="reimbursementList" @selection-change="handleSelectionChange"> - <!-- <el-table-column type="selection" width="55" align="center" /> --> - <el-table-column label="瀹℃牳鐘舵��" align="center" prop="recordstatus" width="160"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.sys_recordstatus" :value="scope.row.recordstatus" /> - </template> - </el-table-column> - <!-- + <!-- <el-table-column type="selection" width="55" align="center" /> <el-table-column label="鎶ラ攢浜虹被鍒�" width="120" align="center" prop="costtype"> <template slot-scope="scope"> <dict-tag :options="dict.type.sys_travelexpensebelong" :value="scope.row.costtype" /> @@ -75,14 +68,20 @@ <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span> </template> </el-table-column> - <el-table-column label="缁忓姙浜�" width="150" align="center" prop="username"> - </el-table-column><!-- + <el-table-column label="瀹℃牳鐘舵��" align="center" prop="recordstatus" width="160"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.sys_recordstatus" :value="scope.row.recordstatus" /> + </template> + </el-table-column> + <el-table-column label="缁忓姙浜�" width="150" align="center" prop="username" /> + <!-- <el-table-column label="鍑哄樊浜�" width="180" align="center" prop="travelers"> </el-table-column>--> <el-table-column label="鎶ラ攢閲戦" width="150" align="center" prop="amountrequested"> </el-table-column> - <el-table-column label="鍑哄樊浜嬬敱" align="center" width="500" prop="reason"> - </el-table-column> + <el-table-column label="鎵�灞炵粍鍒�" width="150" align="center" prop="deptmentname" /> + <el-table-column label="缁勯暱" width="150" align="center" prop="managername" /> + <el-table-column label="鍑哄樊浜嬬敱" align="center" prop="reason" /> <!-- <el-table-column label="鑱旂郴鐢佃瘽" width="120" align="center" prop="phone"> </el-table-column> <el-table-column label="寮�鎴烽摱琛�" width="180" align="center" prop="depositbank"> @@ -91,8 +90,7 @@ </el-table-column> <el-table-column label="鎶ラ攢鍚堣" align="center" prop="financechecher"/>--> <!-- <el-table-column label="璐㈠姟瀹℃牳" width="120" align="center" prop="financechecher" /> --> - <el-table-column label="鎹愮尞鑰�" width="150" align="center" prop="donorname"> - </el-table-column> + <el-table-column label="鎹愮尞鑰�" width="150" align="center" prop="donorname" /> <el-table-column label="鎿嶄綔" align="center" fixed="right" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" size="mini" type="text" @@ -124,8 +122,7 @@ placeholder="鐢宠鏃ユ湡"> </el-date-picker> </el-form-item> - </el-col> - <el-col :span="5"> + </el-col> <el-col :span="5"> <el-form-item label="缁忓姙浜�" prop="username"> <el-select v-model="form.username" clearable filterable allow-create ref="getReportname" default-first-option placeholder="璇烽�夋嫨"> @@ -134,15 +131,28 @@ </el-option> </el-select> </el-form-item> - </el-col><el-col :span="5"> - <el-form-item label="鍖哄煙缁勯暱" prop="managername"> - <el-input v-model="form.managername" placeholder="鍖哄煙缁勯暱" /> + </el-col> + <el-col :span="5"> + <el-form-item label="鎵�灞炵粍鍒�" prop="deptmentname"> + <el-input v-model="form.deptmentname" placeholder="鎵�灞炵粍鍒�" /> + <!--<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" />--> </el-form-item> </el-col> - - <el-col :span="5"> + <el-col :span="5"> + <el-form-item label="缁勯暱" prop="managername"> + <el-input v-model="form.managername" placeholder="缁勯暱" /> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="15"> + <el-form-item label="鍑哄樊浜嬬敱" prop="reason"> + <el-input v-model="form.reason" placeholder="鍑哄樊浜嬬敱" /> + </el-form-item> + </el-col> + <el-col :span="5"> <el-form-item label="鎹愮尞鑰�" prop="infoid"> - <el-select v-model="form.infoid" @change="selectbaseinfo" filterable disabled placeholder="璇烽�夋嫨鎹愮尞鑰�"> + <el-select v-model="form.infoid" @change="selectbaseinfo" filterable placeholder="璇烽�夋嫨鎹愮尞鑰�"> <el-option v-for="item in baselist" :key="item.index" :label="item.name" :value="item.infoid"> </el-option> </el-select> @@ -165,13 +175,6 @@ <el-option v-for="dict in dict.type.sys_recordstatus" :key="dict.value" :label="dict.label" :value="dict.value" /> </el-select> - </el-form-item> - </el-col> - </el-row> - <el-row> - <el-col :span="20"> - <el-form-item label="鍑哄樊浜嬬敱" prop="reason"> - <el-input v-model="form.reason" placeholder="鍑哄樊浜嬬敱" /> </el-form-item> </el-col> </el-row> @@ -272,7 +275,7 @@ </el-col> </el-row> --> - <el-row> + <el-row style="margin-top: 25px; margin-bottom: 5px"> <el-col :span="20">鎶ラ攢鏄庣粏褰曞叆锛�</el-col> </el-row> <el-row> @@ -321,7 +324,7 @@ if (scope.row.endtime) { return time.getTime() > new Date(scope.row.endtime.replace(/-/g, '/')) } } }" clearable size="small" style="width: 100%" v-model="scope.row.starttime" type="date" - value-format="yyyy-MM-dd HH:mm:ss" placeholder="寮�濮嬫棩鏈�" @blur="getallowance(scope.row)"> + value-format="yyyy-MM-dd HH:mm:ss" placeholder="寮�濮嬫棩鏈�" @blur="getdays(scope.row)"> </el-date-picker> </template> </el-table-column> @@ -332,7 +335,7 @@ if (scope.row.starttime) { return time.getTime() < new Date(scope.row.starttime.replace(/-/g, '/')) } } }" clearable size="small" style="width: 100%" v-model="scope.row.endtime" type="date" - value-format="yyyy-MM-dd HH:mm:ss" placeholder="缁撴潫鏃ユ湡" @blur="getallowance(scope.row)"> + value-format="yyyy-MM-dd HH:mm:ss" placeholder="缁撴潫鏃ユ湡" @blur="getdays(scope.row)"> </el-date-picker> </template> </el-table-column> @@ -341,21 +344,20 @@ <el-input v-model="scope.row.departure" placeholder="鍑哄彂鍦�" /> </template> </el-table-column> - <el-table-column label="鍒拌揪鍦�" prop="destination2" align="center" width="140"> + <el-table-column label="鍒拌揪鍦�" prop="destination" align="center" width="140"> <template slot-scope="scope"> <!-- <el-input v-model="scope.row.destination" placeholder="鍒拌揪鍦�" @blur="getallowance(scope.row)" /> --> - <el-select filterable allow-create v-model="scope.row.destination" value-key="value" placeholder="鍒拌揪鍦�" - @change="getallowance2(scope.row, scope.row.destination)"> + @change="getallowance(scope.row)"> <el-option v-for="dict in dict.type.sys_area_name" :key="dict.value" :label="dict.label" - :value="dict.value"></el-option> + :value="dict.label"></el-option> </el-select> </template> </el-table-column> <el-table-column prop="days" label="澶╂暟" width="65" align="center"> <template slot-scope="scope"> - <el-input v-model="scope.row.days" @blur="getStandard(scope.row)" placeholder="澶╂暟" /> + <el-input v-model="scope.row.days" @blur="getallowance(scope.row)" placeholder="澶╂暟" /> </template> </el-table-column> <el-table-column prop="traffictype" label="鍑哄彂浜ら�氬伐鍏�" align="center" width="100"> @@ -377,7 +379,7 @@ <el-table-column prop="trafficexpense" label="浜ら�氳垂" align="center" width="80"> <template slot-scope="scope"> <el-input v-model="scope.row.trafficexpense" placeholder="浜ら�氳垂" @blur="(val) => { - sumTotalFee(); + sumRowFee(scope.row); } " /> </template> @@ -387,7 +389,7 @@ <template slot-scope="scope"> <el-input v-model="scope.row.cityfee" placeholder="甯傚唴浜ら�氳垂" @blur=" (val) => { - sumTotalFee(); + sumRowFee(scope.row); } ">{{ Number(scope.row.cityfee).toFixed(2) }} </el-input> @@ -397,7 +399,7 @@ <el-table-column prop="hotelexpense" label="浣忓璐�" align="center" width="80"> <template slot-scope="scope"> <el-input v-model="scope.row.hotelexpense" placeholder="浣忓璐�" @blur="(val) => { - sumTotalFee(); + sumRowFee(scope.row); } " /> </template> @@ -406,7 +408,7 @@ <el-table-column prop="foodexpenses" label="椁愯垂鎶ラ攢" align="center" width="80"> <template slot-scope="scope"> <el-input v-model="scope.row.foodexpenses" placeholder="浼欓璐规姤閿�" @blur="(val) => { - sumTotalFee(); + sumRowFee(scope.row); } " /> </template> @@ -414,7 +416,7 @@ <el-table-column prop="foodallowance" label="浼欓琛ュ姪" align="center" width="80"> <template slot-scope="scope"> <el-input v-model="scope.row.foodallowance" placeholder="浼欓璐硅ˉ鍔�" @blur="(val) => { - sumTotalFee(); + sumRowFee(scope.row); } " /> </template> @@ -422,7 +424,7 @@ <el-table-column prop="otherexpense" label="鍏潅璐硅ˉ鍔�" align="center" width="80"> <template slot-scope="scope"> <el-input v-model="scope.row.otherexpense" placeholder="鏉傝垂" @blur="(val) => { - sumTotalFee(); + sumRowFee(scope.row); } " /> </template> @@ -431,7 +433,7 @@ <el-table-column prop="otherfeeamount" label="鍏朵粬璐圭敤" align="center" width="90"> <template slot-scope="scope"> <el-input v-model="scope.row.otherfeeamount" placeholder="鍏朵粬璐圭敤" @blur="(val) => { - sumTotalFee(); + sumRowFee(scope.row); } " /> </template> @@ -458,7 +460,7 @@ </el-table-column> </el-table> </el-row> - <el-row> + <el-row style="margin-top: 25px; margin-bottom: 5px"> <el-col :span="20">鎶ラ攢璇锋鏄庣粏锛�</el-col> </el-row> <el-row style="margin-top: 30px"> @@ -522,7 +524,7 @@ </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" @blur="getallowance(scope.row)"> + value-format="yyyy-MM-dd HH:mm:ss" placeholder="鎵撴鏃ユ湡" :disabled="true"> </el-date-picker> </template> </el-table-column> @@ -568,9 +570,8 @@ <el-input v-model="form.financedirector" placeholder="璐㈠姟閮ㄤ富浠�" /> </el-form-item> </el-col> - </el-row> - --> - <el-row> + </el-row> --> + <el-row style="margin-top: 25px; margin-bottom: 5px"> <el-col :span="14"> <!-- <el-form-item label="鏂囦欢鍦板潃" prop="fileurl"> @@ -579,8 +580,8 @@ --> <el-form-item label="鏂囦欢涓婁紶" align="left" prop="annexfiles"> <!-- <file-upload ref="fileUpload" :fileType=fileType :limit="1" :on-success="handleUploadSuccess"></file-upload> --> - <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileList" multiple :limit="5" - :headers="headers" :on-success="(response, file, fileList) => + <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-exceed="handleExceed" :on-remove="remove" accept="image/*,.pdf"> @@ -610,6 +611,8 @@ </template> <script> +import Treeselect from "@riophae/vue-treeselect"; +import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import { listDonatebaseinfo } from "@/api/project/donatebaseinfo"; import { listReimbursementpayee, addReimbursementpayee, updateReimbursementpayee } from "@/api/project/reimbursementpayee"; import { @@ -635,12 +638,14 @@ import { getInfoBytheUserNo } from "@/api/project/externalperson"; import { regionDataPlus, CodeToText } from "element-china-area-data"; import Li_area_select from "@/components/Address"; -import { getUserProfile } from "@/api/system/user"; +import { getUser,getUserProfile } from "@/api/system/user"; +import { treeselect } from "@/api/system/dept"; import { getSubsidy } from "@/api/project/travelcity"; import { listReportname, listUser } from "@/api/project/organization"; import { getToken } from "@/utils/auth"; export default { components: { + Treeselect, Li_area_select, }, name: "Funddetail", @@ -667,7 +672,9 @@ //鍏ㄩ儴浜哄憳 personsList: [], //涓嬫媺鍙互閫夋嫨浜哄憳鍒楄〃 - personsSel: [], + personsSel: [], + // 閮ㄩ棬鏍戦�夐」 + deptOptions: undefined, costtypeobj: { value: 0, @@ -712,7 +719,7 @@ remark: null, departure: null, endtime: null, - destination2: null, + destination: null, uploadFlag: null, uploadTime: null, // orderByColumn: "createTime", @@ -722,6 +729,11 @@ queryParams2: { persontype: null, arriveAddr: null, + }, + feesParams: { + beneficiaryNo: null, + starttime: null, + endtime: null, }, //鏌ヨ浠樻 queryParamsPayee: { @@ -738,6 +750,9 @@ ], reason: [ { required: true, message: "璇疯緭鍏ュ嚭宸簨鐢�", trigger: "blur" }, + ], + deptmentname: [ + { required: true, message: "璇疯緭鍏ユ墍灞炰笟鍔$粍", trigger: "blur" }, ], }, //璐圭敤鐢宠鍗昮orm @@ -802,6 +817,8 @@ //鑾峰彇鐧诲綍鑰呬俊鎭� this.getUsermsg(); + //鑾峰彇閮ㄩ棬淇℃伅 + //this.getTreeselect(); }, methods: { @@ -833,6 +850,13 @@ getUserProfile().then((response) => { this.defaultperson = response.data; this.standardlevel = response.data.standardlevel; + }); + }, + + /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */ + getTreeselect() { + treeselect().then(response => { + this.deptOptions = response.data; }); }, @@ -914,23 +938,25 @@ } }, - //璁$畻琛ュ姪 - getallowance(row) { - if ( - row.starttime != "" && - row.starttime != null && - row.endtime != "" && - row.endtime != null - ) { + //璁$畻鏃ユ湡 + getdays(row) { + if (row.starttime != "" && row.starttime != null && row.endtime != "" && row.endtime != null) { //璁$畻澶╂暟 row.days = (Math.floor(Math.abs(Date.parse(row.starttime) - Date.parse(row.endtime)) / (1000 * 3600 * 24)) + 1).toString() } else { - row.days = ''; + row.days = 0; }; + //璁$畻琛ュ姪 + this.getallowance(row); + }, + + //璁$畻琛ュ姪 + getallowance(row) { + console.log("ro",row); //鍏潅璐硅ˉ鍔╋細鏉窞妗愬簮锛屽缓寰凤紝娣冲畨60锛屾澀宸炲叾浠栧湴鍖�0锛岄潪鏉窞鍦板尯80 - if (row.destination2 != "") { - var tempStr = row.destination2; + if (row.destination != "") { + var tempStr = row.destination; //楠岃瘉鍩庡競 if (tempStr == "鏉窞") { @@ -947,12 +973,11 @@ //浼欓璐硅ˉ鍔╋細鍩庡競锛堣タ钘忥紝鏂扮枂锛岄潚娴�.120锛夛紙鍏朵粬100锛� row.foodallowance = (parseInt(row.days) * 100).toString(); - //璁$畻鍚堣 - this.sumTotalFee(); + //璁$畻鍚堣 + this.sumRowFee(row); }, getallowance2(row, val2) { - // this.getallowance(row); this.arriveAddr = val2; this.queryParams2.arriveAddr; this.queryParams2.personType = row; @@ -997,7 +1022,7 @@ row.hotelexpense = fee; }) .finally(() => { - this.sumTotalFee(row); + this.sumTotalFee(); }); } }, @@ -1010,7 +1035,7 @@ row.searchAddress.shi != "" && row.searchAddress.qu != "" ) { - row.destination2 = + row.destination = row.searchAddress.sheng + row.searchAddress.shi + row.searchAddress.qu; @@ -1215,8 +1240,13 @@ this.title = "鏂板鎶ラ攢鐢宠"; this.dialogType = "edit"; this.fundflowList = []; - this.form.username = this.defaultperson.nickName; + this.form.userno = this.defaultperson.userName; + this.form.username = this.defaultperson.nickName; + this.form.deptmentname = this.defaultperson.dept.deptName; + this.form.deptmentno = this.defaultperson.dept.deptId; + this.form.managername = this.defaultperson.dept.leader; + this.addDetailRow(0); this.addPayeeRow(0); }, @@ -1241,17 +1271,19 @@ getReimbursementdetaillist(ids).then((res) => { this.rbDetails = res.data; if (this.rbDetails.length == 0) { this.addDetailRow(0); } - //瑙f瀽鍑哄樊鍦板潃 - /* + for (let i = 0; i < this.rbDetails.length; i++) { - this.rbDetails[i].index = i; - this.rbDetails[i].searchAddress = { - sheng: this.rbDetails[i].travelprovincename, - shi: this.rbDetails[i].travelcityname, - qu: this.rbDetails[i].traveltownname, - }; + this.sumRowFee(this.rbDetails[i]); + //瑙f瀽鍑哄樊鍦板潃 + /* + this.rbDetails[i].index = i; + this.rbDetails[i].searchAddress = { + sheng: this.rbDetails[i].travelprovincename, + shi: this.rbDetails[i].travelcityname, + qu: this.rbDetails[i].traveltownname, + }; */ } - */ + //瀹炴椂鍚堣閲戦 //this.sumTotalFee(); }); @@ -1291,9 +1323,11 @@ listFundflow(listFundflowparams).then((res) => { this.fundflowList = res.rows; }); + //鎶ラ攢鏄庣粏 getReimbursementdetaillist(ids).then((res) => { this.rbDetails = res.data; + /* for (let i = 0; i < this.rbDetails.length; i++) { this.rbDetails[i].index = i; this.rbDetails[i].searchAddress = { @@ -1302,10 +1336,13 @@ qu: this.rbDetails[i].traveltownname, }; } - //this.sumTotalFee(); + */ }); - //璐︽埛 + if (this.rbDetails.length > 0) this.sumTotalFee(); + + + //浠樻淇℃伅 this.queryParamsPayee.rbid = ids; listReimbursementpayee(this.queryParamsPayee).then((res) => { this.rbPayees = res.rows; @@ -1500,7 +1537,7 @@ starttime: null, departure: null, endtime: null, - destination2: null, + destination: null, days: null, trafficexpense: 0, traffictype: null, @@ -1601,11 +1638,11 @@ this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); rows.splice(index, 1); this.recountOrderNo2(); - // this.sumTotalFee(); + this.sumTotalFee(); }); } else { rows.splice(index, 1); - //this.sumTotalFee(); + this.sumTotalFee(); this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); this.recountOrderNo2(); } @@ -1663,9 +1700,66 @@ }); }, + //璁$畻涓�琛屽悎璁� + //璁$畻褰撳墠琛屾姤閿�鍐呭璐圭敤鍚堣 + sumRowFee(row) { + let totalFee = 0; + if (!isNaN(parseFloat(row.trafficexpense))) { + totalFee += parseFloat(row.trafficexpense); + } + if (!isNaN(parseFloat(row.cityfee))) { + totalFee += parseFloat(row.cityfee); + } + if (!isNaN(parseFloat(row.hotelexpense))) { + totalFee += parseFloat(row.hotelexpense); + } + if (!isNaN(parseFloat(row.otherexpense))) { + totalFee += parseFloat(row.otherexpense); + } + if (!isNaN(parseFloat(row.foodexpenses))) { + totalFee += parseFloat(row.foodexpenses); + } + if (!isNaN(parseFloat(row.foodallowance))) { + totalFee += parseFloat(row.foodallowance); + } + if (!isNaN(parseFloat(row.otherfeeamount))) { + totalFee += parseFloat(row.otherfeeamount); + } + row.total = totalFee; + + /* + if (!isNaN(parseFloat(this.rbDetails[rowIndex].trafficexpense))) { + totalFee += parseFloat(this.rbDetails[rowIndex].trafficexpense); + } + if (!isNaN(parseFloat(this.rbDetails[rowIndex].cityfee))) { + totalFee += parseFloat(this.rbDetails[rowIndex].cityfee); + } + if (!isNaN(parseFloat(this.rbDetails[rowIndex].hotelexpense))) { + totalFee += parseFloat(this.rbDetails[rowIndex].hotelexpense); + } + if (!isNaN(parseFloat(this.rbDetails[rowIndex].otherexpense))) { + totalFee += parseFloat(this.rbDetails[rowIndex].otherexpense); + } + if (!isNaN(parseFloat(this.rbDetails[rowIndex].foodexpenses))) { + totalFee += parseFloat(this.rbDetails[rowIndex].foodexpenses); + } + if (!isNaN(parseFloat(this.rbDetails[rowIndex].foodallowance))) { + totalFee += parseFloat(this.rbDetails[rowIndex].foodallowance); + } + if (!isNaN(parseFloat(this.rbDetails[rowIndex].otherfeeamount))) { + totalFee += parseFloat(this.rbDetails[rowIndex].otherfeeamount); + } + this.rbDetails[rowIndex].total = parseFloat(totalFee).toFixed(2); + this.$set(this.rbDetails, rowIndex, this.rbDetails[rowIndex]); + */ + //閲嶆柊璁$畻鏁翠釜鎶ラ攢鍗曠殑鍚堣 + this.sumTotalFee(); + }, + //璁$畻璐圭敤鍚堣 sumTotalFee() { let allSum = 0; + //鎹愮尞鑰呭灞炶垂鐢� if (!isNaN(parseFloat(this.form.donoramount))) { allSum += parseFloat(this.form.donoramount); @@ -1674,10 +1768,11 @@ //鎶ラ攢鏄庣粏璐圭敤 try { for (let i = 0; i < this.rbDetails.length; i++) { + /* let totalFee = 0; //璁$畻褰撳墠鎶ラ攢鍐呭璐圭敤鍚堣 - if (!isNaN(parseFloat(this.rbDetails[i].trafficexpense))) { - totalFee += parseFloat(this.rbDetails[i].trafficexpense); + if (!isNaN(parseFloat(this.rbDetails[i].total))) { + totalFee += parseFloat(this.rbDetails[i].total); } if (!isNaN(parseFloat(this.rbDetails[i].cityfee))) { totalFee += parseFloat(this.rbDetails[i].cityfee); @@ -1699,6 +1794,8 @@ } this.rbDetails[i].total = parseFloat(totalFee).toFixed(2); this.$set(this.rbDetails, i, this.rbDetails[i]); + */ + if (!isNaN(parseFloat(this.rbDetails[i].total))) { allSum += parseFloat(this.rbDetails[i].total); } @@ -1707,21 +1804,6 @@ this.form.amountrequested = allSum.toFixed(2); this.form.bigstrmoney = this.convertCurrency(this.form.amountrequested); } catch { } - }, - - getDetailArr(rbid) { - getReimbursementdetaillist(rbid).then((res) => { - this.rbDetails = res.data; - for (let i = 0; i < this.rbDetails.length; i++) { - this.rbDetails[i].index = i; - this.rbDetails[i].searchAddress = { - sheng: this.rbDetails[i].travelprovincename, - shi: this.rbDetails[i].travelcityname, - qu: this.rbDetails[i].traveltownname, - }; - } - this.sumTotalFee(); - }); }, //閲戦鏁板瓧杞崲鎴愬ぇ鍐� -- Gitblit v1.9.3