ปรับระบบวินัยให้ใช้ข้อมูลทะเบียนประวัติใหม่
This commit is contained in:
parent
4c01e5aa0d
commit
573eaff2ec
7 changed files with 320 additions and 293 deletions
|
|
@ -15,7 +15,7 @@ import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
|||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
|
|
@ -152,7 +152,6 @@ function validateForm() {
|
|||
if (property.value && typeof property.value.validate === "function") {
|
||||
const isValid = property.value.validate();
|
||||
hasError.push(isValid);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -165,16 +164,13 @@ function validateForm() {
|
|||
|
||||
/** ฟังชั่น บันทึก */
|
||||
function onSubmit() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
if (mainStore.rowsAdd) {
|
||||
formData.persons = await mainStore.rowsAdd;
|
||||
}
|
||||
await props.onSubmit(formData);
|
||||
isSave.value = false;
|
||||
dialogConfirm($q, async () => {
|
||||
if (mainStore.rowsAdd) {
|
||||
formData.persons = await mainStore.rowsAdd;
|
||||
}
|
||||
);
|
||||
await props.onSubmit(formData);
|
||||
isSave.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -359,8 +355,8 @@ onMounted(() => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row col-12 bg-white">
|
||||
<div v-if="isSave" class=" col-12">
|
||||
<div class="row col-12 bg-white">
|
||||
<div v-if="isSave" class="col-12">
|
||||
<q-banner
|
||||
inline-actions
|
||||
bordered
|
||||
|
|
@ -500,86 +496,86 @@ onMounted(() => {
|
|||
<div class="col-12"><q-separator /></div>
|
||||
|
||||
<div class="col-12 row q-pa-sm">
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="mainStore.columnsRespondent"
|
||||
:rows="mainStore.rowsAdd"
|
||||
row-key="idcard"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="col-12"
|
||||
:visible-columns="mainStore.visibleColumnsRespondent"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width></q-th>
|
||||
<q-th
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
style="color: #000000; font-weight: 500"
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="mainStore.columnsRespondent"
|
||||
:rows="mainStore.rowsAdd"
|
||||
row-key="idcard"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="col-12"
|
||||
:visible-columns="mainStore.visibleColumnsRespondent"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width></q-th>
|
||||
<q-th
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
style="color: #000000; font-weight: 500"
|
||||
>
|
||||
<span class="text-weight-medium">{{
|
||||
col.label
|
||||
}}</span>
|
||||
</q-th>
|
||||
<q-th auto-width></q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<td>
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="info"
|
||||
icon="info"
|
||||
@click="onclickViewinfo(props.row.personId)"
|
||||
>
|
||||
<span class="text-weight-medium">{{
|
||||
col.label
|
||||
}}</span>
|
||||
</q-th>
|
||||
<q-th auto-width></q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<td>
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="info"
|
||||
icon="info"
|
||||
@click="onclickViewinfo(props.row.personId)"
|
||||
>
|
||||
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
</td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
</td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
>
|
||||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="col.name === 'organization'"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="col.name === 'organization'"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
{{ props.row.organization }}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'salary'">
|
||||
{{ props.row.salary.toLocaleString() }}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="!isReadonly"
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="red"
|
||||
class="q-ml-sm"
|
||||
icon="mdi-delete-outline"
|
||||
@click="deletePerson(props.row.personId)"
|
||||
><q-tooltip>ลบผู้ถูกร้องเรียน</q-tooltip></q-btn
|
||||
>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
{{ props.row.organization }}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'salary'">
|
||||
{{ props.row.salary.toLocaleString() }}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="!isReadonly"
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="red"
|
||||
class="q-ml-sm"
|
||||
icon="mdi-delete-outline"
|
||||
@click="deletePerson(props.row.personId)"
|
||||
><q-tooltip>ลบผู้ถูกร้องเรียน</q-tooltip></q-btn
|
||||
>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
|
@ -655,7 +651,6 @@ onMounted(() => {
|
|||
:rules="[
|
||||
(val) => !!val || `${'กรุณาเลือกวันที่รับเรื่อง'}`,
|
||||
]"
|
||||
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -736,10 +731,15 @@ onMounted(() => {
|
|||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
<template v-if="formData.dateConsideration && !isReadonly" v-slot:append>
|
||||
<template
|
||||
v-if="formData.dateConsideration && !isReadonly"
|
||||
v-slot:append
|
||||
>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="formData.dateConsideration = null"
|
||||
@click.stop.prevent="
|
||||
formData.dateConsideration = null
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
|
|
@ -811,14 +811,16 @@ onMounted(() => {
|
|||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
<template v-if="formData.dateNotification && !isReadonly" v-slot:append>
|
||||
<template
|
||||
v-if="formData.dateNotification && !isReadonly"
|
||||
v-slot:append
|
||||
>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="formData.dateNotification = null"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
|
@ -880,11 +882,11 @@ onMounted(() => {
|
|||
</div>
|
||||
</div>
|
||||
<div class="row"><q-separator vertical /></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
<div class="col-sm-12 col-md-3">
|
||||
<div flat class="q-pa-md" >
|
||||
<div flat class="q-pa-md">
|
||||
<div class="col-12 row q-col-gutter-md">
|
||||
<div class="row col-12">
|
||||
<q-card
|
||||
|
|
@ -892,9 +894,13 @@ onMounted(() => {
|
|||
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
|
||||
class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
|
||||
>
|
||||
{{
|
||||
!isReadonly ? "อัปโหลดไฟล์เอกสารหลักฐาน" : "ไฟล์เอกสารหลักฐาน"
|
||||
!isReadonly
|
||||
? "อัปโหลดไฟล์เอกสารหลักฐาน"
|
||||
: "ไฟล์เอกสารหลักฐาน"
|
||||
}}
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
|
|
@ -920,15 +926,16 @@ onMounted(() => {
|
|||
</template>
|
||||
<template v-slot:after>
|
||||
<q-btn
|
||||
size="14px"
|
||||
v-if="formData.documentFile"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="upLoadFileDoc()"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn>
|
||||
size="14px"
|
||||
v-if="formData.documentFile"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="upLoadFileDoc()"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</template>
|
||||
</q-file>
|
||||
|
||||
|
|
@ -941,13 +948,13 @@ onMounted(() => {
|
|||
bordered
|
||||
separator
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-ripple
|
||||
<q-item
|
||||
clickable
|
||||
v-ripple
|
||||
v-for="data in fileList"
|
||||
:key="data.id"
|
||||
class="items-center"
|
||||
>
|
||||
>
|
||||
<q-item-section>{{ data.fileName }}</q-item-section>
|
||||
<q-space />
|
||||
<div>
|
||||
|
|
@ -979,7 +986,9 @@ onMounted(() => {
|
|||
</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>
|
||||
|
|
@ -988,7 +997,7 @@ onMounted(() => {
|
|||
</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
|
||||
|
|
@ -1002,8 +1011,6 @@ onMounted(() => {
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Popup ผู้ถูกร้องเรียน -->
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import { useComplainstDataStore } from "@/modules/11_discipline/store/Complaints
|
|||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
import DialogDuty from "@/modules/11_discipline/components/DialogDuty.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
import type {
|
||||
FormData,
|
||||
|
|
@ -127,22 +127,19 @@ function validateForm() {
|
|||
* หากยกเลิกจะกลับไปหน้าฟอร์ม
|
||||
*/
|
||||
function onSubmit() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
await http
|
||||
.put(config.API.listResultById(id.value), formData)
|
||||
.then(() => {
|
||||
isSave.value = false;
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
props.fetchData();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(async () => {});
|
||||
}
|
||||
);
|
||||
dialogConfirm($q, async () => {
|
||||
await http
|
||||
.put(config.API.listResultById(id.value), formData)
|
||||
.then(() => {
|
||||
isSave.value = false;
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
props.fetchData();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(async () => {});
|
||||
});
|
||||
}
|
||||
|
||||
async function fetchDatadetail() {
|
||||
|
|
@ -260,7 +257,7 @@ function updatemodalPersonal(modal: boolean) {
|
|||
</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
|
||||
|
|
@ -272,13 +269,12 @@ function updatemodalPersonal(modal: boolean) {
|
|||
</q-banner>
|
||||
<q-separator />
|
||||
</div>
|
||||
|
||||
|
||||
<form @submit.prevent="validateForm" class="col-12 row">
|
||||
<div class="col-12 row">
|
||||
<div class="col-sm-12 col-md-9 row no-wrap">
|
||||
<div class=" col-12 q-pa-md">
|
||||
<div class="col-12 q-pa-md">
|
||||
<div class="row col-12 q-col-gutter-md">
|
||||
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-select
|
||||
readonly
|
||||
|
|
@ -474,9 +470,7 @@ function updatemodalPersonal(modal: boolean) {
|
|||
:class="inputEdit(isReadonly)"
|
||||
outlined
|
||||
:model-value="
|
||||
formData.year === 0
|
||||
? null
|
||||
: Number(formData.year) + 543
|
||||
formData.year === 0 ? null : Number(formData.year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
|
|
@ -501,7 +495,7 @@ function updatemodalPersonal(modal: boolean) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"><q-separator vertical /></div>
|
||||
<div class="row"><q-separator vertical /></div>
|
||||
</div>
|
||||
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
|
|
@ -530,66 +524,64 @@ function updatemodalPersonal(modal: boolean) {
|
|||
</template>
|
||||
<template v-slot:after>
|
||||
<q-btn
|
||||
v-if="formData.file"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="uploadFile"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn>
|
||||
v-if="formData.file"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="uploadFile"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</template>
|
||||
</q-file>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="formData.disciplineDisciplinary_DocResults.length > 0"
|
||||
class="col-xs-12 row"
|
||||
>
|
||||
<q-list
|
||||
class="full-width"
|
||||
bordered
|
||||
separator
|
||||
</div>
|
||||
<div
|
||||
v-if="formData.disciplineDisciplinary_DocResults.length > 0"
|
||||
class="col-xs-12 row"
|
||||
>
|
||||
<q-list class="full-width" bordered separator>
|
||||
<q-item
|
||||
v-for="data in formData.disciplineDisciplinary_DocResults"
|
||||
:key="data.id"
|
||||
clickable
|
||||
v-ripple
|
||||
>
|
||||
<q-item
|
||||
v-for="data in formData.disciplineDisciplinary_DocResults"
|
||||
:key="data.id"
|
||||
clickable
|
||||
v-ripple>
|
||||
<q-item-section>{{ data.fileName }}</q-item-section>
|
||||
<q-space />
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="blue"
|
||||
icon="mdi-download"
|
||||
@click="downloadFile(data.pathName)"
|
||||
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="red"
|
||||
class="q-ml-sm"
|
||||
icon="mdi-delete-outline"
|
||||
@click="deleteFile(data.id)"
|
||||
><q-tooltip>ลบไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
<div class="col-12 q-pa-sm" v-else>
|
||||
<q-card class="q-pa-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
||||
<q-item-section>{{ data.fileName }}</q-item-section>
|
||||
<q-space />
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="blue"
|
||||
icon="mdi-download"
|
||||
@click="downloadFile(data.pathName)"
|
||||
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="red"
|
||||
class="q-ml-sm"
|
||||
icon="mdi-delete-outline"
|
||||
@click="deleteFile(data.id)"
|
||||
><q-tooltip>ลบไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
<div class="col-12 q-pa-sm" v-else>
|
||||
<q-card class="q-pa-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
<div class="col-12 "><q-separator /></div>
|
||||
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="row col-12 q-pa-sm">
|
||||
<q-space />
|
||||
<q-btn
|
||||
|
|
@ -604,7 +596,7 @@ function updatemodalPersonal(modal: boolean) {
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<PopupPersonal
|
||||
:modal="modalPersonal"
|
||||
:id="personId"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import type {
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
|
|
@ -201,8 +201,7 @@ async function searchInput() {
|
|||
|
||||
rows.value = list;
|
||||
})
|
||||
.catch((err) => {
|
||||
})
|
||||
.catch((err) => {})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
|
|
@ -240,7 +239,7 @@ function updatemodalPersonal(modal: boolean) {
|
|||
* เมื่อมีข้อมูล
|
||||
* เก็บข้อมูลลง formData
|
||||
*/
|
||||
watch(props.data, async () => {
|
||||
watch(props.data, async () => {
|
||||
formData.prefix = props.data.prefix;
|
||||
formData.firstname = props.data.firstname;
|
||||
formData.lastname = props.data.lastname;
|
||||
|
|
@ -283,16 +282,16 @@ function updatemodalPersonal(modal: boolean) {
|
|||
label="คำค้น"
|
||||
:rules="[(val) => !!val || `กรุณากรอกคำค้น`]"
|
||||
>
|
||||
<template v-slot:after>
|
||||
<q-btn
|
||||
color="primary"
|
||||
icon="search"
|
||||
label="ค้นหา"
|
||||
class="full-width q-py-sm q-px-md"
|
||||
@click="searchInput()"
|
||||
>
|
||||
</q-btn>
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<q-btn
|
||||
color="primary"
|
||||
icon="search"
|
||||
label="ค้นหา"
|
||||
class="full-width q-py-sm q-px-md"
|
||||
@click="searchInput()"
|
||||
>
|
||||
</q-btn>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,10 @@ import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/Suspend
|
|||
/**Import type */
|
||||
import type { QForm } from "quasar";
|
||||
import type { dataDetail } from "@/modules/11_discipline/interface/response/suspend";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
import CardProfile from "@/components/CardProfile.vue";
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
|
|
@ -38,6 +41,7 @@ const {
|
|||
const myForm = ref<QForm | null>(null);
|
||||
const roleAdmin = ref<boolean>(false);
|
||||
const edit = ref<boolean>(false);
|
||||
const dataProfile = ref<DataProfile>();
|
||||
|
||||
const data = reactive<dataDetail>({
|
||||
id: "",
|
||||
|
|
@ -70,6 +74,8 @@ async function getData() {
|
|||
.get(config.API.suspendById(dataId))
|
||||
.then((res) => {
|
||||
const dataGet = res.data.result;
|
||||
dataProfile.value = dataGet as DataProfile;
|
||||
|
||||
data.id = dataGet.id;
|
||||
data.personId = dataGet.personId;
|
||||
data.citizenId = dataGet.citizenId;
|
||||
|
|
@ -231,7 +237,8 @@ onMounted(async () => {
|
|||
/>
|
||||
รายละเอียดการของ {{ data.name }}
|
||||
</div>
|
||||
<q-card bordered class="row col-12 text-dark">
|
||||
|
||||
<!-- <q-card bordered class="row col-12 text-dark">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
<div class="q-pl-sm text-weight-bold text-subtitle2">
|
||||
{{ data.name }}
|
||||
|
|
@ -283,7 +290,9 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-card> -->
|
||||
|
||||
<CardProfile :data="dataProfile as DataProfile" />
|
||||
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue