|
@@ -11,8 +11,8 @@
|
|
|
<view v-else-if="orderInfo.pay_status == 6">线下审核拒绝</view>
|
|
|
</view>
|
|
|
<view v-if="orderInfo.order_status == 1 && orderInfo.hire_begin_time">
|
|
|
- {{('请于'+orderInfo.hire_begin_time+'到门店取车')}}
|
|
|
-
|
|
|
+ {{('请于'+orderInfo.hire_begin_times+'到门店取车')}}
|
|
|
+
|
|
|
</view>
|
|
|
<view v-if="orderInfo.order_status == 1 && !orderInfo.hire_begin_time">
|
|
|
待取车
|
|
@@ -40,16 +40,24 @@
|
|
|
<view
|
|
|
v-if="(orderInfo.order_status == 2&&orderInfo.hire_type==2) || orderInfo.order_status == 3">
|
|
|
租期剩余</view>
|
|
|
- <view v-else-if="orderInfo.order_status == 4" class="red-status">逾期时长</view>
|
|
|
+ <view v-else-if="orderInfo.order_status == 4 " class="red-status">逾期时长</view>
|
|
|
<view v-else>
|
|
|
租借周期:{{orderInfo.hire_duration}}{{hireDurationUnitFn(orderInfo.hire_duration_unit)}}</view>
|
|
|
</view>
|
|
|
- <view class="money-item">
|
|
|
- <view :class="orderInfo.order_status == 4?'red-status':''">
|
|
|
- {{tools.toFix(orderInfo.hire_money / 100)}}<text>元</text>
|
|
|
+ <view v-if="orderInfo.order_status != 4" class="money-item">
|
|
|
+ <view>
|
|
|
+ {{tools.toFix(orderInfo.hire_money / 100)}}
|
|
|
</view>
|
|
|
- <view>订单金额</view>
|
|
|
+ <view>订单金额·$</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <view v-if="orderInfo.order_status == 4" class="money-item">
|
|
|
+ <view style="color:#F95151" class="red-status">
|
|
|
+ {{tools.toFix(overdueData.money / 100)}}
|
|
|
+ </view>
|
|
|
+ <view style="color:#F95151">逾期金额·$</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view @tap="bindExpanded">
|
|
|
<text>{{isExpanded?'收起':'展开'}}</text>
|
|
|
<img
|
|
@@ -102,7 +110,7 @@
|
|
|
<view class="sn-title">租车金额</view>
|
|
|
<view class="sn-text">$ {{tools.toFix(orderInfo.hire_money/1000)}}</view>
|
|
|
</view>
|
|
|
- <view v-if="orderInfo.order_type != 3" class="sn-content flex-row flex-between">
|
|
|
+ <view v-if="orderInfo.order_type != 3" class="sn-content flex-row flex-between">
|
|
|
<view class="sn-title">租车押金</view>
|
|
|
<view class="sn-text"><text class="grey-text">订单结束后随时退</text> $
|
|
|
{{tools.toFix(orderInfo.deposit/1000)}}
|
|
@@ -180,9 +188,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="return-bottom flex-row">
|
|
|
- <view>{{orderInfo.hire_begin_time}}</view>
|
|
|
+ <view>{{orderInfo.hire_begin_times}}</view>
|
|
|
<img src="https://qiniu.bms16.com/FoXmBbj7YGWmjyeuVEY35nzieqnx" />
|
|
|
- <view>{{orderInfo.hire_end_time}}</view>
|
|
|
+ <view>{{orderInfo.hire_end_times}}</view>
|
|
|
<!-- <view>{{tools.formatTimeDate(orderInfo.hire_begin_time)}}</view>
|
|
|
<img src="https://qiniu.bms16.com/FoXmBbj7YGWmjyeuVEY35nzieqnx" />
|
|
|
<view>{{tools.formatTimeDate(orderInfo.hire_end_time)}}</view> -->
|
|
@@ -209,7 +217,8 @@
|
|
|
<!-- 考虑为空的情况 -->
|
|
|
|
|
|
<view class="payment-info flex-row flex-between">
|
|
|
- <view v-if="(orderInfo.order_status == 1 || orderInfo.pay_status == 5) && orderInfo.pay_type != 1" class="cancel" @tap="clickCancel">结束订单
|
|
|
+ <view v-if="(orderInfo.order_status == 1 || orderInfo.pay_status == 5) && orderInfo.pay_type != 1"
|
|
|
+ class="cancel" @tap="clickCancel">结束订单
|
|
|
</view>
|
|
|
<view v-if="orderInfo.order_status == 1" class="flex-row"> <!-- 待取车 -->
|
|
|
<view @tap="callStorePhone" class="deposit-btn ">联系门店</view>
|
|
@@ -221,38 +230,40 @@
|
|
|
<view @tap="navToScan" class="sesame-btn ">去上传</view>
|
|
|
</view>
|
|
|
|
|
|
- <view v-else-if="(orderInfo.order_status == 3||orderInfo.order_status == 4) && orderInfo.order_type != 3" class="flex-row"> <!-- 使用中 -->
|
|
|
+ <view v-else-if="(orderInfo.order_status == 3||orderInfo.order_status == 4) && orderInfo.order_type != 3 && orderInfo.pay_status != 5"
|
|
|
+ class="flex-row"> <!-- 使用中 -->
|
|
|
<view @tap="callStorePhone" class="cancel">联系门店</view>
|
|
|
<view @tap="tapReturnCar" class="deposit-btn">到店还车</view>
|
|
|
<view @tap="bindRenew" class="sesame-btn">续租</view>
|
|
|
</view>
|
|
|
+
|
|
|
<view v-else-if="orderInfo.order_status == 5||orderInfo.order_status == 6" @tap="callStorePhone"
|
|
|
class="pay-btn">
|
|
|
联系门店</view> <!-- 待门店确认||还车中,等待门店取车 -->
|
|
|
<view v-else-if="orderInfo.order_status == 7" @tap="callStorePhone" class="pay-btn">联系门店</view>
|
|
|
<!--车辆已归还 已完成 -->
|
|
|
-
|
|
|
- <view v-if="orderInfo.order_type == 3 && (orderInfo.order_status == 3||orderInfo.order_status == 4)" @tap="callStorePhone" class="pay-btn">联系门店</view>
|
|
|
-
|
|
|
- </view>
|
|
|
|
|
|
+ <view v-if="orderInfo.order_type == 3 && (orderInfo.order_status == 3||orderInfo.order_status == 4)"
|
|
|
+ @tap="callStorePhone" class="pay-btn">联系门店</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view v-if="isShowCancel" class="cancel-b">
|
|
|
<view class="cancel-box">
|
|
|
<view class="cancel-title flex-row flex-between">
|
|
|
<view>选择取消原因</view>
|
|
|
<view @tap="isShowCancel = false" style="font-size: 60rpx;">×</view>
|
|
|
</view>
|
|
|
- <view @click="reason = '行程变更无需用车'" class="cancel-item flex-row flex-between">
|
|
|
+ <view @click="reason = '行程变更无需用车'" class="cancel-item flex-row flex-between">
|
|
|
<view>行程变更无需用车</view>
|
|
|
<img
|
|
|
:src="reason == '行程变更无需用车'?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/Fh0JH6_QbiXYmVy7FNYnDkVIGvLC'" />
|
|
|
</view>
|
|
|
- <view @click="reason = '修改订单信息'" class="cancel-item flex-row flex-between">
|
|
|
+ <view @click="reason = '修改订单信息'" class="cancel-item flex-row flex-between">
|
|
|
<view>修改订单信息</view>
|
|
|
<img
|
|
|
:src="reason == '修改订单信息'?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/Fh0JH6_QbiXYmVy7FNYnDkVIGvLC'" />
|
|
|
</view>
|
|
|
- <view @click="reason = '不想要了'" class="cancel-item flex-row flex-between">
|
|
|
+ <view @click="reason = '不想要了'" class="cancel-item flex-row flex-between">
|
|
|
<view>不想要了</view>
|
|
|
<img
|
|
|
:src="reason == '不想要了'?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/Fh0JH6_QbiXYmVy7FNYnDkVIGvLC'" />
|
|
@@ -260,7 +271,7 @@
|
|
|
<view @click="bindCancel" class="cancel_btn">确认取消</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<returnCar :isShowReturnCar="isShowReturnCar" @closeShowReturnCarBtn="()=>isShowReturnCar=false"
|
|
|
@navStoreBtn="navStoreBtn" @immediatelyReturnBtn="immediatelyReturnBtn" />
|
|
|
|
|
@@ -302,6 +313,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ overdueData:{},
|
|
|
select_type: '',
|
|
|
car_detail: {},
|
|
|
showCarPlan: false,
|
|
@@ -337,7 +349,11 @@
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
- onShow: function() {},
|
|
|
+ onShow: function(e) {
|
|
|
+ if(this.sub_sn && this.orderInfo.sub_sn){
|
|
|
+ this.bindOrderInfo()
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
onUnload: function() {},
|
|
|
|
|
@@ -345,6 +361,16 @@
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
+ //逾期费用计算
|
|
|
+ async overdueMoneyFn(car_sn) {
|
|
|
+ let {data} = await request.postApi(config_gyq.API_FLK_CAR_OVERDUE_MONEY,{car_sn})
|
|
|
+ if(data.code == 200){
|
|
|
+ this.overdueData = data.data
|
|
|
+ }else{
|
|
|
+ common.simpleToast(data.msg)
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
async loadCarInfo(model_id) {
|
|
|
const me = this
|
|
|
http.postApi(config.API_FLK_INDEX_CAR_MODEL_DETAIL, {
|
|
@@ -363,8 +389,6 @@
|
|
|
price: (resp.data.data.rental_setting[0].hire_price / 100).toFixed(2)
|
|
|
}
|
|
|
})
|
|
|
- console.log('车辆信息')
|
|
|
- console.log(resp.data.data)
|
|
|
} else {
|
|
|
common.simpleToast(resp.data.msg);
|
|
|
}
|
|
@@ -457,6 +481,7 @@
|
|
|
}, (resp) => {
|
|
|
if (resp.data.code === 200) {
|
|
|
me.orderInfo = resp.data.data.order_info
|
|
|
+
|
|
|
//
|
|
|
if (resp.data.data.order_info.model_id) {
|
|
|
me.loadCarInfo(resp.data.data.order_info.model_id)
|
|
@@ -470,10 +495,10 @@
|
|
|
|
|
|
me.orderInfo.hire_return_time = getRemainingTime(me.orderInfo.hire_begin_time, me
|
|
|
.orderInfo.hire_end_time)
|
|
|
- me.orderInfo.hire_begin_time = me.orderInfo.hire_begin_time ? dayjs(me.orderInfo
|
|
|
+ me.orderInfo.hire_begin_times = me.orderInfo.hire_begin_time ? dayjs(me.orderInfo
|
|
|
.hire_begin_time * 1000).format(
|
|
|
'YY-MM-DD') : 0
|
|
|
- me.orderInfo.hire_end_time = me.orderInfo.hire_end_time ? dayjs(me.orderInfo
|
|
|
+ me.orderInfo.hire_end_times = me.orderInfo.hire_end_time ? dayjs(me.orderInfo
|
|
|
.hire_end_time * 1000).format(
|
|
|
'YY-MM-DD') : 0
|
|
|
|
|
@@ -485,6 +510,7 @@
|
|
|
60)
|
|
|
} else {
|
|
|
if (me.orderInfo.order_status == 4) {
|
|
|
+ me.overdueMoneyFn(me.orderInfo.car_sn)
|
|
|
me.orderInfo.hire_duration_time = common.getTimeToDay(Math.ceil(Math
|
|
|
.floor(new Date()) / 1000 - me.orderInfo.hire_end_time) /
|
|
|
60)
|
|
@@ -536,49 +562,31 @@
|
|
|
overdue_money,
|
|
|
isReturnCar: true,
|
|
|
}
|
|
|
- if (isOverdue) {
|
|
|
- this.setData({
|
|
|
- totalPrice: overdue_money,
|
|
|
- isShowToBuy: true
|
|
|
- })
|
|
|
- } else {
|
|
|
- //提交还车图片
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/activation/activation?isReturnCar=true,model_id=${this.orderInfo.model_id}&sub_sn=${this.sub_sn}&car_sn=${this.orderInfo.car_sn}`
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
+ //提交还车图片
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/activation/activation?isReturnCar=true,model_id=${this.orderInfo.model_id}&sub_sn=${this.sub_sn}&car_sn=${this.orderInfo.car_sn}&isOverdue=${isOverdue}&overdueMoney=${this.overdueData.money}&overdueTime=${this.overdueData.time}`
|
|
|
+ });
|
|
|
+ // if (isOverdue) {
|
|
|
+ // this.setData({
|
|
|
+ // totalPrice: this.overdueData.money,
|
|
|
+ // isShowToBuy: true
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // //提交还车图片
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pages/activation/activation?isReturnCar=true,model_id=${this.orderInfo.model_id}&sub_sn=${this.sub_sn}&car_sn=${this.orderInfo.car_sn}&isOverdue=${isOverdue}&overdueMoney=${this.overdueData.money}&overdueTime=${this.overdueData.time}`
|
|
|
+ // });
|
|
|
+ // }
|
|
|
},
|
|
|
callStorePhone() {
|
|
|
const phone = this.orderInfo.link_phone
|
|
|
common.callPhone(phone)
|
|
|
},
|
|
|
- async clickCancel() {
|
|
|
+ async clickCancel() {
|
|
|
this.isShowCancel = true
|
|
|
},
|
|
|
|
|
|
async bindCancel() {
|
|
|
- // const me = this
|
|
|
- // me.reason = e.currentTarget.dataset.status;
|
|
|
- // me.cancel = true
|
|
|
- // common.loading()
|
|
|
- // setTimeout(function() {
|
|
|
- // http.postApi(config.API_DAYHIRE_HIRE_CANCEL_ORDER, {
|
|
|
- // order_sn: me.order_sn
|
|
|
- // }, (resp) => {
|
|
|
- // if (resp.data.code === 200) {
|
|
|
- // uni.hideLoading()
|
|
|
- // common.simpleToast('取消成功')
|
|
|
- // setTimeout(() => {
|
|
|
- // me.bindOrderInfo()
|
|
|
- // }, 500);
|
|
|
- // } else {
|
|
|
- // common.simpleToast('订单取消失败')
|
|
|
- // }
|
|
|
- // me.reason = 0
|
|
|
- // me.isShowCancel = false
|
|
|
- // })
|
|
|
- // }, 600);
|
|
|
const me = this
|
|
|
let res = await uni.showModal({
|
|
|
title: '取消订单',
|
|
@@ -593,7 +601,7 @@
|
|
|
data
|
|
|
} = await request.postApi(config.API_DAYHIRE_HIRE_CANCEL_ORDER, {
|
|
|
sub_sn: this.sub_sn,
|
|
|
- remark:this.reason
|
|
|
+ remark: this.reason
|
|
|
})
|
|
|
if (data.code == 200) {
|
|
|
common.simpleToast(data.msg)
|
|
@@ -651,6 +659,7 @@
|
|
|
},
|
|
|
|
|
|
bindRenew() {
|
|
|
+ this.params.overdueData = this.overdueData
|
|
|
this.showCarPlan = true
|
|
|
// this.isReturnHome = false
|
|
|
// let isRenew = true
|
|
@@ -941,7 +950,8 @@
|
|
|
|
|
|
<style>
|
|
|
@import './orderStatus.css';
|
|
|
- .cancel_btn{
|
|
|
+
|
|
|
+ .cancel_btn {
|
|
|
width: 702rpx;
|
|
|
height: 80rpx;
|
|
|
background: #060809;
|