diff --git a/src/subpackage/blacklist/pages/abnormal_list/abnormal_list.vue b/src/subpackage/blacklist/pages/abnormal_list/abnormal_list.vue index 9e30f69..e73ea36 100644 --- a/src/subpackage/blacklist/pages/abnormal_list/abnormal_list.vue +++ b/src/subpackage/blacklist/pages/abnormal_list/abnormal_list.vue @@ -102,10 +102,10 @@ export default { async onLoad(options){ try{ let _date = this.curDate = util.formatDate({}); - let _stadiumLs = await this.getStoreList({}); + let _stadiumLs = await this.getStoreList({ brand_id: options?.brand_id ?? '' }); let { curTimeTab } = this; this.getRecords({ - brand_id: options.brand_id, + brand_id: options?.brand_id ?? '', [ curTimeTab?.label || '-' ]: _date }); }catch(err){ diff --git a/src/subpackage/verification/pages/index.vue b/src/subpackage/verification/pages/index.vue index a064ed0..3878e1a 100644 --- a/src/subpackage/verification/pages/index.vue +++ b/src/subpackage/verification/pages/index.vue @@ -48,25 +48,40 @@ export default { } }, - onLoad(options){ + /** + * @param {String} options.brand_id 品牌id + * @param {String} options.stadium_id 场馆id + */ + async onLoad(options){ let _brand_id = options?.brand_id || ''; this.brand_id = _brand_id; - this.getStadiumLs({ brand_id: _brand_id }); + let _stadiumLs = await this.getStadiumLs({ brand_id: _brand_id }); + if(options?.stadium_id&&_stadiumLs?.length){ + // 设置选中场馆 + let _selected = _stadiumLs.find(ele => +ele.id === +(options?.stadium_id ?? '')); + if(_selected?.id)this.curStadium = _selected; + } }, methods: { // 现场人数 toSitePeople(){ - let { brand_id } = this; - routeTo(`/subpackage/verification/pages/site_people/index?brand_id=${brand_id}`, 'nT'); + let { brand_id, curStadium } = this; + let _qryStr = `brand_id=${brand_id}` + if(curStadium?.id) _qryStr += `&stadium_id=${curStadium.id}`; + routeTo(`/subpackage/verification/pages/site_people/index?${_qryStr}`, 'nT'); }, // 人数异常 toAbnormal(){ - let { brand_id } = this; - routeTo(`/subpackage/blacklist/pages/abnormal_list/abnormal_list?brand_id=${brand_id}`, 'nT'); + let { brand_id, curStadium } = this; + let _qryStr = `brand_id=${brand_id}` + if(curStadium?.id) _qryStr += `&stadium_id=${curStadium.id}`; + routeTo(`/subpackage/blacklist/pages/abnormal_list/abnormal_list?${_qryStr}`, 'nT'); }, toRecord(){ - let { brand_id } = this; - routeTo(`/subpackage/verification/pages/record?brand_id=${brand_id}`, 'nT'); + let { brand_id, curStadium } = this; + let _qryStr = `brand_id=${brand_id}` + if(curStadium?.id) _qryStr += `&stadium_id=${curStadium.id}`; + routeTo(`/subpackage/verification/pages/record?${_qryStr}`, 'nT'); }, confirmBtn: debounce(function(){ let { iptCode } = this; @@ -116,8 +131,7 @@ export default { let _data = res?.data || {}; if(_data.code === 0){ let _ls = _data?.data?.list || []; - this.stadiumList = _ls; - return _ls; + return this.stadiumList = _ls; }else{ return Promise.reject(_data); } diff --git a/src/subpackage/verification/pages/record.vue b/src/subpackage/verification/pages/record.vue index a0ad1f7..52cb385 100644 --- a/src/subpackage/verification/pages/record.vue +++ b/src/subpackage/verification/pages/record.vue @@ -109,9 +109,19 @@ export default { page: 1, } }, + /** + * @param {Object} options + * @param {String} options.brand_id // 品牌id + * @param {String} options.stadium_id // 场馆id + */ async onLoad(options){ this.brand_id = options?.brand_id ?? ''; - this.getStadiumLs({ brand_id: options?.brand_id ?? '' }); + let _stadiumLs = await this.getStadiumLs({ brand_id: options?.brand_id ?? '' }); + if(options?.stadium_id&&_stadiumLs?.length){ + // 设置选中场馆 + let _selected = _stadiumLs.find(ele => +ele.id === +(options?.stadium_id ?? '')); + if(_selected?.id)this.curStadium = _selected; + } this.reloadRecordLs(); }, onReachBottom(){ @@ -203,8 +213,7 @@ export default { let _data = res?.data || {}; if(_data.code === 0){ let _ls = _data?.data?.list || []; - this.stadiumList = _ls; - return _ls; + return this.stadiumList = _ls; }else{ return Promise.reject(_data); } diff --git a/src/subpackage/verification/pages/site_people/index.vue b/src/subpackage/verification/pages/site_people/index.vue index 324395a..60d0974 100644 --- a/src/subpackage/verification/pages/site_people/index.vue +++ b/src/subpackage/verification/pages/site_people/index.vue @@ -77,7 +77,10 @@ export default { } }, async onLoad(options){ - this.$refs.stadiumSelect.initStadium(options?.brand_id || '') + this.$refs.stadiumSelect.initStadium({ + brand_id: options?.brand_id ?? '', + stadium_id: options?.stadium_id ?? '', + }) .then(stadiumInfo=>{ if(!stadiumInfo?.id) return; this.stadiumInfo = stadiumInfo; diff --git a/src/subpackage/verification/pages/site_people/modules/not_leave_modal.vue b/src/subpackage/verification/pages/site_people/modules/not_leave_modal.vue index 38fbae4..8d263f1 100644 --- a/src/subpackage/verification/pages/site_people/modules/not_leave_modal.vue +++ b/src/subpackage/verification/pages/site_people/modules/not_leave_modal.vue @@ -29,6 +29,7 @@ export default { visible: false, notLeaveInfo: {}, brand_id: '', + stadium_id: '', } }, methods: { @@ -41,6 +42,7 @@ export default { initData(e){ let { igsType, key, stadium_id, brand_id } = e; this.brand_id = brand_id ?? ''; + this.stadium_id = stadium_id ?? ''; this.show(); let _keyName = igsType === 1 ? 'gate_id' : igsType === 2 ? 'venue_type_key' : ''; let _query = { brand_id, stadium_id }; @@ -71,8 +73,8 @@ export default { }) }, checkBtn(type){ - let { brand_id } = this; - if(type == 0)return routeTo(`/subpackage/verification/pages/record?brand_id=${brand_id?? ''}`, 'nT'); + let { brand_id, stadium_id } = this; + if(type == 0)return routeTo(`/subpackage/verification/pages/record?brand_id=${brand_id?? ''}&stadium_id=${stadium_id??''}`, 'nT'); if(type == 1)return routeTo(`/pages/order_list/order_list?order_type=1`, 'nT'); }, } diff --git a/src/subpackage/verification/pages/site_people/modules/stadium_select.vue b/src/subpackage/verification/pages/site_people/modules/stadium_select.vue index e7714e8..66441f3 100644 --- a/src/subpackage/verification/pages/site_people/modules/stadium_select.vue +++ b/src/subpackage/verification/pages/site_people/modules/stadium_select.vue @@ -27,7 +27,7 @@ export default { this.curStadium = stadiumLs?.[value] || {}; this.$emit('change:stadium', this.curStadium); }, - async initStadium(brand_id){ + async initStadium({ brand_id, stadium_id }){ try{ showLoad(); let _ls = await this.getStadiumLs({ brand_id }); @@ -36,10 +36,19 @@ export default { // }) this.stadiumLs = _ls || []; hideLoad(); - if(_ls.length){ + if(stadium_id&&_ls?.length){ + let _cur = _ls.find(e=>Number(e.id) === Number(stadium_id)); + if(_cur){ + this.curStadium = _cur; + return _cur; + } else { + this.curStadium = _ls[0]; + return _ls[0]; + } + } else if (_ls.length){ this.curStadium = _ls[0]; return _ls[0]; - }else{ + } else { showNone('暂无店铺信息!'); } }catch(err){