6 changed files with 274 additions and 31 deletions
-
117src/components/order_list/device/device.vue
-
39src/components/order_list/locker/locker.vue
-
54src/pages/order_list/order_list.vue
-
1src/subpackage/order/js/api.js
-
90src/subpackage/order/pages/devices/detail/detail.vue
-
2src/subpackage/order/pages/order_manage/order_manage.vue
@ -0,0 +1,117 @@ |
|||||
|
<template> |
||||
|
<!-- 售货柜/浴室/咖啡/储物柜订单 --> |
||||
|
<view class="device-container" @click="toInfo"> |
||||
|
<a-header :source="orderInfo.source" :status="status_txt(orderInfo.pay_status)"> |
||||
|
<view slot="line" class="dc-line"> |
||||
|
<image class="dl-img" mode="aspectFit" src="/static/images/icon/location.png"></image> |
||||
|
<view class="dl-view">{{ orderInfo.extension.hardware_name || '-' }}</view> |
||||
|
</view> |
||||
|
</a-header> |
||||
|
<view class="dc-info"> |
||||
|
<a-line :value="orderInfo.order_no || '-'"> |
||||
|
<block slot="name">订单编号:</block> |
||||
|
</a-line> |
||||
|
<a-line :value="showname"> |
||||
|
<block slot="name">商品名称:</block> |
||||
|
</a-line> |
||||
|
<a-line :value="orderInfo.duration_minute || '-'" v-if="orderType == 11"> |
||||
|
<block slot="name">时长:</block> |
||||
|
</a-line> |
||||
|
<a-line :value="buyTime"> |
||||
|
<block slot="name">购买时间:</block> |
||||
|
</a-line> |
||||
|
|
||||
|
<view class="di-total"><text class="dt-txt">合计支付:</text>¥{{orderInfo.pay_amount || 0}}</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import util from '../../../utils/util'; |
||||
|
import a_header from '../a_header/a_header.vue'; |
||||
|
import a_line from '../a_line/a_line.vue'; |
||||
|
export default { |
||||
|
props: { |
||||
|
orderInfo: { |
||||
|
default: { |
||||
|
extension: {} |
||||
|
}, |
||||
|
type: Object, |
||||
|
}, |
||||
|
orderType: { // 售货柜-> 6/ 浴室 -> 11 / 咖啡 -> 9 |
||||
|
default: -1, |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
buyTime(){ |
||||
|
let { orderInfo, orderType } = this; |
||||
|
if(orderType == 11)return orderInfo.created_at || '-' |
||||
|
return orderInfo.pay_time || '-'; |
||||
|
}, |
||||
|
showname(){ |
||||
|
let { orderInfo, orderType } = this; |
||||
|
if(orderType == 6)return orderInfo.goods_name || '-' |
||||
|
if(orderType == 11)return orderInfo.water_valve_name || '-' |
||||
|
if(orderType == 9&&orderInfo.coffee_drink)return orderInfo.coffee_drink.name || '-' |
||||
|
}, |
||||
|
}, |
||||
|
components: { |
||||
|
'a-header': a_header, |
||||
|
'a-line': a_line, |
||||
|
}, |
||||
|
methods: { |
||||
|
status_txt(status){ |
||||
|
|
||||
|
let _obj = { // 售货柜-> 6/ 浴室 -> 11 / 咖啡 -> 9 |
||||
|
1: '交易成功', |
||||
|
4: '退款完成' |
||||
|
}; |
||||
|
|
||||
|
return _obj[status] || '-' |
||||
|
}, |
||||
|
toInfo(){ |
||||
|
let { orderInfo, orderType } = this; |
||||
|
util.routeTo(`/subpackage/order/pages/devices/detail/detail?order_no=${orderInfo.order_no}&type=${orderType}`, 'nT'); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
@import '~style/public.scss'; |
||||
|
.device-container{ |
||||
|
background-color: #fff; |
||||
|
padding: 0 20upx 20upx; |
||||
|
border-radius: 10upx; |
||||
|
} |
||||
|
.dc-info{ |
||||
|
padding-top: 20upx; |
||||
|
.di-total{ |
||||
|
text-align: right; |
||||
|
line-height: 40upx; |
||||
|
font-weight: 500; |
||||
|
font-size: 28upx; |
||||
|
color: #9A9A9D; |
||||
|
@include textHide(1); |
||||
|
.dt-txt{ |
||||
|
color: #333; |
||||
|
font-weight: 400; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.dc-line{ |
||||
|
margin-top: 10upx; |
||||
|
@include centerFlex(flex-start); |
||||
|
.dl-img{ |
||||
|
flex-shrink: 0; |
||||
|
margin-right: 12upx; |
||||
|
height: 28upx; |
||||
|
width: 28upx; |
||||
|
} |
||||
|
.dl-view{ |
||||
|
font-size: 24upx; |
||||
|
line-height: 34upx; |
||||
|
color: #9A9A9D; |
||||
|
} |
||||
|
} |
||||
|
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue