ต่อ api บุคคลที่สามารถติดต่อได้
This commit is contained in:
parent
a022234412
commit
f45af7bb86
12 changed files with 449 additions and 178 deletions
|
|
@ -42,6 +42,8 @@ export default {
|
||||||
`${periodExam}family/${candidateId}`,
|
`${periodExam}family/${candidateId}`,
|
||||||
candidateOccupation: (candidateId: string) =>
|
candidateOccupation: (candidateId: string) =>
|
||||||
`${periodExam}occupation/${candidateId}`,
|
`${periodExam}occupation/${candidateId}`,
|
||||||
|
candidateContact: (candidateId: string) =>
|
||||||
|
`${periodExam}contact/${candidateId}`,
|
||||||
candidateEducation: (candidateId: string) =>
|
candidateEducation: (candidateId: string) =>
|
||||||
`${periodExam}education/${candidateId}`,
|
`${periodExam}education/${candidateId}`,
|
||||||
candidateAdminEducation: (candidateId: string) =>
|
candidateAdminEducation: (candidateId: string) =>
|
||||||
|
|
|
||||||
178
src/modules/03_recruiting/components/Contact.vue
Normal file
178
src/modules/03_recruiting/components/Contact.vue
Normal file
|
|
@ -0,0 +1,178 @@
|
||||||
|
<!-- card บุคคลที่สามารถติดต่อได้ -->
|
||||||
|
<template>
|
||||||
|
<HeaderTop
|
||||||
|
v-model:edit="edit"
|
||||||
|
header="บุคคลที่สามารถติดต่อได้"
|
||||||
|
icon="mdi-account-circle"
|
||||||
|
:addData="true"
|
||||||
|
:editOnly="false"
|
||||||
|
:editData="false"
|
||||||
|
/>
|
||||||
|
<q-form ref="myform">
|
||||||
|
<div class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-xs">
|
||||||
|
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||||
|
<q-select
|
||||||
|
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
||||||
|
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือก คำนำหน้า'}`]"
|
||||||
|
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
v-model="defaultContact.contactPrefixId"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
:options="prefixOptions"
|
||||||
|
option-value="id"
|
||||||
|
:label="`${'คำนำหน้า'}`"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
|
<q-input
|
||||||
|
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
||||||
|
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
v-model="defaultContact.contactFirstname"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
||||||
|
:label="`${'ชื่อ'}`"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
|
<q-input
|
||||||
|
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
||||||
|
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
v-model="defaultContact.contactLastname"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
||||||
|
:label="`${'นามสกุล'}`"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-3 col-md-4">
|
||||||
|
<q-input
|
||||||
|
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
||||||
|
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
v-model="defaultContact.contactRelations"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกความสัมพันธ์'}`]"
|
||||||
|
:label="`${'เกี่ยวข้องเป็น'}`"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-3 col-md-4">
|
||||||
|
<q-input
|
||||||
|
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||||
|
dense
|
||||||
|
:counter="
|
||||||
|
status == 'checkRegister' || status == 'payment' ? true : false
|
||||||
|
"
|
||||||
|
lazy-rules
|
||||||
|
type="tel"
|
||||||
|
mask="##########"
|
||||||
|
maxlength="10"
|
||||||
|
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
||||||
|
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
v-model="defaultContact.contactTel"
|
||||||
|
:label="`${'โทรศัพท์'}`"
|
||||||
|
:rules="[
|
||||||
|
(val) => val.length == 10 || `${'กรุณากรอก โทรศัพท์'}`,
|
||||||
|
(val) =>
|
||||||
|
/^[0-9]*$/.test(val) || `${'กรุณากรอกข้อมูลโทรศัพท์ให้ถูกต้อง'}`,
|
||||||
|
]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-form>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, watch, PropType } from "vue";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import type {
|
||||||
|
Contact,
|
||||||
|
DataOption,
|
||||||
|
} from "@/modules/03_recruiting/interface/index/Main";
|
||||||
|
import {
|
||||||
|
defaultContact,
|
||||||
|
changeData,
|
||||||
|
} from "@/modules/03_recruiting/interface/index/Main";
|
||||||
|
import HeaderTop from "@/modules/03_recruiting/components/top.vue";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
status: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
prefixOptions: {
|
||||||
|
type: Array as PropType<DataOption[]>,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emit = defineEmits(["update:form"]);
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
|
const edit = ref<boolean>(true);
|
||||||
|
const myform = ref<any>({});
|
||||||
|
const route = useRoute();
|
||||||
|
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||||
|
|
||||||
|
watch(myform, async (count: any, prevCount: any) => {
|
||||||
|
emit("update:form", count);
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(defaultContact, async (count: Contact, prevCount: Contact) => {
|
||||||
|
await changeData("contact", count);
|
||||||
|
});
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await fetchData();
|
||||||
|
});
|
||||||
|
|
||||||
|
const fetchData = async () => {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(config.API.candidateContact(candidateId.value))
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
if (data != null) {
|
||||||
|
defaultContact.value.contactPrefixId = data.contactPrefixId;
|
||||||
|
defaultContact.value.contactFirstname = data.contactFirstname;
|
||||||
|
defaultContact.value.contactLastname = data.contactLastname;
|
||||||
|
defaultContact.value.contactRelations = data.contactRelations;
|
||||||
|
defaultContact.value.contactTel = data.contactTel;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
// messageError($q, e)
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const getClass = (val: boolean) => {
|
||||||
|
return {
|
||||||
|
"full-width inputgreen cursor-pointer": val,
|
||||||
|
"full-width cursor-pointer": !val,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -96,12 +96,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<datepicker
|
<datepicker
|
||||||
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
|
||||||
v-model="defaultEducation.educationEndDate"
|
v-model="defaultEducation.educationEndDate"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
:max-date="new Date()"
|
||||||
|
:disabled="!(status == 'checkRegister' || status == 'payment')"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
|
|
@ -112,11 +113,16 @@
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
class="q-pl-sm"
|
class="q-pl-sm"
|
||||||
:class="getClass(edit)"
|
:class="
|
||||||
:outlined="edit"
|
getClass(status == 'checkRegister' || status == 'payment')
|
||||||
|
"
|
||||||
|
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:borderless="!edit"
|
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
:borderless="
|
||||||
|
!(status == 'checkRegister' || status == 'payment')
|
||||||
|
"
|
||||||
:model-value="date2Thai(defaultEducation.educationEndDate)"
|
:model-value="date2Thai(defaultEducation.educationEndDate)"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`,
|
(val) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`,
|
||||||
|
|
@ -129,7 +135,9 @@
|
||||||
name="event"
|
name="event"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
:style="
|
:style="
|
||||||
edit ? 'color: var(--q-primary)' : 'color: var(--q-grey)'
|
status == 'checkRegister' || status == 'payment'
|
||||||
|
? 'color: var(--q-primary)'
|
||||||
|
: 'color: var(--q-grey)'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@
|
||||||
วันหมดอายุบัญชีคัดเลือก
|
วันหมดอายุบัญชีคัดเลือก
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-8 col-sm-6 q-pr-xs">
|
<div class="col-xs-8 col-sm-6 q-pr-xs">
|
||||||
{{ score_expired == null ? "" : date2Thai(score_expired) }}
|
{{ score_expired == null ? "-" : date2Thai(score_expired) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -188,7 +188,7 @@ const scoreSumFull = ref<number | null>(null);
|
||||||
const scoreSum = ref<number | null>(null);
|
const scoreSum = ref<number | null>(null);
|
||||||
const examResultinscore = ref<string>("");
|
const examResultinscore = ref<string>("");
|
||||||
const avatar = ref<string>("");
|
const avatar = ref<string>("");
|
||||||
const score_expired = ref<Date>(new Date());
|
const score_expired = ref<Date | null>(new Date());
|
||||||
const reviewPoint = ref<number>();
|
const reviewPoint = ref<number>();
|
||||||
const review = ref<string>("-");
|
const review = ref<string>("-");
|
||||||
|
|
||||||
|
|
@ -222,7 +222,8 @@ const fetchCard = async () => {
|
||||||
parseInt(data.pointTotalC == null ? 0 : data.pointTotalC);
|
parseInt(data.pointTotalC == null ? 0 : data.pointTotalC);
|
||||||
examResultinscore.value = data.pass;
|
examResultinscore.value = data.pass;
|
||||||
avatar.value = data.avatar;
|
avatar.value = data.avatar;
|
||||||
score_expired.value = new Date(data.announcementDate);
|
score_expired.value =
|
||||||
|
data.announcementDate == null ? null : new Date(data.announcementDate);
|
||||||
number.value = data.number;
|
number.value = data.number;
|
||||||
reviewPoint.value = data.reviewPoint;
|
reviewPoint.value = data.reviewPoint;
|
||||||
review.value = data.review == null ? "-" : data.review;
|
review.value = data.review == null ? "-" : data.review;
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,15 @@
|
||||||
<Career :status="status" />
|
<Career :status="status" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||||
|
<div class="q-px-sm">
|
||||||
|
<Contact
|
||||||
|
:status="status"
|
||||||
|
v-model:form="formContact"
|
||||||
|
:prefixOptions="prefixOptions"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <q-separator class="q-my-lg bg-gray" size="5px" /> -->
|
<!-- <q-separator class="q-my-lg bg-gray" size="5px" /> -->
|
||||||
<!-- <div class="q-px-sm">
|
<!-- <div class="q-px-sm">
|
||||||
<Document :status="status" />
|
<Document :status="status" />
|
||||||
|
|
@ -61,6 +70,7 @@ import Information from "@/modules/03_recruiting/components/Information.vue";
|
||||||
import Address from "@/modules/03_recruiting/components/Address.vue";
|
import Address from "@/modules/03_recruiting/components/Address.vue";
|
||||||
import Family from "@/modules/03_recruiting/components/Family.vue";
|
import Family from "@/modules/03_recruiting/components/Family.vue";
|
||||||
import Occupation from "@/modules/03_recruiting/components/Occupation.vue";
|
import Occupation from "@/modules/03_recruiting/components/Occupation.vue";
|
||||||
|
import Contact from "@/modules/03_recruiting/components/Contact.vue";
|
||||||
import Education from "@/modules/03_recruiting/components/Education.vue";
|
import Education from "@/modules/03_recruiting/components/Education.vue";
|
||||||
import Career from "@/modules/03_recruiting/components/Career.vue";
|
import Career from "@/modules/03_recruiting/components/Career.vue";
|
||||||
import Document from "@/modules/03_recruiting/components/Document.vue";
|
import Document from "@/modules/03_recruiting/components/Document.vue";
|
||||||
|
|
@ -89,6 +99,10 @@ const props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
formContact: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -101,6 +115,7 @@ const formInformation = ref<any>({});
|
||||||
const formAddress = ref<any>({});
|
const formAddress = ref<any>({});
|
||||||
const formEducation = ref<any>({});
|
const formEducation = ref<any>({});
|
||||||
const formOccupation = ref<any>({});
|
const formOccupation = ref<any>({});
|
||||||
|
const formContact = ref<any>({});
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, showLoader, hideLoader } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
|
|
@ -109,6 +124,7 @@ const emit = defineEmits([
|
||||||
"update:formAddress",
|
"update:formAddress",
|
||||||
"update:formEducation",
|
"update:formEducation",
|
||||||
"update:formOccupation",
|
"update:formOccupation",
|
||||||
|
"update:formContact",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
watch(formInformation, async (count: Object, prevCount: Object) => {
|
watch(formInformation, async (count: Object, prevCount: Object) => {
|
||||||
|
|
@ -127,6 +143,10 @@ watch(formOccupation, async (count: Object, prevCount: Object) => {
|
||||||
emit("update:formOccupation", count);
|
emit("update:formOccupation", count);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch(formContact, async (count: Object, prevCount: Object) => {
|
||||||
|
emit("update:formContact", count);
|
||||||
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
fetchPrefix();
|
fetchPrefix();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="q-px-md q-pb-md">
|
<div class="q-px-md q-pb-md">
|
||||||
<q-card bordered flat class="col-12 row q-py-sm items-center bg-grey-1" v-show="statusPayment">
|
<q-card
|
||||||
|
bordered
|
||||||
|
flat
|
||||||
|
class="col-12 row q-py-sm items-center bg-grey-1"
|
||||||
|
v-show="statusPayment"
|
||||||
|
>
|
||||||
<div class="col-12 row q-col-gutter-sm">
|
<div class="col-12 row q-col-gutter-sm">
|
||||||
<span class="text-subtitle1">{{ titleText }}</span>
|
<span class="text-subtitle1">{{ titleText }}</span>
|
||||||
<q-select
|
<q-select
|
||||||
|
|
@ -16,7 +21,6 @@
|
||||||
emit-value
|
emit-value
|
||||||
@update:model-value="updateVisibleFilter"
|
@update:model-value="updateVisibleFilter"
|
||||||
v-if="optionsFilter != undefined && optionsFilter.length > 0"
|
v-if="optionsFilter != undefined && optionsFilter.length > 0"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<q-file
|
<q-file
|
||||||
v-model="files"
|
v-model="files"
|
||||||
|
|
@ -49,7 +53,7 @@
|
||||||
emit-value
|
emit-value
|
||||||
@update:model-value="updateVisibleFilter"
|
@update:model-value="updateVisibleFilter"
|
||||||
v-if="optionsFilter != undefined && optionsFilter.length > 0"
|
v-if="optionsFilter != undefined && optionsFilter.length > 0"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -62,24 +66,23 @@
|
||||||
:disabled="
|
:disabled="
|
||||||
attrs.rows.filter((r) => r.status == 'checkRegister').length == 0
|
attrs.rows.filter((r) => r.status == 'checkRegister').length == 0
|
||||||
"
|
"
|
||||||
|
|
||||||
>
|
>
|
||||||
<q-tooltip>ตรวจสอบข้อมูล</q-tooltip>
|
<q-tooltip>ตรวจสอบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
size="md"
|
size="md"
|
||||||
icon="mdi-upload"
|
icon="mdi-upload"
|
||||||
round
|
round
|
||||||
flat
|
flat
|
||||||
color="blue"
|
color="blue"
|
||||||
v-if="statusPayment"
|
v-if="statusPayment"
|
||||||
@click="uploadFile"
|
@click="uploadFile"
|
||||||
>
|
>
|
||||||
<q-tooltip v-if="setSeat == false">อัปโหลดที่นั่งสอบ</q-tooltip>
|
<q-tooltip v-if="setSeat == false">อัปโหลดที่นั่งสอบ</q-tooltip>
|
||||||
<q-tooltip v-if="setSeat == true">อัปโหลดคะแนนสอบ</q-tooltip>
|
<q-tooltip v-if="setSeat == true">อัปโหลดคะแนนสอบ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<q-btn icon="mdi-download" round color="green-6" flat>
|
<q-btn icon="mdi-download" round color="green-6" flat>
|
||||||
|
|
@ -87,35 +90,35 @@
|
||||||
<q-menu>
|
<q-menu>
|
||||||
<q-list style="min-width: 100px">
|
<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-section>
|
||||||
>ดาวน์โหลดสรุปข้อมูลสมัครสอบ</q-item-section
|
|
||||||
>
|
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item clickable v-close-popup @click.stop.prevent="clickCandidateList()">
|
<q-item
|
||||||
<q-item-section
|
clickable
|
||||||
>ดาวน์โหลดรายชื่อผู้มีสิทธิ์สอบ</q-item-section
|
v-close-popup
|
||||||
>
|
@click.stop.prevent="clickCandidateList()"
|
||||||
|
>
|
||||||
|
<q-item-section>ดาวน์โหลดรายชื่อผู้มีสิทธิ์สอบ</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item clickable v-close-popup @click.stop.prevent="clickPassExam()">
|
<q-item
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click.stop.prevent="clickPassExam()"
|
||||||
|
>
|
||||||
<q-item-section
|
<q-item-section
|
||||||
>ดาวน์โหลดรายชื่อผู้สอบคัดเลือกได้</q-item-section
|
>ดาวน์โหลดรายชื่อผู้สอบคัดเลือกได้</q-item-section
|
||||||
>
|
>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item clickable v-close-popup @click="downloadFile()">
|
<q-item clickable v-close-popup @click="downloadFile()">
|
||||||
<q-item-section
|
<q-item-section>ดาวน์โหลดจัดการรายชื่อผู้สมัคร</q-item-section>
|
||||||
>ดาวน์โหลดจัดการรายชื่อผู้สมัคร</q-item-section
|
|
||||||
>
|
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item clickable v-close-popup @click="downloadFileDetail()">
|
<q-item clickable v-close-popup @click="downloadFileDetail()">
|
||||||
<q-item-section
|
<q-item-section>ดาวน์โหลดข้อมูลผู้สมัคร</q-item-section>
|
||||||
>ดาวน์โหลดข้อมูลผู้สมัคร</q-item-section
|
|
||||||
>
|
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-menu>
|
</q-menu>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
size="md"
|
size="md"
|
||||||
icon="mdi-content-save-move-outline"
|
icon="mdi-content-save-move-outline"
|
||||||
|
|
@ -190,7 +193,7 @@
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width>
|
<q-th auto-width>
|
||||||
<q-checkbox v-model="props.selected"/>
|
<q-checkbox v-model="props.selected" />
|
||||||
</q-th>
|
</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">
|
||||||
|
|
@ -476,6 +479,7 @@ const checkCandidates = async () => {
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
||||||
|
selected.value = [];
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,14 @@ interface Occupation {
|
||||||
tel: string | null;
|
tel: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface Contact {
|
||||||
|
contactPrefixId: string | null;
|
||||||
|
contactFirstname: string | null;
|
||||||
|
contactLastname: string | null;
|
||||||
|
contactRelations: string | null;
|
||||||
|
contactTel: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
interface Education {
|
interface Education {
|
||||||
educationLevelExamId: string | null;
|
educationLevelExamId: string | null;
|
||||||
educationName: string | null;
|
educationName: string | null;
|
||||||
|
|
@ -227,6 +235,14 @@ const defaultOccupation = ref<Occupation>({
|
||||||
tel: null,
|
tel: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const defaultContact = ref<Contact>({
|
||||||
|
contactPrefixId: null,
|
||||||
|
contactFirstname: null,
|
||||||
|
contactLastname: null,
|
||||||
|
contactRelations: null,
|
||||||
|
contactTel: null,
|
||||||
|
});
|
||||||
|
|
||||||
const defaultEducation = ref<Education>({
|
const defaultEducation = ref<Education>({
|
||||||
educationLevelExamId: null,
|
educationLevelExamId: null,
|
||||||
educationName: null,
|
educationName: null,
|
||||||
|
|
@ -243,6 +259,7 @@ const changeData = (system: String, val: any) => {
|
||||||
if (system == "address") defaultAddress.value = val;
|
if (system == "address") defaultAddress.value = val;
|
||||||
if (system == "famliy") defaultFamily.value = val;
|
if (system == "famliy") defaultFamily.value = val;
|
||||||
if (system == "occupation") defaultOccupation.value = val;
|
if (system == "occupation") defaultOccupation.value = val;
|
||||||
|
if (system == "contact") defaultContact.value = val;
|
||||||
if (system == "education") defaultEducation.value = val;
|
if (system == "education") defaultEducation.value = val;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -251,6 +268,7 @@ export {
|
||||||
defaultFamily,
|
defaultFamily,
|
||||||
defaultAddress,
|
defaultAddress,
|
||||||
defaultOccupation,
|
defaultOccupation,
|
||||||
|
defaultContact,
|
||||||
defaultEducation,
|
defaultEducation,
|
||||||
changeData,
|
changeData,
|
||||||
};
|
};
|
||||||
|
|
@ -264,6 +282,7 @@ export type {
|
||||||
Address,
|
Address,
|
||||||
zipCodeOption,
|
zipCodeOption,
|
||||||
Occupation,
|
Occupation,
|
||||||
|
Contact,
|
||||||
Education,
|
Education,
|
||||||
ExamCard,
|
ExamCard,
|
||||||
UploadType,
|
UploadType,
|
||||||
|
|
|
||||||
|
|
@ -215,11 +215,6 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-5 text-grey-7">ลำดับที่สอบได้</div>
|
|
||||||
<div class="col-xs-6 col-sm-7 q-pr-xs">
|
|
||||||
{{ number }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-5 text-grey-7">
|
<div class="col-xs-6 col-sm-5 text-grey-7">
|
||||||
วันหมดอายุบัญชีคัดเลือกคนพิการ
|
วันหมดอายุบัญชีคัดเลือกคนพิการ
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@
|
||||||
v-model:formInformation="formInformation"
|
v-model:formInformation="formInformation"
|
||||||
v-model:formAddress="formAddress"
|
v-model:formAddress="formAddress"
|
||||||
v-model:formOccupation="formOccupation"
|
v-model:formOccupation="formOccupation"
|
||||||
|
v-model:formContact="formContact"
|
||||||
v-model:formEducation="formEducation"
|
v-model:formEducation="formEducation"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -131,6 +132,7 @@ import Profile from "@/modules/03_recruiting/components/Profile.vue";
|
||||||
import {
|
import {
|
||||||
defaultInformation,
|
defaultInformation,
|
||||||
defaultOccupation,
|
defaultOccupation,
|
||||||
|
defaultContact,
|
||||||
defaultAddress,
|
defaultAddress,
|
||||||
defaultEducation,
|
defaultEducation,
|
||||||
} from "@/modules/03_recruiting/interface/index/Main";
|
} from "@/modules/03_recruiting/interface/index/Main";
|
||||||
|
|
@ -143,7 +145,14 @@ import config from "@/app.config";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { success, dateToISO, messageError, showLoader, hideLoader } = mixin;
|
const {
|
||||||
|
success,
|
||||||
|
dateToISO,
|
||||||
|
messageError,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
notifyError,
|
||||||
|
} = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const examId = ref<string>(route.params.examId.toString());
|
const examId = ref<string>(route.params.examId.toString());
|
||||||
const candidateId = ref<string>(route.params.candidateId.toString());
|
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||||
|
|
@ -154,6 +163,7 @@ const formInformation = ref<any>({});
|
||||||
const formAddress = ref<any>({});
|
const formAddress = ref<any>({});
|
||||||
const formEducation = ref<any>({});
|
const formEducation = ref<any>({});
|
||||||
const formOccupation = ref<any>({});
|
const formOccupation = ref<any>({});
|
||||||
|
const formContact = ref<any>({});
|
||||||
const status = ref<string>("");
|
const status = ref<string>("");
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
@ -240,80 +250,106 @@ const clickSave = async () => {
|
||||||
.validate()
|
.validate()
|
||||||
.then(async (suc: boolean) => {
|
.then(async (suc: boolean) => {
|
||||||
if (suc) {
|
if (suc) {
|
||||||
showLoader();
|
await formContact.value
|
||||||
await http
|
.validate()
|
||||||
.post(config.API.candidateId(candidateId.value), {
|
.then(async (suc: boolean) => {
|
||||||
prefixId: defaultInformation.value.prefixId,
|
if (suc) {
|
||||||
lastName: defaultInformation.value.lastname,
|
showLoader();
|
||||||
dateOfBirth:
|
await http
|
||||||
defaultInformation.value.birthDate == null
|
.post(config.API.candidateId(candidateId.value), {
|
||||||
? null
|
prefixId: defaultInformation.value.prefixId,
|
||||||
: dateToISO(defaultInformation.value.birthDate),
|
lastName: defaultInformation.value.lastname,
|
||||||
citizenId: defaultInformation.value.cardid,
|
dateOfBirth:
|
||||||
firstName: defaultInformation.value.firstname,
|
defaultInformation.value.birthDate == null
|
||||||
religionId: defaultInformation.value.religionId,
|
? null
|
||||||
nationality: defaultInformation.value.nationality,
|
: dateToISO(
|
||||||
email: defaultInformation.value.email,
|
defaultInformation.value.birthDate
|
||||||
mobilePhone: defaultInformation.value.phone,
|
),
|
||||||
telephone: defaultInformation.value.tel,
|
citizenId: defaultInformation.value.cardid,
|
||||||
knowledge: defaultInformation.value.knowledge,
|
firstName: defaultInformation.value.firstname,
|
||||||
occupationOrg: defaultOccupation.value.org,
|
religionId: defaultInformation.value.religionId,
|
||||||
occupationPile: defaultOccupation.value.pile,
|
nationality: defaultInformation.value.nationality,
|
||||||
occupationGroup: defaultOccupation.value.group,
|
email: defaultInformation.value.email,
|
||||||
occupationSalary: defaultOccupation.value.salary,
|
mobilePhone: defaultInformation.value.phone,
|
||||||
occupationPosition: defaultOccupation.value.position,
|
telephone: defaultInformation.value.tel,
|
||||||
occupationPositionType:
|
knowledge: defaultInformation.value.knowledge,
|
||||||
defaultOccupation.value.positionType,
|
occupationOrg: defaultOccupation.value.org,
|
||||||
occupationTelephone: defaultOccupation.value.tel,
|
occupationPile: defaultOccupation.value.pile,
|
||||||
registAddress: defaultAddress.value.address,
|
occupationGroup: defaultOccupation.value.group,
|
||||||
currentAddress: defaultAddress.value.addressC,
|
occupationSalary: defaultOccupation.value.salary,
|
||||||
registProvinceId: defaultAddress.value.provinceId,
|
occupationPosition:
|
||||||
currentProvinceId: defaultAddress.value.provinceIdC,
|
defaultOccupation.value.position,
|
||||||
registDistrictId: defaultAddress.value.districtId,
|
occupationPositionType:
|
||||||
currentDistrictId: defaultAddress.value.districtIdC,
|
defaultOccupation.value.positionType,
|
||||||
registSubDistrictId: defaultAddress.value.subdistrictId,
|
occupationTelephone: defaultOccupation.value.tel,
|
||||||
currentSubDistrictId:
|
registAddress: defaultAddress.value.address,
|
||||||
defaultAddress.value.subdistrictIdC,
|
currentAddress: defaultAddress.value.addressC,
|
||||||
registZipCode: defaultAddress.value.code,
|
registProvinceId: defaultAddress.value.provinceId,
|
||||||
currentZipCode: defaultAddress.value.codeC,
|
currentProvinceId:
|
||||||
registSame:
|
defaultAddress.value.provinceIdC,
|
||||||
defaultAddress.value.same == "1"
|
registDistrictId: defaultAddress.value.districtId,
|
||||||
? true
|
currentDistrictId:
|
||||||
: defaultAddress.value.same == "0"
|
defaultAddress.value.districtIdC,
|
||||||
? false
|
registSubDistrictId:
|
||||||
: null,
|
defaultAddress.value.subdistrictId,
|
||||||
educationLevelExamId:
|
currentSubDistrictId:
|
||||||
defaultEducation.value.educationLevelExamId,
|
defaultAddress.value.subdistrictIdC,
|
||||||
educationName: defaultEducation.value.educationName,
|
registZipCode: defaultAddress.value.code,
|
||||||
educationMajor: defaultEducation.value.educationMajor,
|
currentZipCode: defaultAddress.value.codeC,
|
||||||
educationLocation:
|
registSame:
|
||||||
defaultEducation.value.educationLocation,
|
defaultAddress.value.same == "1"
|
||||||
educationType: defaultEducation.value.educationType,
|
? true
|
||||||
educationEndDate:
|
: defaultAddress.value.same == "0"
|
||||||
defaultEducation.value.educationEndDate == null
|
? false
|
||||||
? null
|
: null,
|
||||||
: dateToISO(
|
educationLevelExamId:
|
||||||
defaultEducation.value.educationEndDate
|
defaultEducation.value.educationLevelExamId,
|
||||||
),
|
educationName:
|
||||||
educationScores: defaultEducation.value.educationScores,
|
defaultEducation.value.educationName,
|
||||||
educationLevelHighId:
|
educationMajor:
|
||||||
defaultEducation.value.educationLevelHighId,
|
defaultEducation.value.educationMajor,
|
||||||
})
|
educationLocation:
|
||||||
.then(async () => {
|
defaultEducation.value.educationLocation,
|
||||||
success($q, "บันทึกข้อมูลส่วนตัวสำเร็จ");
|
educationType:
|
||||||
})
|
defaultEducation.value.educationType,
|
||||||
.catch((e) => {
|
educationEndDate:
|
||||||
messageError($q, e);
|
defaultEducation.value.educationEndDate == null
|
||||||
})
|
? null
|
||||||
.finally(async () => {
|
: dateToISO(
|
||||||
hideLoader();
|
defaultEducation.value.educationEndDate
|
||||||
|
),
|
||||||
|
educationScores:
|
||||||
|
defaultEducation.value.educationScores,
|
||||||
|
educationLevelHighId:
|
||||||
|
defaultEducation.value.educationLevelHighId,
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
success($q, "บันทึกข้อมูลส่วนตัวสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
notifyError($q, "กรุณากรอกข้อมูลให้ครบถ้วน");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
notifyError($q, "กรุณากรอกข้อมูลให้ครบถ้วน");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
notifyError($q, "กรุณากรอกข้อมูลให้ครบถ้วน");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
notifyError($q, "กรุณากรอกข้อมูลให้ครบถ้วน");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
notifyError($q, "กรุณากรอกข้อมูลให้ครบถ้วน");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ const visibleColumns = ref<String[]>([
|
||||||
"no",
|
"no",
|
||||||
"number",
|
"number",
|
||||||
"position",
|
"position",
|
||||||
"positionLevel",
|
// "positionLevel",
|
||||||
"registerDate",
|
"registerDate",
|
||||||
"examIdenNumber",
|
"examIdenNumber",
|
||||||
"seatNumber",
|
"seatNumber",
|
||||||
|
|
@ -346,15 +346,15 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px; min-width: 200px",
|
headerStyle: "font-size: 14px; min-width: 200px",
|
||||||
style: "font-size: 14px; ",
|
style: "font-size: 14px; ",
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: "positionLevel",
|
// name: "positionLevel",
|
||||||
align: "left",
|
// align: "left",
|
||||||
label: "ระดับ",
|
// label: "ระดับ",
|
||||||
sortable: true,
|
// sortable: true,
|
||||||
field: "positionLevel",
|
// field: "positionLevel",
|
||||||
headerStyle: "font-size: 14px; min-width: 200px",
|
// headerStyle: "font-size: 14px; min-width: 200px",
|
||||||
style: "font-size: 14px; ",
|
// style: "font-size: 14px; ",
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: "citizenId",
|
name: "citizenId",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -489,7 +489,9 @@ const fetchData = async () => {
|
||||||
pass: r.pass,
|
pass: r.pass,
|
||||||
email: r.email,
|
email: r.email,
|
||||||
status: r.status,
|
status: r.status,
|
||||||
position: r.positionExam == null ? "-" : r.positionExam.positionName,
|
position: `${
|
||||||
|
r.positionExam == null ? "-" : r.positionExam.positionName
|
||||||
|
}${r.positionExam == null ? "-" : r.positionExam.positionLevelName}`,
|
||||||
positionLevel:
|
positionLevel:
|
||||||
r.positionExam == null ? "-" : r.positionExam.positionLevelName,
|
r.positionExam == null ? "-" : r.positionExam.positionLevelName,
|
||||||
check: false,
|
check: false,
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,15 @@ import { useQuasar } from "quasar";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
|
|
||||||
const { date2Thai, messageError, showLoader, hideLoader, dialogMessageNotify,dialogConfirm ,dialogRemove} =
|
const {
|
||||||
mixin;
|
date2Thai,
|
||||||
|
messageError,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
dialogMessageNotify,
|
||||||
|
dialogConfirm,
|
||||||
|
dialogRemove,
|
||||||
|
} = mixin;
|
||||||
const previous = ref<boolean>(false);
|
const previous = ref<boolean>(false);
|
||||||
const next = ref<boolean>(false);
|
const next = ref<boolean>(false);
|
||||||
const addDialog = ref<boolean>(false);
|
const addDialog = ref<boolean>(false);
|
||||||
|
|
@ -192,8 +199,7 @@ const selectData = (id: string, agency: boolean) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const editDialog = () => {
|
const editDialog = () => {
|
||||||
|
inputName.value = inputNameBack.value;
|
||||||
inputName.value = inputNameBack.value
|
|
||||||
|
|
||||||
editvisible.value = !editvisible.value;
|
editvisible.value = !editvisible.value;
|
||||||
};
|
};
|
||||||
|
|
@ -236,7 +242,7 @@ const saveAdd = async () => {
|
||||||
name: inputName.value,
|
name: inputName.value,
|
||||||
link: inputLink.value,
|
link: inputLink.value,
|
||||||
});
|
});
|
||||||
await saveDataAgency(arrData,'');
|
await saveDataAgency(arrData, "");
|
||||||
dialog.value = false;
|
dialog.value = false;
|
||||||
} else {
|
} else {
|
||||||
let arrData: DataLink[] = [];
|
let arrData: DataLink[] = [];
|
||||||
|
|
@ -250,14 +256,14 @@ const saveAdd = async () => {
|
||||||
name: inputName.value,
|
name: inputName.value,
|
||||||
link: inputLink.value,
|
link: inputLink.value,
|
||||||
});
|
});
|
||||||
await saveDataGoverment(arrData,'');
|
await saveDataGoverment(arrData, "");
|
||||||
dialog.value = false;
|
dialog.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const saveDelete = async (del:string) => {
|
const saveDelete = async (del: string) => {
|
||||||
if (agencyRow.value) {
|
if (agencyRow.value) {
|
||||||
const filt = cmsAgency.value.filter((r: any) => r.id != idRow.value);
|
const filt = cmsAgency.value.filter((r: any) => r.id != idRow.value);
|
||||||
let arrData: DataLink[] = [];
|
let arrData: DataLink[] = [];
|
||||||
|
|
@ -267,7 +273,7 @@ const saveDelete = async (del:string) => {
|
||||||
link: r.link,
|
link: r.link,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
await saveDataAgency(arrData,del);
|
await saveDataAgency(arrData, del);
|
||||||
dialog.value = false;
|
dialog.value = false;
|
||||||
} else {
|
} else {
|
||||||
const filt = cmsGoverment.value.filter((r: any) => r.id != idRow.value);
|
const filt = cmsGoverment.value.filter((r: any) => r.id != idRow.value);
|
||||||
|
|
@ -278,7 +284,7 @@ const saveDelete = async (del:string) => {
|
||||||
link: r.link,
|
link: r.link,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
await saveDataGoverment(arrData,del);
|
await saveDataGoverment(arrData, del);
|
||||||
dialog.value = false;
|
dialog.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -299,7 +305,7 @@ const saveEdit = async () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
await saveDataAgency(arrData,'');
|
await saveDataAgency(arrData, "");
|
||||||
dialog.value = false;
|
dialog.value = false;
|
||||||
} else {
|
} else {
|
||||||
let arrData: DataLink[] = [];
|
let arrData: DataLink[] = [];
|
||||||
|
|
@ -316,66 +322,65 @@ const saveEdit = async () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
await saveDataGoverment(arrData,'');
|
await saveDataGoverment(arrData, "");
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const saveDataAgency = async (data: DataLink[],del:string) => {
|
const saveDataAgency = async (data: DataLink[], del: string) => {
|
||||||
dialogform.value?.validate().then(async (result: boolean) => {
|
dialogform.value?.validate().then(async (result: boolean) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
if (data.length === 0) {
|
// if (data.length === 0) {
|
||||||
dialogMessageNotify($q, "ลบข้อมูลต้องมี 2 ลิ้งอย่างน้อย 2 ลิ้ง");
|
// dialogMessageNotify($q, "ลบข้อมูลต้องมี 2 ลิ้งอย่างน้อย 2 ลิ้ง");
|
||||||
} else if(del){
|
// } else
|
||||||
dialogRemove($q,() => dataPostAgency(data))
|
if (del) {
|
||||||
}else {
|
dialogRemove($q, () => dataPostAgency(data));
|
||||||
dialogConfirm($q,() => dataPostAgency(data))
|
} else {
|
||||||
|
dialogConfirm($q, () => dataPostAgency(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const saveDataGoverment = async (data: DataLink[],del:string) => {
|
const saveDataGoverment = async (data: DataLink[], del: string) => {
|
||||||
dialogform.value?.validate().then(async (result: boolean) => {
|
dialogform.value?.validate().then(async (result: boolean) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
if (data.length === 0) {
|
// if (data.length === 0) {
|
||||||
dialogMessageNotify($q, "ลบข้อมูลต้องมี 2 ลิ้งอย่างน้อย 2 ลิ้ง");
|
// dialogMessageNotify($q, "ลบข้อมูลต้องมี 2 ลิ้งอย่างน้อย 2 ลิ้ง");
|
||||||
} else if(del){
|
// } else
|
||||||
dialogRemove($q,() => dataPost(data))
|
if (del) {
|
||||||
}else {
|
dialogRemove($q, () => dataPost(data));
|
||||||
dialogConfirm($q,() => dataPost(data))
|
} else {
|
||||||
|
dialogConfirm($q, () => dataPost(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const dataPostAgency = async(data: DataLink[]) => {
|
const dataPostAgency = async (data: DataLink[]) => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.cmsAgency, data)
|
.post(config.API.cmsAgency, data)
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
.catch((e: any) => {
|
.catch((e: any) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
dialog.value = false;
|
dialog.value = false;
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
const dataPost = async(data: DataLink[]) => {
|
const dataPost = async (data: DataLink[]) => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.cmsGoverment, data)
|
.post(config.API.cmsGoverment, data)
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
.catch((e: any) => {
|
.catch((e: any) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
dialog.value = false;
|
dialog.value = false;
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -399,7 +404,7 @@ const fetchData = async () => {
|
||||||
address.value.provinceId = data.provinceId;
|
address.value.provinceId = data.provinceId;
|
||||||
address.value.districtId = data.districtId;
|
address.value.districtId = data.districtId;
|
||||||
address.value.subdistrictId = data.subDistrictId;
|
address.value.subdistrictId = data.subDistrictId;
|
||||||
|
cmsGoverment.value = [];
|
||||||
if (data.cmsGovernments.length > 0) {
|
if (data.cmsGovernments.length > 0) {
|
||||||
let setData: CmsTable[] = [];
|
let setData: CmsTable[] = [];
|
||||||
data.cmsGovernments.map((r: CmsTable) => {
|
data.cmsGovernments.map((r: CmsTable) => {
|
||||||
|
|
@ -414,6 +419,7 @@ const fetchData = async () => {
|
||||||
cmsGoverment.value = setData;
|
cmsGoverment.value = setData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmsAgency.value = [];
|
||||||
if (data.cmsAgencys.length > 0) {
|
if (data.cmsAgencys.length > 0) {
|
||||||
let setData: CmsTable[] = [];
|
let setData: CmsTable[] = [];
|
||||||
data.cmsAgencys.map((r: CmsTable) => {
|
data.cmsAgencys.map((r: CmsTable) => {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import Certicate from "@/modules/05_placement/components/PersonalDetail/Informat
|
||||||
import ExamResult from "@/modules/05_placement/components/PersonalDetail/ExamResult.vue";
|
import ExamResult from "@/modules/05_placement/components/PersonalDetail/ExamResult.vue";
|
||||||
import Qualification from "@/modules/05_placement/components/PersonalDetail/Qualification.vue";
|
import Qualification from "@/modules/05_placement/components/PersonalDetail/Qualification.vue";
|
||||||
import Familyvue from "@/modules/05_placement/components/PersonalDetail/Information/Family.vue";
|
import Familyvue from "@/modules/05_placement/components/PersonalDetail/Information/Family.vue";
|
||||||
import Document from "@/modules/05_placement/components/PersonalDetail/Information/Document.vue";
|
// import Document from "@/modules/05_placement/components/PersonalDetail/Information/Document.vue";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AddressDataDefualt,
|
AddressDataDefualt,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue