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
8fa6e9fa
Commit
8fa6e9fa
authored
Aug 12, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 编辑配货分拣规则的校验优化 #1013114
parent
e193f6ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletions
+34
-1
src/api/order.ts
+8
-0
src/views/order/allocationSortingRule/components/addDialog.vue
+26
-1
No files found.
src/api/order.ts
View file @
8fa6e9fa
...
...
@@ -746,6 +746,14 @@ export function editAreaApi(data: SortingRuleDetail) {
)
}
// 配货分拣 编辑保存前校验箱子是否有货
export
function
checkUsedBoxApi
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'allocation-sorting-rule/check-used-box'
,
{
params
:
{
id
},
skipGlobalError
:
true
},
)
}
// 配货分拣 删除
export
function
deleteAreaApi
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
...
...
src/views/order/allocationSortingRule/components/addDialog.vue
View file @
8fa6e9fa
...
...
@@ -237,20 +237,23 @@
<
script
setup
lang=
"ts"
>
import
{
computed
,
onMounted
,
ref
}
from
'vue'
import
{
Plus
,
Minus
}
from
'@element-plus/icons-vue'
import
type
{
FormInstance
}
from
'element-plus'
import
{
ElMessageBox
,
type
FormInstance
}
from
'element-plus'
import
platformJson
from
'@/json/platform.json'
import
type
{
OperatorList
,
SortingRuleCondition
,
SortingRuleDetail
,
}
from
'@/types/api/order'
import
type
{
BaseRespData
}
from
'@/types/api'
import
{
getAreaListApi
,
addAreaApi
,
editAreaApi
,
checkUsedBoxApi
,
getSortingUserListApi
,
getCategoryListApi
,
}
from
'@/api/order'
import
{
showError
}
from
'@/utils/ui'
const
props
=
defineProps
<
{
modelValue
:
boolean
...
...
@@ -498,6 +501,28 @@ const handleSubmit = async () => {
}),
),
}
if
(
props
.
isEdit
)
{
submitData
.
id
=
props
.
editData
?.
id
try
{
await
checkUsedBoxApi
(
submitData
.
id
as
number
)
}
catch
(
err
)
{
const
error
=
err
as
BaseRespData
<
never
>
if
(
error
?.
code
!==
301
)
{
showError
(
error
?.
message
)
return
}
try
{
await
ElMessageBox
.
confirm
(
error
.
message
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
dangerouslyUseHTMLString
:
true
,
})
}
catch
{
return
}
}
}
const
res
=
props
.
isEdit
?
await
editAreaApi
(
submitData
)
...
...
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