edit แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ
This commit is contained in:
parent
6823876fa4
commit
0f5bc65e3d
2 changed files with 174 additions and 119 deletions
|
|
@ -13,10 +13,38 @@
|
|||
@click="router.go(-1)"
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
/>
|
||||
<div v-if="routeName !== 'probationWorkAdd'">
|
||||
<div v-if="routeName == 'probationWorkAdd'">
|
||||
เพิ่มแบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ
|
||||
</div>
|
||||
<div v-else>แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ</div>
|
||||
<div v-else class="col-12 row">
|
||||
<div>แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ</div>
|
||||
<q-space />
|
||||
<div v-if="status == false">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
@click="edit()"
|
||||
icon="mdi-pencil-outline"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-btn flat round color="red" @click="cancel()" icon="mdi-undo">
|
||||
<q-tooltip>ยกเลิก</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="public"
|
||||
@click="saveEdit(personalId)"
|
||||
icon="mdi-content-save-outline"
|
||||
>
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<q-card
|
||||
:bordered="routeName == 'probationWorkAdd'"
|
||||
|
|
@ -34,10 +62,10 @@
|
|||
<q-input
|
||||
:rules="[(val) => !!val || 'กรุณากรอกชื่อ']"
|
||||
hide-bottom-space
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="fullname"
|
||||
label="ชื่อ-สกุล"
|
||||
/>
|
||||
|
|
@ -46,10 +74,10 @@
|
|||
<q-input
|
||||
:rules="[(val) => !!val || 'กรุณากรอกตำเเหน่ง']"
|
||||
hide-bottom-space
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="position"
|
||||
label="ตำแหน่ง"
|
||||
/>
|
||||
|
|
@ -63,12 +91,12 @@
|
|||
hide-bottom-space
|
||||
:options="monthOp"
|
||||
class="col-xs-12 col-sm-6"
|
||||
:readonly="routeName !== 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
option-label="label"
|
||||
option-value="value"
|
||||
:outlined="routeName === 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="monthSelect"
|
||||
:label="`ระยะเวลากี่เดือน`"
|
||||
/>
|
||||
|
|
@ -82,7 +110,7 @@
|
|||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:readonly="routeName !== 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
@ -94,8 +122,8 @@
|
|||
<q-input
|
||||
dense
|
||||
borderless
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
:outlined="status == true"
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||
hide-bottom-space
|
||||
class="full-width datepicker q-mb-md"
|
||||
|
|
@ -117,9 +145,7 @@
|
|||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:readonly="
|
||||
isDatePicker2Readonly || routeName !== 'probationWorkAdd'
|
||||
"
|
||||
:readonly="isDatePicker2Readonly || status != true"
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
|
|
@ -133,7 +159,7 @@
|
|||
<q-input
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
readonly
|
||||
class="full-width datepicker q-mb-md"
|
||||
:model-value="
|
||||
|
|
@ -166,26 +192,26 @@
|
|||
option-value="id"
|
||||
:options="filtermantor(OPcaretaker, [caretaker2])"
|
||||
class="col-xs-12 col-sm-6"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
hide-bottom-space
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker1"
|
||||
:label="`ผู้ดูแลคนที่ 1`"
|
||||
option-label="fullName"
|
||||
option-label="name"
|
||||
/>
|
||||
<q-select
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกผู้ดูเเล']"
|
||||
:options="filtermantor(OPcaretaker, [caretaker1])"
|
||||
option-value="id"
|
||||
option-label="fullName"
|
||||
option-label="name"
|
||||
hide-bottom-space
|
||||
class="col-xs-12 col-sm-6"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker2"
|
||||
:label="`ผู้ดูแลคนที่ 2`"
|
||||
/>
|
||||
|
|
@ -196,11 +222,11 @@
|
|||
option-value="id"
|
||||
:options="filtermantor(OPcaretaker, [caretaker2])"
|
||||
class="col-xs-12 col-sm-6"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
hide-bottom-space
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker1"
|
||||
:label="`ผู้ดูแลคนที่ 1`"
|
||||
option-label="name"
|
||||
|
|
@ -212,10 +238,10 @@
|
|||
option-label="name"
|
||||
hide-bottom-space
|
||||
class="col-xs-12 col-sm-6"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker2"
|
||||
:label="`ผู้ดูแลคนที่ 2`"
|
||||
/>
|
||||
|
|
@ -234,7 +260,7 @@
|
|||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
3.1 ชื่องาน / ภารกิจงานที่มอบหมาย (ควรมีมากกว่า 1 ภารกิจงาน)
|
||||
<q-btn
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
round
|
||||
color="primary"
|
||||
dense
|
||||
|
|
@ -259,10 +285,10 @@
|
|||
index < 2 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : []
|
||||
"
|
||||
hide-bottom-space
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
class="bg-white"
|
||||
type="textarea"
|
||||
v-model="activity_desc[index]"
|
||||
|
|
@ -275,10 +301,10 @@
|
|||
index < 2 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : []
|
||||
"
|
||||
hide-bottom-space
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
class="bg-white"
|
||||
type="textarea"
|
||||
v-model="goal_desc[index]"
|
||||
|
|
@ -296,7 +322,7 @@
|
|||
color="red"
|
||||
icon="mdi-trash-can-outline"
|
||||
@click="deleteactivity(index)"
|
||||
v-if="routeName === 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -315,7 +341,7 @@
|
|||
<div class="col-12 text-top2 row items-center">
|
||||
ความรู้ความสามารถในการปฏิบัติงาน
|
||||
<q-btn
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
round
|
||||
color="primary"
|
||||
dense
|
||||
|
|
@ -345,10 +371,10 @@
|
|||
hide-bottom-space
|
||||
:options="OPknowledge"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="knowledge[index]"
|
||||
:label="`ความรู้ความสามารถในการปฏิบัติงาน ${
|
||||
index + 1
|
||||
|
|
@ -360,7 +386,7 @@
|
|||
class="col-xs-12 col-sm-1 flex justify-center items-center"
|
||||
>
|
||||
<q-btn
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
flat
|
||||
round
|
||||
color="red"
|
||||
|
|
@ -375,7 +401,7 @@
|
|||
<div class="col-12 text-top2 row items-center">
|
||||
ความรู้เรื่องกฎหมายและกฎระเบียบ (ไม่เกิน 20 หัวข้อ)
|
||||
<!-- <q-btn
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
round
|
||||
color="primary"
|
||||
dense
|
||||
|
|
@ -404,7 +430,7 @@
|
|||
v-if="item.status_select === 1"
|
||||
v-model="item.checked"
|
||||
dense
|
||||
:disable="routeName != 'probationWorkAdd'"
|
||||
:disable="status != true"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="index === 0" class="col-11">
|
||||
|
|
@ -443,7 +469,7 @@
|
|||
:false-value="0"
|
||||
v-model="item.checked"
|
||||
dense
|
||||
:disable="routeName != 'probationWorkAdd'"
|
||||
:disable="status != true"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-9 q-pl-xl">
|
||||
|
|
@ -471,7 +497,7 @@
|
|||
:false-value="0"
|
||||
v-model="item.checked"
|
||||
dense
|
||||
:disable="routeName != 'probationWorkAdd'"
|
||||
:disable="status != true"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-9 q-pl-xl">
|
||||
|
|
@ -499,7 +525,7 @@
|
|||
:false-value="0"
|
||||
v-model="item.checked"
|
||||
dense
|
||||
:disable="routeName != 'probationWorkAdd'"
|
||||
:disable="status != true"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-9 q-pl-xl">
|
||||
|
|
@ -527,7 +553,7 @@
|
|||
:false-value="0"
|
||||
v-model="item.checked"
|
||||
dense
|
||||
:disable="routeName != 'probationWorkAdd'"
|
||||
:disable="status != true"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-9 q-pl-xl">
|
||||
|
|
@ -566,10 +592,10 @@
|
|||
<div class="col-12">
|
||||
<q-input
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="OtherLaw"
|
||||
type="textarea"
|
||||
/>
|
||||
|
|
@ -592,11 +618,11 @@
|
|||
]"
|
||||
:options="OPcomputer"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="skill"
|
||||
label="ด้านที่ 1"
|
||||
>
|
||||
|
|
@ -623,10 +649,10 @@
|
|||
]"
|
||||
:options="OPenglish"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="skill2"
|
||||
label="ด้านที่ 2"
|
||||
>
|
||||
|
|
@ -651,11 +677,11 @@
|
|||
]"
|
||||
:options="OPinfomation"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
map-options
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="skill3"
|
||||
label="ด้านที่ 3"
|
||||
>
|
||||
|
|
@ -680,11 +706,11 @@
|
|||
]"
|
||||
:options="OPresourse"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
map-options
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="skill4"
|
||||
label="ด้านที่ 4"
|
||||
>
|
||||
|
|
@ -724,11 +750,11 @@
|
|||
filterMain(OPmain, [main2, main3, main4, main5])
|
||||
"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="main"
|
||||
label="ตัวที่ 1"
|
||||
>
|
||||
|
|
@ -752,11 +778,11 @@
|
|||
filterMain(OPmain, [main, main3, main4, main5])
|
||||
"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="main2"
|
||||
label="ตัวที่ 2"
|
||||
>
|
||||
|
|
@ -780,11 +806,11 @@
|
|||
filterMain(OPmain, [main, main2, main4, main5])
|
||||
"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
map-options
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="main3"
|
||||
label="ตัวที่ 3"
|
||||
>
|
||||
|
|
@ -808,11 +834,11 @@
|
|||
filterMain(OPmain, [main, main2, main3, main5])
|
||||
"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="main4"
|
||||
label="ตัวที่ 4"
|
||||
>
|
||||
|
|
@ -837,11 +863,11 @@
|
|||
"
|
||||
option-value="id"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
map-options
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="main5"
|
||||
label="ตัวที่ 5"
|
||||
>
|
||||
|
|
@ -870,11 +896,11 @@
|
|||
]"
|
||||
:options="filterData(OPgroup, [group2, group3])"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="group"
|
||||
label="ตัวที่ 1"
|
||||
>
|
||||
|
|
@ -898,11 +924,11 @@
|
|||
]"
|
||||
:options="filterData(OPgroup, [group, group3])"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="group2"
|
||||
label="ตัวที่ 2"
|
||||
>
|
||||
|
|
@ -927,10 +953,10 @@
|
|||
]"
|
||||
:options="filterData(OPgroup, [group, group2])"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="group3"
|
||||
label="ตัวที่ 3"
|
||||
>
|
||||
|
|
@ -1031,10 +1057,10 @@
|
|||
<div class="col-12 row q-col-gutter-md">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="Other"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -1045,7 +1071,7 @@
|
|||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
3.6 ผลผลิตของงานที่คาดหวังและตัวชี้วัดความสําเร็จของงาน
|
||||
<q-btn
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
round
|
||||
color="primary"
|
||||
dense
|
||||
|
|
@ -1072,10 +1098,10 @@
|
|||
"
|
||||
class="bg-white"
|
||||
type="textarea"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="output_desc[index]"
|
||||
label="ผลผลิตของงานที่คาดหวัง (ไม่เกิน 10 บรรทัด)"
|
||||
/>
|
||||
|
|
@ -1088,10 +1114,10 @@
|
|||
hide-bottom-space
|
||||
class="bg-white"
|
||||
type="textarea"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="indicator_desc[index]"
|
||||
label="ตัวชี้วัดความสําเร็จของงาน (ไม่เกิน 10 บรรทัด)"
|
||||
/>
|
||||
|
|
@ -1102,7 +1128,7 @@
|
|||
>
|
||||
<q-btn
|
||||
flat
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
round
|
||||
color="red"
|
||||
icon="mdi-trash-can-outline"
|
||||
|
|
@ -1177,10 +1203,10 @@
|
|||
<li>
|
||||
อื่นๆ (ถ้ามี)
|
||||
<q-input
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="Other5"
|
||||
label="กรอกอื่นๆ"
|
||||
/>
|
||||
|
|
@ -1267,20 +1293,20 @@
|
|||
<div class="col-12 row q-col-gutter-md">
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-input
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="fullname"
|
||||
label="ชื่อ-สกุล"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-input
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="position"
|
||||
label="ตำแหน่ง"
|
||||
/>
|
||||
|
|
@ -1291,7 +1317,7 @@
|
|||
v-model="date1"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="routeName !== 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -1306,10 +1332,10 @@
|
|||
<q-input
|
||||
hide-bottom-space
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
class="full-width datepicker"
|
||||
:model-value="date1 != null ? date2Thai(date1) : null"
|
||||
label="ลงวันที่"
|
||||
|
|
@ -1338,12 +1364,12 @@
|
|||
v-if="status == true"
|
||||
:options="filtermantor(OPcaretaker, [caretaker2])"
|
||||
option-value="id"
|
||||
option-label="fullName"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker1"
|
||||
label="ผู้ดูแลคนที่ 1"
|
||||
/>
|
||||
|
|
@ -1353,10 +1379,10 @@
|
|||
option-value="id"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker1"
|
||||
label="ผู้ดูแลคนที่ 1"
|
||||
/>
|
||||
|
|
@ -1368,7 +1394,7 @@
|
|||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
:readonly="routeName !== 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
|
|
@ -1381,10 +1407,10 @@
|
|||
<q-input
|
||||
hide-bottom-space
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
class="full-width datepicker"
|
||||
:model-value="date2 != null ? date2Thai(date2) : null"
|
||||
label="ลงวันที่"
|
||||
|
|
@ -1405,12 +1431,12 @@
|
|||
v-if="status == true"
|
||||
:options="filtermantor(OPcaretaker, [caretaker1])"
|
||||
option-value="id"
|
||||
option-label="fullName"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker2"
|
||||
label="ผู้ดูแลคนที่ 2"
|
||||
/>
|
||||
|
|
@ -1420,10 +1446,10 @@
|
|||
option-value="id"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker2"
|
||||
label="ผู้ดูแลคนที่ 2"
|
||||
/>
|
||||
|
|
@ -1436,7 +1462,7 @@
|
|||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:readonly="routeName !== 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
@ -1448,11 +1474,11 @@
|
|||
<q-input
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||
hide-bottom-space
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
s
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
class="full-width datepicker"
|
||||
:model-value="date3 != null ? date2Thai(date3) : null"
|
||||
label="ลงวันที่"
|
||||
|
|
@ -1481,12 +1507,12 @@
|
|||
v-if="status == true"
|
||||
:options="OPcommander"
|
||||
option-value="id"
|
||||
option-label="fullName"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="commander"
|
||||
label="ผู้บังคับบัญชา"
|
||||
/>
|
||||
|
|
@ -1496,10 +1522,10 @@
|
|||
option-value="id"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="commander"
|
||||
label="ผู้บังคับบัญชา"
|
||||
/>
|
||||
|
|
@ -1510,7 +1536,7 @@
|
|||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:readonly="routeName !== 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
|
|
@ -1524,10 +1550,10 @@
|
|||
<q-input
|
||||
hide-bottom-space
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
class="full-width datepicker"
|
||||
:model-value="date4 != null ? date2Thai(date4) : null"
|
||||
label="ลงวันที่"
|
||||
|
|
@ -1556,12 +1582,12 @@
|
|||
v-if="status == true"
|
||||
:options="OPchairman"
|
||||
option-value="id"
|
||||
option-label="fullName"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="chairman"
|
||||
label="ประธานกรรมการ"
|
||||
/>
|
||||
|
|
@ -1571,10 +1597,10 @@
|
|||
option-value="id"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="chairman"
|
||||
label="ประธานกรรมการ"
|
||||
/>
|
||||
|
|
@ -1615,6 +1641,33 @@ const val1 = ref([
|
|||
},
|
||||
]);
|
||||
const status = ref<boolean>(true);
|
||||
|
||||
const dataEdit = async (id:string) => {
|
||||
const data = putData(id);
|
||||
await http
|
||||
.put(config.API.saveEditAssign(id),data)
|
||||
.then((res) =>{
|
||||
console.log("success put==>",res)
|
||||
console.log("save")
|
||||
})
|
||||
.catch((e) => {})
|
||||
.finally(async () => {
|
||||
status.value = false
|
||||
hideLoader();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
const saveEdit = (id:string) => {
|
||||
dialogConfirm($q,() => dataEdit(id))
|
||||
}
|
||||
const edit = () => {
|
||||
status.value = true;
|
||||
console.log(status.value);
|
||||
};
|
||||
const cancel = () => {
|
||||
status.value = false;
|
||||
};
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
|
|
@ -1723,7 +1776,7 @@ const OPcaretaker = ref<
|
|||
prefix: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
fullName: string;
|
||||
name: string;
|
||||
citizenId: number;
|
||||
isDirector: boolean;
|
||||
}>[]
|
||||
|
|
@ -1735,7 +1788,7 @@ const OPcommander = ref<
|
|||
prefix: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
fullName: string;
|
||||
name: string;
|
||||
citizenId: number;
|
||||
isDirector: boolean;
|
||||
}>[]
|
||||
|
|
@ -1746,7 +1799,7 @@ const OPchairman = ref<
|
|||
prefix: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
fullName: string;
|
||||
name: string;
|
||||
citizenId: number;
|
||||
isDirector: boolean;
|
||||
}>[]
|
||||
|
|
@ -1845,7 +1898,7 @@ const getUser = async () => {
|
|||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
fullName: item.prefix + "" + item.firstName + " " + item.lastName,
|
||||
name: item.prefix + "" + item.firstName + " " + item.lastName,
|
||||
citizenId: item.citizenId,
|
||||
isDirector: item.isDirector,
|
||||
}));
|
||||
|
|
@ -1854,7 +1907,7 @@ const getUser = async () => {
|
|||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
fullName: item.prefix + "" + item.firstName + " " + item.lastName,
|
||||
name: item.prefix + "" + item.firstName + " " + item.lastName,
|
||||
citizenId: item.citizenId,
|
||||
isDirector: item.isDirector,
|
||||
}));
|
||||
|
|
@ -1863,7 +1916,7 @@ const getUser = async () => {
|
|||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
fullName: item.prefix + "" + item.firstName + " " + item.lastName,
|
||||
name: item.prefix + "" + item.firstName + " " + item.lastName,
|
||||
citizenId: item.citizenId,
|
||||
isDirector: item.isDirector,
|
||||
}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue