สอบคัดเลือกเพิ่มฟิวรหัสตำแหน่ง
This commit is contained in:
parent
32ec4bdcd9
commit
fd6510b49e
4 changed files with 70 additions and 25 deletions
|
|
@ -446,6 +446,7 @@ onMounted(async () => {
|
||||||
const calDate = async () => {
|
const calDate = async () => {
|
||||||
let _startDate = new Date(startDate.value.toISOString().substr(0, 10));
|
let _startDate = new Date(startDate.value.toISOString().substr(0, 10));
|
||||||
let _endDate = new Date(endDate.value.toISOString().substr(0, 10));
|
let _endDate = new Date(endDate.value.toISOString().substr(0, 10));
|
||||||
|
_endDate.setDate(_endDate.getDate() + 1);
|
||||||
if (_startDate > _endDate) {
|
if (_startDate > _endDate) {
|
||||||
const swap = _startDate;
|
const swap = _startDate;
|
||||||
_startDate = _endDate;
|
_startDate = _endDate;
|
||||||
|
|
|
||||||
|
|
@ -137,9 +137,15 @@
|
||||||
:pagination-label="paginationLabel"
|
:pagination-label="paginationLabel"
|
||||||
:pagination="initialPagination"
|
:pagination="initialPagination"
|
||||||
:rows-per-page-options="paging == true ? [25, 50, 100, 500] : []"
|
:rows-per-page-options="paging == true ? [25, 50, 100, 500] : []"
|
||||||
|
row-key="id"
|
||||||
|
selection="multiple"
|
||||||
|
v-model:selected="selected"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
<q-th auto-width>
|
||||||
|
<q-checkbox v-model="props.selected" />
|
||||||
|
</q-th>
|
||||||
<q-th auto-width v-if="boss == true" />
|
<q-th auto-width v-if="boss == true" />
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
|
|
@ -152,7 +158,6 @@
|
||||||
/>
|
/>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<!-- สำหรับเรียกใช้ template ตัวข้างนอก -->
|
|
||||||
<template #body="props">
|
<template #body="props">
|
||||||
<slot v-bind="props" name="columns"></slot>
|
<slot v-bind="props" name="columns"></slot>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -180,6 +185,7 @@ const files = ref<File[]>([]);
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<any>(null);
|
||||||
const examId = ref<string>(route.params.examId.toString());
|
const examId = ref<string>(route.params.examId.toString());
|
||||||
const candidateId = ref<string[]>([]);
|
const candidateId = ref<string[]>([]);
|
||||||
|
const selected = ref<string[]>([]);
|
||||||
const { messageError, showLoader, hideLoader } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
inputfilter: String,
|
inputfilter: String,
|
||||||
|
|
@ -191,6 +197,10 @@ const props = defineProps({
|
||||||
type: Array,
|
type: Array,
|
||||||
defualt: [],
|
defualt: [],
|
||||||
},
|
},
|
||||||
|
selected: {
|
||||||
|
type: Array,
|
||||||
|
defualt: [],
|
||||||
|
},
|
||||||
boss: {
|
boss: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
defualt: false,
|
defualt: false,
|
||||||
|
|
@ -406,10 +416,14 @@ const downloadFileDetail = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const checkCandidates = async () => {
|
const checkCandidates = async () => {
|
||||||
|
var _selected = [];
|
||||||
|
selected.value.map((r: any) => {
|
||||||
|
_selected.push(r.id.toString());
|
||||||
|
});
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.candidateCheckRegisters, {
|
.post(config.API.candidateCheckRegisters, {
|
||||||
candidateId: candidateId.value,
|
candidateId: _selected,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
||||||
|
|
@ -466,18 +480,18 @@ const candidateCheckProfileDialog = async () => {
|
||||||
"mdi-email-check-outline",
|
"mdi-email-check-outline",
|
||||||
"ยืนยัน",
|
"ยืนยัน",
|
||||||
"public",
|
"public",
|
||||||
candidateCheckProfile,
|
checkCandidates,
|
||||||
undefined
|
undefined
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const candidateCheckProfile = async () => {
|
// const candidateCheckProfile = async () => {
|
||||||
const filter = attrs.value.rows.filter((r: any) => r.check == true);
|
// const filter = attrs.value.rows.filter((r: any) => r.check == true);
|
||||||
filter.map((r: any) => {
|
// filter.map((r: any) => {
|
||||||
candidateId.value.push(r.id.toString());
|
// candidateId.value.push(r.id.toString());
|
||||||
});
|
// });
|
||||||
await checkCandidates();
|
// await checkCandidates();
|
||||||
};
|
// };
|
||||||
|
|
||||||
const resetFilter = () => {
|
const resetFilter = () => {
|
||||||
// reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา
|
// reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา
|
||||||
|
|
|
||||||
|
|
@ -372,6 +372,21 @@
|
||||||
>
|
>
|
||||||
<template #columns="props">
|
<template #columns="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
<q-td key="code" :props="props">
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
v-model="props.row.code"
|
||||||
|
:rules="[
|
||||||
|
(val) =>
|
||||||
|
!!val || `${'กรุณากรอกรหัสประจำตำแหน่งที่สอบ'}`,
|
||||||
|
]"
|
||||||
|
:label="`${'รหัสประจำตำแหน่งที่สอบ'}`"
|
||||||
|
@update:modelValue="clickEditRow"
|
||||||
|
hide-bottom-space
|
||||||
|
/>
|
||||||
|
</q-td>
|
||||||
<q-td key="position" :props="props">
|
<q-td key="position" :props="props">
|
||||||
<selector
|
<selector
|
||||||
class=""
|
class=""
|
||||||
|
|
@ -1258,12 +1273,24 @@ const columnsPayment = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const visibleColumnsPosition = ref<String[]>([
|
const visibleColumnsPosition = ref<String[]>([
|
||||||
|
"code",
|
||||||
"position",
|
"position",
|
||||||
"level",
|
"level",
|
||||||
"type",
|
"type",
|
||||||
"highDegree",
|
"highDegree",
|
||||||
]);
|
]);
|
||||||
const columnsPosition = ref<QTableProps["columns"]>([
|
const columnsPosition = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "code",
|
||||||
|
align: "left",
|
||||||
|
label: "รหัสประจำตำแหน่งที่สอบ",
|
||||||
|
sortable: true,
|
||||||
|
field: "code",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "position",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -1372,6 +1399,7 @@ const fetchData = async () => {
|
||||||
id: r.typeId,
|
id: r.typeId,
|
||||||
name: r.typeName,
|
name: r.typeName,
|
||||||
},
|
},
|
||||||
|
code: r.code,
|
||||||
highDegree: r.highDegree == true ? "1" : "0",
|
highDegree: r.highDegree == true ? "1" : "0",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -1619,6 +1647,7 @@ const sendData = () => {
|
||||||
positionLevelName: r.level.name,
|
positionLevelName: r.level.name,
|
||||||
typeId: r.type.id,
|
typeId: r.type.id,
|
||||||
typeName: r.type.name,
|
typeName: r.type.name,
|
||||||
|
code: r.code,
|
||||||
highDegree: r.highDegree == "1" ? true : false,
|
highDegree: r.highDegree == "1" ? true : false,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -1825,6 +1854,7 @@ const clickAddPosition = () => {
|
||||||
id: "00000000-0000-0000-0000-000000000000",
|
id: "00000000-0000-0000-0000-000000000000",
|
||||||
position: null,
|
position: null,
|
||||||
type: { id: "normol", name: "ทั่วไป" },
|
type: { id: "normol", name: "ทั่วไป" },
|
||||||
|
code: null,
|
||||||
highDegree: "0",
|
highDegree: "0",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -167,9 +167,9 @@
|
||||||
>
|
>
|
||||||
<template #columns="props">
|
<template #columns="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<!-- <q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-checkbox v-model="checkProfile" />
|
<q-checkbox v-model="props.selected" />
|
||||||
</q-td> -->
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
|
|
@ -203,12 +203,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'check'">
|
<!-- <div v-else-if="col.name == 'check'">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-model="props.row.check"
|
v-model="props.row.check"
|
||||||
v-if="props.row.status == 'checkRegister'"
|
v-if="props.row.status == 'checkRegister'"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div> -->
|
||||||
<div v-else-if="col.name == 'career'">
|
<div v-else-if="col.name == 'career'">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
{{ props.row.career }}
|
{{ props.row.career }}
|
||||||
|
|
@ -332,7 +332,7 @@ const initialPagination = ref<Pagination>({
|
||||||
rowsPerPage: 0,
|
rowsPerPage: 0,
|
||||||
});
|
});
|
||||||
const visibleColumns = ref<String[]>([
|
const visibleColumns = ref<String[]>([
|
||||||
"check",
|
// "check",
|
||||||
"no",
|
"no",
|
||||||
"number",
|
"number",
|
||||||
"registerDate",
|
"registerDate",
|
||||||
|
|
@ -387,15 +387,15 @@ const optionsStatus = ref<any>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
// {
|
||||||
name: "check",
|
// name: "check",
|
||||||
align: "left",
|
// align: "left",
|
||||||
label: "",
|
// label: "",
|
||||||
sortable: true,
|
// sortable: true,
|
||||||
field: "check",
|
// field: "check",
|
||||||
headerStyle: "font-size: 14px;",
|
// headerStyle: "font-size: 14px;",
|
||||||
style: "font-size: 14px; ",
|
// style: "font-size: 14px; ",
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue