diff --git a/src/components/site/order_modal/order_modal.vue b/src/components/site/order_modal/order_modal.vue new file mode 100644 index 0000000..cd085df --- /dev/null +++ b/src/components/site/order_modal/order_modal.vue @@ -0,0 +1,412 @@ + + + + + \ No newline at end of file diff --git a/src/js/api.js b/src/js/api.js index 90f0a4b..89e10e2 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -60,10 +60,23 @@ API['employee'] = { API['venue'] = { venueTypes: `${ORIGIN}/stadium/venue/types`, // 场馆类型 - venueList: `${ORIGIN}/stadium/book/list`, // 场地列表 - venueTakeUp: `${ORIGIN}/admin/assistant/venue/takeUp`, // 商家助手-占用场地提交 + // venueList: `${ORIGIN}/stadium/book/list`, // 场地列表 + + venueTakeUp: `${ORIGIN}/admin/stadium/venue/takeUp`, // 商家助手-占用场地提交 takeUpList: `${ORIGIN}/admin/timeSelect/list/4`, // 商家助手-占用场地列表 setStatus: `${ORIGIN}/admin/timeSelect/setStatus`, // 商家助手-占用场地列表 + + // 20210726 新增 + venueList: `${ORIGIN}/admin/stadium/venue/dashboard/list`, // 场地列表 20210726 看板新增修改 + dashboardInfo: `${ORIGIN}/admin/stadium/venue/dashboard/detail`, // 看板详情 + takeUpVerifyQr: `${ORIGIN}/admin/stadium/venue/takeUpVerifyQr`, // 商家助手 - 占用核销码 + takeUpShareQr: `${ORIGIN}/admin/stadium/venue/takeUpShareQr`, // 商家助手 - 占用分享码 + takeUpCancel: `${ORIGIN}/admin/stadium/venue/takeUpCancel`, // 商家助手-取消占用场地 + orderRefund: `${ORIGIN}/admin/stadium/order/cancel`, // 商家助手 - 退款 + + // 20210806 + FixedOccupyCancel: `${ORIGIN}/admin/VenueNumberFixedOccupy/cancel`, // 固定场取消订场 + } // 2.1 核销 diff --git a/src/pages.json b/src/pages.json index 648f733..116db35 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1,5 +1,6 @@ { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { "path": "pages/index/index", "style": { @@ -11,6 +12,18 @@ } }, { + "path": "pages/site/occupy_share/occupy_share", + "style": { + "navigationBarTitleText": "分享" + } + }, + { + "path": "pages/site/occupy_success/occupy_success", + "style": { + "navigationBarTitleText": "占用场地" + } + }, + { "path": "pages/site/order_list/order_list", "style": { "navigationBarTitleText": "占用场地" diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index b71754f..5589bbf 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -109,8 +109,9 @@ }, { id: 5, - name: '场地管理', - path: '/pages/site/order_list/order_list', + name: '场地看板', + // path: '/pages/site/order_list/order_list', // 20210804 不要占用列表 + path: '/pages/site/manage/manage', serverKey: 1009 // 后端对应权限编号 }, { diff --git a/src/pages/site/confirm/confirm.vue b/src/pages/site/confirm/confirm.vue index 4578539..b869412 100644 --- a/src/pages/site/confirm/confirm.vue +++ b/src/pages/site/confirm/confirm.vue @@ -24,10 +24,18 @@ 预定场次: - {{e.parentObj.name || '-'}} {{e.time || '-'}} (¥{{e.price || '-'}}) + {{e.parentObj.venue_name || '-'}} {{e.durations || '-'}} (¥{{e.price || '-'}}) + + 小计(共{{(occupyInfo.venueList&&occupyInfo.venueList.length) || 0}}场) + ¥{{ totalPrice || 0 }} + + + + *是否联动开灯 + 联动开灯开启后,会根据占用时间自动开灯 @@ -57,36 +65,50 @@ export default { data(){ return { ocPrice: '', - ocReaon: '' + ocReaon: '', + light_up: false, } }, computed: { ...mapState([ 'occupyInfo' ]), + totalPrice(){ + let { occupyInfo } = this; + let _list = occupyInfo.venueList || []; + if(!_list.length)return 0; + let _price = 0; + _list.forEach(e=>_price += +e.price); + console.warn(_price) + return _price.toFixed(2); + } }, onLoad(){ console.log(this.occupyInfo) }, methods: { + switchChange(e){ + this.light_up = e.detail.value + }, confirmOccupy: util.debounce(function(){ let { storeInfo, dateInfo, venueList, typeInfo } = this.occupyInfo; - let { ocPrice, ocReaon } = this; - console.log(ocPrice, ocReaon); + let { ocPrice, ocReaon, light_up } = this; servers.post({ url: API.venue.venueTakeUp, data: { + brand_id: storeInfo.brand_id, reason: ocReaon, amount: +ocPrice, group: storeInfo.id, date: dateInfo.dateStr, items: venueList.map(el=>{ return { - venue_id: el.parentObj.id, - venue_name: el.parentObj.name, - duration: el.time, + venue_id: el.parentObj.venue_id, + venue_name: el.parentObj.venue_name, + duration: el.durations, price: el.price } - }) + }), + light_up, }, isDefaultGet: false }) @@ -94,19 +116,22 @@ export default { if(res.data.code == 0){ util.showNone(res.data.message || '操作成功!'); - setTimeout(_=>{ - util.routeTo(); - util.previousPageFunction({ // 刷新占用列表 - fnName: 'refreshList', - query: null - }) - }, 1200) + let _res = res.data.data || {}; + let _qrStr = `?brand_id=${_res.brand_id}&order_no=${_res.order_no}` + util.routeTo(`/pages/site/occupy_success/occupy_success${_qrStr}`, 'rT'); + // setTimeout(_=>{ + // util.routeTo(); + // util.previousPageFunction({ // 刷新占用列表 + // fnName: 'refreshList', + // query: null + // }) + // }, 1200) }else{ util.showNone(res.data.message || '操作失败!'); } }) - }), + }, 300, true), }, } @@ -135,7 +160,6 @@ export default { vertical-align: middle; width: 34upx; height: 34upx; - background-color: skyblue; } } .sa-detail{ @@ -182,10 +206,45 @@ export default { } } } + .soi-total{ + margin-top: 30upx; + text-align: right; + font-size: 28upx; + line-height: 52upx; + color: #333; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + >text{ + color: #9a9a9d; + } + } + } + .sc-switch{ + padding: 40upx 24upx 0; + >view{ + &:first-child{ + margin-bottom: 10upx; + @include centerFlex(space-between); + >view{ + font-size: 32upx; + color: #333; + >text{ + color: #EA5061; + } + } + } + &+view{ + padding: 0 24upx; + font-size: 24upx; + line-height: 34upx; + color: #9A9A9D; + } + } } .sc-ipt{ margin: 0 auto; - padding-top: 54upx; + padding-top: 40upx; padding-bottom: 62upx; width: 682upx; .si-price{ diff --git a/src/pages/site/manage/manage.vue b/src/pages/site/manage/manage.vue index c973341..b063911 100644 --- a/src/pages/site/manage/manage.vue +++ b/src/pages/site/manage/manage.vue @@ -16,7 +16,30 @@ {{curTypeInfo.rule_text || '-'}} - + + + + {{ dateList[0].ZhDateStr || '-' }} + + + + + + + {{ dateList[dateList.length - 1].ZhDateStr || '-' }} + + + + + {{dateList[0].ZhDateStr || '-'}} — {{dateList[dateList.length-1].ZhDateStr || '-'}} @@ -38,24 +61,18 @@ - - {{e.duration || '-'}} + + {{ e || '-' }} + - {{e.name || '-'}} + {{e.venue_name || '-'}} - {{ - k.is_take_up?'已占用': - !k.is_valid?'已售':`¥${k.price || 0}` - }} + {{ getVenueStatusnInfo(k).zh_text || '-' }} @@ -66,24 +83,28 @@ - 已选择场次4 + 已选择场次{{ selectedVenueList.length || 0 }} 清空 - {{e.time || '-'}} - {{e.parentObj.name || '-'}} + {{e.durations || '-'}} + {{e.parentObj.venue_name || '-'}} - - - {{e}} + + + {{ e.n || '-'}} - + ¥{{totalPrice || '0.00'}} {{selectedVenueList.length?'提交订单':'请选择场地'}} @@ -93,15 +114,20 @@ {{occupyTip || '-'}} + + + \ No newline at end of file diff --git a/src/pages/site/occupy_success/occupy_success.vue b/src/pages/site/occupy_success/occupy_success.vue new file mode 100644 index 0000000..88a473c --- /dev/null +++ b/src/pages/site/occupy_success/occupy_success.vue @@ -0,0 +1,118 @@ + + + + + \ No newline at end of file diff --git a/src/static/images/icon/share_arrow_cff.png b/src/static/images/icon/share_arrow_cff.png new file mode 100644 index 0000000..a2b50ae Binary files /dev/null and b/src/static/images/icon/share_arrow_cff.png differ