เพิ่ม comment code
This commit is contained in:
parent
fd74ca29db
commit
52bfaeb0e8
14 changed files with 78 additions and 99 deletions
|
|
@ -38,42 +38,9 @@ onMounted(async () => {
|
|||
await fectOptionType()
|
||||
})
|
||||
|
||||
const saveAbsence = () => {
|
||||
$q.dialog({
|
||||
title: "ยืนยันการยื่นข้อมูลลา",
|
||||
message: "ต้องการยื่นข้อมูลลานี้ใช่หรือไม่?",
|
||||
cancel: {
|
||||
flat: true,
|
||||
color: "negative",
|
||||
},
|
||||
persistent: true,
|
||||
})
|
||||
.onOk(() => {
|
||||
// createFormresign()
|
||||
if (model.value !== "LV-007") {
|
||||
console.log(1)
|
||||
} else if (model.value === "LV-007") {
|
||||
console.log(2)
|
||||
}
|
||||
router.push(`/leave`)
|
||||
})
|
||||
.onCancel(() => {})
|
||||
.onDismiss(() => {})
|
||||
}
|
||||
/** ฟังก์ชั่น บันทึก */
|
||||
const onSubmit = async () => {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
await saveformdata()
|
||||
},
|
||||
"ยืนยันการยื่นใบลา",
|
||||
"ต้องการยืนยันการยื่นใบลานี้ใช่หรือไม่ ?"
|
||||
)
|
||||
|
||||
console.log("save")
|
||||
}
|
||||
|
||||
/**
|
||||
* ดึงค่าประเภทการลาจาก Api
|
||||
*/
|
||||
async function fectOptionType() {
|
||||
await http
|
||||
.get(config.API.leaveType())
|
||||
|
|
@ -85,7 +52,10 @@ async function fectOptionType() {
|
|||
messageError($q, err)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* check ว่าลาได้ไหม จาก api
|
||||
* @param formData
|
||||
*/
|
||||
async function FetchCheck(formData: any) {
|
||||
await http
|
||||
.post(config.API.leaveCheck(), { type: dataStore.typeId ?? null, leaveStartDate: formData.leaveStartDate ?? null, leaveEndDate: formData.leaveEndDate ?? null })
|
||||
|
|
@ -162,18 +132,18 @@ async function FetchCheck(formData: any) {
|
|||
</div>
|
||||
</div>
|
||||
<div v-if="model" class="col-12">
|
||||
<SickForm :on-submit="onSubmit" v-if="model === 'LV-001' || model === 'LV-002'" />
|
||||
<FormBirth :on-submit="onSubmit" v-if="model === 'LV-003'" />
|
||||
<HelpWifeBirthForm :on-submit="onSubmit" v-if="model === 'LV-004'" />
|
||||
<VacationForm :on-submit="onSubmit" v-if="model === 'LV-005'" />
|
||||
<OrdinationForm :on-submit="onSubmit" v-if="model === 'LV-006' && modelSpecific === '0'" />
|
||||
<HajjForm :on-submit="onSubmit" v-if="model === 'LV-006' && modelSpecific === '1'" />
|
||||
<MilitaryForm :on-submit="onSubmit" v-if="model === 'LV-007'" style="width: 100%" />
|
||||
<StudyForm :on-submit="onSubmit" v-if="model === 'LV-008' && modelSpecific === 's0'" style="width: 100%" />
|
||||
<TrainForm :on-submit="onSubmit" v-if="model === 'LV-008' && modelSpecific != 's0' && modelSpecific != ''" />
|
||||
<WorkInternationalForm :on-submit="onSubmit" v-if="model === 'LV-009'" />
|
||||
<FollowSpouseForm :on-submit="onSubmit" v-if="model === 'LV-010'" />
|
||||
<RehabilitationForm :on-submit="onSubmit" v-if="model === 'LV-011'" />
|
||||
<SickForm v-if="model === 'LV-001' || model === 'LV-002'" />
|
||||
<FormBirth v-if="model === 'LV-003'" />
|
||||
<HelpWifeBirthForm v-if="model === 'LV-004'" />
|
||||
<VacationForm v-if="model === 'LV-005'" />
|
||||
<OrdinationForm v-if="model === 'LV-006' && modelSpecific === '0'" />
|
||||
<HajjForm v-if="model === 'LV-006' && modelSpecific === '1'" />
|
||||
<MilitaryForm v-if="model === 'LV-007'" style="width: 100%" />
|
||||
<StudyForm v-if="model === 'LV-008' && modelSpecific === 's0'" style="width: 100%" />
|
||||
<TrainForm v-if="model === 'LV-008' && modelSpecific != 's0' && modelSpecific != ''" />
|
||||
<WorkInternationalForm v-if="model === 'LV-009'" />
|
||||
<FollowSpouseForm v-if="model === 'LV-010'" />
|
||||
<RehabilitationForm v-if="model === 'LV-011'" />
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue