|
@@ -18,29 +18,44 @@
|
|
|
</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-order_sn="item.order_sn"
|
|
|
class="order-card">
|
|
|
<view class="card-top flex-row">
|
|
|
<view>{{ item.car_model }}</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 == 2">待激活</view>
|
|
|
- <view class="card card-b" v-else-if="item.order_status == 3">使用中</view>
|
|
|
- <view class="card card-r" v-else-if="item.order_status == 4">已逾期</view>
|
|
|
- <view class="card card-k" v-else-if="item.order_status == 5">还车申请中</view>
|
|
|
- <view class="card card-k" v-else-if="item.order_status == 6">还车中</view>
|
|
|
- <view class="card card-k" v-else-if="item.order_status == 7">车辆已归还</view>
|
|
|
- <view class="card card-k" v-else-if="item.order_status == 8 || item.order_status == 9">已取消</view>
|
|
|
+ <view v-if="item.pay_status==2">
|
|
|
+ <view class="card card-k" v-if="item.order_status == 1">待取车</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-r" v-else-if="item.order_status == 4">已逾期</view>
|
|
|
+ <view class="card card-k" v-else-if="item.order_status == 5">还车申请中</view>
|
|
|
+ <view class="card card-k" v-else-if="item.order_status == 6">还车中</view>
|
|
|
+ <view class="card card-k" v-else-if="item.order_status == 7">车辆已归还</view>
|
|
|
+ <view class="card card-k" v-else-if="item.order_status == 8 ">订单已支付,已取消</view>
|
|
|
+ <view class="card card-k" v-else-if=" item.order_status == 9">订单未支付,已取消</view>
|
|
|
+ </view>
|
|
|
+ <view v-if="item.pay_status!=2">
|
|
|
+ <view class="card card-k" v-if="item.pay_status == 0">待支付</view>
|
|
|
+ <view class="card card-k" v-else-if="item.pay_status == 1">支付中</view>
|
|
|
+ <view class="card card-r" v-else-if="item.pay_status == 3">支付失败</view>
|
|
|
+ <view class="card card-k" v-else-if="item.pay_status == 4">支付取消</view>
|
|
|
+ <view class="card card-b" v-else-if="item.pay_status == 5">线下待审核</view>
|
|
|
+ <view class="card card-k" v-else-if="item.pay_status == 6">线下审核拒绝</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
<view class="card-border"></view>
|
|
|
<view class="card-bottom">
|
|
|
<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 class="item-value">{{ tools.formatTime(item.pay_time) }}</view>
|
|
|
</view>
|
|
|
<view class="item-label-view flex-row">
|
|
|
<view class="item-label">有效期至</view>
|
|
|
+ <view class="item-value">{{ tools.formatTime(item.hire_end_time) }}</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
|
|
|
v-if="item.hire_duration_time.day > 0">日</text>{{ item.hire_duration_time.hour > 0 ?
|
|
@@ -50,18 +65,22 @@
|
|
|
v-if="item.hire_duration_time.minute > 0">分</text>
|
|
|
</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 v-if="selectOrderType==1" class="item-label-view flex-row">
|
|
|
+ <view class="item-label">订单类型</view>
|
|
|
+ <view class="item-value">{{ item.order_type==3?'购车':'租车' }}</view>
|
|
|
</view>
|
|
|
- <view class="item-label-view flex-row">
|
|
|
+ <view v-if="selectOrderType==0" 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 v-if="selectOrderType==0" 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 v-if="selectOrderType==1" class="flex-row button-config-view">
|
|
|
+ <view class="order-money">订单金额 $ 5.0</view>
|
|
|
+ <view @tap="activateCar" :data-sub_sn="item.sub_sn" class="activation-btn">激活车辆</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -182,12 +201,9 @@
|
|
|
},
|
|
|
|
|
|
loadToNav(e) {
|
|
|
- //#ifdef MP-ALIPAY
|
|
|
- this.order_sn = e.currentTarget.dataset.orderSn
|
|
|
- //#endif
|
|
|
- //#ifdef MP-WEIXIN
|
|
|
- this.order_sn = e.currentTarget.dataset.ordersn
|
|
|
- //#endif
|
|
|
+
|
|
|
+ this.order_sn = e.currentTarget.dataset.order_sn
|
|
|
+
|
|
|
const isJumpReturn = false
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/orderStatus/orderStatus?order_sn=' + this.order_sn + '&longitude=' + this
|
|
@@ -197,6 +213,23 @@
|
|
|
complete: function(res) {},
|
|
|
})
|
|
|
},
|
|
|
+ activateCar(e){
|
|
|
+ const sub_sn = e.currentTarget.dataset.sub_sn
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/activation/activation?order_sn=' + sub_sn
|
|
|
+ })
|
|
|
+ // uni.scanCode({
|
|
|
+ // onlyFromCamera: true,
|
|
|
+ // success: function (res) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/activation/activation?order_sn=' + sub_sn
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // fail: function (res) { },
|
|
|
+ // complete: function (res) { },
|
|
|
+ // })
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|