Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biz-trina5-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
贺双
biz-trina5-app
Commits
8e475743
Commit
8e475743
authored
May 08, 2025
by
贺世双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增订单界面
parent
f47e6d5d
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
400 additions
and
123 deletions
+400
-123
apiList.js
api/apiList.js
+26
-8
orderItem.vue
components/orderItem/orderItem.vue
+41
-19
loginBehavior.js
mixins/loginBehavior.js
+2
-2
pages.json
pages.json
+22
-9
login.vue
pages/login/login.vue
+44
-10
order.vue
pages/order/order.vue
+55
-9
order_pod.vue
pages/order_pod/order_pod.vue
+73
-0
receivebill-active.png
static/img/tabbar/receivebill-active.png
+0
-0
receivebill.png
static/img/tabbar/receivebill.png
+0
-0
orderDetail.vue
subpkg/orderDetail/orderDetail.vue
+137
-66
No files found.
api/apiList.js
View file @
8e475743
...
...
@@ -3,12 +3,19 @@ import uploadFile from "./uploadFile";
import
downloadFile
from
"./downloadFile"
;
// 登录接口
// mimi: 项目名:biz-carrier-wxapp LOGIN_ACTION: loginByUserInfo
// mimi: 项目名:biz-carrier-wxapp LOGIN_ACTION: loginByUserInfo
; miniAppDriverLogin/miniAppServLogin
export
function
userLogin
(
loginAction
,
loginCode
,
data
)
{
return
Request
(
`/api/auth/app-login/{mini}/miniAppDriverLogin?weixin_config_key={mini}&code=
${
loginCode
}
`
,
data
);
}
export
function
userCarrierLogin
(
loginAction
,
loginCode
,
data
)
{
return
Request
(
`/api/auth/app-login/{mini}/miniAppServLogin?weixin_config_key={mini}&code=
${
loginCode
}
`
,
data
);
}
//登录小程序初始化时,调用auth自动登录
export
function
authLogin
(
loginAction
,
loginCode
,
data
)
{
return
Request
(
...
...
@@ -41,6 +48,23 @@ export function downloadImg(data) {
return
downloadFile
(
"/api/doc/download"
,
data
);
}
//获取基础订单信息--订舱委托
export
function
getOrderBaseList
(
data
)
{
return
Request
(
`/api/entry/{mini}/m-action/getBookingOrder`
,
data
);
}
// 查询订舱委托订单明细
export
function
getOrderBaseDetail
(
data
)
{
return
Request
(
`/api/entry/{mini}/m-action/getBookingOrderLine`
,
data
);
}
// 查询订舱委托订单所有节点信息
export
function
getOrderBaseEvent
(
data
)
{
return
Request
(
`/api/entry/{mini}/m-action/getBookingOrderBlEvent`
,
data
);
}
//查询运单列表
export
function
findShipmentOrders
(
data
)
{
return
Request
(
...
...
@@ -223,13 +247,7 @@ export function UpdateTruckInfo(data) {
);
}
//获取大宗订单
export
function
getMassOrderList
(
data
)
{
return
Request
(
`/api/entry/{mini}/m-action/biz.tm.MassOrderCarrier.tm_massordercarrier_m_search.paging`
,
data
);
}
//获取大宗订单已分配车辆
export
function
getMassOrderTruckList
(
data
)
{
...
...
components/orderItem/orderItem.vue
View file @
8e475743
...
...
@@ -2,31 +2,43 @@
<view
class=
"shipmentItem box_shadow_card"
>
<view
class=
"shipment-header flex_sb"
style=
"padding: 28rpx 24rpx 0;"
>
<view
class=
"consumer_code flex_center"
>
<text
selectable
>
订单号:
{{
propData
[
'massOrder.orderNo'
]
||
''
}}
</text>
</view>
<view
class=
"consumer_code flex_center"
>
<text
selectable
>
剩余货量:
{{
propData
[
'massOrder.splitMode'
]
===
'Weight'
?
propData
.
weight
:
propData
.
qty
||
'0'
}}{{
[
'massOrder.splitMode'
]
===
'Weight'
?
"kg"
:
'件'
}}
</text>
<text
selectable
>
基础订单号:
{{
propData
[
'order_base_no'
]
||
''
}}
</text>
</view>
</view>
<u-line
color=
"#E5E5E5"
margin=
"20rpx 0"
/>
<view
style=
"padding: 0 24rpx 32rpx;"
>
<view
class=
"stations"
>
<view
class=
"start-station flex_center"
>
<view
class=
"t-icon-start-sddress t-icon"
style=
"margin-right: 8rpx;"
></view>
{{
propData
[
'massOrder.originalAddress.name'
]
||
''
}}
<view
style=
"padding: 0 24rpx 32rpx;"
@
click=
"toOrderDetail"
>
<view
class=
" flex_sb"
>
<view
style=
"width: 50%;float: left;"
>
<bs-customCell
label=
"起运港 :"
:value=
"propData.port_of_source_location_name"
labelCol=
"4"
wrapCol=
"6"
/>
</view>
<view
style=
"width: 50%;float: left;"
>
<bs-customCell
label=
"目的港 :"
:value=
"propData.port_of_dest_location_name"
labelCol=
"4"
wrapCol=
"6"
/>
</view>
</view>
<view
class=
" flex_sb"
>
<view
style=
"width: 50%;float: left;"
>
<bs-customCell
label=
"订单状态 :"
:value=
"propData.status_label"
labelCol=
"5"
wrapCol=
"6"
/>
</view>
<view
style=
"width: 50%;float: left;"
>
<bs-customCell
label=
"订舱状态 :"
:value=
"propData.booking_status_label"
labelCol=
"5"
wrapCol=
"6"
/>
</view>
</view>
<view
class=
"end-station flex_center
"
>
<view
class=
"t-icon-end-sddress t-icon"
style=
"margin-right: 8rpx;"
></view
>
{{
propData
[
'massOrder.destinationAddress.name'
]
||
''
}}
<view
class=
" flex_sb
"
>
<view
style=
"width: 50%;float: left;"
>
<bs-customCell
label=
"要求ETD :"
:value=
"requireEtd"
labelCol=
"5"
wrapCol=
"6"
/>
</view>
<view
style=
"width: 50%;float: left;"
>
<bs-customCell
label=
"要求ETA :"
:value=
"requireEta"
labelCol=
"5"
wrapCol=
"6"
/>
</view>
<bs-customCell
label=
"接单日期 :"
:value=
"orderDate"
labelCol=
"3"
wrapCol=
"6"
/>
</view>
<bs-customCell
label=
"承运商 :"
:value=
"propData.carrier"
labelCol=
"2"
wrapCol=
"6"
/>
</view>
<view
class=
"flex_cen flex_center orderItemButtonGroup"
>
<button
class=
"flex_cen flex_center"
@
click=
"onAllotCar('unMulti')"
>
分配车辆
</button>
<button
class=
"flex_cen flex_center"
@
click=
"onAllotCar('multi')"
>
分配多辆车
</button>
<button
class=
"flex_cen flex_center"
style=
"margin-top: 24rpx;"
@
click=
"onAllotCar('record')"
>
分配记录
</button>
<button
class=
"flex_cen flex_center"
@
click=
"onAllotCar('unMulti')"
>
订舱确认
</button>
<button
class=
"flex_cen flex_center"
@
click=
"onAllotCar('multi')"
>
提单上传
</button>
<button
class=
"flex_cen flex_center"
style=
"margin-top: 24rpx;"
@
click=
"onAllotCar('record')"
>
修改船期
</button>
<button
class=
"flex_cen flex_center"
@
click=
"onAllotCar('multi')"
>
异常上报
</button>
</view>
</view>
</
template
>
...
...
@@ -43,6 +55,13 @@
},
},
methods
:
{
//点击数据跳转详情界面
toOrderDetail
(){
getApp
().
globalData
.
orderDetail
=
this
.
propData
uni
.
navigateTo
({
url
:
`/subpkg/orderDetail/orderDetail`
,
})
},
onAllotCar
(
allotType
)
{
const
orderNo
=
this
.
propData
[
'massOrder.orderNo'
]
const
orderId
=
this
.
propData
[
'id'
]
...
...
@@ -52,8 +71,11 @@
},
},
computed
:
{
orderDate
()
{
return
formatGMT
(
this
.
propData
[
'massOrder.orderDate'
],
'D'
)
||
''
requireEtd
()
{
return
formatGMT
(
this
.
propData
[
'require_etd'
],
'D'
)
||
''
},
requireEta
()
{
return
formatGMT
(
this
.
propData
[
'require_eta'
],
'D'
)
||
''
}
}
}
...
...
mixins/loginBehavior.js
View file @
8e475743
...
...
@@ -7,7 +7,7 @@ module.exports = {
getWxToken
()
{
uni
.
login
({
success
:
(
res
)
=>
{
this
.
login
(
res
.
code
);
//
this.login(res.code);
},
});
},
...
...
@@ -92,7 +92,7 @@ module.exports = {
});
//可跳转至任意页面
}
else
{
uni
.
switchTab
({
url
:
"/pages/
index/index
"
,
url
:
"/pages/
order/order
"
,
});
}
// #ifdef MP
...
...
pages.json
View file @
8e475743
...
...
@@ -13,6 +13,12 @@
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
},
{
"path"
:
"pages/order/order"
,
"style"
:
{
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/index/index"
,
"style"
:
{
...
...
@@ -25,8 +31,8 @@
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
},
{
"path"
:
"pages/order
/order
"
,
},{
"path"
:
"pages/order
_pod/order_pod
"
,
"style"
:
{
"enablePullDownRefresh"
:
false
}
...
...
@@ -163,16 +169,23 @@
"color"
:
"#999999"
,
"selectedColor"
:
"#2E75E6"
,
"backgroundColor"
:
"#fff"
,
"list"
:
[{
"pagePath"
:
"pages/index/index"
,
"text"
:
"运单"
,
"iconPath"
:
"static/img/tabbar/shipment.png"
,
"selectedIconPath"
:
"static/img/tabbar/shipment-active.png"
},
{
"list"
:
[
{
"pagePath"
:
"pages/order/order"
,
"text"
:
"订单"
,
"iconPath"
:
"static/img/tabbar/order.png"
,
"selectedIconPath"
:
"static/img/tabbar/order-active.png"
},{
"pagePath"
:
"pages/index/index"
,
"text"
:
"运单"
,
"iconPath"
:
"static/img/tabbar/shipment.png"
,
"selectedIconPath"
:
"static/img/tabbar/shipment-active.png"
},
{
"pagePath"
:
"pages/order_pod/order_pod"
,
"text"
:
"回单"
,
"iconPath"
:
"static/img/tabbar/receivebill.png"
,
"selectedIconPath"
:
"static/img/tabbar/receivebill-active.png"
},
{
"pagePath"
:
"pages/user/user"
,
...
...
pages/login/login.vue
View file @
8e475743
...
...
@@ -41,7 +41,7 @@
<
script
>
import
{
MINI
,
ENV_MODEL
,
TokenPrefix
}
from
'../../publicConfig/config.js'
import
{
userLogin
,
SendMessage
}
from
'../../api/apiList.js'
import
{
userLogin
,
userCarrierLogin
,
SendMessage
}
from
'../../api/apiList.js'
const
loginBehavior
=
require
(
'../../mixins/loginBehavior.js'
)
export
default
{
...
...
@@ -153,7 +153,7 @@
submitForm
()
{
const
{
userName
,
password
,
phone
,
telPassword
}
=
this
.
formData
if
(
!
this
.
onSubmitBeforeRule
(
userName
,
password
,
phone
,
telPassword
))
return
//规则校验
let
{
projectMini
}
=
getApp
().
globalData
let
{
projectMini
}
=
getApp
().
globalData
;
let
loginAction
=
'loginByUserInfo'
let
reqData
=
{
entryName
:
projectMini
}
if
(
this
.
isVerifLogin
)
{
...
...
@@ -161,7 +161,7 @@
loginAction
=
'loginByCustomAuth'
}
else
{
const
encryptedPassword
=
this
.
encryptedText
(
password
)
reqData
=
{...
reqData
,
userName
,
password
:
encryptedPassword
}
reqData
=
{...
reqData
,
params
:
{
userName
,
password
}
}
}
//#ifdef MP
...
...
@@ -181,6 +181,38 @@
reqData
.
code
=
res
.
code
let
pagePath
=
getApp
().
globalData
.
backPagePath
//获取回退页面
uni
.
setStorageSync
(
`
${
TokenPrefix
}
_XSRFToken`
,
''
)
//清除 XSRFToken
if
(
!
this
.
isVerifLogin
){
userCarrierLogin
(
loginAction
,
res
.
code
,
reqData
).
then
(
res
=>
{
let
token
=
res
.
data
.
renewedToken
if
(
res
.
header
[
'Set-Cookie'
])
{
const
XSRFToken
=
res
.
header
[
'Set-Cookie'
].
split
(
';'
)[
0
].
split
(
'='
)[
1
]
uni
.
setStorageSync
(
`
${
TokenPrefix
}
_XSRFToken`
,
XSRFToken
);
}
uni
.
setStorageSync
(
`
${
TokenPrefix
}
_token`
,
token
);
uni
.
setStorageSync
(
'cookies'
,
res
.
cookies
)
if
(
pagePath
)
{
uni
.
reLaunch
({
url
:
pagePath
})
//可跳转至任意页面
}
else
{
uni
.
showToast
({
title
:
'登录成功!'
,
duration
:
1000
})
setTimeout
(()
=>
{
uni
.
switchTab
({
url
:
"/pages/order/order"
,
})
},
1500
)
}
}).
catch
(
err
=>
{
uni
.
showToast
({
title
:
err
.
message
||
err
,
icon
:
'none'
,
duration
:
3000
})
})
}
else
{
userLogin
(
loginAction
,
res
.
code
,
reqData
).
then
(
res
=>
{
let
token
=
res
.
data
.
renewedToken
...
...
@@ -201,7 +233,7 @@
})
setTimeout
(()
=>
{
uni
.
switchTab
({
url
:
"/pages/
index/index
"
,
url
:
"/pages/
order/order
"
,
})
},
1500
)
}
...
...
@@ -212,6 +244,8 @@
duration
:
3000
})
})
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
...
...
@@ -245,7 +279,7 @@
})
setTimeout
(()
=>
{
uni
.
switchTab
({
url
:
"/pages/
index/index
"
,
url
:
"/pages/
order/order
"
,
})
},
1500
)
}
...
...
pages/order/order.vue
View file @
8e475743
<
template
>
<view
class=
"orderList content_box"
>
<view
class=
"search-input flex_center"
>
<u-search
searchIconSize=
"50"
searchIconColor=
"#FFFFFF"
placeholderColor=
'#FFFFFF'
color=
"#FFFFFF"
:showAction=
"false"
:placeholder=
"'请输入订单号'"
v-model=
"searchValue"
@
clickIcon=
"onSearch"
@
search=
"onSearch"
@
clear=
"onSearch"
/>
</view>
<view
class=
"select-options"
>
<orderItem
v-for=
"( order, index ) in orderList"
:propData=
"order"
:key=
"index"
/>
</view>
<!-- 空状态 -->
<view
class=
"emptyImg flex_col"
v-if=
"!orderList.length"
>
<image
mode=
"aspectFit"
src=
"../../static/img/empty/shipmentEmpty.png"
/>
...
...
@@ -10,7 +17,8 @@
</
template
>
<
script
>
import
{
getMassOrderList
}
from
'../../api/apiList.js'
import
{
getOrderBaseList
,}
from
'../../api/apiList.js'
import
{
formatGMT
}
from
'../../utils/util'
export
default
{
data
()
{
return
{
...
...
@@ -18,6 +26,7 @@
pageSize
:
10
,
//每页条数
orderList
:
[],
loadMore
:
true
,
//加载更多
searchValue
:
""
,
//搜索值
};
},
onLoad
()
{
...
...
@@ -39,25 +48,62 @@
methods
:{
initData
(){
const
{
pageNum
,
pageSize
}
=
this
let
d
ata
=
{
let
reqD
ata
=
{
"args"
:
{
pageNum
,
pageSize
}
}
getMassOrderList
(
data
).
then
(
res
=>
{
if
(
this
.
searchValue
){
reqData
.
args
.
restrictions
=
[{
"field"
:
'order_base_no'
,
"type"
:
"like"
,
//EQ精准匹配,LK模糊匹配
"value"
:
this
.
searchValue
}]
}
getOrderBaseList
(
reqData
).
then
(
res
=>
{
uni
.
stopPullDownRefresh
()
const
data
=
res
.
data
.
data
.
datas
if
(
data
.
length
>
0
)
{
this
.
orderList
=
this
.
orderList
.
concat
(
data
)
this
.
orderList
=
this
.
orderList
.
concat
(
data
)
;
this
.
pageNum
+=
1
this
.
loadMore
=
true
}
})
}
},
// 搜索功能
onSearch
()
{
this
.
pageNum
=
1
this
.
orderList
=
[]
this
.
initData
()
},
}
}
</
script
>
<
style
lang=
"scss"
>
.orderList
{
.search-input
{
width
:
100%
;
position
:
fixed
;
top
:
0
;
z-index
:
999
;
height
:
100rpx
;
background
:
linear-gradient
(
to
bottom
,
#005BB5
0%
,
#005BB5
50%
);
/
deep
/
.u-search__content
{
height
:
80rpx
;
margin
:
24rpx
;
background-color
:
rgba
(
240
,
240
,
240
,
.5
)
!
important
;
.u-search__content__input
{
width
:
50rpx
;
background-color
:
transparent
!
important
;
}
}
}
/
deep
/
.select-options
{
margin-top
:
50px
}
.emptyImg
{
position
:
absolute
;
left
:
50%
;
...
...
pages/order_pod/order_pod.vue
0 → 100644
View file @
8e475743
<
template
>
<view
class=
"orderList content_box"
>
<orderItem
v-for=
"( order, index ) in orderList"
:propData=
"order"
:key=
"index"
/>
<!-- 空状态 -->
<view
class=
"emptyImg flex_col"
v-if=
"!orderList.length"
>
<image
mode=
"aspectFit"
src=
"../../static/img/empty/shipmentEmpty.png"
/>
<text
class=
"empty-text"
>
暂时没有订单
</text>
</view>
</view>
</
template
>
<
script
>
import
{
getOrderBaseList
}
from
'../../api/apiList.js'
export
default
{
data
()
{
return
{
pageNum
:
1
,
//页码
pageSize
:
10
,
//每页条数
orderList
:
[],
loadMore
:
true
,
//加载更多
};
},
onLoad
()
{
this
.
initData
()
},
//下拉刷新
onPullDownRefresh
()
{
this
.
pageNum
=
1
this
.
orderList
=
[]
this
.
initData
()
},
// 触底加载更多
onReachBottom
()
{
if
(
this
.
loadMore
)
{
this
.
initData
()
this
.
loadMore
=
false
}
},
methods
:{
initData
(){
const
{
pageNum
,
pageSize
}
=
this
let
data
=
{
"args"
:
{
pageNum
,
pageSize
}
}
getOrderBaseList
(
data
).
then
(
res
=>
{
uni
.
stopPullDownRefresh
()
const
data
=
res
.
list
if
(
data
.
length
>
0
)
{
this
.
orderList
=
this
.
orderList
.
concat
(
data
)
this
.
pageNum
+=
1
this
.
loadMore
=
true
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
>
.orderList
{
.emptyImg
{
position
:
absolute
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
.empty-text
{
font-size
:
28rpx
;
text-align
:
center
;
}
}
}
</
style
>
static/img/tabbar/receivebill-active.png
0 → 100644
View file @
8e475743
986 Bytes
static/img/tabbar/receivebill.png
0 → 100644
View file @
8e475743
470 Bytes
subpkg/orderDetail/orderDetail.vue
View file @
8e475743
<
template
>
<view
class=
"orderDetail-list content_box"
>
<u-empty
mode=
"data"
textSize=
'32'
iconSize=
"160"
text=
"暂无订单详细数据"
v-if=
"isEmpty"
/>
<!--
<u-empty
mode=
"data"
textSize=
'32'
iconSize=
"160"
text=
"暂无订单详细数据"
v-if=
"isEmpty"
/>
-->
<!-- 基本信息 -->
<view
class=
"module-title flex"
>
<!--
<view
class=
"vertical-separate"
/>
-->
<text
class=
"font_bolder"
>
基本信息
</text>
</view>
<view
class=
"orderDetail-item"
>
<view
class=
"detail-title flex_center"
>
<view
class=
"t-icon t-icon-order"
/>
订单号:
{{
orderList
.
orderNo
}}
</view>
<!-- 订单明细" -->
<view
style=
"height: 80rpx;padding-left: 4rpx;"
>
<bs-customCell
label=
"货量"
:value=
"`$
{orderList.qty}件/${orderList.weight}千克/${orderList.volume}方`"
labelCol="3" wrapCol="7" />
<bs-customCell
label=
"运输要求"
:value=
"orderList.transportRequest"
labelCol=
"3"
wrapCol=
"9"
/>
</view>
<u-line
color=
"#E5E5E5"
margin=
"40rpx 2% 20rpx"
/>
<view
style=
"height: 200rpx;padding-left: 4rpx;"
>
<bs-customCell
label=
"发货地址"
:value=
"orderList['originalAddress.name']"
labelCol=
"3"
wrapCol=
"9"
/>
<bs-customCell
label=
"发货人"
:value=
"orderList['originalContact.name']"
labelCol=
"3"
wrapCol=
"9"
/>
<bs-customCell
label=
"联系方式"
:value=
"orderList['originalContact.tel']"
labelCol=
"3"
wrapCol=
"9"
/>
<!--
<bs-customCell
label=
"发货人备注:"
:value=
"orderList['originalContact.remark']"
labelCol=
"3"
/>
-->
<bs-customCell
label=
"提货要求"
:value=
"orderList['originalRequirement']"
labelCol=
"3"
wrapCol=
"9"
/>
</view>
<u-line
color=
"#E5E5E5"
margin=
"40rpx 2% 20rpx"
/>
<view
style=
"padding-left: 4rpx;"
>
<bs-customCell
label=
"收货地址"
:value=
"orderList['destinationAddress.name']"
labelCol=
"3"
wrapCol=
"9"
/>
<bs-customCell
label=
"收货人"
:value=
"orderList['destinationContact.name']"
labelCol=
"3"
wrapCol=
"9"
/>
<bs-customCell
label=
"联系方式"
:value=
"orderList['destinationContact.tel']"
labelCol=
"3"
wrapCol=
"9"
/>
<!--
<bs-customCell
label=
"卸货人备注:"
value=
"orderList['destinationContact.remark']"
labelCol=
"3"
/>
-->
<bs-customCell
label=
"配送要求"
:value=
"orderList['destinationRequirement']"
labelCol=
"3"
wrapCol=
"9"
/>
<bs-customCell
label=
"基础订单号 :"
:value=
"orderList.order_base_no"
labelCol=
"3"
wrapCol=
"6"
/>
<view
class=
" flex_sb"
>
<view
style=
"width: 55%;float: left;"
>
<bs-customCell
label=
"状态 :"
:value=
"orderList.status_label"
labelCol=
"3"
wrapCol=
"6"
/>
</view>
<view
style=
"width: 45%;float: left;"
>
<bs-customCell
label=
"订单类型 :"
:value=
"orderList.order_type_label"
labelCol=
"5.5"
wrapCol=
"6"
/>
</view>
</view>
<view
class=
" flex_sb"
>
<view
style=
"width: 55%;float: left;"
>
<bs-customCell
label=
"销售类型 :"
:value=
"orderList.channel"
labelCol=
"4.5"
wrapCol=
"6"
/>
</view>
<view
style=
"width: 45%;float: left;"
>
<bs-customCell
label=
"Region :"
:value=
"orderList.region"
labelCol=
"4.5"
wrapCol=
"6"
/>
</view>
</view>
<view
class=
" flex_sb"
>
<view
style=
"width: 55%;float: left;"
>
<bs-customCell
label=
"贸易条款 :"
:value=
"orderList.inco_term"
labelCol=
"4.5"
wrapCol=
"6"
/>
</view>
<view
style=
"width: 45%;float: left;"
>
<bs-customCell
label=
"承运商 :"
:value=
"orderList.carrier"
labelCol=
"4.5"
wrapCol=
"6"
/>
</view>
</view>
<view
class=
" flex_sb"
>
<view
style=
"width: 55%;float: left;"
>
<bs-customCell
label=
"总功率 :"
:value=
"orderList.power"
labelCol=
"4"
wrapCol=
"6"
/>
</view>
<view
style=
"width: 45%;float: left;"
>
<bs-customCell
label=
"总片数 :"
:value=
"orderList.qty"
labelCol=
"4.5"
wrapCol=
"6"
/>
</view>
</view>
<view
class=
" flex_sb"
>
<view
style=
"width: 55%;float: left;"
>
<bs-customCell
label=
"订舱状态 :"
:value=
"orderList.booking_status_label"
labelCol=
"4.5"
wrapCol=
"6"
/>
</view>
<view
style=
"width: 45%;float: left;"
>
<bs-customCell
label=
"船公司 :"
:value=
"orderList.shipowner"
labelCol=
"4.5"
wrapCol=
"6"
/>
</view>
</view>
<!-- 货物明细 -->
<uni-collapse
v-model=
"activeNames"
@
change=
"onChange"
>
<view
class=
"outer-frame"
>
...
...
@@ -35,7 +57,7 @@
<!-- 自定义标题栏 -->
<template
v-slot:title
>
<view
class=
"foldPanel-title flex_center"
>
<text
style=
"flex-grow: 1"
>
货物
详情
</text>
<text
style=
"flex-grow: 1"
>
货物
明细
</text>
<!-- 自定义标题栏右侧图标 -->
<view
:class=
"['foldPanel-right-icon', 't-icon', activeNames.includes(orderList.id) ? 't-icon-unfold-blue' :'t-icon-fold-blue']"
/>
</view>
...
...
@@ -44,30 +66,78 @@
<view
class=
"cargo-detail-table"
>
<view
class=
"detail-row-title"
>
<u-row>
<u-col
textAlign=
"center"
span=
"4"
>
名称
</u-col>
<u-col
textAlign=
"end"
span=
"7"
>
数量
</u-col>
<u-col
textAlign=
"center"
span=
"2.5"
>
库区
</u-col>
<u-col
textAlign=
"center"
span=
"2.5"
>
产品
</u-col>
<u-col
textAlign=
"center"
span=
"2"
>
功率
</u-col>
<u-col
textAlign=
"center"
span=
"2.5"
>
柜号
</u-col>
<u-col
textAlign=
"center"
span=
"2"
>
数量
</u-col>
</u-row>
</view>
<u-empty
mode=
"data"
textSize=
'32'
iconSize=
"160"
text=
"暂无货物明细"
v-if=
"!cargoDetails.length"
/>
<view
class=
"detail-col-item"
v-for=
"itm in cargoDetails"
:key=
"itm.id"
>
<u-row>
<u-col
span=
"7"
class=
"cargo-title"
>
<view
class=
"cargo-title"
>
{{itm['goods.name']}}
</view>
<u-col
span=
"2.5"
class=
"cargo-title"
textAlign=
"center"
>
<view
class=
"cargo-title"
>
{{itm.reservoir_area}}
</view>
</u-col>
<u-col
span=
"2.5"
textAlign=
"center"
>
{{itm.product_name}}
</u-col>
<u-col
span=
"2"
textAlign=
"center"
>
{{itm.power}}
</u-col>
<u-col
span=
"2.5"
textAlign=
"center"
>
{{itm.lot_no}}
</u-col>
<u-col
span=
"2"
textAlign=
"center"
>
{{itm.qty}}
</u-col>
</u-row>
</view>
</view>
</uni-collapse-item>
</view>
</uni-collapse>
<!-- 节点状态 -->
<uni-collapse
v-model=
"activeNames"
@
change=
"onChange"
>
<view
class=
"outer-frame"
>
<uni-collapse-item
:show-arrow=
"false"
title-border=
"none"
:name=
"orderList.id"
>
<!-- 自定义标题栏 -->
<
template
v-slot:title
>
<view
class=
"foldPanel-title flex_center"
>
<text
style=
"flex-grow: 1"
>
节点状态
</text>
<!-- 自定义标题栏右侧图标 -->
<view
:class=
"['foldPanel-right-icon', 't-icon', activeNames.includes(orderList.id) ? 't-icon-unfold-blue' :'t-icon-fold-blue']"
/>
</view>
</
template
>
<!-- 节点状态 -->
<view
class=
"cargo-detail-table"
>
<view
class=
"detail-row-title"
>
<u-row>
<u-col
textAlign=
"center"
span=
"3"
>
当前节点
</u-col>
<u-col
textAlign=
"center"
span=
"3"
>
起运港
</u-col>
<u-col
textAlign=
"center"
span=
"3"
>
目的港
</u-col>
<u-col
textAlign=
"center"
span=
"3"
>
船公司
</u-col>
</u-row>
</view>
<u-empty
mode=
"data"
textSize=
'32'
iconSize=
"160"
text=
"暂无货物明细"
v-if=
"!cargoEvents.length"
/>
<view
class=
"detail-col-item"
v-for=
"itm in cargoEvents"
:key=
"itm.id"
>
<u-row>
<u-col
span=
"3"
class=
"cargo-title"
textAlign=
"center"
>
<view
class=
"cargo-title"
>
{{itm.bl_event_code_label}}
</view>
</u-col>
<u-col
span=
"4"
textAlign=
"end"
>
{{itm.qty}}
</u-col>
<u-col
span=
"3"
textAlign=
"center"
>
{{itm.port_of_source_location_name==null?"":itm.port_of_source_location_name}}
</u-col>
<u-col
span=
"3"
textAlign=
"center"
>
{{itm.port_of_dest_location_name==null?"":port_of_dest_location_name}}
</u-col>
<u-col
span=
"3"
textAlign=
"center"
>
{{itm.inspection_number==null?"":itm.inspection_number}}
</u-col>
</u-row>
</view>
</view>
</uni-collapse-item>
</view>
</uni-collapse>
</view>
</view>
</template>
<
script
>
import
{
OMOrderDetail
,
OROrderDetail
}
from
'../../api/apiList.js'
import
{
getOrderBaseDetail
,
getOrderBaseEvent
,
OMOrderDetail
,
OROrderDetail
}
from
'../../api/apiList.js'
export
default
{
name
:
'orderDetail'
,
options
:
{
styleIsolation
:
'shared'
},
...
...
@@ -75,18 +145,20 @@
return
{
orderList
:
''
,
//订单列表,当默认为{}时,小程序会自动转结构
cargoDetails
:
[],
//货量明细
cargoEvents
:[],
//节点明细
isEmpty
:
true
,
//是否为空
activeNames
:
[],
//当前展开面板 names => orderIds
}
},
onLoad
(
options
)
{
const
data
=
JSON
.
parse
(
options
.
data
)
const
data
=
getApp
().
globalData
.
orderDetail
const
isEmpty
=
!
Object
.
keys
(
data
).
length
this
.
orderList
=
data
this
.
isEmpty
=
isEmpty
if
(
!
isEmpty
)
{
this
.
activeNames
=
[
data
.
id
]
this
.
getOrderDetail
(
data
.
id
)
this
.
getOrderDetail
(
data
.
id
);
this
.
getOrderEvents
(
data
.
id
);
}
},
methods
:
{
...
...
@@ -97,50 +169,41 @@
//获取订单货物明细
getOrderDetail
(
orderId
)
{
const
{
shipmentBizName
}
=
getApp
().
globalData
.
shipmentInfo
let
shipmentMode
=
''
switch
(
shipmentBizName
)
{
//根据shipmentBizName 判断运输模式
case
'tm.MovementShipment'
:
case
'tm.SectionShipment'
:
//暂时走OM逻辑
shipmentMode
=
'OM'
break
case
'tm.MassShipment'
:
shipmentMode
=
'MS'
;
//大宗运输
break
default
:
shipmentMode
=
'OR'
;
}
if
(
shipmentMode
!==
'MS'
){
//大宗模式无需查询货物明细
const
isShipmentOM
=
shipmentMode
===
'OM'
//判断是否为OM模式
const
reqData
=
{
"args"
:
{
"pageNum"
:
1
,
"pageSize"
:
100
,
"restrictions"
:
[{
"field"
:
isShipmentOM
?
'orderMovement.id'
:
'orderRelease.id'
,
"type"
:
"EQ"
,
"value"
:
orderId
}]
"orderId"
:
orderId
}
}
const
requestFun
=
isShipmentOM
?
OMOrderDetail
:
OROrderDetail
requestFun
(
reqData
).
then
(
res
=>
{
getOrderBaseDetail
(
reqData
).
then
(
res
=>
{
const
datas
=
res
.
data
.
data
.
datas
const
newData
=
[]
datas
.
map
(
item
=>
{
if
(
isShipmentOM
)
{
//自定义数据字段 转换为简洁的OR模式字段名
newData
.
push
({
'id'
:
item
.
id
,
'goods.name'
:
item
[
'goods.name'
],
'qty'
:
item
.
shipQty
,
})
}
else
{
newData
.
push
({
...
item
})
if
(
item
.
lot_no
==
null
){
item
.
lot_no
=
""
;
}
newData
.
push
({
...
item
})
})
this
.
cargoDetails
=
[...
newData
]
})
},
//获取订单所有节点
getOrderEvents
(
orderId
)
{
const
reqData
=
{
"args"
:
{
"pageNum"
:
1
,
"pageSize"
:
100
,
"orderId"
:
orderId
}
}
getOrderBaseEvent
(
reqData
).
then
(
res
=>
{
const
datas
=
res
.
data
.
data
.
datas
if
(
datas
.
length
>
0
)
{
this
.
cargoEvents
=
this
.
cargoEvents
.
concat
(
datas
);
}
})
},
}
}
...
...
@@ -148,7 +211,15 @@
<
style
lang=
"scss"
>
.orderDetail-list
{
.module-title
{
padding
:
32rpx
32rpx
16rpx
;
.vertical-separate
{
height
:
40rpx
;
border-left
:
7rpx
solid
#797979
;
margin-right
:
20rpx
;
}
}
.orderDetail-item
{
padding
:
32rpx
;
margin-bottom
:
24rpx
;
...
...
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