|
@@ -705,6 +705,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //baoliuliangweixiaoshu
|
|
|
+ reservetwo(value) {
|
|
|
+ // 截取当前数据到小数点后两位
|
|
|
+ let realVal = new Decimal(value).toFixed(2)
|
|
|
+ return realVal
|
|
|
+ },
|
|
|
//获取团组
|
|
|
GetEnterExitCostDataSource() {
|
|
|
var url = "/api/Groups/GetEnterExitCostDataSource"
|
|
@@ -756,7 +762,7 @@ export default {
|
|
|
that.othercurrencys = res.data.data.teamRates;
|
|
|
for (let sr = 0; sr < that.othercurrencys.length; sr++) {
|
|
|
if (that.othercurrencys[sr].currencyCode != 'CNY') {
|
|
|
- that.othercurrencys[sr].rate = (that.othercurrencys[sr].rate * 1.03).toFixed(4)
|
|
|
+ that.othercurrencys[sr].rate = new Decimal(that.othercurrencys[sr].rate * 1.03).toFixed(4)
|
|
|
}
|
|
|
for (let y = 0; y < that.currencys.length; y++) {
|
|
|
if (that.currencys[y].currencyCode == that.othercurrencys[sr].currencyCode) {
|
|
@@ -1476,7 +1482,6 @@ export default {
|
|
|
//住宿费
|
|
|
that.quarterageData = res.data.data.quarterageData;
|
|
|
for (let a = 0; a < res.data.data.quarterageData.length; a++) {
|
|
|
-
|
|
|
that.TotalAccommodationFee += Number(res.data.data.quarterageData[a].subTotal)
|
|
|
}
|
|
|
//伙食费
|
|
@@ -1607,7 +1612,7 @@ export default {
|
|
|
|
|
|
this.TotalAccommodationFee = 0;
|
|
|
for (let a = 0; a < this.quarterageData.length; a++) {
|
|
|
- this.TotalAccommodationFee += Number(this.quarterageData[a].subTotal.toFixed(2));
|
|
|
+ this.TotalAccommodationFee += Number(new Decimal(this.quarterageData[a].subTotal).toFixed(2));
|
|
|
}
|
|
|
// this.mealschangeSelect(this.boardWagesData,item,index)
|
|
|
},
|
|
@@ -1622,7 +1627,7 @@ export default {
|
|
|
val.subTotal = Number(val.cost) * Number(rate);
|
|
|
this.TotalAccommodationFee = 0;
|
|
|
for (let a = 0; a < this.quarterageData.length; a++) {
|
|
|
- this.TotalAccommodationFee += Number(Number(this.quarterageData[a].subTotal).toFixed(2));
|
|
|
+ this.TotalAccommodationFee += Number(new Decimal(this.quarterageData[a].subTotal).toFixed(2));
|
|
|
}
|
|
|
},
|
|
|
//伙食费费用标准值改变
|
|
@@ -1637,7 +1642,7 @@ export default {
|
|
|
this.TotalMeals = 0;
|
|
|
for (let a = 0; a < this.boardWagesData.length; a++) {
|
|
|
// this.TotalMeals += this.boardWagesData[a].subTotal
|
|
|
- this.TotalMeals += Number(Number(this.boardWagesData[a].subTotal).toFixed(2));
|
|
|
+ this.TotalMeals += Number(new Decimal(this.boardWagesData[a].subTotal).toFixed(2));
|
|
|
}
|
|
|
},
|
|
|
//伙食地区选择
|
|
@@ -1695,7 +1700,7 @@ export default {
|
|
|
this.TotalMiscellaneous = 0;
|
|
|
for (let a = 0; a < this.miscellaneousFeeData.length; a++) {
|
|
|
// this.TotalMiscellaneous += this.miscellaneousFeeData[a].subTotal
|
|
|
- this.TotalMiscellaneous += Number(Number(this.miscellaneousFeeData[a].subTotal).toFixed(2));
|
|
|
+ this.TotalMiscellaneous += Number(new Decimal(this.miscellaneousFeeData[a].subTotal).toFixed(2));
|
|
|
}
|
|
|
},
|
|
|
//公杂费地区选择
|
|
@@ -1753,7 +1758,7 @@ export default {
|
|
|
this.trainingExpense = 0;
|
|
|
for (let a = 0; a < this.trainingExpenseData.length; a++) {
|
|
|
// this.trainingExpense += this.trainingExpenseData[a].subTotal
|
|
|
- this.trainingExpense += Number(Number(this.trainingExpenseData[a].subTotal).toFixed(2));
|
|
|
+ this.trainingExpense += Number(new Decimal(this.trainingExpenseData[a].subTotal).toFixed(2));
|
|
|
}
|
|
|
},
|
|
|
//培训费地区选择
|
|
@@ -1829,7 +1834,7 @@ export default {
|
|
|
this.otherExpense = 0;
|
|
|
for (let a = 0; a < this.otherData.length; a++) {
|
|
|
// this.otherExpense += this.otherData[a].subTotal
|
|
|
- this.otherExpense += Number(Number(this.otherData[a].subTotal).toFixed(2));
|
|
|
+ this.otherExpense += Number(new Decimal(this.otherData[a].subTotal).toFixed(2));
|
|
|
}
|
|
|
},
|
|
|
//新增list
|
|
@@ -2745,7 +2750,7 @@ export default {
|
|
|
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).toFixed(2)
|
|
|
+ this.quarterageData[q].subTotal = new Decimal(this.currencys[qc].rate * this.quarterageData[q].cost).toFixed(2)
|
|
|
}
|
|
|
}
|
|
|
this.TotalAccommodationFee += Number(this.quarterageData[q].subTotal);
|
|
@@ -2755,10 +2760,11 @@ export default {
|
|
|
for (let b = 0; b < this.boardWagesData.length; b++) {
|
|
|
for (let bc = 0; bc < this.currencys.length; bc++) {
|
|
|
if (this.currencys[bc].currencyCode == this.boardWagesData[b].curremcyCode||this.currencys[bc].currencyName == this.boardWagesData[b].currencyName) {
|
|
|
- this.boardWagesData[b].subTotal = this.currencys[bc].rate * this.boardWagesData[b].cost
|
|
|
+ this.boardWagesData[b].subTotal = new Decimal(this.currencys[bc].rate * this.boardWagesData[b].cost).toFixed(2)
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
- this.TotalMeals += this.boardWagesData[b].subTotal
|
|
|
+ this.TotalMeals += Number(this.boardWagesData[b].subTotal);
|
|
|
}
|
|
|
//公杂费
|
|
|
this.TotalMiscellaneous = 0
|