Merge branch 'develop' into devTee
# Conflicts: # src/modules/11_discipline/components/4_Result/Form.vue # src/modules/11_discipline/store/ResultStore.ts
This commit is contained in:
commit
4f84341a0b
21 changed files with 617 additions and 46 deletions
|
|
@ -7,7 +7,7 @@ import config from "@/app.config";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { ResponsePreson } from "@/interface/response/listPerson";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
|
|
@ -303,3 +303,4 @@ watch(()=>props.selectedData,()=>{
|
|||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
@/modules/11_discipline/store/store
|
||||
|
|
@ -53,27 +53,38 @@ function upLoadFile() {
|
|||
/** Form รายละเอียดข้อมูล*/
|
||||
const formData = reactive<FremData>({
|
||||
id: "", //Id การยื่นขอลา
|
||||
reasonCommander: "", //เหตุผลผู้บังคับบัญชา
|
||||
reasonOligarch: "", //เหตุผลผู้มีอำนาจ
|
||||
positionName: "", //ตำแหน่งผู้ยื่นขอ
|
||||
positionLevelName: "", //ระดับผู้ยื่นขอ
|
||||
organizationName: "", //สังกัดผู้ยื่นขอ
|
||||
leaveTypeName: "", // Name ประเภทการลา
|
||||
leaveTypeId: "", //Id ประเภทการลา
|
||||
fullname: "", //คำนำหน้า ชื่อ นามสกุล คนขอลา
|
||||
dateSendLeave: new Date(), // วันที่ยืนใบลา
|
||||
leaveDateStart: new Date(), //วันเริ่มการลา
|
||||
leaveDateEnd: new Date(), //วันสิ้นสุดการลา
|
||||
leaveCount: 0, //จำนวนวันลา
|
||||
status: "", //สถานะการของลา
|
||||
leaveLimit: 0, //โควต้าลา(แต่ละประเภท)หน่วยเป็นวัน
|
||||
leaveTotal: 0, //ลาป่วยไปแล้ว(แต่ละประเภท)หน่วยเป็นวัน
|
||||
leaveSummary: 0, //ลาป่วยไปแล้ว(แต่ละประเภท)หน่วยเป็นวัน
|
||||
leaveRemain: 0, //คงเหลือโควต้า(แต่ละประเภท)หน่วยเป็นวัน
|
||||
leaveStartDate: new Date(), //*วัน เดือน ปีเริ่มต้นลา
|
||||
leaveEndDate: new Date(), //*วัน เดือน ปีสิ้นสุดลา
|
||||
// leaveStartDate: new Date(), //*วัน เดือน ปีเริ่มต้นลา
|
||||
// leaveEndDate: new Date(), //*วัน เดือน ปีสิ้นสุดลา
|
||||
leaveWrote: "", //เขียนที่
|
||||
leaveAddress: "", //สถานที่ติดต่อขณะลา
|
||||
leaveNumber: "", //หมายเลขที่ติดต่อขณะลา
|
||||
leaveDetail: "", //รายละเอียดการลา
|
||||
leaveDocument: "", //อัปโหลดเอกสารประกอบรายละเอียด
|
||||
leaveLast: new Date(), //ลาครั้งสุดท้ายในประเภทนั้น ๆ เมื่อวันที่(ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว)(Auto)
|
||||
leaveDateTotal: 0, //จำนวนวันที่ลา(Auto)
|
||||
leaveDraftDocument: "", //อัปโหลดแบบฟอร์มการลา
|
||||
leaveLastStart: new Date(), //ลาครั้งสุดท้ายในประเภทนั้น ๆ เริ่มเมื่อวันที่(ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว)(Auto)
|
||||
leaveLastEnd: new Date(), //ลาครั้งสุดท้ายในประเภทนั้น ๆ สิ้นสุดเมื่อวันที่(ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว)(Auto)
|
||||
leaveTotal: 0, //จำนวนวันที่ลา(Auto)
|
||||
leavebirthDate: new Date(), //วันเดือนปีเกิด(Auto)
|
||||
leavegovernmentDate: new Date(), //วันที่เข้ารับราชการ(Auto)
|
||||
leaveSalary: 0, //เงินเดือนปัจจุบัน(Auto)
|
||||
leaveSalaryText: "", //เงินเดือนปัจจุบัน(เขียนเป็นคำอ่าน)
|
||||
leaveTypeDay: "", //ประเภทการลาในวันนั้นเช่น
|
||||
wifeDayName: "", //ชื่อภรรยา(ลาไปช่วยเหลือภริยาที่คลอดบุตร)
|
||||
wifeDayDateBorn: new Date(), //วันที่คลอด(ลาไปช่วยเหลือภริยาที่คลอดบุตร)
|
||||
restDayOldTotal: 0, //จำนวนวันลาพักผ่อนสะสม จากปีที่ผ่านมา(ลาพักผ่อน)(Auto)
|
||||
|
|
@ -127,31 +138,40 @@ function fetchDetailLeave(paramsId: string) {
|
|||
console.log(data);
|
||||
data.map((e: any) => {
|
||||
formData.id = e.id;
|
||||
formData.reasonCommander = e.reasonCommander;
|
||||
formData.reasonOligarch = e.reasonOligarch;
|
||||
formData.positionName = e.positionName;
|
||||
formData.positionLevelName = e.positionLevelName;
|
||||
formData.organizationName = e.organizationName;
|
||||
formData.leaveTypeName = e.leaveTypeName
|
||||
? e.leaveTypeName
|
||||
: stores.convertLeave(e.leaveTypeId);
|
||||
formData.leaveTypeId = e.leaveTypeId;
|
||||
formData.fullname = e.fullname;
|
||||
formData.dateSendLeave = e.dateSendLeave && date2Thai(e.dateSendLeave);
|
||||
formData.leaveDateStart = e.leaveDateStart && date2Thai(e.leaveDateStart);
|
||||
formData.leaveDateEnd = e.leaveDateEnd && date2Thai(e.leaveDateEnd);
|
||||
formData.leaveCount = e.leaveCount;
|
||||
formData.status = e.status && e.status;
|
||||
formData.leaveLimit = e.leaveLimit;
|
||||
formData.leaveTotal = e.leaveTotal;
|
||||
formData.leaveSummary = e.leaveSummary;
|
||||
formData.leaveRemain = e.leaveRemain;
|
||||
formData.leaveStartDate = e.leaveStartDate && date2Thai(e.leaveStartDate);
|
||||
formData.leaveEndDate = e.leaveEndDate && date2Thai(e.leaveEndDate);
|
||||
formData.status = e.status;
|
||||
formData.leaveWrote = e.leaveWrote;
|
||||
formData.leaveAddress = e.leaveAddress;
|
||||
formData.leaveNumber = e.leaveNumber;
|
||||
formData.leaveDetail = e.leaveDetail;
|
||||
formData.leaveDocument = e.leaveDocument;
|
||||
formData.leaveLast = e.leaveLast && date2Thai(e.leaveLast);
|
||||
formData.leaveDateTotal = e.leaveDateTotal;
|
||||
formData.leaveDraftDocument = e.leaveDraftDocument;
|
||||
formData.leaveLastStart = e.leaveLastStart && date2Thai(e.leaveLastStart);
|
||||
formData.leaveLastEnd = e.leaveLastStart && date2Thai(e.leaveLastEnd);
|
||||
formData.leaveTotal = e.leaveTotal;
|
||||
formData.leavebirthDate = e.leavebirthDate && date2Thai(e.leavebirthDate);
|
||||
formData.leavegovernmentDate =
|
||||
e.leavegovernmentDate && date2Thai(e.leavegovernmentDate);
|
||||
formData.leaveSalary = e.leaveSalary;
|
||||
formData.leaveSalaryText = e.leaveSalaryText;
|
||||
formData.leaveTypeDay =
|
||||
e.leaveTypeDay && stores.convertLeaveDaytype(e.leaveTypeDay);
|
||||
formData.wifeDayName = e.wifeDayName;
|
||||
formData.wifeDayDateBorn =
|
||||
e.wifeDayDateBorn && date2Thai(e.wifeDayDateBorn);
|
||||
|
|
|
|||
480
src/modules/09_leave/components/3_Report/DetailReport.vue
Normal file
480
src/modules/09_leave/components/3_Report/DetailReport.vue
Normal file
|
|
@ -0,0 +1,480 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import type {
|
||||
DataDateMonthObject,
|
||||
DataOption,
|
||||
} from "@/modules/09_leave/interface/index/Main";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
const route = useRoute();
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError, showLoader, hideLoader, date2Thai, monthYear2Thai } =
|
||||
mixin;
|
||||
|
||||
const typeReport = route.params.type.toString();
|
||||
const titleReport = computed(() => {
|
||||
const title =
|
||||
typeReport === "daily"
|
||||
? "รายงานสรุปบันทึกการลงเวลาปฏิบัติงานเป็นรายวัน"
|
||||
: typeReport === "monthly"
|
||||
? "รายงานสรุปบันทึกการลงเวลาปฏิบัติงานเป็นรายเดือน"
|
||||
: typeReport === "yearly"
|
||||
? "รายงานสรุปบันทึกการลงเวลาปฏิบัติงานเป็นรายปี"
|
||||
: typeReport === "leaveday"
|
||||
? "บัญชีแสดงวันลา"
|
||||
: "";
|
||||
return title;
|
||||
});
|
||||
|
||||
const date = ref<Date>(new Date());
|
||||
const dateMonth = ref<DataDateMonthObject>({
|
||||
month: new Date().getMonth(),
|
||||
year: new Date().getFullYear(),
|
||||
});
|
||||
const year = ref<number>(new Date().getFullYear());
|
||||
const dateStart = ref<Date>(new Date());
|
||||
const dateEnd = ref<Date>(new Date());
|
||||
const employeeClass = ref<string>("");
|
||||
|
||||
function monthYearThai(val: DataDateMonthObject) {
|
||||
if (val == null) return "";
|
||||
else return monthYear2Thai(val.month, val.year);
|
||||
}
|
||||
|
||||
const employeeClassMain = ref<DataOption[]>([
|
||||
{ id: "perm", name: "ลูกจ้างประจำ" },
|
||||
{ id: "temp", name: "ลูกจ้างชั่วคราว" },
|
||||
]);
|
||||
const employeeClassOption = ref<DataOption[]>(employeeClassMain.value);
|
||||
|
||||
function filterFnOptions(val: any, update: Function) {
|
||||
update(() => {
|
||||
employeeClassOption.value = employeeClassMain.value.filter(
|
||||
(v: DataOption) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
const splitterModel = ref(14);
|
||||
const numOfPages = ref<number>(0);
|
||||
const page = ref<number>(1);
|
||||
const pdfSrc = ref<any>();
|
||||
const modalFull = ref<boolean>(false);
|
||||
/** ไปหน้าต่อไปของรายงาน */
|
||||
function nextPage() {
|
||||
if (page.value < numOfPages.value) {
|
||||
page.value++;
|
||||
}
|
||||
}
|
||||
|
||||
/** กลับหน้าก่อนหน้าของรายงาน */
|
||||
function backPage() {
|
||||
if (page.value !== 1) {
|
||||
page.value--;
|
||||
}
|
||||
}
|
||||
|
||||
/** กลับหน้าหลัก */
|
||||
function backHistory() {
|
||||
window.history.back();
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="toptitle">
|
||||
<q-btn
|
||||
icon="mdi-arrow-left"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
flat
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
@click="backHistory"
|
||||
/>
|
||||
{{ titleReport }}
|
||||
</div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
||||
<div class="q-pa-md q-gutter-y-sm">
|
||||
<q-toolbar style="padding: 0">
|
||||
<div class="q-pr-xs" v-if="typeReport === 'daily'">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="date"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
borderless
|
||||
:model-value="date ? date2Thai(date) : null"
|
||||
:label="`${'วันที่'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" color="primary">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="q-pr-xs" v-if="typeReport === 'monthly'">
|
||||
<datepicker
|
||||
v-model="dateMonth"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
month-picker
|
||||
:enableTimePicker="false"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
borderless
|
||||
:label="`${'เดือนที่'}`"
|
||||
:model-value="monthYearThai(dateMonth)"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
></q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="q-pr-xs" v-if="typeReport === 'yearly'">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="year"
|
||||
class="col-2"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:model-value="Number(year) + 543"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
|
||||
<div class="q-pl-xs" v-if="typeReport === 'leaveday'">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateStart"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
borderless
|
||||
:model-value="dateStart ? date2Thai(dateStart) : null"
|
||||
:label="`${'ตั้งเเต่วันที่'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" color="primary">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="q-pl-xs" v-if="typeReport === 'leaveday'">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateEnd"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
borderless
|
||||
:model-value="dateEnd ? date2Thai(dateEnd) : null"
|
||||
:label="`${'ถึงวันที่'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" color="primary">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
|
||||
<q-space />
|
||||
<div class="q-py-xs">
|
||||
<q-btn unelevated color="primary" @click="modalFull = true">
|
||||
<q-icon left size="2em" name="mdi-eye-outline" />
|
||||
<div>แสดงรายงาน</div>
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-toolbar>
|
||||
|
||||
<q-toolbar
|
||||
v-if="typeReport === 'leaveday'"
|
||||
class="q-pa-sm bg-grey-2"
|
||||
style="border-radius: 5px"
|
||||
>
|
||||
<div class="q-pr-xs">
|
||||
<q-select
|
||||
class="bg-white"
|
||||
outlined
|
||||
dense
|
||||
v-model="employeeClass"
|
||||
:options="employeeClassOption"
|
||||
label="สถานภาพ"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
use-input
|
||||
style="width: 230px"
|
||||
@filter="(inputValue: any,
|
||||
doneFn: Function) => filterFnOptions(inputValue, doneFn)"
|
||||
><template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
</div></q-toolbar
|
||||
>
|
||||
<q-splitter
|
||||
v-model="splitterModel"
|
||||
horizontal
|
||||
style="
|
||||
height: 70vh;
|
||||
border: 1px solid rgb(210, 210, 210);
|
||||
border-radius: 5px;
|
||||
"
|
||||
before-class="overflow-hidden disable"
|
||||
separator-class="bg-white disabled"
|
||||
>
|
||||
<template v-slot:before>
|
||||
<div class="q-px-sm">
|
||||
<div class="row items-start items-center">
|
||||
<div class="col">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-left"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
class="my-auto"
|
||||
@click="backPage"
|
||||
:disable="page == 1"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto">
|
||||
<div class="q-pa-md flex">
|
||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-right"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
@click="nextPage"
|
||||
:disable="page === numOfPages"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<div class="q-pa-md">
|
||||
<VuePDF ref="vuePDFRef" :pdf="pdfSrc" :page="page" fit-parent />
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:default>
|
||||
<div class="q-pa-md">
|
||||
<div class="row items-start items-center">
|
||||
<div class="col">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-left"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
class="my-auto"
|
||||
@click="backPage"
|
||||
:disable="page == 1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-auto">
|
||||
<div class="q-pa-md flex">
|
||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-right"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
@click="nextPage"
|
||||
:disable="page === numOfPages"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</q-splitter>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<!-- Dialog Full Screen -->
|
||||
<q-dialog
|
||||
v-model="modalFull"
|
||||
persistent
|
||||
:maximized="true"
|
||||
transition-show="slide-up"
|
||||
transition-hide="slide-down"
|
||||
>
|
||||
<q-card class="bg-white">
|
||||
<div class="flex justify-end items-center align-center q-mr-md q-mt-sm">
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
size="12px"
|
||||
v-close-popup
|
||||
/>
|
||||
</div>
|
||||
<div class="q-pa-md">
|
||||
<div class="row items-start items-center">
|
||||
<div class="col">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-left"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
class="my-auto"
|
||||
@click="backPage"
|
||||
:disable="page == 1"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto">
|
||||
<div class="q-pa-md flex">
|
||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-right"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
@click="nextPage"
|
||||
:disable="page === numOfPages"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row items- items-center">
|
||||
<VuePDF ref="vuePDFRef" :pdf="pdfSrc" :page="page" fit-parent />
|
||||
</div>
|
||||
<div class="row items- items-end">
|
||||
<div class="col">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-left"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
class="my-auto"
|
||||
@click="backPage"
|
||||
:disable="page == 1"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto">
|
||||
<div class="q-pa-md flex">
|
||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-right"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
@click="nextPage"
|
||||
:disable="page === numOfPages"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -6,4 +6,8 @@ interface DataOption2 {
|
|||
id: number;
|
||||
name: string;
|
||||
}
|
||||
export type { DataOption, DataOption2 };
|
||||
interface DataDateMonthObject {
|
||||
month: number;
|
||||
year: number;
|
||||
}
|
||||
export type { DataOption, DataOption2, DataDateMonthObject };
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
const workMain = () => import("@/modules/09_leave/views/WorkingMain.vue");
|
||||
const leaveMain = () => import("@/modules/09_leave/views/LeaveListMain.vue");
|
||||
const reportMain = () => import("@/modules/09_leave/views/ReportMain.vue");
|
||||
const reportDetail = () =>
|
||||
import("@/modules/09_leave/components/3_Report/DetailReport.vue");
|
||||
const leaveDetail = () =>
|
||||
import("@/modules/09_leave/components/2_Leave/DetailLeave.vue");
|
||||
const leaveDetailReject = () =>
|
||||
|
|
@ -102,4 +104,14 @@ export default [
|
|||
Role: "coin",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/statistics-report/:type",
|
||||
name: "/statistics-report-detail",
|
||||
component: reportDetail,
|
||||
meta: {
|
||||
Auth: true,
|
||||
Key: [9],
|
||||
Role: "coin",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,9 +1,66 @@
|
|||
<script setup lang="ts"></script>
|
||||
<script setup lang="ts">
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
function nextPage(type: string,) {
|
||||
router.push(`/statistics-report/${type}`);
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">รายงานสถิติ</div>
|
||||
<div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm"> </q-card>
|
||||
<q-card flat bordered class="col-12 q-mt-sm">
|
||||
<div class="q-pa-md">
|
||||
<q-item clickable dense class="hover-green" @click="nextPage('daily')">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="primary" name="mdi-file" size="xs" />
|
||||
</q-item-section>
|
||||
<q-item-section class="text-dark">
|
||||
รายงานสรุปบันทึกการลงเวลาปฏิบัติงานเป็นรายวัน
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
clickable
|
||||
dense
|
||||
class="hover-green"
|
||||
@click="nextPage('monthly')"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="primary" name="mdi-file" size="xs" />
|
||||
</q-item-section>
|
||||
<q-item-section class="text-dark">
|
||||
รายงานสรุปบันทึกการลงเวลาปฏิบัติงานเป็นรายเดือน
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item clickable dense class="hover-green" @click="nextPage('yearly')">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="primary" name="mdi-file" size="xs" />
|
||||
</q-item-section>
|
||||
<q-item-section class="text-dark">
|
||||
รายงานสรุปบันทึกการลงเวลาปฏิบัติงานเป็นรายปี
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item clickable dense class="hover-green" @click="nextPage('leaveday')">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="primary" name="mdi-file" size="xs" />
|
||||
</q-item-section>
|
||||
<q-item-section class="text-dark"> บัญชีแสดงวันลา </q-item-section>
|
||||
</q-item>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
.q-item.hover-green:hover {
|
||||
background-color: #d5f1ee57;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.q-item.hover-green {
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import type {
|
|||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
||||
const complainstStore = useComplainstDataStore();
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
|
@ -378,3 +378,4 @@ onMounted(() => {
|
|||
/>
|
||||
</div>
|
||||
</template>
|
||||
@/modules/11_discipline/store/store
|
||||
|
|
@ -12,7 +12,7 @@ import type {
|
|||
/** importStroe*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -366,7 +366,7 @@ onMounted(() => {
|
|||
<q-card bordered>
|
||||
<div class="col-12 row q-pa-md">
|
||||
<div class="col-xs-12 col-sm-12 row q-col-gutter-md">
|
||||
<div class="col-xs-12 col-sm-3" id="respondentType">
|
||||
<div class="col-xs-12 col-sm-4" id="respondentType">
|
||||
<q-select
|
||||
for="SelectrespondentType"
|
||||
v-model="formData.respondentType"
|
||||
|
|
@ -400,7 +400,7 @@ onMounted(() => {
|
|||
</div>
|
||||
|
||||
<div
|
||||
class="col-xs-12 col-sm-3"
|
||||
class="col-xs-12 col-sm-4"
|
||||
v-if="formData.respondentType === 'ORGANIZATION'"
|
||||
id="organizationId"
|
||||
>
|
||||
|
|
@ -425,7 +425,7 @@ onMounted(() => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-3" id="consideredAgency">
|
||||
<div class="col-xs-12 col-sm-4" id="consideredAgency">
|
||||
<q-select
|
||||
ref="consideredAgencyRef"
|
||||
for="selectAgency"
|
||||
|
|
@ -997,3 +997,4 @@ onMounted(() => {
|
|||
min-height: 25px;
|
||||
}
|
||||
</style>
|
||||
@/modules/11_discipline/store/store
|
||||
|
|
@ -4,7 +4,7 @@ import { ref, onMounted, watch } from "vue";
|
|||
import type { QTableProps } from "quasar";
|
||||
// importStroe
|
||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useRouter } from "vue-router";
|
||||
const currentPage = ref<number>(1);
|
||||
const router = useRouter();
|
||||
const complainstStore = useComplainstDataStore();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import FormInvestigatefacts from "@/modules/11_discipline/components/2_Investiga
|
|||
import { useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
import { useQuasar } from "quasar";
|
||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
|
|
@ -14,7 +14,6 @@ import type {
|
|||
ArrayPerson,
|
||||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -382,4 +381,4 @@ watch(
|
|||
padding: 0;
|
||||
background-color: #f0f3f3;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
@ -2,14 +2,13 @@
|
|||
import { useRouter, useRoute } from "vue-router";
|
||||
import { onMounted, ref, watch, reactive, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { QTableProps } from "quasar";
|
||||
import DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/DirectorTable.vue";
|
||||
import Table from "@/modules/11_discipline/components/DirectorTable.vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
||||
import type {
|
||||
FormData,
|
||||
|
|
@ -1333,3 +1332,4 @@ onMounted(async () => {
|
|||
min-height: 25px;
|
||||
}
|
||||
</style>
|
||||
@/modules/11_discipline/store/store
|
||||
|
|
@ -11,15 +11,8 @@ import http from "@/plugins/http";
|
|||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
const dataInvestigate = useInvestigateFactStore();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
date2Thai,
|
||||
success,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
dialogRemove,
|
||||
} = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
|
||||
/** ค้นหาข้อมูลในตาราง */
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import { useRouter, useRoute } from "vue-router";
|
|||
import type { QTableProps } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
||||
/**import component*/
|
||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||
|
|
|
|||
|
|
@ -24,15 +24,14 @@ import type { DataOptionRes } from "@/modules/11_discipline/interface/response/M
|
|||
/** import components*/
|
||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||
import DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
||||
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/DirectorTable.vue";
|
||||
import Table from "@/modules/11_discipline/components/DirectorTable.vue";
|
||||
import UploadFile from "@/modules/11_discipline/components/UploadFile.vue";
|
||||
|
||||
/** import store*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||
import { co } from "@fullcalendar/core/internal-common";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
||||
const complainstStore = useComplainstDataStore();
|
||||
const investigateDis = useInvestigateDisStore();
|
||||
|
|
@ -1388,3 +1387,4 @@ onMounted(async () => {
|
|||
/>
|
||||
<!-- :fecthlistappointment="fecthlistappointment" -->
|
||||
</template>
|
||||
@/modules/11_discipline/store/store
|
||||
|
|
@ -8,7 +8,7 @@ import { useRouter, useRoute } from "vue-router";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
||||
import type {
|
||||
FormData,
|
||||
|
|
@ -144,7 +144,6 @@ watch(
|
|||
async () => {
|
||||
console.log(props.data);
|
||||
respondentType.value = props.data.respondentType;
|
||||
mainStore.rowsAdd = props.data.persons
|
||||
await fetchDatadetail();
|
||||
await fetchOrganization();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ interface ArrayPerson {
|
|||
salary:number|null
|
||||
organization:string
|
||||
}
|
||||
|
||||
interface ArrayFileList {
|
||||
id:string
|
||||
pathName:string
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import type {
|
|||
} from "@/modules/11_discipline/interface/response/complaint";
|
||||
import type { ArrayPerson } from "@/modules/11_discipline/interface/request/complaint";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import type {
|
|||
ListData,
|
||||
ocListType,
|
||||
} from "@/modules/11_discipline/interface/response/investigate";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
|
|
|
|||
|
|
@ -12,8 +12,13 @@ import type {
|
|||
} from "@/modules/11_discipline/interface/response/result";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
<<<<<<< HEAD
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||
|
||||
=======
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
>>>>>>> develop
|
||||
const mixin = useCounterMixin();
|
||||
const storeMain = useDisciplineMainStore();
|
||||
const { date2Thai } = mixin;
|
||||
|
|
@ -251,7 +256,6 @@ export const useDisciplineResultStore = defineStore(
|
|||
fetchList,
|
||||
rows,
|
||||
rows2,
|
||||
fecthDirector,
|
||||
visibleColumns,
|
||||
columns,
|
||||
visibleColumnsDirector,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue