fix: clear client order editor dirty state
This commit is contained in:
@@ -302,6 +302,7 @@ async function saveDraft() {
|
|||||||
try {
|
try {
|
||||||
const order = await store.saveDraft(structuredClone(form), tenantStore.company.companyName, editingId.value)
|
const order = await store.saveDraft(structuredClone(form), tenantStore.company.companyName, editingId.value)
|
||||||
editingId.value = order.id
|
editingId.value = order.id
|
||||||
|
markEditorClean()
|
||||||
editorOpen.value = false
|
editorOpen.value = false
|
||||||
ElMessage.success('订单草稿已保存')
|
ElMessage.success('订单草稿已保存')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -320,6 +321,7 @@ async function submitOrder() {
|
|||||||
confirmButtonText: '前往企业资料',
|
confirmButtonText: '前往企业资料',
|
||||||
cancelButtonText: '继续编辑草稿',
|
cancelButtonText: '继续编辑草稿',
|
||||||
})
|
})
|
||||||
|
markEditorClean()
|
||||||
editorOpen.value = false
|
editorOpen.value = false
|
||||||
await router.push('/company/profile')
|
await router.push('/company/profile')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -337,6 +339,7 @@ async function submitOrder() {
|
|||||||
try {
|
try {
|
||||||
saving.value = true
|
saving.value = true
|
||||||
const order = await store.submit(structuredClone(form), tenantStore.company.companyName, editingId.value, tenantStore.company.auditStatus)
|
const order = await store.submit(structuredClone(form), tenantStore.company.companyName, editingId.value, tenantStore.company.auditStatus)
|
||||||
|
markEditorClean()
|
||||||
editorOpen.value = false
|
editorOpen.value = false
|
||||||
detailId.value = order.id
|
detailId.value = order.id
|
||||||
detailOpen.value = true
|
detailOpen.value = true
|
||||||
|
|||||||
Reference in New Issue
Block a user