refactor code ส่วนของเครื่องราชฯ
This commit is contained in:
parent
33c2b338a2
commit
1ed9faebf2
11 changed files with 326 additions and 149 deletions
|
|
@ -93,6 +93,7 @@ const fecthlistRetire = async () => {
|
|||
messageError($q, e);
|
||||
});
|
||||
};
|
||||
// เรียกรายชื่อประกาศเกษียณอายุราชการเพิ่ม
|
||||
const findlist = async (id: string) => {
|
||||
let data = [{}];
|
||||
if (type.value === "officer") {
|
||||
|
|
@ -122,7 +123,7 @@ const findlist = async (id: string) => {
|
|||
});
|
||||
};
|
||||
|
||||
// putlist
|
||||
// ยืนยันการเพิ่มราชชื่อ
|
||||
const clickAdd = (props: any) => {
|
||||
if (retireld.value == undefined) {
|
||||
retireld.value = retireld_params;
|
||||
|
|
|
|||
|
|
@ -172,6 +172,7 @@ const fecthlistprofile = async (id: string) => {
|
|||
statusReport.value = res.data.result.json;
|
||||
typeReport.value = res.data.result.typeReport;
|
||||
textReport.value = res.data.result.detail;
|
||||
// รายชื่อผู้เกษียณอายุราชการ
|
||||
rows.value = res.data.result.profile.map((e: any) => ({
|
||||
id: e.id,
|
||||
profileId: e.profileId,
|
||||
|
|
@ -266,6 +267,7 @@ const UpdateListId = (retireld: string, pId: string) => {
|
|||
profileId.value = pId;
|
||||
fecthlistprofile(retireld);
|
||||
};
|
||||
// กลับหน้าเดิม
|
||||
const backHistory = () => {
|
||||
window.history.back();
|
||||
};
|
||||
|
|
@ -274,6 +276,7 @@ const visibleNote = computed(() => {
|
|||
return true;
|
||||
}
|
||||
});
|
||||
// อัปโหลดไฟล์
|
||||
const uploadFile = async (event: any) => {
|
||||
showLoader();
|
||||
const selectedFile = event;
|
||||
|
|
@ -294,7 +297,7 @@ const uploadFile = async (event: any) => {
|
|||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
// downloadAttachment
|
||||
const downloadAttachment = async (type: string, id: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -311,6 +314,7 @@ const downloadAttachment = async (type: string, id: string) => {
|
|||
hideLoader();
|
||||
});
|
||||
};
|
||||
// downloadFile
|
||||
const downloadFile = (response: any, filename: string) => {
|
||||
const link = document.createElement("a");
|
||||
var fileName = filename;
|
||||
|
|
@ -320,7 +324,7 @@ const downloadFile = (response: any, filename: string) => {
|
|||
link.click();
|
||||
document.body.removeChild(link);
|
||||
};
|
||||
|
||||
// ยืนยันการแก้ไขข้อมูล
|
||||
const saveEdiitReport = (reason: string) => {
|
||||
const formdata = new FormData();
|
||||
formdata.append("Detail", reason);
|
||||
|
|
@ -344,9 +348,11 @@ const saveEdiitReport = (reason: string) => {
|
|||
"ต้องการยืนยันการแก้ไขข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
};
|
||||
// เปิด popup เหตุผล
|
||||
const openmodalEditReport = () => {
|
||||
modalEdit.value = true;
|
||||
};
|
||||
// ปิด popup เหตุผล
|
||||
const closemodalEditReport = () => {
|
||||
modalEdit.value = false;
|
||||
};
|
||||
|
|
@ -587,7 +593,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
<q-td class="table_ellipsis" key="bureau" :props="props">{{
|
||||
props.row.bureau
|
||||
}}</q-td>
|
||||
|
||||
<q-td auto-width></q-td>
|
||||
<q-td
|
||||
auto-width
|
||||
v-if="
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue