1
This commit is contained in:
@@ -31,11 +31,11 @@
|
||||
</block>
|
||||
</view>
|
||||
<view class="status-text">
|
||||
<text class="state-text" v-if="order.payStatus == 10">待支付</text>
|
||||
<text class="state-text" v-if="order.payStatus == 20 && order.receiptStatus == 10">待绑定</text>
|
||||
<text class="state-text" v-if="order.orderStatus == OrderStatusEnum.COMPLETED.value && order.receiptStatus == 20">已完成</text>
|
||||
<text class="state-text" v-if="order.receiptStatus == 21">退租中</text>
|
||||
<text class="state-text" v-if="order.receiptStatus == 30">已退租</text>
|
||||
<text class="state-text" v-if="order.payStatus == 20 && (order.receiptStatus == 30 || order.currPeriods >= order.periods)">已完成</text>
|
||||
<text class="state-text" v-else-if="order.payStatus == 10">待支付</text>
|
||||
<text class="state-text" v-else-if="order.payStatus == 20 && order.receiptStatus == 10">待绑定</text>
|
||||
<text class="state-text" v-else-if="order.orderStatus == 30 && order.receiptStatus == 20">进行中</text>
|
||||
<text class="state-text" v-else-if="order.receiptStatus == 21">进行中</text>
|
||||
<!-- <text>{{ order.stateText }}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
@@ -215,6 +215,12 @@
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">可用天数</view>
|
||||
<view class="item-content">
|
||||
<text>{{ Math.abs(order.expirationDay) }}天</text>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="equipmentGoods.equipmentCategory == '40'">
|
||||
<view class="info-item">
|
||||
<view class="item-lable">下单方式</view>
|
||||
@@ -369,10 +375,11 @@
|
||||
|
||||
<!-- 续费订单 -->
|
||||
<view class="trade-info i-card">
|
||||
<view class="info-item" v-if="equipmentGoods.equipmentCategory != '40'">
|
||||
<view class="info-item" v-if="order.orderSource != 10">
|
||||
<view class="item-lable">当前期数</view>
|
||||
<view class="item-content">
|
||||
<text>第 {{ renewOrderList.length + 1 }} 期</text>
|
||||
<text v-if="order.orderSource == 20">首期</text>
|
||||
<text v-else>第 1 期</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
@@ -411,6 +418,10 @@
|
||||
<text>+¥{{ orderPrice3 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">付款时间</view>
|
||||
<view class="item-content">{{ order.payTime }}</view>
|
||||
</view>
|
||||
<view class="info-item"
|
||||
v-if="order.orderStatus == OrderStatusEnum.COMPLETED.value && equipmentGoods.equipmentCategory != '10'">
|
||||
<view class="item-lable">到期时间</view>
|
||||
@@ -420,12 +431,7 @@
|
||||
{{ Math.abs(order.expirationDay) }}天)</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">可用天数</view>
|
||||
<view class="item-content">
|
||||
<text>{{ Math.abs(order.expirationDay) }}天</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <view v-if="order.updatePrice.value != '0.00'" class="info-item">
|
||||
<view class="item-lable">后台改价</view>
|
||||
@@ -443,10 +449,10 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="renew-divider">-- 历史订单 --</view>
|
||||
<view class="renew-divider">-- 续费订单 --</view>
|
||||
<view class="renew-order" v-if="renewOrderList.length > 0 && equipmentGoods.equipmentCategory != '10' ">
|
||||
<!-- 首付 -->
|
||||
<!-- <view class="trade-info i-card " v-for="(item,index) in renewOrderList" :key="index" v-if="index == 0">
|
||||
<!-- 首付 -->
|
||||
<!-- <view class="trade-info i-card " v-for="(item,index) in renewOrderList" :key="index" v-if="index == 0">
|
||||
<view class="info-item" v-if="equipmentGoods.equipmentCategory != '40'">
|
||||
<view class="item-lable">期数</view>
|
||||
<view class="item-content">
|
||||
@@ -485,10 +491,11 @@
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="trade-info i-card " v-for="(item,index) in renewOrderList" :key="index">
|
||||
<view class="info-item" v-if="equipmentGoods.equipmentCategory != '40'">
|
||||
<view class="item-lable">期数</view>
|
||||
<view class="info-item" v-if="order.orderSource != 10">
|
||||
<view class="item-lable">当前期数</view>
|
||||
<view class="item-content">
|
||||
<text>第 {{ index + 1 }} 期</text>
|
||||
<text v-if="order.orderSource == 20">第 {{ index + 1}} 期</text>
|
||||
<text v-else>第 {{ index + 2}} 期</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
@@ -546,8 +553,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -557,7 +564,7 @@
|
||||
<view class="btn-wrapper">
|
||||
<!-- 未支付取消订单 -->
|
||||
<block v-if="order.payStatus == PayStatusEnum.PENDING.value">
|
||||
<view class="btn-item" @click="onCancel(order.orderId)">取消</view>
|
||||
<view class="btn-item" @click="onCancel(order.orderId)">取消订单</view>
|
||||
</block>
|
||||
<!-- 已支付进行中的订单 -->
|
||||
<block v-if="order.orderStatus != OrderStatusEnum.APPLY_CANCEL.value">
|
||||
@@ -586,14 +593,16 @@
|
||||
<view class="btn-item active" @click="onReceipt(order.orderId)">确认收货</view>
|
||||
</block>
|
||||
<!-- 订单评价 -->
|
||||
<block v-if="order.orderStatus == OrderStatusEnum.COMPLETED.value && order.isComment == 0 && order.receiptStatus != 30">
|
||||
<block
|
||||
v-if="order.orderStatus == OrderStatusEnum.COMPLETED.value && order.isComment == 0 && order.receiptStatus != 30">
|
||||
<view class="btn-item" @click="handleTargetEquipment(order.equipmentId)">查看电池</view>
|
||||
<view class="btn-item" @click="handleHireEquipment(order.orderId)"
|
||||
v-if="equipmentGoods.equipmentCategory != '10' && !orderEnd">我要续费</view>
|
||||
<view class="btn-item" @click="handleRentingOut(order)"
|
||||
v-if="equipmentGoods.equipmentCategory != '10' && order.receiptStatus != 21">我要退租</view>
|
||||
<view class="btn-item" @click="handleRentingOut(order)"
|
||||
v-if="equipmentGoods.equipmentCategory != '10' && order.receiptStatus == 21 && !orderEnd">取消退租</view>
|
||||
v-if="equipmentGoods.equipmentCategory != '10' && order.receiptStatus == 21 && !orderEnd">取消退租
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
@@ -710,8 +719,7 @@
|
||||
}) {
|
||||
// 当前订单ID
|
||||
this.orderId = orderId
|
||||
// 获取当前订单信息
|
||||
this.getOrderDetail()
|
||||
|
||||
// 注册全局事件订阅: 是否刷新当前订单数据
|
||||
uni.$on('syncRefreshOrder', (val, isCur) => {
|
||||
if (!isCur) {
|
||||
@@ -724,7 +732,7 @@
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
this.canReset && this.getOrderDetail()
|
||||
this.getOrderDetail()
|
||||
this.canReset = false
|
||||
},
|
||||
|
||||
@@ -744,7 +752,7 @@
|
||||
if (result.data.equipment) {
|
||||
app.equipmentId = result.data.equipment.equipmentId
|
||||
}
|
||||
|
||||
|
||||
// 项目显示
|
||||
app.priceTitle1 = null
|
||||
app.priceTitle2 = null
|
||||
@@ -808,8 +816,12 @@
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
res.data.sort((a,b) => {
|
||||
return new Date(a.createTime.replace(/-/gi, '/')) - new Date(b.createTime.replace(/-/gi, '/'))
|
||||
})
|
||||
app.renewOrderList = res.data;
|
||||
if(res.data.length >= app.equipmentGoods.periods){
|
||||
if (res.data.length >= app.equipmentGoods.periods && (this.order.orderSource == 20 || this
|
||||
.order.orderSource == 30)) {
|
||||
app.orderEnd = true
|
||||
}
|
||||
// 计算逾期
|
||||
@@ -942,17 +954,33 @@
|
||||
orderId
|
||||
})
|
||||
},
|
||||
handleRentingOut(order){
|
||||
const { orderId,equipmentId } = order
|
||||
EquipmentApi.rentingOut({orderId,equipmentId}).then(res => {
|
||||
this.$success(res.message)
|
||||
setTimeout(() => {
|
||||
// 刷新当前订单数据
|
||||
app.getOrderDetail(true)
|
||||
}, 1500)
|
||||
}).catch(err => {
|
||||
this.$success(err.message)
|
||||
handleRentingOut(order) {
|
||||
const app = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否退租',
|
||||
success: (result) => {
|
||||
if(result.confirm) {
|
||||
const {
|
||||
orderId,
|
||||
equipmentId
|
||||
} = order
|
||||
EquipmentApi.rentingOut({
|
||||
orderId,
|
||||
equipmentId
|
||||
}).then(res => {
|
||||
this.$success(res.message)
|
||||
setTimeout(() => {
|
||||
// 刷新当前订单数据
|
||||
app.getOrderDetail(true)
|
||||
}, 1500)
|
||||
}).catch(err => {
|
||||
this.$success(err.message)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 跳转到设备详情页
|
||||
@@ -986,7 +1014,7 @@
|
||||
orderSource: order.orderSource,
|
||||
orderSourceId: order.goodsId,
|
||||
equipmentId: order.equipmentId,
|
||||
dealerPhone:order.dealerPhone,
|
||||
dealerPhone: order.dealerPhone,
|
||||
comments: '续租订单' + order.orderNo
|
||||
}).then(res => {
|
||||
const {
|
||||
@@ -1413,6 +1441,7 @@
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
|
||||
.act-copy {
|
||||
margin-left: 20rpx;
|
||||
padding: 2rpx 20rpx;
|
||||
@@ -1444,7 +1473,8 @@
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
text-align: right;
|
||||
.expirat-time-box{
|
||||
|
||||
.expirat-time-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -1477,7 +1507,7 @@
|
||||
|
||||
.renew-order {
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
// 底部操作栏
|
||||
@@ -1579,9 +1609,10 @@
|
||||
color: #ff0000;
|
||||
padding-left: 10rpx
|
||||
}
|
||||
.renew-divider{
|
||||
|
||||
.renew-divider {
|
||||
padding: 30rpx 0;
|
||||
text-align: center;
|
||||
color: #666666;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user