wangfukang 1 week ago
parent
commit
fcca1d1fa2
  1. 101
      package1/order/orderDetail.vue
  2. 9
      package1/order/orderList.vue

101
package1/order/orderDetail.vue

@ -94,9 +94,9 @@
<view class="status-img"> <view class="status-img">
<img v-if="orderDetail.status == 0 || (orderDetail.status == 3 && orderDetail.deliveryType == 2)" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6cf6fff020614ebebb34f7c371e11331.png" alt="" /> <img v-if="orderDetail.status == 0 || (orderDetail.status == 3 && orderDetail.deliveryType == 2)" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6cf6fff020614ebebb34f7c371e11331.png" alt="" />
<img v-if="orderDetail.status == 2" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/35ff6276eb3a4e58b8baa724ca44d5dc.png" alt="" /> <img v-if="orderDetail.status == 2" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/35ff6276eb3a4e58b8baa724ca44d5dc.png" alt="" />
<img v-if="orderDetail.status == 5 || orderDetail.status == 8" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/dbfa6dc934e2414c912c67430d5f802c.png" alt="" /> <img v-if="orderDetail.status == 5 || orderDetail.status == 8 || orderDetail.status == 12" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/dbfa6dc934e2414c912c67430d5f802c.png" alt="" />
<img v-if="orderDetail.status == 6" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/03d7e8d5914e4b9ca04728113900d1fe.png" alt="" /> <img v-if="orderDetail.status == 6" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/03d7e8d5914e4b9ca04728113900d1fe.png" alt="" />
<img v-if="orderDetail.status == 7" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/35ff6276eb3a4e58b8baa724ca44d5dc.png" alt="" /> <img v-if="orderDetail.status == 7 || orderDetail.status == 11" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/35ff6276eb3a4e58b8baa724ca44d5dc.png" alt="" />
<img v-if="(orderDetail.status == 3 && orderDetail.deliveryType == 1) || (orderDetail.status == 4 && orderDetail.deliveryType == 1)" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/0ab87a35cbca473997c679a023337df6.png" alt="" /> <img v-if="(orderDetail.status == 3 && orderDetail.deliveryType == 1) || (orderDetail.status == 4 && orderDetail.deliveryType == 1)" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/0ab87a35cbca473997c679a023337df6.png" alt="" />
<!-- <!--
待支付 https://jewel-shop.oss-cn-beijing.aliyuncs.com/6cf6fff020614ebebb34f7c371e11331.png 待支付 https://jewel-shop.oss-cn-beijing.aliyuncs.com/6cf6fff020614ebebb34f7c371e11331.png
@ -117,7 +117,9 @@
<text v-if="orderDetail.status == 7">等待商家同意退款</text> <text v-if="orderDetail.status == 7">等待商家同意退款</text>
<text v-if="orderDetail.status == 6">订单已取消</text> <text v-if="orderDetail.status == 6">订单已取消</text>
<text v-if="orderDetail.status == 8">订单已退款</text> <text v-if="orderDetail.status == 8">订单已退款</text>
<text v-if="orderDetail.status != 5 && orderDetail.status != 8 && orderDetail.returnStatus == 1">(商家拒绝退款)</text> <text v-if="orderDetail.status == 11">售后中</text>
<text v-if="orderDetail.status == 12">订单已售后</text>
<text v-if="orderDetail.status != 5 && orderDetail.status != 8 && orderDetail.status != 12 && orderDetail.returnStatus == 1">(商家拒绝退款)</text>
</view> </view>
<view class="status-fu" v-if="orderDetail.deliveryInfo"> <view class="status-fu" v-if="orderDetail.deliveryInfo">
<view class="">预计<text>{{orderDetail.deliveryInfo.mustFinishTime | formatHourMinute }}</text>送达</view> <view class="">预计<text>{{orderDetail.deliveryInfo.mustFinishTime | formatHourMinute }}</text>送达</view>
@ -132,7 +134,7 @@
<view class="status-btn" style="top: 0;" v-if="orderStatus(orderDetail)" @tap="returnPopupProp(orderDetail)"> <view class="status-btn" style="top: 0;" v-if="orderStatus(orderDetail)" @tap="returnPopupProp(orderDetail)">
取消订单 取消订单
</view> </view>
<view class="status-btn" style="top: 0;" v-if="orderDetail.status == 5"> <view class="status-btn" style="top: 0;" v-if="orderDetail.status == 5" @tap="returnProducts(orderDetail)">
申请售后 申请售后
</view> </view>
<view class="status-btn" style="top: 35px;" @tap="refreah(orderDetail)"> <view class="status-btn" style="top: 35px;" @tap="refreah(orderDetail)">
@ -238,6 +240,22 @@
北校区1号宿舍楼5楼512(0702) 北校区1号宿舍楼5楼512(0702)
</view> </view>
</view> --> </view> -->
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.numberCode != null">
<view style="flex: 1;color: #777;font-weight: 700;">
订单号
</view>
<view style="color: #000;font-weight: 700;">
{{orderDetail.numberCode}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;">
<view style="flex: 1;color: #777;font-weight: 700;">
下单时间
</view>
<view style="color: #000;font-weight: 700;">
{{orderDetail.createTime | formatTime}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1"> <view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
配送员 配送员
@ -249,30 +267,56 @@
未指定等待接单中 未指定等待接单中
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.numberCode != null"> <view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.workerId">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
订单号 配送员接单时间
</view> </view>
<view style="color: #000;font-weight: 700;"> <view style="color: #000;font-weight: 700;">
{{orderDetail.numberCode}} {{orderDetail.deliveryInfo.acceptTime | formatTime}}
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"> <view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
送达时间 商家出餐时间
</view>
<view style="color: #000;font-weight: 700;" v-if="orderDetail.deliveryInfo.workerId != null && orderDetail.deliveryInfo.workerId != ''">
{{orderDetail.shopMakeTime ? orderDetail.shopMakeTime : '' | formatTime}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.workerId != ''">
<view style="flex: 1;color: #777;font-weight: 700;">
配送员到店时间
</view> </view>
<view style="color: #000;font-weight: 700;"> <view style="color: #000;font-weight: 700;">
尽快送达 {{orderDetail.deliveryInfo.arriveTime ? orderDetail.deliveryInfo.arriveTime : '' | formatTime}}
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"> <view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.workerId != ''">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
下单时间 配送员取货时间
</view>
<view style="color: #000;font-weight: 700;">
{{orderDetail.deliveryInfo.getTime ? orderDetail.deliveryInfo.getTime : '' | formatTime}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.workerId != ''">
<view style="flex: 1;color: #777;font-weight: 700;">
配送员送达时间
</view>
<view style="color: #000;font-weight: 700;">
{{orderDetail.deliveryInfo.finishTime ? orderDetail.deliveryInfo.finishTime : '' | formatTime}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;">
送达时间
</view> </view>
<view style="color: #000;font-weight: 700;"> <view style="color: #000;font-weight: 700;">
{{orderDetail.createTime}} {{orderDetail.deliveryInfo.finishTime ? orderDetail.deliveryInfo.finishTime : '尽快送达' | formatTime}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -330,6 +374,32 @@
// --: // --:
return `${day}-${hour}:${minute}`; return `${day}-${hour}:${minute}`;
},
formatTime(value) {
if (!value) return '';
const date = new Date(value);
//
const year = date.getFullYear();
// (getMonth 0-11 +1)0
const month = String(date.getMonth() + 1).padStart(2, '0');
// (getDate)0
const day = String(date.getDate()).padStart(2, '0');
// (getHours)0
const hour = String(date.getHours()).padStart(2, '0');
// (getMinutes)0
const minute = String(date.getMinutes()).padStart(2, '0');
// (getSeconds)0
const second = String(date.getSeconds()).padStart(2, '0');
// -- ::
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
} }
}, },
onLoad(option) { onLoad(option) {
@ -375,6 +445,11 @@
this.getOrderDetail(item.id) this.getOrderDetail(item.id)
this.$forceUpdate(); this.$forceUpdate();
}, },
returnProducts(item){
uni.navigateTo({
url: '/package1/order/returnOrder?order=' + encodeURIComponent(JSON.stringify(item))
});
},
getOrderDetail(id){ getOrderDetail(id){
let that = this let that = this
that.tui.request("/mall/order/detail/"+id, "GET", {}, false, true).then((res) => { that.tui.request("/mall/order/detail/"+id, "GET", {}, false, true).then((res) => {

9
package1/order/orderList.vue

@ -78,6 +78,12 @@
<view class="tabs2" @tap="checkTabs2(9)" v-if="tab1Checked !='quanbu'" <view class="tabs2" @tap="checkTabs2(9)" v-if="tab1Checked !='quanbu'"
:style="{'background':tab2Checked==9?'rgba(166, 255, 234, 1)':'#F5F5F5','color':tab2Checked==9?'#000':'#777'}"> :style="{'background':tab2Checked==9?'rgba(166, 255, 234, 1)':'#F5F5F5','color':tab2Checked==9?'#000':'#777'}">
已取消</view> 已取消</view>
<view class="tabs2" @tap="checkTabs2(11)" v-if="tab1Checked !='quanbu'"
:style="{'background':tab2Checked==11?'rgba(166, 255, 234, 1)':'#F5F5F5','color':tab2Checked==8?'#000':'#777'}">
售后中</view>
<view class="tabs2" @tap="checkTabs2(12)" v-if="tab1Checked !='quanbu'"
:style="{'background':tab2Checked==12?'rgba(166, 255, 234, 1)':'#F5F5F5','color':tab2Checked==9?'#000':'#777'}">
已售后</view>
</view> </view>
</view> </view>
<view class="content"> <view class="content">
@ -175,9 +181,6 @@
<view class="btn1" v-if="orderStatus(item)" @tap="returnPopupProp(item)"> <view class="btn1" v-if="orderStatus(item)" @tap="returnPopupProp(item)">
取消订单 取消订单
</view> </view>
<view class="btn1" v-if="item.status == 5">
申请售后
</view>
<view class="btn1" v-if="item.status == 0" @tap="payAgain(item)" <view class="btn1" v-if="item.status == 0" @tap="payAgain(item)"
style="background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));color: #000;"> style="background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));color: #000;">
去支付 去支付

Loading…
Cancel
Save