1
This commit is contained in:
@@ -306,6 +306,7 @@ test('selects platform destinations and uses customer-scoped server address book
|
||||
test('lets the create-page instance own destination loading and exposes a recoverable error state', () => {
|
||||
assert.match(source, /await router\.push\(\{ name: 'first-leg-order-create' \}\)\s*\n\}/)
|
||||
assert.doesNotMatch(source, /await router\.push\(\{ name: 'first-leg-order-create' \}\)[\s\S]*?await loadDestinationWarehouses\(form\.destinationType\)/)
|
||||
assert.match(source, /watch\(isCreatePage, \(isCreate, wasCreate\) => \{[\s\S]*?if \(wasCreate === false\) void loadPageData\(\)/)
|
||||
assert.match(source, /if \(destinationResult\.status === 'rejected'\) supportingDataErrors\.value\.push\(`目的仓加载失败:\$\{errorMessage\(destinationResult\.reason\)\}`\)/)
|
||||
assert.match(source, /下单配套数据加载失败/)
|
||||
})
|
||||
|
||||
@@ -654,6 +654,8 @@ watch(isCreatePage, (isCreate, wasCreate) => {
|
||||
editingId.value = undefined
|
||||
replaceForm(quickOrderDraft())
|
||||
resetEditorValidation()
|
||||
// The list and create routes reuse this component, so onMounted does not run again.
|
||||
if (wasCreate === false) void loadPageData()
|
||||
}, { immediate: true })
|
||||
|
||||
watch(detailOpen, (open) => {
|
||||
|
||||
Reference in New Issue
Block a user