|
@@ -108,6 +108,7 @@
|
|
|
console.log('item', item);
|
|
|
if(this.serialType == item.key) return
|
|
|
this.serialType = item.key
|
|
|
+ this.marketPersonsSerialList = []
|
|
|
this.$refs.customScrollList.refresh()
|
|
|
},
|
|
|
/**
|
|
@@ -115,24 +116,32 @@
|
|
|
*/
|
|
|
async load(paging) {
|
|
|
try{
|
|
|
+ if(paging.page == 1) {
|
|
|
+ this.marketPersonsSerialList = []
|
|
|
+ }
|
|
|
this.$refs.customScrollList.showPullUp = true
|
|
|
let res = await this.$u.api.marketPersonsSerial({
|
|
|
noSign: 1,
|
|
|
userid: this.distribution_user_info.userId,
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
+ pageNum: paging.page,
|
|
|
+ pageSize: paging.size,
|
|
|
serialType: this.serialType
|
|
|
})
|
|
|
-
|
|
|
if(res && res.code ===200) {
|
|
|
if(res.data.rows){
|
|
|
- this.marketPersonsSerialList = this.marketPersonsSerialList.concat(res.data.rows)
|
|
|
+ let list = JSON.parse(JSON.stringify(this.marketPersonsSerialList))
|
|
|
+ res.data.rows.forEach(item=>{
|
|
|
+ list.push({
|
|
|
+ ...item
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.marketPersonsSerialList = list
|
|
|
}else {
|
|
|
- this.marketPersonsSerialList = []
|
|
|
+
|
|
|
}
|
|
|
this.$refs.customScrollList.loadSuccess({
|
|
|
list: this.marketPersonsSerialList,
|
|
|
- total: this.marketPersonsSerialList.length
|
|
|
+ total: res.data.total
|
|
|
})
|
|
|
} else {
|
|
|
this.$refs.customScrollList.loadSuccess({
|
|
@@ -169,14 +178,20 @@
|
|
|
})
|
|
|
if(res && res.code ===200) {
|
|
|
if(res.data.rows){
|
|
|
- this.marketPersonsSerialList = [].concat(res.data.rows)
|
|
|
+ let list = []
|
|
|
+ res.data.rows.forEach(item=>{
|
|
|
+ list.push({
|
|
|
+ ...item
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.marketPersonsSerialList = list
|
|
|
}else {
|
|
|
this.marketPersonsSerialList = []
|
|
|
}
|
|
|
// this.marketPersonsSerialList = null
|
|
|
this.$refs.customScrollList.refreshSuccess({
|
|
|
list: this.marketPersonsSerialList,
|
|
|
- total: this.marketPersonsSerialList.length
|
|
|
+ total: res.data.total
|
|
|
})
|
|
|
} else {
|
|
|
this.$refs.customScrollList.refreshSuccess({
|