เพิ่ม path ไป id questionnair
This commit is contained in:
parent
4e8eb752c7
commit
1e510c768a
1 changed files with 78 additions and 77 deletions
|
|
@ -10,85 +10,85 @@
|
|||
<q-card bordered>
|
||||
<div class="col-12 row q-col-gutter-md q-pa-md">
|
||||
<div class="col-xs-12 col-sm-12">
|
||||
<div class="col-12 row q-pa-sm q-col-gutter-sm">
|
||||
<q-input class="col-8" dense outlined v-model="tranferOrg" label="สถานที่ยื่นขอลาออกจากราชการ" :readonly="routeName != 'AddLeave'" />
|
||||
<datepicker class="col-2" menu-class-name="modalfix" v-model="dateCommand" :locale="'th'" autoApply readonly borderless :enableTimePicker="false" week-start="0">
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
readonly
|
||||
dense
|
||||
hide-bottom-space
|
||||
class="full-width datepicker"
|
||||
:model-value="dateCommand != null ? date2Thai(dateCommand) : null"
|
||||
:label="`${'วันที่ยื่นขอลาออกจากราชการ'}`"
|
||||
:rules="[val => !!val || `${'กรุณาเลือกวันที่ยื่นขอลาออกจากราชการ'}`]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)"> </q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
<datepicker
|
||||
class="col-2"
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateLeave"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:readonly="routeName != 'AddLeave'"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
hide-bottom-space
|
||||
:readonly="routeName != 'AddLeave'"
|
||||
class="full-width datepicker"
|
||||
:model-value="dateLeave != null ? date2Thai(dateLeave) : null"
|
||||
:label="`${'วันที่ขอลาออกจากราชการ'}`"
|
||||
:rules="[val => !!val || `${'กรุณาเลือกวันที่ขอลาออกจากราชการ'}`]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)"> </q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
<q-input class="col-12" dense outlined v-model="noteReason" label="เหตุผลที่ลาออกจากราชการ" type="textarea" :readonly="routeName != 'AddLeave'" />
|
||||
<div class="col-12 row q-pa-sm q-col-gutter-sm">
|
||||
<q-input class="col-8" dense outlined v-model="tranferOrg" label="สถานที่ยื่นขอลาออกจากราชการ" :readonly="routeName != 'AddLeave'" />
|
||||
<datepicker class="col-2" menu-class-name="modalfix" v-model="dateCommand" :locale="'th'" autoApply readonly borderless :enableTimePicker="false" week-start="0">
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
readonly
|
||||
dense
|
||||
hide-bottom-space
|
||||
class="full-width datepicker"
|
||||
:model-value="dateCommand != null ? date2Thai(dateCommand) : null"
|
||||
:label="`${'วันที่ยื่นขอลาออกจากราชการ'}`"
|
||||
:rules="[val => !!val || `${'กรุณาเลือกวันที่ยื่นขอลาออกจากราชการ'}`]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)"> </q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
<datepicker
|
||||
class="col-2"
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateLeave"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:readonly="routeName != 'AddLeave'"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
hide-bottom-space
|
||||
:readonly="routeName != 'AddLeave'"
|
||||
class="full-width datepicker"
|
||||
:model-value="dateLeave != null ? date2Thai(dateLeave) : null"
|
||||
:label="`${'วันที่ขอลาออกจากราชการ'}`"
|
||||
:rules="[val => !!val || `${'กรุณาเลือกวันที่ขอลาออกจากราชการ'}`]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)"> </q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
<q-input class="col-12" dense outlined v-model="noteReason" label="เหตุผลที่ลาออกจากราชการ" type="textarea" :readonly="routeName != 'AddLeave'" />
|
||||
|
||||
<div class="col-12 row">
|
||||
<q-uploader
|
||||
flat
|
||||
bordered
|
||||
class="col-xs-12 col-sm-12"
|
||||
accept=".jpg,.png,.pdf,.csv,.doc"
|
||||
url="http://localhost:4444/upload"
|
||||
label="เอกสารเพิ่มเติม"
|
||||
type="file"
|
||||
@added="fileUploadDoc"
|
||||
style="max-width: px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 row">
|
||||
<q-uploader
|
||||
flat
|
||||
bordered
|
||||
class="col-xs-12 col-sm-12"
|
||||
accept=".jpg,.png,.pdf,.csv,.doc"
|
||||
url="http://localhost:4444/upload"
|
||||
label="เอกสารเพิ่มเติม"
|
||||
type="file"
|
||||
@added="fileUploadDoc"
|
||||
style="max-width: px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<q-separator v-if="routeName == 'AddLeave'"/>
|
||||
<q-separator v-if="routeName == 'AddLeave'" />
|
||||
<div class="row col-12 q-pa-md" v-if="routeName == 'AddLeave'">
|
||||
<q-space />
|
||||
<q-btn unelevated dense class="q-px-md items-center" color="primary" label="ยื่นเรื่องขอลาออก" @click="saveResing" :disable="tranferOrg == '' && noteReason == ''" />
|
||||
|
|
@ -153,9 +153,10 @@ const createFormresign = async () => {
|
|||
await http
|
||||
.post(config.API.listResign(), formData)
|
||||
.then((res: any) => {
|
||||
let data = res.data.result.id
|
||||
// console.log(res);
|
||||
success($q, "บันทึกข้อมูลสำเร็จ")
|
||||
router.push(`/leave/result`)
|
||||
router.push(`/leave/result/${data}`)
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue