Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
00ff1ac5
Commit
00ff1ac5
authored
Aug 27, 2025
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增物流跟踪页面
parent
e90edaec
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
147 additions
and
3 deletions
+147
-3
src/api/logistics.ts
+39
-0
src/components/TableView.vue
+85
-3
src/router/index.ts
+7
-0
src/router/menu.ts
+5
-0
src/views/logistics/logisticsTracking.vue
+0
-0
src/views/logistics/types/logistics.ts
+11
-0
No files found.
src/api/logistics.ts
View file @
00ff1ac5
...
...
@@ -4,6 +4,8 @@ import {
LogisticsMethod
,
LogisticsMethodList
,
UpdateLogisticsMethodStatus
,
LogisticsTrackingParams
,
LogisticsTrackingTree
,
}
from
'@/views/logistics/types/logistics'
import
{
AddDeclarationRuleObj
}
from
'@/views/logistics/types/declarationRule'
import
{
LogisticsQuotation
}
from
'@/views/logistics/types/logisticsQuotation'
...
...
@@ -473,3 +475,40 @@ export function deleteSortingApi(ids: string) {
},
)
}
// 物流跟踪 获取菜单树
export
function
logisticStatusList
()
{
return
axios
.
get
<
never
,
BaseRespData
<
LogisticsTrackingTree
[]
>>
(
'factory/logisticsTracking/statusList'
,
)
}
// 物流跟踪 分页
export
function
logisticsTrackingPage
(
params
:
LogisticsTrackingParams
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
ILogisticsCompany
>>
(
'/factory/logisticsTracking/list_page'
,
params
,
)
}
// 物流跟踪 批量注册
export
function
logisticsTrackingBatchRegister
(
params
:
{
idList
:
number
[]
selectAll
:
boolean
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'/factory/logisticsTracking/batchRegister'
,
params
,
)
}
// 物流跟踪 批量同步
export
function
logisticsTrackingBatchPushOrder
(
params
:
{
idList
:
number
[]
selectAll
:
boolean
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'/factory/logisticsTracking/batchPushOrder'
,
params
,
)
}
src/components/TableView.vue
View file @
00ff1ac5
...
...
@@ -8,6 +8,8 @@
header-align=
"center"
height=
"100%"
v-bind=
"attrs"
:class=
"internalIsMore ? 'is-more-active' : ''"
@
header-click=
"handleTableHeaderClick"
>
<ElTableColumn
v-if=
"selectionable"
...
...
@@ -16,7 +18,8 @@
fixed=
"left"
header-align=
"center"
align=
"center"
></ElTableColumn>
>
</ElTableColumn>
<ElTableColumn
v-if=
"serialNumberable"
label=
"序号"
...
...
@@ -25,6 +28,7 @@
fixed=
"left"
header-align=
"center"
align=
"center"
:class=
"isMore ? 'is-more-active' : ''"
></ElTableColumn>
<template
v-for=
"column in columns"
:key=
"column.key"
>
<ElTableColumn
...
...
@@ -60,16 +64,26 @@
</div>
</template>
<
script
setup
lang=
"tsx"
generic=
"T"
>
import
{
type
Slot
,
useAttrs
,
useSlots
,
type
PropType
,
shallowRef
}
from
'vue'
import
{
type
Slot
,
useAttrs
,
useSlots
,
type
PropType
,
shallowRef
,
ref
,
nextTick
,
}
from
'vue'
import
type
{
CustomColumn
}
from
'@/types/table'
import
RenderColumn
from
'./RenderColumn.vue'
import
{
ElTable
}
from
'element-plus'
import
type
{
TableInstance
}
from
'element-plus'
const
tableRef
=
shallowRef
<
TableInstance
>
()
const
internalIsMore
=
ref
(
false
)
const
selectionHeaderClickCount
=
ref
(
0
)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
defineProps
({
const
props
=
defineProps
({
paginatedData
:
{
type
:
Array
,
required
:
true
,
...
...
@@ -90,6 +104,10 @@ defineProps({
type
:
Boolean
,
default
:
false
,
},
isMore
:
{
type
:
Boolean
,
default
:
false
,
},
})
const
attrs
=
useAttrs
()
...
...
@@ -110,12 +128,51 @@ const toggleAllSelection = () => {
tableRef
.
value
?.
toggleAllSelection
()
}
const
handleTableHeaderClick
=
(
column
:
{
type
?:
string
},
event
:
Event
)
=>
{
if
(
column
.
type
===
'selection'
&&
props
.
isMore
)
{
event
.
preventDefault
()
event
.
stopPropagation
()
selectionHeaderClickCount
.
value
++
const
count
=
selectionHeaderClickCount
.
value
const
actions
=
{
1
:
()
=>
selectAllRows
(
true
),
2
:
()
=>
selectAllRows
(
true
,
true
),
3
:
()
=>
selectAllRows
(
false
,
false
),
}
if
(
actions
[
count
as
keyof
typeof
actions
])
{
actions
[
count
as
keyof
typeof
actions
]()
}
}
}
const
selectAllRows
=
(
select
:
boolean
,
setInternalIsMore
?:
boolean
)
=>
{
nextTick
(()
=>
{
if
(
tableRef
.
value
&&
props
.
paginatedData
.
length
>
0
)
{
props
.
paginatedData
.
forEach
((
row
)
=>
{
tableRef
.
value
?.
toggleRowSelection
(
row
,
select
)
})
}
if
(
setInternalIsMore
!==
undefined
)
{
internalIsMore
.
value
=
setInternalIsMore
}
if
(
!
select
&&
setInternalIsMore
===
false
)
{
selectionHeaderClickCount
.
value
=
0
}
})
}
defineExpose
({
tableRef
,
setCurrentRow
,
toggleRowSelection
,
clearSelection
,
toggleAllSelection
,
internalIsMore
,
})
</
script
>
...
...
@@ -125,4 +182,29 @@ defineExpose({
overflow
:
hidden
;
position
:
relative
;
}
::v-deep
.is-more-active
{
.el-table__header
.el-table-column--selection
.cell
{
height
:
auto
!important
;
padding
:
0px
0
!important
;
overflow
:
visible
!important
;
.el-checkbox
{
position
:
relative
;
transform
:
translateY
(
-7px
);
&::after
{
content
:
'All'
;
color
:
#262626
;
font-size
:
12px
;
position
:
absolute
;
top
:
100%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
line-height
:
1
;
white-space
:
nowrap
;
}
}
}
}
</
style
>
src/router/index.ts
View file @
00ff1ac5
...
...
@@ -236,6 +236,13 @@ const router = createRouter({
component
:
()
=>
import
(
'@/views/logistics/sortingConfiguration.vue'
),
},
{
path
:
'/logistics/logisticsTracking'
,
meta
:
{
title
:
'物流跟踪'
,
},
component
:
()
=>
import
(
'@/views/logistics/logisticsTracking.vue'
),
},
{
path
:
'/warehouse/manage'
,
meta
:
{
title
:
'仓库管理'
,
...
...
src/router/menu.ts
View file @
00ff1ac5
...
...
@@ -61,6 +61,11 @@ const menu: MenuItem[] = [
id
:
7
,
label
:
'分拣配置'
,
},
{
index
:
'/logistics/logisticsTracking'
,
id
:
8
,
label
:
'物流跟踪'
,
},
],
},
{
...
...
src/views/logistics/logisticsTracking.vue
0 → 100644
View file @
00ff1ac5
This diff is collapsed.
Click to expand it.
src/views/logistics/types/logistics.ts
View file @
00ff1ac5
...
...
@@ -49,3 +49,14 @@ interface ruleRefObj {
ruleId
:
string
|
number
ruleName
:
string
|
number
}
export
interface
LogisticsTrackingTree
{
name
:
string
status
:
number
num
:
number
}
export
interface
LogisticsTrackingParams
{
trackNumber
?:
number
|
string
shopNumber
?:
string
|
number
trackingStatus
?:
number
}
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