diff --git a/.gitignore b/.gitignore index 2561bb4..6ccebdc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ node_modules/ unpackage/ dist/ +.hbuilderx/ + # local env files .env.local .env.*.local @@ -21,3 +23,4 @@ yarn-error.log* *.njsproj *.sln *.sw* + diff --git a/src/components/organize_order/organize_order.vue b/src/components/organize_order/organize_order.vue index 69dac42..5a00402 100644 --- a/src/components/organize_order/organize_order.vue +++ b/src/components/organize_order/organize_order.vue @@ -2,7 +2,7 @@ {{orderInfo.original_order.extension.stadium_name || '-'}} - {{zh_order_status(orderInfo.original_order.pay_status)}} + {{zh_order_status(orderInfo.original_order&&orderInfo.original_order.pay_status)}} @@ -38,7 +38,7 @@ - + 实付款 ¥{{orderInfo.original_order.pay_amount || 0}} @@ -54,7 +54,7 @@ export default { props: { orderInfo: { type: Object, - default: ()=>({}) + default: ()=>({ }) } }, computed: { @@ -174,10 +174,6 @@ export default { .rv-active{ color: $themeColor; } - >image{ - width: 32rpx; - height: 32rpx; - } } } diff --git a/src/components/reservation_order/reservation_order.vue b/src/components/reservation_order/reservation_order.vue index acaf26a..ad15658 100644 --- a/src/components/reservation_order/reservation_order.vue +++ b/src/components/reservation_order/reservation_order.vue @@ -16,7 +16,7 @@ 预订项目: - {{ zh_type_name(orderInfo.order_type) }} + {{ zh_type_name(orderInfo.order_type) }} @@ -195,7 +195,7 @@ export default { line-height: 40upx; font-size: 24upx; color: #9c9c9f; - >text{ + >.rv-text{ color: #333; } } diff --git a/src/components/timing_order/timing_order.vue b/src/components/timing_order/timing_order.vue index 7d1b965..0536153 100644 --- a/src/components/timing_order/timing_order.vue +++ b/src/components/timing_order/timing_order.vue @@ -10,7 +10,7 @@ {{orderInfo.order_no || '-'}} - + @@ -125,7 +125,7 @@ export default { .rv-active{ color: $themeColor; } - >image{ + >.rl-image{ width: 32rpx; height: 32rpx; } diff --git a/src/pages/order_list/order_list.vue b/src/pages/order_list/order_list.vue index ec2121a..dadca12 100644 --- a/src/pages/order_list/order_list.vue +++ b/src/pages/order_list/order_list.vue @@ -11,7 +11,12 @@ - {{oitem.name}} + {{oitem.name || '-'}} @@ -47,7 +52,7 @@ - {{titleName}} + {{ titleName }} 次票、场次 + appointOrderType: '' } }, onReachBottom(){ - let { curTabID, periodInfo, orderType, curSelectedStore, page } = this; + let { curTabID, periodInfo, orderType, curSelectedStore, page, appointOrderType } = this; let _curSelectedStore = curSelectedStore || {}; this.getOrderList({ begin: periodInfo.start, - end: periodInfo.end, - // 订单状态 - // 预约 - 1 已支付待使用 / 2 已使用 / 3 已失效 / 4 已退款 - // 会员 - 1 '使用中' / 0 '无效' - // 积分 - 1已付款 / 2 已发货 / 3 已完成 / 4 取消兑换 + end: periodInfo.end, status: curTabID, stadium_id: _curSelectedStore.id || '', page: ++page, orderType: orderType, + order_type: appointOrderType, }) }, onLoad(options){ - let _type = options.order_type + let _type = options.order_type || ''; this.orderType = _type; - this.$nextTick(_=>{ - uni.setNavigationBarTitle({ - title: this.titleName - }) - }) - let defaultTime = this.getDefaultTimeLimit(_type); - this.periodInfo = defaultTime; + // 场地预约拆分订单 + if(options.order_type == 3&&options.type!=undefined)this.appointOrderType = options.type; + + this.$nextTick(_=>{ uni.setNavigationBarTitle({ title: this.titleName }) }); + + this.periodInfo = this.getDefaultTimeLimit(_type); + this.getStoreList(); - this.getOrderList({ - begin: defaultTime.start, - end: defaultTime.end, - orderType: _type - }) + + this.$nextTick(this.refreshList); }, - onUnload() { - }, methods: { // 获取默认时间 // 3->预约,4->会员,5->积分,1->计时 @@ -246,18 +233,18 @@ let _beforeSeven = _date.getTime() - _sevenTimeStemp; let _afterSeven = _date.getTime() + _sevenTimeStemp; - let _obj = { - start: '', - end: '' - } + let _obj = { start: '', end: '' }; + if(type == 3 )_obj['start']=util.formatDate({}),_obj['end'] = util.formatDate({date: _afterSeven}); + if(type == 4 || type == 1)_obj['start']=util.formatDate({date: _beforeSeven}),_obj['end'] = util.formatDate({}); + console.log(_obj) return _obj; }, // 刷新列表 refreshList(){ - let { curTabID, periodInfo, orderType, curSelectedStore, page } = this; + let { curTabID, periodInfo, orderType, curSelectedStore, page, appointOrderType } = this; let _curSelectedStore = curSelectedStore || {}; this.orderList = []; this.page = 1; @@ -265,13 +252,10 @@ this.getOrderList({ begin: periodInfo.start, end: periodInfo.end, - // 订单状态 - // 预约 - 1 已支付待使用 / 2 已使用 / 3 已失效 / 4 已退款 - // 会员 - 1 '使用中' / 0 '无效' - // 积分 - 1已付款 / 2 已发货 / 3 已完成 / 4 取消兑换 status: curTabID, stadium_id: _curSelectedStore.id, orderType: orderType, + order_type: appointOrderType, }) }, tabChange: util.debounce(function(ID){ @@ -282,14 +266,11 @@ },300,300), //切换订单列表选项卡type - tabTypeChange: util.debounce(function(index){ - for(var i of this.selectOrderType){ - i.active = false - } - this.selectOrderType[index].active = true - this.selectedOrderType = this.selectOrderType[index].type + tabTypeChange: util.debounce(function(item){ + this.selectedOrderType = item.type this.$nextTick(this.refreshList); },300,true), + storeChange(e){ let { value } = e.detail; let { storeList } = this; @@ -381,6 +362,7 @@ page, page_size, order_type, + orderType } if(this.orderType == "10"){ //助手约玩订单修改, 按后端荣升0430重写接口重新定制字段.后续后端家兴0507重新接手该接口的修改(涉及约玩订单列表及订单详情) postData['type'] = this.selectedOrderType; @@ -410,15 +392,6 @@ }, - detailChange(){ - console.log("点击了吗66") - // let _query = {} - // _query["stadium_id"] = e.stadium_id - // _query["order_no"] = e.order_no - // _query["order_type"] = this.orderType - // util.routeTo(`/subpackage/device/pages/order_details/order_details?query=${util.jsonStr(_query)}`,'nT'); - }, - } diff --git a/src/pages/write_off/search_result/search_result.vue b/src/pages/write_off/search_result/search_result.vue index f8be054..627e57a 100644 --- a/src/pages/write_off/search_result/search_result.vue +++ b/src/pages/write_off/search_result/search_result.vue @@ -61,51 +61,56 @@ export default { curStadium: {}, // 当前店铺 writeOffList: [], // 核销列表, curDate: util.formatDate({}), + page: 1, + totalNum: 0, } }, + // 20210716测试:取消分页,返回当天 + // onReachBottom(){ + // let { page, curDate, curStadium } = this; + // this.getList({ + // brand_id: curStadium.brand_id || '', + // stadium_id: curStadium.id || '', + // date: curDate || '', + // page: ++page, + // }); + // }, 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, - }); + let { curStadium } = this; + if(curStadium&&curStadium.id)this.refreshList(); }, methods: { - dateChange(e){ - let { curStadium } = this; - this.curDate = e.detail.value; + refreshList(){ + let { curDate, curStadium } = this; + this.page = 1; + this.writeOffList = []; this.getList({ brand_id: curStadium.brand_id || '', - stadium_id: curStadium.id, - date: e.detail.value, + stadium_id: curStadium.id || '', + date: curDate || '', }); }, + + dateChange(e){ + this.curDate = e.detail.value; + this.$nextTick(this.refreshList); + }, stadiumChange(e){ - let { stadiumList, curDate } = this; + let { stadiumList } = 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, - }); + this.$nextTick(this.refreshList); }, + async initPage(){ let { brandInfo } = this; try{ 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 || '', - stadium_id: _storeList[0].id, - date: util.formatDate({}), - }); + this.$nextTick(this.refreshList); }catch(err){ console.warn('加载数据失败!', err); } @@ -118,18 +123,22 @@ export default { }) util.routeTo(`/pages/write_off/operate/operate`, 'nT'); }, - getList({ brand_id, stadium_id = '', date = '' }){ + getList({ brand_id, stadium_id = '', date = '', page = 1, page_size = '' }){ util.showLoad(); servers.get({ url: API.writeOff.listVerifyRecord, - data: { brand_id, stadium_id, date }, + data: { brand_id, stadium_id, date, page, page_size }, failMsg: '加载失败!', }) .then(res=>{ util.hideLoad(); + this.totalNum = res.total || 0; let _list = res.list || []; - this.writeOffList = _list; - console.warn(res, 'jijjjjjjjjj') + if(page == 1)return this.writeOffList = _list; + if(!_list.length)return util.showNone('没有更多!'); + this.page = page; + this.writeOffList = [...this.writeOffList, ..._list]; + }) }, getStoreList({ diff --git a/src/subpackage/device/js/device_api.js b/src/subpackage/device/js/device_api.js index 474bbce..292276c 100644 --- a/src/subpackage/device/js/device_api.js +++ b/src/subpackage/device/js/device_api.js @@ -15,7 +15,8 @@ export const DEVICE_API = { leaseList:`${ORIGIN}/admin/stadium/lease/cabinet/list`, // 租售柜列表 lockerList:`${ORIGIN}/admin/stadium/locker/cabinet/list`, // 储物柜列表 - leaseTest:`${ORIGIN}/admin/stadium/lease/cabinet/test`, // 储物柜打开 + leaseTest:`${ORIGIN}/admin/stadium/lease/cabinet/test`, // 租售柜打开 + lockerTest:`${ORIGIN}/admin/stadium/locker/cabinet/test`, // 储物柜打开 leaseReset:`${ORIGIN}/admin/stadium/lease/cabinet/reset`, // 储物柜补货 diff --git a/src/subpackage/device/pages/locker_manage/locker_manage.vue b/src/subpackage/device/pages/locker_manage/locker_manage.vue index c409031..8a5bbf3 100644 --- a/src/subpackage/device/pages/locker_manage/locker_manage.vue +++ b/src/subpackage/device/pages/locker_manage/locker_manage.vue @@ -212,11 +212,20 @@ export default { }) .catch(util.hideLoad) }, + // 打开柜子分接口 + // e.page_id == 8 ||  // 租售柜 + // e.page_id == 9 ||  // 储物柜 + getOpenApi(){ + let { optionsQuery } = this; + if(optionsQuery.page_id == 8)return deviceApi.leaseTest; + if(optionsQuery.page_id == 9)return deviceApi.lockerTest; + }, openLockerReq(cabinet_ids){ let { curStoreInfo } = this; util.showLoad(); + return deviceServer.get({ - url: deviceApi.leaseTest, + url: this.getOpenApi(), data: { brand_id: curStoreInfo.brand_id, cabinet_ids: cabinet_ids, diff --git a/src/subpackage/device/pages/order_manage/order_manage.vue b/src/subpackage/device/pages/order_manage/order_manage.vue index 7d933ec..c2456f5 100644 --- a/src/subpackage/device/pages/order_manage/order_manage.vue +++ b/src/subpackage/device/pages/order_manage/order_manage.vue @@ -1,10 +1,10 @@