lilei il y a 1 an
Parent
commit
0f0b0022fd
1 fichiers modifiés avec 13 ajouts et 14 suppressions
  1. 13 14
      src/views/dealerManagement/rebateBinding/categoryList.vue

+ 13 - 14
src/views/dealerManagement/rebateBinding/categoryList.vue

@@ -148,29 +148,29 @@ export default {
       let ret = []
       let no = 0
       listData.map((item, i) => {
-        let sub = item.rebateScopeList || [{ productBrandName: null, productTypeName1: null, productTypeName2: null, productTypeName3: null }]
-        const sup = item.rebateDealerList.find(b => b.rebateParentType == 'SUPERIORS')
-        // this.checkedDealerSn.push(sup)
+        let rebateScopeList = item.rebateScopeList || [{ productBrandName: null, productTypeName1: null, productTypeName2: null, productTypeName3: null }]
+        const rebateDealerList = item.rebateDealerList.find(b => b.rebateParentType == 'SUPERIORS')
+        // this.checkedDealerSn.push(rebateScopeList)
         // 筛选条件
         if (item.rebateScopeList) {
-          sub = this.filterData(sub, queryParam)
+          rebateScopeList = this.filterData(rebateScopeList, queryParam)
         }
         // 组织展开数据
-        sub.map((a, j) => {
+        rebateScopeList.map((a, j) => {
           if (j == 0) {
-            a.rowspan = sub.length
+            a.rowspan = rebateScopeList.length
           }
           a.dealerUpsSn = item.dealerUpsSn
           a.dealerSn = item.dealerSn
           a.no = no + j + 1
-          if (sup) {
-            a.sup = sup
-            a.superDealerName = sup.parentDealer.dealerName
+          if (rebateDealerList) {
+            a.rebateDealerList = rebateDealerList
+            a.superDealerName = rebateDealerList.parentDealer.dealerName
           }
           a.rebateDealerList = item.rebateDealerList
         })
-        no = no + sub.length
-        ret = ret.concat(sub)
+        no = no + rebateScopeList.length
+        ret = ret.concat(rebateScopeList)
       })
       return ret
     },
@@ -184,9 +184,8 @@ export default {
         this.$emit('loaded', res.data || [])
         this.dataSource = res.data || []
         // 处理数据
-        // this.list = this.formatData(this.dataSource, queryParam)
-        this.list = res.data || []
-        this.showEmpty = this.dataSource.length <= 0
+        this.list = this.formatData(this.dataSource, queryParam)
+        this.showEmpty = this.list.length <= 0
         this.tableHeight = (this.showEmpty ? 0 : this.maxHeight) + 'px'
         this.spinning = false
         this.disabled = false