|
|
@ -10,33 +10,33 @@ |
|
|
|
</picker> |
|
|
|
</view> |
|
|
|
<view class="r-timer-select"> |
|
|
|
<picker mode="date"> |
|
|
|
<picker mode="date" @change="dateChange"> |
|
|
|
<view> |
|
|
|
<text>核销日期:2020-08-27</text> |
|
|
|
<text>核销日期:{{curDate || '-'}}</text> |
|
|
|
<image mode="aspectFit" src="/static/images/icon/arrow_c33.png"></image> |
|
|
|
</view> |
|
|
|
</picker> |
|
|
|
<view>核销数量:{{writeOffList.length || 0}}</view> |
|
|
|
</view> |
|
|
|
<view class="r-order-list"> |
|
|
|
<view class="l-item" v-for="i in 10" :key="i"> |
|
|
|
<view class="i-name">欧轩智能羽毛球馆(永泰店)</view> |
|
|
|
<view class="l-item" v-for="(e, i) in writeOffList" :key="i"> |
|
|
|
<view class="i-name">{{ e.extension.stadium_name || '-' }}</view> |
|
|
|
<view class="i-lines"> |
|
|
|
<view> |
|
|
|
<view>订单编号:20195175645666</view> |
|
|
|
<view>(租场)</view> |
|
|
|
<view>订单编号:{{ e.order_no || '-' }}</view> |
|
|
|
<view>({{ e.type || '-' }})</view> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view>用户昵称:周大强</view> |
|
|
|
<view>用户昵称:{{ e.extension.nickname || '-' }}</view> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view>核销码: 200801108978</view> |
|
|
|
<view>核销码: {{ e.verify_code || '-' }}</view> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view>验证方式:扫码器验证(pad)</view> |
|
|
|
<view>验证方式:{{ e.desc || '-' }}</view> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view>核销时间:2021-05-17 11:12:58</view> |
|
|
|
<view>核销时间:{{ e.verify_time || '-'}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -59,17 +59,40 @@ export default { |
|
|
|
return { |
|
|
|
stadiumList: [], // 店铺列表 |
|
|
|
curStadium: {}, // 当前店铺 |
|
|
|
writeOffList: [] // 核销列表 |
|
|
|
writeOffList: [], // 核销列表, |
|
|
|
curDate: util.formatDate({}), |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(){ |
|
|
|
|
|
|
|
this.initPage(); |
|
|
|
}, |
|
|
|
onShow(){ |
|
|
|
let { curStadium, curDate } = this; |
|
|
|
if(curStadium&&curStadium.id)this.getList({ |
|
|
|
brand_id: curStadium.brand_id || '', |
|
|
|
stadium_id: curStadium.id, |
|
|
|
date: curDate, |
|
|
|
}); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
dateChange(e){ |
|
|
|
let { curStadium } = this; |
|
|
|
this.curDate = e.detail.value; |
|
|
|
this.getList({ |
|
|
|
brand_id: curStadium.brand_id || '', |
|
|
|
stadium_id: curStadium.id, |
|
|
|
date: e.detail.value, |
|
|
|
}); |
|
|
|
}, |
|
|
|
stadiumChange(e){ |
|
|
|
let { stadiumList } = this; |
|
|
|
let { stadiumList, curDate } = this; |
|
|
|
this.curStadium = stadiumList[e.detail.value]; |
|
|
|
|
|
|
|
this.getList({ |
|
|
|
brand_id: stadiumList[e.detail.value].brand_id || '', |
|
|
|
stadium_id: stadiumList[e.detail.value].id, |
|
|
|
date: curDate, |
|
|
|
}); |
|
|
|
}, |
|
|
|
async initPage(){ |
|
|
|
let { brandInfo } = this; |
|
|
@ -77,8 +100,11 @@ export default { |
|
|
|
let _storeList = await this.getStoreList({ brand_id: brandInfo.brand.id || '' }); |
|
|
|
this.stadiumList = _storeList || []; |
|
|
|
if(_storeList.length) this.curStadium = _storeList[0]; |
|
|
|
console.warn(util.formatDate({})) |
|
|
|
this.getList({ |
|
|
|
brand_id: brandInfo.brand.id || '' |
|
|
|
brand_id: brandInfo.brand.id || '', |
|
|
|
stadium_id: _storeList[0].id, |
|
|
|
date: util.formatDate({}), |
|
|
|
}); |
|
|
|
}catch(err){ |
|
|
|
console.warn('加载数据失败!', err); |
|
|
@ -92,13 +118,15 @@ export default { |
|
|
|
}) |
|
|
|
util.routeTo(`/pages/write_off/operate/operate`, 'nT'); |
|
|
|
}, |
|
|
|
getList({ brand_id }){ |
|
|
|
getList({ brand_id, stadium_id = '', date = '' }){ |
|
|
|
util.showLoad(); |
|
|
|
servers.get({ |
|
|
|
url: API.writeOff.listVerifyRecord, |
|
|
|
data: { brand_id }, |
|
|
|
data: { brand_id, stadium_id, date }, |
|
|
|
failMsg: '加载失败!', |
|
|
|
}) |
|
|
|
.then(res=>{ |
|
|
|
util.hideLoad(); |
|
|
|
let _list = res.list || []; |
|
|
|
this.writeOffList = _list; |
|
|
|
console.warn(res, 'jijjjjjjjjj') |
|
|
|