Browse Source

107-2bug处理

ljb 7 months ago
parent
commit
450cb1018b
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/views/external-reports/external-manage/107-2.vue

+ 9 - 1
src/views/external-reports/external-manage/107-2.vue

@@ -490,6 +490,7 @@ import { exportBlob } from "@/api/common";
 import { getToken } from "@/util/auth";
 import { downloadXls } from "@/util/util";
 import { mapGetters } from "vuex";
+import Decimal from "decimal.js";
 
 export default {
   components: {
@@ -518,7 +519,14 @@ export default {
         this.loading = false;
         if (data.code == 200) {
           this.isLoad = true;
-          this.formData = data.data;
+          
+          let d43 = (new Decimal(data.data.d43 || 0).div(1000)).toFixed(2);
+          let d57 = (new Decimal(data.data.d7).sub(d43).sub(new Decimal(data.data.d58)).sub(new Decimal(data.data.d55)).sub(new Decimal(data.data.d56))).toFixed(2);
+          this.formData = {
+            ...data.data,
+            d43,
+            d57
+          };
         }
       }).catch(() => {
         this.loading = false;