|
@@ -1,10 +1,28 @@
|
|
<template>
|
|
<template>
|
|
- <view class="container">
|
|
|
|
|
|
+ <view class="container-view">
|
|
|
|
+ <view class="order-type-view flex-row flex-between">
|
|
|
|
+ <view class="car-model-list flex-row">
|
|
|
|
+ <view class="car-model-text">小米Su5</view><img class="right-corner-icon" src="https://qiniu.bms16.com/Fqs6TrEmcdT7QNEdKWs9Hir2cacO" alt="">
|
|
|
|
+ </view>
|
|
|
|
+ <view class="order-package-type-view flex-row">
|
|
|
|
+ <view
|
|
|
|
+ v-for="(type, index) in orderTypes"
|
|
|
|
+ :key="index"
|
|
|
|
+ @tap="checkOrderType"
|
|
|
|
+ :data-type="type.value"
|
|
|
|
+ :class="['package-type-list', 'flex-row', {'package-type-list-i': selectOrderType === type.value}]"
|
|
|
|
+ :style="{ marginRight: index === 0 ? '48rpx' : '' }"
|
|
|
|
+ >
|
|
|
|
+ <view class="package-type-text">{{ type.text }}</view>
|
|
|
|
+ <img v-if="selectOrderType === type.value" class="right-button-icon" src="https://qiniu.bms16.com/FmcoAVgWvyK44iPjK0phkDRU21i0" alt="">
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
<view v-for="(item, index) in hireOrderList" :key="index" @tap="loadToNav" :data-orderSn="item.order_sn"
|
|
<view v-for="(item, index) in hireOrderList" :key="index" @tap="loadToNav" :data-orderSn="item.order_sn"
|
|
class="order-card">
|
|
class="order-card">
|
|
<view class="card-top flex-row">
|
|
<view class="card-top flex-row">
|
|
<view>{{ item.car_model }}</view>
|
|
<view>{{ item.car_model }}</view>
|
|
- <view class="card card-k" v-if="item.order_status == 0">待支付</view>
|
|
|
|
|
|
+ <view class="card card-k" v-if="item.order_status == 0">待生效</view>
|
|
<view class="card card-k" v-else-if="item.order_status == 1">待取车</view>
|
|
<view class="card card-k" v-else-if="item.order_status == 1">待取车</view>
|
|
<view class="card card-k" v-else-if="item.order_status == 2">待激活</view>
|
|
<view class="card card-k" v-else-if="item.order_status == 2">待激活</view>
|
|
<view class="card card-b" v-else-if="item.order_status == 3">使用中</view>
|
|
<view class="card card-b" v-else-if="item.order_status == 3">使用中</view>
|
|
@@ -16,37 +34,34 @@
|
|
</view>
|
|
</view>
|
|
<view class="card-border"></view>
|
|
<view class="card-border"></view>
|
|
<view class="card-bottom">
|
|
<view class="card-bottom">
|
|
- <view class="bottom-item flex-row">
|
|
|
|
- <view class="item-left flex-row">
|
|
|
|
- <view>下单时间</view>
|
|
|
|
- <view>租用时长</view>
|
|
|
|
- <view v-if="item.order_status == 3">剩余租期</view>
|
|
|
|
|
|
+ <view class="bottom-item">
|
|
|
|
+ <view class="item-label-view flex-row">
|
|
|
|
+ <view class="item-label">下单时间</view>
|
|
|
|
+ <view class="item-value">{{ tools.formatTime(item.settle_date) }}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="item-right">
|
|
|
|
- <view>{{ tools.formatTime(item.ctime) }}</view>
|
|
|
|
- <view>
|
|
|
|
|
|
+ <view class="item-label-view flex-row">
|
|
|
|
+ <view class="item-label">有效期至</view>
|
|
|
|
+ <view class="item-value"><view>
|
|
{{ item.hire_duration_time.day > 0 ? item.hire_duration_time.day : '' }}<text
|
|
{{ item.hire_duration_time.day > 0 ? item.hire_duration_time.day : '' }}<text
|
|
v-if="item.hire_duration_time.day > 0">日</text>{{ item.hire_duration_time.hour > 0 ?
|
|
v-if="item.hire_duration_time.day > 0">日</text>{{ item.hire_duration_time.hour > 0 ?
|
|
item.hire_duration_time.hour : '' }}<text
|
|
item.hire_duration_time.hour : '' }}<text
|
|
v-if="item.hire_duration_time.hour > 0">小时</text>{{ item.hire_duration_time.minute > 0 ?
|
|
v-if="item.hire_duration_time.hour > 0">小时</text>{{ item.hire_duration_time.minute > 0 ?
|
|
item.hire_duration_time.minute : '' }}<text
|
|
item.hire_duration_time.minute : '' }}<text
|
|
v-if="item.hire_duration_time.minute > 0">分</text>
|
|
v-if="item.hire_duration_time.minute > 0">分</text>
|
|
- </view>
|
|
|
|
- <view v-if="item.order_status == 3">
|
|
|
|
- {{ item.order_time.day > 0 ? item.order_time.day : '' }}<text
|
|
|
|
- v-if="item.order_time.day > 0">日</text>{{ item.order_time.hour > 0 ?
|
|
|
|
- item.order_time.hour
|
|
|
|
- : '' }}<text v-if="item.order_time.hour > 0">小时</text>{{ item.order_time.minute > 0 ?
|
|
|
|
- item.order_time.minute : '' }}<text v-if="item.order_time.minute > 0">分</text>
|
|
|
|
- <!-- hire_end_time -当前时间 -->
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view></view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item-label-view flex-row">
|
|
|
|
+ <view class="item-label">有效时长</view>
|
|
|
|
+ <view class="item-value">{{ tools.formatTime(item.settle_date) }}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item-label-view flex-row">
|
|
|
|
+ <view class="item-label">免费换电数</view>
|
|
|
|
+ <view class="item-value">{{ tools.formatTime(item.settle_date) }}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="flex-row button-config-view">
|
|
|
|
+ <view class="return-money">已退款</view>
|
|
|
|
+ <view class="item-value">套餐金额$ <text class="money-style">5.0</text></view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="bottom-price flex-row">
|
|
|
|
- 订单金额
|
|
|
|
- <!-- <view class="price-text">¥<text>{{((item.money-0) + (item.deposit-0) + (item.insurance-0)) / 100}}</text></view> -->
|
|
|
|
- <view class="price-text">
|
|
|
|
- ¥<text>{{ item.money / 100 }}</text></view>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -63,6 +78,11 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ selectOrderType:1,
|
|
|
|
+ orderTypes: [
|
|
|
|
+ { value: 0, text: '换电套餐' },
|
|
|
|
+ { value: 1, text: '租车购车' }
|
|
|
|
+ ],
|
|
page: 1,
|
|
page: 1,
|
|
limit: 10,
|
|
limit: 10,
|
|
status: '-1',
|
|
status: '-1',
|
|
@@ -95,7 +115,6 @@
|
|
*/
|
|
*/
|
|
onShow: function() {
|
|
onShow: function() {
|
|
this.hireOrderList = []
|
|
this.hireOrderList = []
|
|
- this.sort_time = 0
|
|
|
|
this.bindHireOrderList()
|
|
this.bindHireOrderList()
|
|
},
|
|
},
|
|
|
|
|
|
@@ -123,12 +142,12 @@
|
|
methods: {
|
|
methods: {
|
|
bindHireOrderList() {
|
|
bindHireOrderList() {
|
|
const me = this
|
|
const me = this
|
|
- http.postApi(config.API_DAYHIRE_HIRE_ORDER_LIST, {
|
|
|
|
|
|
+ http.postApi(config.API_FLK_ORDER_LIST, {
|
|
page: me.page,
|
|
page: me.page,
|
|
limit: me.limit,
|
|
limit: me.limit,
|
|
- status: me.status,
|
|
|
|
- sort_time: me.sort_time,
|
|
|
|
- sort_num: me.sort_num
|
|
|
|
|
|
+ // status: me.status,
|
|
|
|
+ // sort_time: me.sort_time,
|
|
|
|
+ // sort_num: me.sort_num
|
|
}, (resp) => {
|
|
}, (resp) => {
|
|
if (resp.data.code === 200) {
|
|
if (resp.data.code === 200) {
|
|
me.hireOrderList.push.apply(me.hireOrderList, resp.data.data.list)
|
|
me.hireOrderList.push.apply(me.hireOrderList, resp.data.data.list)
|
|
@@ -146,7 +165,12 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ checkOrderType(e){
|
|
|
|
+ const type = e.currentTarget.dataset.type;
|
|
|
|
+ this.setData({
|
|
|
|
+ selectOrderType:type
|
|
|
|
+ })
|
|
|
|
+ },
|
|
navToPage(e) {
|
|
navToPage(e) {
|
|
const url = e.currentTarget.dataset.url;
|
|
const url = e.currentTarget.dataset.url;
|
|
if (!url) {
|
|
if (!url) {
|