Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
上
上药订单生命周期升级
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sph
上药订单生命周期升级
Commits
50cc2b17
Commit
50cc2b17
authored
Sep 10, 2021
by
xiejb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.jiucaiyun.cn/sph/SH_OrderLifeCycleU
parents
39d6d7c3
c6e83854
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
516 additions
and
322 deletions
+516
-322
.gitignore
.gitignore
+2
-0
config/dev.env.js
config/dev.env.js
+8
-8
src/views/myOrder/detail/logisticsDetail.vue
src/views/myOrder/detail/logisticsDetail.vue
+252
-147
src/views/myOrder/detail/orderDetail.vue
src/views/myOrder/detail/orderDetail.vue
+254
-167
No files found.
.gitignore
View file @
50cc2b17
...
...
@@ -9,8 +9,10 @@ yarn-error.log*
# Editor directories and files
.idea
.prettierrc
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
config/dev.env.js
View file @
50cc2b17
...
...
@@ -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"'
})
src/views/myOrder/detail/logisticsDetail.vue
View file @
50cc2b17
<
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>
...
...
@@ -27,59 +48,104 @@
<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"
>
<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
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
"
>
<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>
<span
class=
"logistic-values"
>
{{
shippingInfo
.
estimatedArrivalTime
}}
</span>
</div>
</span>
<span
class=
"logistic-type"
>
{{
shippingInfo
.
roadType
===
'
D
'
?
'
市内
'
:
'
市外
'
}}
</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"
<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"
/>
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,29 +220,51 @@ 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
'
:
''
}
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
)
{
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
.
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
)
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
'
// 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
{
...
...
@@ -186,7 +273,8 @@ export default {
}
}
this
.
shoppingLoading
=
false
}).
catch
(
err
=>
{
})
.
catch
(
err
=>
{
console
.
log
(
'
运单信息
'
,
err
)
this
.
$toast
(
'
运单信息获取失败
'
)
})
...
...
@@ -194,20 +282,24 @@ export default {
/* 物流追踪 */
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
]
}
getTrackInfo
(
data
).
then
(
res
=>
{
if
(
res
.
code
===
200
&&
res
.
data
&&
res
.
data
.
code
===
'
00000
'
&&
res
.
data
.
entity
&&
res
.
data
.
entity
.
logisticsTrackingInfoList
)
{
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
)
=>
{
...
...
@@ -217,7 +309,8 @@ export default {
type
:
item
.
orderStatus
,
typeCode
:
item
.
orderStatusCode
,
text
:
item
.
statusMsg
,
showLine
:
index
!==
(
this
.
stepInfo
.
orderStatusInfoVoList
.
length
-
1
)
showLine
:
index
!==
this
.
stepInfo
.
orderStatusInfoVoList
.
length
-
1
})
})
this
.
stepList
=
tempStep
...
...
@@ -226,7 +319,8 @@ export default {
this
.
$toast
(
res
.
msg
)
}
}
}).
catch
(
err
=>
{
})
.
catch
(
err
=>
{
console
.
log
(
'
物流跟踪
'
,
err
)
this
.
$toast
(
'
物流跟踪信息获取失败
'
)
})
...
...
@@ -235,11 +329,11 @@ export default {
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,10 +342,16 @@ 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
)
{
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
)
...
...
@@ -260,7 +360,8 @@ export default {
this
.
mapDataLoadingText
=
'
定位数据请求失败或无数据
'
}
this
.
gpsLoading
=
false
}).
catch
(
err
=>
{
})
.
catch
(
err
=>
{
console
.
log
(
'
GPS信息
'
,
err
)
this
.
mapDataLoadingText
=
'
定位数据请求失败
'
this
.
$toast
(
'
定位数据请求失败
'
)
...
...
@@ -270,19 +371,23 @@ export default {
/* 获取温度变化趋势数据 */
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
{
...
...
src/views/myOrder/detail/orderDetail.vue
View file @
50cc2b17
<
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=
"all-title"
>
发票信息 (
{{
invoiceData
.
total
?
invoiceData
.
total
:
0
}}
)
</span
>
<span
class=
"title-more"
>
更多
</span>
<van-icon
class=
"title-arrow"
name=
"arrow"
/>
<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
:
[{
orderStatusInfoVoList
:
[
{
statusMsg
:
''
,
opDate
:
''
}]
}
]
},
invoiceData
:
{},
icons
:
{
...
...
@@ -254,37 +321,44 @@ 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
'
:
[]
}
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
)
{
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
...
...
@@ -314,7 +388,8 @@ export default {
this
.
$toast
(
res
.
msg
)
}
}
}).
catch
(
err
=>
{
})
.
catch
(
err
=>
{
console
.
log
(
'
订单详情
'
,
err
)
this
.
$toast
(
'
订单详情获取失败
'
)
})
...
...
@@ -322,20 +397,24 @@ export default {
/* 物流追踪 */
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
]
}
getTrackInfo
(
data
).
then
(
res
=>
{
if
(
res
.
code
===
200
&&
res
.
data
&&
res
.
data
.
code
===
'
00000
'
&&
res
.
data
.
entity
&&
res
.
data
.
entity
.
logisticsTrackingInfoList
)
{
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
{
...
...
@@ -343,7 +422,8 @@ export default {
this
.
$toast
(
res
.
msg
)
}
}
}).
catch
(
err
=>
{
})
.
catch
(
err
=>
{
console
.
log
(
'
物流跟踪
'
,
err
)
this
.
$toast
(
'
物流追踪信息获取失败
'
)
})
...
...
@@ -351,34 +431,41 @@ export default {
/* 获取发票列表 */
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
'
:
[]
}
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
)
{
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
(
'
发票明细
'
,
'
请求失败
'
)
...
...
@@ -386,7 +473,8 @@ export default {
this
.
$toast
(
res
.
msg
)
}
}
}).
catch
(
err
=>
{
})
.
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
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment