diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index c2ed1f97..13784e9f 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -2,7 +2,6 @@ import { useI18n } from 'vue-i18n'; import { storeToRefs } from 'pinia'; import { useQuasar } from 'quasar'; -import { QFile } from 'quasar'; import { computed, nextTick, onMounted, reactive, ref, watch } from 'vue'; import { dialogCheckData, @@ -169,8 +168,7 @@ const selectedWorker = ref< })[] >([]); const workerList = ref([]); -const fileAcceptance = ref(); -const refQFileAcceptance = ref>(); + const selectedProductGroup = ref(''); const selectedInstallmentNo = ref([]); const installmentAmount = ref(0); @@ -910,8 +908,6 @@ async function getAttachment() { }); if (attachment && attachment.length > 0) { - await checkFileAcceptance(attachment); - attachmentData.value = attachmentData.value.filter((item) => attachment.includes(item.name), ); @@ -1193,22 +1189,6 @@ async function getWorkerFromCriteria( return true; } - -async function checkFileAcceptance(attachment: string[]) { - const nameFile = `acceptance-${quotationFormData.value.id}`; - - const isFound = attachment.findIndex((v) => v.includes(nameFile)); - if (isFound !== -1) { - const blob = new Blob([''], { type: 'application/pdf' }); // สร้าง blob จำลอง - fileAcceptance.value = new File([blob], nameFile, { - type: 'application/pdf', - }); - } else fileAcceptance.value = undefined; -} - -function viewAttachment(url: string) { - window.open(url, '_blank'); -}
- {{ $t('general.view', { msg: $t('general.example') }) }} - {{ $t('general.upload') }} + {{ $t('general.designForm') }}