|
@@ -1,11 +1,15 @@
|
|
|
<template>
|
|
|
<view class="container-view">
|
|
|
<view class="time-info">
|
|
|
- <!-- order_status 0 待支付(可重新调起支付)1 已预约成功(未取车、激活电池则为取车)2 待激活 (可以激活电池)3 使用中(可续费、还车)
|
|
|
- 4 已逾期(可续费)5 还车申请中(待确认)6 还车中,等待门店取车 7 车辆已归还 8 订单已支付,已取消 9 订单未支付已取消
|
|
|
- 以及拖车工单状态
|
|
|
- workInfo.status 0 待商家确认拖车服务, 1门店拖车中, 2订单已结束, 3已取消拖车服务-->
|
|
|
<view>
|
|
|
+ <view v-if="orderInfo.pay_status!=2">
|
|
|
+ <view v-if="orderInfo.pay_status == 0">待支付</view>
|
|
|
+ <view v-else-if="orderInfo.pay_status == 1">支付中</view>
|
|
|
+ <view v-else-if="orderInfo.pay_status == 3">支付失败</view>
|
|
|
+ <view v-else-if="orderInfo.pay_status == 4">支付取消</view>
|
|
|
+ <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">
|
|
|
{{orderInfo.return_type == 1?('请于'+tools.formatTimeSecond(orderInfo.hire_begin_time)+'到门店取车'):('将于'+tools.formatTimeSecond(orderInfo.hire_begin_time)+'送车上门')}}
|
|
|
</view>
|
|
@@ -16,15 +20,7 @@
|
|
|
<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-else>
|
|
|
- {{('请于'+'3.5-20:00'+'到门店取车')}}
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="get-car-number-card">
|
|
|
- <view>取车码</view>
|
|
|
- <view class="get-car-number">487872</view>
|
|
|
- <view class="get-car-number-tip">到店后请向门店出示取车码,支付完成用车费用后即可用车</view>
|
|
|
- </view>
|
|
|
<view class="time-money">
|
|
|
<view class="flex-row flex-between">
|
|
|
<view class="money-item">
|
|
@@ -54,6 +50,37 @@
|
|
|
: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>
|
|
|
+ <view class="sn-content flex-row flex-between">
|
|
|
+ <view class="sn-title">订单编号</view>
|
|
|
+ <view class="sn-text" >{{orderInfo.sub_sn}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="sn-content flex-row flex-between">
|
|
|
+ <view class="sn-title">下单时间</view>
|
|
|
+ <view class="sn-text">{{tools.formatTime(orderInfo.ctime)}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="sn-content flex-row flex-between">
|
|
|
+ <view class="sn-title">支付时间</view>
|
|
|
+ <view class="sn-text">{{tools.formatTime(orderInfo.pay_time)}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="sn-content flex-row flex-between">
|
|
|
+ <view class="sn-title">支付方式</view>
|
|
|
+ <view v-if="orderInfo.pay_type == 0" class="sn-text">微信支付</view>
|
|
|
+ <view v-if="orderInfo.pay_type == 1" class="sn-text">线下支付</view>
|
|
|
+ <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 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 class="sn-title">租车押金</view>
|
|
|
+ <view class="sn-text"><text class="grey-text">订单结束后随时退</text> $ {{tools.toFix(orderInfo.deposit/1000)}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="car-info">
|
|
@@ -80,9 +107,8 @@
|
|
|
<view>车辆信息</view>
|
|
|
<view class="car-top flex-row flex-between">
|
|
|
<view class="top-flex">
|
|
|
- <!-- <view>{{modelInfo.car_model}}</view> -->
|
|
|
<view>智能电动摩托车智驾</view>
|
|
|
- <view>续航{{modelInfo.endurance}}|重量{{modelInfo.weight}}</view>
|
|
|
+ <view>续航{{orderInfo.endurance}}|重量{{orderInfo.weight}}</view>
|
|
|
</view>
|
|
|
<img src="https://qiniu.bms16.com/FhEvnKUckAHPtWaC04mi2s53IEVj" alt="">
|
|
|
</view>
|
|
@@ -142,48 +168,20 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 考虑为空的情况 -->
|
|
|
- <view v-if="cancelInfo.cancel_setting.length != 0 && cancelInfo.cancel_setting" class="remove-info">
|
|
|
- <view>预约取消政策</view>
|
|
|
- <view class="remove-title flex-row">
|
|
|
- <view>预约取消时间</view>
|
|
|
- <view>扣费标准</view>
|
|
|
- </view>
|
|
|
- <view v-for="(item,index) in cancelInfo.cancel_setting" :key="index" class="remove-text flex-row">
|
|
|
- <view>支付{{item.hour}}小时内</view>
|
|
|
- <view v-if="item.hour-0 >= 0.1">扣除{{item.percent}}%租金总金额</view>
|
|
|
- <view v-else>免费取消</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
<view class="payment-info flex-row flex-between">
|
|
|
<view v-if="orderInfo.order_status == 1" class="flex-row"> <!-- 待取车 -->
|
|
|
- <view class="cancel" @tap="clickCancel">取消订单</view>
|
|
|
- <view @tap="callPhone" class="deposit-btn w_224">门店/客服</view>
|
|
|
- <view v-if="orderInfo.return_type == 1" @tap="navToInput" class="sesame-btn w_288">立即用车</view>
|
|
|
- <view v-else class="sesame-btn-s w_288">待商家送车</view>
|
|
|
- <!-- <view class="sesame-btn">待商家送车</view> -->
|
|
|
- </view>
|
|
|
- <view v-else-if="orderInfo.order_status == 2" class="flex-row"> <!-- 待激活 -->
|
|
|
- <!-- <view class="cancel">更多操作</view> -->
|
|
|
- <view class="cancel" @tap="clickCancel">取消订单</view>
|
|
|
- <view @tap="callPhone" class="deposit-btn w_224">门店/客服</view>
|
|
|
- <view @tap="navToActive" class="sesame-btn w_288">激活车辆</view>
|
|
|
+ <view class="cancel" @tap="clickCancel">结束订单</view>
|
|
|
+ <view @tap="callStorePhone" class="deposit-btn w_224">联系门店</view>
|
|
|
+ <view @tap="navToScan" class="sesame-btn w_288">扫码绑定</view>
|
|
|
</view>
|
|
|
- <view v-else-if="orderInfo.order_status == 3" class="flex-row"> <!-- 使用中 -->
|
|
|
- <!-- <view class="cancel">更多操作</view> -->
|
|
|
- <view @tap="bindBattery" class="deposit-btn w_254">用车</view>
|
|
|
- <view @tap="bindRenew" class="sesame-btn w_418">我要续租</view>
|
|
|
+ <view v-else-if="orderInfo.order_status == 3||orderInfo.order_status == 4" 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>
|
|
|
- <view v-else-if="orderInfo.order_status == 4" class="flex-row"> <!-- 已逾期 -->
|
|
|
- <!-- <view class="cancel">更多操作</view> -->
|
|
|
- <view @tap="callPhone" class="deposit-btn w_254">门店/客服</view>
|
|
|
- <view @tap="bindRenew" class="sesame-btn w_418">我要续租</view>
|
|
|
- </view>
|
|
|
- <view v-else-if="orderInfo.order_status == 5||orderInfo.order_status == 6" @tap="callPhone" class="pay-btn">
|
|
|
+ <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="bindToHome" class="pay-btn">返回首页</view> <!-- 已完成 -->
|
|
|
- <!-- <view v-else-if="orderInfo.order_status == 7" class="pay-btn">去评价</view> -->
|
|
|
- <view v-else-if="orderInfo.order_status == 8||orderInfo.order_status == 9" class="pay-btn" @tap="callPhone">
|
|
|
- 门店/客服</view> <!-- 已取消 -->
|
|
|
+ <view v-else-if="orderInfo.order_status == 7" @tap="callStorePhone" class="pay-btn">联系门店</view> <!--车辆已归还 已完成 -->
|
|
|
</view>
|
|
|
|
|
|
<view v-if="isShowCancel" class="cancel-b">
|
|
@@ -209,49 +207,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view v-if="isShowPrice" class="show_mark_patment">
|
|
|
- <view class="payment-info" style="border-radius: 32rpx 32rpx 0rpx 0rpx;">
|
|
|
- <view class="pay_money">
|
|
|
- <view class="flex-row flex-between">
|
|
|
- <view>价格明细</view>
|
|
|
- <view>
|
|
|
- <image style="width: 32rpx;height: 32rpx;" @tap="isShowPrice = false"
|
|
|
- src="https://qiniu.bms16.com/FtoTEHOJiUf_gjPCJGGHMsAtHI5M" />
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="flex-row flex-between">
|
|
|
- <view>拖车费用</view>
|
|
|
- <view>¥{{charge_list.fare}}</view>
|
|
|
- </view>
|
|
|
- <view class="flex-row flex-between">
|
|
|
- <view>优惠金额</view>
|
|
|
- <view>-¥0.00</view>
|
|
|
- </view>
|
|
|
- <view class="charge_money_info">
|
|
|
- <view>支付金额</view>
|
|
|
- <view>¥{{charge_list.fare}}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="pay_line"></view>
|
|
|
- <view class="pay_info">
|
|
|
- <view class="payment-top flex-row">
|
|
|
- <img @tap="isArgee = !isArgee"
|
|
|
- :src="isArgee?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/FkmDjxBNZhFGFU5inza2usdtDlX8'" />
|
|
|
- 已阅读并同意
|
|
|
- <text>《小众电动车租赁用户协议》</text>
|
|
|
- </view>
|
|
|
- <view class="payment-bottom flex-row flex-between">
|
|
|
- <view class="bottom-left flex-row">
|
|
|
- <view>¥{{charge_list.fare}}</view>
|
|
|
- <view @tap="isShowPrice = false">明细<img
|
|
|
- src="https://qiniu.bms16.com/Fvl1d-AWRvwY_ehNrw7bMZOK6LBZ" /></view>
|
|
|
- </view>
|
|
|
- <view @tap="navToPage" data-url="/pages/orderStatus/orderStatus">立即支付</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <returnCar :isShowReturnCar="isShowReturnCar" @closeShowReturnCarBtn="()=>isShowReturnCar=false" @navStoreBtn="navStoreBtn" @immediatelyReturnBtn="immediatelyReturnBtn"/>
|
|
|
+ <PayTypeModel @closeShow="()=>isShowToBuy=false" @payToOrder="payToOrder" :free_price="totalPrice" :isShowToBuy="isShowToBuy"/>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script module="tools" lang="wxs" src="@/pages/common/wxs/tools.wxs"></script>
|
|
@@ -264,34 +221,22 @@
|
|
|
var user = require('../../common/user.js');
|
|
|
var appWhiteListFilter = require('../../common/appWhiteListFilter.js');
|
|
|
import allPrice from '@/component/allPrice/allPrice';
|
|
|
+ import ReturnCar from '@/component/returnCar/returnCar';
|
|
|
+ import PayTypeModel from '@/component/payTypeModel/payTypeModel';
|
|
|
export default {
|
|
|
components: {
|
|
|
allPrice,
|
|
|
+ ReturnCar,
|
|
|
+ PayTypeModel
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- isJumpReturn:false,
|
|
|
- isReturnHome:true,
|
|
|
return_imgs: {},
|
|
|
charge_standard: {},
|
|
|
- isShowDragMoney: false, // 是否显示拖车费用弹框
|
|
|
- work_sn: '',
|
|
|
- workInfo: {}, // 拖车工单信息
|
|
|
- isShowCancel: true,
|
|
|
+ isShowCancel: false,
|
|
|
order_sn: '',
|
|
|
- cancelInfo: {
|
|
|
- cancel_setting: [],
|
|
|
- },
|
|
|
reason: 0,
|
|
|
orderInfo: {},
|
|
|
- modelInfo: {},
|
|
|
- shopInfo: {
|
|
|
- shop_image: [],
|
|
|
- },
|
|
|
- serviceList: [],
|
|
|
- waitMoney: '',
|
|
|
- longitude: '',
|
|
|
- latitude: '',
|
|
|
shop_image: [],
|
|
|
isExpanded: false,
|
|
|
isShowPrice: false,
|
|
@@ -301,7 +246,10 @@
|
|
|
insurance_status: 0,
|
|
|
over_fee:0,//逾期金额
|
|
|
plate_number: '',
|
|
|
- isScanCondeRentalCar: ''
|
|
|
+ isScanCondeRentalCar: '',
|
|
|
+ isShowReturnCar:false,
|
|
|
+ isShowToBuy:false,
|
|
|
+ totalPrice:0, //逾期支付金额
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -309,32 +257,16 @@
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function(options) {
|
|
|
- const myLocation = uni.getStorageSync('user_current_location')
|
|
|
- this.isJumpReturn = options.isJumpReturn ? false : true
|
|
|
- this.order_sn = options.order_sn || ''
|
|
|
- this.work_sn = options.work_sn || ''
|
|
|
- this.longitude = options.longitude ? options.longitude : (myLocation ? myLocation.longitude : '')
|
|
|
- this.latitude = options.latitude ? options.latitude : (myLocation ? myLocation.latitude : '')
|
|
|
- if (appWhiteListFilter.isScanCondeRentalCar()) {
|
|
|
- this.setData({
|
|
|
- isScanCondeRentalCar: true
|
|
|
- })
|
|
|
- }
|
|
|
+ this.sub_sn = options.sub_sn || ''
|
|
|
this.bindOrderInfo()
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
onShow: function() {
|
|
|
- this.isReturnHome = true
|
|
|
},
|
|
|
|
|
|
onUnload: function () {
|
|
|
- if(this.isReturnHome && this.isJumpReturn){
|
|
|
- uni.switchTab({
|
|
|
- url: '/pages/my/my' // 假设首页的路径是/pages/home/home
|
|
|
- });
|
|
|
- }
|
|
|
},
|
|
|
|
|
|
computed: {},
|
|
@@ -342,45 +274,11 @@
|
|
|
methods: {
|
|
|
bindOrderInfo() {
|
|
|
const me = this
|
|
|
- if (!me.work_sn && !me.order_sn) return common.simpleToast('车辆订单不存在!')
|
|
|
- http.postApi(config.API_DAYHIRE_HIRE_ORDER_INFO, {
|
|
|
- work_sn: me.work_sn,
|
|
|
- order_sn: me.order_sn,
|
|
|
- longitude: me.longitude,
|
|
|
- latitude: me.latitude,
|
|
|
+ http.postApi(config.API_FLK_ORDER_INFO, {
|
|
|
+ sub_sn: me.sub_sn,
|
|
|
}, (resp) => {
|
|
|
if (resp.data.code === 200) {
|
|
|
- me.cancelInfo = resp.data.data.cancel_info
|
|
|
- me.cancelInfo.cancel_setting = resp.data.data.cancel_info.cancel_cost_setting || []
|
|
|
me.orderInfo = resp.data.data.order_info
|
|
|
- me.modelInfo = resp.data.data.model_info
|
|
|
- me.modelInfo.model_images = me.modelInfo.model_images.split(',')
|
|
|
- me.modelInfo.endurance = common.formatDistance(me.modelInfo.endurance - 0)
|
|
|
- me.modelInfo.weight = common.formatWeight(me.modelInfo.weight - 0)
|
|
|
- me.shopInfo = resp.data.data.shop_info
|
|
|
- me.shopInfo.shop_image = JSON.parse(me.shopInfo.shop_image.split(','))
|
|
|
- me.shopInfo.distance = common.formatDistance(me.shopInfo.distance - 0)
|
|
|
- me.serviceList = resp.data.data.service_list
|
|
|
- me.waitMoney = resp.data.data.wait_money / 100
|
|
|
- me.workInfo = resp.data.data.work_info
|
|
|
- me.insurance_status = resp.data.data.insurance_status
|
|
|
- me.charge_standard = (me.workInfo && me.workInfo.status) ? this.calculateFare(me.workInfo.distance, JSON.parse(me.workInfo.drag_car_price_json)) : ''
|
|
|
- me.return_imgs = resp.data.data.return_imgs
|
|
|
- if(resp.data.data.order_info.order_status==4){
|
|
|
- me.setData({
|
|
|
- over_fee : resp.data.data.over_info.over_fee
|
|
|
- })
|
|
|
- }
|
|
|
- // if (this.orderInfo.order_status == 0) {
|
|
|
- // this.startCountDown()
|
|
|
- // this.updateCountdown()
|
|
|
- // }
|
|
|
- if (me.orderInfo.order_status == 0) {
|
|
|
- let _ctime = resp.data.data.order_info.ctime + 300 - 26
|
|
|
- let now = Date.parse(new Date()) / 1000
|
|
|
- me.timer = (_ctime - now) <= 330 ? (_ctime - now) : 0
|
|
|
- // me.timer=30
|
|
|
- }
|
|
|
// 取还时间展示
|
|
|
me.orderInfo.hire_return_time = common.getTimeToDay(Math.ceil(me.orderInfo.hire_end_time - me.orderInfo.hire_begin_time)/60)
|
|
|
// 剩余租期判断
|
|
@@ -402,7 +300,49 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ navStoreBtn(){
|
|
|
+ const {
|
|
|
+ latitude,
|
|
|
+ longitude,
|
|
|
+ address,
|
|
|
+ shop_name
|
|
|
+ } = this.orderInfo
|
|
|
+ uni.openLocation({
|
|
|
+ latitude: latitude - 0,
|
|
|
+ longitude: longitude - 0,
|
|
|
+ scale: 15,
|
|
|
+ name: shop_name,
|
|
|
+ address: address,
|
|
|
+ success: function(res) {}
|
|
|
+ });
|
|
|
+ },
|
|
|
+ tapReturnCar(){
|
|
|
+ this.setData({
|
|
|
+ isShowReturnCar:true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ immediatelyReturnBtn(){
|
|
|
+ //到店还车 判断逾期状态 如果逾期要交逾期费用 跳转到上传车辆图片再支付逾期费用还车
|
|
|
+ const isOverdue=this.orderInfo.order_status==4
|
|
|
+ const {car_sn,shop_id,overdue_money}=this.orderInfo
|
|
|
+ const returnCarParams={car_sn,shop_id,overdue_money,isReturnCar:true,}
|
|
|
+ if(isOverdue){
|
|
|
+ this.setData({
|
|
|
+ totalPrice:overdue_money,
|
|
|
+ isShowToBuy:true
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ //提交还车图片
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/activation/activation?isReturnCar=' + true +'&car_sn='+car_sn +'&shop_id=' + shop_id,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ callStorePhone(){
|
|
|
+ const phone =this.orderInfo.link_phone
|
|
|
+ common.callPhone(this,phone)
|
|
|
+ },
|
|
|
clickCancel() {
|
|
|
const me = this
|
|
|
uni.showModal({
|