diff --git a/src/components/upload-file/UploadFileSection.vue b/src/components/upload-file/UploadFileSection.vue index 27839ecc..17c19c95 100644 --- a/src/components/upload-file/UploadFileSection.vue +++ b/src/components/upload-file/UploadFileSection.vue @@ -37,7 +37,7 @@ const fileData = defineModel< const file = ref([]); const refQFile = ref>(); -async function triggerViewSlip(url: string) { +async function triggerViewFile(url: string) { window.open( props.transformUrl ? await props.transformUrl(url) : `${baseUrl}/${url}`, '_blank', @@ -93,7 +93,7 @@ function pickFile() { color="hsl(var(--text-mute))" clickable :closeable="!readonly" - @click="triggerViewSlip(d.url || '')" + @click="triggerViewFile(d.url || '')" @close="$emit('close', d.name)" /> diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index e4656500..67207f87 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -812,6 +812,7 @@ async function uploadAttachment(file?: File) { progress: e.progress || 0, loaded: e.loaded, total: e.total || 0, + url: `quotation/${quotationFormData.value.id || ''}/attachment/${file.name}`, }; }, }); @@ -851,7 +852,7 @@ onMounted(async () => { await fetchStatus(); - if (quotationFormState.value.mode === 'edit') { + if (quotationFormState.value.mode !== 'create') { await getAttachment(); } @@ -1463,10 +1464,10 @@ async function getWorkerFromCriteria(