Merge branch 'warunee-dev' into develop
This commit is contained in:
commit
b65ce3b713
4 changed files with 134 additions and 44 deletions
|
|
@ -250,12 +250,12 @@ const menuList = readonly<any[]>([
|
||||||
path: "appoint-promote",
|
path: "appoint-promote",
|
||||||
role: "placement",
|
role: "placement",
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// key: 6.8,
|
key: 6.8,
|
||||||
// label: "รายการแต่งตั้งลูกจ้างประจำ",
|
label: "รายการแต่งตั้งลูกจ้างประจำ",
|
||||||
// path: "appoint-employee",
|
path: "appoint-employee",
|
||||||
// role: "placement",
|
role: "placement",
|
||||||
// },
|
},
|
||||||
// {
|
// {
|
||||||
// key: 6.9,
|
// key: 6.9,
|
||||||
// label: "รายการย้าย",
|
// label: "รายการย้าย",
|
||||||
|
|
@ -374,34 +374,34 @@ const menuList = readonly<any[]>([
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
key: 9,
|
// key: 9,
|
||||||
icon: "mdi-calendar",
|
// icon: "mdi-calendar",
|
||||||
activeIcon: "mdi-calendar",
|
// activeIcon: "mdi-calendar",
|
||||||
label: "การลา",
|
// label: "การลา",
|
||||||
path: "leave",
|
// path: "leave",
|
||||||
role: "coin",
|
// role: "coin",
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
key: 9.1,
|
// key: 9.1,
|
||||||
label: "รายการลงเวลาปฏิบัติงาน",
|
// label: "รายการลงเวลาปฏิบัติงาน",
|
||||||
path: "/work-list",
|
// path: "/work-list",
|
||||||
role: "coin",
|
// role: "coin",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 9.2,
|
// key: 9.2,
|
||||||
label: "รายการลา",
|
// label: "รายการลา",
|
||||||
path: "/leave-list",
|
// path: "/leave-list",
|
||||||
role: "coin",
|
// role: "coin",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 9.3,
|
// key: 9.3,
|
||||||
label: "รายงานสถิติ",
|
// label: "รายงานสถิติ",
|
||||||
path: "/statistics-report",
|
// path: "/statistics-report",
|
||||||
role: "coin",
|
// role: "coin",
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const tabList = readonly<tabType[]>([
|
const tabList = readonly<tabType[]>([
|
||||||
|
|
|
||||||
|
|
@ -155,14 +155,16 @@
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
round
|
|
||||||
flat
|
|
||||||
color="blue"
|
|
||||||
icon="mdi-file-document"
|
|
||||||
v-if="
|
v-if="
|
||||||
profileType == 'officer' ||
|
profileType == 'officer' ||
|
||||||
(profileType == 'employee' && employeeClass == 'perm')
|
(profileType == 'employee' && employeeClass == 'perm')
|
||||||
"
|
"
|
||||||
|
round
|
||||||
|
flat
|
||||||
|
:color="reasonStatus ? 'primary' : 'pink-5'"
|
||||||
|
:icon="
|
||||||
|
reasonStatus ? 'mdi-home-import-outline' : 'mdi-home-export-outline'
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-menu transition-show="jump-down" transition-hide="jump-up">
|
<q-menu transition-show="jump-down" transition-hide="jump-up">
|
||||||
<q-list dense style="min-width: 160px">
|
<q-list dense style="min-width: 160px">
|
||||||
|
|
@ -219,7 +221,6 @@
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="clickPassaway"
|
@click="clickPassaway"
|
||||||
v-if="profileType == 'officer'"
|
|
||||||
>
|
>
|
||||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
@ -275,7 +276,8 @@
|
||||||
<!-- <q-tooltip>ส่งรายชื่อ</q-tooltip> -->
|
<!-- <q-tooltip>ส่งรายชื่อ</q-tooltip> -->
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
<!-- ปิดไปเพราะทำส่วนของพ้นราชการแล้ว -->
|
||||||
|
<!-- <q-btn
|
||||||
round
|
round
|
||||||
flat
|
flat
|
||||||
:color="reasonStatus ? 'primary' : 'pink-5'"
|
:color="reasonStatus ? 'primary' : 'pink-5'"
|
||||||
|
|
@ -287,7 +289,7 @@
|
||||||
<q-tooltip>{{
|
<q-tooltip>{{
|
||||||
reasonStatus ? "การกลับเข้ารับราชการ" : "การออกจากราชการ"
|
reasonStatus ? "การกลับเข้ารับราชการ" : "การออกจากราชการ"
|
||||||
}}</q-tooltip>
|
}}</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
|
|
||||||
<q-btn icon="mdi-file-eye-outline" round color="primary" flat>
|
<q-btn icon="mdi-file-eye-outline" round color="primary" flat>
|
||||||
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import keycloak from "@/plugins/keycloak";
|
import keycloak from "@/plugins/keycloak";
|
||||||
import type { TypeFile } from "@/modules/06_retirement/interface/response/Main";
|
import type { TypeFile, rowFile } from "@/modules/06_retirement/interface/response/Main";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -331,6 +331,42 @@ const statusOrder = (val: boolean) => {
|
||||||
return "อนุมัติการลาออก";
|
return "อนุมัติการลาออก";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// เอกสารดาวน์โหลด
|
||||||
|
const rowsFileDownload = ref<rowFile[]>([
|
||||||
|
{
|
||||||
|
fileName:
|
||||||
|
"แบบฟอร์มหนังสือขอลาออกจากราชการ",
|
||||||
|
pathName: "",
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
const fileDownload = async (type: string, fileName: string) => {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(config.API.reportResignList(type, id.value), {
|
||||||
|
responseType: "blob",
|
||||||
|
})
|
||||||
|
.then(async (res) => {
|
||||||
|
downloadFile(res, `${fileName}.${type}`);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const downloadFile = (response: any, filename: string) => {
|
||||||
|
const link = document.createElement("a");
|
||||||
|
var fileName = filename;
|
||||||
|
link.href = window.URL.createObjectURL(new Blob([response.data]));
|
||||||
|
link.setAttribute("download", fileName);
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
document.body.removeChild(link);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
|
|
@ -527,6 +563,53 @@ const statusOrder = (val: boolean) => {
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||||
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
|
<div class="q-pl-sm text-weight-bold text-dark">เอกสารดาวน์โหลด</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12"><q-separator /></div>
|
||||||
|
<div class="col-12">
|
||||||
|
<d-table
|
||||||
|
:rows="rowsFileDownload"
|
||||||
|
:columns="columns"
|
||||||
|
row-key="fileName"
|
||||||
|
hide-header
|
||||||
|
hide-bottom
|
||||||
|
>
|
||||||
|
<template v-slot:body="props">
|
||||||
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
|
<q-td key="fileName" :props="props">
|
||||||
|
{{ props.row.fileName }}
|
||||||
|
</q-td>
|
||||||
|
<q-td key="btnMicrosoft" :props="props">
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
color="red"
|
||||||
|
icon="picture_as_pdf"
|
||||||
|
@click="fileDownload('pdf', props.row.fileName)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ไฟล์ PDF</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
color="blue"
|
||||||
|
icon="mdi-file-word"
|
||||||
|
@click="fileDownload('docx', props.row.fileName)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ไฟล์ WORD</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
</d-table>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
|
||||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">
|
<div class="q-pl-sm text-weight-bold text-dark">
|
||||||
|
|
|
||||||
|
|
@ -35,4 +35,9 @@ interface TypeFile {
|
||||||
pathName: string;
|
pathName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { resMain, ResponseItems, TypeFile };
|
interface rowFile {
|
||||||
|
fileName: string
|
||||||
|
pathName: string
|
||||||
|
|
||||||
|
}
|
||||||
|
export type { resMain, ResponseItems, TypeFile, rowFile };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue