fix class modalfix ==> 03_recruiting
This commit is contained in:
parent
13837fb002
commit
b272f73edd
6 changed files with 93 additions and 122 deletions
|
|
@ -1,20 +1,19 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useExamDataStore } from "@/modules/03_recruiting/store";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useExamDataStore } from "@/modules/03_recruiting/store";
|
|
||||||
import type {
|
import type { QTableProps } from "quasar";
|
||||||
RequestItemsObject,
|
import type { RequestItemsObject } from "@/modules/03_recruiting/interface/request/Career";
|
||||||
DataProps,
|
|
||||||
} from "@/modules/03_recruiting/interface/request/Career";
|
|
||||||
import type { ResponseObject } from "@/modules/03_recruiting/interface/response/Career";
|
|
||||||
import Table from "@/modules/03_recruiting/components/TableCan.vue";
|
import Table from "@/modules/03_recruiting/components/TableCan.vue";
|
||||||
import DialogHeader from "@/modules/03_recruiting/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/03_recruiting/components/DialogHeader.vue";
|
||||||
import DialogFooter from "@/modules/03_recruiting/components/DialogFooter.vue";
|
import DialogFooter from "@/modules/03_recruiting/components/DialogFooter.vue";
|
||||||
import { useRoute } from "vue-router";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
status: {
|
status: {
|
||||||
|
|
@ -25,7 +24,14 @@ const props = defineProps({
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { date2Thai, modalDelete, modalConfirm, dateToISO, success,onSearchDataTable } = mixin;
|
const {
|
||||||
|
date2Thai,
|
||||||
|
modalDelete,
|
||||||
|
modalConfirm,
|
||||||
|
dateToISO,
|
||||||
|
success,
|
||||||
|
onSearchDataTable,
|
||||||
|
} = mixin;
|
||||||
const store = useExamDataStore();
|
const store = useExamDataStore();
|
||||||
const { examData, changeExamColumns } = store;
|
const { examData, changeExamColumns } = store;
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
|
|
@ -67,9 +73,6 @@ const visibleColumns = ref<String[]>([]);
|
||||||
examData.career.columns.length == 0
|
examData.career.columns.length == 0
|
||||||
? (visibleColumns.value = [
|
? (visibleColumns.value = [
|
||||||
"position",
|
"position",
|
||||||
// "group",
|
|
||||||
// "pile",
|
|
||||||
// "org",
|
|
||||||
"type",
|
"type",
|
||||||
"startDate",
|
"startDate",
|
||||||
"endDate",
|
"endDate",
|
||||||
|
|
@ -135,22 +138,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
watch(visibleColumns, async (count: String[], prevCount: String[]) => {
|
|
||||||
await changeExamColumns("career", count);
|
|
||||||
});
|
|
||||||
|
|
||||||
watch(startDate, async (count: Date, prevCount: Date) => {
|
|
||||||
await calDate();
|
|
||||||
});
|
|
||||||
|
|
||||||
watch(endDate, async (count: Date, prevCount: Date) => {
|
|
||||||
await calDate();
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
await fetchData();
|
|
||||||
});
|
|
||||||
|
|
||||||
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));
|
||||||
|
|
@ -246,6 +233,8 @@ const calDateSplit = async (startDate: Date, endDate: Date) => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
rows.value = [];
|
||||||
|
total.value = "-";
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateCareer(candidateId.value))
|
.get(config.API.candidateCareer(candidateId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -253,8 +242,6 @@ const fetchData = async () => {
|
||||||
var yearDiff = 0;
|
var yearDiff = 0;
|
||||||
var monthDiff = 0;
|
var monthDiff = 0;
|
||||||
var dayDiff = 0;
|
var dayDiff = 0;
|
||||||
total.value = "-";
|
|
||||||
rows.value = [];
|
|
||||||
data.map((r: any) => {
|
data.map((r: any) => {
|
||||||
rows.value.push({
|
rows.value.push({
|
||||||
...r,
|
...r,
|
||||||
|
|
@ -294,9 +281,7 @@ const fetchData = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** ฟังก์ชันกดดูข้อมูลก่อนหน้า*/
|
||||||
* กดดูข้อมูลก่อนหน้า
|
|
||||||
*/
|
|
||||||
const clickPrevious = async () => {
|
const clickPrevious = async () => {
|
||||||
rowIndex.value -= 1;
|
rowIndex.value -= 1;
|
||||||
const row = rows.value[rowIndex.value];
|
const row = rows.value[rowIndex.value];
|
||||||
|
|
@ -309,12 +294,10 @@ const clickPrevious = async () => {
|
||||||
rangeDate.value = row.rangeDate;
|
rangeDate.value = row.rangeDate;
|
||||||
type.value = row.type;
|
type.value = row.type;
|
||||||
id.value = row.id;
|
id.value = row.id;
|
||||||
await checkRowPage();
|
checkRowPage();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** ฟังก์ชันกดดูข้อมูลต่อไป*/
|
||||||
* กดดูข้อมูลต่อไป
|
|
||||||
*/
|
|
||||||
const clickNext = () => {
|
const clickNext = () => {
|
||||||
rowIndex.value += 1;
|
rowIndex.value += 1;
|
||||||
const row = rows.value[rowIndex.value];
|
const row = rows.value[rowIndex.value];
|
||||||
|
|
@ -330,9 +313,7 @@ const clickNext = () => {
|
||||||
checkRowPage();
|
checkRowPage();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** ฟังก์ชันเช็คปุ่มดูข้อมูล ย้อน กับ ต่อไป ว่าต้องแสดงไหม*/
|
||||||
* เช็คปุ่มดูข้อมูล ย้อน กับ ต่อไป ว่าต้องแสดงไหม
|
|
||||||
*/
|
|
||||||
const checkRowPage = () => {
|
const checkRowPage = () => {
|
||||||
editRow.value = false;
|
editRow.value = false;
|
||||||
next.value = true;
|
next.value = true;
|
||||||
|
|
@ -345,21 +326,21 @@ const checkRowPage = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** กดปุ่มแก้ไขใน dialog*/
|
||||||
* กดปุ่มแก้ไขใน dialog
|
|
||||||
*/
|
|
||||||
const clickEdit = () => {
|
const clickEdit = () => {
|
||||||
next.value = false;
|
next.value = false;
|
||||||
previous.value = false;
|
previous.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** กดปุ่มเพิ่มด้านบน table*/
|
||||||
* กดปุ่มเพิ่มด้านบน table
|
|
||||||
*/
|
|
||||||
const clickAdd = () => {
|
const clickAdd = () => {
|
||||||
addRow();
|
addRow();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* กดลบข้อมูลใน table
|
||||||
|
* @param row ข้อมูลที่ต้องการลบ
|
||||||
|
*/
|
||||||
const checkDelete = (row: RequestItemsObject) => {
|
const checkDelete = (row: RequestItemsObject) => {
|
||||||
rawItem.value = row;
|
rawItem.value = row;
|
||||||
modalDelete(
|
modalDelete(
|
||||||
|
|
@ -370,31 +351,28 @@ const checkDelete = (row: RequestItemsObject) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** ลบข้อมูลใน table*/
|
||||||
* ลบข้อมูลใน table
|
|
||||||
*/
|
|
||||||
const clickDeleteRow = async () => {
|
const clickDeleteRow = async () => {
|
||||||
if (rawItem.value != null) {
|
if (rawItem.value != null) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.candidateAdminCareer(rawItem.value.id))
|
.delete(config.API.candidateAdminCareer(rawItem.value.id))
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
await fetchData();
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(() => {
|
||||||
await fetchData();
|
hideLoader();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** กดบันทึกใน dialog*/
|
||||||
* กดบันทึกใน dialog
|
|
||||||
*/
|
|
||||||
const clickSave = async () => {
|
const clickSave = async () => {
|
||||||
myForm.value.validate().then(async (result: boolean) => {
|
myForm.value.validate().then(async (result: boolean) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
|
|
@ -407,9 +385,7 @@ const clickSave = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** ฟังก์ชันบันทึกเพิ่มข้อมูล*/
|
||||||
* บันทึกเพิ่มข้อมูล
|
|
||||||
*/
|
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -423,7 +399,8 @@ const saveData = async () => {
|
||||||
rangeDate: rangeDate.value,
|
rangeDate: rangeDate.value,
|
||||||
type: type.value,
|
type: type.value,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
await fetchData();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -431,13 +408,11 @@ const saveData = async () => {
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
await fetchData();
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** บันทึกแก้ไขข้อมูล*/
|
||||||
* บันทึกแก้ไขข้อมูล
|
|
||||||
*/
|
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -451,7 +426,8 @@ const editData = async () => {
|
||||||
rangeDate: rangeDate.value,
|
rangeDate: rangeDate.value,
|
||||||
type: type.value,
|
type: type.value,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
await fetchData();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -459,10 +435,10 @@ const editData = async () => {
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
await fetchData();
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** กดปิด dialog และเช็คว่ามีการแก้ไขข้อมูลหรือไม่*/
|
||||||
const checkClose = async () => {
|
const checkClose = async () => {
|
||||||
if (editRow.value == true) {
|
if (editRow.value == true) {
|
||||||
modalConfirm(
|
modalConfirm(
|
||||||
|
|
@ -477,9 +453,7 @@ const checkClose = async () => {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** กดปิด dialog*/
|
||||||
* กดปิด dialog
|
|
||||||
*/
|
|
||||||
const clickClose = async () => {
|
const clickClose = async () => {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
editRow.value = false;
|
editRow.value = false;
|
||||||
|
|
@ -510,9 +484,7 @@ const selectData = (props: any) => {
|
||||||
previous.value = false;
|
previous.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** กดปุ่มเพิ่มบน table*/
|
||||||
* กดปุ่มเพิ่มบน table
|
|
||||||
*/
|
|
||||||
const addRow = () => {
|
const addRow = () => {
|
||||||
modalEdit.value = false;
|
modalEdit.value = false;
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
|
|
@ -526,9 +498,7 @@ const addRow = () => {
|
||||||
type.value = null;
|
type.value = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** เช็คว่ามีการแก้ไขข้อมูล*/
|
||||||
* เช็คว่ามีการแก้ไขข้อมูล
|
|
||||||
*/
|
|
||||||
const clickEditRow = () => {
|
const clickEditRow = () => {
|
||||||
myForm.value.validate();
|
myForm.value.validate();
|
||||||
editRow.value = true;
|
editRow.value = true;
|
||||||
|
|
@ -538,9 +508,7 @@ const clickEditRowPosition = () => {
|
||||||
editRow.value = true;
|
editRow.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** validate input ใน dialog*/
|
||||||
* validate input ใน dialog
|
|
||||||
*/
|
|
||||||
const validateData = async () => {
|
const validateData = async () => {
|
||||||
checkValidate.value = true;
|
checkValidate.value = true;
|
||||||
await myForm.value.validate().then((result: boolean) => {
|
await myForm.value.validate().then((result: boolean) => {
|
||||||
|
|
@ -561,6 +529,7 @@ const getClass = (val: boolean) => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** ฟังก์ชันค้นหาข้อมูลในตาราง */
|
||||||
function onSearch() {
|
function onSearch() {
|
||||||
rows.value = onSearchDataTable(
|
rows.value = onSearchDataTable(
|
||||||
filter.value,
|
filter.value,
|
||||||
|
|
@ -568,6 +537,26 @@ function onSearch() {
|
||||||
columns.value ? columns.value : []
|
columns.value ? columns.value : []
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** watch ข้อมูลที่เปลี่ยนแปลงใน visibleColumns */
|
||||||
|
watch(visibleColumns, async (count: String[], prevCount: String[]) => {
|
||||||
|
await changeExamColumns("career", count);
|
||||||
|
});
|
||||||
|
|
||||||
|
/** watch ข้อมูลที่เปลี่ยนแปลงใน startDate และ endDate */
|
||||||
|
watch(startDate, async (count: Date, prevCount: Date) => {
|
||||||
|
await calDate();
|
||||||
|
});
|
||||||
|
|
||||||
|
/** watch ข้อมูลที่เปลี่ยนแปลงใน endDate */
|
||||||
|
watch(endDate, async (count: Date, prevCount: Date) => {
|
||||||
|
await calDate();
|
||||||
|
});
|
||||||
|
|
||||||
|
/** Hook ที่ทำงานเมื่อ component ถูก mount */
|
||||||
|
onMounted(async () => {
|
||||||
|
await fetchData();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -829,8 +818,4 @@ function onSearch() {
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss"></style>
|
||||||
.modalfix {
|
|
||||||
position: fixed !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ const getClass = (val: boolean) => {
|
||||||
v-model="defaultEducation.educationLevelExamId"
|
v-model="defaultEducation.educationLevelExamId"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก วุฒิที่ใช้สมัครสอบ'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือก วุฒิที่ใช้สมัครสอบ'}`]"
|
||||||
:label="`${'วุฒิที่ใช้สมัครสอบ'}`"
|
:label="`${'วุฒิที่ใช้สมัครสอบ'}`"
|
||||||
@update:model-value="(value) => checkInputName()"
|
@update:model-value="() => checkInputName()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3" v-if="showEducationName">
|
<div class="col-xs-12 col-sm-3" v-if="showEducationName">
|
||||||
|
|
@ -233,7 +233,7 @@ const getClass = (val: boolean) => {
|
||||||
"
|
"
|
||||||
:model-value="date2Thai(defaultEducation.educationEndDate)"
|
:model-value="date2Thai(defaultEducation.educationEndDate)"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`,
|
(val:string) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`,
|
||||||
]"
|
]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'วันที่สำเร็จการศึกษา'}`"
|
:label="`${'วันที่สำเร็จการศึกษา'}`"
|
||||||
|
|
|
||||||
|
|
@ -213,8 +213,8 @@ onMounted(async () => {
|
||||||
v-model="defaultInformation.cardid"
|
v-model="defaultInformation.cardid"
|
||||||
maxlength="13"
|
maxlength="13"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => val.length == 13 || `${'กรุณากรอก เลขประจำตัวประชาชน'}`,
|
(val:string) => val.length == 13 || `${'กรุณากรอก เลขประจำตัวประชาชน'}`,
|
||||||
(val) =>
|
(val:string) =>
|
||||||
/^[0-9]*$/.test(val) ||
|
/^[0-9]*$/.test(val) ||
|
||||||
`${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`,
|
`${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`,
|
||||||
]"
|
]"
|
||||||
|
|
@ -383,8 +383,8 @@ onMounted(async () => {
|
||||||
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||||
v-model="defaultInformation.tel"
|
v-model="defaultInformation.tel"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || '* กรุณากรอกข้อมูลหมายเลขโทรศัพท์',
|
(val:string) => !!val || '* กรุณากรอกข้อมูลหมายเลขโทรศัพท์',
|
||||||
(val) =>
|
(val:string) =>
|
||||||
(val.length >= 9 && val.length <= 10 && val.startsWith('0')) ||
|
(val.length >= 9 && val.length <= 10 && val.startsWith('0')) ||
|
||||||
'กรุณากรอกข้อมูลหมายเลขโทรศัพท์ให้ถูกต้อง',
|
'กรุณากรอกข้อมูลหมายเลขโทรศัพท์ให้ถูกต้อง',
|
||||||
]"
|
]"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import { onMounted, ref, watch, computed } from "vue";
|
import { onMounted, ref, watch, computed } from "vue";
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar, QForm } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
|
@ -21,7 +20,6 @@ const route = useRoute();
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
success,
|
success,
|
||||||
dateToISO,
|
|
||||||
messageError,
|
messageError,
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
|
|
@ -137,13 +135,14 @@ async function uploadDocData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.periodRecruitDoc(id.value), formData)
|
.put(config.API.periodRecruitDoc(id.value), formData)
|
||||||
.then((res) => {})
|
.then(() => {
|
||||||
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
|
||||||
clickBack();
|
clickBack();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -162,7 +161,7 @@ async function uploadImgData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.periodRecruitImg(id.value), formData)
|
.put(config.API.periodRecruitImg(id.value), formData)
|
||||||
.then((res) => {})
|
.then(() => {})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
|
|
@ -417,7 +416,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="yearly"
|
v-model="yearly"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -467,7 +465,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-4 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-4 col-md-3" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="dateExam"
|
v-model="dateExam"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -503,7 +500,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="dateAnnouncement"
|
v-model="dateAnnouncement"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -546,7 +542,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="dateRegister"
|
v-model="dateRegister"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -588,7 +583,6 @@ onMounted(async () => {
|
||||||
v-if="announcementExam && isFeeNotZero"
|
v-if="announcementExam && isFeeNotZero"
|
||||||
>
|
>
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="datePayment"
|
v-model="datePayment"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -628,7 +622,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="dateAnnounce"
|
v-model="dateAnnounce"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,10 @@ const route = useRoute();
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
success,
|
success,
|
||||||
dateToISO,
|
|
||||||
notifyError,
|
|
||||||
messageError,
|
messageError,
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
convertDateToAPI
|
convertDateToAPI,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const myForm = ref<QForm | null>(null); //form data input
|
const myForm = ref<QForm | null>(null); //form data input
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
|
|
@ -141,13 +139,21 @@ function sendData() {
|
||||||
name: name.value,
|
name: name.value,
|
||||||
note: note.value,
|
note: note.value,
|
||||||
paymentEndDate:
|
paymentEndDate:
|
||||||
datePayment.value !== null ? convertDateToAPI(datePayment.value[1]) : null,
|
datePayment.value !== null
|
||||||
|
? convertDateToAPI(datePayment.value[1])
|
||||||
|
: null,
|
||||||
paymentStartDate:
|
paymentStartDate:
|
||||||
datePayment.value !== null ? convertDateToAPI(datePayment.value[0]) : null,
|
datePayment.value !== null
|
||||||
|
? convertDateToAPI(datePayment.value[0])
|
||||||
|
: null,
|
||||||
registerEndDate:
|
registerEndDate:
|
||||||
dateRegister.value !== null ? convertDateToAPI(dateRegister.value[1]) : null,
|
dateRegister.value !== null
|
||||||
|
? convertDateToAPI(dateRegister.value[1])
|
||||||
|
: null,
|
||||||
registerStartDate:
|
registerStartDate:
|
||||||
dateRegister.value !== null ? convertDateToAPI(dateRegister.value[0]) : null,
|
dateRegister.value !== null
|
||||||
|
? convertDateToAPI(dateRegister.value[0])
|
||||||
|
: null,
|
||||||
round: round.value,
|
round: round.value,
|
||||||
year: yearly.value,
|
year: yearly.value,
|
||||||
announcementDate:
|
announcementDate:
|
||||||
|
|
@ -312,7 +318,7 @@ async function uploadDocData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.periodExamDoc(id.value), formData)
|
.put(config.API.periodExamDoc(id.value), formData)
|
||||||
.then((res) => {})
|
.then(() => {})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
|
|
@ -405,7 +411,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="yearly"
|
v-model="yearly"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -453,7 +458,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="dateExam"
|
v-model="dateExam"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -489,7 +493,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="dateAnnouncement"
|
v-model="dateAnnouncement"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -527,7 +530,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="dateRegister"
|
v-model="dateRegister"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -568,7 +570,6 @@ onMounted(async () => {
|
||||||
v-if="announcementExam && fee != 0"
|
v-if="announcementExam && fee != 0"
|
||||||
>
|
>
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="datePayment"
|
v-model="datePayment"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -609,7 +610,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="dateAnnounce"
|
v-model="dateAnnounce"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!-- page:จัดการรอบการสอบ สรรหา -->
|
<!-- page:จัดการรอบการสอบ สรรหา -->
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { onMounted, ref, watch, computed } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar, QForm } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ const route = useRoute();
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
success,
|
success,
|
||||||
dateToISO,
|
|
||||||
messageError,
|
messageError,
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
|
|
@ -46,7 +46,6 @@ const {
|
||||||
const checkRoutePermisson = ref<boolean>(
|
const checkRoutePermisson = ref<boolean>(
|
||||||
route.name == "qualifyPeriodEditDetail"
|
route.name == "qualifyPeriodEditDetail"
|
||||||
); //เช็คชื่อ route
|
); //เช็คชื่อ route
|
||||||
const fileList = ref<any[]>([]);
|
|
||||||
const myForm = ref<QForm | null>(null); //form data input
|
const myForm = ref<QForm | null>(null); //form data input
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
const note = ref<string>("");
|
const note = ref<string>("");
|
||||||
|
|
@ -967,7 +966,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="yearly"
|
v-model="yearly"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
:readonly="checkRoutePermisson"
|
:readonly="checkRoutePermisson"
|
||||||
|
|
@ -995,7 +993,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="dateExam"
|
v-model="dateExam"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -1035,7 +1032,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="dateAnnouncement"
|
v-model="dateAnnouncement"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
:readonly="checkRoutePermisson"
|
:readonly="checkRoutePermisson"
|
||||||
|
|
@ -1075,7 +1071,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="dateRegister"
|
v-model="dateRegister"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -1120,7 +1115,6 @@ onMounted(async () => {
|
||||||
v-if="announcementExam && fee != 0"
|
v-if="announcementExam && fee != 0"
|
||||||
>
|
>
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="datePayment"
|
v-model="datePayment"
|
||||||
:readonly="checkRoutePermisson"
|
:readonly="checkRoutePermisson"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
|
|
@ -1161,7 +1155,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="dateAnnounce"
|
v-model="dateAnnounce"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue