|
@ -82,7 +82,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
data(){ |
|
|
data(){ |
|
|
return { |
|
|
return { |
|
|
optionsQuery: {}, |
|
|
|
|
|
|
|
|
optionsQuery: { |
|
|
|
|
|
// stadium_id_filter |
|
|
|
|
|
// brand_id |
|
|
|
|
|
}, |
|
|
stadiumList: [], |
|
|
stadiumList: [], |
|
|
curStadium: {}, |
|
|
curStadium: {}, |
|
|
sceneList: [], |
|
|
sceneList: [], |
|
@ -98,8 +101,8 @@ export default { |
|
|
onReachBottom(){ |
|
|
onReachBottom(){ |
|
|
let { curStadium, optionsQuery, curScene, curDate, curType, page } = this; |
|
|
let { curStadium, optionsQuery, curScene, curDate, curType, page } = this; |
|
|
let _query = { |
|
|
let _query = { |
|
|
brand_id: optionsQuery.brand_id, |
|
|
|
|
|
stadium_id: optionsQuery.stadium_id == 0 ? -1 : curStadium.id, |
|
|
|
|
|
|
|
|
brand_id: optionsQuery.brand_id || '', |
|
|
|
|
|
stadium_id: curStadium.val || '', |
|
|
time_str: curDate, |
|
|
time_str: curDate, |
|
|
scene: curScene.scene, |
|
|
scene: curScene.scene, |
|
|
type: curType == 1 ? '退款' : '全部', |
|
|
type: curType == 1 ? '退款' : '全部', |
|
@ -119,8 +122,7 @@ export default { |
|
|
this.$nextTick(_=>this.refreshList()); |
|
|
this.$nextTick(_=>this.refreshList()); |
|
|
}, |
|
|
}, |
|
|
async initPage(options){ |
|
|
async initPage(options){ |
|
|
let _stadiumLs = []; |
|
|
|
|
|
if(!!options.stadium_id)_stadiumLs = await this.getStoreList(options.stadium_id); |
|
|
|
|
|
|
|
|
let _stadiumLs = await this.getStoreList(options.stadium_id_filter); |
|
|
let _sceneLs = await this.getSceneList(); |
|
|
let _sceneLs = await this.getSceneList(); |
|
|
this.curDate = util.formatDate({}); |
|
|
this.curDate = util.formatDate({}); |
|
|
this.$nextTick(_=>this.refreshList()); |
|
|
this.$nextTick(_=>this.refreshList()); |
|
@ -131,8 +133,8 @@ export default { |
|
|
this.recordLs = []; |
|
|
this.recordLs = []; |
|
|
|
|
|
|
|
|
let _query = { |
|
|
let _query = { |
|
|
brand_id: optionsQuery.brand_id, |
|
|
|
|
|
stadium_id: optionsQuery.stadium_id == 0 ? -1 : curStadium.id, |
|
|
|
|
|
|
|
|
brand_id: optionsQuery.brand_id || '', |
|
|
|
|
|
stadium_id: curStadium.val || '', |
|
|
time_str: curDate, |
|
|
time_str: curDate, |
|
|
scene: curScene.scene, |
|
|
scene: curScene.scene, |
|
|
type: curType == 1 ? '退款' : '全部' |
|
|
type: curType == 1 ? '退款' : '全部' |
|
@ -171,7 +173,7 @@ export default { |
|
|
url: API.consumeCountDetailLs, |
|
|
url: API.consumeCountDetailLs, |
|
|
data: { |
|
|
data: { |
|
|
brand_id, |
|
|
brand_id, |
|
|
stadium_id: stadium_id == 0 ? -1 : stadium_id == -2 ? '' : stadium_id, |
|
|
|
|
|
|
|
|
stadium_id: stadium_id, |
|
|
time_str, |
|
|
time_str, |
|
|
page, |
|
|
page, |
|
|
page_size, |
|
|
page_size, |
|
@ -193,29 +195,29 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 店铺列表 |
|
|
// 店铺列表 |
|
|
getStoreList(stadium_id = ''){ |
|
|
|
|
|
|
|
|
getStoreList(stadium_id_filter = ''){ |
|
|
let { optionsQuery } = this; |
|
|
let { optionsQuery } = this; |
|
|
return servers.get({ |
|
|
return servers.get({ |
|
|
url: API.stadiumList, |
|
|
|
|
|
|
|
|
url: API.consumeCountStadiumList, |
|
|
data: { |
|
|
data: { |
|
|
brand_id: optionsQuery.brand_id, |
|
|
|
|
|
|
|
|
brand_id: optionsQuery.brand_id || '', |
|
|
}, |
|
|
}, |
|
|
failMsg: '加载店铺列表失败!', |
|
|
failMsg: '加载店铺列表失败!', |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
.then(res=>{ |
|
|
.then(res=>{ |
|
|
let _list = res.list || []; |
|
|
|
|
|
let _all = { name: '全部', id: -2, } |
|
|
|
|
|
_list.unshift(_all); |
|
|
|
|
|
|
|
|
let _list = res || []; |
|
|
let _cur = null; |
|
|
let _cur = null; |
|
|
if(!!stadium_id){ |
|
|
|
|
|
let _fiLs = _list.filter(e=>e.id == stadium_id); |
|
|
|
|
|
|
|
|
// 页面传参 undefined => 'undefined' |
|
|
|
|
|
if(stadium_id_filter != undefined&&stadium_id_filter != 'undefined'){ |
|
|
|
|
|
let _fiLs = _list.filter(e=> e.val == stadium_id_filter); |
|
|
if(_fiLs.length)_cur = _fiLs[0]; |
|
|
if(_fiLs.length)_cur = _fiLs[0]; |
|
|
} |
|
|
} |
|
|
if(_cur&&_cur.id){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(_cur&&_cur.val){ |
|
|
this.curStadium = _cur; |
|
|
this.curStadium = _cur; |
|
|
}else{ |
|
|
}else{ |
|
|
this.curStadium = _all; |
|
|
|
|
|
|
|
|
this.curStadium = _list[0] || {}; |
|
|
} |
|
|
} |
|
|
return this.stadiumList = _list; |
|
|
return this.stadiumList = _list; |
|
|
}) |
|
|
}) |
|
@ -226,8 +228,8 @@ export default { |
|
|
return servers.get({ |
|
|
return servers.get({ |
|
|
url: API.consumeCountGetScene, |
|
|
url: API.consumeCountGetScene, |
|
|
data: { |
|
|
data: { |
|
|
brand_id: optionsQuery.brand_id, |
|
|
|
|
|
stadium_id: optionsQuery.stadium_id == 0 ? -1 : curStadium.id, |
|
|
|
|
|
|
|
|
brand_id: optionsQuery.brand_id || '', |
|
|
|
|
|
stadium_id: curStadium.val || '', |
|
|
}, |
|
|
}, |
|
|
failMsg: '加载场景列表失败!', |
|
|
failMsg: '加载场景列表失败!', |
|
|
|
|
|
|
|
|