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
9e016cfd
Commit
9e016cfd
authored
Aug 05, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 打开弹窗实时更新下拉数据 #1012529
parent
551fb03e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
24 deletions
+36
-24
src/views/order/allocationSortingRule/components/addDialog.vue
+24
-4
src/views/order/allocationSortingRule/index.vue
+12
-20
No files found.
src/views/order/allocationSortingRule/components/addDialog.vue
View file @
9e016cfd
...
...
@@ -259,7 +259,13 @@ import type {
SortingRuleCondition
,
SortingRuleDetail
,
}
from
'@/types/api/order'
import
{
getAreaListApi
,
addAreaApi
,
editAreaApi
}
from
'@/api/order'
import
{
getAreaListApi
,
addAreaApi
,
editAreaApi
,
getSortingUserListApi
,
getCategoryListApi
,
}
from
'@/api/order'
const
props
=
defineProps
<
{
modelValue
:
boolean
...
...
@@ -268,10 +274,8 @@ const props = defineProps<{
warehouseId
:
number
warehouseName
:
string
isDisabled
?:
boolean
categoryList
:
OperatorList
[]
pickingRuleList
:
OperatorList
[]
operatorList
:
OperatorList
[]
sortingUserList
:
OperatorList
[]
}
>
()
const
emit
=
defineEmits
<
{
(
e
:
'update:modelValue'
,
value
:
boolean
):
void
...
...
@@ -289,6 +293,8 @@ const visible = computed({
const
formRef
=
ref
<
FormInstance
>
()
const
areaList
=
ref
<
OperatorList
[]
>
([])
const
sortingUserList
=
ref
<
OperatorList
[]
>
([])
const
categoryList
=
ref
<
OperatorList
[]
>
([])
const
form
=
ref
<
SortingRuleDetail
>
({
areaDesc
:
''
,
areaCode
:
''
,
...
...
@@ -475,6 +481,20 @@ const loadAreaList = async () => {
}
}
// 获取所属客户列表
const
getSortingUserList
=
async
()
=>
{
const
res
=
await
getSortingUserListApi
()
if
(
res
.
code
!==
200
)
return
sortingUserList
.
value
=
res
.
data
}
// 获取商品类目
const
getCategoryList
=
async
()
=>
{
const
res
=
await
getCategoryListApi
()
if
(
res
.
code
!==
200
)
return
categoryList
.
value
=
res
.
data
}
// 提交
const
handleSubmit
=
async
()
=>
{
form
.
value
.
warehouseId
=
props
.
warehouseId
...
...
@@ -508,7 +528,7 @@ const handleSubmit = async () => {
}
onMounted
(
async
()
=>
{
await
loadAreaList
(
)
await
Promise
.
all
([
loadAreaList
(),
getSortingUserList
(),
getCategoryList
()]
)
if
(
props
.
editData
)
{
form
.
value
=
{
...
props
.
editData
,
...
...
src/views/order/allocationSortingRule/index.vue
View file @
9e016cfd
...
...
@@ -134,10 +134,8 @@
:edit-data=
"editData"
:warehouse-id=
"searchForm.warehouseId"
:warehouse-name=
"searchForm.warehouseName"
:category-list=
"categoryList"
:picking-rule-list=
"pickingRuleList"
:operator-list=
"operatorList"
:sorting-user-list=
"sortingUserList"
@
submit=
"getSortingRuleList"
/>
<el-dialog
...
...
@@ -172,7 +170,6 @@ import {
getCategoryListApi
,
getConditionTypeListApi
,
getOperatorListApi
,
getSortingUserListApi
,
}
from
'@/api/order'
import
TableView
from
'@/components/TableView.vue'
import
LogList
from
'@/components/LogList.vue'
...
...
@@ -245,7 +242,6 @@ const sortingList = ref<SortingList[]>([]) // 规则列表
const
categoryList
=
ref
<
OperatorList
[]
>
([])
// 商品类目
const
pickingRuleList
=
ref
<
OperatorList
[]
>
([])
// 配货规则条件
const
operatorList
=
ref
<
OperatorList
[]
>
([])
// 配货规则操作符
const
sortingUserList
=
ref
<
OperatorList
[]
>
([])
// 所属客户列表
const
isEnableSorting
=
ref
(
false
)
// 是否开启配货分拣
const
currentId
=
ref
(
0
)
// 当前操作id
const
isEdit
=
ref
(
false
)
// 是否编辑
...
...
@@ -413,13 +409,6 @@ const loadWarehouseList = async () => {
}
}
// 获取所属客户列表
const
getSortingUserList
=
async
()
=>
{
const
res
=
await
getSortingUserListApi
()
if
(
res
.
code
!==
200
)
return
sortingUserList
.
value
=
res
.
data
}
const
handleWarehouseChange
=
(
warehouseId
:
number
)
=>
{
searchForm
.
value
.
warehouseId
=
warehouseId
if
(
!
isEnableSorting
.
value
)
return
...
...
@@ -462,12 +451,18 @@ const updateConfig = async () => {
// 查询列表
const
getSortingRuleList
=
async
()
=>
{
loading
.
value
=
true
const
res
=
await
getSortingRuleListApi
({
warehouseId
:
searchForm
.
value
.
warehouseId
,
})
if
(
res
.
code
!==
200
)
return
sortingList
.
value
=
res
.
data
.
records
loading
.
value
=
false
try
{
const
[,
res
]
=
await
Promise
.
all
([
getCategoryList
(),
getSortingRuleListApi
({
warehouseId
:
searchForm
.
value
.
warehouseId
,
}),
])
if
(
res
.
code
!==
200
)
return
sortingList
.
value
=
res
.
data
.
records
}
finally
{
loading
.
value
=
false
}
}
// 新增/编辑
...
...
@@ -525,13 +520,10 @@ onMounted(async () => {
await
Promise
.
all
([
loadWarehouseList
(),
getFunctionSwitch
(),
getCategoryList
(),
getConditionTypeList
(),
getOperatorList
(),
getSortingUserList
(),
])
await
getSortingRuleList
()
loading
.
value
=
false
})
</
script
>
...
...
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