แก้ไข ui เพิ่มเติม แบบฟอร์มการลา

This commit is contained in:
AnandaTon 2023-11-22 20:50:55 +07:00
parent f5cf2a74ef
commit 7e1829ab95
3 changed files with 12 additions and 13 deletions

View file

@ -101,6 +101,15 @@ function onValidate() {
props.onSubmit()
}
}
/**
* function พเดทค LeaveTotal
*/
function updateLeaveTotal() {
const newLeaveTotal = calculateDurationYmd(formData.startLeaveDate, formData.endLeaveDate)
formData.leaveTotal = newLeaveTotal
console.log("test")
}
</script>
<template>
@ -186,6 +195,7 @@ function onValidate() {
borderless
hide-bottom-space
:enableTimePicker="false"
@update:model-value="updateLeaveTotal"
week-start="0"
:readonly="!formData.startLeaveDate"
:min-date="formData.startLeaveDate ? new Date(formData.startLeaveDate.getTime() + 24 * 60 * 60 * 1000) : null"

View file

@ -268,18 +268,7 @@ watch(formData.followHistoryEnd, newVal => {
</q-input>
</template>
</datepicker>
<q-input
class="col-12 col-md-2 col-sm-6"
dense
outlined
bg-color="white"
ref="leaveTotalRef"
for="leaveTotalRef"
v-model="formData.leaveTotal"
label="เป็นเวลา"
readonly
hide-bottom-space
/>
<q-input class="col-12 col-md-2 col-sm-6" dense outlined ref="leaveTotalRef" for="leaveTotalRef" v-model="formData.leaveTotal" label="เป็นเวลา" readonly hide-bottom-space />
<div class="col-12 col-md-6 col-sm-12">
<q-input hide-bottom-space class="col-12 col-sm-12" ref="salaryRef" for="salaryRef" dense outlined v-model="formattSalary" label="เงินเดือนปัจจุบัน" readonly />
</div>

View file

@ -139,7 +139,7 @@ export const useLeaveStore = defineStore("Leave", () => {
/** รายการประเภทการลาของ ลาอุปสมบทหรือลาประกอบพิธีฮัจย์ฯ*/
const optionsOrdination = ref([
{ id: "0", name: "ลาอุปสมบท" },
{ id: "1", name: "ลาประกอบพิธีฮัจย์" },
{ id: "1", name: "ลาประกอบพิธีฮัจย์" },
])
/** รายการข้อมูลประเภทใบลา */