From e930420046cef6895c90792845d87e22e49c45eb Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期三, 10 五月 2023 21:06:42 +0800
Subject: [PATCH] yxh
---
src/views/project/travelexpenseslist/index.vue | 842 ++++++++++++++++++++++++++++---------------------------
1 files changed, 426 insertions(+), 416 deletions(-)
diff --git a/src/views/project/travelexpenseslist/index.vue b/src/views/project/travelexpenseslist/index.vue
index 30584a2..c59d141 100644
--- a/src/views/project/travelexpenseslist/index.vue
+++ b/src/views/project/travelexpenseslist/index.vue
@@ -11,8 +11,8 @@
</el-col>
<el-col :span="6">
- <el-form-item label="鎶ラ攢浜�" prop="username">
- <el-input v-model="queryParams.username" placeholder="璇疯緭鍏ユ姤閿�浜�" clearable size="small"
+ <el-form-item label="缁忓姙浜�" prop="username">
+ <el-input v-model="queryParams.username" placeholder="璇疯緭鍏ョ粡鍔炰汉" clearable size="small"
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
@@ -67,35 +67,36 @@
<dict-tag :options="dict.type.sys_recordstatus" :value="scope.row.recordstatus" />
</template>
</el-table-column>
+ <!--
<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" />
</template>
- </el-table-column>
+ </el-table-column>-->
<el-table-column label="鐢宠鏃堕棿" width="120" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
- <el-table-column label="鎶ラ攢浜�" width="120" align="center" prop="username">
- </el-table-column>
+ <el-table-column label="缁忓姙浜�" width="120" align="center" prop="username">
+ </el-table-column><!--
<el-table-column label="鍑哄樊浜�" width="180" align="center" prop="travelers">
- </el-table-column>
+ </el-table-column>-->
<el-table-column label="鎶ラ攢閲戦" width="120" align="center" prop="amountrequested">
</el-table-column>
<el-table-column label="鍑哄樊浜嬬敱" align="center" width="280" prop="reason">
</el-table-column>
- <el-table-column label="鑱旂郴鐢佃瘽" width="120" align="center" prop="phone">
+ <!-- <el-table-column label="鑱旂郴鐢佃瘽" width="120" align="center" prop="phone">
</el-table-column>
<el-table-column label="寮�鎴烽摱琛�" width="180" align="center" prop="depositbank">
</el-table-column>
<el-table-column label="閾惰鍗″彿" width="180" align="center" prop="bankcardno">
</el-table-column>
- <!-- <el-table-column label="鎶ラ攢鍚堣" align="center" prop="financechecher"/>-->
+ <el-table-column label="鎶ラ攢鍚堣" align="center" prop="financechecher"/>-->
<!-- <el-table-column label="璐㈠姟瀹℃牳" width="120" align="center" prop="financechecher" /> -->
<el-table-column label="鎹愮尞鑰�" width="120" align="center" prop="donorname">
</el-table-column>
- <el-table-column label="鎿嶄綔" align="center" fixed="right" class-name="small-padding fixed-width" width="270">
+ <el-table-column label="鎿嶄綔" align="center" fixed="right" class-name="small-padding fixed-width" width="300">
<template slot-scope="scope">
<el-button v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" size="mini" type="text"
icon="el-icon-upload2" @click="handleup(scope.row)">涓婃姤</el-button>
@@ -103,9 +104,7 @@
icon="el-icon-edit" @click="handleUpdate(scope.row)">淇敼</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)">鏌ョ湅</el-button>
<!-- v-hasPermi="['project:funddetail:edit']" -->
- <el-button size="mini" type="text" icon="el-icon-download" @click="gettable(scope.row)">
- 涓嬭浇
- </el-button>
+ <el-button size="mini" type="text" icon="el-icon-download" @click="gettable(scope.row)"> 涓嬭浇 </el-button>
<!-- v-hasPermi="['project:funddetail:edit']" -->
<el-button v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" size="mini" type="text"
icon="el-icon-delete" @click="handleDelete(scope.row)">鍒犻櫎</el-button>
@@ -133,7 +132,7 @@
<el-form-item label="缁忓姙浜�" prop="username">
<el-select v-model="form.username" clearable filterable allow-create ref="getReportname"
default-first-option placeholder="璇烽�夋嫨">
- <el-option v-for="item in personList" :key="item.reportNo" :label="item.reportName"
+ <el-option v-for="item in personsList" :key="item.reportNo" :label="item.reportName"
:value="item.reportName">
</el-option>
</el-select>
@@ -188,9 +187,9 @@
</el-form-item>
</el-col>
<el-col :span="5">
- <el-form-item label="鎶ラ攢浜�" prop="travelers">
+ <el-form-item label="鍑哄樊浜�" prop="travelers">
<el-select v-model="form.travelers" clearable filterable allow-create ref="getReportname"
- default-first-option placeholder="璇烽�夋嫨" @change="selectedTraveler">
+ default-first-option placeholder="璇烽�夋嫨" @change="getAccountinfo()">
<el-option v-for="item in travelers" :key="item.reportNo" :label="item.reportName"
:value="item.reportName">
</el-option>
@@ -263,14 +262,17 @@
plain
icon="el-icon-plus"
size="mini"
- @click="addRow"
+ @click="addDetailRow"
>鏂板涓�琛�</el-button
>
</el-col>
</el-row>
- -->
+ -->
<el-row>
- <el-table :data="applicationDetailArr" border highlight-current-row>
+ <el-col :span="20">鎶ラ攢鏄庣粏褰曞叆锛�</el-col>
+ </el-row>
+ <el-row>
+ <el-table :data="rbDetails" border highlight-current-row>
<el-table-column prop="orderno" slot="" label="搴忓彿" align="center" fixed width="65">
<template slot-scope="scope">
<el-input v-model="scope.row.orderno" placeholder="搴忓彿" />
@@ -291,21 +293,18 @@
<el-table-column prop="persontype" slot="" label="浜哄憳绫诲埆" align="center" fixed width="120">
<template slot-scope="scope">
<el-select v-model="scope.row.persontype" value-key="value" placeholder="浜哄憳绫诲埆"
- @change="getTravelers(scope.row)">
+ @change="getPersons(scope.row)">
<el-option v-for="dict in dict.type.sys_travelexpensebelong" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</template>
</el-table-column>
- <el-table-column prop="personname2" slot="" label="璐圭敤浜哄憳" align="center" fixed width="120">
- <!-- <template slot-scope="scope">
- <el-input v-model="scope.row.personname" placeholder="鍑哄樊浜�" />
- </template> -->
+ <el-table-column prop="personname" slot="" label="璐圭敤浜哄憳" align="center" fixed width="120">
<template slot-scope="scope">
<el-select v-model="scope.row.personname" clearable filterable allow-create default-first-option
- placeholder="璇烽�夋嫨" @focus="filterPersonList(scope.row)">
- <el-option v-for="item in scope.row.personname2" :key="item.reportNo" :label="item.reportName"
+ placeholder="璇烽�夋嫨" @focus1="getPersons(scope.row)">
+ <el-option v-for="item in personsSel" :key="item.reportNo" :label="item.reportName"
:value="item.reportName">
</el-option>
</el-select>
@@ -314,10 +313,10 @@
<el-table-column prop="starttime" slot="" label="寮�濮嬫棩鏈�" fixed align="center" width="150">
<template slot-scope="scope">
<el-date-picker :picker-options="{
- disabledDate: time => {
- 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"
+ disabledDate: time => {
+ 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)">
</el-date-picker>
</template>
@@ -325,20 +324,20 @@
<el-table-column prop="endtime" slot="" label="缁撴潫鏃ユ湡" align="center" fixed width="150">
<template slot-scope="scope">
<el-date-picker :picker-options="{
- disabledDate: time => {
- 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"
+ disabledDate: time => {
+ 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)">
</el-date-picker>
</template>
</el-table-column>
- <el-table-column prop="departure" slot="" label="鍑哄彂鍦�" align="center" fixed width="100">
+ <el-table-column prop="departure" slot="" label="鍑哄彂鍦�" align="center" width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.departure" placeholder="鍑哄彂鍦�" />
</template>
</el-table-column>
- <el-table-column label="鍒拌揪鍦�" prop="destination2" align="center" fixed width="100">
+ <el-table-column label="鍒拌揪鍦�" prop="destination2" align="center" width="120">
<template slot-scope="scope">
<!-- <el-input v-model="scope.row.destination" placeholder="鍒拌揪鍦�" @blur="getallowance(scope.row)" /> -->
@@ -374,8 +373,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) => {
- sumTotalFee();
- }
+ sumTotalFee();
+ }
" />
</template>
</el-table-column>
@@ -394,8 +393,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) => {
- sumTotalFee();
- }
+ sumTotalFee();
+ }
" />
</template>
</el-table-column>
@@ -403,24 +402,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) => {
- sumTotalFee();
- }
+ sumTotalFee();
+ }
" />
</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) => {
- sumTotalFee();
- }
+ sumTotalFee();
+ }
" />
</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) => {
- sumTotalFee();
- }
+ sumTotalFee();
+ }
" />
</template>
</el-table-column>
@@ -428,8 +427,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) => {
- sumTotalFee();
- }
+ sumTotalFee();
+ }
" />
</template>
</el-table-column>
@@ -446,8 +445,8 @@
</el-table-column>
<el-table-column fixed="right" label="鎿嶄綔" align="center" width="120" v-if="dialogType == 'edit'">
<template slot-scope="scope">
- <el-button type="text" size="mini" @click="addRow(scope.$index)">鏂板</el-button>
- <el-button @click.native.prevent="deleteRow(scope.$index, applicationDetailArr, scope.row)
+ <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>
@@ -455,16 +454,18 @@
</el-table-column>
</el-table>
</el-row>
-
+ <el-row>
+ <el-col :span="20">鎶ラ攢璇锋鏄庣粏锛�</el-col>
+ </el-row>
<el-row style="margin-top: 30px">
- <el-table :data="applicationDetailArr2" border highlight-current-row>
- <el-table-column prop="col_orderno" slot="" label="搴忓彿" align="center" fixed width="65">
+ <el-table :data="rbPayees" border highlight-current-row>
+ <el-table-column prop="orderno" slot="" label="搴忓彿" align="center" fixed width="65">
<template slot-scope="scope">
- <el-input v-model="scope.row.col_orderno" placeholder="搴忓彿" />
+ <el-input v-model="scope.row.orderno" placeholder="搴忓彿" />
</template>
</el-table-column>
- <!--涓婚敭銆佸涓嶅睍绀�-->
+ <!--涓婚敭銆佸閿笉灞曠ず-->
<el-table-column prop="id" slot="" label="涓婚敭" align="center" fixed width="95" v-if="false">
<template slot-scope="scope">
<el-input v-model="scope.row.id" placeholder="id" />
@@ -476,49 +477,55 @@
</template>
</el-table-column>
- <el-table-column prop="col_personType" slot="" label="浜哄憳绫诲埆" align="center" fixed width="120">
+ <el-table-column prop="persontype" slot="" label="浜哄憳绫诲埆" align="center" fixed width="120">
<template slot-scope="scope">
- <el-select v-model="scope.row.col_personType" value-key="value" placeholder="浜哄憳绫诲埆"
- @change="getColTravelers(scope.row, scope.row.col_personType)">
+ <el-select v-model="scope.row.persontype" value-key="value" placeholder="浜哄憳绫诲埆"
+ @change="getPersons(scope.row)">
<el-option v-for="dict in dict.type.sys_travelexpensebelong" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</template>
</el-table-column>
- <el-table-column prop="col_personname2" slot="" label="鏀舵浜�" align="center" fixed width="130">
+ <el-table-column prop="personname" slot="" label="鏀舵浜�" align="center" fixed width="130">
<template slot-scope="scope">
- <el-select v-model="scope.row.col_personname" clearable filterable allow-create ref="getReportname"
- default-first-option placeholder="璇烽�夋嫨" @change="selectedColTraveler(scope.row)">
- <el-option v-for="item in scope.row.col_personname2" :key="item.reportNo" :label="item.reportName"
+ <el-select v-model="scope.row.personname" clearable filterable allow-create ref="getReportname"
+ default-first-option placeholder="璇烽�夋嫨" @change="getAccountinfo2(scope.row, scope.row.persontype)">
+ <el-option v-for="item in personsSel" :key="item.reportNo" :label="item.reportName"
:value="item.reportName">
</el-option>
</el-select>
</template>
</el-table-column>
- <el-table-column prop="col_bank" slot="" label="鏀舵閾惰" align="center" fixed width="260">
+ <el-table-column prop="bankname" slot="" label="閾惰鍚嶇О" align="center" fixed width="200">
<template slot-scope="scope">
- <el-input v-model="scope.row.col_bank" placeholder="鏀舵閾惰" />
+ <el-input v-model="scope.row.bankname" placeholder="閾惰鍚嶇О" />
</template>
</el-table-column>
- <el-table-column prop="col_accounts" slot="" label="鏀舵甯愬彿" align="center" fixed width="230">
+ <el-table-column prop="bankcardno" slot="" label="閾惰鍗″彿" align="center" fixed width="200">
<template slot-scope="scope">
- <el-input v-model="scope.row.col_accounts" placeholder="鏀舵甯愬彿" />
+ <el-input v-model="scope.row.bankcardno" placeholder="閾惰鍗″彿" />
</template>
</el-table-column>
- <el-table-column prop="col_date" slot="" label="浠樻鏃ユ湡" align="center" fixed width="150">
+ <el-table-column prop="amount" slot="" label="鎵撴閲戦" align="center" fixed width="130">
<template slot-scope="scope">
- <el-input v-model="scope.row.col_date" placeholder="浠樻鏃ユ湡" />
+ <el-input v-model="scope.row.amount" placeholder="鎵撴閲戦" />
</template>
</el-table-column>
- <el-table-column prop="col_illustrate" slot="" label="璇存槑" align="center" fixed width="310">
+ <el-table-column prop="remark" slot="" label="璇锋璇存槑" align="center" fixed width="280">
<template slot-scope="scope">
- <el-input v-model="scope.row.col_illustrate" placeholder="璇存槑" />
+ <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 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)">
+ </el-date-picker>
</template>
</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="col_addRow(scope.$index)">鏂板</el-button>
- <el-button @click.native.prevent="deleteRow2(scope.$index, applicationDetailArr2, scope.row)
+ <el-button type="text" size="mini" @click="addPayeeRow(scope.$index)">鏂板</el-button>
+ <el-button @click.native.prevent="deletePayeeRow(scope.$index, rbPayees, scope.row)
" type="text" size="small">
鍒犻櫎
</el-button>
@@ -570,7 +577,7 @@
<!-- <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) =>
- 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>
@@ -600,7 +607,7 @@
<script>
import { listDonatebaseinfo } from "@/api/project/donatebaseinfo";
-import { addOrUpdateRBpayee, listReimbursementpayee } from "@/api/project/reimbursementpayee";
+import { listReimbursementpayee, addReimbursementpayee, updateReimbursementpayee } from "@/api/project/reimbursementpayee";
import {
listReimbursement,
getReimbursement,
@@ -617,7 +624,7 @@
listReimbursementdetailid,
getReimbursementdetaillist,
delReimbursementdetail,
- updateReimbursementdetaillist,
+ addOrupdateReimbursementdetaillist,
getTravelStandard,
} from "@/api/project/reimbursementdetail";
import { listFundflow } from "@/api/project/fundflow";
@@ -642,17 +649,28 @@
"sys_travelexpensebelong",
"sys_traffictype",
"sys_area_name",
+ "sys_traffictype"
],
data() {
return {
- personList: [],
- travelers: [],
- coltravelers: [],
+ //OPO鍗忚皟鍛�
+ personsXty: [],
+ //OPO涓撹亴浜哄憳
+ personsZzry: [],
+ //OPO绠$悊浜哄憳
+ personsManager: [],
+ //OPO涓撳
+ personsExpert: [],
+ //鍏ㄩ儴浜哄憳
+ personsList: [],
+ //涓嬫媺鍙互閫夋嫨浜哄憳鍒楄〃
+ personsSel: [],
+
costtypeobj: {
value: 0,
label: "",
},
- userlist: [],
+
options: regionDataPlus,
selectedOptions: [],
searchAddress: {
@@ -694,12 +712,17 @@
destination2: null,
uploadFlag: null,
uploadTime: null,
+ // orderByColumn: "createTime",
orderByColumn: "id",
isAsc: "desc",
},
queryParams2: {
persontype: null,
arriveAddr: null,
+ },
+ //鏌ヨ浠樻
+ queryParamsPayee: {
+ rbid: null,
},
// 琛ㄥ崟鍙傛暟
form: {},
@@ -726,11 +749,12 @@
donorname: null,
bigstrmoney: null,
},
- applicationDetailArr: [],
- applicationDetailArr2: [],
+
+ rbDetails: [],
+ rbPayees: [],
arrr2: [],
baselist: [],
- balist: [],
+ donatorList: [],
standardlevel: 0,
defaultperson: {},
fundflowList: [],
@@ -751,42 +775,48 @@
},
};
},
+
created() {
+ //鑾峰彇璁板綍鍒楄〃
this.getList();
- this.getUserList();
+
+ //鑾峰彇鎶ラ攢涓殑浜哄憳淇℃伅
this.getPersonList();
},
+
mounted() {
+ //鑾峰彇鎹愮尞鑰呭鍚�
listDonatebaseinfo().then((res) => {
- // console.log("base鍩虹琛ㄦ暟鎹�", res.rows);
let list = res.rows;
let baseinfolist = [];
- this.balist = list;
+ this.donatorList = list;
list.forEach((element) => {
baseinfolist.push({
infoid: element.id,
name: element.name,
});
});
- // console.log("缁勫悎鐨勬柊鏁扮粍", baseinfolist);
+
if (baseinfolist != 0) {
this.baselist = baseinfolist;
}
});
+
+ //鑾峰彇鐧诲綍鑰呬俊鎭�
this.getUsermsg();
},
- methods: {
- alertMessage(row) {
- debugger
- },
+ methods: {
handleUploadError() { },
+
remove(file) {
this.fileList.splice(this.fileList.indexOf(file), 1)
},
+
handleExceed() {
this.$message.error(`涓婁紶鏂囦欢鏁伴噺涓嶈兘瓒呰繃 ${5} 涓�!`);
},
+
//鏂囦欢涓婁紶鎴愬姛鍥炶皟
uploadSccess(response, file, fileList) {
//鑾峰彇闄勪欢淇℃伅浣嶇疆
@@ -800,72 +830,7 @@
}
},
- //鑾峰彇浜哄憳鍒楄〃
- getPersonList() {
- //鑾峰彇鍚勭被鍒殑浜哄憳锛氬崗璋冨憳銆佷笓鑱屼汉鍛樸�佽礋璐d汉銆佷笓瀹�
- let persontypeArr = ["xty1", "zzry", "fzr", "expert"];
- for (let i = 0; i < persontypeArr.length; i++) {
- this.tempArrr = [];
- listReportname(persontypeArr[i]).then((res) => {
- this.tempArrr = res.data;
- this.personList = this.personList.concat(this.tempArrr);
- });
- }
- },
- //鑾峰彇涓�涓被鍒殑浜哄憳鍒楄〃
- filterPersonList(row) {
- let travelertype = row.persontype;
- },
-
- //鑾峰彇鍑哄樊浜哄垪琛�
- getTravelers(row, val) {
- //涓撹亴浜哄憳-1,鍗忚皟鍛�-2,涓撳-3,瀹跺睘-4,鍏朵粬浜哄憳-5
- let travelertype = "";
- if (row.persontype == "1") {
- travelertype = "zzry";
- } else if (row.persontype == "2") {
- travelertype = "xty1";
- } else if (row.persontype == "3") {
- travelertype = "expert";
- } else if (row.persontype == "4") {
- travelertype = "jiashu";
- } else if (row.persontype == "5") {
- travelertype = "fzr";
- }
- listReportname(travelertype).then((res) => {
- this.travelers = res.data;
- row.personname2 = res.data;
- });
- this.form.persontype = val;
- },
- //鑾峰彇鏀舵浜哄垪琛�
- getColTravelers(row, val2) {
- debugger;
- //涓撹亴浜哄憳-1,鍗忚皟鍛�-2,涓撳-3,瀹跺睘-4,鍏朵粬浜哄憳-5
- let travelertype = "";
- if (val2 == 1) {
- travelertype = "zzry";
- } else if (val2 == 2) {
- travelertype = "xty1";
- } else if (val2 == 3) {
- travelertype = "expert";
- } else if (val2e == 4) {
- travelertype = "jiashu";
- } else if (val2 == 5) {
- travelertype = "fzr";
- }
- listReportname(travelertype).then((res) => {
- this.travelers = res.data;
- row.col_personname2 = res.data;
- });
- this.col_personType = val2;
- },
-
- selectcosttype() {
- this.form.costtype = this.costtypeobj.value;
- this.form.costtypename = this.costtypeobj.label;
- },
-
+ //鑾峰彇鐧诲綍鐢ㄦ埛淇℃伅
getUsermsg() {
getUserProfile().then((response) => {
this.defaultperson = response.data;
@@ -873,13 +838,53 @@
});
},
- getUserList() {
- listUser().then((res) => {
- this.userlist = res.data;
+ //鑾峰彇浜哄憳鍒楄〃
+ getPersonList() {
+ //鑾峰彇OPO鍗忚皟鍛樺悕鍗�
+ listReportname("xty1").then((res) => {
+ this.personsXty = res.data;
+ this.personsList = this.personsXty;
+
+ //OPO涓撹亴浜哄憳鍚嶅崟
+ listReportname("zzry").then((res) => {
+ this.personsZzry = res.data;
+ this.personsList = this.personsList.concat(this.personsZzry);
+
+ //OPO绠$悊浜哄憳鍚嶅崟
+ listReportname("fzr").then((res) => {
+ this.personsManager = res.data;
+ this.personsList = this.personsList.concat(this.personsManager);
+
+ //OPO涓撳鍚嶅崟
+ listReportname("expert").then((res) => {
+ this.personsExpert = res.data;
+ this.personsList = this.personsList.concat(this.personsExpert);
+ });
+ });
+ });
});
},
- selectedTraveler() {
- this.travelers.map((res) => {
+
+ //鑾峰彇涓�涓被鍒殑浜哄憳鍒楄〃
+ getPersons(row) {
+ //涓撹亴浜哄憳-1,鍗忚皟鍛�-2,涓撳-3,瀹跺睘-4,鍏朵粬浜哄憳-5
+ let tmpList = null;
+ if (row.persontype == "1") {
+ this.personsSel = this.personsZzry;
+ } else if (row.persontype == "2") {
+ this.personsSel = this.personsXty;
+ } else if (row.persontype == "3") {
+ this.personsSel = this.personsExpert;
+ } else if (row.persontype == "4") {
+ this.personsSel = tmpList;
+ } else if (row.persontype == "5") {
+ this.personsSel = this.personsManager;
+ }
+ },
+
+ //鑾峰彇璁剧疆浜哄憳璐﹀彿淇℃伅
+ getAccountinfo() {
+ this.coltravelers.map((res) => {
if (res.reportName == this.form.travelers) {
getInfoBytheUserNo(res.reportNo).then((res) => {
this.form.depositbank = res.data.depositbank;
@@ -889,40 +894,28 @@
}
});
},
- //鑾峰彇鏀舵浜洪摱琛屽崱鍜屽笎鍙�
- selectedColTraveler(row) {
- let travelertype = "";
- if (row.col_personType == 1) {
- travelertype = "zzry";
- } else if (row.col_personType == 2) {
- travelertype = "xty1";
- } else if (row.col_personType == 3) {
- travelertype = "expert";
- } else if (row.col_personType == 4) {
- travelertype = "jiashu";
- } else if (row.col_personType == 5) {
- travelertype = "fzr";
+
+ //鑾峰彇璁剧疆浜哄憳璐﹀彿淇℃伅
+ getAccountinfo2(row, personType) {
+ let dataArr = [];
+ if (personType == 1) {
+ dataArr = this.personsZzry;
+ } else if (personType == 2) {
+ dataArr = this.personsXty;
+ } else if (personType == 3) {
+ dataArr = this.personsExpert;
+ } else if (personType == 5) {
+ dataArr = this.personsManager;
}
- listReportname(travelertype).then((res) => {
- let dataArr = res.data;
- for (let m = 0; m < dataArr.length; m++) {
- if (dataArr[m].reportName == row.col_personname) {
- row.col_bank = dataArr[m].depositbank;
- row.col_accounts = dataArr[m].bankcardno;
- };
- }
- });
- // this.coltravelers.map((res) => {
- // console.log("-----------------------------");
- // if (res.reportName == this.form.travelers) {
- // getInfoBytheUserNo(res.reportNo).then((res) => {
- // this.form.depositbank = res.data.depositbank;
- // this.form.bankcardno = res.data.bankcardno;
- // this.form.phone = res.data.telephone;
- // });
- // }
- // });
+
+ for (let m = 0; m < dataArr.length; m++) {
+ if (dataArr[m].reportName == row.personname) {
+ row.bankname = dataArr[m].depositbank;
+ row.bankcardno = dataArr[m].bankcardno;
+ };
+ }
},
+
//璁$畻琛ュ姪
getallowance(row) {
if (
@@ -964,20 +957,15 @@
//璁$畻鍚堣
this.sumTotalFee();
},
+
getallowance2(row, val2) {
- debugger;
// this.getallowance(row);
this.arriveAddr = val2;
this.queryParams2.arriveAddr;
this.queryParams2.personType = row;
- console.log(row.persontype);
- console.log(this.arriveAddr);
if (row.persontype != undefined && row.persontype == "2" || row.persontype == "5") {
- console.log(this.arriveAddr);
this.loading = true;
- debugger;
getSubsidy(val2).then((response) => {
- debugger
this.loading = false;
row.otherexpense = response.data.others;
row.foodallowance = response.data.food;
@@ -985,6 +973,7 @@
}
},
+
getStandard(row) {
if (
row.searchAddress.sheng != "" &&
@@ -1018,6 +1007,7 @@
});
}
},
+
selcetdestination(row) {
console.log("鐩殑鍦伴�夋嫨浜嬩欢", row, row.searchAddress);
//row.searchAddress = this.searchAddress;
@@ -1071,8 +1061,9 @@
return area;
},
+ //鑾峰彇鎹愮尞鑰呭熀鏈俊鎭細鎹愮尞缂栧彿銆佹崘鐚�呭鍚�
selectbaseinfo() {
- let list = this.balist;
+ let list = this.donatorList;
list.forEach((item) => {
if (item.id == this.form.infoid) {
this.form.donorno = item.donorno;
@@ -1118,10 +1109,10 @@
getList() {
this.loading = true;
listReimbursement(this.queryParams).then((response) => {
- console.log("宸梾璐规暟鎹垪琛�:", response);
this.reimbursementList = response.rows;
this.total = response.total;
this.loading = false;
+
});
},
// 鍙栨秷鎸夐挳
@@ -1131,7 +1122,6 @@
},
// 琛ㄥ崟閲嶇疆
reset() {
-
this.fileList = []
this.form = {
ceshi: {},
@@ -1177,14 +1167,15 @@
costtype: null,
costtypename: null,
};
- this.applicationDetailArr = [];
- this.applicationDetailArr2 = [];
+ this.rbDetails = [];
+ this.rbPayees = [];
this.resetForm("form");
},
//
handup(e) {
console.log("涓婃姤", e);
},
+
// 涓嬭浇鏂囦欢
downFile(item) {
const url = process.env.VUE_APP_BASE_API + item.url
@@ -1194,6 +1185,7 @@
a.href = url;
a.dispatchEvent(event);
},
+
/** 鎼滅储鎸夐挳鎿嶄綔 */
handleQuery() {
// console.log('pop',this.value1)
@@ -1208,6 +1200,7 @@
this.queryParams.pageNum = 1;
this.getList();
},
+
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
this.resetForm("queryForm");
@@ -1219,6 +1212,7 @@
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
+
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
this.reset();
@@ -1226,71 +1220,72 @@
this.fundflowList = [];
this.form.username = this.defaultperson.nickName;
this.form.userno = this.defaultperson.userName;
- this.addRow();
- this.col_addRow();
+ this.addDetailRow(0);
+ this.addPayeeRow(0);
this.open = true;
this.title = "娣诲姞鎶ラ攢鐢宠";
},
+
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
this.dialogType = "edit";
this.reset();
+
+ //鑾峰彇鎶ラ攢涓讳俊鎭�
const id = row.id || this.ids;
getReimbursement(id).then((response) => {
this.form = response.data;
this.fileList = this.form.annexfiles ? this.form.annexfiles.split(",").map(item => ({ url: item, name: item })) : []
this.form.recordstatus = response.data.recordstatus + "";
- this.open = true;
- this.title = "淇敼鎶ラ攢鐢宠";
+
+
let ids = response.data.id;
-
+ //鑾峰彇鎶ラ攢鏄庣粏淇℃伅
getReimbursementdetaillist(ids).then((res) => {
- if (res.data.length == 0) {
- return;
- }
- this.applicationDetailArr = res.data;
- for (let i = 0; i < this.applicationDetailArr.length; i++) {
- debugger;
- // this.applicationDetailArr[i].personname2 = res.data[i].personname;
- }
-
- for (let i = 0; i < this.applicationDetailArr.length; i++) {
- debugger;
- this.applicationDetailArr[i].index = i;
- this.applicationDetailArr[i].searchAddress = {
- sheng: this.applicationDetailArr[i].travelprovincename,
- shi: this.applicationDetailArr[i].travelcityname,
- qu: this.applicationDetailArr[i].traveltownname,
+ 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.sumTotalFee();
+ */
+ //瀹炴椂鍚堣閲戦
+ //this.sumTotalFee();
});
- let obj = { rbid: ids };
- listReimbursementpayee(obj).then((res) => {
- if (res.rows.length == 0) {
- return;
- }
- this.applicationDetailArr2 = res.rows;
- // this.sumTotalFee();
+
+ //鑾峰彇鎶ラ攢鎵撴淇℃伅
+ this.queryParamsPayee.rbid=ids;
+ listReimbursementpayee(this.queryParamsPayee).then((res) => {
+ this.rbPayees = res.rows;
+ if (this.rbPayees.length==0) {this.addPayeeRow(0);}
});
});
- //榛樿瀛樺湪涓�琛�
- this.addRow();
- this.col_addRow();
- this.selectedTraveler();
+
+ this.open = true;
+ this.title = "淇敼鎶ラ攢鐢宠";
},
+
/** 鏌ョ湅鎸夐挳鎿嶄綔 */
handleDetail(row) {
this.dialogType = "detail";
this.reset();
const id = row.id || this.ids;
+
+
getReimbursement(id).then((response) => {
this.form = response.data;
+ //闄勪欢
this.fileList = this.form.annexfiles ? this.form.annexfiles.split(",").map(item => ({ url: item, name: item })) : []
+ //瀹℃牳鐘舵��
this.form.recordstatus = response.data.recordstatus + "";
- this.open = true;
- this.title = "鏌ョ湅鎶ラ攢鐢宠";
+
let ids = response.data.id;
let listFundflowparams = {
fundid: row.id,
@@ -1299,146 +1294,169 @@
listFundflow(listFundflowparams).then((res) => {
this.fundflowList = res.rows;
});
+ //鎶ラ攢鏄庣粏
getReimbursementdetaillist(ids).then((res) => {
- this.applicationDetailArr = res.data;
- for (let i = 0; i < this.applicationDetailArr.length; i++) {
- this.applicationDetailArr[i].index = i;
- this.applicationDetailArr[i].searchAddress = {
- sheng: this.applicationDetailArr[i].travelprovincename,
- shi: this.applicationDetailArr[i].travelcityname,
- qu: this.applicationDetailArr[i].traveltownname,
+ 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();
});
+
+ //璐︽埛
+ getReimbursementpayeelist(ids).then((res) => {
+ this.rbPayees = res.data;
+ });
+
});
+
+ this.open = true;
+ this.title = "鏌ョ湅鎶ラ攢鐢宠";
},
+
/** 鎻愪氦鎸夐挳 */
submitForm() {
- debugger;
this.$refs["form"].validate((valid) => {
- debugger;
if (valid) {
- let indexErrTime = this.applicationDetailArr.findIndex((item) => {
- if (item.endtime && item.starttime) {
- let d = this.$moment(item.endtime).diff(
- this.$moment(item.starttime),
- "d"
- );
- if (d < 0) {
- return true;
- } else {
- return false;
- }
- } else {
- false;
- }
- });
+ /**
+ let indexErrTime = this.rbDetails.findIndex((item) => {
+ if (item.endtime && item.starttime) {
+ let d = this.$moment(item.endtime).diff(this.$moment(item.starttime), "d");
+ if (d < 0) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ false;
+ }
+ });
+
+ if (indexErrTime > -1) {
+ this.$message({
+ message: "绗�" + (indexErrTime + 1) + "琛屽埌杈炬棩鏈熸棭浜庡嚭鍙戞棩鏈�",
+ type: "warning",
+ });
+ return;
+ }
+
+ let emptyStartTimeindex = this.rbDetails.findIndex(
+ (item) => item.starttime == null || item.starttime == undefined || item.starttime == ""
+ );
+
+ if (emptyStartTimeindex > -1) {
+ this.$message({
+ message: "绗�" + (emptyStartTimeindex + 1) + "琛屽嚭鍙戞棩鏈熶负绌�",
+ type: "warning",
+ });
+ return;
+ }
+
+ let emptyEndTimeindex = this.rbDetails.findIndex(
+ (item) => item.endtime == null || item.endtime == undefined || item.endtime == ""
+ );
+
+ if (emptyEndTimeindex > -1) {
+ this.$message({
+ message: "绗�" + (emptyEndTimeindex + 1) + "琛屽埌杈炬棩鏈熶负绌�",
+ type: "warning",
+ });
+ return;
+ }
- if (indexErrTime > -1) {
- this.$message({
- message: "绗�" + (indexErrTime + 1) + "琛屽埌杈炬棩鏈熸棭浜庡嚭鍙戞棩鏈�",
- type: "warning",
- });
- return;
- }
-
- let emptyStartTimeindex = this.applicationDetailArr.findIndex(
- (item) =>
- item.starttime == null ||
- item.starttime == undefined ||
- item.starttime == ""
- );
-
- if (emptyStartTimeindex > -1) {
- this.$message({
- message: "绗�" + (emptyStartTimeindex + 1) + "琛屽嚭鍙戞棩鏈熶负绌�",
- type: "warning",
- });
- return;
- }
-
- let emptyEndTimeindex = this.applicationDetailArr.findIndex(
- (item) =>
- item.endtime == null ||
- item.endtime == undefined ||
- item.endtime == ""
- );
-
- if (emptyEndTimeindex > -1) {
- this.$message({
- message: "绗�" + (emptyEndTimeindex + 1) + "琛屽埌杈炬棩鏈熶负绌�",
- type: "warning",
- });
- return;
- }
-
+ //璐圭敤褰掑睘
let belongArr = this.dict.type.sys_travelexpensebelong;
let costtypeindex = belongArr.findIndex(
(item) => this.form.costtype == item.value
);
+ if (costtypeindex > -1) {
+ this.form.costtypename = belongArr[costtypeindex].label;
+ }
+ */
+
+ //闄勪欢鏂囦欢澶勭悊
let list = this.fileList;
if (list.length > 0) {
this.form.annexfiles = list.map(item => item.url).join(",");
}
- if (costtypeindex > -1) {
- this.form.costtypename = belongArr[costtypeindex].label;
- }
- if (this.form.id != null) {
- //rbid涓昏〃Id,鏂逛究鍚庨潰鍏宠仈涓昏〃
- let rbid = this.form.id;
- for (let i = 0; i < this.applicationDetailArr.length; i++) {
- this.applicationDetailArr[i].rbid = rbid;
- }
- updateReimbursement(this.form).then((response) => {
- updateReimbursementdetaillist(this.applicationDetailArr).then((response) => {
- //鏇存柊鏀粯琛ㄤ俊鎭�
- for (let i = 0; i < this.applicationDetailArr2.length; i++) {
- this.applicationDetailArr2[i].rbid = rbid;
- }
- addOrUpdateRBpayee(this.applicationDetailArr2);
- for (let i = 0; i < this.applicationDetailArr.length; i++) {
- if (this.applicationDetailArr[i].rbid != null) {
- updateReimbursementdetail(this.applicationDetailArr[i]);
- } else {
- this.applicationDetailArr[i].rbid = this.form.id;
- addReimbursementdetail(this.applicationDetailArr[i]);
- }
- }
- this.$modal.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- });
+
+ //鏍¢獙璇锋閲戦鍚堣鏄惁绛変簬鎶ラ攢鍗曢噾棰�
+ if (this.form.amountrequested != this.rbPayees.reduce((amount, item) => amount + Number(item.amount), 0.0)) {
+ this.$message({
+ message: "鎶ラ攢璇锋琛ㄤ腑鍚堣閲戦涓嶇瓑浜庢姤閿�鍗曠殑鎶ラ攢閲戦锛岃鏇存鍚庡啀淇濆瓨锛�",
+ type: "warning",
});
- } else {
- this.form.recordstatus = -1;
- const applicationDetailArr = [...this.applicationDetailArr]
- const applicationDetailArr2 = [...this.applicationDetailArr2]
- addReimbursement(this.form).then((response) => {
- this.$modal.msgSuccess("鏂板鎴愬姛");
+ return;
+ }
+
+ const rbDetails = [...this.rbDetails]
+ const rbPayees = [...this.rbPayees]
+ if (this.form.id != null) {
+ updateReimbursement(this.form).then((res) => {
+ //淇濆瓨鏄庣粏
+ for (let i = 0; i < rbDetails.length; i++) {
+ if (rbDetails[i].rbid != null) {
+ updateReimbursementdetail(rbDetails[i]);
+ } else {
+ //rbid鍏宠仈涓昏〃Id
+ rbDetails[i].rbid = this.form.id;
+ addReimbursementdetail(rbDetails[i]);
+ }
+ }
+
+ //淇濆瓨璐︽埛
+ for (let i = 0; i < rbPayees.length; i++) {
+ if (rbPayees[i].rbid != null) {
+ updateReimbursementpayee(rbPayees[i]);
+ } else {
+ //rbid鍏宠仈涓昏〃Id
+ rbPayees[i].rbid = this.form.id;
+ addReimbursementpayee(rbPayees[i]);
+ }
+ }
+
+ this.$modal.msgSuccess("淇敼鎶ラ攢鍗曚繚瀛樻垚鍔�!");
this.open = false;
this.getList();
- console.log(
- "涓昏〃鏂板鎴愬姛浜嗭細",
- response,
- this.applicationDetailArr
- );
- listReimbursementdetailid().then((res) => {
- let id = res.data;
- for (let i = 0; i < applicationDetailArr.length; i++) {
- applicationDetailArr[i].rbid = id;
- addReimbursementdetail(applicationDetailArr[i]);
- }
- for (let i = 0; i < applicationDetailArr2.length; i++) {
- applicationDetailArr2[i].rbid = id;
- }
- addOrUpdateRBpayee(applicationDetailArr2);
- });
+
+ }).catch(err => {
+ this.$modal.msgError("淇敼鎶ラ攢鍗曚繚瀛樺け璐ワ紒");
+ });
+ }
+ else {
+ this.form.recordstatus = -1;
+ addReimbursement(this.form).then((response) => {
+ //淇濆瓨鏄庣粏
+ for (let i = 0; i < rbDetails.length; i++) {
+ //rbid鍏宠仈涓昏〃Id
+ rbDetails[i].rbid = response.data;
+ addReimbursementdetail(rbDetails[i]);
+ }
+
+ //淇濆瓨璐﹀彿
+ for (let i = 0; i < rbPayees.length; i++) {
+ //rbid鍏宠仈涓昏〃Id
+ rbPayees[i].rbid = response.data;
+ addReimbursementpayee(rbPayees[i]);
+ }
+
+ this.$modal.msgSuccess("鏂板鎶ラ攢鍗曚繚瀛樻垚鍔�!");
+ this.open = false;
+ this.getList();
+
+ }).catch(err => {
+ this.$modal.msgError("鏂板鎶ラ攢鍗曚繚瀛樺け璐ワ紒");
});
}
}
});
},
+
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const ids = row.id || this.ids;
@@ -1455,6 +1473,7 @@
})
.catch(() => { });
},
+
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
const queryParams = this.queryParams;
@@ -1472,9 +1491,9 @@
},
//鏂板涓�琛�
- addRow(rowIndex) {
+ addDetailRow(rowIndex) {
let rowData = {
- //index: this.applicationDetailArr.length,
+ //index: this.rbDetails.length,
searchAddress: {
sheng: "",
shi: "",
@@ -1513,38 +1532,39 @@
destination: null,
};
if (rowIndex == undefined || rowIndex == null || rowIndex < 0) {
- this.applicationDetailArr.push(rowData);
+ this.rbDetails.push(rowData);
} else {
- this.applicationDetailArr.splice(rowIndex + 1, 0, rowData);
+ this.rbDetails.splice(rowIndex + 1, 0, rowData);
}
- for (let i = 0; i < this.applicationDetailArr.length; i++) {
- this.applicationDetailArr[i].orderno = i + 1;
+ for (let i = 0; i < this.rbDetails.length; i++) {
+ this.rbDetails[i].orderno = i + 1;
}
},
- col_addRow(rowIndex) {
+ addPayeeRow(rowIndex) {
let rowData = {
id: null,
- col_personType: null,
- col_personname: null,
- col_bank: null,
- col_accounts: null,
- col_date: null,
- col_illustrate: null,
- col_orderno: null,
- col_personname2: null,
+ personType: null,
+ personname: null,
+ bankname: null,
+ bankcardno: null,
+ paiddate: null,
+ remark: null,
+ orderno: null,
+ personname: null,
+ amount: null,
};
- if (rowIndex == undefined || rowIndex == null || rowIndex < 0) {
- this.applicationDetailArr2.push(rowData);
+ if (rowIndex == undefined || rowIndex == null || rowIndex <= 0) {
+ this.rbPayees.push(rowData);
} else {
- this.applicationDetailArr2.splice(rowIndex + 1, 0, rowData);
+ this.rbPayees.splice(rowIndex + 1, 0, rowData);
}
- for (let i = 0; i < this.applicationDetailArr2.length; i++) {
- this.applicationDetailArr2[i].col_orderno = i + 1;
+ for (let i = 0; i < this.rbPayees.length; i++) {
+ this.rbPayees[i].orderno = i + 1;
}
},
- deleteRow(index, rows, row) {
+ deleteDetailRow(index, rows, row) {
this.$confirm("鏄惁纭鍒犻櫎?", "鎻愮ず", {
confirmButtonText: "纭畾",
cancelButtonText: "鍙栨秷",
@@ -1571,7 +1591,7 @@
});
},
- deleteRow2(index, rows, row) {
+ deletePayeeRow(index, rows, row) {
this.$confirm("鏄惁纭鍒犻櫎?", "鎻愮ず", {
confirmButtonText: "纭畾",
cancelButtonText: "鍙栨秷",
@@ -1597,14 +1617,16 @@
//鍑犵偣鍙栨秷鐨勬彁绀�
});
},
+ //閲嶆柊璁$畻鎺掑簭
recountOrderNo() {
- for (let i = 0; i < this.applicationDetailArr.length; i++) {
- this.applicationDetailArr[i].orderno = i + 1;
+ for (let i = 0; i < this.rbDetails.length; i++) {
+ this.rbDetails[i].orderno = i + 1;
}
},
+ //閲嶆柊璁$畻鎺掑簭
recountOrderNo2() {
- for (let i = 0; i < this.applicationDetailArr2.length; i++) {
- this.applicationDetailArr2[i].orderno = i + 1;
+ for (let i = 0; i < this.rbPayees.length; i++) {
+ this.rbPayees[i].orderno = i + 1;
}
},
@@ -1646,7 +1668,6 @@
//璁$畻璐圭敤鍚堣
sumTotalFee() {
- // debugger;
let allSum = 0;
//鎹愮尞鑰呭灞炶垂鐢�
if (!isNaN(parseFloat(this.form.donoramount))) {
@@ -1655,34 +1676,34 @@
//鎶ラ攢鏄庣粏璐圭敤
try {
- for (let i = 0; i < this.applicationDetailArr.length; i++) {
+ for (let i = 0; i < this.rbDetails.length; i++) {
let totalFee = 0;
//璁$畻褰撳墠鎶ラ攢鍐呭璐圭敤鍚堣
- if (!isNaN(parseFloat(this.applicationDetailArr[i].trafficexpense))) {
- totalFee += parseFloat(this.applicationDetailArr[i].trafficexpense);
+ if (!isNaN(parseFloat(this.rbDetails[i].trafficexpense))) {
+ totalFee += parseFloat(this.rbDetails[i].trafficexpense);
}
- if (!isNaN(parseFloat(this.applicationDetailArr[i].cityfee))) {
- totalFee += parseFloat(this.applicationDetailArr[i].cityfee);
+ if (!isNaN(parseFloat(this.rbDetails[i].cityfee))) {
+ totalFee += parseFloat(this.rbDetails[i].cityfee);
}
- if (!isNaN(parseFloat(this.applicationDetailArr[i].hotelexpense))) {
- totalFee += parseFloat(this.applicationDetailArr[i].hotelexpense);
+ if (!isNaN(parseFloat(this.rbDetails[i].hotelexpense))) {
+ totalFee += parseFloat(this.rbDetails[i].hotelexpense);
}
- if (!isNaN(parseFloat(this.applicationDetailArr[i].otherexpense))) {
- totalFee += parseFloat(this.applicationDetailArr[i].otherexpense);
+ if (!isNaN(parseFloat(this.rbDetails[i].otherexpense))) {
+ totalFee += parseFloat(this.rbDetails[i].otherexpense);
}
- if (!isNaN(parseFloat(this.applicationDetailArr[i].foodexpenses))) {
- totalFee += parseFloat(this.applicationDetailArr[i].foodexpenses);
+ if (!isNaN(parseFloat(this.rbDetails[i].foodexpenses))) {
+ totalFee += parseFloat(this.rbDetails[i].foodexpenses);
}
- if (!isNaN(parseFloat(this.applicationDetailArr[i].foodallowance))) {
- totalFee += parseFloat(this.applicationDetailArr[i].foodallowance);
+ if (!isNaN(parseFloat(this.rbDetails[i].foodallowance))) {
+ totalFee += parseFloat(this.rbDetails[i].foodallowance);
}
- if (!isNaN(parseFloat(this.applicationDetailArr[i].otherfeeamount))) {
- totalFee += parseFloat(this.applicationDetailArr[i].otherfeeamount);
+ if (!isNaN(parseFloat(this.rbDetails[i].otherfeeamount))) {
+ totalFee += parseFloat(this.rbDetails[i].otherfeeamount);
}
- this.applicationDetailArr[i].total = parseFloat(totalFee).toFixed(2);
- this.$set(this.applicationDetailArr, i, this.applicationDetailArr[i]);
- if (!isNaN(parseFloat(this.applicationDetailArr[i].total))) {
- allSum += parseFloat(this.applicationDetailArr[i].total);
+ 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);
}
}
@@ -1693,34 +1714,23 @@
getDetailArr(rbid) {
getReimbursementdetaillist(rbid).then((res) => {
- this.applicationDetailArr = res.data;
- for (let i = 0; i < this.applicationDetailArr.length; i++) {
- this.applicationDetailArr[i].index = i;
- this.applicationDetailArr[i].searchAddress = {
- sheng: this.applicationDetailArr[i].travelprovincename,
- shi: this.applicationDetailArr[i].travelcityname,
- qu: this.applicationDetailArr[i].traveltownname,
+ 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();
});
},
- //閲戦澶у啓
+ //閲戦鏁板瓧杞崲鎴愬ぇ鍐�
convertCurrency(money) {
//姹夊瓧鐨勬暟瀛�
- var cnNums = new Array(
- "闆�",
- "澹�",
- "璐�",
- "鍙�",
- "鑲�",
- "浼�",
- "闄�",
- "鏌�",
- "鎹�",
- "鐜�"
- );
+ var cnNums = new Array("闆�", "澹�", "璐�", "鍙�", "鑲�", "浼�", "闄�", "鏌�", "鎹�", "鐜�");
//鍩烘湰鍗曚綅
var cnIntRadice = new Array("", "鎷�", "浣�", "浠�");
//瀵瑰簲鏁存暟閮ㄥ垎鎵╁睍鍗曚綅
--
Gitblit v1.9.3