Commit 50cc2b17 authored by xiejb's avatar xiejb
parents 39d6d7c3 c6e83854
......@@ -9,8 +9,10 @@ yarn-error.log*
# Editor directories and files
.idea
.prettierrc
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
......@@ -5,18 +5,18 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
// 测试
// HOST_URL: '"http://222.66.127.246"',
// PORT: '":8020"',
// BASE_URL: '""',
// appRealDb: '"app_test_shaphar"',
HOST_URL: '"http://222.66.127.246"',
PORT: '":8020"',
BASE_URL: '""',
appRealDb: '"app_test_shaphar"',
// 正式
// HOST_URL: '"http://mobileportal.shaphar.com"',
// PORT: '":8028"',
// BASE_URL: '"/basservice"',
// appRealDb: '"app_real_shaphar"',
//NEW 正式
HOST_URL: '"https://mobileportal.shaphar.com"',
PORT: '":8443"',
BASE_URL: '"/basservicenew"',
appRealDb: '"app_real_shaphar"'
// HOST_URL: '"https://mobileportal.shaphar.com"',
// PORT: '":8443"',
// BASE_URL: '"/basservicenew"',
// appRealDb: '"app_real_shaphar"'
})
<template>
<div class="logistics-content">
<van-empty description="暂无数据"
v-if="!((mapPointList&&mapPointList.length > 0)||
(shippingInfo&&shippingInfo.shippingNo)||
(stepList&&stepList.length > 0)||
(orderInfo.isCold && coldInfo && coldInfo.length > 0)) && !shoppingLoading"/>
<van-empty
description="暂无数据"
v-if="
!(
(mapPointList && mapPointList.length > 0) ||
(shippingInfo && shippingInfo.shippingNo) ||
(stepList && stepList.length > 0) ||
(orderInfo.isCold && coldInfo && coldInfo.length > 0)
) && !shoppingLoading
"
/>
<!-- 高德地图 -->
<div style="position:relative;height:300px" v-if="gpsLoading || (mapPointList&&mapPointList.length > 0)">
<a-map-view :transport="sendType" :point-list="mapPointList" :drive-point="driveLine" v-if="!gpsLoading && (mapPointList&&mapPointList.length > 0)"/>
<div
style="position:relative;height:300px"
v-if="gpsLoading || (mapPointList && mapPointList.length > 0)"
>
<a-map-view
:transport="sendType"
:point-list="mapPointList"
:drive-point="driveLine"
v-if="!gpsLoading && mapPointList && mapPointList.length > 0"
/>
<div class="map-loading" v-if="gpsLoading">
{{ mapDataLoadingText }}
</div>
</div>
<!-- 物流主信息 -->
<div class="logistics-header">
<van-skeleton avatar :row="3" :loading="shoppingLoading"
style="background-color:#fff;padding-top:10px;padding-bottom:10px">
<div class="header-title" v-if="shippingInfo&&shippingInfo.shippingNo">
<van-icon class="logistic-logo" :name="icons.logo"/>
<van-skeleton
avatar
:row="3"
:loading="shoppingLoading"
style="background-color:#fff;padding-top:10px;padding-bottom:10px"
>
<div
class="header-title"
v-if="shippingInfo && shippingInfo.shippingNo"
>
<van-icon class="logistic-logo" :name="icons.logo" />
<span class="logistic-header-layout">
<div class="header-order-info main-info">
<span class="logistic-name">承运商:</span>
<span class="logistic-values">{{ shippingInfo.carrier }}</span>
</div>
<div class="header-order-info" style="margin-top: 8px">
<span class="logistic-name">运单号:</span>
<span class="logistic-values">{{ shippingInfo.shippingNo }}</span>
</div>
<div class="header-order-info" style="margin-top: 2px;" v-if="shippingInfo.deliveryMan">
<span class="logistic-name">配送人:</span>
<span class="logistic-values" style="display:flex;">
<span style="flex:1">{{ shippingInfo.deliveryMan }} {{ shippingInfo.deliveryManPhone }}</span>
<img class="logistic-func-icon" :src="icons.call" @click="callDriver(shippingInfo.deliveryManPhone)"/>
</span>
</div>
<div class="header-order-info" style="margin-top:2px;margin-bottom:8px"
v-if="shippingInfo.estimatedArrivalTime && stepInfo && stepInfo.currentOrderStatusCode < 400">
<span class="logistic-name">预计到达时间:</span>
<span class="logistic-values">{{ shippingInfo.estimatedArrivalTime }}</span>
</div>
</span>
<span class="logistic-type">{{ shippingInfo.roadType === 'D' ? '市内' : '市外' }}</span>
<div class="header-order-info main-info">
<span class="logistic-name">承运商:</span>
<span class="logistic-values">{{ shippingInfo.carrier }}</span>
</div>
<div class="header-order-info" style="margin-top: 8px">
<span class="logistic-name">运单号:</span>
<span class="logistic-values">{{ shippingInfo.shippingNo }}</span>
</div>
<div
class="header-order-info"
style="margin-top: 2px;"
v-if="shippingInfo.deliveryMan"
>
<span class="logistic-name">配送人:</span>
<span class="logistic-values" style="display:flex;">
<span style="flex:1"
>{{ shippingInfo.deliveryMan }}
{{ shippingInfo.deliveryManPhone }}</span
>
<img
class="logistic-func-icon"
:src="icons.call"
@click="callDriver(shippingInfo.deliveryManPhone)"
/>
</span>
</div>
<div
class="header-order-info"
style="margin-top:2px;margin-bottom:8px"
v-if="
shippingInfo.estimatedArrivalTime &&
stepInfo &&
stepInfo.currentOrderStatusCode < 400
"
>
<span class="logistic-name">预计到达时间:</span>
<span class="logistic-values">{{
shippingInfo.estimatedArrivalTime
}}</span>
</div>
</span>
<span class="logistic-type">{{
shippingInfo.roadType === 'D' ? '市内' : '市外'
}}</span>
</div>
</van-skeleton>
</div>
<!-- 物流追踪信息 -->
<div id="stepLine" :class="stepList.length>2?'logistics-step-line':'logistics-step-line_show'"
v-if="stepList&&stepList.length > 0">
<div
id="stepLine"
:class="
stepList.length > 2 ? 'logistics-step-line' : 'logistics-step-line_show'
"
v-if="stepList && stepList.length > 0"
>
<logistics-step>
<step-item v-for="(item, index) in stepList" :stepInfo=item :key="index"/>
<step-item
v-for="(item, index) in stepList"
:stepInfo="item"
:key="index"
/>
</logistics-step>
<div class="show-more" @click="showStepLine">
点击查看更多物流详情
<van-icon name="arrow-down"/>
<van-icon name="arrow-down" />
</div>
</div>
<!-- 冷链温度趋势 -->
<van-tabs v-if="orderInfo.isCold && coldInfo && coldInfo.length > 0"
v-model="temperatureActive"
title-active-color="#1989FA"
class="tabs">
<van-tab :title="item.deviceNumber" v-for="(item,index) in coldInfo" :key="index">
<echarts-view :line-array="item.temperatureInfoList" :car-no="item.deviceNumber"/>
<van-tabs
v-if="orderInfo.isCold && coldInfo && coldInfo.length > 0"
v-model="temperatureActive"
title-active-color="#1989FA"
class="tabs"
>
<van-tab
:title="item.deviceNumber"
v-for="(item, index) in coldInfo"
:key="index"
>
<echarts-view
:line-array="item.temperatureInfoList"
:car-no="item.deviceNumber"
/>
</van-tab>
</van-tabs>
</div>
</template>
<script>
import {getShippingInfo, getTrackInfo, getGpsMapPoint, getColdTemperatureList} from '@/api/myOrder'
import {
getShippingInfo,
getTrackInfo,
getGpsMapPoint,
getColdTemperatureList
} from '@/api/myOrder'
import MapView from '../../../components/MapView'
import LogisticsStep from '../components/logisticsStep'
import StepItem from '../components/stepItem'
import AMapView from '../../../components/AMapView'
import EchartsView from '../../../components/EchartsView'
import {bridge} from '../../../utils'
import { bridge } from '../../../utils'
export default {
name: 'logisticsDetail',
components: {EchartsView, AMapView, StepItem, LogisticsStep, MapView},
components: { EchartsView, AMapView, StepItem, LogisticsStep, MapView },
data() {
return {
orderInfo: this.$route.query,
......@@ -120,8 +186,7 @@ export default {
title: '物流详情',
leftText: '',
leftClick: this.onBrowserBack,
rightClick: function () {
}
rightClick: function() {}
})
window.addEventListener('popstate', this.onBrowserBack, false)
// 获取运单信息
......@@ -155,91 +220,120 @@ export default {
getShippingData() {
console.log(this.orderInfo)
let data = {
'orderId': '',
'orderNo': this.orderInfo.orderNo, // '879202103190016',
'orderType': this.orderInfo.orderType, // 'SALE',
'sourceDb': this.orderInfo.sourceDb, // 'SHYY',
'pageSize': 10,
'pageNum': 1,
'sort': '',
'order': ''
orderId: '',
orderNo: this.orderInfo.orderNo, // '879202103190016',
orderType: this.orderInfo.orderType, // 'SALE',
sourceDb: this.orderInfo.sourceDb, // 'SHYY',
pageSize: 10,
pageNum: 1,
sort: '',
order: ''
}
getShippingInfo(data).then(rt => {
if (rt.code === 200 && rt.data && rt.data.code === '00000' &&
rt.data.entity && rt.data.entity.shippingList && rt.data.entity.shippingList.length > 0) {
this.shippingInfo = rt.data.entity.shippingList[0]
// 定义驾驶规划参数
this.driveLine.startPoint.address = this.shippingInfo.pickingLocationDesc
this.driveLine.startPoint.longitude = parseFloat(this.shippingInfo.pickLongitude)
this.driveLine.startPoint.latitude = parseFloat(this.shippingInfo.pickLatitude)
this.driveLine.endPoint.address = this.shippingInfo.clientAddress
this.driveLine.endPoint.longitude = parseFloat(this.shippingInfo.longitude)
this.driveLine.endPoint.latitude = parseFloat(this.shippingInfo.latitude)
getShippingInfo(data)
.then(rt => {
if (
rt.code === 200 &&
rt.data &&
rt.data.code === '00000' &&
rt.data.entity &&
rt.data.entity.shippingList &&
rt.data.entity.shippingList.length > 0
) {
this.shippingInfo = rt.data.entity.shippingList[0]
// 定义驾驶规划参数
this.driveLine.startPoint.address = this.shippingInfo.pickingLocationDesc
this.driveLine.startPoint.longitude = parseFloat(
this.shippingInfo.pickLongitude
)
this.driveLine.startPoint.latitude = parseFloat(
this.shippingInfo.pickLatitude
)
this.driveLine.endPoint.address = this.shippingInfo.clientAddress
this.driveLine.endPoint.longitude = parseFloat(
this.shippingInfo.longitude
)
this.driveLine.endPoint.latitude = parseFloat(
this.shippingInfo.latitude
)
if (this.orderInfo.orderStatusCode > 300) {
this.sendType = this.orderInfo.orderStatusCode === '310'
this.getGpsPoint()
}
} else {
if (rt.code === 500) {
this.$toast(rt.msg)
// if (this.orderInfo.orderStatusCode > 300) {
// this.sendType = this.orderInfo.orderStatusCode === '310'
// this.getGpsPoint()
// }
console.log(this.orderInfo.orderStatusCode)
if (
this.orderInfo.orderStatusCode === '220' ||
this.orderInfo.orderStatusCode === '310'
) {
this.getGpsPoint()
}
} else {
if (rt.code === 500) {
this.$toast(rt.msg)
}
}
}
this.shoppingLoading = false
}).catch(err => {
console.log('运单信息', err)
this.$toast('运单信息获取失败')
})
this.shoppingLoading = false
})
.catch(err => {
console.log('运单信息', err)
this.$toast('运单信息获取失败')
})
},
/* 物流追踪 */
getTrackInfoDetail() {
let data = {
'sourceDb': this.orderInfo.sourceDb,
'supplierId': [this.orderInfo.supplierId],
'clientID': [this.orderInfo.clientId],
'orderId': '',
'orderNo': this.orderInfo.orderNo,
'orderType': this.orderInfo.orderType,
'supplierCode': [
this.orderInfo.supplierCode
],
'clientCode': [this.orderInfo.clientCode]
sourceDb: this.orderInfo.sourceDb,
supplierId: [this.orderInfo.supplierId],
clientID: [this.orderInfo.clientId],
orderId: '',
orderNo: this.orderInfo.orderNo,
orderType: this.orderInfo.orderType,
supplierCode: [this.orderInfo.supplierCode],
clientCode: [this.orderInfo.clientCode]
}
getTrackInfo(data).then(res => {
if (res.code === 200 && res.data && res.data.code === '00000' &&
res.data.entity && res.data.entity.logisticsTrackingInfoList) {
this.stepInfo = res.data.entity.logisticsTrackingInfoList
let tempStep = []
this.stepInfo.orderStatusInfoVoList.forEach((item, index) => {
tempStep.push({
date: item.opDate.split(' ')[0],
time: item.opDate.split(' ')[1],
type: item.orderStatus,
typeCode: item.orderStatusCode,
text: item.statusMsg,
showLine: index !== (this.stepInfo.orderStatusInfoVoList.length - 1)
getTrackInfo(data)
.then(res => {
if (
res.code === 200 &&
res.data &&
res.data.code === '00000' &&
res.data.entity &&
res.data.entity.logisticsTrackingInfoList
) {
this.stepInfo = res.data.entity.logisticsTrackingInfoList
let tempStep = []
this.stepInfo.orderStatusInfoVoList.forEach((item, index) => {
tempStep.push({
date: item.opDate.split(' ')[0],
time: item.opDate.split(' ')[1],
type: item.orderStatus,
typeCode: item.orderStatusCode,
text: item.statusMsg,
showLine:
index !== this.stepInfo.orderStatusInfoVoList.length - 1
})
})
})
this.stepList = tempStep
} else {
if (res.code === 500) {
this.$toast(res.msg)
this.stepList = tempStep
} else {
if (res.code === 500) {
this.$toast(res.msg)
}
}
}
}).catch(err => {
console.log('物流跟踪', err)
this.$toast('物流跟踪信息获取失败')
})
})
.catch(err => {
console.log('物流跟踪', err)
this.$toast('物流跟踪信息获取失败')
})
},
/* GPS 定位信息 */
getGpsPoint() {
this.gpsLoading = true
let data = {
'orderType': this.orderInfo.orderType, // 'SALE',
'shippingNo': this.shippingInfo.shippingNo, // '3S1255202103190010',
'sourceDb': this.orderInfo.sourceDb, // 'SHYY',
'gisTime': this.shippingInfo.actualArrivalTime,
'orderNo': this.orderInfo.orderNo // '879202103190016'
orderType: this.orderInfo.orderType, // 'SALE',
shippingNo: this.shippingInfo.shippingNo, // '3S1255202103190010',
sourceDb: this.orderInfo.sourceDb, // 'SHYY',
gisTime: this.shippingInfo.actualArrivalTime,
orderNo: this.orderInfo.orderNo // '879202103190016'
}
// let data = {
// 'orderType': 'SALE', // 'SALE',
......@@ -248,41 +342,52 @@ export default {
// 'gisTime': '',
// 'orderNo': '543533035211583431' // '879202103190016'
// }
getGpsMapPoint(data).then(res => {
if (res.code === 200 && res.data.code === '00000' &&
res.data.entity && res.data.entity.gisMapInfoList) {
this.mapPointList = res.data.entity.gisMapInfoList
} else {
if (res.code === 500) {
this.$toast(res.msg)
this.mapDataLoadingText = res.msg
getGpsMapPoint(data)
.then(res => {
if (
res.code === 200 &&
res.data.code === '00000' &&
res.data.entity &&
res.data.entity.gisMapInfoList
) {
this.mapPointList = res.data.entity.gisMapInfoList
this.sendType = true
} else {
if (res.code === 500) {
this.$toast(res.msg)
this.mapDataLoadingText = res.msg
}
this.mapDataLoadingText = '定位数据请求失败或无数据'
}
this.mapDataLoadingText = '定位数据请求失败或无数据'
}
this.gpsLoading = false
}).catch(err => {
console.log('GPS信息', err)
this.mapDataLoadingText = '定位数据请求失败'
this.$toast('定位数据请求失败')
this.gpsLoading = false
})
this.gpsLoading = false
})
.catch(err => {
console.log('GPS信息', err)
this.mapDataLoadingText = '定位数据请求失败'
this.$toast('定位数据请求失败')
this.gpsLoading = false
})
},
/* 获取温度变化趋势数据 */
getTemperatureData() {
let data = {
'order': 'desc',
'orderId': '',
'orderNo': this.orderInfo.orderNo, // '301202103261165',
'orderType': this.orderInfo.orderType, // 'SALE',
'pageNum': 1,
'pageSize': 1000,
'sort': 'COLLECTDATE',
'sourceDb': this.orderInfo.sourceDb// 'SHYY'
order: 'desc',
orderId: '',
orderNo: this.orderInfo.orderNo, // '301202103261165',
orderType: this.orderInfo.orderType, // 'SALE',
pageNum: 1,
pageSize: 1000,
sort: 'COLLECTDATE',
sourceDb: this.orderInfo.sourceDb // 'SHYY'
}
getColdTemperatureList(data).then(res => {
if (res.code === 200 && res.data.code === '00000' &&
res.data.entity && res.data.entity.temperatureRecordList &&
res.data.entity.temperatureRecordList.length > 0) {
if (
res.code === 200 &&
res.data.code === '00000' &&
res.data.entity &&
res.data.entity.temperatureRecordList &&
res.data.entity.temperatureRecordList.length > 0
) {
this.coldInfo = res.data.entity.temperatureRecordList
}
})
......@@ -412,7 +517,7 @@ export default {
}
/deep/ .van-tabs__wrap {
border-bottom: 1px solid #eeeeee
border-bottom: 1px solid #eeeeee;
}
/deep/ .van-tabs__line {
......
<template>
<div class="order-detail">
<!-- 订单状态 正常 -->
<order-state class="order-state" :active="orderStateActive" v-if="detailData.orderType === 'SALE' && trackData.currentOrderStatusCode !== '110'">
<order-state-item text="已开单" :item-num="1"/>
<order-state-item text="已发货" :item-num="2"/>
<order-state-item text="运输中" :item-num="3"/>
<order-state-item text="已签收" :item-num="4" :hasNext="false"/>
<order-state
class="order-state"
:active="orderStateActive"
v-if="
detailData.orderType === 'SALE' &&
trackData.currentOrderStatusCode !== '110'
"
>
<order-state-item text="已开单" :item-num="1" />
<order-state-item text="已发货" :item-num="2" />
<order-state-item text="运输中" :item-num="3" />
<order-state-item text="已签收" :item-num="4" :hasNext="false" />
</order-state>
<!-- 订单状态 退货 -->
<order-state class="order-state" :active="orderStateActive" v-if="detailData.orderType === 'SALE_RTN' && trackData.currentOrderStatusCode !== '110'">
<order-state-item text="已开单" :item-num="1"/>
<order-state-item text="退货中" :item-num="2"/>
<order-state-item text="已完成" :item-num="3" :hasNext="false"/>
<order-state
class="order-state"
:active="orderStateActive"
v-if="
detailData.orderType === 'SALE_RTN' &&
trackData.currentOrderStatusCode !== '110'
"
>
<order-state-item text="已开单" :item-num="1" />
<order-state-item text="退货中" :item-num="2" />
<order-state-item text="已完成" :item-num="3" :hasNext="false" />
</order-state>
<!-- 订单状态 取消 -->
<order-state class="order-state" :active="2" v-if="trackData.currentOrderStatusCode === '110'">
<order-state-item text="已开单" :item-num="1"/>
<order-state-item text="已取消" :item-num="2" :hasNext="false"/>
<order-state
class="order-state"
:active="2"
v-if="trackData.currentOrderStatusCode === '110'"
>
<order-state-item text="已开单" :item-num="1" />
<order-state-item text="已取消" :item-num="2" :hasNext="false" />
</order-state>
<!-- 订单状态:
......@@ -38,19 +56,31 @@
<!-- 订单基本信息 -->
<div class="order-common order-info">
<div class="info-content">
<van-icon :name="icons.order" class="order-icon info-icon"/>
<van-icon :name="icons.order" class="order-icon info-icon" />
<div class="info-text">
<div style="display: flex">
<span class="order-code">{{ detailData.orderNo }}</span>
<div class="order-copy" @click="onCopyOrderNo()"><span class="order-copy-text">复制</span></div>
<div class="order-copy" @click="onCopyOrderNo()">
<span class="order-copy-text">复制</span>
</div>
</div>
下单时间: {{ detailData.orderDate }}
</div>
</div>
<div class="info-state">
<span v-if="this.storageModel.rtn" class="state-type order-type-tip-return">退</span>
<span v-if="this.storageModel.cold" class="state-type order-type-tip-cold"></span>
<span v-if="this.storageModel.jm" class="state-type order-type-tip-jm">精麻</span>
<span
v-if="this.storageModel.rtn"
class="state-type order-type-tip-return"
>退</span
>
<span
v-if="this.storageModel.cold"
class="state-type order-type-tip-cold"
></span
>
<span v-if="this.storageModel.jm" class="state-type order-type-tip-jm"
>精麻</span
>
</div>
<!-- <div class="info-arrival">-->
<!-- <div class="arrival-time">-->
......@@ -62,19 +92,25 @@
<!-- 订单物流信息 -->
<div class="order-common order-logistics">
<div class="logistics-content" @click="openLogistics()">
<!-- <van-icon :name="icons.inDelivery" class="order-icon logistics-icon"/>-->
<img :src="icons.inDelivery" class="order-icon logistics-icon"/>
<!-- <van-icon :name="icons.inDelivery" class="order-icon logistics-icon"/>-->
<img :src="icons.inDelivery" class="order-icon logistics-icon" />
<div class="logistics-text">
<div style="display:flex">
<span class="logistics-speak">{{ !trackData.orderStatusInfoVoList[0].statusMsg?'暂无数据':trackData.orderStatusInfoVoList[0].statusMsg }}</span>
<van-icon class="logistics-arrow" name="arrow"/>
<span class="logistics-speak">{{
!trackData.orderStatusInfoVoList[0].statusMsg
? '暂无数据'
: trackData.orderStatusInfoVoList[0].statusMsg
}}</span>
<van-icon class="logistics-arrow" name="arrow" />
</div>
<div class="logistics-time">
{{ trackData.orderStatusInfoVoList[0].opDate }}
</div>
<div class="logistics-time">{{ trackData.orderStatusInfoVoList[0].opDate }}</div>
</div>
</div>
<div class="location-content">
<!-- <van-icon :name="icons.location" class="order-icon location-icon"/>-->
<img :src="icons.location" class="order-icon location-icon"/>
<!-- <van-icon :name="icons.location" class="order-icon location-icon"/>-->
<img :src="icons.location" class="order-icon location-icon" />
<div class="location-text">
<div class="location-client">{{ detailData.clientName }}</div>
<div class="location-receive">{{ detailData.shippingAdress }}</div>
......@@ -85,24 +121,44 @@
<div class="goods-all" @click="openGoodsList()">
<span class="all-title">商品明细</span>
<span class="title-more">更多</span>
<!-- <van-icon class="title-arrow" :name="icons.nextArrow" size="15"/>-->
<img class="title-arrow" :src="icons.nextArrow" style="width:15px"/>
<!-- <van-icon class="title-arrow" :name="icons.nextArrow" size="15"/>-->
<img class="title-arrow" :src="icons.nextArrow" style="width:15px" />
</div>
<div class="order-common " style="padding-top: 0">
<goods-simple-item v-for="(item,index) in detailData.goodsInfos" :key="item.goodsId" :item="item"
:is-last="index === detailData.goodsInfos.length - 1"/>
<goods-simple-item
v-for="(item, index) in detailData.goodsInfos"
:key="item.goodsId"
:item="item"
:is-last="index === detailData.goodsInfos.length - 1"
/>
</div>
<!-- 订单发票信息 -->
<div>
<div class="goods-all" @click="openOrderInvoice()">
<span class="all-title">发票信息 ({{ invoiceData.total ? invoiceData.total : 0 }})</span>
<span class="title-more">更多</span>
<van-icon class="title-arrow" name="arrow"/>
<span class="all-title"
>发票信息 ({{ invoiceData.total ? invoiceData.total : 0 }})</span
>
<span class="title-more">更多</span>
<van-icon class="title-arrow" name="arrow" />
</div>
<div class="order-common" style="margin-bottom: 10px">
<invoice-simple-item v-for="(item, index) in invoiceData.invoiceList" :item="item" :key="item.invoiceNo"
:is-last="index === invoiceData.invoiceList.length - 1" @itemClick="openInvoice(item)"/>
<div class="empty-tips" v-if="!invoiceData || !invoiceData.invoiceList || invoiceData.invoiceList.length <= 0">暂无数据</div>
<invoice-simple-item
v-for="(item, index) in invoiceData.invoiceList"
:item="item"
:key="item.invoiceNo"
:is-last="index === invoiceData.invoiceList.length - 1"
@itemClick="openInvoice(item)"
/>
<div
class="empty-tips"
v-if="
!invoiceData ||
!invoiceData.invoiceList ||
invoiceData.invoiceList.length <= 0
"
>
暂无数据
</div>
</div>
</div>
</div>
......@@ -113,12 +169,21 @@ import OrderStateItem from '../components/orderStateItem'
import OrderState from '../components/orderState'
import GoodsSimpleItem from '../components/goodsSimpleItem'
import InvoiceSimpleItem from '../components/invoiceSimpleItem'
import {getMyOrderList, getTrackInfo, getOrderInvoiceList} from '@/api/myOrder'
import {bridge} from '@/utils'
import {
getMyOrderList,
getTrackInfo,
getOrderInvoiceList
} from '@/api/myOrder'
import { bridge } from '@/utils'
export default {
name: 'orderDetail',
components: {InvoiceSimpleItem, GoodsSimpleItem, OrderState, OrderStateItem},
components: {
InvoiceSimpleItem,
GoodsSimpleItem,
OrderState,
OrderStateItem
},
data() {
return {
orderItem: this.$route.query,
......@@ -130,10 +195,12 @@ export default {
jm: false
},
trackData: {
orderStatusInfoVoList: [{
statusMsg: '',
opDate: ''
}]
orderStatusInfoVoList: [
{
statusMsg: '',
opDate: ''
}
]
},
invoiceData: {},
icons: {
......@@ -254,142 +321,163 @@ export default {
/* 获取订单详情 */
getOrderDetail() {
let params = {
'businessType': '',
'clientID': [],
'endDate': '',
'goodsCode': '',
'goodsDesc': '',
'goodsId': '',
'goodsName': '',
'goodsSpec': '',
'isDelivered': '',
'isInvoice': '',
'isWeb': '',
'manufacturer': '',
'mdmClientCode': '',
'order': '',
'orderId': this.orderItem.orderId, // 19977352;19965720
'orderNo': '', // 225202103170165
'orderStatusCode': '',
'orderType': this.orderItem.orderType,
'pageNum': 1,
'pageSize': 20,
'shippingAdress': '',
'sort': '',
'sourceDb': this.orderItem.sourceDb,
'sourceOrderNo': '',
'sourceSystem': '',
'startDate': '',
'supplierId': []
businessType: '',
clientID: [],
endDate: '',
goodsCode: '',
goodsDesc: '',
goodsId: '',
goodsName: '',
goodsSpec: '',
isDelivered: '',
isInvoice: '',
isWeb: '',
manufacturer: '',
mdmClientCode: '',
order: '',
orderId: this.orderItem.orderId, // 19977352;19965720
orderNo: '', // 225202103170165
orderStatusCode: '',
orderType: this.orderItem.orderType,
pageNum: 1,
pageSize: 20,
shippingAdress: '',
sort: '',
sourceDb: this.orderItem.sourceDb,
sourceOrderNo: '',
sourceSystem: '',
startDate: '',
supplierId: []
}
getMyOrderList(params).then(res => {
if (res.code === 200 && res.data && res.data.code === '00000' &&
res.data.entity && res.data.entity.orderList && res.data.entity.orderList.length > 0) {
this.detailData = res.data.entity.orderList[0]
this.detailData.goodsInfos.forEach(item => {
let mode = item.storageMode
if (mode.indexOf('冷链') !== -1) {
// 插入到
this.storageModel.cold = true
}
if (mode.indexOf('非冷链') !== -1) {
// 插入到
this.storageModel.cold = false
getMyOrderList(params)
.then(res => {
if (
res.code === 200 &&
res.data &&
res.data.code === '00000' &&
res.data.entity &&
res.data.entity.orderList &&
res.data.entity.orderList.length > 0
) {
this.detailData = res.data.entity.orderList[0]
this.detailData.goodsInfos.forEach(item => {
let mode = item.storageMode
if (mode.indexOf('冷链') !== -1) {
// 插入到
this.storageModel.cold = true
}
if (mode.indexOf('非冷链') !== -1) {
// 插入到
this.storageModel.cold = false
}
if (mode.indexOf('退') !== -1) {
this.storageModel.rtn = true
}
if (mode.indexOf('') !== -1) {
this.storageModel.jm = true
}
})
// 最多显示3条数据
this.detailData.goodsInfos = this.detailData.goodsInfos.slice(0, 3)
// 刷新传参中的订单状态
this.orderItem.orderStatusCode = this.detailData.orderStatusCode
this.orderItem.isCold = this.storageModel.cold
} else {
console.log('订单详情', '请求失败')
if (res.code === 500) {
this.$toast(res.msg)
}
if (mode.indexOf('退') !== -1) {
this.storageModel.rtn = true
}
if (mode.indexOf('') !== -1) {
this.storageModel.jm = true
}
})
// 最多显示3条数据
this.detailData.goodsInfos = this.detailData.goodsInfos.slice(0, 3)
// 刷新传参中的订单状态
this.orderItem.orderStatusCode = this.detailData.orderStatusCode
this.orderItem.isCold = this.storageModel.cold
} else {
console.log('订单详情', '请求失败')
if (res.code === 500) {
this.$toast(res.msg)
}
}
}).catch(err => {
console.log('订单详情', err)
this.$toast('订单详情获取失败')
})
})
.catch(err => {
console.log('订单详情', err)
this.$toast('订单详情获取失败')
})
},
/* 物流追踪 */
getTrackInfoDetail() {
let data = {
'sourceDb': this.orderItem.sourceDb,
'supplierId': [this.orderItem.supplierId],
'clientID': [this.orderItem.clientId],
'orderId': '',
'orderNo': this.orderItem.orderNo,
'orderType': this.orderItem.orderType,
'supplierCode': [
this.orderItem.supplierCode
],
'clientCode': [this.orderItem.clientCode]
sourceDb: this.orderItem.sourceDb,
supplierId: [this.orderItem.supplierId],
clientID: [this.orderItem.clientId],
orderId: '',
orderNo: this.orderItem.orderNo,
orderType: this.orderItem.orderType,
supplierCode: [this.orderItem.supplierCode],
clientCode: [this.orderItem.clientCode]
}
getTrackInfo(data).then(res => {
if (res.code === 200 && res.data && res.data.code === '00000' &&
res.data.entity && res.data.entity.logisticsTrackingInfoList) {
this.trackData = res.data.entity.logisticsTrackingInfoList
this.calcOrderStep(this.trackData.currentOrderStatusCode)
} else {
if (res.code === 500) {
this.$toast(res.msg)
getTrackInfo(data)
.then(res => {
if (
res.code === 200 &&
res.data &&
res.data.code === '00000' &&
res.data.entity &&
res.data.entity.logisticsTrackingInfoList
) {
this.trackData = res.data.entity.logisticsTrackingInfoList
this.calcOrderStep(this.trackData.currentOrderStatusCode)
} else {
if (res.code === 500) {
this.$toast(res.msg)
}
}
}
}).catch(err => {
console.log('物流跟踪', err)
this.$toast('物流追踪信息获取失败')
})
})
.catch(err => {
console.log('物流跟踪', err)
this.$toast('物流追踪信息获取失败')
})
},
/* 获取发票列表 */
getInvoiceDetail() {
let params = {
'clientID': [],
'endDate': '',
'goodsCode': '',
'goodsDesc': '',
'goodsId': '',
'goodsName': '',
'goodsSpec': '',
'invoiceCode': '',
'invoiceDate': '',
'invoiceFullNo': '',
'invoiceNo': '',
'isTwoTicket': '',
'manufacturer': '',
'mdmClientCode': '',
'mdmGoodsCode': '',
'order': '',
'orderId': this.orderItem.orderId,
'orderNo': '', // this.orderItem.orderNo,
'pageNum': 1,
'pageSize': 3,
'sort': '',
'sourceDb': this.$route.query.sourceDb,
'startDate': '',
'supplierId': []
clientID: [],
endDate: '',
goodsCode: '',
goodsDesc: '',
goodsId: '',
goodsName: '',
goodsSpec: '',
invoiceCode: '',
invoiceDate: '',
invoiceFullNo: '',
invoiceNo: '',
isTwoTicket: '',
manufacturer: '',
mdmClientCode: '',
mdmGoodsCode: '',
order: '',
orderId: this.orderItem.orderId,
orderNo: '', // this.orderItem.orderNo,
pageNum: 1,
pageSize: 3,
sort: '',
sourceDb: this.$route.query.sourceDb,
startDate: '',
supplierId: []
}
getOrderInvoiceList(params).then(res => {
if (res.code === 200 && res.data && res.data.code === '00000' &&
res.data.entity && res.data.entity.invoiceList && res.data.entity.invoiceList.length > 0) {
this.invoiceData = res.data.entity
} else {
console.log('发票明细', '请求失败')
if (res.code === 500) {
this.$toast(res.msg)
getOrderInvoiceList(params)
.then(res => {
if (
res.code === 200 &&
res.data &&
res.data.code === '00000' &&
res.data.entity &&
res.data.entity.invoiceList &&
res.data.entity.invoiceList.length > 0
) {
this.invoiceData = res.data.entity
} else {
console.log('发票明细', '请求失败')
if (res.code === 500) {
this.$toast(res.msg)
}
}
}
}).catch(err => {
console.log('发票明细', err)
this.$toast('发票明细获取失败')
})
})
.catch(err => {
console.log('发票明细', err)
this.$toast('发票明细获取失败')
})
}
}
}
......@@ -462,7 +550,7 @@ export default {
height: 15px;
text-align: center;
line-height: 15px;
margin-top:-3px;
margin-top: -3px;
.order-copy-text {
transform: scale(0.85);
......@@ -494,7 +582,7 @@ export default {
.arrival-time {
background-color: #fdead0;
color: #B8741A;
color: #b8741a;
font-size: 12px;
padding: 6px 10px;
text-align: center;
......@@ -532,7 +620,7 @@ export default {
margin-right: 20px;
font-weight: bold;
font-size: 12px;
flex: 1
flex: 1;
}
/*箭头*/
......@@ -591,7 +679,7 @@ export default {
}
.title-more {
color: $txtGray9
color: $txtGray9;
}
.title-arrow {
......@@ -624,7 +712,6 @@ export default {
margin-left: 6px;
}
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment