|
@@ -582,6 +582,7 @@
|
|
|
|
|
|
import { Decimal } from 'decimal.js'
|
|
|
import { debounce } from '../../store/statice'
|
|
|
+import { number } from 'echarts';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -708,7 +709,6 @@ 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;
|
|
|
}
|
|
@@ -749,9 +749,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- console.log(that.othercurrencys);
|
|
|
- console.log(that.currencys);
|
|
|
-
|
|
|
} else {
|
|
|
that.$message.error(res.data.msg);
|
|
|
}
|
|
@@ -824,7 +821,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;
|
|
|
}
|
|
@@ -871,7 +867,6 @@ export default {
|
|
|
portType: 1
|
|
|
}
|
|
|
}).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 +1434,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 +1517,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 +1534,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 +1553,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 +1571,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 +1585,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 +1639,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 +1679,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,20 +1693,18 @@ 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);
|
|
|
var rate = 0//汇率
|
|
|
var obj = {}
|
|
|
obj = this.placeinif.find(function (i) {
|
|
|
return i.id === item
|
|
|
});
|
|
|
//在change中获取到整条对象数据
|
|
|
- console.log(obj);
|
|
|
val.currencyName = obj.currencyName;
|
|
|
val.currency = obj.currency;
|
|
|
for (let j = 0; j < this.currencys.length; j++) {
|
|
@@ -1759,7 +1746,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 +1843,6 @@ export default {
|
|
|
},
|
|
|
//保存
|
|
|
storage: debounce(function () {
|
|
|
- console.log(this.currencys);
|
|
|
return new Promise((resolve, reject) => {
|
|
|
//住宿费
|
|
|
this.fullscreenLoading = true
|
|
@@ -1928,8 +1915,6 @@ export default {
|
|
|
}
|
|
|
//其他费
|
|
|
var otherDatas = [];
|
|
|
- console.log();
|
|
|
-
|
|
|
for (let c = 0; c < this.otherData.length; c++) {
|
|
|
if (this.otherData[c].setDataId != '') {
|
|
|
otherDatas.push({
|
|
@@ -2099,8 +2084,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 +2276,6 @@ export default {
|
|
|
},
|
|
|
//其他删除
|
|
|
DeleteOtherExpenses(index, row, rows) {
|
|
|
- console.log(index, row, rows);
|
|
|
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
@@ -2401,7 +2383,6 @@ export default {
|
|
|
deleteUserId: that.userId
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
- console.log(res)
|
|
|
if (res.data.code == 200) {
|
|
|
that.$message({
|
|
|
type: 'success',
|
|
@@ -2488,8 +2469,7 @@ export default {
|
|
|
this.setpermissions=true;
|
|
|
},
|
|
|
handleCheckAllChange(val) {
|
|
|
- console.log(val);
|
|
|
- console.log(this.viewUsers);
|
|
|
+
|
|
|
|
|
|
},
|
|
|
//分配查看权限
|
|
@@ -2616,7 +2596,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 +2603,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 +2651,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
|