zmt
4 years ago
6 changed files with 630 additions and 14 deletions
-
4src/components/organize_order/organize_order.vue
-
61src/pages/order_list/order_list.vue
-
549src/subpackage/device/components/order/organize_detail/organize_detail.vue
-
4src/subpackage/device/js/device_api.js
-
23src/subpackage/device/pages/order_details/order_details.vue
-
3src/utils/util.js
@ -0,0 +1,549 @@ |
|||
<template> |
|||
<view class="timing-details"> |
|||
<view class="td-head"> |
|||
<view class="th-store"> |
|||
<image :src="orderInfo.original_order.extension.stadium_logo || '' "></image> |
|||
<view>{{orderInfo.original_order.extension.stadium_name || '-'}}</view> |
|||
</view> |
|||
<view class="th-line"> |
|||
<view>订单编号:<text>{{orderInfo.order_no || '-'}}</text></view> |
|||
<view><text :class="[orderInfo.original_order.pay_status == 0?'tl-active':'']">{{yw_order_status(orderInfo.original_order.pay_status)}}</text></view> |
|||
</view> |
|||
<view class="th-line"> |
|||
<view>创建时间:<text>{{orderInfo.original_order.created_at || '-'}}</text></view> |
|||
</view> |
|||
<view class="th-line"> |
|||
<view>用户昵称:<text>{{orderInfo.user_nickname || '-'}}</text></view> |
|||
</view> |
|||
<view class="th-line"> |
|||
<view>约玩类型:<text>{{yw_order_type(orderInfo.type)}}</text></view> |
|||
</view> |
|||
</view> |
|||
<!-- 用户信息 --> |
|||
<view class="td-box" > |
|||
<view class="tb-title">用户信息</view> |
|||
<view class="tb-line"> |
|||
<view>姓名:<text>{{(orderInfo.actual_name|| '-')}}</text></view> |
|||
<view>身份证:<text>{{orderInfo.id_card || '-'}}</text></view> |
|||
</view> |
|||
</view> |
|||
<!-- 约玩信息 --> |
|||
<view class="td-box" > |
|||
<view class="tb-title">约玩信息</view> |
|||
<view class="tb-line"> |
|||
<view>约玩主题:<text>{{(orderInfo.theme)}}</text></view> |
|||
<view class="yw-place-box"> |
|||
<view class="yw-title">预定场地:</view> |
|||
<view class="yw-place"> |
|||
<view v-for="y_item in orderInfo.original_order.sessions"> |
|||
{{y_item.venue_name}} {{y_item.duration}} ( ¥{{y_item.price}} ) |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- <view>报名费用:<text>{{orderInfo.original_order.sessions[0].price || '-'}}</text></view> --> |
|||
<!-- <view>订场费用:<text>{{orderInfo.original_order.sessions[0].price || '-'}}</text></view> --> |
|||
</view> |
|||
</view> |
|||
<!-- 报名信息 --> |
|||
<view class="td-box" v-if="orderInfo.original_order.pay_status==2&&orderInfo.type=='Main'"> |
|||
<view class="tb-title">报名信息</view> |
|||
<view class="tb-line"> |
|||
<view class="user-images"> |
|||
<view class="u-item" :key="index" v-for="(item,index) in orderInfo.sub_order_data" v-if="(openImages||(!openImages&&index<5))"> |
|||
<image :src="item.user_avatar_url" mode=""></image> |
|||
<text>{{item.user_nickname}}</text> |
|||
</view> |
|||
|
|||
</view> |
|||
<view class="show-ui-all" @click="toggleImages()"> |
|||
<image class="" :class="openImages?'reverse':''" src="../../../../../static/images/icon/retail/dropDown.png" mode=""></image> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="bm-info-box"> |
|||
<view class="has_line">报名总金额: <text>{{orderInfo.sign_up_total_amount}}元</text></view> |
|||
<view class="">已发放: <text>{{orderInfo.amount_already_amount}}元</text></view> |
|||
<view class="">未发放: <text>{{orderInfo.un_amount_already_amount}}元</text></view> |
|||
</view> |
|||
|
|||
<view class="ff_btn" v-if="orderInfo.status=='End'"> |
|||
<view class="" @click="clickSendAmount">发放金额</view> |
|||
</view> |
|||
</view> |
|||
<!-- 金额小计 --> |
|||
<view class="td-box"> |
|||
<view class="tb-section " v-if="orderInfo.original_order.pay_status!= 0"> |
|||
<view class="ts-line"> |
|||
<view>金额小计</view> |
|||
<view>¥{{orderInfo.original_order.amount || 0}}</view> |
|||
</view> |
|||
<view class="ts-line"> |
|||
<view>积分抵扣</view> |
|||
<view>-¥{{orderInfo.original_order.deduction_amount ||0}}</view> |
|||
</view> |
|||
<view class="ts-line"> |
|||
<view>折扣金额</view> |
|||
<view>-¥{{orderInfo.original_order.discount_amount||0}}</view> |
|||
</view> |
|||
<view class="ts-line"> |
|||
<view>优惠券优惠</view> |
|||
<view>-¥{{orderInfo.original_order.coupons_amount || 0}}</view> |
|||
</view> |
|||
<view class="ts-total"> |
|||
<view>合计支付:<text>¥</text><text>{{orderInfo.original_order.pay_amount ||0}}</text></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- 支付信息 --> |
|||
<view class="td-box" v-if="orderInfo.original_order.pay_status == 1||orderInfo.original_order.pay_status == 2"> |
|||
<view class="tb-title">支付信息</view> |
|||
<view class="tb-line"> |
|||
<view>支付方式:<text>{{zh_pay_type(orderInfo.original_order.pay_type)}}</text></view> |
|||
<view>支付时间:<text>{{orderInfo.original_order.pay_time || '-'}}</text></view> |
|||
<view>微信交易号:<text>{{orderInfo.original_order.trade_no || ''}}</text></view> |
|||
</view> |
|||
</view> |
|||
<!-- 退款信息 --> |
|||
<view class="td-box" v-if="orderInfo.original_order.pay_status == 4"> |
|||
<view class="tb-title">退款信息</view> |
|||
<view class="tb-line"> |
|||
<view>退款时间:<text>{{orderInfo.original_order.refund_time|| '-'}}</text></view> |
|||
<view>退款编号:<text>{{orderInfo.original_order.refund_no || '-'}}</text></view> |
|||
<view>退款金额:<text>{{orderInfo.original_order.refund_amount || ''}}</text></view> |
|||
<view>退款说明:<text>{{orderInfo.original_order.refund_reason || ''}}</text></view> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- <view class="td-btn" @click="isShowEnd = !isShowEnd" v-if="orderInfo.original_order.pay_status == 0">结束计费</view> --> |
|||
|
|||
<!-- 弹框 结束计费 --> |
|||
<view class="ox-dark-mask" v-if="isShowEnd" @touchmove.stop.prevent="moveHandle"> |
|||
<view class="odm-end-modal"> |
|||
<view class="oem-close"> |
|||
<image src="/static/images/icon/x_close.png" @click="isShowEnd = false"></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 || '-'}}</text></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> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@/utils/util'; |
|||
import deviceServer from '../../../js/device_server'; |
|||
import deviceApi from '../../../js/device_api'; |
|||
|
|||
import { servers } from '@/js/server'; |
|||
import { API } from '@/js/api'; |
|||
|
|||
import { mapState } from 'vuex'; |
|||
export default { |
|||
props: { |
|||
orderInfo: { |
|||
type: Object, |
|||
default: ()=>({}) |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapState(['brandInfo']), |
|||
yw_order_status(){ |
|||
return status =>{ |
|||
const _obj = {/* */ |
|||
'1': '已付款', |
|||
'2': '已完成', |
|||
'4': '已退款', |
|||
} |
|||
return _obj[`${status}`] || '-' |
|||
} |
|||
}, |
|||
zh_pay_type(){ |
|||
// 支付类型 0微信支付1支付宝支付2储值卡支付 |
|||
return status =>{ |
|||
const _obj = { |
|||
'0': '微信支付', |
|||
'1': '支付宝支付', |
|||
'2': '储值卡支付', |
|||
'3': '商家主动结束计费', |
|||
} |
|||
return _obj[`${status}`] || '-' |
|||
} |
|||
}, |
|||
yw_order_type(){ |
|||
// 约玩类型 type Main/Sub 发起、参与 |
|||
return status =>{ |
|||
const _obj = { |
|||
'Main': '发起的约玩', |
|||
'Sub': '参与的约玩', |
|||
} |
|||
return _obj[`${status}`] || '-' |
|||
} |
|||
}, |
|||
|
|||
}, |
|||
data() { |
|||
return { |
|||
isShowEnd: false, |
|||
input_amount: "", |
|||
userImagesArr:[], |
|||
openImages:false, |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
confirmChange(){ |
|||
let { brandInfo, orderInfo, input_amount } = this |
|||
if(input_amount == '')return util.showNone('请输入金额!'); |
|||
util.showLoad(); |
|||
this.orderInfo.order_no = "JS20210506171239462527"; //订单号临时修改 |
|||
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); |
|||
}) |
|||
}, |
|||
|
|||
toggleImages(){ |
|||
this.openImages=!this.openImages |
|||
}, |
|||
clickSendAmount(){ |
|||
let that = this |
|||
console.log(999,this.orderInfo) |
|||
uni.showModal({ |
|||
title: '发放金额', |
|||
content: `确定要将未发放金额${that.orderInfo.un_amount_already_amount}全部转给约玩发起人?`, |
|||
confirmColor:"#469576", |
|||
success: function (res) { |
|||
if (res.confirm) { |
|||
console.log('用户点击确定'); |
|||
servers.get({ |
|||
url: API.amountIssued, |
|||
data: { |
|||
order_no: that.orderInfo.order_no, |
|||
}, |
|||
failMsg: '加载失败!' |
|||
}) |
|||
.then(res=>{ |
|||
console.log(888,res); |
|||
util.showNone("发放成功") |
|||
setTimeout(()=>uni.navigateBack(),1200); |
|||
}).catch(e=>{ |
|||
util.showNone("发放失败") |
|||
}) |
|||
|
|||
} else if (res.cancel) { |
|||
console.log('用户点击取消'); |
|||
} |
|||
} |
|||
}); |
|||
|
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" > |
|||
@import '~style/public.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; |
|||
background-color: skyblue; |
|||
|
|||
} |
|||
>view{ |
|||
flex-grow: 1; |
|||
margin-left: 14rpx; |
|||
color: #333333; |
|||
font-size: 28rpx; |
|||
} |
|||
} |
|||
.th-line{ |
|||
margin-top: 8rpx; |
|||
@include centerFlex(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: #009874; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.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{ |
|||
|
|||
.user-images{ |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
flex-wrap: wrap; |
|||
|
|||
.u-item{ |
|||
width: 120rpx; |
|||
flex-direction: column; |
|||
@include centerFlex(center); |
|||
margin-left: 6rpx; |
|||
image{ |
|||
width: 100rpx; |
|||
height: 100rpx; |
|||
border-radius: 50%; |
|||
// background-color: red; |
|||
// border: 4rpx solid #009876; |
|||
} |
|||
text{ |
|||
font-weight: 400; |
|||
color: #333333; |
|||
font-size: 24rpx; |
|||
text-overflow: ellipsis; |
|||
-webkit-line-clamp: 1; |
|||
-webkit-box-orient: vertical; |
|||
word-break: break-all; |
|||
overflow: hidden; |
|||
display: -webkit-box; |
|||
} |
|||
} |
|||
} |
|||
.show-ui-all{ |
|||
width: 100%; |
|||
text-align: center; |
|||
.reverse{ |
|||
transform: rotateX(180deg); |
|||
} |
|||
image{ |
|||
display: inline-block; |
|||
width: 24rpx; |
|||
height: 24rpx; |
|||
} |
|||
} |
|||
|
|||
|
|||
>view{ |
|||
line-height: 52rpx; |
|||
font-size: 28rpx; |
|||
color: #9A9A9D; |
|||
>text{ |
|||
color: #333333; |
|||
} |
|||
} |
|||
|
|||
} |
|||
.tb-section{ |
|||
.has_line{ |
|||
padding-top: 30rpx; |
|||
border-top: 2rpx solid #D8D8D8; |
|||
} |
|||
.ts-line{ |
|||
margin-top: 26rpx; |
|||
@include centerFlex(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 centerFlex(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; |
|||
border-radius: 10rpx; |
|||
background-color: #009874; |
|||
color: #FFF; |
|||
font-size: 32rpx; |
|||
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; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.ff_btn{ |
|||
width: 100%; |
|||
margin-top: 20rpx; |
|||
@include centerFlex(center); |
|||
>view{ |
|||
@include centerFlex(center); |
|||
width: 500rpx; |
|||
height: 112rpx; |
|||
background: #009874; |
|||
border-radius: 10rpx; |
|||
color: white; |
|||
} |
|||
} |
|||
.bm-info-box{ |
|||
color: #333333; |
|||
font-size: 28rpx; |
|||
>view{ |
|||
margin-bottom: 20rpx; |
|||
} |
|||
.has_line{ |
|||
padding-top: 30rpx; |
|||
border-top: 2rpx solid #D8D8D8; |
|||
} |
|||
text{ |
|||
margin-left: 20rpx; |
|||
color: #FF873D; |
|||
} |
|||
} |
|||
.yw-place-box{ |
|||
@include centerFlex(flex-start); |
|||
align-items: flex-start; |
|||
.yw-title{ |
|||
color: #9A9A9D; |
|||
font-size: 28rpx; |
|||
} |
|||
.yw-place{ |
|||
width: 500rpx; |
|||
height: auto; |
|||
@include centerFlex(flex-start); |
|||
flex-direction: column; |
|||
align-items: flex-start; |
|||
color: #333333; |
|||
} |
|||
} |
|||
|
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue