|
@@ -10,21 +10,26 @@
|
|
|
<view v-else-if="orderInfo.pay_status == 5">线下待审核</view>
|
|
|
<view v-else-if="orderInfo.pay_status == 6">线下审核拒绝</view>
|
|
|
</view>
|
|
|
- <view v-if="orderInfo.order_status == 1">
|
|
|
- <!-- {{('请于'+tools.formatTimeSecond(orderInfo.hire_begin_time)+'到门店取车')}} -->
|
|
|
+ <view v-if="orderInfo.order_status == 1 && orderInfo.hire_begin_time">
|
|
|
+ {{('请于'+orderInfo.hire_begin_time+'到门店取车')}}
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view v-if="orderInfo.order_status == 1 && !orderInfo.hire_begin_time">
|
|
|
待取车
|
|
|
</view>
|
|
|
- <view v-else-if="orderInfo.order_status == 2">请上传车辆图片激活车辆</view>
|
|
|
- <view v-else-if="orderInfo.order_status == 3" class="blue-text">使用中...</view>
|
|
|
- <view v-else-if="orderInfo.order_status == 4" class="red-text">已逾期</view>
|
|
|
- <view v-else-if="orderInfo.order_status == 5">待门店确认</view>
|
|
|
- <view v-else-if="orderInfo.order_status == 6">还车中,等待门店取车</view>
|
|
|
- <view v-else-if="orderInfo.order_status == 7">已完成</view>
|
|
|
- <view v-else-if="orderInfo.order_status == 8||orderInfo.order_status == 9">已取消</view>
|
|
|
+ <view v-if="orderInfo.order_status == 2">请上传车辆图片激活车辆</view>
|
|
|
+ <block v-if="orderInfo.pay_status == 2">
|
|
|
+ <view v-if="orderInfo.order_status == 3" class="blue-text">使用中...</view>
|
|
|
+ <view v-if="orderInfo.order_status == 4" class="red-text">已逾期</view>
|
|
|
+ <view v-if="orderInfo.order_status == 5">待门店确认</view>
|
|
|
+ <view v-if="orderInfo.order_status == 6">还车中,等待门店取车</view>
|
|
|
+ <view v-if="orderInfo.order_status == 7">已完成</view>
|
|
|
+ </block>
|
|
|
+ <view v-if="orderInfo.order_status == 8||orderInfo.order_status == 9">已取消</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="time-money">
|
|
|
- <view class="flex-row flex-between">
|
|
|
+ <view v-if="orderInfo.order_type != 3" class="flex-row flex-between">
|
|
|
<view class="money-item">
|
|
|
<view :class="orderInfo.order_status == 4?'red-status':''">
|
|
|
{{orderInfo.hire_duration_time.day > 0 ? orderInfo.hire_duration_time.day :'' }}<text
|
|
@@ -41,10 +46,28 @@
|
|
|
</view>
|
|
|
<view class="money-item">
|
|
|
<view :class="orderInfo.order_status == 4?'red-status':''">
|
|
|
- {{orderInfo.order_status == 4?tools.toFix(over_fee/100):tools.toFix(orderInfo.hire_money / 100)}}<text>元</text>
|
|
|
+ {{tools.toFix(orderInfo.hire_money / 100)}}<text>元</text>
|
|
|
+ </view>
|
|
|
+ <view>订单金额</view>
|
|
|
+ </view>
|
|
|
+ <view @tap="bindExpanded">
|
|
|
+ <text>{{isExpanded?'收起':'展开'}}</text>
|
|
|
+ <img
|
|
|
+ :src="isExpanded?'https://qiniu.bms16.com/FvRah8ro91B_TUVEmInBq6n69W2f':'https://qiniu.bms16.com/FtbxPP0aXYG8hyJTEJfNTXa_Puuc'" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ <view v-if="orderInfo.order_type == 3" class="flex-row flex-between">
|
|
|
+ <view class="money-item">
|
|
|
+ <view></view>
|
|
|
+ <view>租借周期:购买</view>
|
|
|
+ </view>
|
|
|
+ <view class="money-item">
|
|
|
+ <view :class="orderInfo.order_status == 4?'red-status':''">
|
|
|
+ {{orderInfo.order_status == 4?tools.toFix(over_fee/100):tools.toFix(orderInfo.money / 100)}}<text>元</text>
|
|
|
</view>
|
|
|
- <view v-if="orderInfo.order_status == 4" class="red-status">逾期金额</view>
|
|
|
- <view v-else>订单金额</view>
|
|
|
+ <view>订单金额</view>
|
|
|
</view>
|
|
|
<view @tap="bindExpanded">
|
|
|
<text>{{isExpanded?'收起':'展开'}}</text>
|
|
@@ -52,6 +75,7 @@
|
|
|
:src="isExpanded?'https://qiniu.bms16.com/FvRah8ro91B_TUVEmInBq6n69W2f':'https://qiniu.bms16.com/FtbxPP0aXYG8hyJTEJfNTXa_Puuc'" />
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
<view v-if="isExpanded" class="dashed-border"></view>
|
|
|
<view v-if="isExpanded">
|
|
|
<view class="big-text">订单信息</view>
|
|
@@ -74,11 +98,11 @@
|
|
|
<view v-if="orderInfo.pay_type == 2" class="sn-text">支付宝支付</view>
|
|
|
<view v-if="orderInfo.pay_type == 9" class="sn-text">钱包余额支付</view>
|
|
|
</view>
|
|
|
- <view 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">$ {{tools.toFix(orderInfo.hire_money/1000)}}</view>
|
|
|
</view>
|
|
|
- <view 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)}}
|
|
@@ -98,10 +122,12 @@
|
|
|
<view class="store-name">{{orderInfo.shop_name}}</view>
|
|
|
<view class="store-name-address">{{orderInfo.address}}</view>
|
|
|
<view class="flex-row flex-between align-center">
|
|
|
- <view class="flex-row time-style align-center">
|
|
|
- <img v-if="orderInfo.work_begin_time && orderInfo.work_end_time" style="width: 40rpx;height: 40rpx;"
|
|
|
+ <view class="flex-row time-style align-center">
|
|
|
+ <img v-if="orderInfo.work_begin_time && orderInfo.work_end_time"
|
|
|
+ style="width: 40rpx;height: 40rpx;"
|
|
|
src="https://qiniu.bms16.com/Fp-G1pdXxnTV-G3qFbgS453AuqcU" alt="">
|
|
|
- <text v-if="orderInfo.work_begin_time && orderInfo.work_end_time">{{orderInfo.work_begin_time}}-{{orderInfo.work_end_time}}</text>
|
|
|
+ <text
|
|
|
+ v-if="orderInfo.work_begin_time && orderInfo.work_end_time">{{orderInfo.work_begin_time}}-{{orderInfo.work_end_time}}</text>
|
|
|
</view>
|
|
|
<img @click="navToCabinet" style="width: 112rpx;height: 64rpx;"
|
|
|
src="https://qiniu.bms16.com/Fts38M35doVjK09GfOza5qD-wwkK" alt="">
|
|
@@ -116,6 +142,10 @@
|
|
|
<view>{{orderInfo.model_name}}</view>
|
|
|
<view>续航{{orderInfo.endurance /100}}km|重量{{orderInfo.weight}}kg</view>
|
|
|
</view>
|
|
|
+ <!-- //配套服务 -->
|
|
|
+ <view class="">
|
|
|
+ asd
|
|
|
+ </view>
|
|
|
<img v-if="orderInfo.model_images" :src="orderInfo.model_images" alt=""></img>
|
|
|
<img v-else src="https://qiniu.bms16.com/FhEvnKUckAHPtWaC04mi2s53IEVj" alt="">
|
|
|
</view>
|
|
@@ -146,7 +176,7 @@
|
|
|
v-if="orderInfo.hire_return_time.day>0">日</text>{{orderInfo.hire_return_time.hour > 0 ? orderInfo.hire_return_time.hour :'' }}<text
|
|
|
v-if="orderInfo.hire_return_time.hour>0">小时</text>{{orderInfo.hire_return_time.minute > 0 ? orderInfo.hire_return_time.minute :'' }}<text
|
|
|
v-if="orderInfo.hire_return_time.minute>0">分</text> -->
|
|
|
- 共{{hireDurationUnitsFn(orderInfo.total_hire_time,orderInfo.hire_duration_unit)}}
|
|
|
+ 共{{hireDurationUnitsFn(orderInfo.total_hire_time,orderInfo.hire_duration_unit)}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="return-bottom flex-row">
|
|
@@ -158,6 +188,8 @@
|
|
|
<view>{{tools.formatTimeDate(orderInfo.hire_end_time)}}</view> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
<view v-if="orderInfo.order_status==2||orderInfo.order_status==3||orderInfo.order_status==4"
|
|
|
class="overdue-info">
|
|
|
<view>逾期规则</view>
|
|
@@ -175,28 +207,33 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 考虑为空的情况 -->
|
|
|
+
|
|
|
<view class="payment-info flex-row flex-between">
|
|
|
- <view v-if="orderInfo.order_status == 1 || orderInfo.pay_status == 5" class="cancel" @tap="clickCancel">结束订单</view>
|
|
|
+ <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 w_224">联系门店</view>
|
|
|
- <view @tap="navToScan" class="sesame-btn w_288">扫码绑定</view>
|
|
|
+ <view @tap="callStorePhone" class="deposit-btn ">联系门店</view>
|
|
|
+ <view @tap="navToScan" class="sesame-btn ">扫码绑定</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view v-if="orderInfo.order_status == 2" class="flex-row"> <!-- 待取车 -->
|
|
|
- <view @tap="callStorePhone" class="deposit-btn w_224">联系门店</view>
|
|
|
- <view @tap="navToScan" class="sesame-btn w_288">去上传</view>
|
|
|
+ <view @tap="callStorePhone" class="deposit-btn ">联系门店</view>
|
|
|
+ <view @tap="navToScan" class="sesame-btn ">去上传</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view v-else-if="orderInfo.order_status == 3||orderInfo.order_status == 4" class="flex-row"> <!-- 使用中 -->
|
|
|
+
|
|
|
+ <view v-else-if="(orderInfo.order_status == 3||orderInfo.order_status == 4) && orderInfo.order_type != 3" class="flex-row"> <!-- 使用中 -->
|
|
|
<view @tap="callStorePhone" class="cancel">联系门店</view>
|
|
|
- <view @tap="tapReturnCar" class="deposit-btn w_254">到店还车</view>
|
|
|
- <view @tap="bindRenew" class="sesame-btn w_224">续租</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="isShowCancel" class="cancel-b">
|
|
@@ -205,28 +242,31 @@
|
|
|
<view>选择取消原因</view>
|
|
|
<view @tap="isShowCancel = false" style="font-size: 60rpx;">×</view>
|
|
|
</view>
|
|
|
- <view @tap="bindCancel" data-status="1" class="cancel-item flex-row flex-between">
|
|
|
+ <view @click="reason = '行程变更无需用车'" class="cancel-item flex-row flex-between">
|
|
|
<view>行程变更无需用车</view>
|
|
|
<img
|
|
|
- :src="reason == 1?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/Fh0JH6_QbiXYmVy7FNYnDkVIGvLC'" />
|
|
|
+ :src="reason == '行程变更无需用车'?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/Fh0JH6_QbiXYmVy7FNYnDkVIGvLC'" />
|
|
|
</view>
|
|
|
- <view @tap="bindCancel" data-status="2" class="cancel-item flex-row flex-between">
|
|
|
+ <view @click="reason = '修改订单信息'" class="cancel-item flex-row flex-between">
|
|
|
<view>修改订单信息</view>
|
|
|
<img
|
|
|
- :src="reason == 2?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/Fh0JH6_QbiXYmVy7FNYnDkVIGvLC'" />
|
|
|
+ :src="reason == '修改订单信息'?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/Fh0JH6_QbiXYmVy7FNYnDkVIGvLC'" />
|
|
|
</view>
|
|
|
- <view @tap="bindCancel" data-status="3" class="cancel-item flex-row flex-between">
|
|
|
+ <view @click="reason = '不想要了'" class="cancel-item flex-row flex-between">
|
|
|
<view>不想要了</view>
|
|
|
<img
|
|
|
- :src="reason == 3?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/Fh0JH6_QbiXYmVy7FNYnDkVIGvLC'" />
|
|
|
+ :src="reason == '不想要了'?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/Fh0JH6_QbiXYmVy7FNYnDkVIGvLC'" />
|
|
|
</view>
|
|
|
+ <view @click="bindCancel" class="cancel_btn">确认取消</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
<returnCar :isShowReturnCar="isShowReturnCar" @closeShowReturnCarBtn="()=>isShowReturnCar=false"
|
|
|
@navStoreBtn="navStoreBtn" @immediatelyReturnBtn="immediatelyReturnBtn" />
|
|
|
-
|
|
|
- <carPlan @payToOrder='payReturn' v-if="showCarPlan" @changeSelectType="changeSelectType" @closeShowMore="showCarPlan = false" :params="params" :selectType="selectType"/>
|
|
|
-
|
|
|
+
|
|
|
+ <carPlan @payToOrder='payReturn' v-if="showCarPlan" @changeSelectType="changeSelectType"
|
|
|
+ @closeShowMore="showCarPlan = false" :params="params" :selectType="selectType" />
|
|
|
+
|
|
|
<PayTypeModel @closeShow="()=>isShowToBuy=false" @payToOrder="payToOrder" :free_price="totalPrice"
|
|
|
:isShowToBuy="isShowToBuy" />
|
|
|
</view>
|
|
@@ -242,7 +282,9 @@
|
|
|
var storage = require('../../common/storage.js');
|
|
|
var user = require('../../common/user.js');
|
|
|
//
|
|
|
- import {getRemainingTime} from '@/utils/util';
|
|
|
+ import {
|
|
|
+ getRemainingTime
|
|
|
+ } from '@/utils/util';
|
|
|
var appWhiteListFilter = require('../../common/appWhiteListFilter.js');
|
|
|
import allPrice from '@/component/allPrice/allPrice';
|
|
|
import ReturnCar from '@/component/returnCar/returnCar';
|
|
@@ -260,14 +302,14 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- select_type:'',
|
|
|
- car_detail:{},
|
|
|
- showCarPlan:false,
|
|
|
+ select_type: '',
|
|
|
+ car_detail: {},
|
|
|
+ showCarPlan: false,
|
|
|
return_imgs: {},
|
|
|
charge_standard: {},
|
|
|
isShowCancel: false,
|
|
|
order_sn: '',
|
|
|
- reason: 0,
|
|
|
+ reason: '行程变更无需用车',
|
|
|
orderInfo: {},
|
|
|
shop_image: [],
|
|
|
isExpanded: false,
|
|
@@ -302,23 +344,23 @@
|
|
|
computed: {},
|
|
|
|
|
|
methods: {
|
|
|
-
|
|
|
+
|
|
|
async loadCarInfo(model_id) {
|
|
|
const me = this
|
|
|
http.postApi(config.API_FLK_INDEX_CAR_MODEL_DETAIL, {
|
|
|
model_id,
|
|
|
}, (resp) => {
|
|
|
if (resp.data.code === 200) {
|
|
|
- const pData={
|
|
|
+ const pData = {
|
|
|
...this.car_detail,
|
|
|
- price:this.price
|
|
|
+ price: this.price
|
|
|
}
|
|
|
me.setData({
|
|
|
- car_detail:resp.data.data,
|
|
|
- params:{
|
|
|
- order_sn:this.orderInfo.order_sn,
|
|
|
+ car_detail: resp.data.data,
|
|
|
+ params: {
|
|
|
+ order_sn: this.orderInfo.order_sn,
|
|
|
...resp.data.data,
|
|
|
- price:(resp.data.data.rental_setting[0].hire_price/100).toFixed(2)
|
|
|
+ price: (resp.data.data.rental_setting[0].hire_price / 100).toFixed(2)
|
|
|
}
|
|
|
})
|
|
|
console.log('车辆信息')
|
|
@@ -328,25 +370,25 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- changeSelectType(select_type,price){
|
|
|
+
|
|
|
+ changeSelectType(select_type, price) {
|
|
|
this.setData({
|
|
|
selectType: select_type,
|
|
|
- price:(price/100).toFixed(2)
|
|
|
+ price: (price / 100).toFixed(2)
|
|
|
})
|
|
|
},
|
|
|
- async navToScan(){
|
|
|
+ async navToScan() {
|
|
|
let car_sn = this.orderInfo.car_sn || ''
|
|
|
- if(!car_sn){
|
|
|
+ if (!car_sn) {
|
|
|
let res = await uni.scanCode({
|
|
|
onlyFromCamera: true,
|
|
|
scanType: [],
|
|
|
});
|
|
|
- if(res[0]) return
|
|
|
+ if (res[0]) return
|
|
|
car_sn = res[1].result
|
|
|
}
|
|
|
uni.navigateTo({
|
|
|
- url:`/pages/activation/activation?model_id=${this.orderInfo.model_id}&sub_sn=${this.sub_sn}&car_sn=${car_sn}`
|
|
|
+ url: `/pages/activation/activation?model_id=${this.orderInfo.model_id}&sub_sn=${this.sub_sn}&car_sn=${car_sn}`
|
|
|
})
|
|
|
// let {data} = await request.postApi(config.API_CAR_ASSIGNMENT,{sub_sn:this.sub_sn,car_sn:res[1].result})
|
|
|
},
|
|
@@ -368,7 +410,7 @@
|
|
|
success: function(res) {}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
hireDurationUnitFn(type) {
|
|
|
if (type == 1) {
|
|
|
return '天'
|
|
@@ -386,22 +428,22 @@
|
|
|
return '季'
|
|
|
}
|
|
|
},
|
|
|
- hireDurationUnitsFn(time,type) {
|
|
|
-
|
|
|
+ hireDurationUnitsFn(time, type) {
|
|
|
+
|
|
|
if (type == 1) {
|
|
|
return Math.ceil(time / 60 / 60 / 24) + '天'
|
|
|
} else if (type == 2) {
|
|
|
- return Math.ceil(time / 60 / 60 / 24 / 30) + '月'
|
|
|
+ return Math.ceil(time / 60 / 60 / 24 / 30) + '月'
|
|
|
} else if (type == 3) {
|
|
|
- return Math.ceil(time / 60 / 60 / 24 / 30 / 365) + '年'
|
|
|
+ return Math.ceil(time / 60 / 60 / 24 / 30 / 365) + '年'
|
|
|
} else if (type == 4) {
|
|
|
- return Math.ceil(time / 60 / 60) + '小时'
|
|
|
+ return Math.ceil(time / 60 / 60) + '小时'
|
|
|
} else if (type == 5) {
|
|
|
- return Math.ceil(time / 60) + '分钟'
|
|
|
+ return Math.ceil(time / 60) + '分钟'
|
|
|
} else if (type == 6) {
|
|
|
- return Math.ceil(time / 60 / 60 / 24 / 7) + '周'
|
|
|
+ return Math.ceil(time / 60 / 60 / 24 / 7) + '周'
|
|
|
} else if (type == 7) {
|
|
|
- return Math.ceil(time / 60 / 60 / 24 / 30 / 3) + '季'
|
|
|
+ return Math.ceil(time / 60 / 60 / 24 / 30 / 3) + '季'
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -416,7 +458,7 @@
|
|
|
if (resp.data.code === 200) {
|
|
|
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)
|
|
|
}
|
|
|
let distance = common.getFlatternDistance(res[1].longitude, res[1].latitude, me
|
|
@@ -425,11 +467,16 @@
|
|
|
// 取还时间展示
|
|
|
// me.orderInfo.hire_return_time = common.getTimeToDay(Math.ceil(me.orderInfo
|
|
|
// .hire_end_time - me.orderInfo.hire_begin_time) / 60)
|
|
|
-
|
|
|
- me.orderInfo.hire_return_time = getRemainingTime(me.orderInfo.hire_begin_time,me.orderInfo.hire_end_time)
|
|
|
- me.orderInfo.hire_begin_time = dayjs(me.orderInfo.hire_begin_time * 1000).format('YY/MM/DD')
|
|
|
- me.orderInfo.hire_end_time = dayjs(me.orderInfo.hire_end_time * 1000).format('YY/MM/DD')
|
|
|
-
|
|
|
+
|
|
|
+ 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
|
|
|
+ .hire_begin_time * 1000).format(
|
|
|
+ 'YY-MM-DD') : 0
|
|
|
+ me.orderInfo.hire_end_time = me.orderInfo.hire_end_time ? dayjs(me.orderInfo
|
|
|
+ .hire_end_time * 1000).format(
|
|
|
+ 'YY-MM-DD') : 0
|
|
|
+
|
|
|
// 剩余租期判断
|
|
|
if ((me.orderInfo.hire_type == 2 && me.orderInfo.order_status == 2) || me
|
|
|
.orderInfo.order_status == 3) {
|
|
@@ -497,7 +544,7 @@
|
|
|
} 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}`
|
|
|
+ url: `/pages/activation/activation?isReturnCar=true,model_id=${this.orderInfo.model_id}&sub_sn=${this.sub_sn}&car_sn=${this.orderInfo.car_sn}`
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -506,7 +553,32 @@
|
|
|
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: '取消订单',
|
|
@@ -517,40 +589,21 @@
|
|
|
cancelColor: '#191D23',
|
|
|
});
|
|
|
if (res[1].confirm) {
|
|
|
- let {data} = await request.postApi(config.API_FLK_ORDER_CANCEL_PAY,{sub_sn:this.sub_sn})
|
|
|
- if(data.code == 200){
|
|
|
+ let {
|
|
|
+ data
|
|
|
+ } = await request.postApi(config.API_DAYHIRE_HIRE_CANCEL_ORDER, {
|
|
|
+ sub_sn: this.sub_sn,
|
|
|
+ remark:this.reason
|
|
|
+ })
|
|
|
+ if (data.code == 200) {
|
|
|
common.simpleToast(data.msg)
|
|
|
this.bindOrderInfo()
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
common.simpleToast(data.msg)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- bindCancel(e) {
|
|
|
- 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);
|
|
|
- },
|
|
|
-
|
|
|
bindToNav() {
|
|
|
console.log(111);
|
|
|
const {
|
|
@@ -888,4 +941,17 @@
|
|
|
|
|
|
<style>
|
|
|
@import './orderStatus.css';
|
|
|
+ .cancel_btn{
|
|
|
+ width: 702rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ background: #060809;
|
|
|
+ border-radius: 40rpx;
|
|
|
+ font-family: PingFangSC, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #FFFFFF;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
</style>
|