Merge branch 'develop' into dev-tee
This commit is contained in:
commit
a19a0634d4
4 changed files with 91 additions and 68 deletions
|
|
@ -5,6 +5,7 @@ import env from "../index";
|
|||
const reportOrder = `${env.API_REPORT2_URI}/report/order`;
|
||||
const reportRetire = `${env.API_REPORT2_URI}/report/retire`;
|
||||
const reportProbation = `${env.API_REPORT2_URI}/report/probation`;
|
||||
const reportResign = `${env.API_REPORT2_URI}/report/resign/33`;
|
||||
|
||||
export default {
|
||||
reportOrderCover: (fileType: string, id: string, commandCode: string) =>
|
||||
|
|
@ -13,6 +14,8 @@ export default {
|
|||
`${reportOrder}/${commandCode}/attachment/${fileType}/${id}`,
|
||||
reportRetireList: (fileType: string, id: string) =>
|
||||
`${reportRetire}/${fileType}/${id}`,
|
||||
reportResignList: (fileType: string, id: string) =>
|
||||
`${reportResign}/${fileType}/${id}`,
|
||||
|
||||
fileCover: (format: string, fileType: string, id: string) =>
|
||||
`${reportOrder}/${format}/cover/${fileType}/${id}`,
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { useQuasar } from "quasar";
|
|||
import { useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRetirementDataStore } from "@/modules/06_retirement/store";
|
||||
import DialogHeader from "@/modules/06_retirement/components/DialogHeader.vue";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -183,7 +184,6 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
name: "positionTypeOld",
|
||||
align: "left",
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ onMounted(async () => {
|
|||
} else {
|
||||
roleUser.value = "admin";
|
||||
}
|
||||
console.log(roleUser.value);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -181,6 +180,37 @@ const fetchData = async (id: string) => {
|
|||
hideLoader();
|
||||
});
|
||||
};
|
||||
const rowsFileDownload = ref<TypeFile[]>([
|
||||
{ fileName: "หนังสือลาออกจากราขการ", pathName: "" },
|
||||
]);
|
||||
const downloadAttachment = async (type: string, id: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.reportResignList(type, id), {
|
||||
responseType: "blob",
|
||||
})
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
console.log(data);
|
||||
let list: TypeFile[] = [];
|
||||
downloadFile(res, `หนังสือลาออกจากราขการ.${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);
|
||||
};
|
||||
|
||||
const popUp = (action: "pass" | "passNot") => {
|
||||
reasonReign.value = "";
|
||||
|
|
@ -519,6 +549,57 @@ const statusOrder = (val: boolean) => {
|
|||
</d-table>
|
||||
</div>
|
||||
</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="no" :props="props">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
<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="downloadAttachment('pdf', id)"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="blue"
|
||||
icon="mdi-file-word"
|
||||
@click="downloadAttachment('docx', id)"
|
||||
>
|
||||
<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">
|
||||
<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">
|
||||
|
|
@ -901,67 +982,6 @@ const statusOrder = (val: boolean) => {
|
|||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
|
||||
<!-- <q-dialog v-model="modalPass" persistent>
|
||||
<q-card style="width: 800px">
|
||||
<q-form ref="myForm">
|
||||
<DialogHeader
|
||||
:title="`${modalPass ? 'อนุมัติ' : 'ยับยั้ง'}`"
|
||||
:close="clickClose"
|
||||
/>
|
||||
<q-separator />
|
||||
<q-card-section class="q-p-sm">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-input
|
||||
hide-bottom-space
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:rules="[(val) => !!val || 'กรุณากรอกเหตุผล']"
|
||||
v-model="userNote"
|
||||
:label="`${'กรอกเหตุผล'}`"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<DialogFooter
|
||||
:editvisible="true"
|
||||
:save="modalPass ? savePass : savePassNot"
|
||||
/>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="modalPassNot" persistent>
|
||||
<q-card style="width: 800px">
|
||||
<q-form ref="myForm">
|
||||
<DialogHeader
|
||||
:title="`${modalPass ? 'อนุมัติ' : 'ยับยั้ง'}`"
|
||||
:close="clickClose"
|
||||
/>
|
||||
<q-separator />
|
||||
<q-card-section class="q-p-sm">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-input
|
||||
hide-bottom-space
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:rules="[(val) => !!val || 'กรุณากรอกเหตุผล']"
|
||||
v-model="userNote"
|
||||
:label="`${'กรอกเหตุผล'}`"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<DialogFooter
|
||||
:editvisible="true"
|
||||
:save="modalPass ? savePass : savePassNot"
|
||||
/>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog> -->
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card style="width: 800px">
|
||||
<q-form ref="myFormConfirm">
|
||||
|
|
|
|||
|
|
@ -1753,7 +1753,7 @@ const getClass = (val: boolean) => {
|
|||
dense
|
||||
lazy-rules
|
||||
v-model="chairman"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อประธาน)'}`]"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อประธาน'}`]"
|
||||
:label="`${'ประธาน'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
|
|
@ -1782,7 +1782,7 @@ const getClass = (val: boolean) => {
|
|||
dense
|
||||
lazy-rules
|
||||
v-model="director"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อกรรมการ)'}`]"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อกรรมการ'}`]"
|
||||
:label="`${'กรรมการ'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
|
|
@ -1811,7 +1811,7 @@ const getClass = (val: boolean) => {
|
|||
dense
|
||||
lazy-rules
|
||||
v-model="director2"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อกรรมการ)'}`]"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อกรรมการ'}`]"
|
||||
:label="`${'กรรมการ'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
|
|
@ -1852,7 +1852,7 @@ const getClass = (val: boolean) => {
|
|||
dense
|
||||
lazy-rules
|
||||
v-model="committeeOrder"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกอนุสนธิคำสั่งที่'}`]"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกอนุสนธิคำสั่งที่'}`]"
|
||||
:label="`${'อนุสนธิคำสั่งที่'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
|
|
@ -1915,7 +1915,7 @@ const getClass = (val: boolean) => {
|
|||
dense
|
||||
lazy-rules
|
||||
v-model="receiveOc"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกชื่อหน่วยงาน'}`]"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกหน่วยงาน'}`]"
|
||||
:label="`${'ชื่อหน่วยงาน'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue