diff --git a/src/components/end_billing_modal/end_billing_modal.vue b/src/components/end_billing_modal/end_billing_modal.vue new file mode 100644 index 0000000..bb92650 --- /dev/null +++ b/src/components/end_billing_modal/end_billing_modal.vue @@ -0,0 +1,193 @@ + + + + + diff --git a/src/components/site/order_modal/order_modal.vue b/src/components/site/order_modal/order_modal.vue index 107c569..7f365da 100644 --- a/src/components/site/order_modal/order_modal.vue +++ b/src/components/site/order_modal/order_modal.vue @@ -14,6 +14,12 @@ {{ orderInfo.order_no || '' }} + + 占用用途: + + {{ orderInfo.take_up_use_text || '' }} + + 创建时间: @@ -60,6 +66,7 @@ + {{ orderInfo.back_stage_take_up_tips || '' }} @@ -398,6 +405,12 @@ export default { height: 2upx; background-color: #D8D8D8; } + .om-take-up-tip{ + line-height: 34upx; + font-size: 24upx; + color: #EA5061; + @include textHide(1); + } .om-total{ margin-top: 20upx; margin-bottom: 40upx; diff --git a/src/components/timing_order/timing_order.vue b/src/components/timing_order/timing_order.vue index 0536153..d9a96d6 100644 --- a/src/components/timing_order/timing_order.vue +++ b/src/components/timing_order/timing_order.vue @@ -12,7 +12,7 @@ - + 项目: @@ -25,16 +25,29 @@ {{ orderInfo.extension.duration || '-'}} + 结束计费 实付款 ¥{{orderInfo.pay_amount || 0}} + + + - - \ No newline at end of file diff --git a/src/pages/write_off/confirm_order/confirm_order.vue b/src/pages/write_off/confirm_order/confirm_order.vue index dc2dd20..4e1af0f 100644 --- a/src/pages/write_off/confirm_order/confirm_order.vue +++ b/src/pages/write_off/confirm_order/confirm_order.vue @@ -1,4 +1,5 @@ @@ -60,13 +86,16 @@ export default { peopleInfo: {}, dateStr: '-', changeNum: '', + + isNotLeave: false, + orderNum: {}, //未离场订单数量 } }, onLoad(options){ this.initStore(); this.dateStr = util.formatDate({ partition: 'zh' }) || '-'; }, - + onUnload(){ this.clearTime(); }, @@ -83,7 +112,7 @@ export default { servers.get({ url: API.writeOff.setStadiumPresentNumber, data: { - brand_id: curStadium.curStadium, + brand_id: curStadium.brand_id, stadium_id: curStadium.id, number: +num, }, @@ -187,7 +216,64 @@ export default { .then(res=>{ this.peopleInfo = res }) - } + }, + + // 凌晨自动清零 - 未离场订单数量 + checkNotLeave(){ + let { curStadium } = this; + util.showLoad(); + servers.get({ + url: API.writeOff.notLeavingNums, + data: { + brand_id: curStadium.brand_id, + stadium_id: curStadium.id, + }, + // isDefaultGet: false, + failMsg: '请求失败!' + }) + .then(res=>{ + util.hideLoad(); + this.orderNum = res + this.$nextTick(_=>{ + this.isNotLeave = true + }) + }) + }, + + checkBtn(type){ + if(type == 0)return util.routeTo(`/pages/write_off/search_result/search_result`, 'nT'); + if(type == 1)return util.routeTo(`/pages/order_list/order_list?order_type=1`, 'nT'); + }, + + switchChange(){ + let { peopleInfo, curStadium } = this + this.$nextTick(_=>{ + util.showModal({ + title: '提示', + content: peopleInfo.present_person_number_clear==false?'是否确认开启凌晨自动清零?':peopleInfo.present_person_number_clear==true?'是否确认关闭凌晨自动清零?':'', + showCancel: true, + success: modalRes=>{ + if(modalRes.confirm){ + util.showLoad(); + servers.get({ + url: API.writeOff.timingOpen, //凌晨自动清零【开/关】 + data: { + brand_id: curStadium.brand_id, + stadium_id: curStadium.id, + status: peopleInfo.present_person_number_clear==false?1:peopleInfo.present_person_number_clear==true?0:'', + }, + failMsg: '请求失败!' + }) + .then(res=>{ + util.hideLoad(); + util.showNone('操作成功!'); + }) + } + } + }) + }) + }, + } } @@ -223,22 +309,22 @@ export default { } } .nop-main{ - padding: 8upx 30upx 0; + padding: 8upx 0upx 0; .nm-date{ - margin-bottom: 86upx; + margin: 0 24rpx 86rpx; line-height: 44upx; font-size: 32upx; color: #1a1a1a; } .nm-tit{ - margin-bottom: 48upx; + margin: 0 30rpx 16rpx; text-align: center; font-size: 32upx; font-weight: 500; } .nm-num{ position: relative; - margin: 0 auto 100upx; + margin: 0 auto; display: block; width: 400upx; height: 400upx; @@ -267,8 +353,16 @@ export default { 100% {transform: rotate(0deg);} } } + .nm-txt{ + margin: 10rpx auto 42rpx; + color: #9C9C9F; + font-size: 28rpx; + text-align: center; + line-height: 40rpx; + text-decoration: underline; + } .nm-btn{ - margin: 0 auto 106upx; + margin: 0 auto; width: 618upx; line-height: 112upx; height: 112upx; @@ -278,8 +372,24 @@ export default { color: #fff; background-color: $themeColor; } + .nm-line{ + margin: 46rpx 0 0; + padding: 34rpx 28rpx 20rpx 34rpx; + border-top: 2rpx solid #F2F2F7; + @include centerFlex(space-between); + .nl-txt{ + color: #1A1A1A; + font-size: 32rpx; + line-height: 44rpx; + } + + .nl-switch{ + flex-shrink: 0; + flex-grow: 0; + } + } .nm-tip{ - margin-bottom: 30upx; + margin: 0 32rpx 30rpx 34rpx; font-size: 28upx; line-height: 52upx; color: #9C9C9F; @@ -356,6 +466,30 @@ export default { } } } + .nmm-btm{ + margin-bottom: 8rpx; + } + .nmm-line{ + margin: 78rpx 70rpx 0 74rpx; + @include centerFlex(space-between); + >view{ + &:first-child{ + color: #1A1A1A; + font-size: 28rpx; + line-height: 48rpx; + } + &:nth-child(2){ + width: 156rpx; + height: 68rpx; + border: 2rpx solid #009874; + border-radius: 10rpx; + color: #009874; + font-size: 32rpx; + line-height: 64rpx; + text-align: center; + } + } + } } } diff --git a/src/pages/write_off/operate/operate.vue b/src/pages/write_off/operate/operate.vue index 03c3764..8a810fe 100644 --- a/src/pages/write_off/operate/operate.vue +++ b/src/pages/write_off/operate/operate.vue @@ -111,11 +111,6 @@ export default { let { iptCode } = this; if(!iptCode)return util.showNone('请输入核销码!'); this.analysisOrder({ verify_code: this.iptCode }); - return - let _timeSta = new Date().getTime(); - if(_timeSta%3 == 0)return util.routeTo(`/pages/write_off/confirm_order/confirm_order`, 'nT'); - if(_timeSta%2 < 1)return util.routeTo(`/pages/write_off/null/null`, 'nT'); - return util.routeTo(`/pages/write_off/confirm_order/confirm_order`, 'nT'); }, 300, true), @@ -139,9 +134,11 @@ export default { writeOffType == 'site'&&(_query['decrypt_text'] = decrypt_text); writeOffType == 'mall'&&(_query['vcode'] = decrypt_text); } + if(writeOffType == 'site')return this.siteGet({ query: _query, vType: _vType, }); if(writeOffType == 'mall')return this.mallGet({ query: _query, vType: _vType, }); }, + // 商城订单 mallGet({ query = {}, vType = '', }){ util.showLoad(); @@ -168,7 +165,10 @@ export default { }) .catch(util.hideLoad) }, - // 场地/ 年月卡 + + // 场地/ 年月卡 / 赛事 + // @vType verify_code(扫码)/ decrypt_text(输入) + siteGet({ query = {}, vType = '', }){ util.showLoad(); servers.get({ @@ -181,11 +181,20 @@ export default { if(res.data.code == 0){ let _data = res.data.data || {} + // 年月卡 if(_data.extension&&_data.extension.verify_order_type === 'monthly_card'){ util.$_emit(WRITE_OFF_ORDER_INFO, {..._data}); util.routeTo(`/pages/write_off/ym_confirm/ym_confirm?type=${vType}`, 'nT'); return } + + // 赛事 + if(_data.extension&&_data.extension.verify_order_type === 'match_order'){ + util.$_emit(WRITE_OFF_ORDER_INFO, {..._data}); + util.routeTo(`/pages/write_off/events_order/events_order?type=${vType}`, 'nT'); + return + } + util.$_emit(WRITE_OFF_ORDER_INFO, {..._data}); util.routeTo(`/pages/write_off/confirm_order/confirm_order?type=${vType}`, 'nT'); }else{ diff --git a/src/pages/write_off/search_result/search_result.vue b/src/pages/write_off/search_result/search_result.vue index 346eb28..9547a32 100644 --- a/src/pages/write_off/search_result/search_result.vue +++ b/src/pages/write_off/search_result/search_result.vue @@ -27,10 +27,10 @@ ({{ e.type || '-' }}) - 用户昵称:{{ e.extension.nickname || '-' }} + 用户信息:{{ e.extension.user_phone || '-' }}({{ e.extension.nickname || '-' }}) - 核销码: {{ e.verify_code || '-' }} + 核销码: {{e.verify_code || '-' }} 验证方式:{{ e.desc || '-' }} @@ -39,9 +39,10 @@ 核销时间:{{ e.verify_time || '-'}} - 离场时间:{{ e.verify_leave_time || '未扫码离场'}} + 离场时间:{{ e.verify_leave_time || ''}} + 手动离场 核销订单 @@ -162,7 +163,34 @@ export default { let _list = res.list || []; return _list }) - } + }, + + leaveBtn(item){ + let { curStadium } = this; + util.showModal({ + title: '提示', + content: '是否确认手动离场?', + showCancel: true, + success: modalRes=>{ + if(modalRes.confirm){ + util.showLoad(); + servers.get({ + url: API.writeOff.leaveVerifyOrder, + data: { + brand_id: curStadium.brand_id, + id: item.id, + }, + failMsg: '请求失败!' + }) + .then(res=>{ + util.hideLoad(); + util.showNone('操作成功!'); + this.refreshList() + }) + } + } + }) + }, } } @@ -241,6 +269,7 @@ export default { .r-order-list{ padding: 0 24upx; .l-item{ + position: relative; margin-bottom: 24upx; padding: 0 20upx; border-radius: 10upx; @@ -269,9 +298,22 @@ export default { color: $themeColor; } } - + } } + .i-btn{ + position: absolute; + right: 20rpx; + bottom: 32rpx; + background-color: #009874; + border-radius: 10rpx; + width: 156rpx; + height: 68rpx; + color: #FFFFFF; + font-size: 28rpx; + text-align: center; + line-height: 68rpx; + } } } .r-bottom-btn{ diff --git a/src/pages/write_off/success/success.vue b/src/pages/write_off/success/success.vue new file mode 100644 index 0000000..ff4e916 --- /dev/null +++ b/src/pages/write_off/success/success.vue @@ -0,0 +1,183 @@ + + + + + \ No newline at end of file diff --git a/src/static/images/icon/selected_ring.png b/src/static/images/icon/selected_ring.png new file mode 100644 index 0000000..280cd03 Binary files /dev/null and b/src/static/images/icon/selected_ring.png differ diff --git a/src/static/images/icon/selected_tag.png b/src/static/images/icon/selected_tag.png new file mode 100644 index 0000000..f56e247 Binary files /dev/null and b/src/static/images/icon/selected_tag.png differ diff --git a/src/subpackage/device/components/order/timing_detail/timing_detail.vue b/src/subpackage/device/components/order/timing_detail/timing_detail.vue index a8136f4..d6bddc8 100644 --- a/src/subpackage/device/components/order/timing_detail/timing_detail.vue +++ b/src/subpackage/device/components/order/timing_detail/timing_detail.vue @@ -26,7 +26,7 @@ 离场时间:{{orderInfo.end_time || '-'}} 时长合计:{{orderInfo.extension.duration || '-'}} - + 金额小计 ¥{{orderInfo.amount || 0}} @@ -53,26 +53,30 @@ 支付方式:{{zh_pay_type(orderInfo.pay_type)}} 支付时间:{{orderInfo.pay_time || '-'}} - 微信交易号:{{orderInfo.trade_no || ''}} + 微信交易号:{{orderInfo.trade_no || ''}} + 操作人:{{orderInfo.end_bill_operator_name || ''}} - 结束计费 - - - - - - - 结束计费 - 操作人:{{orderInfo.end_bill_operator_name || '-'}} - 时长合计:{{orderInfo.extension.duration || '-'}} - 金额合计:¥{{orderInfo.amount || '-'}} - *请输入金额 - - 确认 + + 退款信息 + + 退款原因:{{orderInfo.refund_reason || '-'}} + 退款时间:{{orderInfo.refund_time || '-'}} + 退款单号:{{orderInfo.refund_no || '-'}} + 结束计费 + 完结订单 + + + + @@ -81,7 +85,11 @@ import util from '@/utils/util'; import deviceServer from '../../../js/device_server'; import deviceApi from '../../../js/device_api'; import { mapState } from 'vuex'; +import end_billing_modal from '../../../../../components/end_billing_modal/end_billing_modal.vue'; export default { + components: { + 'end-billing-modal': end_billing_modal, + }, props: { orderInfo: { type: Object, @@ -92,9 +100,10 @@ export default { ...mapState(['brandInfo']), zh_order_status(){ // 订单状态 0计费中1已完成 + let { orderInfo } = this return status =>{ const _obj = { - '0': '计费中', + '0': orderInfo.early_end_timing==true?'待支付':'计费中', '1': '已完成', '4': '已退款', } @@ -116,30 +125,16 @@ export default { }, data() { return { - isShowEnd: false, - input_amount: "", + isEndBill: false, } }, methods: { - confirmChange(){ - let { brandInfo, orderInfo, input_amount } = this - if(input_amount == '')return util.showNone('请输入金额!'); - util.showLoad(); - deviceServer.get({ - url: deviceApi.timeOrderEnd, - data: { - brand_id: brandInfo.brand.id, - order_no: orderInfo.order_no, - pay_amount: parseFloat(input_amount), - }, - failMsg: '加载失败!' - }) - .then(res=>{ - util.hideLoad() - util.showNone('操作成功!'); - this.isShowEnd = false - setTimeout(()=>uni.navigateBack(),1200); - }) + completeBtn(){ + this.$emit('completeBtn'); + }, + + timeEndBtn(){ + this.$emit('refreshPage'); }, } } @@ -265,77 +260,6 @@ export default { line-height: 112rpx; text-align: center; } - .odm-end-modal{ - position: absolute; - left: 65rpx; - top: 12%; - background-color: #fff; - width: 620rpx; - padding: 30rpx 0rpx 80rpx; - border-radius: 10rpx; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - .oem-close{ - width: 100%; - @include centerFlex(flex-end); - >image{ - width: 32rpx; - height: 32rpx; - margin-right: 30rpx; - } - } - .oem-tit { - color: #333; - font-size: 32rpx; - font-weight: 700; - margin: 16rpx 0rpx 34rpx; - } - .oem-line{ - width: 456rpx; - color: #333; - font-size: 28rpx; - line-height: 48rpx; - .ol-txt1{ - color: #009874; - } - .ol-txt2{ - color: #FF873D; - } - } - .oem-tips{ - width: 456rpx; - margin: 34rpx 0rpx 8rpx; - color: #EA5061; - font-size: 28rpx; - >text{ - color: #333333; - } - } - .oem-ipt{ - width: 456rpx; - border: 2rpx solid #D8D8D8; - border-radius: 10rpx; - & input { - flex-grow: 1; - height: 88rpx; - color: #333; - font-size: 28rpx; - padding: 0rpx 20rpx; - } - } - .oem-btn{ - width: 240rpx; - height: 88rpx; - margin-top: 60rpx; - border-radius: 10rpx; - background-color: #009874; - color: #FFF; - font-size: 32rpx; - line-height: 88rpx; - text-align: center; - } - } + } diff --git a/src/subpackage/device/js/device_api.js b/src/subpackage/device/js/device_api.js index 7e9293a..db8d9c1 100644 --- a/src/subpackage/device/js/device_api.js +++ b/src/subpackage/device/js/device_api.js @@ -36,6 +36,7 @@ export const DEVICE_API = { iccardList:`${ORIGIN}/admin/assistant/iccard/list`, //k-ic卡列表 timeOrderDetail:`${ORIGIN}/admin/assistant/timeOrder/detail`, //k-订单管理-计时订单详情 timeOrderEnd:`${ORIGIN}/admin/assistant/timeOrder/end`, //k-订单管理-订单计时结束 + timeOrderComplete:`${ORIGIN}/admin/assistant/timeOrder/complete`, //【20220208】k-订单管理-计时订单完结 // 20210521 恢复次卡核销状态 recoveryToSuccess:`${ORIGIN}/admin/stadium/order/recoveryToSuccess`, // 恢复次卡核销状态 diff --git a/src/subpackage/device/pages/order_details/order_details.vue b/src/subpackage/device/pages/order_details/order_details.vue index d1a3325..d7e2bc8 100644 --- a/src/subpackage/device/pages/order_details/order_details.vue +++ b/src/subpackage/device/pages/order_details/order_details.vue @@ -5,7 +5,7 @@ - + @@ -159,6 +159,38 @@ order_no: optionsQuery.order_no, }) }, + + // 计时订单-完结订单 + completeBtn(){ + let { pageInfo } = this + util.showModal({ + title: '提示', + content: '是否确认完结订单?', + showCancel: true, + success: modalRes=>{ + if(modalRes.confirm){ + util.showLoad(); + deviceServer.get({ + url: deviceApi.timeOrderComplete, //计时订单完结 + data: { + brand_id: pageInfo.brand_id, + order_no: pageInfo.order_no, + }, + failMsg: '请求失败!' + }) + .then(res=>{ + util.hideLoad(); + util.showNone('操作成功!'); + this.refreshPage() + util.previousPageFunction({ + fnName: 'refreshList', + query: { isLoad: false}, + }); + }) + } + } + }) + }, } } diff --git a/src/subpackage/device/pages/switch_manage/switch_manage.vue b/src/subpackage/device/pages/switch_manage/switch_manage.vue index 3018526..151d8ce 100644 --- a/src/subpackage/device/pages/switch_manage/switch_manage.vue +++ b/src/subpackage/device/pages/switch_manage/switch_manage.vue @@ -200,7 +200,7 @@ export default { if(switchInfo.hardware_type === 'AccessControl'&&status == 1){ //针对门禁没有关按钮发两条命令->开&关 20201224 后端: 直接发两条 关的那条这里填5 然后你那边不用管返回 - this.operateReq({data: this.getOperateReqData({ switchInfo, status: 0 }), isTip: false, isLoad: false}); + this.operateReq({data: DEVICE_FUN.AC_filterCloudACData(this.getOperateReqData({ switchInfo, status: 0 }), switchInfo), isTip: false, isLoad: false}); } this.operateReq({ data: _data });