|
@@ -1,5 +1,14 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="order-wrapper">
|
|
<div class="order-wrapper">
|
|
|
|
|
+ <div class="navtop" v-if="getRouter === 'buyer'" style="margin-bottom: 0.1rem;background: #fff;padding:0.2rem">
|
|
|
|
|
+ <div class="navtop_title" style="color: #666;font-size: 0.28rem;">请选择发货单查看对应的物流信息</div>
|
|
|
|
|
+ <div class="ids clearfix">
|
|
|
|
|
+ <div style="margin-top: 5px" v-for="(item, index) in idsList" v-bind:key="index">
|
|
|
|
|
+ <span class="mobile-cart-check" :class="index === nowIds ? 'active': ''" @click.stop.prevent="changeInds(index)"></span>
|
|
|
|
|
+ <span @click.stop.prevent="changeInds(index)">{{item}}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
<div class="logistics_top clearfix">
|
|
<div class="logistics_top clearfix">
|
|
|
<div class="pull-left">
|
|
<div class="pull-left">
|
|
|
<div class="name">订单编号:<span class="red">{{detailsInfo.orderid}}</span></div>
|
|
<div class="name">订单编号:<span class="red">{{detailsInfo.orderid}}</span></div>
|
|
@@ -44,7 +53,9 @@
|
|
|
detailsInfo: {},
|
|
detailsInfo: {},
|
|
|
logistics: {},
|
|
logistics: {},
|
|
|
logisticsInfo: {},
|
|
logisticsInfo: {},
|
|
|
- status: ''
|
|
|
|
|
|
|
+ status: '',
|
|
|
|
|
+ idsList: [],
|
|
|
|
|
+ nowIds: 0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
async asyncData ({route}) {
|
|
async asyncData ({route}) {
|
|
@@ -58,15 +69,31 @@
|
|
|
res = await axios.get(`/trade/purchase/purchaseId/${route.query.uuid}`)
|
|
res = await axios.get(`/trade/purchase/purchaseId/${route.query.uuid}`)
|
|
|
resultInfo = res.data.data
|
|
resultInfo = res.data.data
|
|
|
}
|
|
}
|
|
|
|
|
+ let _idsList = resultInfo.inIds.split(',')
|
|
|
return {
|
|
return {
|
|
|
- detailsInfo: resultInfo
|
|
|
|
|
|
|
+ detailsInfo: resultInfo,
|
|
|
|
|
+ idsList: _idsList
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ getRouter() {
|
|
|
|
|
+ return this.$route.query.type
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
- if (this.detailsInfo.lgtId) {
|
|
|
|
|
- this.$http.get(`/trade/logistics/${this.detailsInfo.lgtId}`).then(data => {
|
|
|
|
|
- this.logistics = data.data
|
|
|
|
|
- this.$http.get(`/kdn/logistics/query?companyName=${data.data.companyName}&logisticsCode=${data.data.number}`).then(res => {
|
|
|
|
|
|
|
+ this.getInfo()
|
|
|
|
|
+ // }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ changeInds(ind) {
|
|
|
|
|
+ this.nowIds = ind
|
|
|
|
|
+ this.logistics = {}
|
|
|
|
|
+ this.getInfo()
|
|
|
|
|
+ },
|
|
|
|
|
+ getInfo() {
|
|
|
|
|
+ this.$http.get(`/trade/order/invoiceid?id=${this.detailsInfo.id}&invoiceid=${this.idsList[this.nowIds]}`).then(data => {
|
|
|
|
|
+ this.logistics = data.data.data.logistics
|
|
|
|
|
+ this.$http.get(`/kdn/logistics/query?companyName=${this.logistics.companyName}&logisticsCode=${this.logistics.number}`).then(res => {
|
|
|
let str = res.data.traces
|
|
let str = res.data.traces
|
|
|
this.logisticsInfo = JSON.parse(res.data.traces).reverse()
|
|
this.logisticsInfo = JSON.parse(res.data.traces).reverse()
|
|
|
if (str.indexOf('揽件') !== -1 || str.indexOf('收件') !== -1 || str.indexOf('转运') !== -1 || str.indexOf('运输') !== -1 || str.indexOf('发往') !== -1 ||
|
|
if (str.indexOf('揽件') !== -1 || str.indexOf('收件') !== -1 || str.indexOf('转运') !== -1 || str.indexOf('运输') !== -1 || str.indexOf('发往') !== -1 ||
|
|
@@ -198,5 +225,30 @@
|
|
|
margin-top: 0.2rem;
|
|
margin-top: 0.2rem;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ .navtop {
|
|
|
|
|
+ .ids{
|
|
|
|
|
+ div {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ font-size: 0.24rem;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ line-height: .36rem;
|
|
|
|
|
+ .mobile-cart-check{
|
|
|
|
|
+ min-width: .36rem;
|
|
|
|
|
+ height: .36rem;
|
|
|
|
|
+ background: url(/images/mobile/center/user/car-noChecked.png) no-repeat;
|
|
|
|
|
+ background-size: contain;
|
|
|
|
|
+ vertical-align: middle;
|
|
|
|
|
+ margin-bottom: .02rem;
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ margin-right: 0.11rem;
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ vertical-align: middle;
|
|
|
|
|
+ &.active {
|
|
|
|
|
+ background-image: url(/images/mobile/center/user/car-checked.png);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|