|
@@ -13,7 +13,7 @@
|
|
|
<div class="Entry-head">
|
|
|
<div class="Entry-head-li">
|
|
|
<label>团组名称:</label>
|
|
|
- <el-select style="width:250px" @change="chengvalue()" v-model="value" filterable placeholder="请选择">
|
|
|
+ <el-select style="width:250px" @change="chengvalue" v-model="value" filterable placeholder="请选择">
|
|
|
<el-option v-for="item in options" :key="item.id" :label="item.groupName" :value="item.id">
|
|
|
<span v-if="item.isNull=='false'" style="color:#409EFF">{{ item.groupName }}</span>
|
|
|
<span v-else style="color:gray">{{ item.groupName }}</span>
|
|
@@ -432,7 +432,7 @@
|
|
|
<el-input size="mini" v-model="scope.row.city"></el-input>
|
|
|
</template> -->
|
|
|
<template slot-scope="scope">
|
|
|
- <el-select @change="TrainingExpenseDataSelect(scope.row, $event)" size="mini"
|
|
|
+ <el-select @change="TrainingExpenseDataSelect(scope.row, $event, scope.$index)" size="mini"
|
|
|
v-model="scope.row.nationalTravelFeeId" filterable placeholder="请选择">
|
|
|
<el-option v-for="item in placeinif" :key="item.id" :label="item.cityname"
|
|
|
:value="item.id">
|
|
@@ -582,6 +582,7 @@
|
|
|
|
|
|
import { Decimal } from 'decimal.js'
|
|
|
import { debounce } from '../../store/statice'
|
|
|
+import { number } from 'echarts';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -611,6 +612,8 @@ export default {
|
|
|
|
|
|
isAssignPerm:false,
|
|
|
|
|
|
+ provinceId:'',
|
|
|
+
|
|
|
userId: '',
|
|
|
token: '',
|
|
|
value: '',
|
|
@@ -708,14 +711,15 @@ export default {
|
|
|
that.options = res.data.data.groupNameData;
|
|
|
that.currencys = res.data.data.currencyInit;
|
|
|
that.viewUsersarr= res.data.data.viewPermissionData;
|
|
|
- // console.log(that.value)
|
|
|
if (that.value == null) {
|
|
|
that.value = res.data.data.groupNameData[0].id;
|
|
|
+ that.provinceId = res.data.data.groupNameData[0].provinceId;
|
|
|
}
|
|
|
- that.listvalueoptions = res.data.data.wordTypeData;
|
|
|
- that.tablevalueoptions = res.data.data.excelTypeData;
|
|
|
+
|
|
|
that.GetEnterExitCostInfobyDiId();
|
|
|
that.PostGroupTeamRateByDiIdAndCTableId();
|
|
|
+ that.GetNationalTravelFeeData();
|
|
|
+ that.EnterExitCostFileOwner();
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -749,9 +753,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- console.log(that.othercurrencys);
|
|
|
- console.log(that.currencys);
|
|
|
-
|
|
|
} else {
|
|
|
that.$message.error(res.data.msg);
|
|
|
}
|
|
@@ -824,7 +825,6 @@ export default {
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code == 200) {
|
|
|
that.TicketJudgment = res.data.data.airData;
|
|
|
- console.log(that.TotalExpenses.EconomyClass);
|
|
|
if (that.TotalExpenses.EconomyClass==0) {
|
|
|
that.TotalExpenses.EconomyClass = that.TicketJudgment.jjcCurrentRate;
|
|
|
}
|
|
@@ -856,6 +856,24 @@ export default {
|
|
|
this.TotalExpenses.EconomyClass = this.TicketJudgment.jjcCurrentRate;
|
|
|
this.TotalExpenses.BusinessClass = this.TicketJudgment.gwcCurrentRate;
|
|
|
},
|
|
|
+ //获取文件
|
|
|
+ EnterExitCostFileOwner() {
|
|
|
+ this.listvalueoptions=[];
|
|
|
+ this.tablevalueoptions=[];
|
|
|
+ var url = "/api/Groups/EnterExitCostFileOwner/"+this.provinceId
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'get',
|
|
|
+ url: url,
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.listvalueoptions = res.data.data.wordTypeData;
|
|
|
+ that.tablevalueoptions = res.data.data.excelTypeData;
|
|
|
+ }else {
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取费用标注
|
|
|
GetNationalTravelFeeData() {
|
|
|
this.fullscreenLoading = true;
|
|
@@ -868,10 +886,10 @@ export default {
|
|
|
Authorization: 'Bearer ' + this.token
|
|
|
},
|
|
|
data: {
|
|
|
- portType: 1
|
|
|
+ portType: 1,
|
|
|
+ provinceId:that.provinceId,
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
- console.log(res)
|
|
|
let placeinifarr = [];
|
|
|
if (res.data.code == 200) {
|
|
|
for (let i = 0; i < res.data.data.length; i++) {
|
|
@@ -1439,7 +1457,8 @@ export default {
|
|
|
//住宿费
|
|
|
that.quarterageData = res.data.data.quarterageData;
|
|
|
for (let a = 0; a < res.data.data.quarterageData.length; a++) {
|
|
|
- that.TotalAccommodationFee += res.data.data.quarterageData[a].subTotal
|
|
|
+
|
|
|
+ that.TotalAccommodationFee += Number(res.data.data.quarterageData[a].subTotal)
|
|
|
}
|
|
|
//伙食费
|
|
|
that.boardWagesData = res.data.data.boardWagesData;
|
|
@@ -1521,12 +1540,8 @@ export default {
|
|
|
},
|
|
|
//下拉
|
|
|
handNodeClick(data, node, e) {
|
|
|
- // console.log(data)
|
|
|
- // console.log(node)
|
|
|
- // console.log(e)
|
|
|
this.treeDataValue = data.name
|
|
|
this.treeData = data.name
|
|
|
- // console.log(this.treeData)
|
|
|
},
|
|
|
//sr需求
|
|
|
SRrequirement(obj) {
|
|
@@ -1542,11 +1557,6 @@ export default {
|
|
|
this.otherData[l].subTotal = Number(this.otherData[l].cost) * Number(rate);
|
|
|
this.otherExpense += this.otherData[l].subTotal;
|
|
|
}
|
|
|
- console.log(this.otherData);
|
|
|
- console.log(rate);
|
|
|
- console.log(obj.currency);
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
//住宿地区选择
|
|
|
changeSelect(val, item, index) {
|
|
@@ -1566,9 +1576,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
val.subTotal = Number(val.cost) * Number(rate);
|
|
|
+
|
|
|
this.TotalAccommodationFee = 0;
|
|
|
for (let a = 0; a < this.quarterageData.length; a++) {
|
|
|
- this.TotalAccommodationFee += this.quarterageData[a].subTotal
|
|
|
+ this.TotalAccommodationFee += Number(this.quarterageData[a].subTotal.toFixed(2));
|
|
|
}
|
|
|
// this.mealschangeSelect(this.boardWagesData,item,index)
|
|
|
},
|
|
@@ -1583,7 +1594,7 @@ export default {
|
|
|
val.subTotal = Number(val.cost) * Number(rate);
|
|
|
this.TotalAccommodationFee = 0;
|
|
|
for (let a = 0; a < this.quarterageData.length; a++) {
|
|
|
- this.TotalAccommodationFee += this.quarterageData[a].subTotal
|
|
|
+ this.TotalAccommodationFee += Number(Number(this.quarterageData[a].subTotal).toFixed(2));
|
|
|
}
|
|
|
},
|
|
|
//伙食费费用标准值改变
|
|
@@ -1597,7 +1608,8 @@ export default {
|
|
|
val.subTotal = Number(val.cost) * Number(rate);
|
|
|
this.TotalMeals = 0;
|
|
|
for (let a = 0; a < this.boardWagesData.length; a++) {
|
|
|
- this.TotalMeals += this.boardWagesData[a].subTotal
|
|
|
+ // this.TotalMeals += this.boardWagesData[a].subTotal
|
|
|
+ this.TotalMeals += Number(Number(this.boardWagesData[a].subTotal).toFixed(2));
|
|
|
}
|
|
|
},
|
|
|
//伙食地区选择
|
|
@@ -1650,7 +1662,8 @@ export default {
|
|
|
val.subTotal = Number(val.cost) * Number(rate);
|
|
|
this.TotalMiscellaneous = 0;
|
|
|
for (let a = 0; a < this.miscellaneousFeeData.length; a++) {
|
|
|
- this.TotalMiscellaneous += this.miscellaneousFeeData[a].subTotal
|
|
|
+ // this.TotalMiscellaneous += this.miscellaneousFeeData[a].subTotal
|
|
|
+ this.TotalMiscellaneous += Number(Number(this.miscellaneousFeeData[a].subTotal).toFixed(2));
|
|
|
}
|
|
|
},
|
|
|
//公杂费地区选择
|
|
@@ -1689,12 +1702,11 @@ export default {
|
|
|
this.TotalMiscellaneous = 0;
|
|
|
for (let a = 0; a < this.miscellaneousFeeData.length; a++) {
|
|
|
this.TotalMiscellaneous += this.miscellaneousFeeData[a].subTotal
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
//培训费费用标准值改变
|
|
|
Traininginput(val) {
|
|
|
- console.log(val);
|
|
|
-
|
|
|
var rate = 0
|
|
|
for (let j = 0; j < this.currencys.length; j++) {
|
|
|
if (this.currencys[j].currencyName == val.currencyName) {
|
|
@@ -1704,29 +1716,46 @@ export default {
|
|
|
val.subTotal = Number(val.cost) * Number(rate);
|
|
|
this.trainingExpense = 0;
|
|
|
for (let a = 0; a < this.trainingExpenseData.length; a++) {
|
|
|
- this.trainingExpense += this.trainingExpenseData[a].subTotal
|
|
|
+ // this.trainingExpense += this.trainingExpenseData[a].subTotal
|
|
|
+ this.trainingExpense += Number(Number(this.trainingExpenseData[a].subTotal).toFixed(2));
|
|
|
}
|
|
|
},
|
|
|
//培训费地区选择
|
|
|
- TrainingExpenseDataSelect(val, item) {
|
|
|
- console.log(val);
|
|
|
- console.log(this.trainingExpenseData);
|
|
|
+ TrainingExpenseDataSelect(val, item,index) {
|
|
|
var rate = 0//汇率
|
|
|
var obj = {}
|
|
|
obj = this.placeinif.find(function (i) {
|
|
|
return i.id === item
|
|
|
});
|
|
|
//在change中获取到整条对象数据
|
|
|
- console.log(obj);
|
|
|
+ // if (index != undefined) {
|
|
|
+ // val[index].currencyName = obj.currencyName;
|
|
|
+ // val[index].currency = obj.currency;
|
|
|
+ // val[index].cost = obj.trainCost;
|
|
|
+ // val[index].nationalTravelFeeId = obj.id;
|
|
|
+ // for (let j = 0; j < this.currencys.length; j++) {
|
|
|
+ // if (this.currencys[j].currencyCode == obj.currencyCode) {
|
|
|
+ // rate = this.currencys[j].rate;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // val[index].subTotal = Number(val[index].cost) * Number(rate);
|
|
|
+ // this.trainingExpense=0;
|
|
|
+ // for (let a = 0; a < this.trainingExpenseData.length; a++) {
|
|
|
+ // this.trainingExpense += this.trainingExpenseData[a].subTotal
|
|
|
+ // }
|
|
|
+ // }
|
|
|
val.currencyName = obj.currencyName;
|
|
|
val.currency = obj.currency;
|
|
|
+ val.cost=obj.trainCost;
|
|
|
+
|
|
|
for (let j = 0; j < this.currencys.length; j++) {
|
|
|
if (this.currencys[j].currencyCode == obj.currencyCode) {
|
|
|
rate = this.currencys[j].rate;
|
|
|
}
|
|
|
}
|
|
|
- val.subTotal = Number(val.cost) * Number(rate);
|
|
|
|
|
|
+ val.subTotal = Number(val.cost) * Number(rate);
|
|
|
+ this.trainingExpense=0;
|
|
|
for (let a = 0; a < this.trainingExpenseData.length; a++) {
|
|
|
this.trainingExpense += this.trainingExpenseData[a].subTotal
|
|
|
}
|
|
@@ -1759,7 +1788,8 @@ export default {
|
|
|
val.subTotal = Number(val.cost) * Number(rate);
|
|
|
this.otherExpense = 0;
|
|
|
for (let a = 0; a < this.otherData.length; a++) {
|
|
|
- this.otherExpense += this.otherData[a].subTotal
|
|
|
+ // this.otherExpense += this.otherData[a].subTotal
|
|
|
+ this.otherExpense += Number(Number(this.otherData[a].subTotal).toFixed(2));
|
|
|
}
|
|
|
},
|
|
|
//新增list
|
|
@@ -1855,7 +1885,6 @@ export default {
|
|
|
},
|
|
|
//保存
|
|
|
storage: debounce(function () {
|
|
|
- console.log(this.currencys);
|
|
|
return new Promise((resolve, reject) => {
|
|
|
//住宿费
|
|
|
this.fullscreenLoading = true
|
|
@@ -1928,8 +1957,6 @@ export default {
|
|
|
}
|
|
|
//其他费
|
|
|
var otherDatas = [];
|
|
|
- console.log();
|
|
|
-
|
|
|
for (let c = 0; c < this.otherData.length; c++) {
|
|
|
if (this.otherData[c].setDataId != '') {
|
|
|
otherDatas.push({
|
|
@@ -2020,9 +2047,18 @@ export default {
|
|
|
|
|
|
},
|
|
|
//选择团组名称调用
|
|
|
- chengvalue() {
|
|
|
+ chengvalue(val) {
|
|
|
window.localStorage.setItem('sgvalue', this.value);
|
|
|
+ for(let i=0;i<this.options.length;i++){
|
|
|
+ if (val==this.options[i].id) {
|
|
|
+ console.log(this.options[i]);
|
|
|
+ this.provinceId=this.options[i].provinceId
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
this.fullscreenLoading = true;
|
|
|
+ this.EnterExitCostFileOwner();
|
|
|
+ this.GetNationalTravelFeeData();
|
|
|
this.GetEnterExitCostInfobyDiId();
|
|
|
this.PostGroupTeamRateByDiIdAndCTableId();
|
|
|
},
|
|
@@ -2099,8 +2135,6 @@ export default {
|
|
|
}
|
|
|
//其他费
|
|
|
var otherDatas = [];
|
|
|
- console.log();
|
|
|
-
|
|
|
for (let c = 0; c < this.otherData.length; c++) {
|
|
|
if (this.otherData[c].setDataId != '') {
|
|
|
otherDatas.push({
|
|
@@ -2293,7 +2327,6 @@ export default {
|
|
|
},
|
|
|
//其他删除
|
|
|
DeleteOtherExpenses(index, row, rows) {
|
|
|
- console.log(index, row, rows);
|
|
|
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
@@ -2401,7 +2434,6 @@ export default {
|
|
|
deleteUserId: that.userId
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
- console.log(res)
|
|
|
if (res.data.code == 200) {
|
|
|
that.$message({
|
|
|
type: 'success',
|
|
@@ -2488,8 +2520,7 @@ export default {
|
|
|
this.setpermissions=true;
|
|
|
},
|
|
|
handleCheckAllChange(val) {
|
|
|
- console.log(val);
|
|
|
- console.log(this.viewUsers);
|
|
|
+
|
|
|
|
|
|
},
|
|
|
//分配查看权限
|
|
@@ -2616,7 +2647,6 @@ export default {
|
|
|
this.calculation();
|
|
|
// this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
|
|
|
// this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
|
|
|
- // console.log(this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal)
|
|
|
},
|
|
|
},
|
|
|
'TotalExpenses.Firstclasstotal': {
|
|
@@ -2624,7 +2654,6 @@ export default {
|
|
|
this.calculation();
|
|
|
// this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
|
|
|
// this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
|
|
|
- // console.log(this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal)
|
|
|
},
|
|
|
},
|
|
|
|
|
@@ -2673,16 +2702,13 @@ export default {
|
|
|
currencys: {
|
|
|
handler(val) {
|
|
|
this.TotalAccommodationFee = 0
|
|
|
- console.log(val,this.quarterageData);
|
|
|
- console.log(this.currencys);
|
|
|
-
|
|
|
for (let q = 0; q < this.quarterageData.length; q++) {
|
|
|
for (let qc = 0; qc < this.currencys.length; qc++) {
|
|
|
if (this.currencys[qc].currencyCode == this.quarterageData[q].curremcyCode||this.currencys[qc].currencyName == this.quarterageData[q].currencyName) {
|
|
|
- this.quarterageData[q].subTotal = this.currencys[qc].rate * this.quarterageData[q].cost
|
|
|
+ this.quarterageData[q].subTotal = (this.currencys[qc].rate * this.quarterageData[q].cost).toFixed(2)
|
|
|
}
|
|
|
}
|
|
|
- this.TotalAccommodationFee += this.quarterageData[q].subTotal
|
|
|
+ this.TotalAccommodationFee += Number(this.quarterageData[q].subTotal);
|
|
|
}
|
|
|
//伙食费
|
|
|
this.TotalMeals = 0
|
|
@@ -2747,7 +2773,7 @@ export default {
|
|
|
this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
|
|
|
this.value = JSON.parse(localStorage.getItem('sgvalue'))
|
|
|
this.GetEnterExitCostDataSource();
|
|
|
- this.GetNationalTravelFeeData();
|
|
|
+ // this.GetNationalTravelFeeData();
|
|
|
},
|
|
|
destroyed() {
|
|
|
window.localStorage.removeItem('sgvalue');
|