Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m18s

* develop:
  fix: แก้ข้อความบรรจุ และเปิดสถานะและแก้ข้อความเผื่อกรณีชำระเงิน
  fix:add feild graduationYearLock
  แก้ไฟล์ "ก.พ.7/ก.ก.1" เป็น "ทปอ. สามัญ" เฉพาะที่เป็น ทะเบียนประวัติอิเล็กทรอนิกส์
  fix:display reviewPoint
  fix:default Card  summary
  fix:convertDatetimeToAPI
  fix(qualify/manage): del status checkRegister , edit status checkSeat
  fix(qualify):set default yearly
This commit is contained in:
Warunee Tamkoo 2025-11-18 16:13:05 +07:00
commit 873d1b3487
8 changed files with 128 additions and 60 deletions

View file

@ -193,7 +193,7 @@ const fetchCard = async () => {
</div>
</div>
</q-card>
<q-card bordered flat class="col-12 row q-mt-md">
<!-- <q-card bordered flat class="col-12 row q-mt-md">
<div class="q-pa-md row">
<div class="col-12 text-weight-bold row items-center">
แบบสอบถามความพงพอใจ
@ -221,7 +221,7 @@ const fetchCard = async () => {
</div>
</div>
</div>
</q-card>
</q-card> -->
</template>
<style lang="scss" scoped></style>

View file

@ -461,6 +461,7 @@ watch(
</div>
</div>
</q-card>
<div class="col-12 row q-py-sm items-center q-col-gutter-sm">
<div class="col-xs-12 col-sm-3" v-show="!statusPayment">
<q-select
@ -499,9 +500,9 @@ watch(
<q-tooltip>ดาวนโหลดไฟล</q-tooltip>
<q-menu>
<q-list style="min-width: 100px">
<q-item clickable v-close-popup @click="downloadFileDashboard">
<!-- <q-item clickable v-close-popup @click="downloadFileDashboard">
<q-item-section>ดาวนโหลดสรปขอมลสมครสอบ</q-item-section>
</q-item>
</q-item> -->
<q-item
clickable
v-close-popup

View file

@ -75,6 +75,7 @@ interface RequestPosition {
typeId: string;
typeName: string;
highDegree: Boolean;
educationLevel?: string;
}
interface RequestPayment {

View file

@ -56,6 +56,7 @@ interface ResponsePosition {
name: string;
};
highDegree: string;
educationLevel?: string;
}
interface ResponsePayment {
id: string;

View file

@ -8,7 +8,6 @@ import { useRouter, useRoute } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { calculateFiscalYear } from "@/utils/function";
import type {
RequestPosition,
@ -37,7 +36,7 @@ const route = useRoute();
const {
date2Thai,
success,
convertDatetimeToAPI,
messageError,
showLoader,
hideLoader,
@ -75,7 +74,7 @@ const checkDocument = ref<boolean>(false);
const checkDisability = ref<boolean>(false);
const announcementExam = ref<boolean>(true);
const round = ref<number>(1);
const yearly = ref<number>(calculateFiscalYear(new Date()));
const yearly = ref<number>(new Date().getFullYear());
const nameRaw = ref<number | null>(null);
const roundRaw = ref<number | null>(null);
const yearlyRaw = ref<number | null>(null);
@ -84,6 +83,7 @@ const datePayment = ref<[Date, Date] | null>(null); //วันที่จ่
const dateAnnouncement = ref<[Date, Date] | null>(null); //
const dateAnnounce = ref<Date | null>(null); //
const dateExam = ref<Date | null>(null); //
const graduationYearLock = ref<number>(3); // ()
const myFormPayment = ref<any>();
const myFormPosition = ref<any>();
const organizationShortName = ref<DataOption2>();
@ -150,6 +150,7 @@ const visibleColumnsPosition = ref<String[]>([
"position",
"level",
"type",
"educational",
"highDegree",
]);
const columnsPosition = ref<QTableProps["columns"]>([
@ -199,6 +200,18 @@ const columnsPosition = ref<QTableProps["columns"]>([
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "educational",
align: "left",
label: "กำหนดขีดจำกัดวุฒิการศึกษา",
sortable: true,
field: "educational",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "type",
align: "left",
@ -242,6 +255,7 @@ async function fetchData() {
},
code: r.code,
highDegree: r.highDegree == true ? "1" : "0",
educationLevel: r.educationLevel,
});
});
const bankData: ResponsePayment[] = [];
@ -276,7 +290,7 @@ async function fetchData() {
dateExam.value = data.examDate != null ? new Date(data.examDate) : null;
dateRegister.value =
data.registerStartDate != null && data.registerEndDate != null
? [new Date(data.registerStartDate), new Date(data.registerEndDate)]
? [data.registerStartDate, data.registerEndDate]
: null;
if (data.fee == 0) {
data.paymentStartDate = null;
@ -314,6 +328,7 @@ async function fetchData() {
companyCode.value = data.companyCode;
refNo1.value = data.refNo1;
reason.value = data.reason;
graduationYearLock.value = data.graduationYearLock;
})
.catch((e) => {
messageError($q, e);
@ -405,6 +420,7 @@ function sendData() {
typeName: r.type.name,
code: r.code,
highDegree: r.highDegree == "1" ? true : false,
educationLevel: r.educationLevel,
});
});
if (fee.value == 0) {
@ -446,11 +462,11 @@ function sendData() {
positionExam: positionData,
registerEndDate:
dateRegister.value != null
? convertDateToAPI(dateRegister.value[1])
? convertDatetimeToAPI(dateRegister.value[1])
: null,
registerStartDate:
dateRegister.value != null
? convertDateToAPI(dateRegister.value[0])
? convertDatetimeToAPI(dateRegister.value[0])
: null,
round: round.value,
year: yearly.value,
@ -459,6 +475,7 @@ function sendData() {
companyCode: companyCode.value,
refNo1: refNo1.value,
reason: reason.value,
graduationYearLock: Number(graduationYearLock.value),
};
return valueData;
}
@ -475,7 +492,6 @@ async function addData() {
const uploadDoc = await uploadDocData();
const uploadBarCode = await uploadBarCodes();
const uploadQrCode = await uploadQrCodes();
hideLoader();
if (uploadImg && uploadDoc && uploadBarCode && uploadQrCode) {
success($q, "บันทึกรอบคัดเลือกสำเร็จ");
@ -484,9 +500,10 @@ async function addData() {
})
.catch((e) => {
messageError($q, e);
hideLoader();
})
.finally(async () => {});
.finally(async () => {
hideLoader();
});
}
/**
@ -502,20 +519,18 @@ async function editData(id: string) {
const uploadDoc = await uploadDocData();
const uploadBarCode = await uploadBarCodes();
const uploadQrCode = await uploadQrCodes();
hideLoader();
console.log(uploadImg, uploadDoc, uploadBarCode, uploadQrCode);
if (uploadImg && uploadDoc && uploadBarCode && uploadQrCode) {
success($q, "แก้ไขรอบคัดเลือกสำเร็จ");
await clickBack();
clickBack();
}
})
.catch((e) => {
messageError($q, e);
hideLoader();
})
.finally(() => {});
.finally(() => {
hideLoader();
});
}
/**
@ -842,6 +857,8 @@ function onUpdateHighDegree(val: string, index: string) {
rowsPosition.value[index].position = null;
rowsPosition.value[index].level =
val === "0" ? optionPosLevel1.value[0] : optionPosLevel2.value[0];
rowsPosition.value[index].educationLevel =
val === "0" ? "LOW_BACHELOR" : "BACHELOR";
}
watch(fee, () => {
@ -1017,6 +1034,7 @@ onMounted(async () => {
:readonly="checkRoutePermisson"
:enableTimePicker="false"
week-start="0"
hide-bottom-space
>
<template #year="{ year }">
{{ year + 543 }}
@ -1073,6 +1091,7 @@ onMounted(async () => {
:model-value="dateThaiRange(dateAnnouncement)"
:label="`${'วันที่ประกาศ'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ประกาศ'}`]"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
@ -1095,7 +1114,6 @@ onMounted(async () => {
:readonly="checkRoutePermisson"
borderless
range
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">
@ -1114,6 +1132,7 @@ onMounted(async () => {
:label="`${'วันที่สมัคร'}`"
clearable
@clear="clearDateRegister"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
@ -1158,6 +1177,7 @@ onMounted(async () => {
:label="`${'วันที่ชำระเงิน'}`"
clearable
@clear="clearDatePayment"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
@ -1199,6 +1219,7 @@ onMounted(async () => {
:label="`${'วันประกาศผลสอบ'}`"
clearable
@clear="clearDateAnnounce"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
@ -1212,6 +1233,22 @@ onMounted(async () => {
</template>
</datepicker>
</div>
<div class="row col-12" v-if="announcementExam">
<div class="col-xs-12 col-md-2">
<q-input
outlined
v-model="graduationYearLock"
label="ล็อกวันที่สำเร็จการศึกษา (ปี)"
dense
:readonly="checkRoutePermisson"
lazy-rules
:rules="[
(val:string) => !!val || `${'กรุณากรอกล็อกวันที่สำเร็จการศึกษา (ปี)'}`,
]"
type="number"
></q-input>
</div>
</div>
<div class="col-12" v-if="announcementExam">
<div class="col-12 q-mb-sm">
@ -1265,33 +1302,41 @@ onMounted(async () => {
/>
</q-td>
<q-td key="highDegree" :props="props">
<q-radio
v-model="props.row.highDegree"
label="ประเภททั่วไป"
color="teal"
:disable="checkRoutePermisson"
val="0"
@update:model-value="
onUpdateHighDegree(
props.row.highDegree,
props.rowIndex
)
"
/>
<q-radio
v-model="props.row.highDegree"
label="ประเภทวิชาการ"
color="teal"
:disable="checkRoutePermisson"
val="1"
@update:model-value="
onUpdateHighDegree(
props.row.highDegree,
props.rowIndex
)
"
/>
<q-td
key="highDegree"
:props="props"
class="q-col-gutter-sm"
>
<div class="col-12">
<q-radio
v-model="props.row.highDegree"
label="ประเภททั่วไป"
color="teal"
:disable="checkRoutePermisson"
val="0"
@update:model-value="
onUpdateHighDegree(
props.row.highDegree,
props.rowIndex
)
"
/>
</div>
<div class="col-12">
<q-radio
v-model="props.row.highDegree"
label="ประเภทวิชาการ"
color="teal"
:disable="checkRoutePermisson"
val="1"
@update:model-value="
onUpdateHighDegree(
props.row.highDegree,
props.rowIndex
)
"
/>
</div>
</q-td>
<q-td key="level" :props="props">
<selector
@ -1360,6 +1405,30 @@ onMounted(async () => {
</template>
</selector>
</q-td>
<q-td
key="educational"
:props="props"
class="q-col-gutter-sm"
>
<div class="col-12">
<q-radio
v-model="props.row.educationLevel"
label="วุฒิปริญญาตรี"
color="teal"
:disable="checkRoutePermisson"
val="BACHELOR"
/>
</div>
<div class="col-12">
<q-radio
v-model="props.row.educationLevel"
label="ต่ำกว่าปริญญาตรี"
color="teal"
:disable="checkRoutePermisson"
val="LOW_BACHELOR"
/>
</div>
</q-td>
<q-td key="type" :props="props">
<selector

View file

@ -30,7 +30,7 @@ const modal = ref<boolean>(false);
const round = ref<number | null>(null);
const yearly = ref<number | null>(null);
const examId = ref<string>(route.params.examId.toString());
const visible = ref(true); // card
const visible = ref<boolean>(false); // card
const dataNum = ref<DataNumObject[]>([]); //
const rows = ref<any[]>([]);
const visibleColumns = ref<String[]>([
@ -58,7 +58,7 @@ const optionsStatus = ref<any>([
},
{
id: "checkRegister",
name: "รอกดรับใบสมัคร",
name: "ส่งใบสมัครแล้ว",
},
{
id: "payment",
@ -74,7 +74,7 @@ const optionsStatus = ref<any>([
},
{
id: "checkSeat",
name: "กดรับใบสมัครแล้ว",
name: "รับใบสมัครแล้ว",
},
{
id: "checkPoint",
@ -363,7 +363,7 @@ function statusCandidate(status: string) {
case "register":
return "ยังไม่สมัครสอบ";
case "checkRegister":
return "รอกดรับใบสมัคร";
return "ส่งใบสมัครแล้ว";
case "payment":
return "รอชำระค่าสมัครสอบ";
case "rejectRegister":
@ -373,7 +373,7 @@ function statusCandidate(status: string) {
case "rejectPayment":
return "หลักฐานชำระเงินไม่ถูกต้อง";
case "checkSeat":
return "กดรับใบสมัครแล้ว";
return "รับใบสมัครแล้ว";
case "checkPoint":
return "รอสรุปคะแนนสอบ";
case "done":

View file

@ -417,7 +417,7 @@ async function onClickDownloadKp7(type: string) {
? config.API.profilshort(profileId.value, "profile-employee")
: config.API.profilshort(profileId.value, "profile");
const fileName = type === "FULL" ? "ก.พ.7/ก.ก.1" : "ประวัติแบบย่อ";
const fileName = type === "FULL" ? "ทปอ. สามัญ" : "ประวัติแบบย่อ";
await http
.get(url)
.then(async (res) => {
@ -891,7 +891,7 @@ onMounted(async () => {
<q-menu>
<q-list style="min-width: 130px">
<q-item clickable v-close-popup @click="onClickDownloadKp7('FULL')">
<q-item-section class="text-blue">..7/..1</q-item-section>
<q-item-section class="text-blue">ทปอ. สาม</q-item-section>
</q-item>
<q-item
clickable

View file

@ -1023,9 +1023,7 @@ onMounted(async () => {
name="mdi-bookmark-outline"
/>
</q-item-section>
<q-item-section
>เลอกหนวยงานทบแตงต/าย</q-item-section
>
<q-item-section>เลอกหนวยงานทบการบรรจ</q-item-section>
</q-item>
<q-item
@ -1051,9 +1049,7 @@ onMounted(async () => {
name="mdi-bookmark-outline"
/>
</q-item-section>
<q-item-section
>เลอกหนวยงานทบบรรจและแตงต</q-item-section
>
<q-item-section>เลอกหนวยงานทบการบรรจ</q-item-section>
</q-item>
<!-- <q-item