แก้ ui

This commit is contained in:
setthawutttty 2023-12-04 14:28:17 +07:00
parent 5c28d14047
commit 66124a819d
9 changed files with 246 additions and 189 deletions

View file

@ -197,6 +197,7 @@ function confirmSentIssueGate() {
messageError($q, e);
})
.finally(() => {
router.push(`/discipline/disciplinary`)
fetchDetailDisciplinary();
});
}
@ -232,6 +233,7 @@ function confirmEndInvestigate() {
messageError($q, e);
})
.finally(() => {
success($q, "ยุติเรื่องสำเร็จ");
fetchDetailDisciplinary();
});
}
@ -247,6 +249,7 @@ function confirmCancelInvestigate() {
messageError($q, e);
})
.finally(() => {
success($q, "ยกเลิกยุติเรื่องสำเร็จ");
fetchDetailDisciplinary();
});
}
@ -316,6 +319,7 @@ function emitPerson(data: PersonsArray[]) {
messageError($q, e);
})
.finally(() => {
success($q, "ส่งไปพักราชการสำเร็จ");
hideLoader();
fetchDetailDisciplinary();
});

View file

@ -457,68 +457,69 @@ onMounted(async () => {
<q-card bordered>
<div class="col-12 row q-pa-md">
<div class="col-12 row q-col-gutter-md">
<div class="col-xs-12 col-sm-3">
<q-select
:readonly="isReadonly"
for="SelectrespondentType"
v-model="formData.respondentType"
ref="respondentTypeRef"
dense
outlined
label="ผู้ถูกร้องเรียน"
option-value="id"
option-label="name"
emit-value
use-input
map-options
hide-bottom-space
:options="complainstStore.complainantoptions"
:rules="[(val) => !!val || `${'กรุณาเลือกผู้ร้องเรียน'}`]"
lazy-rules
@update:model-value="
selectComplainant(formData.respondentType);
changeFormData();
"
@filter="(inputValue: any,
<div class="row col-12 q-col-gutter-x-md">
<div class="col-xs-12 col-sm-3">
<q-select
:readonly="isReadonly"
for="SelectrespondentType"
v-model="formData.respondentType"
ref="respondentTypeRef"
dense
outlined
label="ผู้ถูกร้องเรียน"
option-value="id"
option-label="name"
emit-value
use-input
map-options
hide-bottom-space
:options="complainstStore.complainantoptions"
:rules="[(val) => !!val || `${'กรุณาเลือกผู้ร้องเรียน'}`]"
lazy-rules
@update:model-value="
selectComplainant(formData.respondentType);
changeFormData();
"
@filter="(inputValue: any,
doneFn: Function) => filterSelector(inputValue, doneFn, 'filterrespondentType'
)"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
</q-item-section>
</q-item>
</template>
</q-select>
</div>
<div
class="col-xs-12 col-sm-3"
v-if="formData.respondentType === 'ORGANIZATION'"
id="organizationId"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
</q-item-section>
</q-item>
</template>
</q-select>
</div>
<div
class="col-xs-12 col-sm-3"
v-if="formData.respondentType === 'ORGANIZATION'"
id="organizationId"
>
<q-select
:readonly="isReadonly"
for="inputOffice"
name="organizationId"
ref="organizationIdRef"
dense
hide-bottom-space
outlined
option-label="name"
option-value="id"
emit-value
map-options
v-model="formData.organizationId"
:options="organizationOption"
label="เลือกสำนักงาน"
:rules="[(val) => !!val || `${'กรุณาเลือกสำนักงาน'}`]"
lazy-rules
@update:model-value="changeFormData()"
/>
</div>
<div class="col-xs-12 col-sm-3" id="consideredAgency">
<!-- <q-select
<q-select
:readonly="isReadonly"
for="inputOffice"
name="organizationId"
ref="organizationIdRef"
dense
hide-bottom-space
outlined
option-label="name"
option-value="id"
emit-value
map-options
v-model="formData.organizationId"
:options="organizationOption"
label="เลือกสำนักงาน"
:rules="[(val) => !!val || `${'กรุณาเลือกสำนักงาน'}`]"
lazy-rules
@update:model-value="changeFormData()"
/>
</div>
<div class="col-xs-12 col-sm-3" id="consideredAgency">
<!-- <q-select
ref="consideredAgencyRef"
for="selectAgency"
dense
@ -546,12 +547,9 @@ onMounted(async () => {
</q-item>
</template>
</q-select> -->
</div>
</div>
<div
v-if="formData.respondentType !== 'ORGANIZATION'"
class="col-6"
></div>
<div
class="row col-12"
v-if="formData.respondentType === 'PERSON'"
@ -665,106 +663,114 @@ onMounted(async () => {
</div>
</q-card>
</div>
<datepicker
:readonly="isReadonly"
menu-class-name="modalfix"
for="#dateAllegation"
v-model="formData.disciplinaryDateInvestigation"
class="col-xs-12 col-sm-3"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
@update:model-value="changeFormData()"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
:readonly="isReadonly"
outlined
dense
class="col-xs-12 col-sm-4"
hide-bottom-space
:model-value="
formData.disciplinaryDateInvestigation != null
? date2Thai(formData.disciplinaryDateInvestigation)
: null
"
:label="`${'วันที่มีคำสั่งให้สอบสวน'}`"
:rules="[
(val) =>
!!val || `${'กรุณาเลือกวันที่มีคำสั่งให้สอบสวน'}`,
]"
lazy-rules
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
<datepicker
:readonly="isReadonly"
menu-class-name="modalfix"
for="#dateAllegation"
v-model="formData.disciplinaryDateAllegation"
class="col-xs-12 col-sm-3"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
@update:model-value="changeFormData()"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
:readonly="isReadonly"
ref="disciplinaryDateAllegationRef"
outlined
dense
class="col-xs-12 col-sm-4"
hide-bottom-space
:model-value="
formData.disciplinaryDateAllegation != null
? date2Thai(formData.disciplinaryDateAllegation)
: null
"
:label="`${'วันที่รับทราบข้อกล่าวหา'}`"
:rules="[
(val) =>
!!val || `${'กรุณาเลือกวันที่รับทราบข้อกล่าวหา'}`,
]"
lazy-rules
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
<div class="row col-12 q-col-gutter-x-md">
<datepicker
:readonly="isReadonly"
menu-class-name="modalfix"
for="#dateAllegation"
v-model="formData.disciplinaryDateInvestigation"
class="col-xs-12 col-sm-3"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
@update:model-value="changeFormData()"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
:readonly="isReadonly"
outlined
dense
:input-style="
isReadonly ? { color: 'teal' } : { color: 'black' }
"
class="col-xs-12 col-sm-4"
hide-bottom-space
:model-value="
formData.disciplinaryDateInvestigation != null
? date2Thai(formData.disciplinaryDateInvestigation)
: null
"
:label="`${'วันที่มีคำสั่งให้สอบสวน'}`"
:rules="[
(val) =>
!!val || `${'กรุณาเลือกวันที่มีคำสั่งให้สอบสวน'}`,
]"
lazy-rules
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
<datepicker
:readonly="isReadonly"
menu-class-name="modalfix"
for="#dateAllegation"
v-model="formData.disciplinaryDateAllegation"
class="col-xs-12 col-sm-3"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
@update:model-value="changeFormData()"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
:readonly="isReadonly"
ref="disciplinaryDateAllegationRef"
outlined
:input-style="
isReadonly ? { color: 'teal' } : { color: 'black' }
"
dense
class="col-xs-12 col-sm-4"
hide-bottom-space
:model-value="
formData.disciplinaryDateAllegation != null
? date2Thai(formData.disciplinaryDateAllegation)
: null
"
:label="`${'วันที่รับทราบข้อกล่าวหา'}`"
:rules="[
(val) =>
!!val || `${'กรุณาเลือกวันที่รับทราบข้อกล่าวหา'}`,
]"
lazy-rules
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<div class="row col-12">
<q-card
@ -822,6 +828,11 @@ onMounted(async () => {
ref="dateRef"
:readonly="isReadonly"
outlined
:input-style="
isReadonly
? { color: 'teal' }
: { color: 'black' }
"
dense
lazy-rules
borderless
@ -911,6 +922,11 @@ onMounted(async () => {
outlined
dense
lazy-rules
:input-style="
isReadonly
? { color: 'teal' }
: { color: 'black' }
"
hide-bottom-space
borderless
:model-value="
@ -942,7 +958,6 @@ onMounted(async () => {
</q-card>
</div>
<datepicker
:readonly="isReadonly"
menu-class-name="modalfix"
@ -968,8 +983,11 @@ onMounted(async () => {
ref="disciplinaryDateEvidentRef"
outlined
dense
class="full-width datepicker"
class="full-width"
hide-bottom-space
:input-style="
isReadonly ? { color: 'teal' } : { color: 'black' }
"
:model-value="
formData.disciplinaryDateEvident != null
? date2Thai(formData.disciplinaryDateEvident)
@ -986,7 +1004,7 @@ onMounted(async () => {
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
color="primary"
>
</q-icon>
</template>
@ -997,7 +1015,7 @@ onMounted(async () => {
<datepicker
:readonly="isReadonly"
menu-class-name="modalfix"
for="#dateEvident"
for="#dateResult"
v-model="formData.disciplinaryDateResult"
:locale="'th'"
autoApply
@ -1013,13 +1031,17 @@ onMounted(async () => {
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
:readonly="isReadonly"
ref="disciplinaryDateResultRef"
outlined
:input-style="
isReadonly ? { color: 'teal' } : { color: 'black' }
"
dense
class="full-width datepicker"
class="full-width"
hide-bottom-space
:model-value="
formData.disciplinaryDateResult != null
@ -1037,14 +1059,13 @@ onMounted(async () => {
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
color="primary"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
<div class="row col-12">
<q-card
bordered
@ -1461,4 +1482,4 @@ onMounted(async () => {
@update:pagination="updatePaging"
@returnDirector="returnDirector"
/>
</template>
</template>