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
648c09bb
Commit
648c09bb
authored
Jul 29, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 物流分拣配置展示修改
parent
5627765b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
26 deletions
+128
-26
src/views/logistics/components/CreateSortingRuleDialog.vue
+4
-21
src/views/logistics/sortingConfiguration.vue
+124
-5
No files found.
src/views/logistics/components/CreateSortingRuleDialog.vue
View file @
648c09bb
...
@@ -191,15 +191,12 @@ import {
...
@@ -191,15 +191,12 @@ import {
updateSortingApi
,
updateSortingApi
,
getSortingConfig
,
getSortingConfig
,
getSortingPortAreaListApi
,
getSortingPortAreaListApi
,
getSortPortConditionTypeListApi
,
getSortPortOperatorListApi
,
}
from
'@/api/logistics'
}
from
'@/api/logistics'
const
conditionTypeList
=
ref
<
SortingPortOptionItem
[]
>
()
const
props
=
defineProps
<
{
const
operatorList
=
ref
<
SortingPortOptionItem
[]
>
()
defineProps
<
{
logisticsMethodsList
:
Ilogistics
[]
logisticsMethodsList
:
Ilogistics
[]
conditionTypeList
:
SortingPortOptionItem
[]
operatorList
:
SortingPortOptionItem
[]
}
>
()
}
>
()
const
emit
=
defineEmits
<
{
const
emit
=
defineEmits
<
{
...
@@ -233,7 +230,7 @@ const getAvailableConditionTypes = (currentIndex: number) => {
...
@@ -233,7 +230,7 @@ const getAvailableConditionTypes = (currentIndex: number) => {
const
selectedFields
=
(
form
.
value
.
conditions
??
[])
const
selectedFields
=
(
form
.
value
.
conditions
??
[])
.
filter
((
_
,
index
)
=>
index
!==
currentIndex
)
.
filter
((
_
,
index
)
=>
index
!==
currentIndex
)
.
map
((
item
)
=>
item
.
conditionType
)
.
map
((
item
)
=>
item
.
conditionType
)
return
conditionTypeList
.
value
?.
filter
(
return
props
.
conditionTypeList
?.
filter
(
(
rule
)
=>
!
selectedFields
.
includes
(
rule
.
code
),
(
rule
)
=>
!
selectedFields
.
includes
(
rule
.
code
),
)
)
}
}
...
@@ -308,18 +305,6 @@ const loadAreaList = async () => {
...
@@ -308,18 +305,6 @@ const loadAreaList = async () => {
}
}
}
}
const
loadConditionTypeList
=
async
()
=>
{
const
res
=
await
getSortPortConditionTypeListApi
()
if
(
res
.
code
!==
200
)
return
conditionTypeList
.
value
=
res
.
data
}
const
loadOperatorList
=
async
()
=>
{
const
res
=
await
getSortPortOperatorListApi
()
if
(
res
.
code
!==
200
)
return
operatorList
.
value
=
res
.
data
}
const
handleSubmit
=
async
()
=>
{
const
handleSubmit
=
async
()
=>
{
await
formRef
.
value
?.
validate
()
await
formRef
.
value
?.
validate
()
const
submitData
:
IsortingInfo
=
{
const
submitData
:
IsortingInfo
=
{
...
@@ -349,8 +334,6 @@ const open = async (item?: IsortingInfo) => {
...
@@ -349,8 +334,6 @@ const open = async (item?: IsortingInfo) => {
editId
.
value
=
item
?.
id
editId
.
value
=
item
?.
id
form
.
value
=
createDefaultForm
()
form
.
value
=
createDefaultForm
()
await
Promise
.
all
([
loadConditionTypeList
(),
loadOperatorList
()])
if
(
item
?.
id
)
{
if
(
item
?.
id
)
{
const
res
=
await
getSortingConfig
({
id
:
item
.
id
})
const
res
=
await
getSortingConfig
({
id
:
item
.
id
})
if
(
res
.
code
!==
200
)
return
if
(
res
.
code
!==
200
)
return
...
...
src/views/logistics/sortingConfiguration.vue
View file @
648c09bb
...
@@ -38,6 +38,30 @@
...
@@ -38,6 +38,30 @@
<div
class=
"user-list flex-1 overflow-hidden"
>
<div
class=
"user-list flex-1 overflow-hidden"
>
<div
v-loading=
"loading"
class=
"table-container"
>
<div
v-loading=
"loading"
class=
"table-container"
>
<TableView
:paginated-data=
"tableData"
:columns=
"columns"
>
<TableView
:paginated-data=
"tableData"
:columns=
"columns"
>
<template
#
conditions=
"
{ row }">
<div
class=
"conditions-text"
>
<div
class=
"match-type"
>
{{
row
.
matchType
===
1
?
'满足以下所有条件:'
:
'满足以下任一条件:'
}}
</div>
<div
v-for=
"(item, index) in row.conditions || []"
:key=
"index"
class=
"condition-item"
>
<span
class=
"condition-text"
:title=
"formatConditionText(item)"
>
{{
index
+
1
}}
、
{{
formatConditionText
(
item
)
}}
</span>
</div>
</div>
</
template
>
<
template
#
operation=
"{ row }"
>
<
template
#
operation=
"{ row }"
>
<el-button
type=
"primary"
link
@
click=
"updateSorting(row)"
>
<el-button
type=
"primary"
link
@
click=
"updateSorting(row)"
>
编辑
编辑
...
@@ -66,19 +90,28 @@
...
@@ -66,19 +90,28 @@
<CreateSortingRuleDialog
<CreateSortingRuleDialog
ref=
"createDialogRef"
ref=
"createDialogRef"
:logistics-methods-list=
"logisticsMethodsList"
:logistics-methods-list=
"logisticsMethodsList"
:condition-type-list=
"conditionTypeList"
:operator-list=
"operatorList"
@
success=
"search"
@
success=
"search"
/>
/>
</div>
</div>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
Ilogistics
,
IsortingInfo
}
from
'@/types/api/logistics'
import
{
Ilogistics
,
IsortingInfo
,
SortingPortCondition
,
SortingPortOptionItem
,
}
from
'@/types/api/logistics'
import
{
import
{
getsortingConfigListApi
,
getsortingConfigListApi
,
deleteSortingApi
,
deleteSortingApi
,
getSortingPortAreaListApi
,
getSortingPortAreaListApi
,
getSortPortConditionTypeListApi
,
getSortPortOperatorListApi
,
}
from
'@/api/logistics'
}
from
'@/api/logistics'
import
{
allErpCodeListApi
}
from
'@/api/podCnOrder'
import
{
allErpCodeListApi
}
from
'@/api/podCnOrder'
import
{
ref
}
from
'vue'
import
{
onMounted
,
ref
}
from
'vue'
import
CreateSortingRuleDialog
from
'./components/CreateSortingRuleDialog.vue'
import
CreateSortingRuleDialog
from
'./components/CreateSortingRuleDialog.vue'
import
{
useEnterKeyTrigger
}
from
'@/utils/hooks/useEnterKeyTrigger.ts'
import
{
useEnterKeyTrigger
}
from
'@/utils/hooks/useEnterKeyTrigger.ts'
import
TableView
from
'@/components/TableView.vue'
import
TableView
from
'@/components/TableView.vue'
...
@@ -95,11 +128,13 @@ const columns: CustomColumn<IsortingInfo>[] = [
...
@@ -95,11 +128,13 @@ const columns: CustomColumn<IsortingInfo>[] = [
align
:
'center'
,
align
:
'center'
,
},
},
{
{
key
:
'conditionsText'
,
key
:
'conditions'
,
prop
:
'conditionsText'
,
prop
:
'conditions'
,
slot
:
'conditions'
,
label
:
'分拣口规则'
,
label
:
'分拣口规则'
,
minWidth
:
250
,
minWidth
:
250
,
align
:
'left'
,
align
:
'left'
,
showOverflowTooltip
:
false
,
},
},
{
{
key
:
'sortingAreaName'
,
key
:
'sortingAreaName'
,
...
@@ -173,6 +208,52 @@ const getSortingList = async () => {
...
@@ -173,6 +208,52 @@ const getSortingList = async () => {
}))
}))
}
}
const
conditionTypeList
=
ref
<
SortingPortOptionItem
[]
>
([])
const
operatorList
=
ref
<
SortingPortOptionItem
[]
>
([])
const
loadConditionTypeList
=
async
()
=>
{
const
res
=
await
getSortPortConditionTypeListApi
()
if
(
res
.
code
!==
200
)
return
conditionTypeList
.
value
=
res
.
data
}
const
loadOperatorList
=
async
()
=>
{
const
res
=
await
getSortPortOperatorListApi
()
if
(
res
.
code
!==
200
)
return
operatorList
.
value
=
res
.
data
}
const
formatConditionText
=
(
item
:
SortingPortCondition
)
=>
{
const
typeDesc
=
conditionTypeList
.
value
.
find
((
r
)
=>
r
.
code
===
item
.
conditionType
)?.
desc
??
item
.
conditionType
const
operatorDesc
=
operatorList
.
value
.
find
((
r
)
=>
r
.
code
===
item
.
operator
)?.
desc
??
item
.
operator
let
valueText
=
''
switch
(
item
.
conditionType
)
{
case
'order_platform'
:
valueText
=
String
(
item
.
conditionValue
??
''
)
.
split
(
','
)
.
filter
(
Boolean
)
.
join
(
'、'
)
break
default
:
valueText
=
String
(
item
.
conditionValue
??
''
)
.
split
(
','
)
.
filter
(
Boolean
)
.
map
(
(
code
)
=>
logisticsMethodsList
.
value
.
find
((
l
)
=>
l
.
code
===
code
)
?.
basicsName
??
code
,
)
.
join
(
'、'
)
break
}
return
`
${
typeDesc
}${
operatorDesc
}
${
valueText
}
`
}
const
handleBatchDelete
=
async
(
row
:
IsortingInfo
|
null
)
=>
{
const
handleBatchDelete
=
async
(
row
:
IsortingInfo
|
null
)
=>
{
if
(
!
row
?.
id
)
{
if
(
!
row
?.
id
)
{
return
ElMessage
.
warning
(
'请选择要删除的数据'
)
return
ElMessage
.
warning
(
'请选择要删除的数据'
)
...
@@ -195,7 +276,12 @@ const updateSorting = (item: IsortingInfo) => {
...
@@ -195,7 +276,12 @@ const updateSorting = (item: IsortingInfo) => {
}
}
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
await
Promise
.
all
([
getSortingList
(),
getlogisticsMethods
()])
await
Promise
.
all
([
getSortingList
(),
getlogisticsMethods
(),
loadConditionTypeList
(),
loadOperatorList
(),
])
})
})
const
searchFormRef
=
ref
()
const
searchFormRef
=
ref
()
...
@@ -221,6 +307,39 @@ useEnterKeyTrigger({
...
@@ -221,6 +307,39 @@ useEnterKeyTrigger({
height
:
100%
;
height
:
100%
;
}
}
}
}
.conditions-text
{
padding
:
4px
0
;
line-height
:
1.6
;
overflow
:
hidden
;
.match-type
{
color
:
#666
;
margin-bottom
:
2px
;
}
.condition-item
{
display
:
flex
;
align-items
:
center
;
color
:
#333
;
overflow
:
hidden
;
min-width
:
0
;
.condition-text
{
flex
:
1
;
min-width
:
0
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.category-detail-btn
{
flex-shrink
:
0
;
margin-left
:
4px
;
padding
:
0
;
height
:
auto
;
}
}
}
.manage
{
.manage
{
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
...
...
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