|
@@ -32,11 +32,15 @@
|
|
<view v-if="orderInfo.order_type != 3" class="flex-row flex-between">
|
|
<view v-if="orderInfo.order_type != 3" class="flex-row flex-between">
|
|
<view class="money-item">
|
|
<view class="money-item">
|
|
<view :class="orderInfo.order_status == 4?'red-status':''">
|
|
<view :class="orderInfo.order_status == 4?'red-status':''">
|
|
- {{orderInfo.hire_duration_time.day > 0 ? orderInfo.hire_duration_time.day :'' }}<text
|
|
|
|
- v-if="orderInfo.hire_duration_time.day>0">日</text>{{orderInfo.hire_duration_time.hour > 0 ? orderInfo.hire_duration_time.hour :'' }}<text
|
|
|
|
- v-if="orderInfo.hire_duration_time.hour>0">小时</text>{{orderInfo.hire_duration_time.minute > 0 ? orderInfo.hire_duration_time.minute :'' }}<text
|
|
|
|
- v-if="orderInfo.hire_duration_time.minute>0">分</text>
|
|
|
|
|
|
+ <block v-if="orderInfo.hire_duration_time">
|
|
|
|
+ {{orderInfo.hire_duration_time.day > 0 ? orderInfo.hire_duration_time.day :'' }}<text
|
|
|
|
+ v-if="orderInfo.hire_duration_time.day>0">日</text>{{orderInfo.hire_duration_time.hour > 0 ? orderInfo.hire_duration_time.hour :'' }}<text
|
|
|
|
+ v-if="orderInfo.hire_duration_time.hour>0">小时</text>{{orderInfo.hire_duration_time.minute > 0 ? orderInfo.hire_duration_time.minute :'' }}<text
|
|
|
|
+ v-if="orderInfo.hire_duration_time.minute>0">分</text>
|
|
|
|
+ </block>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
<view
|
|
<view
|
|
v-if="(orderInfo.order_status == 2&&orderInfo.hire_type==2) || orderInfo.order_status == 3">
|
|
v-if="(orderInfo.order_status == 2&&orderInfo.hire_type==2) || orderInfo.order_status == 3">
|
|
租期剩余</view>
|
|
租期剩余</view>
|
|
@@ -64,8 +68,6 @@
|
|
:src="isExpanded?'https://qiniu.bms16.com/FvRah8ro91B_TUVEmInBq6n69W2f':'https://qiniu.bms16.com/FtbxPP0aXYG8hyJTEJfNTXa_Puuc'" />
|
|
:src="isExpanded?'https://qiniu.bms16.com/FvRah8ro91B_TUVEmInBq6n69W2f':'https://qiniu.bms16.com/FtbxPP0aXYG8hyJTEJfNTXa_Puuc'" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
-
|
|
|
|
<view v-if="orderInfo.order_type == 3" class="flex-row flex-between">
|
|
<view v-if="orderInfo.order_type == 3" class="flex-row flex-between">
|
|
<view class="money-item">
|
|
<view class="money-item">
|
|
<view></view>
|
|
<view></view>
|
|
@@ -230,13 +232,14 @@
|
|
<view @tap="navToScan" class="sesame-btn ">去上传</view>
|
|
<view @tap="navToScan" class="sesame-btn ">去上传</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view v-else-if="(orderInfo.order_status == 3||orderInfo.order_status == 4) && orderInfo.order_type != 3 && orderInfo.pay_status != 5"
|
|
|
|
|
|
+ <view
|
|
|
|
+ v-else-if="(orderInfo.order_status == 3||orderInfo.order_status == 4) && orderInfo.order_type != 3 && orderInfo.pay_status != 5"
|
|
class="flex-row"> <!-- 使用中 -->
|
|
class="flex-row"> <!-- 使用中 -->
|
|
<view @tap="callStorePhone" class="cancel">联系门店</view>
|
|
<view @tap="callStorePhone" class="cancel">联系门店</view>
|
|
<view @tap="tapReturnCar" class="deposit-btn">到店还车</view>
|
|
<view @tap="tapReturnCar" class="deposit-btn">到店还车</view>
|
|
<view @tap="bindRenew" class="sesame-btn">续租</view>
|
|
<view @tap="bindRenew" class="sesame-btn">续租</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<view v-else-if="orderInfo.order_status == 5||orderInfo.order_status == 6" @tap="callStorePhone"
|
|
<view v-else-if="orderInfo.order_status == 5||orderInfo.order_status == 6" @tap="callStorePhone"
|
|
class="pay-btn">
|
|
class="pay-btn">
|
|
联系门店</view> <!-- 待门店确认||还车中,等待门店取车 -->
|
|
联系门店</view> <!-- 待门店确认||还车中,等待门店取车 -->
|
|
@@ -246,7 +249,7 @@
|
|
<view v-if="orderInfo.order_type == 3 && (orderInfo.order_status == 3||orderInfo.order_status == 4)"
|
|
<view v-if="orderInfo.order_type == 3 && (orderInfo.order_status == 3||orderInfo.order_status == 4)"
|
|
@tap="callStorePhone" class="pay-btn">联系门店</view>
|
|
@tap="callStorePhone" class="pay-btn">联系门店</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<view v-if="isShowCancel" class="cancel-b">
|
|
<view v-if="isShowCancel" class="cancel-b">
|
|
<view class="cancel-box">
|
|
<view class="cancel-box">
|
|
<view class="cancel-title flex-row flex-between">
|
|
<view class="cancel-title flex-row flex-between">
|
|
@@ -313,7 +316,7 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- overdueData:{},
|
|
|
|
|
|
+ overdueData: {},
|
|
select_type: '',
|
|
select_type: '',
|
|
car_detail: {},
|
|
car_detail: {},
|
|
showCarPlan: false,
|
|
showCarPlan: false,
|
|
@@ -350,7 +353,7 @@
|
|
* 生命周期函数--监听页面显示
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
*/
|
|
onShow: function(e) {
|
|
onShow: function(e) {
|
|
- if(this.sub_sn && this.orderInfo.sub_sn){
|
|
|
|
|
|
+ if (this.sub_sn && this.orderInfo.sub_sn) {
|
|
this.bindOrderInfo()
|
|
this.bindOrderInfo()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -360,17 +363,21 @@
|
|
computed: {},
|
|
computed: {},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
|
|
+ payReturn() {},
|
|
//逾期费用计算
|
|
//逾期费用计算
|
|
async overdueMoneyFn(car_sn) {
|
|
async overdueMoneyFn(car_sn) {
|
|
- let {data} = await request.postApi(config_gyq.API_FLK_CAR_OVERDUE_MONEY,{car_sn})
|
|
|
|
- if(data.code == 200){
|
|
|
|
|
|
+ let {
|
|
|
|
+ data
|
|
|
|
+ } = await request.postApi(config_gyq.API_FLK_CAR_OVERDUE_MONEY, {
|
|
|
|
+ car_sn
|
|
|
|
+ })
|
|
|
|
+ if (data.code == 200) {
|
|
this.overdueData = data.data
|
|
this.overdueData = data.data
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
common.simpleToast(data.msg)
|
|
common.simpleToast(data.msg)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ payToOrder() {},
|
|
async loadCarInfo(model_id) {
|
|
async loadCarInfo(model_id) {
|
|
const me = this
|
|
const me = this
|
|
http.postApi(config.API_FLK_INDEX_CAR_MODEL_DETAIL, {
|
|
http.postApi(config.API_FLK_INDEX_CAR_MODEL_DETAIL, {
|
|
@@ -472,47 +479,57 @@
|
|
},
|
|
},
|
|
|
|
|
|
async bindOrderInfo() {
|
|
async bindOrderInfo() {
|
|
- let res = await uni.getLocation()
|
|
|
|
const me = this
|
|
const me = this
|
|
|
|
+ const locationStr = uni.getStorageSync('user_current_location');
|
|
|
|
+ // if (locationStr) {
|
|
|
|
+ // this.myLocation = locationStr;
|
|
|
|
+ // }
|
|
http.postApi(config.API_FLK_ORDER_INFO, {
|
|
http.postApi(config.API_FLK_ORDER_INFO, {
|
|
sub_sn: me.sub_sn,
|
|
sub_sn: me.sub_sn,
|
|
- latitude: res[1].latitude,
|
|
|
|
- longitude: res[1].longitude,
|
|
|
|
|
|
+ latitude: locationStr.latitude,
|
|
|
|
+ longitude: locationStr.longitude,
|
|
}, (resp) => {
|
|
}, (resp) => {
|
|
if (resp.data.code === 200) {
|
|
if (resp.data.code === 200) {
|
|
me.orderInfo = resp.data.data.order_info
|
|
me.orderInfo = resp.data.data.order_info
|
|
-
|
|
|
|
|
|
+
|
|
//
|
|
//
|
|
if (resp.data.data.order_info.model_id) {
|
|
if (resp.data.data.order_info.model_id) {
|
|
me.loadCarInfo(resp.data.data.order_info.model_id)
|
|
me.loadCarInfo(resp.data.data.order_info.model_id)
|
|
}
|
|
}
|
|
- let distance = common.getFlatternDistance(res[1].longitude, res[1].latitude, me
|
|
|
|
|
|
+ let distance = common.getFlatternDistance(locationStr.longitude, locationStr.latitude, me
|
|
.orderInfo.longitude, me.orderInfo.latitude)
|
|
.orderInfo.longitude, me.orderInfo.latitude)
|
|
resp.data.data.order_info.distance = distance
|
|
resp.data.data.order_info.distance = distance
|
|
// 取还时间展示
|
|
// 取还时间展示
|
|
// me.orderInfo.hire_return_time = common.getTimeToDay(Math.ceil(me.orderInfo
|
|
// me.orderInfo.hire_return_time = common.getTimeToDay(Math.ceil(me.orderInfo
|
|
// .hire_end_time - me.orderInfo.hire_begin_time) / 60)
|
|
// .hire_end_time - me.orderInfo.hire_begin_time) / 60)
|
|
-
|
|
|
|
- me.orderInfo.hire_return_time = getRemainingTime(me.orderInfo.hire_begin_time, me
|
|
|
|
|
|
+
|
|
|
|
+ me.orderInfo.hire_return_time = getRemainingTime(me.orderInfo
|
|
|
|
+ .hire_begin_time, me
|
|
.orderInfo.hire_end_time)
|
|
.orderInfo.hire_end_time)
|
|
- me.orderInfo.hire_begin_times = 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(
|
|
.hire_begin_time * 1000).format(
|
|
'YY-MM-DD') : 0
|
|
'YY-MM-DD') : 0
|
|
- me.orderInfo.hire_end_times = 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(
|
|
.hire_end_time * 1000).format(
|
|
'YY-MM-DD') : 0
|
|
'YY-MM-DD') : 0
|
|
-
|
|
|
|
|
|
+
|
|
// 剩余租期判断
|
|
// 剩余租期判断
|
|
- if ((me.orderInfo.hire_type == 2 && me.orderInfo.order_status == 2) || me
|
|
|
|
|
|
+ if ((me.orderInfo.hire_type == 2 && me.orderInfo.order_status == 2) ||
|
|
|
|
+ me
|
|
.orderInfo.order_status == 3) {
|
|
.orderInfo.order_status == 3) {
|
|
me.orderInfo.hire_duration_time = common.getTimeToDay(Math.ceil(me
|
|
me.orderInfo.hire_duration_time = common.getTimeToDay(Math.ceil(me
|
|
- .orderInfo.hire_end_time - (Math.floor(new Date()) / 1000)) /
|
|
|
|
|
|
+ .orderInfo.hire_end_time - (Math.floor(new Date()) /
|
|
|
|
+ 1000)) /
|
|
60)
|
|
60)
|
|
} else {
|
|
} else {
|
|
if (me.orderInfo.order_status == 4) {
|
|
if (me.orderInfo.order_status == 4) {
|
|
me.overdueMoneyFn(me.orderInfo.car_sn)
|
|
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) /
|
|
|
|
|
|
+ me.orderInfo.hire_duration_time = common.getTimeToDay(Math
|
|
|
|
+ .ceil(Math
|
|
|
|
+ .floor(new Date()) / 1000 - me.orderInfo
|
|
|
|
+ .hire_end_time) /
|
|
60)
|
|
60)
|
|
} else {
|
|
} else {
|
|
me.orderInfo.hire_duration_time = me.orderInfo.hire_return_time
|
|
me.orderInfo.hire_duration_time = me.orderInfo.hire_return_time
|
|
@@ -526,6 +543,7 @@
|
|
common.simpleToast(resp.data.msg)
|
|
common.simpleToast(resp.data.msg)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+
|
|
},
|
|
},
|
|
navStoreBtn() {
|
|
navStoreBtn() {
|
|
const {
|
|
const {
|