Forráskód Böngészése

对账管理-查询列表显示多条问题

dujingxian 4 éve
szülő
commit
9cca0b6ba4
1 módosított fájl, 8 hozzáadás és 1 törlés
  1. 8 1
      src/pages/subPages/reconciliation.vue

+ 8 - 1
src/pages/subPages/reconciliation.vue

@@ -125,7 +125,13 @@ export default {
         console.log('对账管理', res);
         if (res && res.code == 200) {
           this.recForm = res.datas
-          this.tableData.push(res.datas)
+          if (!this.tableData.length) {
+            this.tableData.push(res.datas)
+          } else {
+            const obj = this.tableData[0]
+            // console.log('obj', obj);
+            this.tableData[0] = Object.assign(obj, res.datas)
+          }
         }
         this.isLoading =  false
       } catch (error) {
@@ -145,6 +151,7 @@ export default {
       this.recForm.sendCount = 0
       this.recForm.refill_amounts = 0
       this.recForm.mch_amounts = 0
+      this.tableData = []
     },
     // 时间获取焦点
     hFocusDate() {