Merge branch 'warunee-dev' into develop

This commit is contained in:
Warunee Tamkoo 2023-11-10 11:27:09 +07:00
commit 1e11e58b66
8 changed files with 607 additions and 574 deletions

View file

@ -458,9 +458,9 @@ watch(props.data, async () => {
dense
ref="evidenceFilesRef"
v-model="formData.evidenceFiles"
label="ไฟล์หลักฐานการรับ"
label="ไฟล์เอกสารหลักฐาน"
lazy-rules
:rules="[(val) => !!val || 'กรุณาเลือกไฟล์หลักฐานการรับ']"
:rules="[(val) => !!val || 'กรุณาเลือกไฟล์เอกสารหลักฐาน']"
hide-bottom-space
>
<template v-slot:prepend>

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import Form from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue";
import Form from "@/modules/11_discipline/components/3_investigateDisciplinary/Form.vue";
import { useRoute, useRouter } from "vue-router";
const router = useRouter();

View file

@ -1,6 +1,6 @@
<script setup lang="ts">
import { onMounted, reactive, ref } from "vue";
import Form from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue";
import Form from "@/modules/11_discipline/components/3_investigateDisciplinary/Form.vue";
import type { FormData } from "@/modules/11_discipline/interface/request/disciplinary";
import { useRouter, useRoute } from "vue-router";

View file

@ -83,6 +83,7 @@ const filesEtcRef = ref<Object | null>(null);
const trueDetailRef = ref<Object | null>(null);
const evidenceRef = ref<Object | null>(null);
const recordAccuserRef = ref<Object | null>(null);
const complaintsOptions = ref<any>([]);
const fileDocDataUpload = ref<File[]>([]);
const initialPagination = ref<any>({
@ -90,7 +91,7 @@ const initialPagination = ref<any>({
});
const formData = reactive<FormData>({
Complaint: "",
complaint: "",
dateInvestigate: null,
dateAllegation: null,
dateEvident: null,
@ -112,7 +113,7 @@ const formData = reactive<FormData>({
});
const objectdisciplinary: disciplinaryRef = {
Complaint: complaintRef,
complaint: complaintRef,
dateInvestigate: dateInvestigateRef,
dateAllegation: dateAllegationRef,
dateEvident: dateEvidentRef,
@ -189,7 +190,7 @@ const clickBack = () => {
router.push(`/discipline/disciplinary`);
};
watch(props.data, async () => {
formData.Complaint = props.data.Complaint;
formData.complaint = props.data.complaint;
formData.dateInvestigate = props.data.dateInvestigate;
formData.dateAllegation = props.data.dateAllegation;
formData.dateEvident = props.data.dateEvident;
@ -216,457 +217,499 @@ watch(props.data, async () => {
<div class="col-12">
<q-card bordered>
<div class="col-12 row q-pa-md">
<div class="col-12 row q-col-gutter-md">
<q-input
class="col-12"
dense
<div class="col-12 row q-col-gutter-md">
<div class="col-12">
<q-select
for="#fault"
outlined
v-model="formData.Complaint"
for="#Complaint"
dense
ref="complaintRef"
v-model="formData.complaint"
:rules="[(val) => !!val || `${'กรุณาเลือกเรื่องร้องเรียน'}`]"
:options="complaintsOptions"
label="เรื่องร้องเรียน"
hide-bottom-space
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกเรื่องร้องเรียน'}`]"
/>
<datepicker
menu-class-name="modalfix"
v-model="dateInvestigate"
ref="dateInvestigateRef"
for="#dateInvestigate"
:locale="'th'"
autoApply
class="col-xs-12 col-sm-4"
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
dense
class="full-width datepicker"
hide-bottom-space
:model-value="
dateInvestigate != null
? date2Thai(dateInvestigate)
: 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
menu-class-name="modalfix"
ref="dateAllegationRef"
for="#dateAllegation"
v-model="dateAllegation"
class="col-xs-12 col-sm-4"
:locale="'th'"
autoApply
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
dense
class="col-xs-12 col-sm-4"
hide-bottom-space
:model-value="
dateAllegation != null
? date2Thai(dateAllegation)
: 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
menu-class-name="modalfix"
ref="dateEvidentRef"
for="#dateEvident"
v-model="dateEvident"
:locale="'th'"
autoApply
class="col-xs-12 col-sm-4"
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
dense
class="full-width datepicker"
hide-bottom-space
:model-value="
dateEvident != null ? date2Thai(dateEvident) : 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>
<div class="row col-12">
<q-card bordered class="row col-12" style="border:1px solid #d6dee1;">
<div class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md">
กรรมการ
<q-btn
size="12px"
flat
round
dense
color="add"
class="q-ml-sm"
@click="popup()"
icon="mdi-plus"
>
<q-tooltip>เพมกรรมการ</q-tooltip>
</q-btn>
</div>
<div class="col-12"><q-separator /></div>
<div class="col-xs-12 q-pa-sm row">
<Table
class="col-12"
style="max-height: 80vh"
:rows="rows"
:columns="investigateDis.columnsDirector"
:filter="filter"
:visible-columns="investigateDis.visibleColumnsDirector"
v-model:inputfilter="filter"
v-model:inputvisible="investigateDis.visibleColumnsDirector"
:pagination="initialPagination"
:nornmalData="true"
:paging="true"
:titleText="''"
>
<template #columns="props">
<q-tr :props="props" class="cursor-pointer">
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
>
<div v-if="col.name == 'no'" class="table_ellipsis2">
{{ props.rowIndex + 1 }}
</div>
<div v-else class="table_ellipsis2">
{{ col.value }}
</div>
</q-td>
<q-td>
<q-btn
dense
size="12px"
flat
round
color="red"
@click="deleteData(props.row.id)"
icon="mdi-delete"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
</q-tr>
</template>
</Table>
</div>
</q-card>
</div>
<q-input
class="col-xs-12 col-sm-6"
dense
outlined
ref="casefaultRef"
v-model="formData.casefault"
for="#casefault"
label="กรณีมีความผิด"
hide-bottom-space
:rules="[(val) => !!val || `${'กรุณากรอกกรณีมีความผิด'}`]"
lazy-rules
/>
<q-input
class="col-xs-12 col-sm-6"
dense
hide-bottom-space
outlined
for="#whereInvestigate"
ref="whereInvestigateRef"
v-model="formData.whereInvestigate"
label="สอบสวนที่"
:rules="[(val) => !!val || `${'กรุณากรอกสอบสวนที่'}`]"
lazy-rules
/>
<q-select
dense
class="col-xs-12 col-sm-3"
outlined
for="#typefault"
ref="typefaultRef"
v-model="formData.typefault"
option-label="name"
option-value="id"
emit-value
map-options
hide-bottom-space
:options="investigateDis.optionsTypefault"
label="ลักษณะความผิด"
/>
<q-select
dense
class="col-xs-12 col-sm-3"
outlined
for="#faultLevel"
ref="faultLevelRef"
v-model="formData.faultLevel"
option-label="name"
option-value="id"
emit-value
map-options
hide-bottom-space
:options="investigateDis.optionsfaultLevel"
label="ระดับโทษความผิด"
/>
<q-input
class="col-xs-12 col-sm-6"
dense
for="#refLaw"
hide-bottom-space
outlined
ref="refLawRef"
v-model="formData.refLaw"
label="อ้างอิงมาตราตามกฎหมาย"
:rules="[
(val) => !!val || `${'กรุณากรอกอ้างอิงมาตราตามกฎหมาย'}`,
]"
lazy-rules
/>
<q-input
class="col-12"
dense
outlined
hide-bottom-space
for="#detailComplaint"
ref="detailComplaintRef"
v-model="formData.detailComplaint"
label="รายละเอียดเรื่องร้องเรียน"
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียดเรื่องร้องเรียน'}`]"
/>
<q-input
class="col-12"
dense
outlined
hide-bottom-space
for="#trueDetail"
ref="trueDetailRef"
v-model="formData.trueDetail"
label="รายละเอียดสืบสวนข้อเท็จจริง"
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียดสืบสวนข้อเท็จจริง'}`]"
/>
<div class="row col-12">
<q-card bordered class="row col-12" style="border:1px solid #d6dee1;">
<div class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md">
หลกฐานสนบสนนขอกลาวหา
</div>
<div class="col-12"><q-separator /></div>
<div class="col-xs-12 q-pa-sm row">
<q-input
class="col-12"
dense
outlined
for="#evidence"
ref="evidenceRef"
hide-bottom-space
v-model="formData.evidence"
label="สรุปพยานหลักฐานสนับสนุนข้อกล่าวหา"
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกสรุปพยานหลักฐานสนับสนุนข้อกล่าวหา'}`]"
/>
<q-file
class="col-12 q-mt-sm"
outlined
dense
ref="filesEvidenceRef"
for="#filesEvidence"
v-model="formData.filesEvidence"
@added="fileUploadDoc"
label="ไฟล์เอกสารหลักฐานสรุปพยานหลักฐานสนับสนุนข้อกล่าวหา"
hide-bottom-space
lazy-rules
accept=".pdf,.xlsx,.doc"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
</q-file>
</div>
</q-card>
</div>
<div class="row col-12">
<q-card bordered class="row col-12" style="border:1px solid #d6dee1;">
<div class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md">
นทกถอยคำของผกลาวหา
</div>
<div class="col-12"><q-separator /></div>
<div class="col-xs-12 q-pa-sm row">
<q-input
class="col-12"
dense
outlined
ref="recordAccuserRef"
for="#recordAccuser"
v-model="formData.recordAccuser"
label="บันทึกถ้อยคำของผู้กล่าวหา"
hide-bottom-space
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกบันทึกถ้อยคำของผู้กล่าวหา'}`]"
/>
<q-file
class="col-12 q-mt-sm"
outlined
dense
ref="filesRecordAccuserRef"
for="#filesRecordAccuser"
v-model="formData.filesRecordAccuser"
@added="fileUploadDoc"
label="ไฟล์เอกสารบันทึกถ้อยคำของผู้กล่าวหา"
hide-bottom-space
lazy-rules
accept=".pdf,.xlsx,.doc"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
</q-file>
</div>
</q-card>
</div>
<div class="row col-12">
<q-card bordered class="row col-12" style="border:1px solid #d6dee1;">
<div class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md">
พยานและการบนทกถอยคำ
</div>
<div class="col-12"><q-separator /></div>
<div class="col-xs-12 q-pa-sm row">
<q-input
class="col-12"
dense
outlined
for="#witnesses"
ref="witnessesRef"
v-model="formData.witnesses"
label="พยานและการบันทึกถ้อยคำ"
hide-bottom-space
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกพยานและการบันทึกถ้อยคำ'}`]"
/>
<q-file
class="col-12 q-mt-sm"
outlined
dense
ref="filesWitnessesRef"
for="#filesWitnesses"
v-model="formData.filesWitnesses"
@added="fileUploadDoc"
label="ไฟล์เอกสารพยานและการบันทึกถ้อยคำ"
hide-bottom-space
lazy-rules
accept=".pdf,.xlsx,.doc"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
</q-file>
</div>
</q-card>
</div>
<q-input
class="col-12"
dense
outlined
for="#InvestResults"
ref="InvestResultsRef"
v-model="formData.InvestResults"
label="ผลการสอบสวน"
hide-bottom-space
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกผลการสอบสวน'}`]"
/>
<q-file
class="col-12"
outlined
dense
ref="filesEtcRef"
for="#filesEtc"
v-model="formData.filesEtc"
@added="fileUploadDoc"
label="ไฟล์เอกสารหลักฐานอื่น ๆ"
hide-bottom-space
lazy-rules
accept=".pdf,.xlsx,.doc"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
use-input
><template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
</q-item-section>
</q-item>
</template>
</q-file>
</q-select>
</div>
<datepicker
menu-class-name="modalfix"
v-model="dateInvestigate"
ref="dateInvestigateRef"
for="#dateInvestigate"
:locale="'th'"
autoApply
class="col-xs-12 col-sm-4"
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
dense
class="full-width datepicker"
hide-bottom-space
:model-value="
dateInvestigate != null
? date2Thai(dateInvestigate)
: 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
menu-class-name="modalfix"
ref="dateAllegationRef"
for="#dateAllegation"
v-model="dateAllegation"
class="col-xs-12 col-sm-4"
:locale="'th'"
autoApply
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
dense
class="col-xs-12 col-sm-4"
hide-bottom-space
:model-value="
dateAllegation != null ? date2Thai(dateAllegation) : 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
menu-class-name="modalfix"
ref="dateEvidentRef"
for="#dateEvident"
v-model="dateEvident"
:locale="'th'"
autoApply
class="col-xs-12 col-sm-4"
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
dense
class="full-width datepicker"
hide-bottom-space
:model-value="
dateEvident != null ? date2Thai(dateEvident) : 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>
<div class="row col-12">
<q-card
bordered
class="row col-12"
style="border: 1px solid #d6dee1"
>
<div
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md"
>
กรรมการ
<q-btn
size="12px"
flat
round
dense
color="add"
class="q-ml-sm"
@click="popup()"
icon="mdi-plus"
>
<q-tooltip>เพมกรรมการ</q-tooltip>
</q-btn>
</div>
<div class="col-12"><q-separator /></div>
<div class="col-xs-12 q-pa-sm row">
<Table
class="col-12"
style="max-height: 80vh"
:rows="rows"
:columns="investigateDis.columnsDirector"
:filter="filter"
:visible-columns="investigateDis.visibleColumnsDirector"
v-model:inputfilter="filter"
v-model:inputvisible="
investigateDis.visibleColumnsDirector
"
:pagination="initialPagination"
:nornmalData="true"
:paging="true"
:titleText="''"
>
<template #columns="props">
<q-tr :props="props" class="cursor-pointer">
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
>
<div
v-if="col.name == 'no'"
class="table_ellipsis2"
>
{{ props.rowIndex + 1 }}
</div>
<div v-else class="table_ellipsis2">
{{ col.value }}
</div>
</q-td>
<q-td>
<q-btn
dense
size="12px"
flat
round
color="red"
@click="deleteData(props.row.id)"
icon="mdi-delete"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
</q-tr>
</template>
</Table>
</div>
</q-card>
</div>
<q-input
class="col-xs-12 col-sm-6"
dense
outlined
ref="casefaultRef"
v-model="formData.casefault"
for="#casefault"
label="กรณีมีความผิด"
hide-bottom-space
:rules="[(val) => !!val || `${'กรุณากรอกกรณีมีความผิด'}`]"
lazy-rules
/>
<q-input
class="col-xs-12 col-sm-6"
dense
hide-bottom-space
outlined
for="#whereInvestigate"
ref="whereInvestigateRef"
v-model="formData.whereInvestigate"
label="สอบสวนที่"
:rules="[(val) => !!val || `${'กรุณากรอกสอบสวนที่'}`]"
lazy-rules
/>
<q-select
dense
class="col-xs-12 col-sm-3"
outlined
for="#typefault"
ref="typefaultRef"
v-model="formData.typefault"
option-label="name"
option-value="id"
emit-value
map-options
hide-bottom-space
:options="investigateDis.optionsTypefault"
label="ลักษณะความผิด"
/>
<q-select
dense
class="col-xs-12 col-sm-3"
outlined
for="#faultLevel"
ref="faultLevelRef"
v-model="formData.faultLevel"
option-label="name"
option-value="id"
emit-value
map-options
hide-bottom-space
:options="investigateDis.optionsfaultLevel"
label="ระดับโทษความผิด"
/>
<q-input
class="col-xs-12 col-sm-6"
dense
for="#refLaw"
hide-bottom-space
outlined
ref="refLawRef"
v-model="formData.refLaw"
label="อ้างอิงมาตราตามกฎหมาย"
:rules="[
(val) => !!val || `${'กรุณากรอกอ้างอิงมาตราตามกฎหมาย'}`,
]"
lazy-rules
/>
<q-input
class="col-12"
dense
outlined
hide-bottom-space
for="#detailComplaint"
ref="detailComplaintRef"
v-model="formData.detailComplaint"
label="รายละเอียดเรื่องร้องเรียน"
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียดเรื่องร้องเรียน'}`]"
/>
<q-input
class="col-12"
dense
outlined
hide-bottom-space
for="#trueDetail"
ref="trueDetailRef"
v-model="formData.trueDetail"
label="รายละเอียดสืบสวนข้อเท็จจริง"
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียดสืบสวนข้อเท็จจริง'}`]"
/>
<div class="row col-12">
<q-card
bordered
class="row col-12"
style="border: 1px solid #d6dee1"
>
<div
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md"
>
หลกฐานสนบสนนขอกลาวหา
</div>
<div class="col-12"><q-separator /></div>
<div class="col-xs-12 q-pa-sm row">
<q-input
class="col-12"
dense
outlined
for="#evidence"
ref="evidenceRef"
hide-bottom-space
v-model="formData.evidence"
label="สรุปพยานหลักฐานสนับสนุนข้อกล่าวหา"
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกสรุปพยานหลักฐานสนับสนุนข้อกล่าวหา'}`]"
/>
<q-file
class="col-12 q-mt-sm"
outlined
dense
ref="filesEvidenceRef"
for="#filesEvidence"
v-model="formData.filesEvidence"
@added="fileUploadDoc"
label="ไฟล์เอกสารหลักฐานสรุปพยานหลักฐานสนับสนุนข้อกล่าวหา"
hide-bottom-space
lazy-rules
accept=".pdf,.xlsx,.doc"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
</q-file>
</div>
</q-card>
</div>
<div class="row col-12">
<q-card
bordered
class="row col-12"
style="border: 1px solid #d6dee1"
>
<div
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md"
>
นทกถอยคำของผกลาวหา
</div>
<div class="col-12"><q-separator /></div>
<div class="col-xs-12 q-pa-sm row">
<q-input
class="col-12"
dense
outlined
ref="recordAccuserRef"
for="#recordAccuser"
v-model="formData.recordAccuser"
label="บันทึกถ้อยคำของผู้กล่าวหา"
hide-bottom-space
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกบันทึกถ้อยคำของผู้กล่าวหา'}`]"
/>
<q-file
class="col-12 q-mt-sm"
outlined
dense
ref="filesRecordAccuserRef"
for="#filesRecordAccuser"
v-model="formData.filesRecordAccuser"
@added="fileUploadDoc"
label="ไฟล์เอกสารบันทึกถ้อยคำของผู้กล่าวหา"
hide-bottom-space
lazy-rules
accept=".pdf,.xlsx,.doc"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
</q-file>
</div>
</q-card>
</div>
<div class="row col-12">
<q-card
bordered
class="row col-12"
style="border: 1px solid #d6dee1"
>
<div
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md"
>
พยานและการบนทกถอยคำ
</div>
<div class="col-12"><q-separator /></div>
<div class="col-xs-12 q-pa-sm row">
<q-input
class="col-12"
dense
outlined
for="#witnesses"
ref="witnessesRef"
v-model="formData.witnesses"
label="พยานและการบันทึกถ้อยคำ"
hide-bottom-space
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกพยานและการบันทึกถ้อยคำ'}`]"
/>
<q-file
class="col-12 q-mt-sm"
outlined
dense
ref="filesWitnessesRef"
for="#filesWitnesses"
v-model="formData.filesWitnesses"
@added="fileUploadDoc"
label="ไฟล์เอกสารพยานและการบันทึกถ้อยคำ"
hide-bottom-space
lazy-rules
accept=".pdf,.xlsx,.doc"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
</q-file>
</div>
</q-card>
</div>
<q-input
class="col-12"
dense
outlined
for="#InvestResults"
ref="InvestResultsRef"
v-model="formData.InvestResults"
label="ผลการสอบสวน"
hide-bottom-space
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกผลการสอบสวน'}`]"
/>
<q-file
class="col-12"
outlined
dense
ref="filesEtcRef"
for="#filesEtc"
v-model="formData.filesEtc"
@added="fileUploadDoc"
label="ไฟล์เอกสารหลักฐานอื่น ๆ"
hide-bottom-space
lazy-rules
accept=".pdf,.xlsx,.doc"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
</q-file>
</div>
</div>
<q-separator />
<div class="row col-12 q-pa-sm">

View file

@ -3,7 +3,7 @@ import { onMounted, ref } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue";
import Table from "@/modules/11_discipline/components/3_investigateDisciplinary/Table.vue";
import { useInvestigateDisStore } from "../../store/InvestigateDisStore";
import { useRouter } from "vue-router";
@ -68,9 +68,6 @@ onMounted(async () => {
await hideLoader();
});
const clickAdd = () => {
router.push(`/discipline/InvestigateDisciplinary/add`);
};
function openEdit(id:string) {
console.log(id)
router.push(`/discipline/disciplinary/${id}`)
@ -93,7 +90,6 @@ function openEdit(id:string) {
v-model:inputvisible="dataInvestigateDis.visibleColumns"
:pagination="initialPagination"
:nornmalData="true"
:add="clickAdd"
:paging="true"
:titleText="''"
>

View file

@ -1,59 +1,124 @@
<script setup lang="ts">
import { ref, useAttrs } from "vue";
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
const attrs = ref<any>(useAttrs());
const paging = ref<boolean>(true);
const pagination = ref({
// sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
});
const paginationLabel = (start: string, end: string, total: string) => {
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
else return start + "-" + end + " ใน " + total;
};
const table = ref<any>(null);
const filterRef = ref<any>(null);
const initialPagination = ref<Pagination>({
rowsPerPage: 0,
});
const props = defineProps({
count: Number,
pass: Number,
notpass: Number,
inputfilter: String,
name: String,
icon: String,
inputvisible: Array,
editvisible: Boolean,
validate: {
type: Function,
default: () => console.log("not function"),
},
nornmalData: {
type: Boolean,
defualt: true,
},
conclude: {
type: Boolean,
defualt: false,
},
});
const emit = defineEmits([
"update:inputfilter",
"update:inputvisible",
"update:editvisible",
]);
const updateInput = (value: string | number | null) => {
emit("update:inputfilter", value);
};
const updateVisible = (value: []) => {
emit("update:inputvisible", value);
};
const resetFilter = () => {
// reset X
emit("update:inputfilter", "");
filterRef.value.focus();
};
</script>
<template>
<div class="q-pb-sm row q-col-gutter-sm">
<!-- -->
<div class="q-gutter-sm" v-if="nornmalData == true">
<q-btn
to="/discipline/investigate-disciplinary/add"
size="12px"
flat
round
color="add"
@click="checkAdd"
icon="mdi-plus"
>
<q-tooltip>เพมขอม</q-tooltip>
</q-btn>
</div>
<q-space />
<!-- นหาขอความใน table -->
<q-input
standout
dense
:model-value="inputfilter"
ref="filterRef"
@update:model-value="updateInput"
outlined
debounce="300"
placeholder="ค้นหา"
style="max-width: 200px"
class="col-xs-12 col-sm-3 col-md-2"
>
<template v-slot:append>
<q-icon v-if="inputfilter == ''" name="search" />
<q-icon
v-if="inputfilter !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"
/>
</template>
</q-input>
<!-- แสดงคอลมนใน table -->
<q-select
:model-value="inputvisible"
@update:model-value="updateVisible"
:display-value="$q.lang.table.columns"
multiple
outlined
dense
:options="attrs.columns"
options-dense
option-value="name"
map-options
emit-value
class="col-xs-12 col-sm-3 col-md-2 gt-xs"
>
<template> </template>
</q-select>
<!-- นหาขอความใน table -->
<q-input
standout
dense
:model-value="inputfilter"
ref="filterRef"
@update:model-value="updateInput"
outlined
debounce="300"
placeholder="ค้นหา"
style="max-width: 200px"
class="col-xs-12 col-sm-3 col-md-2"
>
<template v-slot:append>
<q-icon v-if="inputfilter == ''" name="search" />
<q-icon
v-if="inputfilter !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"
/>
</template>
</q-input>
<!-- แสดงคอลมนใน table -->
<q-select
:model-value="inputvisible"
@update:model-value="updateVisible"
:display-value="$q.lang.table.columns"
multiple
outlined
dense
:options="attrs.columns"
options-dense
option-value="name"
map-options
emit-value
class="col-xs-12 col-sm-3 col-md-2 gt-xs"
>
<template> </template>
</q-select>
</div>
<d-table
ref="table"
@ -90,78 +155,7 @@
</template> -->
</d-table>
</template>
<script setup lang="ts">
import { ref, useAttrs } from "vue";
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
const attrs = ref<any>(useAttrs());
const paging = ref<boolean>(true);
const pagination = ref({
// sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
});
const paginationLabel = (start: string, end: string, total: string) => {
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
else return start + "-" + end + " ใน " + total;
};
const table = ref<any>(null);
const filterRef = ref<any>(null);
const initialPagination = ref<Pagination>({
rowsPerPage: 0,
});
const props = defineProps({
count: Number,
pass: Number,
notpass: Number,
inputfilter: String,
name: String,
icon: String,
inputvisible: Array,
editvisible: Boolean,
add: {
type: Function,
default: () => console.log("not function"),
},
validate: {
type: Function,
default: () => console.log("not function"),
},
nornmalData: {
type: Boolean,
defualt: true,
},
conclude: {
type: Boolean,
defualt: false,
},
});
const emit = defineEmits([
"update:inputfilter",
"update:inputvisible",
"update:editvisible",
]);
const updateInput = (value: string | number | null) => {
emit("update:inputfilter", value);
};
const updateVisible = (value: []) => {
emit("update:inputvisible", value);
};
const checkAdd = () => {
props.add();
};
const resetFilter = () => {
// reset X
emit("update:inputfilter", "");
filterRef.value.focus();
};
</script>
<style lang="scss">
.icon-color {
color: #4154b3;

View file

@ -1,5 +1,5 @@
interface FormData {
Complaint: string;
complaint: string;
dateInvestigate: Date | null;
dateAllegation: Date | null;
dateEvident: Date | null;
@ -21,7 +21,7 @@ interface FormData {
}
interface disciplinaryRef {
Complaint: object | null;
complaint: object | null;
dateInvestigate: object | null;
dateAllegation: object | null;
dateEvident: object | null;
@ -43,4 +43,4 @@ interface disciplinaryRef {
[key: string]: any;
}
export type { FormData, disciplinaryRef, investigateDisDataRowType };
export type { FormData, disciplinaryRef };

View file

@ -8,11 +8,11 @@ const investigatefactsEdit = () =>
import("@/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue");
const disciplinaryMain = () =>
import(
"@/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue"
"@/modules/11_discipline/components/3_investigateDisciplinary/MainPage.vue"
);
const disciplinaryEdit = () =>
import(
"@/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue"
"@/modules/11_discipline/components/3_investigateDisciplinary/EditPage.vue"
);
const oredrMain = () =>
import("@/modules/11_discipline/components/4_Order/MainPage.vue");
@ -47,7 +47,7 @@ const reportType = () =>
const InvestigateDisciplinaryAdd = () =>
import(
"@/modules/11_discipline/components/3_InvestigateDisciplinary/AddPage.vue"
"@/modules/11_discipline/components/3_investigateDisciplinary/AddPage.vue"
);
const orderPage = () =>
import("@/modules/11_discipline/components/4_Order/OrderPage.vue");
@ -204,8 +204,8 @@ export default [
},
},
{
path: "/discipline/InvestigateDisciplinary/add",
name: "/discipline-InvestigateDisciplinaryAdd",
path: "/discipline/investigate-disciplinary/add",
name: "discipline_investigate_disciplinary_add",
component: InvestigateDisciplinaryAdd,
meta: {
Auth: true,