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

* develop:
  fix(recruiting):comment  router.go(-1);
  fix(placement): delete min-date
  fix: clear row = []
  fix:filter examResult
  style(registry-officer):display  colums training
This commit is contained in:
Warunee Tamkoo 2025-10-21 12:03:10 +07:00
commit 49faca6107
8 changed files with 108 additions and 157 deletions

View file

@ -41,6 +41,7 @@ const {
date2Thai,
dialogMessageNotify,
onSearchDataTable,
convertDateToAPI,
} = mixin;
/** props*/
@ -508,7 +509,7 @@ function onSubmit() {
posLevelId: selectedPos.value[0].posLevelId, //
posLevelName: selectedPos.value[0].posLevelName, //
posExecutiveName: selectedPos.value[0].posExecutiveName, //
reportingDate: datePos.value,
reportingDate: convertDateToAPI(datePos.value),
posmasterId: dataPosMaster.id,
typeCommand: type.value,
positionExecutiveField: selectedPos.value[0].positionExecutiveField, //
@ -787,6 +788,7 @@ onMounted(async () => {
>
<div class="col-12">
<q-toolbar style="padding: 0px">
<!-- :min-date="datePos" -->
<datepicker
menu-class-name="modalfix"
v-model="datePos"
@ -795,7 +797,6 @@ onMounted(async () => {
borderless
:enableTimePicker="false"
week-start="0"
:min-date="datePos"
>
<template #year="{ year }">
{{ year + 543 }}

View file

@ -41,6 +41,7 @@ const {
date2Thai,
dialogMessageNotify,
onSearchDataTable,
convertDateToAPI,
} = mixin;
const route = useRoute();
@ -480,7 +481,7 @@ function onSubmit() {
posTypeName: selectedPos.value[0].posTypeName, //
posLevelId: selectedPos.value[0].posLevelId, //
posLevelName: selectedPos.value[0].posLevelName, //
reportingDate: datePos.value,
reportingDate: convertDateToAPI(datePos.value),
posmasterId: dataPosMaster.id,
typeCommand: type.value,
};
@ -755,6 +756,7 @@ onMounted(() => {
>
<div class="col-12">
<q-toolbar style="padding: 0px">
<!-- :min-date="datePos" -->
<datepicker
menu-class-name="modalfix"
v-model="datePos"
@ -763,7 +765,6 @@ onMounted(() => {
borderless
:enableTimePicker="false"
week-start="0"
:min-date="datePos"
>
<template #year="{ year }">
{{ year + 543 }}

View file

@ -1,13 +1,20 @@
<script setup lang="ts">
import { checkPermission } from "@/utils/permissions";
import { ref, useAttrs, watch } from "vue";
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
import type {
Pagination,
ExamResultOption,
} from "@/modules/03_recruiting/interface/index/Main";
const attrs = ref<any>(useAttrs());
const table = ref<any>(null);
const filterRef = ref<any>(null);
const filter = defineModel<string>("filter", { required: true });
const filter = defineModel<string>("filter", { required: false });
const examResult = defineModel<string>("examResult", {
required: false,
default: "",
});
const pagination = defineModel<Pagination>("pagination", { required: true });
const props = defineProps({
@ -44,6 +51,13 @@ const props = defineProps({
},
});
const optionsStatus = ref<ExamResultOption[]>([
{ label: "ทั้งหมด", value: "" },
{ label: "ขาดสอบ", value: "missed_exam" },
{ label: "ผ่าน", value: "pass" },
{ label: "ไม่ผ่าน", value: "notpass" },
]);
const emit = defineEmits([
"update:inputfilter",
"update:inputvisible",
@ -92,6 +106,7 @@ watch(
}
);
</script>
<template>
<div class="q-pb-sm row q-col-gutter-sm">
<div
@ -134,7 +149,6 @@ watch(
/>
</div>
</q-card>
<q-card bordered flat class="q-px-md no-wrap row">
<div class="col-12 text-subtitle2 row items-center">
<span class="text-weight-medium text-dark">สอบไมาน</span>
@ -184,6 +198,24 @@ watch(
</div>
<q-space />
<div class="items-center q-gutter-sm" style="display: flex">
<q-select
v-if="conclude"
dense
outlined
:options="optionsStatus"
option-value="value"
option-label="label"
label="ผลการสอบ"
map-options
emit-value
style="min-width: 140px"
:clearable="examResult !== ''"
@clear="examResult = ''"
v-model="examResult"
@update:model-value="
nornmalData ? props.onSearch?.() : getList('enter')
"
/>
<!-- นหาขอความใน table -->
<q-input
standout

View file

@ -15,6 +15,11 @@ interface ChangeActive {
id: number;
}
interface ExamResultOption {
label: string;
value: string;
}
//ข้อมูลส่วนตัว
interface Information {
cardid: string | null;
@ -292,4 +297,5 @@ export type {
AddressWeb,
EnableType,
CmsTable,
ExamResultOption,
};

View file

@ -42,6 +42,7 @@ const rows = ref<any[]>([]);
const rowsData = ref<any[]>([]);
const importId = ref<string>(route.params.id as string); // Period Import Id
const filter = ref<string>(""); //search data table
const examResult = ref<string>(""); //
const visibleColumns = ref<String[]>([
"examID",
"profileID",
@ -60,7 +61,7 @@ const visibleColumns = ref<String[]>([
"examAttribute",
"examScore",
"examResult",
"exam_order",
"number",
"applyDate",
]);
const columns = ref<QTableProps["columns"]>([
@ -68,21 +69,16 @@ const columns = ref<QTableProps["columns"]>([
name: "examID",
align: "left",
label: "เลขประจำตัวสอบ",
sortable: true,
sortable: false,
field: "examID",
headerStyle: "font-size: 14px; min-width: 20px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "profileID",
align: "left",
label: "เลขประจำตัวประชาชน",
sortable: true,
sortable: false,
field: "profileID",
headerStyle: "font-size: 14px; min-width: 20px",
style: "font-size: 14px; ",
@ -91,7 +87,7 @@ const columns = ref<QTableProps["columns"]>([
name: "fullName",
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
sortable: false,
field: "personName",
headerStyle: "font-size: 14px; min-width: 250px",
style: "font-size: 14px; ",
@ -100,7 +96,7 @@ const columns = ref<QTableProps["columns"]>([
name: "hddPosition",
align: "left",
label: "บัญชีสอบ",
sortable: true,
sortable: false,
field: "hddPosition",
headerStyle: "font-size: 14px; min-width: 250px",
style: "font-size: 14px; ",
@ -109,161 +105,106 @@ const columns = ref<QTableProps["columns"]>([
name: "dateOfBirth",
align: "left",
label: "วัน เดือน ปีเกิด",
sortable: true,
sortable: false,
field: "dateOfBirth",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "gender",
align: "left",
label: "เพศ",
sortable: true,
sortable: false,
field: "gender",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "position_name",
align: "left",
label: "ตำแหน่งที่สมัคร",
sortable: true,
sortable: false,
field: "position_name",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "position_type",
align: "left",
label: "ประเภทที่สมัคร",
sortable: true,
sortable: false,
field: "position_type",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "position_level",
align: "left",
label: "ระดับที่สมัคร",
sortable: true,
sortable: false,
field: "position_level",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "university",
align: "left",
label: "สถานศึกษา",
sortable: true,
sortable: false,
field: "university",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "degree",
align: "left",
label: "วุฒิการศึกษา",
sortable: true,
sortable: false,
field: "degree",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "major",
align: "left",
label: "สาขาวิชาเอก",
sortable: true,
sortable: false,
field: "major",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "certificateNo",
align: "left",
label: "เลขที่ใบประกอบวิชาชีพ",
sortable: true,
sortable: false,
field: "certificateNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "certificateIssueDate",
align: "left",
label: "วันที่ได้รับใบประกอบวิชาชีพฯ",
sortable: true,
sortable: false,
field: "certificateIssueDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "examAttribute",
align: "left",
label: "สถานะการคัดกรองคุณสมบัติ",
sortable: true,
sortable: false,
field: "examAttribute",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "examScore",
align: "left",
label: "คะแนนรวม",
sortable: true,
sortable: false,
field: "examScore",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -276,18 +217,13 @@ const columns = ref<QTableProps["columns"]>([
field: "examResult",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "exam_order",
name: "number",
align: "center",
label: "ลำดับที่สอบได้",
sortable: true,
field: "exam_order",
sortable: false,
field: "number",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -295,15 +231,10 @@ const columns = ref<QTableProps["columns"]>([
name: "applyDate",
align: "left",
label: "วันที่สมัครสอบ",
sortable: true,
sortable: false,
field: "applyDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
]);
const modalCandidates = ref(false); // dialog
@ -369,7 +300,7 @@ async function fetchData() {
.post(config.API.getExamResultById(importId.value), {
examAttribute: "",
keyword: filter.value,
examResult: "",
examResult: examResult.value ? examResult.value : "",
page: initialPagination.value.page,
pageSize: initialPagination.value.rowsPerPage,
})
@ -393,17 +324,17 @@ async function fetchData() {
}
const data = res.data.result.data;
let result: RecruitDetailResponse[] = [];
if (data.length > 0) {
let result: RecruitDetailResponse[] = [];
if (data.length > 0) {
data.map((r: RecruitDetailResponse) => {
r.personName = `${r.prefix}${r.fullName}`;
result.push(r);
});
}
rows.value = result;
rowsData.value = result;
}
rows.value = result;
rowsData.value = result;
})
.catch((e) => {
messageError($q, e);
@ -444,7 +375,7 @@ function onSubmitCandidates(date: Date) {
.then(() => {
success($q, "นำผู้ผ่านสอบแข่งขันเข้าสู่ระบบบรรจุ");
modalCandidates.value = false;
router.go(-1);
// router.go(-1);
})
.catch((e) => {
messageError($q, e);
@ -535,6 +466,7 @@ onMounted(async () => {
v-model:totalList="totalList"
v-model:total="total"
v-model:pagination="initialPagination"
v-model:exam-result="examResult"
:nornmalData="false"
:conclude="true"
:fetchData="fetchData"
@ -582,8 +514,8 @@ onMounted(async () => {
<div v-else-if="col.name == 'c5'">
<q-checkbox disable v-model="props.row.c5" />
</div>
<div v-else-if="col.name == 'exam_order'">
{{ col.value ? col.value : " " }}
<div v-else-if="col.name == 'number'">
{{ col.value ? col.value : "" }}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}

View file

@ -43,6 +43,7 @@ const totalList = ref<number>(0);
const importId = ref<string>(route.params.id as string); // Period Import Id
const filter = ref<string>(""); //search data table
const examResult = ref<string>(""); //
const visibleColumns = ref<String[]>([
"examID",
"profileID",
@ -59,7 +60,7 @@ const visibleColumns = ref<String[]>([
"examAttribute",
"examScore",
"examResult",
"exam_order",
"number",
"applyDate",
]);
const columns = ref<QTableProps["columns"]>([
@ -67,18 +68,16 @@ const columns = ref<QTableProps["columns"]>([
name: "examID",
align: "left",
label: "เลขประจำตัวสอบ",
sortable: true,
sortable: false,
field: "examID",
headerStyle: "font-size: 14px; min-width: 20px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "profileID",
align: "left",
label: "เลขประจำตัวประชาชน",
sortable: true,
sortable: false,
field: "profileID",
headerStyle: "font-size: 14px; min-width: 20px",
style: "font-size: 14px; ",
@ -87,7 +86,7 @@ const columns = ref<QTableProps["columns"]>([
name: "fullName",
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
sortable: false,
field: "personName",
headerStyle: "font-size: 14px; min-width: 250px",
style: "font-size: 14px; ",
@ -96,7 +95,7 @@ const columns = ref<QTableProps["columns"]>([
name: "hddPosition",
align: "left",
label: "บัญชีสอบ",
sortable: true,
sortable: false,
field: "hddPosition",
headerStyle: "font-size: 14px; min-width: 250px",
style: "font-size: 14px; ",
@ -105,106 +104,88 @@ const columns = ref<QTableProps["columns"]>([
name: "dateOfBirth",
align: "left",
label: "วัน เดือน ปีเกิด",
sortable: true,
sortable: false,
field: "dateOfBirth",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "gender",
align: "left",
label: "เพศ",
sortable: true,
sortable: false,
field: "gender",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "position_name",
align: "left",
label: "ตำแหน่งที่สมัคร",
sortable: true,
sortable: false,
field: "position_name",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "university",
align: "left",
label: "สถานศึกษา",
sortable: true,
sortable: false,
field: "university",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "degree",
align: "left",
label: "วุฒิการศึกษา",
sortable: true,
sortable: false,
field: "degree",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "major",
align: "left",
label: "สาขาวิชาเอก",
sortable: true,
sortable: false,
field: "major",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "certificateNo",
align: "left",
label: "เลขที่ใบประกอบวิชาชีพ",
sortable: true,
sortable: false,
field: "certificateNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "certificateIssueDate",
align: "left",
label: "วันที่ได้รับใบประกอบวิชาชีพฯ",
sortable: true,
sortable: false,
field: "certificateIssueDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "examAttribute",
align: "left",
label: "สถานะการคัดกรองคุณสมบัติ",
sortable: true,
sortable: false,
field: "examAttribute",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "examScore",
align: "left",
label: "คะแนนรวม",
sortable: true,
sortable: false,
field: "examScore",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -213,19 +194,17 @@ const columns = ref<QTableProps["columns"]>([
name: "examResult",
align: "left",
label: "ผลการสอบ",
sortable: true,
sortable: false,
field: "examResult",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "exam_order",
name: "number",
align: "center",
label: "ลำดับที่สอบได้",
sortable: true,
field: "exam_order",
sortable: false,
field: "number",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -233,12 +212,10 @@ const columns = ref<QTableProps["columns"]>([
name: "applyDate",
align: "left",
label: "วันที่สมัครสอบ",
sortable: true,
sortable: false,
field: "applyDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const rows = ref<RecruitDetailResponse[]>([]);
@ -310,7 +287,7 @@ async function fetchData() {
.post(config.API.getDisableExamResultById(importId.value), {
examAttribute: "",
keyword: filter.value,
examResult: "",
examResult: examResult.value ? examResult.value : "",
page: initialPagination.value.page,
pageSize: initialPagination.value.rowsPerPage,
})
@ -369,7 +346,7 @@ async function onSubmitCandidates(date: Date) {
.then(() => {
success($q, "นำผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุ");
modalCandidates.value = false;
router.go(-1);
// router.go(-1);
})
.catch((e) => {
messageError($q, e);
@ -469,6 +446,7 @@ onMounted(async () => {
v-model:inputfilter="filter"
v-model:total="total"
v-model:inputvisible="visibleColumns"
v-model:exam-result="examResult"
:nornmalData="false"
:conclude="true"
:fetchData="fetchData"
@ -516,8 +494,8 @@ onMounted(async () => {
<div v-else-if="col.name == 'c5'">
<q-checkbox disable v-model="props.row.c5" />
</div>
<div v-else-if="col.name == 'exam_order'">
{{ col.value ? col.value : " " }}
<div v-else-if="col.name == 'number'">
{{ col.value ? col.value : "" }}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}

View file

@ -147,7 +147,8 @@ const baseColumns = ref<QTableColumn[]>([
sortable: true,
field: "place",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
style: "font-size: 14px; width: 250px;",
classes: "text-html",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
@ -169,7 +170,7 @@ const baseColumns = ref<QTableColumn[]>([
sortable: true,
field: "department",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
style: "font-size: 14px; ",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
@ -550,7 +551,7 @@ onMounted(() => {
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div>
<div :class="col.classes" :style="col.style">
{{ col.value ? col.value : "-" }}
</div>
</q-td>

View file

@ -481,6 +481,7 @@ onMounted(async () => {
>
<div class="col-12">
<q-toolbar style="padding: 0px">
<!-- :min-date="date" -->
<datepicker
menu-class-name="modalfix"
v-model="date"
@ -489,7 +490,6 @@ onMounted(async () => {
borderless
:enableTimePicker="false"
week-start="0"
:min-date="date"
>
<template #year="{ year }">
{{ year + 543 }}