优化
This commit is contained in:
@@ -318,11 +318,23 @@ async function loadChannels() {
|
||||
}
|
||||
}
|
||||
|
||||
async function submitQuickOrder() {
|
||||
if (!inboundCodePolicy.value) {
|
||||
ElMessage.warning('入仓码规则尚未加载,请刷新页面后重试')
|
||||
return
|
||||
async function refreshInboundCodePolicyForWrite() {
|
||||
try {
|
||||
const policy = await getMerchantInboundCodePolicy()
|
||||
inboundCodePolicy.value = policy
|
||||
if (policy.mode === 'AUTO') {
|
||||
rows.forEach((row) => { row.inboundCode = '' })
|
||||
}
|
||||
return true
|
||||
} catch (error) {
|
||||
inboundCodePolicy.value = null
|
||||
ElMessage.warning(error instanceof Error ? error.message : '入仓码规则加载失败,请稍后重试')
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
async function submitQuickOrder() {
|
||||
if (!await refreshInboundCodePolicyForWrite()) return
|
||||
const missingInboundCodeIndex = manualInboundCodeRequired.value
|
||||
? rows.findIndex((row) => !row.inboundCode.trim())
|
||||
: -1
|
||||
|
||||
Reference in New Issue
Block a user