Task:物流拆分
This commit is contained in:
@@ -112,6 +112,7 @@ export default {
|
||||
return {
|
||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||
id: "",
|
||||
index: null,
|
||||
cartInfo: [],
|
||||
orderInfo: {},
|
||||
expressList: [],
|
||||
@@ -124,6 +125,9 @@ export default {
|
||||
]
|
||||
};
|
||||
},
|
||||
onLoad(opts) {
|
||||
this.index = opts.index || 0;
|
||||
},
|
||||
watch: {
|
||||
$yroute(n) {
|
||||
if (n.name === NAME && this.$yroute.query.id !== this.id) {
|
||||
@@ -151,16 +155,18 @@ export default {
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
err.msg ,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
getExpress() {
|
||||
console.log(this.id, "this.id");
|
||||
|
||||
if (!this.id) {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg || err.response.data.message,
|
||||
title: '订单信息错误',
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
@@ -169,11 +175,11 @@ export default {
|
||||
this.loaded = false;
|
||||
orderDetail(this.id)
|
||||
.then(res => {
|
||||
this.orderInfo = {
|
||||
deliveryId: res.data.deliveryId,
|
||||
deliveryName: res.data.deliveryName,
|
||||
deliverySn: res.data.deliverySn
|
||||
};
|
||||
console.log(this.index, "this.orderInfo");
|
||||
const { data } = res;
|
||||
const current = data.deliveryInfo[+this.index ];
|
||||
console.log(current, "current");
|
||||
this.orderInfo = current;
|
||||
this.getExpressInfo();
|
||||
// const result = res.data.express.result || {};
|
||||
// this.cartInfo = res.data.order.cartInfo;
|
||||
@@ -182,8 +188,7 @@ export default {
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
title: err.msg ,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
@@ -28,28 +28,32 @@
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="reject-reason" v-if="orderInfo._status._type==-3 && orderInfo.refundRejectReason">驳回原因:{{ orderInfo.refundRejectReason }}</view> -->
|
||||
<view class="v12-radius-20 v12-white v12-pa-3 v12-mt-4" v-if="orderInfo._status._type == 3 || (orderInfo._status._type == 2 && orderInfo.isTickets!==1)">
|
||||
<view>
|
||||
<text class="v12-secondary-dark-text v12-font-28">{{ orderInfo.deliveryName }}:{{ orderInfo.deliveryId }}</text>
|
||||
<text class="v12-font-22 v12-px-2 v12-py-1 v12-ml-1 v12-primary-text v12-primary-border v12-radius-40" @click="copyClipboard(orderInfo.deliveryId)">
|
||||
复制
|
||||
</text>
|
||||
</view>
|
||||
<view class="v12-mt-2 v12-justify-between" @click="goLogistics(orderInfo)">
|
||||
<view class="v12-align-center">
|
||||
<view class="v12-align-center v12-mr-2">
|
||||
<image class="logo" :src="webUrl+'/orderIcon/car.png'" mode="" style="margin-right:0; width: 32rpx; height:32rpx"/>
|
||||
</view>
|
||||
<view class="v12-font-28 v12-secondary-dark-text">{{ logistics.Traces && logistics.Traces.length > 0 ? logistics.Traces[logistics.Traces.length - 1].acceptStation : '暂无轨迹信息'}}</view>
|
||||
</view>
|
||||
<view v-if="orderInfo._status._type == 3 || (orderInfo._status._type == 2 && orderInfo.isTickets!==1)">
|
||||
<view v-if="index < 2 || showMoreDeliver" v-for="(delivery, index) in orderInfo.deliveryInfo" :key="index" class="v12-radius-20 v12-white v12-pa-3 v12-mt-4">
|
||||
<view>
|
||||
<uni-icons type="right" size="20" color="#707070"></uni-icons>
|
||||
<text class="v12-secondary-dark-text v12-font-28">{{ delivery.deliveryName }}:{{ delivery.deliveryId }}</text>
|
||||
<text class="v12-font-22 v12-px-2 v12-py-1 v12-ml-1 v12-primary-text v12-primary-border v12-radius-40" @click="copyClipboard(delivery.deliveryId)">
|
||||
复制
|
||||
</text>
|
||||
</view>
|
||||
<view class="v12-mt-2 v12-justify-between" @click="goLogistics(orderInfo, index)">
|
||||
<view class="v12-align-center">
|
||||
<view class="v12-align-center v12-mr-2">
|
||||
<image class="logo" :src="webUrl+'/orderIcon/car.png'" mode="" style="margin-right:0; width: 32rpx; height:32rpx"/>
|
||||
</view>
|
||||
<view class="v12-font-28 v12-secondary-dark-text">{{ logistics.Traces && logistics.Traces.length > 0 ? logistics.Traces[logistics.Traces.length - 1].acceptStation : '暂无轨迹信息'}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<uni-icons type="right" size="20" color="#707070"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v12-mt-2">
|
||||
<text class="v12-dark-text v12-font-24">{{ logistics.Traces && logistics.Traces.length > 0 ? logistics.Traces[logistics.Traces.length - 1].acceptTime : '' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v12-mt-2">
|
||||
<text class="v12-dark-text v12-font-24">{{ logistics.Traces && logistics.Traces.length > 0 ? logistics.Traces[logistics.Traces.length - 1].acceptTime : '' }}</text>
|
||||
<view class="v12-justify-center v12-mt-3" v-if="orderInfo.deliveryInfo.length > 2">
|
||||
<u-icon :name="showMoreDeliver ? 'arrow-up' : 'arrow-down'" @click="handleShowMore"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="!refundOrder">
|
||||
@@ -465,6 +469,7 @@ export default {
|
||||
mixins: [pageListenMixins],
|
||||
data: function () {
|
||||
return {
|
||||
showMoreDeliver: false,
|
||||
showExtend: false,
|
||||
delayId: '',
|
||||
showMore: false,
|
||||
@@ -541,6 +546,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
copyClipboard,
|
||||
handleShowMore() {
|
||||
this.showMoreDeliver = !this.showMoreDeliver;
|
||||
},
|
||||
handleBody() {
|
||||
this.showMore = false
|
||||
// this.$forceUpdate()
|
||||
@@ -568,11 +576,12 @@ export default {
|
||||
// });
|
||||
});
|
||||
},
|
||||
goLogistics(order) {
|
||||
goLogistics(order, index) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/Logistics/index",
|
||||
query: {
|
||||
id: order.orderId
|
||||
id: order.orderId,
|
||||
index: index
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user