diff --git a/src/pages/write_off/confirm_order/confirm_order.vue b/src/pages/write_off/confirm_order/confirm_order.vue
index b39063e..9deee85 100644
--- a/src/pages/write_off/confirm_order/confirm_order.vue
+++ b/src/pages/write_off/confirm_order/confirm_order.vue
@@ -65,7 +65,9 @@
预定场次:
- {{e.date || ''}} {{e.duration || ''}}
+
+ {{ i!=0?'+':'' }}{{ e || '-' }}
+
diff --git a/src/pages/write_off/operate/operate.vue b/src/pages/write_off/operate/operate.vue
index 6970de4..9143622 100644
--- a/src/pages/write_off/operate/operate.vue
+++ b/src/pages/write_off/operate/operate.vue
@@ -46,20 +46,20 @@ export default {
},
methods: {
scanCodeBtn: util.debounce(function(){
- uni.scanCode({
- onlyFromCamera: true,
- scanType: 'qrCode',
- success: res=> {
- console.warn('success--->', res);
- if(util.changeLowerCase(res.scanType) !== 'qr_code')return util.showNone('不支持此类型!');
- console.warn(res.result)
- this.analysisOrder({ decrypt_text: res.result });
- },
- fail: function(err) {
- util.showNone('扫码失败!');
- console.warn('扫码失败--->', err);
- }
- })
+ uni.scanCode({
+ onlyFromCamera: true,
+ scanType: 'qrCode',
+ success: res=> {
+ console.warn('success--->', res);
+ if(util.changeLowerCase(res.scanType) !== 'qr_code')return util.showNone('不支持此类型!');
+ console.warn(res.result)
+ this.analysisOrder({ decrypt_text: res.result });
+ },
+ fail: function(err) {
+ util.showNone('扫码失败!');
+ console.warn('扫码失败--->', err);
+ }
+ })
}, 300, true),
stadiumChange(e){
let { stadiumList } = this;
@@ -83,12 +83,14 @@ export default {
}
if(!!verify_code)_query['verify_code'] = verify_code;
if(!!decrypt_text)_query['decrypt_text'] = decrypt_text;
+ util.showLoad();
servers.get({
url: API.writeOff.enterVerifyOrder,
data: _query,
isDefaultGet: false
})
.then(res=>{
+ util.hideLoad();
if(res.data.code == 0){
let _data = res.data.data || {}
util.$_emit(WRITE_OFF_ORDER_INFO, {..._data})
@@ -99,6 +101,7 @@ export default {
}
console.log('订单查询---->', res);
})
+ .catch(util.hideLoad)
}
}
diff --git a/src/pages/write_off/search_result/search_result.vue b/src/pages/write_off/search_result/search_result.vue
index 5dc3771..f8be054 100644
--- a/src/pages/write_off/search_result/search_result.vue
+++ b/src/pages/write_off/search_result/search_result.vue
@@ -10,33 +10,33 @@
-
+
- 核销日期:2020-08-27
+ 核销日期:{{curDate || '-'}}
核销数量:{{writeOffList.length || 0}}
-
- 欧轩智能羽毛球馆(永泰店)
+
+ {{ e.extension.stadium_name || '-' }}
- 订单编号:20195175645666
- (租场)
+ 订单编号:{{ e.order_no || '-' }}
+ ({{ e.type || '-' }})
- 用户昵称:周大强
+ 用户昵称:{{ e.extension.nickname || '-' }}
- 核销码: 200801108978
+ 核销码: {{ e.verify_code || '-' }}
- 验证方式:扫码器验证(pad)
+ 验证方式:{{ e.desc || '-' }}
- 核销时间:2021-05-17 11:12:58
+ 核销时间:{{ e.verify_time || '-'}}
@@ -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')