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
Expand all
Hide 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
class=
"end-station flex_center"
>
<view
class=
"t-icon-end-sddress t-icon"
style=
"margin-right: 8rpx;"
></view>
{{
propData
[
'massOrder.destinationAddress.name'
]
||
''
}}
</view>
<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>
</view>
<bs-customCell
label=
"
接单日期 :"
:value=
"orderDate"
labelCol=
"3
"
wrapCol=
"6"
/>
<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
}
...
...
@@ -40,7 +46,7 @@
"navigationBarTitleText"
:
"修改密码"
,
"enablePullDownRefresh"
:
false
}
},
{
},
{
"path"
:
"shipmentDetail/shipmentDetail"
,
"style"
:
{
"navigationBarTitleText"
:
"运单详情"
,
...
...
@@ -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
...
...
@@ -180,9 +180,9 @@
try
{
reqData
.
code
=
res
.
code
let
pagePath
=
getApp
().
globalData
.
backPagePath
//获取回退页面
uni
.
setStorageSync
(
`
${
TokenPrefix
}
_XSRFToken`
,
''
)
//清除 XSRFToken
userLogin
(
loginAction
,
res
.
code
,
reqData
).
then
(
res
=>
{
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
]
...
...
@@ -201,17 +201,51 @@
})
setTimeout
(()
=>
{
uni
.
switchTab
({
url
:
"/pages/
index/index
"
,
url
:
"/pages/
order/order
"
,
})
},
1500
)
}
}).
catch
(
err
=>
{
}).
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
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
})
})
}
}
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=
"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
=>
{
uni
.
stopPullDownRefresh
()
const
data
=
res
.
data
.
data
.
datas
if
(
data
.
length
>
0
)
{
this
.
orderList
=
this
.
orderList
.
concat
(
data
)
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
.
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
This diff is collapsed.
Click to expand it.
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