diff --git a/src/modules/13_salary/components/SalaryLists/ProcessStep.vue b/src/modules/13_salary/components/SalaryLists/ProcessStep.vue index 2b7c66844..edf63dd54 100644 --- a/src/modules/13_salary/components/SalaryLists/ProcessStep.vue +++ b/src/modules/13_salary/components/SalaryLists/ProcessStep.vue @@ -26,27 +26,40 @@ const props = defineProps({ * @param event file */ async function uploadFile(event: any) { + const fileName = event.name + dialogConfirm( $q, async () => { const selectedFile = event; const formdata = new FormData(); formdata.append("Document", selectedFile); - // await http - // .put(config.API.uploadfileOnlyInsignia(requestId.value), formdata) - // .then(async () => { - // await fecthInsigniaByOc( - // round.value, - // DataStore.agency, - // "officer", - // tab.value - // ); - // success($q, "อัปโหลดไฟล์สำเร็จ"); - // fileUpload.value = null; - // }) - // .catch((err) => { - // messageError($q, err); - // }), + http + .post( + config.API.subFile( + "ระบบเงินเดือน", + "เลื่อนเงินเดือน", + props.periodId ? props.periodId : "", + props.rootId ? props.rootId : "" + ), + { + replace: false, //อัพทับที่เดิมไหม + fileList: fileName, + } + ) + .then(async () => { + // await fecthInsigniaByOc( + // round.value, + // DataStore.agency, + // "officer", + // tab.value + // ); + // success($q, "อัปโหลดไฟล์สำเร็จ"); + // fileUpload.value = null; + }) + .catch((err) => { + messageError($q, err); + }); }, "ยืนยันการอัปโหลดไฟล์", "ต้องการยืนยันการอัปโหลดไฟล์นี้หรือไม่ ?" @@ -110,7 +123,7 @@ function sendAndRecommend(title: string,typeOrder:string) {