瀏覽代碼

完成度问题修改

ymz 2 月之前
父節點
當前提交
fb253216ba

二進制
dist.zip


+ 4 - 3
src/views/paymentVoucherNotification/distributeVoucher/components/createDialig.vue

@@ -307,9 +307,6 @@ export default {
       const res = await redemptionValStatApi(id);
 
       if (res.data.code === 0) {
-        if (res.data.data.taskApprovedScoreRateNinetyPercent) {
-          this.$refs.table1.setInfo(res.data.data.taskApprovedScoreRateNinetyPercent);
-        }
         this.detailInfo = res.data.data;
         this.form.pkgName = res.data.data.pkgName;
         this.form.pkgScore = res.data.data.pkgScore;
@@ -324,6 +321,9 @@ export default {
         }
 
         this.$refs.table1.initInfo(this.detailInfo);
+        if (res.data.data.taskApprovedScoreRateNinetyPercent) {
+          this.$refs.table1.setInfo(res.data.data.taskApprovedScoreRateNinetyPercent);
+        }
       }
     },
     //  提交创建知会
@@ -392,6 +392,7 @@ export default {
     },
     close() {
       this.type = '';
+      this.$refs.table1.resetFields();
       this.formDisabled = false;
       this.form = {
         pkgName: '',

+ 8 - 3
src/views/paymentVoucherNotification/distributeVoucher/components/table/table1.vue

@@ -43,13 +43,18 @@ import BigNumber from 'bignumber.js';
 export default {
   data() {
     return {
-      tableData: tableData
+      tableData: JSON.parse(JSON.stringify(tableData))
     };
   },
   methods: {
     setInfo(info) {
-      const result = new BigNumber(info);
-      this.tableData[0].total = result;
+      const result = Number(info);
+      this.$set(this.tableData[0], 'total', result);
+      this.$forceUpdate();
+    },
+    resetFields() {
+      const tableDataCopy = JSON.parse(JSON.stringify(tableData));
+      this.tableData = tableDataCopy;
     },
     initInfo(info) {
       const tableDataCopy = JSON.parse(JSON.stringify(tableData));