แก้ ยื่นใบลา(ต่อ พน)
This commit is contained in:
parent
2e26bf44eb
commit
0cf2adc7d1
10 changed files with 45 additions and 18 deletions
|
|
@ -206,6 +206,20 @@ const isReadOnly = computed(() => {
|
|||
}
|
||||
return conditionHalfDay
|
||||
})
|
||||
|
||||
function inputEdit(val: boolean) {
|
||||
return {
|
||||
"full-width cursor-pointer ": val,
|
||||
"full-width cursor-pointer inputgreen": !val,
|
||||
};
|
||||
}
|
||||
|
||||
function resetEndDate(type:string){
|
||||
if(type === 'day'){
|
||||
formDataSick.EndLeaveDate === null
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- ฟอร์มลาป่วย และลากิจส่วนตัว -->
|
||||
|
|
@ -248,6 +262,7 @@ const isReadOnly = computed(() => {
|
|||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:readonly="!edit"
|
||||
@update:model-value="formDataSick.leaveEndDate = null"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
@ -264,7 +279,7 @@ const isReadOnly = computed(() => {
|
|||
hide-bottom-space
|
||||
:readonly="!edit"
|
||||
bg-color="white"
|
||||
class="full-width datepicker cursor-pointer inputgreen"
|
||||
class="full-width cursor-pointer inputgreen"
|
||||
:model-value="formDataSick.leaveStartDate != null ? date2Thai(formDataSick.leaveStartDate) : null"
|
||||
:label="`${'ลาตั้งแต่วันที่'}`"
|
||||
:rules="[val => !!val || `${'กรุณาเลือกลาตั้งแต่วันที่'}`]"
|
||||
|
|
@ -288,7 +303,7 @@ const isReadOnly = computed(() => {
|
|||
week-start="0"
|
||||
:readonly="isReadOnly"
|
||||
@update:model-value="FetchCheck()"
|
||||
:min-date="formDataSick.leaveStartDate ? new Date(formDataSick.leaveStartDate.getTime() * 60 * 60 * 1000) : null"
|
||||
:min-date="formDataSick.leaveStartDate"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
@ -305,7 +320,7 @@ const isReadOnly = computed(() => {
|
|||
hide-bottom-space
|
||||
bg-color="white"
|
||||
:readonly="isReadOnly"
|
||||
class="full-width datepicker cursor-pointer inputgreen"
|
||||
:class="inputEdit(isReadOnly)"
|
||||
:model-value="formDataSick.leaveEndDate != null ? date2Thai(formDataSick.leaveEndDate) : null"
|
||||
:label="`${'ลาถึงวันที่'}`"
|
||||
:rules="[val => !!val || `${'กรุณาเลือกลาถึงวันที่'}`]"
|
||||
|
|
|
|||
|
|
@ -204,6 +204,7 @@ async function saveFormData() {
|
|||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:readonly="!edit"
|
||||
@update:model-value="formDataBirth.leaveEndDate = null"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
@ -244,7 +245,7 @@ async function saveFormData() {
|
|||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:readonly="!formDataBirth.leaveStartDate"
|
||||
:min-date="formDataBirth.leaveStartDate ? new Date(formDataBirth.leaveStartDate.getTime() * 60 * 60 * 1000) : null"
|
||||
:min-date="formDataBirth.leaveStartDate"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@ async function saveFormData() {
|
|||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:readonly="!edit"
|
||||
@update:model-value="formDataHelpWife.leaveEndDate = null"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
@ -259,7 +260,7 @@ async function saveFormData() {
|
|||
@update:model-value="updateLeaveTotal, FetchCheck()"
|
||||
week-start="0"
|
||||
:readonly="!formDataHelpWife.leaveStartDate"
|
||||
:min-date="formDataHelpWife.leaveStartDate ? new Date(formDataHelpWife.leaveStartDate.getTime() * 60 * 60 * 1000) : null"
|
||||
:min-date="formDataHelpWife.leaveStartDate"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ function updateLeaveTotal() {
|
|||
bg-color="white"
|
||||
hide-bottom-space
|
||||
readonly
|
||||
class="full-width datepicker"
|
||||
class="full-width"
|
||||
:model-value="formDataOrdination.leavegovernmentDate != null ? date2Thai(formDataOrdination.leavegovernmentDate) : null"
|
||||
:label="`${'วันที่เข้ารับราชการ'}`"
|
||||
:rules="[val => !!val || `${'กรุณาเลือกวันที่เข้ารับราชการ'}`]"
|
||||
|
|
@ -369,7 +369,7 @@ function updateLeaveTotal() {
|
|||
bg-color="white"
|
||||
hide-bottom-space
|
||||
readonly
|
||||
class="full-width datepicker"
|
||||
class="full-width"
|
||||
:model-value="formDataOrdination.leavebirthDate != null ? date2Thai(formDataOrdination.leavebirthDate) : null"
|
||||
:label="`${'วันเดือนปีเกิด'}`"
|
||||
:rules="[val => !!val || `${'กรุณาเลือกลาตั้งแต่วันที่'}`]"
|
||||
|
|
|
|||
|
|
@ -158,6 +158,8 @@ function updateLeaveTotal() {
|
|||
formDataHaji.leaveTotal = newLeaveTotal
|
||||
console.log("test")
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -290,7 +292,7 @@ function updateLeaveTotal() {
|
|||
<q-input
|
||||
ref="leavegovernmentDateRef"
|
||||
bg-color="white"
|
||||
class="full-width datepicker"
|
||||
class="full-width"
|
||||
outlined
|
||||
dense
|
||||
readonly
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ const formattedleaveSalary = computed(() => {
|
|||
<template #trigger>
|
||||
<q-input
|
||||
ref="leavegovernmentDateRef"
|
||||
class="full-width datepicker"
|
||||
class="full-width"
|
||||
bg-color="white"
|
||||
outlined
|
||||
readonly
|
||||
|
|
@ -364,7 +364,7 @@ const formattedleaveSalary = computed(() => {
|
|||
<template #trigger>
|
||||
<q-input
|
||||
ref="leavebirthDateRef"
|
||||
class="full-width datepicker"
|
||||
class="full-width"
|
||||
bg-color="white"
|
||||
outlined
|
||||
dense
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ const formattedSalary = computed(() => {
|
|||
<template #trigger>
|
||||
<q-input
|
||||
ref="leavegovernmentDateRef"
|
||||
class="full-width datepicker"
|
||||
class="full-width"
|
||||
outlined
|
||||
readonly
|
||||
bg-color="white"
|
||||
|
|
@ -365,7 +365,7 @@ const formattedSalary = computed(() => {
|
|||
<template #trigger>
|
||||
<q-input
|
||||
ref="leavebirthDateRef"
|
||||
class="full-width datepicker"
|
||||
class="full-width"
|
||||
bg-color="white"
|
||||
outlined
|
||||
dense
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ function updateLeaveTotal() {
|
|||
hide-bottom-space
|
||||
readonly
|
||||
bg-color="white"
|
||||
class="full-width datepicker"
|
||||
class="full-width"
|
||||
:model-value="formDataFollowSpouse.followHistoryStart != null ? date2Thai(formDataFollowSpouse.followHistoryStart) : null"
|
||||
:label="`${'ตั้งแต่วันที่'}`"
|
||||
:rules="[val => !!val || `${'กรุณาเลือกตั้งแต่วันที่'}`]"
|
||||
|
|
@ -483,7 +483,7 @@ function updateLeaveTotal() {
|
|||
hide-bottom-space
|
||||
bg-color="white"
|
||||
readonly
|
||||
class="full-width datepicker"
|
||||
class="full-width"
|
||||
:model-value="formDataFollowSpouse.followHistoryEnd != null ? date2Thai(formDataFollowSpouse.followHistoryEnd) : null"
|
||||
:label="`${'ถึงวันที่'}`"
|
||||
:rules="[val => !!val || `${'กรุณาเลือกถึงวันที่'}`]"
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ onMounted(async () => {
|
|||
bg-color="white"
|
||||
hide-bottom-space
|
||||
readonly
|
||||
class="full-width datepicker"
|
||||
class="full-width"
|
||||
:model-value="dataStore.dateSendLeave != null ? date2Thai(dataStore.dateSendLeave) : null"
|
||||
:label="`${'วันที่ยื่นใบลา'}`"
|
||||
:rules="[val => !!val || `${'กรุณาเลือกวันที่ยื่นใบลา'}`]"
|
||||
|
|
@ -76,9 +76,9 @@ onMounted(async () => {
|
|||
<q-input class="col-12 col-sm-3" dense outlined readonly bg-color="white" v-model="dataStore.positionName" label="ตำแหน่งผู้ยื่นขอ" />
|
||||
<q-input class="col-12 col-sm-3" dense outlined readonly bg-color="white" v-model="dataStore.positionLevelName" label="ระดับผู้ยื่นขอ" />
|
||||
<q-input class="col-12 col-sm-3" dense outlined readonly bg-color="white" v-model="dataStore.organizationName" label="สังกัดผู้ยื่นขอ" />
|
||||
<q-input class="col-12 col-sm-4" dense outlined readonly bg-color="white" v-model="dataStore.leaveLimit" label="จำนวนสิทธิ์การลาที่ได้รับ" />
|
||||
<q-input v-if="props.model === 'LV-005'" class="col-12 col-sm-4" dense outlined readonly bg-color="white" v-model="dataStore.leaveLimit" label="จำนวนสิทธิ์การลาที่ได้รับ" />
|
||||
<q-input class="col-12 col-sm-4" dense outlined readonly bg-color="white" v-model="dataStore.leaveTotal" label="จำนวนสิทธิ์การลาที่ใช้ไป" />
|
||||
<q-input class="col-12 col-sm-4" dense outlined readonly bg-color="white" v-model="dataStore.leaveRemain" label="จำนวนสิทธิ์การลาคงเหลือ" />
|
||||
<q-input v-if="props.model === 'LV-005'" class="col-12 col-sm-4" dense outlined readonly bg-color="white" v-model="dataStore.leaveRemain" label="จำนวนสิทธิ์การลาคงเหลือ" />
|
||||
</div>
|
||||
</q-card>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -52,6 +52,14 @@ async function fectOptionType() {
|
|||
messageError($q, err)
|
||||
})
|
||||
}
|
||||
|
||||
function inputEdit(val: boolean) {
|
||||
return {
|
||||
"full-width cursor-pointer ": val,
|
||||
"full-width cursor-pointer inputgreen": !val,
|
||||
};
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -74,7 +82,7 @@ async function fectOptionType() {
|
|||
<div class="row">
|
||||
<q-select
|
||||
dense
|
||||
class="col-12 col-sm-6 col-md-4"
|
||||
class="col-12 col-sm-6 col-md-4 inputgreen"
|
||||
outlined
|
||||
v-model="model"
|
||||
:options="dataStore.options"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue