แก้ไขตัวแปรลาครั้งสุดท้าย
This commit is contained in:
parent
24ec62633a
commit
e0a16671dd
4 changed files with 16 additions and 10 deletions
|
|
@ -36,13 +36,16 @@ const formDataSick = reactive<any>({
|
|||
leaveEndDate: null,
|
||||
halfDay: "day",
|
||||
leaveTotal: "",
|
||||
leaveLast: "",
|
||||
leaveLast: null,
|
||||
leaveNumber: "",
|
||||
leaveAddress: "",
|
||||
leaveDetail: "",
|
||||
leaveDocument: [],
|
||||
})
|
||||
|
||||
//แปลง leaveLast ด้วย Date2thai
|
||||
const leave2Thai = dataStore.leaveLast != null ? date2Thai(dataStore.leaveLast) : null
|
||||
|
||||
/** ตัวแปร ref สำหรับแสดง validate */
|
||||
const leaveWroteRef = ref<object | null>(null)
|
||||
const leaveStartDateRef = ref<object | null>(null)
|
||||
|
|
@ -320,7 +323,7 @@ const isReadOnly = computed(() => {
|
|||
outlined
|
||||
ref="leaveLastRef"
|
||||
for="leaveLastRef"
|
||||
v-model="dataStore.leaveLast"
|
||||
v-model="leave2Thai"
|
||||
label="ลาครั้งสุดท้ายเมื่อวันที่"
|
||||
readonly
|
||||
hide-bottom-space
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ const formDataBirth = reactive<any>({
|
|||
leaveDocument: [],
|
||||
})
|
||||
|
||||
//แปลง leaveLast ด้วย Date2thai
|
||||
const leave2Thai = dataStore.leaveLast != null ? date2Thai(dataStore.leaveLast) : null
|
||||
|
||||
/** ตัวแปร ref สำหรับแสดง validate */
|
||||
const leaveWroteRef = ref<object | null>(null)
|
||||
const leaveStartDateRef = ref<object | null>(null)
|
||||
|
|
@ -287,7 +290,7 @@ async function saveFormData() {
|
|||
outlined
|
||||
ref="leaveLastRef"
|
||||
for="leaveLastRef"
|
||||
v-model="dataStore.leaveLast"
|
||||
v-model="leave2Thai"
|
||||
label="ลาครั้งสุดท้ายเมื่อวันที่"
|
||||
readonly
|
||||
hide-bottom-space
|
||||
|
|
|
|||
|
|
@ -70,9 +70,9 @@ onMounted(async () => {
|
|||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
<q-input class="col-12 col-sm-4" dense bg-color="white" outlined readonly v-model="dataStore.typeLeave" label="เรื่อง" />
|
||||
<q-input class="col-12 col-sm-4" dense bg-color="white" outlined readonly v-model="dataStore.leaveTypeName" label="เรื่อง" />
|
||||
<q-input class="col-12 col-sm-4" dense outlined readonly bg-color="white" v-model="dataStore.dear" label="เรียน" />
|
||||
<q-input class="col-12 col-sm-3" dense outlined readonly bg-color="white" v-model="dataStore.fullname" label="ชื่อผู้ยื่นขอ" />
|
||||
<q-input class="col-12 col-sm-3" dense outlined readonly bg-color="white" v-model="dataStore.fullName" label="ชื่อผู้ยื่นขอ" />
|
||||
<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="สังกัดผู้ยื่นขอ" />
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ export const useLeaveStore = defineStore("Leave", () => {
|
|||
const dateSendLeave = ref<Date>() //วันที่ยื่นใบลา
|
||||
const leaveTypeName = ref<string>("") //Name ประเภทการลา
|
||||
const dear = ref<string>("") //เรียน
|
||||
const fullname = ref<string>("") //คำนำหน้า ชื่อ นามสกุล ผู้ยื่นขอ
|
||||
const fullName = ref<string>("") //คำนำหน้า ชื่อ นามสกุล ผู้ยื่นขอ
|
||||
const positionName = ref<string>("") //ตำแหน่งผู้ยื่นขอ
|
||||
const positionLevelName = ref<string>("") //ระดับผู้ยื่นขอ
|
||||
const organizationName = ref<string>("") //สังกัดผู้ยื่นขอ
|
||||
|
|
@ -241,7 +241,7 @@ export const useLeaveStore = defineStore("Leave", () => {
|
|||
const dateAppoint = ref<Date>() //วันที่เข้ารับราชการ
|
||||
const salary = ref<number>(0) //เงินเดือนปัจจุบัน
|
||||
const salaryText = ref<string>("") //เงินเดือนปัจจุบัน(ภาษาไทย)
|
||||
const leaveLast = ref<string>("")
|
||||
const leaveLast = ref<Date>()
|
||||
const restDayCurrentTotal = ref<string>("")
|
||||
|
||||
//ดึงข้อมูล profile จาก API
|
||||
|
|
@ -254,7 +254,7 @@ export const useLeaveStore = defineStore("Leave", () => {
|
|||
dateSendLeave.value = data.dateSendLeave
|
||||
leaveTypeName.value = data.leaveTypeName
|
||||
dear.value = data.dear
|
||||
fullname.value = data.fullname
|
||||
fullName.value = data.fullName
|
||||
positionName.value = data.positionName
|
||||
positionLevelName.value = data.positionLevelName
|
||||
organizationName.value = data.organizationName
|
||||
|
|
@ -266,7 +266,7 @@ export const useLeaveStore = defineStore("Leave", () => {
|
|||
dateAppoint.value = data.dateAppoint
|
||||
salary.value = data.salary
|
||||
salaryText.value = data.salaryText
|
||||
leaveLast.value = data.leaveLast
|
||||
leaveLast.value = data.leaveLast && date2Thai(data.leaveLast)
|
||||
restDayCurrentTotal.value = data.restDayCurrentTotal
|
||||
console.log(data)
|
||||
})
|
||||
|
|
@ -303,7 +303,7 @@ export const useLeaveStore = defineStore("Leave", () => {
|
|||
dateSendLeave,
|
||||
leaveTypeName,
|
||||
dear,
|
||||
fullname,
|
||||
fullName,
|
||||
positionName,
|
||||
positionLevelName,
|
||||
organizationName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue