diff --git a/src/modules/03_leave/views/AddLeave.vue b/src/modules/03_leave/views/AddLeave.vue index ff8b002..cdf8faf 100644 --- a/src/modules/03_leave/views/AddLeave.vue +++ b/src/modules/03_leave/views/AddLeave.vue @@ -88,20 +88,16 @@ const fileUploadDoc = async (file: any) => { const saveResing = () => { $q.dialog({ - title: "ยืนยันการยื่นข้อมูลแบบสอบถาม", - message: "ต้องการยื่นข้อมูลแบบสอบถามนี้ใช่หรือไม่?", + title: "ยืนยันการยื่นข้อมูลลาออก", + message: "ต้องการยื่นข้อมูลลาออกนี้ใช่หรือไม่?", cancel: { flat: true, color: "negative", }, persistent: true, }) - .onOk(async () => { - if (files.value == undefined) { - fails($q, "กรุณากรอกอัพโหลดเอกสารเพิ่มเติม") - } else { - createFormresign() - } + .onOk(() => { + createFormresign() }) .onCancel(() => {}) .onDismiss(() => {}) @@ -147,15 +143,17 @@ const deleteResting = async (id: string) => { //บันทึกข้อมูล const createFormresign = async () => { const formData = new FormData() - const blob = files.value.slice(0, files.value[0].size) - const newFile = new File(blob, nameFile.value, { - type: files.value[0].type, - }) + + // const blob = files.value.slice(0, files.value[0].size) + // const newFile = new File(blob, nameFile.value, { + // type: files.value[0].type, + // }) + formData.append("Location", tranferOrg.value) formData.append("SendDate", dateToISO(dateCommand.value)) formData.append("ActiveDate", dateToISO(dateLeave.value)) formData.append("Reason", noteReason.value) - formData.append("file", newFile) + formData.append("file", files.value) await http .post(config.API.listResign(), formData) .then((res: any) => {