diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index ab789c26..210fa868 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -2684,25 +2684,32 @@ const emptyCreateDialog = ref(false); } customerFormData.customerBranch[idx].file?.forEach( - (v) => { + async (v) => { if (!v.file) return; const ext = v.file.name.split('.').at(-1); let filename = v.group + '-' + new Date().getTime(); if (ext) filename += `.${ext}`; - customerStore.putAttachment({ + const res = await customerStore.putAttachment({ branchId: customerFormData.customerBranch?.[idx].id || '', file: v.file, filename, }); + + if (res) { + await customerFormStore.assignFormData( + customerFormState.editCustomerId, + ); + } }, ); await customerFormStore.assignFormData( customerFormState.editCustomerId, ); + customerFormStore.resetForm(); } }