แก้ฟอร์มสอบสวน
This commit is contained in:
parent
95054e1a21
commit
7b5ec07d41
2 changed files with 256 additions and 248 deletions
|
|
@ -222,7 +222,7 @@ function updateDateMonth(date: Date) {
|
||||||
<q-card style="min-width: 60vw">
|
<q-card style="min-width: 60vw">
|
||||||
<q-toolbar>
|
<q-toolbar>
|
||||||
<q-toolbar-title class="text-subtitle2 text-bold">
|
<q-toolbar-title class="text-subtitle2 text-bold">
|
||||||
ปฎิทินแสดงวันที่สืบสวน
|
ปฎิทินแสดงวันที่สอบสวน
|
||||||
</q-toolbar-title>
|
</q-toolbar-title>
|
||||||
<q-btn
|
<q-btn
|
||||||
icon="close"
|
icon="close"
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ const filter = ref<string>("");
|
||||||
|
|
||||||
const isSave = ref<boolean>(false); // มีการแก้ไขรอบันทึก
|
const isSave = ref<boolean>(false); // มีการแก้ไขรอบันทึก
|
||||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||||
|
const extendStatus = ref<boolean>(false);
|
||||||
|
|
||||||
function toggleModal() {
|
function toggleModal() {
|
||||||
modalPerson.value = !modalPerson.value;
|
modalPerson.value = !modalPerson.value;
|
||||||
|
|
@ -189,8 +190,6 @@ function validateForm() {
|
||||||
}
|
}
|
||||||
if (hasError.every((result) => result === true)) {
|
if (hasError.every((result) => result === true)) {
|
||||||
onSubmit();
|
onSubmit();
|
||||||
isSave.value = false;
|
|
||||||
formData.extendStatus = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -220,6 +219,8 @@ function onSubmit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
emit("submit:disciplinary", formData);
|
emit("submit:disciplinary", formData);
|
||||||
|
isSave.value = false;
|
||||||
|
extendStatus.value = false;
|
||||||
},
|
},
|
||||||
"ยืนยันการบันทึกข้อมูล",
|
"ยืนยันการบันทึกข้อมูล",
|
||||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||||
|
|
@ -796,7 +797,7 @@ onMounted(async () => {
|
||||||
class="row col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
|
class="row col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
วันที่สืบสวน
|
วันที่สอบสวน
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-if="
|
v-if="
|
||||||
formData.disciplinaryExtendHistory.length > 0 &&
|
formData.disciplinaryExtendHistory.length > 0 &&
|
||||||
|
|
@ -805,7 +806,7 @@ onMounted(async () => {
|
||||||
:disable="isReadonly"
|
:disable="isReadonly"
|
||||||
for="#extendStatus"
|
for="#extendStatus"
|
||||||
size="md"
|
size="md"
|
||||||
v-model="formData.extendStatus"
|
v-model="extendStatus"
|
||||||
label="ขยายเวลา"
|
label="ขยายเวลา"
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
|
|
@ -839,7 +840,7 @@ onMounted(async () => {
|
||||||
<div class="q-col-gutter-sm row col-12">
|
<div class="q-col-gutter-sm row col-12">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row q-col-gutter-sm">
|
<div class="row q-col-gutter-sm">
|
||||||
<div v-if="formData.extendStatus" class="col-3">
|
<div v-if="extendStatus" class="col-3">
|
||||||
<q-select
|
<q-select
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
for="#daysExtend"
|
for="#daysExtend"
|
||||||
|
|
@ -856,7 +857,8 @@ onMounted(async () => {
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) =>
|
(val) =>
|
||||||
formData.extendStatus
|
formData.extendStatus
|
||||||
? !!val || 'กรุณาเลือกจำนวนวันที่ต้องการขยาย'
|
? !!val ||
|
||||||
|
'กรุณาเลือกจำนวนวันที่ต้องการขยาย'
|
||||||
: true,
|
: true,
|
||||||
]"
|
]"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
@ -873,7 +875,7 @@ onMounted(async () => {
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!formData.extendStatus" class="col-3">
|
<div v-if="!extendStatus" class="col-3">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
menu-class-name="modalfix"
|
||||||
:readonly="
|
:readonly="
|
||||||
|
|
@ -900,15 +902,15 @@ onMounted(async () => {
|
||||||
ref="dateRef"
|
ref="dateRef"
|
||||||
:input-style="
|
:input-style="
|
||||||
isReadonly ||
|
isReadonly ||
|
||||||
formData.disciplinaryExtendHistory.length >
|
formData.disciplinaryExtendHistory
|
||||||
0
|
.length > 0
|
||||||
? { color: 'black' }
|
? { color: 'black' }
|
||||||
: { color: 'teal' }
|
: { color: 'teal' }
|
||||||
"
|
"
|
||||||
:readonly="
|
:readonly="
|
||||||
isReadonly ||
|
isReadonly ||
|
||||||
formData.disciplinaryExtendHistory.length >
|
formData.disciplinaryExtendHistory
|
||||||
0
|
.length > 0
|
||||||
"
|
"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -966,8 +968,8 @@ onMounted(async () => {
|
||||||
for="#dateEnd"
|
for="#dateEnd"
|
||||||
:input-style="
|
:input-style="
|
||||||
isReadonly ||
|
isReadonly ||
|
||||||
formData.disciplinaryExtendHistory.length >
|
formData.disciplinaryExtendHistory
|
||||||
0
|
.length > 0
|
||||||
? { color: 'black' }
|
? { color: 'black' }
|
||||||
: { color: 'teal' }
|
: { color: 'teal' }
|
||||||
"
|
"
|
||||||
|
|
@ -975,8 +977,8 @@ onMounted(async () => {
|
||||||
class="full-width cursor-pointer"
|
class="full-width cursor-pointer"
|
||||||
:readonly="
|
:readonly="
|
||||||
isReadonly ||
|
isReadonly ||
|
||||||
formData.disciplinaryExtendHistory.length >
|
formData.disciplinaryExtendHistory
|
||||||
0
|
.length > 0
|
||||||
"
|
"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -985,7 +987,9 @@ onMounted(async () => {
|
||||||
borderless
|
borderless
|
||||||
:model-value="
|
:model-value="
|
||||||
formData.disciplinaryDateEnd
|
formData.disciplinaryDateEnd
|
||||||
? date2Thai(formData.disciplinaryDateEnd)
|
? date2Thai(
|
||||||
|
formData.disciplinaryDateEnd
|
||||||
|
)
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
:rules="[
|
:rules="[
|
||||||
|
|
@ -1010,7 +1014,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- วันที่สืบสวน (List Log) -->
|
<!-- วันที่สอบสวน (List Log) -->
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
formData.disciplinaryExtendHistory !== null &&
|
formData.disciplinaryExtendHistory !== null &&
|
||||||
|
|
@ -1564,7 +1568,11 @@ onMounted(async () => {
|
||||||
@returnDirector="returnDirector"
|
@returnDirector="returnDirector"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<CalandarDialog :modal="calendarModal" :close="calendarModalclose" :lists="formData.disciplinaryExtendHistory"/>
|
<CalandarDialog
|
||||||
|
:modal="calendarModal"
|
||||||
|
:close="calendarModalclose"
|
||||||
|
:lists="formData.disciplinaryExtendHistory"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue