|
@@ -14,20 +14,34 @@
|
|
|
<view class="car">{{orderItem.vehicleNo}}</view>
|
|
|
<view class="addr">{{orderItem.roadName}}</view>
|
|
|
</view>
|
|
|
+ <!--
|
|
|
+ 显示申请退款按钮满足一下条件:
|
|
|
+ 1.允许退款allowRefund等于1 并且
|
|
|
+ 2.退款状态auditStatus等于2 已驳回 或者
|
|
|
+ 3.退款状态auditStatus不能为空 并且不能等于0
|
|
|
+ -->
|
|
|
<view
|
|
|
class="order-top-right apply-refund"
|
|
|
- v-show="current === 3 && orderItem.allowRefund == 1 && (orderItem.refundStatus === 2 || !orderItem.refundStatus && orderItem.refundStatus !== 0)"
|
|
|
+ v-show="orderItem.allowRefund == 1 &&
|
|
|
+ (orderItem.auditStatus == 2 || !orderItem.auditStatus && orderItem.auditStatus != 0)"
|
|
|
@click.stop="applyRefund(orderItem)"
|
|
|
>申请退款</view>
|
|
|
+ <!--
|
|
|
+ 显示申请状态满足以下条件
|
|
|
+ 申请状态存在或者审核状态存在(由于0比较特殊,所以单独拉出来判断)
|
|
|
+ -->
|
|
|
<view
|
|
|
class="order-top-right apply-refund"
|
|
|
@click.stop="applyRefundDetails(orderItem)"
|
|
|
- v-show="current === 3 && (orderItem.refundStatus || orderItem.refundStatus == 0)">
|
|
|
- {{orderItem.refundStatus | verifyRefundStatus}}
|
|
|
+ v-if="orderItem.refundStatus ||
|
|
|
+ orderItem.refundStatus == 0 ||
|
|
|
+ orderItem.auditStatus ||
|
|
|
+ orderItem.auditStatus == 0">
|
|
|
+ {{orderItem | verifyRefundStatus}}
|
|
|
</view>
|
|
|
<view
|
|
|
class="order-top-right"
|
|
|
- v-show="!orderItem.refundStatus && orderItem.refundStatus != 0"
|
|
|
+ v-else
|
|
|
:class="{'order-top-right-finished': orderItem.orderStatus == '4'}">
|
|
|
{{orderItem.orderStatus | verifyStatusFilter}}
|
|
|
</view>
|
|
@@ -126,20 +140,20 @@ export default {
|
|
|
for(let item of res.data.rows){
|
|
|
this.orderList[orderType.index].push(item);
|
|
|
}
|
|
|
- console.log('this.list[orderType.index]',this.list[orderType.index]);
|
|
|
+ // console.log('this.list[orderType.index]',this.list[orderType.index]);
|
|
|
this.list[this.current].total = res.data.total;
|
|
|
this.list[orderType.index].pageNum++;
|
|
|
if(this.orderList[this.current].length>=this.list[this.current].total){
|
|
|
this.loadStatus.splice(this.list[orderType.index].index,1,"nomore");
|
|
|
};
|
|
|
- console.log(JSON.parse(JSON.stringify(this.orderList[this.swiperCurrent])));
|
|
|
- console.log('this.list[this.current]',this.list[this.current]);
|
|
|
+ // console.log(JSON.parse(JSON.stringify(this.orderList[this.swiperCurrent])));
|
|
|
+ // console.log('this.list[this.current]',this.list[this.current]);
|
|
|
}).catch(err=>{
|
|
|
this.$refs.uToast.show({
|
|
|
title: err.msg,
|
|
|
type: 'error',
|
|
|
});
|
|
|
- console.log('getOrderList ',err)
|
|
|
+ // console.log('getOrderList ',err)
|
|
|
});
|
|
|
|
|
|
this.loadStatus.splice(this.current,1,"loadmore")
|
|
@@ -158,19 +172,17 @@ export default {
|
|
|
this.swiperCurrent = current;
|
|
|
this.current = current;
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 跳转详情
|
|
|
+ * 未发起退款或者未退款成功的
|
|
|
+ * */
|
|
|
goDetails(item){
|
|
|
- if (item.refundStatus === 1) { // 退款完成
|
|
|
- this.$u.route('pages/applyRefundDetails/applyRefundAchieveDetails', {
|
|
|
- orderId: item.orderId
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$u.route({ // 未发起退款或者未退款成功的
|
|
|
- url: 'pages/center/order/orderDetails/orderDetails',
|
|
|
- params: {
|
|
|
- orderId: item.id
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ this.$u.route({
|
|
|
+ url: 'pages/center/order/orderDetails/orderDetails',
|
|
|
+ params: {
|
|
|
+ orderId: item.id
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
jumpChargeStandard(item) {
|
|
|
this.$u.route({
|
|
@@ -187,11 +199,21 @@ export default {
|
|
|
payAmount: item.actualAmount
|
|
|
})
|
|
|
},
|
|
|
- // 申请退款详情
|
|
|
+ /**
|
|
|
+ * 申请退款详情
|
|
|
+ * 只要申请退款状态等于1并且审批状态等于1跳转到退款完成详情页
|
|
|
+ * 否则跳转到退款过程页
|
|
|
+ * */
|
|
|
applyRefundDetails(item) {
|
|
|
- this.$u.route('pages/applyRefundDetails/applyRefundDetails', {
|
|
|
- orderId: item.orderId
|
|
|
- })
|
|
|
+ if (item.refundStatus === 1 && item.auditStatus === 1) {
|
|
|
+ this.$u.route('pages/applyRefundDetails/applyRefundAchieveDetails', {
|
|
|
+ orderId: item.orderId
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$u.route('pages/applyRefundDetails/applyRefundDetails', {
|
|
|
+ orderId: item.orderId
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
filters:{
|
|
@@ -203,28 +225,22 @@ export default {
|
|
|
} else if(value === 2){
|
|
|
return '欠费未缴';
|
|
|
} else if(value === 4){
|
|
|
- return '已完成';
|
|
|
+ return '已完成';
|
|
|
} else {
|
|
|
return '';
|
|
|
}
|
|
|
},
|
|
|
- verifyRefundStatus(value) {
|
|
|
- switch(value) {
|
|
|
- case 0:
|
|
|
- return '申请退款中';
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- return '已通过';
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- return '已驳回';
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- return '退款失败';
|
|
|
- break;
|
|
|
- default:
|
|
|
- return null;
|
|
|
- break;
|
|
|
+ verifyRefundStatus(item) {
|
|
|
+ if (item.auditStatus === 0) {
|
|
|
+ return '申请退款中';
|
|
|
+ } else if (item.auditStatus === 1) {
|
|
|
+ if (item.refundStatus === 0) {
|
|
|
+ return '退款失败'
|
|
|
+ } else if (item.refundStatus === 1) {
|
|
|
+ return '退款成功'
|
|
|
+ }
|
|
|
+ } else if (item.auditStatus === 2) {
|
|
|
+ return '已驳回'
|
|
|
}
|
|
|
}
|
|
|
}
|