|
@@ -148,29 +148,29 @@ export default {
|
|
let ret = []
|
|
let ret = []
|
|
let no = 0
|
|
let no = 0
|
|
listData.map((item, i) => {
|
|
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) {
|
|
if (item.rebateScopeList) {
|
|
- sub = this.filterData(sub, queryParam)
|
|
|
|
|
|
+ rebateScopeList = this.filterData(rebateScopeList, queryParam)
|
|
}
|
|
}
|
|
// 组织展开数据
|
|
// 组织展开数据
|
|
- sub.map((a, j) => {
|
|
|
|
|
|
+ rebateScopeList.map((a, j) => {
|
|
if (j == 0) {
|
|
if (j == 0) {
|
|
- a.rowspan = sub.length
|
|
|
|
|
|
+ a.rowspan = rebateScopeList.length
|
|
}
|
|
}
|
|
a.dealerUpsSn = item.dealerUpsSn
|
|
a.dealerUpsSn = item.dealerUpsSn
|
|
a.dealerSn = item.dealerSn
|
|
a.dealerSn = item.dealerSn
|
|
a.no = no + j + 1
|
|
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
|
|
a.rebateDealerList = item.rebateDealerList
|
|
})
|
|
})
|
|
- no = no + sub.length
|
|
|
|
- ret = ret.concat(sub)
|
|
|
|
|
|
+ no = no + rebateScopeList.length
|
|
|
|
+ ret = ret.concat(rebateScopeList)
|
|
})
|
|
})
|
|
return ret
|
|
return ret
|
|
},
|
|
},
|
|
@@ -184,9 +184,8 @@ export default {
|
|
this.$emit('loaded', res.data || [])
|
|
this.$emit('loaded', res.data || [])
|
|
this.dataSource = 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.tableHeight = (this.showEmpty ? 0 : this.maxHeight) + 'px'
|
|
this.spinning = false
|
|
this.spinning = false
|
|
this.disabled = false
|
|
this.disabled = false
|