Browse Source

0310草稿精度

liuhj 4 months ago
parent
commit
35aaab55a8
1 changed files with 9 additions and 8 deletions
  1. 9 8
      src/components/OP/EntryDetailsdraft.vue

+ 9 - 8
src/components/OP/EntryDetailsdraft.vue

@@ -2208,7 +2208,7 @@ export default {
             val.subTotal = Number(val.cost) * Number(rate);
             val.subTotal = Number(val.cost) * Number(rate);
             this.TotalAccommodationFee = 0;
             this.TotalAccommodationFee = 0;
             for (let a = 0; a < this.quarterageData.length; a++) {
             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)
             // this.mealschangeSelect(this.boardWagesData,item,index)
         },
         },
@@ -2223,7 +2223,7 @@ export default {
             val.subTotal = Number(val.cost) * Number(rate);
             val.subTotal = Number(val.cost) * Number(rate);
             this.TotalAccommodationFee = 0;
             this.TotalAccommodationFee = 0;
             for (let a = 0; a < this.quarterageData.length; a++) {
             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));
             }
             }
         },
         },
         //伙食费费用标准值改变
         //伙食费费用标准值改变
@@ -2237,7 +2237,7 @@ export default {
             val.subTotal = Number(val.cost) * Number(rate);
             val.subTotal = Number(val.cost) * Number(rate);
             this.TotalMeals = 0;
             this.TotalMeals = 0;
             for (let a = 0; a < this.boardWagesData.length; a++) {
             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));
             }
             }
         },
         },
         //伙食地区选择
         //伙食地区选择
@@ -2294,7 +2294,7 @@ export default {
             val.subTotal = Number(val.cost) * Number(rate);
             val.subTotal = Number(val.cost) * Number(rate);
             this.TotalMiscellaneous = 0;
             this.TotalMiscellaneous = 0;
             for (let a = 0; a < this.miscellaneousFeeData.length; a++) {
             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));
             }
             }
         },
         },
         //公杂费地区选择
         //公杂费地区选择
@@ -2351,7 +2351,8 @@ export default {
             val.subTotal = Number(val.cost) * Number(rate);
             val.subTotal = Number(val.cost) * Number(rate);
             this.trainingExpense = 0;
             this.trainingExpense = 0;
             for (let a = 0; a < this.trainingExpenseData.length; a++) {
             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));
+                
             }
             }
         },
         },
         //培训费地区选择
         //培训费地区选择
@@ -2408,7 +2409,7 @@ export default {
             val.subTotal = Number(val.cost) * Number(rate);
             val.subTotal = Number(val.cost) * Number(rate);
             this.otherExpense = 0;
             this.otherExpense = 0;
             for (let a = 0; a < this.otherData.length; a++) {
             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));
             }
             }
         },
         },
         //新增list
         //新增list
@@ -3349,10 +3350,10 @@ export default {
                 for (let q = 0; q < this.quarterageData.length; q++) {
                 for (let q = 0; q < this.quarterageData.length; q++) {
                     for (let qc = 0; qc < this.currencys.length; qc++) {
                     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) {
                         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
                 this.TotalMeals = 0