fix: quotation => upload additional file
This commit is contained in:
parent
d12acef602
commit
2e825e373f
2 changed files with 6 additions and 5 deletions
|
|
@ -37,7 +37,7 @@ const fileData = defineModel<
|
|||
const file = ref<File[]>([]);
|
||||
const refQFile = ref<InstanceType<typeof QFile>>();
|
||||
|
||||
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)"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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(
|
|||
<div class="surface-1 q-pa-md full-width">
|
||||
<UploadFileSection
|
||||
:readonly="
|
||||
quotationFormState.mode !== 'edit' ||
|
||||
(view !== View.Quotation && view !== View.Invoice) ||
|
||||
(quotationFormData.quotationStatus !== 'Issued' &&
|
||||
quotationFormData.quotationStatus !== 'Accepted') ||
|
||||
quotationFormState.mode === 'info'
|
||||
quotationFormData.quotationStatus !== 'Accepted')
|
||||
"
|
||||
v-model:file-data="attachmentData"
|
||||
:label="
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue