From f7aff93b978fb1563f56fcd901798acb841bed46 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期三, 17 五月 2023 09:41:03 +0800
Subject: [PATCH] 修改了财务差旅费审批
---
vue.config.js | 1
src/views/project/travelexpenseslist/index.vue | 81 +++++++++++++++++++++-------------------
2 files changed, 42 insertions(+), 40 deletions(-)
diff --git a/src/views/project/travelexpenseslist/index.vue b/src/views/project/travelexpenseslist/index.vue
index 85f18fc..4d27765 100644
--- a/src/views/project/travelexpenseslist/index.vue
+++ b/src/views/project/travelexpenseslist/index.vue
@@ -62,7 +62,7 @@
<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="180">
+ <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>
@@ -73,18 +73,18 @@
<dict-tag :options="dict.type.sys_travelexpensebelong" :value="scope.row.costtype" />
</template>
</el-table-column>-->
- <el-table-column label="鐢宠鏃堕棿" width="120" align="center" prop="createTime">
+ <el-table-column label="鐢宠鏃堕棿" width="150" 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 label="缁忓姙浜�" width="150" align="center" prop="username">
</el-table-column><!--
<el-table-column label="鍑哄樊浜�" width="180" align="center" prop="travelers">
</el-table-column>-->
- <el-table-column label="鎶ラ攢閲戦" width="120" align="center" prop="amountrequested">
+ <el-table-column label="鎶ラ攢閲戦" width="150" align="center" prop="amountrequested">
</el-table-column>
- <el-table-column label="鍑哄樊浜嬬敱" align="center" width="280" prop="reason">
+ <el-table-column label="鍑哄樊浜嬬敱" align="center" width="500" prop="reason">
</el-table-column>
<!-- <el-table-column label="鑱旂郴鐢佃瘽" width="120" align="center" prop="phone">
</el-table-column>
@@ -94,9 +94,9 @@
</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="120" align="center" prop="donorname">
+ <el-table-column label="鎹愮尞鑰�" width="150" align="center" prop="donorname">
</el-table-column>
- <el-table-column label="鎿嶄綔" align="center" fixed="right" class-name="small-padding fixed-width" width="300">
+ <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"
icon="el-icon-upload2" @click="handleup(scope.row)">涓婃姤</el-button>
@@ -168,6 +168,13 @@
<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>
@@ -649,7 +656,6 @@
"sys_travelexpensebelong",
"sys_traffictype",
"sys_area_name",
- "sys_traffictype"
],
data() {
return {
@@ -925,34 +931,29 @@
row.endtime != null
) {
//璁$畻澶╂暟
- row.days = 1 + Math.floor(Math.abs(Date.parse(row.starttime) - Date.parse(row.endtime)) / (1099 * 3699 * 24))
-
- /*let aDate, oDate1, oDate2, Date_end,Date_start;
- Date_end = row.endtime.split(" "); //灏嗘椂闂翠互绌烘牸鍒掑垎涓轰袱涓暟缁� 绗竴涓暟缁勬槸 2019-05-20 绗簩涓暟缁勬槸 00锛�00锛�00
- aDate = Date_end[0].split("-"); //鑾峰彇绗竴涓暟缁勭殑鍊�
- oDate1 = new Date(aDate[0], aDate[1], aDate[2]); //灏嗗墠鍗婁釜鏁扮粍浠�-鎷嗗垎锛屾瘡涓�涓槸涓�涓暟鍊�
-
- Date_start = row.starttime.split(" ");
- aDate = Date_start[0].split("-");
- oDate2 = new Date(aDate[0], aDate[1], aDate[2]);
- row.days = 1+parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24); //鎶婄浉宸殑姣鏁拌浆鎹负澶╂暟
- */
+ row.days = (Math.floor(Math.abs(Date.parse(row.starttime) - Date.parse(row.endtime)) / (1000 * 3600 * 24)) + 1).toString()
} else {
- row.days = ''
+ row.days = '';
};
//鍏潅璐硅ˉ鍔╋細鏉窞妗愬簮锛屽缓寰凤紝娣冲畨60锛屾澀宸炲叾浠栧湴鍖�0锛岄潪鏉窞鍦板尯80
if (row.destination2 != "") {
- var str = row.destination2;
+ var tempStr = row.destination2;
+
//楠岃瘉鍩庡競
- ////if (str.indexOf("妗愬簮锛屽缓寰凤紝娣冲畨") !== -1) { };
- if (str.includes("鏉窞")) { row.otherexpense = parseInt(row.days) * 0 }
- else if (str.includes("妗愬簮") || str.includes("寤哄痉") || str.includes("娣冲畨")) { row.otherexpense = parseInt(row.days) * 60 }
- else { row.otherexpense = parseInt(row.days) * 80 };
+ if (tempStr == "鏉窞") {
+ row.otherexpense = '';
+ }
+ else if (tempStr == "鏉窞-妗愬簮" || tempStr == "鏉窞-寤哄痉" || tempStr == "鏉窞-娣冲畨") {
+ row.otherexpense = (parseInt(row.days) * 60).toString();
+ }
+ else {
+ row.otherexpense = (parseInt(row.days) * 80).toString();
+ };
}
//浼欓璐硅ˉ鍔╋細鍩庡競锛堣タ钘忥紝鏂扮枂锛岄潚娴�.120锛夛紙鍏朵粬100锛�
- row.foodallowance = parseInt(row.days) * 100
+ row.foodallowance = (parseInt(row.days) * 100).toString();
//璁$畻鍚堣
this.sumTotalFee();
@@ -994,6 +995,7 @@
patowncode: this.$refs["residenceSelect_" + row.index].getQu(),
standardlevel: this.standardlevel,
};
+
getTravelStandard(info)
.then((response) => {
let fee = 0;
@@ -1216,7 +1218,7 @@
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
this.reset();
-
+
this.open = true;
this.title = "鏂板鎶ラ攢鐢宠";
this.dialogType = "edit";
@@ -1246,7 +1248,7 @@
//鑾峰彇鎶ラ攢鏄庣粏淇℃伅
getReimbursementdetaillist(ids).then((res) => {
this.rbDetails = res.data;
- if (this.rbDetails.length==0) {this.addDetailRow(0);}
+ if (this.rbDetails.length == 0) { this.addDetailRow(0); }
//瑙f瀽鍑哄樊鍦板潃
/*
for (let i = 0; i < this.rbDetails.length; i++) {
@@ -1263,10 +1265,10 @@
});
//鑾峰彇鎶ラ攢鎵撴淇℃伅
- this.queryParamsPayee.rbid=ids;
+ this.queryParamsPayee.rbid = ids;
listReimbursementpayee(this.queryParamsPayee).then((res) => {
this.rbPayees = res.rows;
- if (this.rbPayees.length==0) {this.addPayeeRow(0);}
+ if (this.rbPayees.length == 0) { this.addPayeeRow(0); }
});
});
},
@@ -1276,7 +1278,7 @@
this.dialogType = "detail";
this.title = "鏌ョ湅鎶ラ攢鐢宠";
- this.reset();
+ this.reset();
this.open = true;
const id = row.id || this.ids;
@@ -1312,10 +1314,10 @@
});
//璐︽埛
- this.queryParamsPayee.rbid=ids;
+ this.queryParamsPayee.rbid = ids;
listReimbursementpayee(this.queryParamsPayee).then((res) => {
this.rbPayees = res.rows;
- if (this.rbPayees.length==0) {this.addPayeeRow(0);}
+ if (this.rbPayees.length == 0) { this.addPayeeRow(0); }
});
});
@@ -1346,11 +1348,11 @@
});
return;
}
-
+
let emptyStartTimeindex = this.rbDetails.findIndex(
(item) => item.starttime == null || item.starttime == undefined || item.starttime == ""
);
-
+
if (emptyStartTimeindex > -1) {
this.$message({
message: "绗�" + (emptyStartTimeindex + 1) + "琛屽嚭鍙戞棩鏈熶负绌�",
@@ -1358,11 +1360,11 @@
});
return;
}
-
+
let emptyEndTimeindex = this.rbDetails.findIndex(
(item) => item.endtime == null || item.endtime == undefined || item.endtime == ""
);
-
+
if (emptyEndTimeindex > -1) {
this.$message({
message: "绗�" + (emptyEndTimeindex + 1) + "琛屽埌杈炬棩鏈熶负绌�",
@@ -1370,7 +1372,7 @@
});
return;
}
-
+
//璐圭敤褰掑睘
let belongArr = this.dict.type.sys_travelexpensebelong;
let costtypeindex = belongArr.findIndex(
@@ -1510,6 +1512,7 @@
days: null,
trafficexpense: 0,
traffictype: null,
+ traffictype2: null,
cityfee: 0,
hotelexpense: 0,
invoicecount: null,
diff --git a/vue.config.js b/vue.config.js
index 67affe1..99d3645 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -34,7 +34,6 @@
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target:`http://localhost:8080`,
- //target: `http://192.168.2.3:8080`,
//target:`http://116.62.18.175:8080`,
//target: `https://slb.hospitalstar.com:9093`,
changeOrigin: true,
--
Gitblit v1.9.3