|
@@ -136,45 +136,28 @@ export default {
|
|
|
listData = []
|
|
|
}
|
|
|
// 格式化数据
|
|
|
- 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)
|
|
|
- // })
|
|
|
+ let ret = []
|
|
|
+ let no = 0
|
|
|
+ listData.map((item, i) => {
|
|
|
+ const sub = item.rebateScopeList || [{ productBrandName: null, productTypeName1: null, productTypeName2: null, productTypeName3: null }]
|
|
|
+ const sup = item.rebateDealerList.find(b => b.rebateParentType == 'SUPERIORS')
|
|
|
+ this.checkedDealerSn.push(sup)
|
|
|
+
|
|
|
+ // 组织展开数据
|
|
|
+ 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 = item.rebateDealerList
|
|
|
+ })
|
|
|
+ no = no + sub.length
|
|
|
+ ret = ret.concat(sub)
|
|
|
+ })
|
|
|
console.log(ret)
|
|
|
this.list = ret
|
|
|
this.showEmpty = this.list.length <= 0
|