Merge pull request #1516 from Frappet/fix/graduationYearLock
fix:add feild graduationYearLock
This commit is contained in:
commit
0f18da1d4f
3 changed files with 102 additions and 27 deletions
|
|
@ -75,6 +75,7 @@ interface RequestPosition {
|
|||
typeId: string;
|
||||
typeName: string;
|
||||
highDegree: Boolean;
|
||||
educationLevel?: string;
|
||||
}
|
||||
|
||||
interface RequestPayment {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ interface ResponsePosition {
|
|||
name: string;
|
||||
};
|
||||
highDegree: string;
|
||||
educationLevel?: string;
|
||||
}
|
||||
interface ResponsePayment {
|
||||
id: string;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ const datePayment = ref<[Date, Date] | null>(null); //วันที่จ่
|
|||
const dateAnnouncement = ref<[Date, Date] | null>(null); //วันที่ประกาศ
|
||||
const dateAnnounce = ref<Date | null>(null); //วันประกาศผลสอบ
|
||||
const dateExam = ref<Date | null>(null); //วันที่สอบ
|
||||
const graduationYearLock = ref<number>(3); //ล็อกวันที่สำเร็จการศึกษา (ปี)
|
||||
const myFormPayment = ref<any>();
|
||||
const myFormPosition = ref<any>();
|
||||
const organizationShortName = ref<DataOption2>();
|
||||
|
|
@ -149,6 +150,7 @@ const visibleColumnsPosition = ref<String[]>([
|
|||
"position",
|
||||
"level",
|
||||
"type",
|
||||
"educational",
|
||||
"highDegree",
|
||||
]);
|
||||
const columnsPosition = ref<QTableProps["columns"]>([
|
||||
|
|
@ -198,6 +200,18 @@ const columnsPosition = ref<QTableProps["columns"]>([
|
|||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
|
||||
{
|
||||
name: "educational",
|
||||
align: "left",
|
||||
label: "กำหนดขีดจำกัดวุฒิการศึกษา",
|
||||
sortable: true,
|
||||
field: "educational",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
|
||||
{
|
||||
name: "type",
|
||||
align: "left",
|
||||
|
|
@ -241,6 +255,7 @@ async function fetchData() {
|
|||
},
|
||||
code: r.code,
|
||||
highDegree: r.highDegree == true ? "1" : "0",
|
||||
educationLevel: r.educationLevel,
|
||||
});
|
||||
});
|
||||
const bankData: ResponsePayment[] = [];
|
||||
|
|
@ -313,6 +328,7 @@ async function fetchData() {
|
|||
companyCode.value = data.companyCode;
|
||||
refNo1.value = data.refNo1;
|
||||
reason.value = data.reason;
|
||||
graduationYearLock.value = data.graduationYearLock;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -404,6 +420,7 @@ function sendData() {
|
|||
typeName: r.type.name,
|
||||
code: r.code,
|
||||
highDegree: r.highDegree == "1" ? true : false,
|
||||
educationLevel: r.educationLevel,
|
||||
});
|
||||
});
|
||||
if (fee.value == 0) {
|
||||
|
|
@ -458,6 +475,7 @@ function sendData() {
|
|||
companyCode: companyCode.value,
|
||||
refNo1: refNo1.value,
|
||||
reason: reason.value,
|
||||
graduationYearLock: Number(graduationYearLock.value),
|
||||
};
|
||||
return valueData;
|
||||
}
|
||||
|
|
@ -839,6 +857,8 @@ function onUpdateHighDegree(val: string, index: string) {
|
|||
rowsPosition.value[index].position = null;
|
||||
rowsPosition.value[index].level =
|
||||
val === "0" ? optionPosLevel1.value[0] : optionPosLevel2.value[0];
|
||||
rowsPosition.value[index].educationLevel =
|
||||
val === "0" ? "LOW_BACHELOR" : "BACHELOR";
|
||||
}
|
||||
|
||||
watch(fee, () => {
|
||||
|
|
@ -1014,6 +1034,7 @@ onMounted(async () => {
|
|||
:readonly="checkRoutePermisson"
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
@ -1070,6 +1091,7 @@ onMounted(async () => {
|
|||
:model-value="dateThaiRange(dateAnnouncement)"
|
||||
:label="`${'วันที่ประกาศ'}`"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ประกาศ'}`]"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -1110,6 +1132,7 @@ onMounted(async () => {
|
|||
:label="`${'วันที่สมัคร'}`"
|
||||
clearable
|
||||
@clear="clearDateRegister"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -1154,6 +1177,7 @@ onMounted(async () => {
|
|||
:label="`${'วันที่ชำระเงิน'}`"
|
||||
clearable
|
||||
@clear="clearDatePayment"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -1195,6 +1219,7 @@ onMounted(async () => {
|
|||
:label="`${'วันประกาศผลสอบ'}`"
|
||||
clearable
|
||||
@clear="clearDateAnnounce"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -1208,6 +1233,22 @@ onMounted(async () => {
|
|||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="row col-12" v-if="announcementExam">
|
||||
<div class="col-xs-12 col-md-2">
|
||||
<q-input
|
||||
outlined
|
||||
v-model="graduationYearLock"
|
||||
label="ล็อกวันที่สำเร็จการศึกษา (ปี)"
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
lazy-rules
|
||||
:rules="[
|
||||
(val:string) => !!val || `${'กรุณากรอกล็อกวันที่สำเร็จการศึกษา (ปี)'}`,
|
||||
]"
|
||||
type="number"
|
||||
></q-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12" v-if="announcementExam">
|
||||
<div class="col-12 q-mb-sm">
|
||||
|
|
@ -1261,33 +1302,41 @@ onMounted(async () => {
|
|||
/>
|
||||
</q-td>
|
||||
|
||||
<q-td key="highDegree" :props="props">
|
||||
<q-radio
|
||||
v-model="props.row.highDegree"
|
||||
label="ประเภททั่วไป"
|
||||
color="teal"
|
||||
:disable="checkRoutePermisson"
|
||||
val="0"
|
||||
@update:model-value="
|
||||
onUpdateHighDegree(
|
||||
props.row.highDegree,
|
||||
props.rowIndex
|
||||
)
|
||||
"
|
||||
/>
|
||||
<q-radio
|
||||
v-model="props.row.highDegree"
|
||||
label="ประเภทวิชาการ"
|
||||
color="teal"
|
||||
:disable="checkRoutePermisson"
|
||||
val="1"
|
||||
@update:model-value="
|
||||
onUpdateHighDegree(
|
||||
props.row.highDegree,
|
||||
props.rowIndex
|
||||
)
|
||||
"
|
||||
/>
|
||||
<q-td
|
||||
key="highDegree"
|
||||
:props="props"
|
||||
class="q-col-gutter-sm"
|
||||
>
|
||||
<div class="col-12">
|
||||
<q-radio
|
||||
v-model="props.row.highDegree"
|
||||
label="ประเภททั่วไป"
|
||||
color="teal"
|
||||
:disable="checkRoutePermisson"
|
||||
val="0"
|
||||
@update:model-value="
|
||||
onUpdateHighDegree(
|
||||
props.row.highDegree,
|
||||
props.rowIndex
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-radio
|
||||
v-model="props.row.highDegree"
|
||||
label="ประเภทวิชาการ"
|
||||
color="teal"
|
||||
:disable="checkRoutePermisson"
|
||||
val="1"
|
||||
@update:model-value="
|
||||
onUpdateHighDegree(
|
||||
props.row.highDegree,
|
||||
props.rowIndex
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="level" :props="props">
|
||||
<selector
|
||||
|
|
@ -1356,6 +1405,30 @@ onMounted(async () => {
|
|||
</template>
|
||||
</selector>
|
||||
</q-td>
|
||||
<q-td
|
||||
key="educational"
|
||||
:props="props"
|
||||
class="q-col-gutter-sm"
|
||||
>
|
||||
<div class="col-12">
|
||||
<q-radio
|
||||
v-model="props.row.educationLevel"
|
||||
label="วุฒิปริญญาตรี"
|
||||
color="teal"
|
||||
:disable="checkRoutePermisson"
|
||||
val="BACHELOR"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-radio
|
||||
v-model="props.row.educationLevel"
|
||||
label="ต่ำกว่าปริญญาตรี"
|
||||
color="teal"
|
||||
:disable="checkRoutePermisson"
|
||||
val="LOW_BACHELOR"
|
||||
/>
|
||||
</div>
|
||||
</q-td>
|
||||
|
||||
<q-td key="type" :props="props">
|
||||
<selector
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue