fix report

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-02-11 18:58:33 +07:00
parent 95d744f2b9
commit 9f344c723c
5 changed files with 113 additions and 49 deletions

View file

@ -34,6 +34,7 @@ export default {
/** download File */
developmentReportMain: () => `${developmentReport}/main`,
developmentReport: () => `${developmentReport}/`,
developmentReportHistory: () => `${developmentReport}/history-officer`,
developmentReportHistoryOfficer: () =>
`${developmentReport}/history-employee`,
@ -51,6 +52,7 @@ export default {
devStrategy,
/** IDP */
developmentReQuestIDP: (id: string) => `${developmentOrg}/profile/development/registry/OFFICER/${id}`,
developmentReQuestIDP: (id: string) =>
`${developmentOrg}/profile/development/registry/OFFICER/${id}`,
developmentIDP: (id: string) => `${development}/main/registry/OFFICER/${id}`,
};

View file

@ -52,6 +52,10 @@ const optionReport = ref<OptionData[]>([
id: "report6",
name: "รายงานผลการจ่ายประกาศนียบัตรกำกับเครื่องราชอิสริยาภรณ์ แยกรายหน่วยงาน",
},
{
id: "report7",
name: "รายงานแสดงรายชื่อลูกจ้างประจำที่ได้รับ/ไมได้รับ การจ่ายใบกำกับฯ เครื่องราชอิสริยาภรณที่ได้รับพระราชทาน (ลูกจ้าง)",
},
]);
const roundId = ref<string>("");

View file

@ -170,6 +170,11 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
name: "แนบท้ายคำสั่งค่าตอบแทนพิเศษ และผู้ไม่ได้เลื่อนเงินเดือน รอบตุลาคม (PDF)",
type: "pdf",
},
{
id: "gov-10",
name: "แบบบัญชีถือจ่าย (จ.๑๘) ของข้าราชการกรุงเทพมหานครสามัญ",
},
]);
function fetchPeriodLatest(data: DataPeriodLatest, type: string) {

View file

@ -24,25 +24,51 @@ const employeeClassOption = ref<OptionData[]>([
{ id: "employee", name: "ลูกจ้างประจำ กทม." },
]);
const typeReport = ref<string>("main");
const optionReport = ref<OptionData[]>([
{
id: "main",
name: "โครงการ/กิจกรรมตามแผนพัฒนาทรัพยากรบุคคลของกรุงเทพมหานคร",
},
{
id: "report3",
name: "รายงานข้อมูลข้าราชการกรุงเทพมหานครสามัญที่ได้รับทุนการศึกษาในประเทศ",
},
{
id: "report4",
name: "รายงานข้อมูลข้าราชการกรุงเทพมหานครสามัญที่ได้รับทุนฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)",
},
{
id: "report5",
name: "รายงานข้อมูลข้าราชการกรุงเทพมหานครสามัญที่ได้รับทุนฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)",
},
{
id: "report6",
name: "รายงานข้อมูลข้าราชการกรุงเทพมหานครสามัญ ที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรประเภทนักบริหาร)",
},
{
id: "report7",
name: "รายงานข้อมูลข้าราชการกรุงเทพมหานครสามัญที่ไปศึกษา ฝึกอบรม ประชุม ดูงาน และปฏิบัติการวิจัย ณ ต่างประเทศ",
},
{
id: "report8",
name: "รายงานข้อมูลข้าราชการกรุงเทพมหานครสามัญที่ได้รับทุนไปศึกษา",
},
{
id: "report9",
name: "รายงานสถิติข้อมูลการฝึกอบรม ศึกษาดูงาน ของข้าราชการกรุงเทพมหานครสามัญ",
},
{
id: "report10",
name: "รายงานสถิติข้อมูลการศึกษาต่อของข้าราชการกรุงเทพมหานครสามัญ",
},
]);
const splitterModel = ref(14);
const numOfPages = ref<number>(0);
const page = ref<number>(1);
const pdfSrc = ref<any>();
interface RangeAge {
min: number;
max: number;
}
const objMarkerLabel = computed(() => {
return { 39: `ช่วงอายุ ${rangeAge.value.min}-${rangeAge.value.max} ปี` };
});
const rangeAge = ref<RangeAge>({
min: 18,
max: 60,
});
const detailReport = ref<any>();
/** ไปหน้าต่อไปของรายงาน */
@ -61,8 +87,9 @@ function backPage() {
async function getReport() {
loadingBtn.value = true;
pdfSrc.value = undefined;
await http
.get(config.API.developmentReportMain())
.get(config.API.developmentReport() + `${typeReport.value}`)
.then(async (res) => {
const data = res.data.result;
detailReport.value = data;
@ -131,39 +158,25 @@ onMounted(async () => {
<div class="q-pa-sm q-gutter-sm">
<q-card flat bordered class="col-12">
<div class="row q-col-gutter-sm q-pa-sm">
<div class="row col-12">
<datepicker
menu-class-name="modalfix"
v-model="year"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
@update:model-value="getReport"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
outlined
:model-value="year === 0 ? 'ทั้งหมด' : Number(year) + 543"
:label="`${'ปีงบประมาณ'}`"
bg-color="white"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
<div class="row col-12 q-col-gutter-sm">
<div class="col-md-6 col-xs-12">
<q-select
class="bg-white"
hide-bottom-space
outlined
dense
lazy-rules
borderless
v-model="typeReport"
:label="`${'รายงาน'}`"
emit-value
map-options
:options="optionReport"
option-value="id"
option-label="name"
@update:model-value="getReport"
/>
</div>
<q-space />
<q-btn
@ -212,6 +225,45 @@ onMounted(async () => {
</q-menu>
</q-btn>
</div>
<div class="row col-12">
<q-card bordered class="col-12 filter-card q-pa-sm">
<div class="row col-md-3 col-xs-6">
<datepicker
menu-class-name="modalfix"
v-model="year"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
@update:model-value="getReport"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
outlined
:model-value="year === 0 ? 'ทั้งหมด' : Number(year) + 543"
:label="`${'ปีงบประมาณ'}`"
bg-color="white"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</q-card>
</div>
</div>
</q-card>
<q-card flat bordered class="col-12">

View file

@ -211,6 +211,7 @@ async function fetchDataReportUnified(
"gov-07",
"gov-07-01",
"gov-08",
"gov-10",
].includes(reportCode);
const finalUrl = isGovernmentId ? `${url}/${group.value}` : url;