diff --git a/src/modules/14_IDP/component/DialogDevelop.vue b/src/modules/14_IDP/component/DialogDevelop.vue index 8fa3379..df7a80f 100644 --- a/src/modules/14_IDP/component/DialogDevelop.vue +++ b/src/modules/14_IDP/component/DialogDevelop.vue @@ -27,6 +27,7 @@ const isReadOnly = ref(false); const props = defineProps({ getData: Function, + onDownloadFile: Function, }); /** เช็ค true/false 70*/ @@ -180,7 +181,7 @@ async function createURLUpload(id: string, file: any) { const fileName = { fileName: file.name }; await http .post( - config.API.file("IDP", "ยื่นคำร้องขอเพิ่มข้อมูลการพัฒนารายบุคคล", id), + config.API.file("IDP", "หลักฐาน", id), { replace: false, fileList: fileName, @@ -268,11 +269,13 @@ function getDetail() { formData.otherPerson = data.reasonDevelopment20; formData.otherTraining = data.reasonDevelopment10; formData.development = data.developmentProjects; - }).catch((e)=>{ - messageError($q,e) - }).finally(()=>{ - hideLoader() }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); } watch( @@ -458,7 +461,7 @@ watch(
+ + หลักฐานอ้างอิง +
- + { if (res.data.length !== 0) { downloadUrl(id, res.data[0].fileName); @@ -240,7 +240,7 @@ function downloadUrl(id: string, fileName: string) { .get( config.API.fileByFile( "IDP", - "ยื่นคำร้องขอเพิ่มข้อมูลการพัฒนารายบุคคล", + "หลักฐาน", id, fileName ) @@ -494,6 +494,7 @@ onMounted(async () => { :get-data="getListData" v-model:is-edit="isEdit" v-model:id-row="idRow" + :on-download-file="onDownloadFile" />