Browse Source

修改bug

QuKatie 3 years ago
parent
commit
d57be631c1
1 changed files with 20 additions and 7 deletions
  1. 20 7
      src/components/fee-info/main.vue

+ 20 - 7
src/components/fee-info/main.vue

@@ -498,7 +498,17 @@ export default {
     selectValue(value, row) {
       this.$set(row, "feeName", value.cname);
       this.$set(row, "ename", value.ename);
-      if (!this.feeOption.column.find(e => e.prop == "currency").hide) {
+      if (!row.currency) {
+        if (this.optionType == "GN") {
+          getParities({
+            currency: "CNY",
+            businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+          }).then(res => {
+            const data = res.data.data;
+            row.exchangeRate = data.receivableParities;
+          });
+        }
+      } else {
         this.currencyChange(row);
       }
     },
@@ -642,13 +652,16 @@ export default {
           corpId: this.corpId,
           corpName: corpName
         };
-        if (
-          this.feeOption.column.find(e => e.prop == "currency").hide &&
-          this.optionType == "GN"
-        ) {
-          params.exchangeRate = 1;
+        if (this.optionType == "GN") {
+          getParities({
+            currency: "CNY",
+            businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+          }).then(res => {
+            const data = res.data.data;
+            params.exchangeRate = data.receivableParities;
+            this.$refs.feeCrud.rowCellAdd(params);
+          });
         }
-        this.$refs.feeCrud.rowCellAdd(params);
       }
     },
     addRow() {