lilei 1 jaar geleden
bovenliggende
commit
fc87d1073e
1 gewijzigde bestanden met toevoegingen van 39 en 39 verwijderingen
  1. 39 39
      src/views/dealerManagement/rebateBinding/categoryList.vue

+ 39 - 39
src/views/dealerManagement/rebateBinding/categoryList.vue

@@ -136,45 +136,45 @@ export default {
         listData = []
       }
       // 格式化数据
-      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)
-        const rebateDealerList = item.rebateDealerList
-        // 筛选条件
-        sub = sub.filter(s => {
-          let cs = true
-          let bs = true
-          const plen = Object.keys(queryParam).length
-          const xi = queryParam.productBrandSn ? 3 : 2
-          bs = queryParam.productBrandSn ? s.productBrandSn == queryParam.productBrandSn : true
-          if (plen == xi) {
-            cs = queryParam.productTypeSn1 == s.productTypeSn1
-          } else if (plen == xi + 1) {
-            cs = queryParam.productTypeSn1 == s.productTypeSn1 && queryParam.productTypeSn2 == s.productTypeSn2
-          } else if (plen == xi + 2) {
-            cs = queryParam.productTypeSn1 == s.productTypeSn1 && queryParam.productTypeSn2 == s.productTypeSn2 && queryParam.productTypeSn3 == s.productTypeSn3
-          }
-          console.log(queryParam, bs, cs, xi, plen)
-          return queryParam.productBrandSn ? bs && cs : cs
-        })
-        // 组织展开数据
-        sub.map((a, j) => {
-          if (j == 0) {
-            a.rowspan = sub.length
-          }
-          a.dealerUpsSn = item.dealerUpsSn
-          a.dealerSn = item.dealerSn
-          a.no = no + j + 1
-          a.sup = sup
-          a.superDealerName = sup.parentDealer.dealerName
-          a.rebateDealerList = rebateDealerList
-        })
-        no = no + sub.length
-        ret = ret.concat(sub)
-      })
+      const ret = []
+      const 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)
+      //   const rebateDealerList = item.rebateDealerList
+      //   // 筛选条件
+      //   sub = sub.filter(s => {
+      //     let cs = true
+      //     let bs = true
+      //     const plen = Object.keys(queryParam).length
+      //     const xi = queryParam.productBrandSn ? 3 : 2
+      //     bs = queryParam.productBrandSn ? s.productBrandSn == queryParam.productBrandSn : true
+      //     if (plen == xi) {
+      //       cs = queryParam.productTypeSn1 == s.productTypeSn1
+      //     } else if (plen == xi + 1) {
+      //       cs = queryParam.productTypeSn1 == s.productTypeSn1 && queryParam.productTypeSn2 == s.productTypeSn2
+      //     } else if (plen == xi + 2) {
+      //       cs = queryParam.productTypeSn1 == s.productTypeSn1 && queryParam.productTypeSn2 == s.productTypeSn2 && queryParam.productTypeSn3 == s.productTypeSn3
+      //     }
+      //     console.log(queryParam, bs, cs, xi, plen)
+      //     return queryParam.productBrandSn ? bs && cs : cs
+      //   })
+      //   // 组织展开数据
+      //   sub.map((a, j) => {
+      //     if (j == 0) {
+      //       a.rowspan = sub.length
+      //     }
+      //     a.dealerUpsSn = item.dealerUpsSn
+      //     a.dealerSn = item.dealerSn
+      //     a.no = no + j + 1
+      //     a.sup = sup
+      //     a.superDealerName = sup.parentDealer.dealerName
+      //     a.rebateDealerList = rebateDealerList
+      //   })
+      //   no = no + sub.length
+      //   ret = ret.concat(sub)
+      // })
       console.log(ret)
       this.list = ret
       this.showEmpty = this.list.length <= 0