ปรับระบบวินัยให้ใช้ข้อมูลทะเบียนประวัติใหม่
This commit is contained in:
parent
4c01e5aa0d
commit
573eaff2ec
7 changed files with 320 additions and 293 deletions
|
|
@ -14,7 +14,7 @@ import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
|||
|
||||
import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
||||
import DialogDuty from "@/modules/11_discipline/components/DialogDuty.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
import type {
|
||||
FormData,
|
||||
|
|
@ -139,17 +139,19 @@ const formData = reactive<FormData>({
|
|||
|
||||
const rows = ref([]);
|
||||
const dateEndInputStyle = computed(() => {
|
||||
if(formData.investigationDateStart){
|
||||
const currentDate = new Date();
|
||||
const investigationDateEnd = new Date(formData.investigationDateEnd as Date);
|
||||
if (formData.investigationDateStart) {
|
||||
const currentDate = new Date();
|
||||
const investigationDateEnd = new Date(
|
||||
formData.investigationDateEnd as Date
|
||||
);
|
||||
|
||||
const isInNext7Days =
|
||||
investigationDateEnd >= currentDate &&
|
||||
investigationDateEnd <=
|
||||
new Date(currentDate.getTime() + 7 * 24 * 60 * 60 * 1000);
|
||||
const isInNext7Days =
|
||||
investigationDateEnd >= currentDate &&
|
||||
investigationDateEnd <=
|
||||
new Date(currentDate.getTime() + 7 * 24 * 60 * 60 * 1000);
|
||||
|
||||
return isInNext7Days ? "input-alert" : "";
|
||||
}
|
||||
return isInNext7Days ? "input-alert" : "";
|
||||
}
|
||||
});
|
||||
|
||||
const initialPagination = ref<any>({
|
||||
|
|
@ -286,11 +288,11 @@ watch(props.data, async () => {
|
|||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
position: item.position == '' ? "-" : item.position,
|
||||
email: item.email == '' ? '-' : item.email,
|
||||
phone: item.phone == '' ? '-' : item.phone,
|
||||
commandNo: item.commandNo == '' ? '-' : item.commandNo,
|
||||
duty: item.duty == '' ? '-' : item.duty,
|
||||
position: item.position == "" ? "-" : item.position,
|
||||
email: item.email == "" ? "-" : item.email,
|
||||
phone: item.phone == "" ? "-" : item.phone,
|
||||
commandNo: item.commandNo == "" ? "-" : item.commandNo,
|
||||
duty: item.duty == "" ? "-" : item.duty,
|
||||
check: "props",
|
||||
}));
|
||||
|
||||
|
|
@ -643,7 +645,7 @@ onMounted(async () => {
|
|||
</script>
|
||||
<template>
|
||||
<div class="row col-12 bg-white">
|
||||
<div v-if="isSave" class=" col-12">
|
||||
<div v-if="isSave" class="col-12">
|
||||
<q-banner
|
||||
inline-actions
|
||||
bordered
|
||||
|
|
@ -660,7 +662,6 @@ onMounted(async () => {
|
|||
<div class="col-xs-12 col-sm-12 col-md-9 row no-wrap">
|
||||
<div class="col-12 row q-pl-md q-py-md">
|
||||
<div class="row col-12 q-col-gutter-md">
|
||||
|
||||
<div class="col-xs-12 col-sm-5" id="respondentType">
|
||||
<q-select
|
||||
:class="inputEdit(isReadonly)"
|
||||
|
|
@ -857,7 +858,9 @@ onMounted(async () => {
|
|||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="!isReadonly && props.row.isAncestorDNA === false"
|
||||
v-if="
|
||||
!isReadonly && props.row.isAncestorDNA === false
|
||||
"
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
|
|
@ -1365,14 +1368,20 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"><q-separator vertical /></div>
|
||||
<div class="row"><q-separator vertical /></div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-12 col-md-3">
|
||||
<div class="q-col-gutter-md row q-pa-md">
|
||||
<div class="col-xs-12">
|
||||
<q-card bordered class="row col-12" style="border: 1px solid #d6dee1">
|
||||
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||
<q-card
|
||||
bordered
|
||||
class="row col-12"
|
||||
style="border: 1px solid #d6dee1"
|
||||
>
|
||||
<div
|
||||
class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
|
||||
>
|
||||
อัปโหลดไฟล์เอกสารที่เกี่ยวข้องกับการสืบสวน
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
|
|
@ -1394,22 +1403,25 @@ onMounted(async () => {
|
|||
<q-icon name="attach_file" color="primary" />
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<q-btn
|
||||
v-if="formData.evidenceFiles"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="uploadFileRelevant"
|
||||
><q-tooltip>อัปโหลดเอกสาร</q-tooltip></q-btn>
|
||||
<q-btn
|
||||
v-if="formData.evidenceFiles"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="uploadFileRelevant"
|
||||
><q-tooltip>อัปโหลดเอกสาร</q-tooltip></q-btn
|
||||
>
|
||||
</template>
|
||||
</q-file>
|
||||
</div>
|
||||
|
||||
|
||||
<div
|
||||
v-if="props.data.disciplineInvestigateRelevantDocs.length > 0"
|
||||
v-if="
|
||||
props.data.disciplineInvestigateRelevantDocs.length > 0
|
||||
"
|
||||
class="col-xs-12 row"
|
||||
>
|
||||
<q-list
|
||||
|
|
@ -1417,12 +1429,13 @@ onMounted(async () => {
|
|||
bordered
|
||||
separator
|
||||
>
|
||||
<q-item
|
||||
v-for="file in props.data.disciplineInvestigateRelevantDocs"
|
||||
<q-item
|
||||
v-for="file in props.data
|
||||
.disciplineInvestigateRelevantDocs"
|
||||
:key="file.id"
|
||||
clickable
|
||||
clickable
|
||||
v-ripple
|
||||
>
|
||||
>
|
||||
<q-item-section>{{ file.fileName }}</q-item-section>
|
||||
<q-item-section avatar>
|
||||
<div class="row">
|
||||
|
|
@ -1459,14 +1472,22 @@ onMounted(async () => {
|
|||
</div>
|
||||
|
||||
<div class="col-12" v-else>
|
||||
<q-card class="q-pa-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
||||
<q-card class="q-pa-md" bordered>
|
||||
ไม่มีรายการเอกสาร
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<q-card bordered class="row col-12" style="border: 1px solid #d6dee1">
|
||||
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||
<q-card
|
||||
bordered
|
||||
class="row col-12"
|
||||
style="border: 1px solid #d6dee1"
|
||||
>
|
||||
<div
|
||||
class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
|
||||
>
|
||||
อัปโหลดไฟล์เอกสารหลักฐาน
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
|
|
@ -1491,15 +1512,15 @@ onMounted(async () => {
|
|||
</template>
|
||||
<template v-slot:after>
|
||||
<q-btn
|
||||
v-if="formData.documentFile"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="uploadFile"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
v-if="formData.documentFile"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="uploadFile"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</template>
|
||||
</q-file>
|
||||
|
|
@ -1514,11 +1535,12 @@ onMounted(async () => {
|
|||
bordered
|
||||
separator
|
||||
>
|
||||
<q-item
|
||||
<q-item
|
||||
v-for="file in props.data.disciplineInvestigateDocs"
|
||||
:key="file.id"
|
||||
clickable
|
||||
v-ripple>
|
||||
clickable
|
||||
v-ripple
|
||||
>
|
||||
<q-item-section>{{ file.fileName }}</q-item-section>
|
||||
<q-item-section avatar>
|
||||
<div class="row">
|
||||
|
|
@ -1555,22 +1577,20 @@ onMounted(async () => {
|
|||
</div>
|
||||
|
||||
<div class="col-12" v-else>
|
||||
<q-card class="q-pa-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
||||
<q-card class="q-pa-md" bordered>
|
||||
ไม่มีรายการเอกสาร
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 "><q-separator /></div>
|
||||
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="row col-12 q-pa-sm" v-if="!isReadonly">
|
||||
<q-space />
|
||||
<q-btn
|
||||
id="onSubmit"
|
||||
type="submit"
|
||||
label="บันทึก"
|
||||
color="secondary"
|
||||
<q-btn id="onSubmit" type="submit" label="บันทึก" color="secondary"
|
||||
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
|
|
@ -1578,8 +1598,8 @@ onMounted(async () => {
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
|
||||
<DialogDuty
|
||||
:modal="modalEditDirector"
|
||||
:close-popup="closeEditDirector"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue