zmt
4 years ago
7 changed files with 259 additions and 12 deletions
-
218src/components/organize_order/organize_order.vue
-
3src/js/api.js
-
39src/pages/order_list/order_list.vue
-
5src/pages/order_search/order_search.vue
-
0src/subpackage/device/components/order/organize_detail/organize_detail.vue
-
1src/subpackage/device/pages/order_details/order_details.vue
-
5src/subpackage/device/pages/order_manage/order_manage.vue
@ -0,0 +1,218 @@ |
|||
<template> |
|||
<view class="timing-order" > |
|||
<view class="ro-header"> |
|||
<view class="rh-view">{{orderInfo.original_order.extension.stadium_name || '-'}}</view> |
|||
<text :class="[ 'rh-text', orderInfo.original_order.pay_status == 0?'rh-active':'' ]">{{zh_order_status(orderInfo.original_order.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 src="/static/images/icon/arrow_b2.png"></image> --> |
|||
</view> |
|||
<view class="rs-line"> |
|||
<view class="rl-view">约玩主题:</view> |
|||
<view class="rl-view"> |
|||
<view class="rv-view">{{orderInfo.theme || '-'}}</view> |
|||
</view> |
|||
</view> |
|||
<view class="rs-line"> |
|||
<view class="rl-view">约玩人数:</view> |
|||
<view class="rl-view"> |
|||
<view class="rv-view">{{orderInfo.person_applicants || '-'}}</view> |
|||
</view> |
|||
</view> |
|||
<view class="rs-line"> |
|||
<view class="rl-view">约玩时间:</view> |
|||
<view class="rl-view"> |
|||
<view class="rv-view">{{orderInfo.label.Date+" "+ orderInfo.label.StartTime+" "+orderInfo.label.EndTime || '-'}}</view> |
|||
</view> |
|||
</view> |
|||
<view class="rs-line" v-if="orderInfo.status=='End'"> |
|||
<view class="rl-view">未发放:</view> |
|||
<view class="rl-view"> |
|||
<view class="rv-view">{{orderInfo.un_amount_already_amount || '-'}}</view> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
<view class="ro-bot" v-if="orderInfo.original_order.pay_status != 0"> |
|||
<!-- status == End 可发放金额--> |
|||
<view v-if="orderInfo.status=='End'" class="ro-btn" @click="clickSendAmount">发放金额</view> |
|||
<view class="rb-total">实付款 <text class="rt-txt"> ¥{{orderInfo.original_order.pay_amount || 0}}</text></view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@/utils/util'; |
|||
import { servers } from '../../js/server'; |
|||
import { API } from '../../js/api'; |
|||
export default { |
|||
props: { |
|||
orderInfo: { |
|||
type: Object, |
|||
default: ()=>({}) |
|||
} |
|||
}, |
|||
computed: { |
|||
zh_order_status(){ |
|||
// 订单状态 0未支付1已支付待使用2已使用3已失效4已退款5申请退款6同意退款 |
|||
return status =>{ |
|||
const _obj = { |
|||
'0': '未支付', |
|||
'1': '已支付', |
|||
'2': '已使用', |
|||
'3': '已失效', |
|||
'4': '已退款', |
|||
'5': '申请退款', |
|||
'6': '同意退款', |
|||
} |
|||
|
|||
return _obj[`${status}`] || '-' |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
} |
|||
}, |
|||
methods:{ |
|||
toOrderDetails(){ |
|||
let { orderInfo } = this |
|||
let _query = {} |
|||
_query["stadium_id"] = orderInfo.stadium_id |
|||
_query["order_no"] = orderInfo.order_no |
|||
_query["order_type"] = 10 |
|||
util.routeTo(`/subpackage/device/pages/order_details/order_details?query=${util.jsonStr(_query)}`,'nT'); |
|||
// this.$emit('orderDetailChange'); |
|||
}, |
|||
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); |
|||
that.$emit('refreshList');//刷新列表 |
|||
}) |
|||
|
|||
} else if (res.cancel) { |
|||
console.log('用户点击取消'); |
|||
} |
|||
} |
|||
}); |
|||
|
|||
} |
|||
} |
|||
|
|||
} |
|||
</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: 20upx; |
|||
.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; |
|||
} |
|||
>image{ |
|||
width: 32rpx; |
|||
height: 32rpx; |
|||
} |
|||
} |
|||
|
|||
} |
|||
.ro-bot{ |
|||
// padding-top: 20rpx; |
|||
// padding-bottom: 30upx; |
|||
border-top: 2upx solid #D8D8D8; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-end; |
|||
align-items: center; |
|||
.rb-total{ |
|||
// display: flex; |
|||
// flex-direction: row; |
|||
// justify-content: center; |
|||
line-height: 70rpx; |
|||
// text-align: right; |
|||
font-size: 24upx; |
|||
color: #9c9c9f; |
|||
.rt-txt{ |
|||
color: #1A1A1A; |
|||
margin-left: 10rpx; |
|||
} |
|||
|
|||
} |
|||
.ro-btn{ |
|||
width: 120rpx; |
|||
height: 60rpx; |
|||
text-align: center; |
|||
line-height: 60rpx; |
|||
font-size: 24upx; |
|||
color: #469576; |
|||
position: absolute; |
|||
left: 32rpx; |
|||
} |
|||
} |
|||
} |
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue