fix:DialogCandidates

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-10-14 11:57:31 +07:00
parent a719b98791
commit 41e08b7200
2 changed files with 20 additions and 5 deletions

View file

@ -12,6 +12,7 @@ import { useCounterMixin } from "@/stores/mixin";
import type { RecruitDetailResponse } from "@/modules/03_recruiting/interface/response/Period"; import type { RecruitDetailResponse } from "@/modules/03_recruiting/interface/response/Period";
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main"; import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
import DialogCandidates from "@/modules/03_recruiting/components/DialogCandidates.vue";
import Table from "@/modules/03_recruiting/components/Table.vue"; import Table from "@/modules/03_recruiting/components/Table.vue";
import genReportXLSX from "@/plugins/genreportxlsx"; import genReportXLSX from "@/plugins/genreportxlsx";
@ -349,7 +350,7 @@ async function fetchData() {
} }
/** บรรจุผู้ผ่านการคัดเลือกผู้พิการ */ /** บรรจุผู้ผ่านการคัดเลือกผู้พิการ */
async function candidateToPlacement() { async function onSubmitCandidates() {
$q.dialog({ $q.dialog({
title: "ยืนยันการนำผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุ", title: "ยืนยันการนำผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุ",
message: "ต้องการนำผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุใช่หรือไม่?", message: "ต้องการนำผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุใช่หรือไม่?",
@ -363,15 +364,16 @@ async function candidateToPlacement() {
showLoader(); showLoader();
await http await http
.get(config.API.periodDisableToPlacement(importId.value)) .get(config.API.periodDisableToPlacement(importId.value))
.then((res) => { .then(() => {
success($q, "นำผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุ"); success($q, "นำผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุ");
modalCandidates.value = false;
router.go(-1);
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);
}) })
.finally(async () => { .finally(async () => {
hideLoader(); hideLoader();
router.go(-1);
}); });
}) })
.onCancel(() => {}) .onCancel(() => {})
@ -386,6 +388,13 @@ function onSearch() {
); );
} }
const modalCandidates = ref(false); // dialog
/** ฟังก์ชันเปิดโมดัลสำหรับผู้ส่งผ่านคัดเลือก */
function openModalCandidates() {
modalCandidates.value = true;
}
onMounted(async () => { onMounted(async () => {
hideLoader(); hideLoader();
await fetchData(); await fetchData();
@ -413,7 +422,7 @@ onMounted(async () => {
flat flat
color="indigo" color="indigo"
v-if="rows.length > 0" v-if="rows.length > 0"
@click="candidateToPlacement" @click="openModalCandidates"
> >
<q-tooltip>บรรจานการคดเลอกผการ</q-tooltip> <q-tooltip>บรรจานการคดเลอกผการ</q-tooltip>
</q-btn> </q-btn>
@ -517,6 +526,12 @@ onMounted(async () => {
</Table> </Table>
</div> </div>
</q-card> </q-card>
<DialogCandidates
:title="'ส่งผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุ'"
v-model:modal="modalCandidates"
:on-submit="onSubmitCandidates"
/>
</template> </template>
<style></style> <style></style>

View file

@ -1679,6 +1679,7 @@ onMounted(async () => {
<DialogHeader :tittle="`เลือกวันรายงานตัว`" :close="clickClose" /> <DialogHeader :tittle="`เลือกวันรายงานตัว`" :close="clickClose" />
<q-separator /> <q-separator />
<q-card-section class="q-p-sm"> <q-card-section class="q-p-sm">
<!-- :min-date="new Date()" -->
<datepicker <datepicker
menu-class-name="modalfix" menu-class-name="modalfix"
v-model="reportingDate" v-model="reportingDate"
@ -1687,7 +1688,6 @@ onMounted(async () => {
borderless borderless
:enableTimePicker="false" :enableTimePicker="false"
week-start="0" week-start="0"
:min-date="new Date()"
> >
<template #year="{ year }"> <template #year="{ year }">
{{ year + 543 }} {{ year + 543 }}