|
|
@ -12,13 +12,20 @@ |
|
|
|
</picker> |
|
|
|
</view> |
|
|
|
<view class="al-date"> |
|
|
|
<picker :range="timeTabs" @change="timeTabChange" range-key="name"> |
|
|
|
<view class="ad-content"> |
|
|
|
<view class="ac-txt">{{ curTimeTab.name || '-' }}</view> |
|
|
|
<image class="ac-icon" mode="aspectFit" src="/subpackage/blacklist/static/images/triangle.png"></image> |
|
|
|
</view> |
|
|
|
</picker> |
|
|
|
<picker mode="date" @change="dateChange"> |
|
|
|
<view class="ad-content"> |
|
|
|
<view class="ac-txt">核销日期:{{ curDate || '' }}</view> |
|
|
|
<view class="ac-txt">{{ curDate || '' }}</view> |
|
|
|
<image class="ac-icon" mode="aspectFit" src="/subpackage/blacklist/static/images/triangle.png"></image> |
|
|
|
</view> |
|
|
|
</picker> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="al-list"> |
|
|
|
<view class="al-item" v-for="(e, i) in blackLs" :key="i"> |
|
|
|
<view class="al-title">{{ e.extension.stadium_name || '-' }}</view> |
|
|
@ -39,6 +46,9 @@ |
|
|
|
<view class="ai-txt">核销时间:{{ e.verify_time || '-' }}</view> |
|
|
|
</view> |
|
|
|
<view class="ai-line"> |
|
|
|
<view class="ai-txt">抓拍时间:{{ e.img_time || '-' }}</view> |
|
|
|
</view> |
|
|
|
<view class="ai-line"> |
|
|
|
<view class="ai-txt">抓拍图片:</view> |
|
|
|
<view class="ai-img"> |
|
|
|
<image |
|
|
@ -64,38 +74,67 @@ |
|
|
|
import server from '../../js/server'; |
|
|
|
import util from '../../../../utils/util'; |
|
|
|
import { BLACKLIST_API } from '../../js/api'; |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* 20231129 |
|
|
|
* 接口参数 verify_time -> img_time |
|
|
|
* 核销日期 -> 抓拍日期 |
|
|
|
* 新增 抓拍时间 |
|
|
|
* |
|
|
|
* 20231130 |
|
|
|
* 新增核销日期和拍照日期切换 |
|
|
|
* |
|
|
|
* */ |
|
|
|
let _timeTabs = [ { name: '抓拍日期', label: 'img_time' }, { name: '核销日期', label: 'verify_time' }, ]; |
|
|
|
export default { |
|
|
|
data(){ |
|
|
|
return { |
|
|
|
timeTabs: _timeTabs, |
|
|
|
stadiumLs: [], |
|
|
|
selectStadium: {}, |
|
|
|
curDate: '', |
|
|
|
blackLs: [], |
|
|
|
page: 1 |
|
|
|
page: 1, |
|
|
|
curTimeTab: _timeTabs[0] || {}, |
|
|
|
} |
|
|
|
}, |
|
|
|
async onLoad(options){ |
|
|
|
try{ |
|
|
|
let _date = this.curDate = util.formatDate({}); |
|
|
|
let _stadiumLs = await this.getStoreList({}); |
|
|
|
let { curTimeTab } = this; |
|
|
|
this.getRecords({ |
|
|
|
brand_id: options.brand_id, |
|
|
|
verify_time: _date |
|
|
|
[ curTimeTab?.label || '-' ]: _date |
|
|
|
}); |
|
|
|
}catch(err){ |
|
|
|
console.warn('get records ls err --->', err); |
|
|
|
} |
|
|
|
}, |
|
|
|
onReachBottom(){ |
|
|
|
let { selectStadium, curDate, page } = this; |
|
|
|
let { selectStadium, curDate, page, curTimeTab } = this; |
|
|
|
this.getRecords({ |
|
|
|
brand_id: selectStadium.brand_id, |
|
|
|
stadium_id: selectStadium.id, |
|
|
|
verify_time: curDate, |
|
|
|
[ curTimeTab?.label || '-' ]: curDate, |
|
|
|
page: ++page |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
timeTabChange(e){ |
|
|
|
let { value } = e.detail || {}; |
|
|
|
let { timeTabs, curDate, selectStadium } = this; |
|
|
|
this.blackLs = []; |
|
|
|
this.page = 1; |
|
|
|
this.curTimeTab = timeTabs[value] || {}; |
|
|
|
this.getRecords({ |
|
|
|
brand_id: selectStadium.brand_id, |
|
|
|
stadium_id: selectStadium.id, |
|
|
|
[ timeTabs[value]?.label || '-' ]: curDate, |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
previewImg(url){ |
|
|
|
uni.previewImage({ urls: [url] }); |
|
|
|
}, |
|
|
@ -105,15 +144,19 @@ export default { |
|
|
|
stadium_id = '', |
|
|
|
page = 1, |
|
|
|
page_size = 10, |
|
|
|
verify_time = '' |
|
|
|
verify_time = '', |
|
|
|
img_time = '', |
|
|
|
}){ |
|
|
|
util.showLoad(); |
|
|
|
server.get({ |
|
|
|
let _qry = { |
|
|
|
authority, brand_id, page, page_size, |
|
|
|
stadium_id: stadium_id || '' |
|
|
|
} |
|
|
|
if(img_time)_qry['img_time'] = img_time; |
|
|
|
if(verify_time)_qry['verify_time'] = verify_time; |
|
|
|
server.post({ |
|
|
|
url: BLACKLIST_API.identifyRecords, |
|
|
|
data: { |
|
|
|
authority, brand_id, page, page_size, |
|
|
|
stadium_id: stadium_id || '', verify_time |
|
|
|
}, |
|
|
|
data: _qry, |
|
|
|
failMsg: '加载列表失败!' |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
@ -127,7 +170,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
dateChange(e){ |
|
|
|
let { selectStadium } = this; |
|
|
|
let { selectStadium, curTimeTab } = this; |
|
|
|
let _date = e.detail.value || '-' |
|
|
|
this.curDate = _date; |
|
|
|
this.page = 1; |
|
|
@ -135,11 +178,11 @@ export default { |
|
|
|
this.getRecords({ |
|
|
|
brand_id: selectStadium.brand_id, |
|
|
|
stadium_id: selectStadium.id, |
|
|
|
verify_time: _date, |
|
|
|
[ curTimeTab?.label || '-' ]: _date, |
|
|
|
}) |
|
|
|
}, |
|
|
|
stadiumChange(e){ |
|
|
|
let { stadiumLs, curDate } = this; |
|
|
|
let { stadiumLs, curDate, curTimeTab } = this; |
|
|
|
let _curStadium = stadiumLs[e.detail.value] || {}; |
|
|
|
this.selectStadium = _curStadium; |
|
|
|
this.page = 1; |
|
|
@ -147,7 +190,7 @@ export default { |
|
|
|
this.getRecords({ |
|
|
|
brand_id: _curStadium.brand_id, |
|
|
|
stadium_id: _curStadium.id, |
|
|
|
verify_time: curDate, |
|
|
|
[ curTimeTab?.label || '-' ]: curDate, |
|
|
|
}) |
|
|
|
}, |
|
|
|
operateBtn(e, idx){ |
|
|
@ -270,6 +313,13 @@ export default { |
|
|
|
} |
|
|
|
.al-date{ |
|
|
|
padding: 0 24upx; |
|
|
|
@include centerFlex(flex-start); |
|
|
|
.ad-name{ |
|
|
|
line-height: 44upx; |
|
|
|
font-weight: 500; |
|
|
|
font-size: 32upx; |
|
|
|
color: #1a1a1a; |
|
|
|
} |
|
|
|
.ad-content{ |
|
|
|
@include centerFlex(flex-start); |
|
|
|
.ac-txt{ |
|
|
@ -279,6 +329,7 @@ export default { |
|
|
|
color: #1a1a1a; |
|
|
|
} |
|
|
|
.ac-icon{ |
|
|
|
margin-right: 14upx; |
|
|
|
flex-grow: 0; |
|
|
|
flex-shrink: 0; |
|
|
|
margin-left: 16upx; |
|
|
|