刘嘉炜
5 months ago
12 changed files with 18 additions and 848 deletions
-
194src/components/end_billing_modal/end_billing_modal.vue
-
185src/components/timing_order/timing_order.vue
-
1src/js/api.js
-
12src/pages.json
-
12src/pages/order_list/order_list.vue
-
4src/pages/order_search/order_search.vue
-
1src/subpackage/device/js/device_api.js
-
16src/subpackage/order/components/order_list/header.vue
-
1src/subpackage/order/js/api.js
-
53src/subpackage/order/pages/order_list/order_list.vue
-
8src/subpackage/order/pages/order_manage/order_manage.vue
-
379src/subpackage/order/pages/timing/detail.vue
@ -1,194 +0,0 @@ |
|||
<template> |
|||
<!-- 弹框 结束计费 --> |
|||
<view class="ox-dark-mask" @touchmove.stop.prevent="moveHandle" @click.stop=""> |
|||
<view class="odm-end-modal" > |
|||
<view class="oem-close"> |
|||
<image src="/static/images/icon/x_close.png" @click="closeChange"></image> |
|||
</view> |
|||
<view class="oem-tit">结束计费</view> |
|||
<view class="oem-line">操作人:{{orderInfo.end_bill_operator_name || '-'}}</view> |
|||
<view class="oem-line">时长合计:<text class="ol-txt1">{{orderInfo.extension.duration || '-'}}</text></view> |
|||
<view class="oem-line">金额合计:<text class="ol-txt2">¥{{orderInfo.amount || 0}}</text></view> |
|||
<view class="oem-box"> |
|||
<view @click="selectBtn(1)"> |
|||
<image :class="[selectType==1?'ob-img':'']" :src="selectType==1?'/static/images/icon/selected_ring.png':''"></image> |
|||
<view :class="[selectType==1?'ov-active':'']">停止计时</view> |
|||
</view> |
|||
<view @click="selectBtn(2)"> |
|||
<image :class="[selectType==2?'ob-img':'']" :src="selectType==2?'/static/images/icon/selected_ring.png':''"></image> |
|||
<view :class="[selectType==2?'ov-active':'']">完结订单</view> |
|||
</view> |
|||
</view> |
|||
<view class="oem-tips">*<text>请输入金额</text></view> |
|||
<view class="oem-ipt"><input type="digit" v-model="input_amount"/></view> |
|||
<view class="oem-btn" hover-class="hover-active" @click="confirmChange" >确认</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@/utils/util'; |
|||
import deviceApi from '../../subpackage/device/js/device_api.js'; |
|||
import deviceServer from '../../subpackage/device/js/device_server.js'; |
|||
import { mapState } from 'vuex'; |
|||
export default { |
|||
props: { |
|||
orderInfo: { |
|||
type: Object, |
|||
default: ()=>({}) |
|||
} |
|||
|
|||
}, |
|||
computed: { |
|||
...mapState(['brandInfo']), |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
input_amount: "", |
|||
selectType: 1, //默认1(停止计时) 2(完结订单) |
|||
} |
|||
}, |
|||
methods: { |
|||
moveHandle(){}, |
|||
closeChange(){ |
|||
this.$emit('close'); |
|||
}, |
|||
|
|||
confirmChange(){ |
|||
let { brandInfo, orderInfo, input_amount, selectType } = 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), |
|||
end_type: selectType==1?'end_timing':selectType==2?'end_order':'', |
|||
}, |
|||
failMsg: '加载失败!' |
|||
}) |
|||
.then(res=>{ |
|||
util.hideLoad() |
|||
util.showNone('操作成功!'); |
|||
this.$emit('close'); |
|||
// setTimeout(()=>uni.navigateBack(),1200); |
|||
this.$emit('timeEndBtn'); |
|||
}) |
|||
.catch(util.hideLoad) |
|||
}, |
|||
|
|||
selectBtn(type){ |
|||
this.selectType = type |
|||
}, |
|||
}, |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style lang="scss" > |
|||
@import '~style/public.scss'; |
|||
.odm-end-modal{ |
|||
position: absolute; |
|||
left: 65rpx; |
|||
top: 12%; |
|||
background-color: #fff; |
|||
width: 620rpx; |
|||
padding: 30rpx 0rpx 60rpx; |
|||
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: #1A1A1A; |
|||
font-size: 32rpx; |
|||
font-weight: 700; |
|||
margin: 16rpx 0rpx 34rpx; |
|||
} |
|||
.oem-line{ |
|||
width: 456rpx; |
|||
color: #1A1A1A; |
|||
font-size: 28rpx; |
|||
line-height: 48rpx; |
|||
.ol-txt1{ |
|||
color: #009874; |
|||
} |
|||
.ol-txt2{ |
|||
color: #FF873D; |
|||
} |
|||
} |
|||
.oem-box{ |
|||
margin: 58rpx 0 48rpx; |
|||
width: 456rpx; |
|||
@include centerFlex(space-between); |
|||
>view{ |
|||
@include centerFlex(flex-start); |
|||
>image{ |
|||
flex-shrink: 0; |
|||
width: 28rpx; |
|||
height: 28rpx; |
|||
border-radius: 50%; |
|||
border: 2rpx solid #D8D8D8; |
|||
&.ob-img{ |
|||
width: 32rpx; |
|||
height: 32rpx; |
|||
border: 0rpx solid #D8D8D8; |
|||
} |
|||
} |
|||
>view{ |
|||
margin-left: 12rpx; |
|||
font-size: 28rpx; |
|||
line-height: 48rpx; |
|||
color: #9C9C9F; |
|||
&.ov-active{ |
|||
color: #1A1A1A; |
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
|||
.oem-tips{ |
|||
width: 456rpx; |
|||
margin: 0rpx 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: #1A1A1A; |
|||
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; |
|||
} |
|||
} |
|||
</style> |
@ -1,185 +0,0 @@ |
|||
<template> |
|||
<view class="timing-order" @click="toOrderDetails"> |
|||
<view class="ro-header"> |
|||
<view class="rh-view">{{orderInfo.stadium_name || '-'}}</view> |
|||
<text :class="[ 'rh-text', orderInfo.pay_status == 0?'rh-active':'' ]">{{zh_order_status(orderInfo.pay_status)}}</text> |
|||
</view> |
|||
<view class="ro-section"> |
|||
<view class="rs-line"> |
|||
<view class="rl-view">订单编号:</view> |
|||
<view class="rl-view"> |
|||
<view class="rv-view">{{orderInfo.order_no || '-'}}</view> |
|||
</view> |
|||
<image class="rl-image" src="/static/images/icon/arrow_b2.png"></image> |
|||
</view> |
|||
<!-- 场时有 人时没有 order_type: 1场时 2人时 --> |
|||
<view class="rs-line" v-if="orderInfo.order_type == 1"> |
|||
<view class="rl-view">项目:</view> |
|||
<view class="rl-view"> |
|||
<view class="rv-view">{{orderInfo.project_name || '-'}}</view> |
|||
</view> |
|||
</view> |
|||
<view class="rs-line"> |
|||
<view class="rl-view">时长:</view> |
|||
<view class="rl-view"> |
|||
<view :class="[ 'rv-view', orderInfo.pay_status == 0?'rv-active':'' ]">{{ orderInfo.extension.duration || '-'}}</view> |
|||
</view> |
|||
</view> |
|||
<view class="rs-btn" v-if="orderInfo.pay_status == 0&&orderInfo.early_end_timing==false"><view @click.stop="isEndBill=true">结束计费</view></view> |
|||
</view> |
|||
<view class="ro-bot" v-if="orderInfo.pay_status != 0"> |
|||
<view class="rb-total">实付款 <text class="rt-txt"> ¥{{orderInfo.pay_amount || 0}}</text></view> |
|||
</view> |
|||
|
|||
<!-- 结束计费弹框 --> |
|||
<end-billing-modal |
|||
v-if="isEndBill==true" |
|||
@close="isEndBill=false" |
|||
@timeEndBtn="timeEndBtn" |
|||
:orderInfo="orderInfo" |
|||
></end-billing-modal> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@/utils/util'; |
|||
import end_billing_modal from '../end_billing_modal/end_billing_modal.vue'; |
|||
export default { |
|||
components: { |
|||
'end-billing-modal': end_billing_modal, |
|||
}, |
|||
props: { |
|||
orderInfo: { |
|||
type: Object, |
|||
default: ()=>({}) |
|||
} |
|||
}, |
|||
computed: { |
|||
zh_order_status(){ |
|||
// 订单状态 0计费中1已完成 |
|||
let { orderInfo } = this |
|||
return status =>{ |
|||
const _obj = { |
|||
'0': orderInfo.early_end_timing==true?'待支付':'计费中', |
|||
'1': '已完成', |
|||
'4': '已退款', |
|||
} |
|||
return _obj[`${status}`] || '-' |
|||
} |
|||
}, |
|||
}, |
|||
data() { |
|||
return { |
|||
isEndBill: false, |
|||
} |
|||
}, |
|||
methods:{ |
|||
toOrderDetails(){ |
|||
let { orderInfo } = this |
|||
// let _query = {} |
|||
// _query["stadium_id"] = orderInfo.stadium_id |
|||
// _query["order_no"] = orderInfo.order_no |
|||
// _query["order_type"] = 1 |
|||
let _str = `stadium_id=${orderInfo.stadium_id || ''}&order_no=${orderInfo.order_no || ''}` |
|||
util.routeTo(`/subpackage/order/pages/timing/detail?${_str}`,'nT'); |
|||
// this.$emit('orderDetailChange'); |
|||
}, |
|||
timeEndBtn(){ |
|||
this.$emit('refreshList'); |
|||
}, |
|||
} |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" > |
|||
@import '~style/public.scss'; |
|||
.timing-order{ |
|||
padding: 0 24upx; |
|||
border-radius: 10upx; |
|||
background-color: #fff; |
|||
.ro-header{ |
|||
margin-bottom: 18upx; |
|||
height: 98upx; |
|||
line-height: 96upx; |
|||
border-bottom: 2upx solid #D8D8D8; |
|||
@include centerFlex(space-between); |
|||
.rh-view{ |
|||
flex-grow: 1; |
|||
font-size: 28upx; |
|||
color: #1a1a1a; |
|||
@include textHide(1); |
|||
} |
|||
.rh-text{ |
|||
margin-left: 20upx; |
|||
flex-shrink: 0; |
|||
font-size: 28upx; |
|||
color: #9C9C9F; |
|||
} |
|||
.rh-active{ |
|||
color: $themeColor; |
|||
} |
|||
} |
|||
.ro-section{ |
|||
padding-bottom: 30upx; |
|||
.rs-line{ |
|||
display: flex; |
|||
.rl-view,.rv-view{ |
|||
line-height: 40upx; |
|||
font-size: 24upx; |
|||
color: #9c9c9f; |
|||
} |
|||
.rl-view{ |
|||
&:first-child{ |
|||
flex-shrink: 0; |
|||
} |
|||
&+.rl-view{ |
|||
flex-grow: 1; |
|||
.rv-view{ |
|||
@include textHide(1); |
|||
} |
|||
} |
|||
} |
|||
.rv-active{ |
|||
color: $themeColor; |
|||
} |
|||
>.rl-image{ |
|||
width: 32rpx; |
|||
height: 32rpx; |
|||
} |
|||
} |
|||
|
|||
.rs-btn{ |
|||
margin-top: 8rpx; |
|||
@include centerFlex(flex-end); |
|||
>view{ |
|||
width: 192rpx; |
|||
height: 80rpx; |
|||
border: 2rpx solid #009874; |
|||
border-radius: 10rpx; |
|||
color: #009874; |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
text-align: center; |
|||
line-height: 80rpx; |
|||
} |
|||
} |
|||
|
|||
} |
|||
.ro-bot{ |
|||
padding-top: 20upx; |
|||
padding-bottom: 30upx; |
|||
border-top: 2upx solid #D8D8D8; |
|||
.rb-total{ |
|||
line-height: 40upx; |
|||
text-align: right; |
|||
font-size: 24upx; |
|||
color: #9c9c9f; |
|||
.rt-txt{ |
|||
color: #1A1A1A; |
|||
margin-left: 10rpx; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,53 +0,0 @@ |
|||
<template> |
|||
<view class="order-list"> |
|||
<order-list-header |
|||
ref="orderListHeader" |
|||
@change:stadium="changeStadium" |
|||
@click:time="showPeriodModal" |
|||
@click:filter="showFilterModal" |
|||
></order-list-header> |
|||
<period-modal |
|||
ref="periodModal" |
|||
></period-modal> |
|||
<filter-modal ref="filterModal"></filter-modal> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import orderListHeader from "../../components/order_list/header.vue"; |
|||
import periodModal from "../../components/order_list/period_modal.vue"; |
|||
import filterModal from "../../components/order_list/filter_modal.vue"; |
|||
export default { |
|||
components: { |
|||
'order-list-header': orderListHeader, |
|||
'period-modal': periodModal, |
|||
'filter-modal': filterModal |
|||
}, |
|||
async onLoad(options){ |
|||
let _list = await this.$refs.orderListHeader.initStadiumSelect(options.brand_id) |
|||
}, |
|||
methods: { |
|||
showFilterModal(){ |
|||
this.$refs.filterModal.show(); |
|||
}, |
|||
changeStadium(e){ |
|||
console.log('changeStadium:', e) |
|||
}, |
|||
showPeriodModal(){ |
|||
this.$refs.periodModal.init({ |
|||
star: '2020-08-01', |
|||
end: '2020-08-27', |
|||
success: res=>{ |
|||
console.log('success:', res) |
|||
} |
|||
}); |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.order-list{ |
|||
|
|||
} |
|||
</style> |
@ -1,379 +0,0 @@ |
|||
<template> |
|||
<view class="timing-details"> |
|||
<view class="td-head"> |
|||
<view class="th-store"> |
|||
<image :src="orderInfo.stadium_logo || ''"></image> |
|||
<view>{{orderInfo.stadium_name || '-'}}</view> |
|||
</view> |
|||
<view class="th-line"> |
|||
<view>订单编号:<text>{{orderInfo.order_no || '-'}}</text></view> |
|||
<view><text :class="[orderInfo.pay_status == 0?'tl-active':'']">{{zh_order_status(orderInfo.pay_status)}}</text></view> |
|||
</view> |
|||
<view class="th-line"> |
|||
<view>创建时间:<text>{{orderInfo.model.created_at || '-'}}</text></view> |
|||
</view> |
|||
<view class="th-line"> |
|||
<view>用户昵称:<text>{{orderInfo.nickname || '-'}}</text></view> |
|||
</view> |
|||
</view> |
|||
<view class="td-box"> |
|||
<view class="tb-title">计时信息</view> |
|||
<view class="tb-line"> |
|||
<!-- 项目 场时有 人时没有 order_type: 1场时 2人时 --> |
|||
<view v-if="orderInfo.order_type==1">项目:<text>{{orderInfo.project_name || '-'}}({{orderInfo.venue_name || '-'}})</text></view> |
|||
<view>进场时间:<text>{{orderInfo.start_time || '-'}}</text></view> |
|||
<!-- 离场时间 已完成显示 --> |
|||
<view v-if="orderInfo.pay_status != 0">离场时间:<text>{{orderInfo.end_time || '-'}}</text></view> |
|||
<view>时长合计:<text>{{orderInfo.extension.duration || '-'}}</text></view> |
|||
</view> |
|||
<view class="tb-section" v-if="!(orderInfo.pay_status== 0&&orderInfo.early_end_timing==false)"> |
|||
<view class="ts-line"> |
|||
<view>金额小计</view> |
|||
<view>¥{{orderInfo.amount || 0}}</view> |
|||
</view> |
|||
<view class="ts-line"> |
|||
<view>积分抵扣</view> |
|||
<view>-¥{{orderInfo.deduction_amount ||0}}</view> |
|||
</view> |
|||
<view class="ts-line"> |
|||
<view>折扣金额</view> |
|||
<view>-¥{{orderInfo.discount_amount||0}}</view> |
|||
</view> |
|||
<view class="ts-line"> |
|||
<view>优惠券优惠</view> |
|||
<view>-¥{{orderInfo.coupons_amount || 0}}</view> |
|||
</view> |
|||
<view class="ts-total"> |
|||
<view>合计支付:<text>¥</text><text>{{orderInfo.pay_amount ||0}}</text></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="td-box" v-if="orderInfo.pay_status != 0"> |
|||
<view class="tb-title">支付信息</view> |
|||
<view class="tb-line"> |
|||
<view>支付方式:<text>{{zh_pay_type(orderInfo.pay_type)}}</text></view> |
|||
<view>支付时间:<text>{{orderInfo.pay_time || '-'}}</text></view> |
|||
<view v-if="orderInfo.pay_type==0">微信交易号:<text>{{orderInfo.trade_no || ''}}</text></view> |
|||
<view v-if="orderInfo.pay_type==3">操作人:<text>{{orderInfo.end_bill_operator_name || ''}}</text></view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<!-- 退款列表 --> |
|||
<view v-for="(e, i) in refundList" :key="i" style="padding: 24rpx 24rpx 0;"> |
|||
<order-refund-info |
|||
:refund_price="e.amount || 0" |
|||
:refund_no="e.refund_no || '-'" |
|||
:refund_time="e.refund_time || '-'" |
|||
:refund_reason="e.reason || '-'" |
|||
:nameKey="i + 1" |
|||
></order-refund-info> |
|||
</view> |
|||
|
|||
<view class="td-btn" @click="isEndBill = true" v-if="orderInfo.pay_status == 0&&orderInfo.early_end_timing==false">结束计费</view> |
|||
<view class="td-btn" @click="completeBtn" v-if="orderInfo.pay_status == 0&&orderInfo.early_end_timing==true">完结订单</view> |
|||
|
|||
<!-- 退款按钮拦 --> |
|||
<order-refund-fixed |
|||
:pay_amount="orderInfo.pay_amount || 0" |
|||
:refund_amount="orderInfo.refund_amount || 0" |
|||
:refund_times="(refundList&&refundList.length) || 0" |
|||
@click:button="refunndBtn" |
|||
></order-refund-fixed> |
|||
|
|||
<!-- 结束计费弹框 --> |
|||
<end-billing-modal |
|||
v-if="isEndBill==true" |
|||
@close="isEndBill=false" |
|||
@timeEndBtn="timeEndBtn" |
|||
:orderInfo="orderInfo" |
|||
></end-billing-modal> |
|||
<!-- 退款弹窗 --> |
|||
<order-refund-modal |
|||
ref="orderRefundModal" |
|||
></order-refund-modal> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@/utils/util'; |
|||
import { ORDER_API } from '../../js/api'; |
|||
import server from '../../js/server'; |
|||
import { mapState } from 'vuex'; |
|||
import end_billing_modal from '@/components/end_billing_modal/end_billing_modal.vue'; |
|||
import orderRefundFixed from '@/components/order_refund/fixed.vue' |
|||
import orderRefundModal from '@/components/order_refund/modal.vue'; |
|||
import orderRefundInfo from '@/components/order_refund/info.vue'; |
|||
export default { |
|||
components: { |
|||
'end-billing-modal': end_billing_modal, |
|||
'order-refund-fixed': orderRefundFixed, |
|||
'order-refund-modal': orderRefundModal, |
|||
'order-refund-info': orderRefundInfo |
|||
}, |
|||
computed: { |
|||
...mapState(['brandInfo']), |
|||
zh_order_status(){ |
|||
// 订单状态 0计费中1已完成 |
|||
let { orderInfo } = this |
|||
return status =>{ |
|||
const _obj = { |
|||
'0': orderInfo.early_end_timing==true?'待支付':'计费中', |
|||
'1': '已完成', |
|||
'4': '已退款', |
|||
} |
|||
return _obj[`${status}`] || '-' |
|||
} |
|||
}, |
|||
}, |
|||
data() { |
|||
return { |
|||
isEndBill: false, |
|||
orderInfo: {}, |
|||
refundList: [], // 退款列表 |
|||
} |
|||
}, |
|||
onLoad(options){ |
|||
this.getOrderInfo({ |
|||
order_no: options?.order_no || '', |
|||
stadium_id: options?.stadium_id || '' |
|||
}) |
|||
this.getRefundTimes(options?.order_no || ''); |
|||
}, |
|||
methods: { |
|||
refunndBtn(){ |
|||
let { orderInfo, refundList } = this; |
|||
this.$refs.orderRefundModal.show({ |
|||
stadium_name: orderInfo?.stadium_name ?? '', |
|||
order_no: orderInfo?.order_no ?? '', |
|||
mobile: orderInfo?.mobile ?? '', |
|||
refundable_amount: orderInfo?.extension?.refundable_amount ?? 0, |
|||
refundable_integral: orderInfo?.extension?.refundable_integral ?? 0, |
|||
refund_times: refundList?.length || -1, |
|||
confirm: e => { |
|||
this.orderRefund({ |
|||
order_no: orderInfo?.order_no || '', |
|||
amount: e.refund_amount || 0, |
|||
integral: e.refund_integral || 0, |
|||
stadium_id: orderInfo?.stadium_id || '' |
|||
}) |
|||
} |
|||
}); |
|||
}, |
|||
orderRefund({ order_no = '', amount = 0, integral = 0, stadium_id = ''}){ |
|||
util.showLoad(); |
|||
server.get({ |
|||
url: ORDER_API.orderRefund, |
|||
data: { order_no, amount, integral }, |
|||
isDefaultGet: false |
|||
}) |
|||
.then(res=>{ |
|||
util.hideLoad(); |
|||
if(res.data.code == 0){ |
|||
util.showNone(res.data.message || '操作成功!'); |
|||
}else{ |
|||
util.showNone(res.data.message || '操作失败!'); |
|||
} |
|||
}) |
|||
.catch(util.hideLoad) |
|||
.finally(_=>setTimeout(_=>{ |
|||
this.getOrderInfo({ order_no, stadium_id }); |
|||
this.getRefundTimes(order_no); |
|||
}, 1200)); |
|||
}, |
|||
async getRefundTimes(order_no){ |
|||
try{ |
|||
let _refundRes = await this.$store.dispatch('getOrderRefundList', order_no); |
|||
let _refundLs = _refundRes?.data?.data?.list || []; |
|||
this.refundList = _refundLs; |
|||
}catch(err){ |
|||
console.warn('getRefundTimes err', err); |
|||
} |
|||
}, |
|||
getOrderInfo({ order_no, stadium_id }){ |
|||
util.showLoad(); |
|||
server.get({ |
|||
url: ORDER_API.timeOrderDetail, |
|||
data: { order_no, stadium_id }, |
|||
failMsg: '加载失败!' |
|||
}) |
|||
.then(res=>{ |
|||
util.hideLoad() |
|||
this.orderInfo = res || {} |
|||
}) |
|||
.catch(util.hideLoad) |
|||
}, |
|||
zh_pay_type: util.order_pay_type_txt, |
|||
completeBtn(){ |
|||
this.$emit('completeBtn'); |
|||
}, |
|||
|
|||
timeEndBtn(){ |
|||
let { orderInfo } = this; |
|||
this.getOrderInfo({ |
|||
order_no: orderInfo?.order_no || '', |
|||
stadium_id: orderInfo?.stadium_id || '' |
|||
}) |
|||
}, |
|||
// 计时订单-完结订单 |
|||
completeBtn(){ |
|||
let { orderInfo } = this |
|||
util.showModal({ |
|||
title: '提示', |
|||
content: '是否确认完结订单?', |
|||
showCancel: true, |
|||
success: modalRes=>{ |
|||
if(modalRes.confirm)this.timeOrderComplete({ |
|||
brand_id: orderInfo?.brand_id || '', |
|||
order_no: orderInfo?.order_no || '', |
|||
stadium_id: orderInfo?.stadium_id || '' |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
//计时订单完结 请求 |
|||
timeOrderComplete({ brand_id, order_no, stadium_id }){ |
|||
util.showLoad(); |
|||
server.get({ |
|||
url: ORDER_API.timeOrderComplete, //计时订单完结 |
|||
data: { brand_id, order_no }, |
|||
failMsg: '请求失败!' |
|||
}) |
|||
.then(res=>{ |
|||
util.hideLoad(); |
|||
util.showNone('操作成功!'); |
|||
|
|||
setTimeout(_=>{ |
|||
this.getOrderInfo({ order_no, stadium_id }); |
|||
util.previousPageFunction({ |
|||
fnName: 'refreshList', |
|||
query: { isLoad: false}, |
|||
}); |
|||
}, 1200) |
|||
}) |
|||
.catch(util.hideLoad) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" > |
|||
.timing-details{ |
|||
margin-bottom: 24rpx; |
|||
.td-head{ |
|||
margin: 24rpx 24rpx 0rpx; |
|||
padding: 30rpx; |
|||
background-color: #FFF; |
|||
border-radius: 10rpx 10rpx 0px 0px; |
|||
.th-store{ |
|||
padding-bottom: 26rpx; |
|||
margin-bottom: 18rpx; |
|||
border-bottom: 2rpx solid #D8D8D8; |
|||
display: flex; |
|||
justify-content: flex-start; |
|||
>image{ |
|||
flex-shrink: 0; |
|||
width: 40rpx; |
|||
height: 40rpx; |
|||
} |
|||
>view{ |
|||
flex-grow: 1; |
|||
margin-left: 14rpx; |
|||
color: #333333; |
|||
font-size: 28rpx; |
|||
} |
|||
} |
|||
.th-line{ |
|||
margin-top: 8rpx; |
|||
@include ctf(space-between); |
|||
>view{ |
|||
line-height: 40rpx; |
|||
font-size: 28rpx; |
|||
&:first-child{ |
|||
color: #9A9A9D; |
|||
>text{ |
|||
color: #333333; |
|||
} |
|||
} |
|||
&:nth-child(2){ |
|||
>text{ |
|||
color: #9A9A9D; |
|||
} |
|||
.tl-active{ |
|||
color: $mColor; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.td-box{ |
|||
margin: 24rpx 24rpx 0rpx; |
|||
padding: 30rpx; |
|||
background-color: #FFF; |
|||
border-radius: 10rpx; |
|||
.tb-title{ |
|||
color: #9A9A9D; |
|||
font-size: 28rpx; |
|||
margin-bottom: 20rpx; |
|||
} |
|||
.tb-line{ |
|||
>view{ |
|||
line-height: 52rpx; |
|||
font-size: 28rpx; |
|||
color: #9A9A9D; |
|||
>text{ |
|||
color: #333333; |
|||
} |
|||
} |
|||
|
|||
} |
|||
.tb-section{ |
|||
margin-top: 30rpx; |
|||
border-top: 2rpx solid #D8D8D8; |
|||
.ts-line{ |
|||
margin-top: 26rpx; |
|||
@include ctf(space-between); |
|||
>view{ |
|||
color: #333333; |
|||
&:first-child{ |
|||
font-size: 28rpx; |
|||
} |
|||
&:nth-child(2){ |
|||
font-size: 24rpx; |
|||
margin-right: 8rpx; |
|||
} |
|||
} |
|||
} |
|||
.ts-total{ |
|||
margin-top: 22rpx; |
|||
@include ctf(flex-end); |
|||
>view{ |
|||
color: #333333; |
|||
font-size: 28rpx; |
|||
>text{ |
|||
color: #FF873D; |
|||
&:first-child{ |
|||
font-size: 28rpx; |
|||
} |
|||
&:nth-child(2){ |
|||
font-size: 36rpx; |
|||
margin-right: 8rpx; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.td-btn{ |
|||
height: 112rpx; |
|||
margin: 80rpx 24rpx 10upx; |
|||
border-radius: 10rpx; |
|||
background-color: $mColor; |
|||
color: #FFF; |
|||
font-size: 32rpx; |
|||
line-height: 112rpx; |
|||
text-align: center; |
|||
} |
|||
|
|||
} |
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue