Task:物流拆分
This commit is contained in:
@@ -112,6 +112,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||||
id: "",
|
id: "",
|
||||||
|
index: null,
|
||||||
cartInfo: [],
|
cartInfo: [],
|
||||||
orderInfo: {},
|
orderInfo: {},
|
||||||
expressList: [],
|
expressList: [],
|
||||||
@@ -124,6 +125,9 @@ export default {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad(opts) {
|
||||||
|
this.index = opts.index || 0;
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$yroute(n) {
|
$yroute(n) {
|
||||||
if (n.name === NAME && this.$yroute.query.id !== this.id) {
|
if (n.name === NAME && this.$yroute.query.id !== this.id) {
|
||||||
@@ -151,16 +155,18 @@ export default {
|
|||||||
.catch(err => {
|
.catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:
|
title:
|
||||||
err.msg || err.response.data.msg || err.response.data.message,
|
err.msg ,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getExpress() {
|
getExpress() {
|
||||||
|
console.log(this.id, "this.id");
|
||||||
|
|
||||||
if (!this.id) {
|
if (!this.id) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.msg || err.response.data.msg || err.response.data.message,
|
title: '订单信息错误',
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
@@ -169,11 +175,11 @@ export default {
|
|||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
orderDetail(this.id)
|
orderDetail(this.id)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.orderInfo = {
|
console.log(this.index, "this.orderInfo");
|
||||||
deliveryId: res.data.deliveryId,
|
const { data } = res;
|
||||||
deliveryName: res.data.deliveryName,
|
const current = data.deliveryInfo[+this.index ];
|
||||||
deliverySn: res.data.deliverySn
|
console.log(current, "current");
|
||||||
};
|
this.orderInfo = current;
|
||||||
this.getExpressInfo();
|
this.getExpressInfo();
|
||||||
// const result = res.data.express.result || {};
|
// const result = res.data.express.result || {};
|
||||||
// this.cartInfo = res.data.order.cartInfo;
|
// this.cartInfo = res.data.order.cartInfo;
|
||||||
@@ -182,8 +188,7 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:
|
title: err.msg ,
|
||||||
err.msg || err.response.data.msg || err.response.data.message,
|
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -28,28 +28,32 @@
|
|||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="reject-reason" v-if="orderInfo._status._type==-3 && orderInfo.refundRejectReason">驳回原因:{{ orderInfo.refundRejectReason }}</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 v-if="orderInfo._status._type == 3 || (orderInfo._status._type == 2 && orderInfo.isTickets!==1)">
|
||||||
<view>
|
<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">
|
||||||
<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>
|
<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>
|
</view>
|
||||||
<view class="v12-mt-2">
|
<view class="v12-justify-center v12-mt-3" v-if="orderInfo.deliveryInfo.length > 2">
|
||||||
<text class="v12-dark-text v12-font-24">{{ logistics.Traces && logistics.Traces.length > 0 ? logistics.Traces[logistics.Traces.length - 1].acceptTime : '' }}</text>
|
<u-icon :name="showMoreDeliver ? 'arrow-up' : 'arrow-down'" @click="handleShowMore"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<template v-if="!refundOrder">
|
<template v-if="!refundOrder">
|
||||||
@@ -465,6 +469,7 @@ export default {
|
|||||||
mixins: [pageListenMixins],
|
mixins: [pageListenMixins],
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
showMoreDeliver: false,
|
||||||
showExtend: false,
|
showExtend: false,
|
||||||
delayId: '',
|
delayId: '',
|
||||||
showMore: false,
|
showMore: false,
|
||||||
@@ -541,6 +546,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
copyClipboard,
|
copyClipboard,
|
||||||
|
handleShowMore() {
|
||||||
|
this.showMoreDeliver = !this.showMoreDeliver;
|
||||||
|
},
|
||||||
handleBody() {
|
handleBody() {
|
||||||
this.showMore = false
|
this.showMore = false
|
||||||
// this.$forceUpdate()
|
// this.$forceUpdate()
|
||||||
@@ -568,11 +576,12 @@ export default {
|
|||||||
// });
|
// });
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goLogistics(order) {
|
goLogistics(order, index) {
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path: "/pages/order/Logistics/index",
|
path: "/pages/order/Logistics/index",
|
||||||
query: {
|
query: {
|
||||||
id: order.orderId
|
id: order.orderId,
|
||||||
|
index: index
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user