Commit e99e47ee by wusiyi

feat: 编辑配货分拣规则的校验优化 #1013114

parent a636bb53
...@@ -539,6 +539,28 @@ const handleSubmit = async () => { ...@@ -539,6 +539,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
}
}
}
if (!submitData.name) { if (!submitData.name) {
const desc = areaList.value.find( const desc = areaList.value.find(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment