แก้วินัย
This commit is contained in:
parent
dfbf639272
commit
cf6d9fec29
7 changed files with 60 additions and 39 deletions
|
|
@ -398,7 +398,7 @@ watch(
|
||||||
:modal="modalPopup"
|
:modal="modalPopup"
|
||||||
:close="closePopup"
|
:close="closePopup"
|
||||||
title="ส่งไปสอบสวน"
|
title="ส่งไปสอบสวน"
|
||||||
:rows="mainStore.rowsAdd"
|
:rows="mainStore.rowsAdd.filter((item:any)=> item.isSend === false )"
|
||||||
:columns="mainStore.columnsDirector"
|
:columns="mainStore.columnsDirector"
|
||||||
:visibleColumns="mainStore.visibleColumnsDirector"
|
:visibleColumns="mainStore.visibleColumnsDirector"
|
||||||
@return-person="emitPerson"
|
@return-person="emitPerson"
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,7 @@ import type {
|
||||||
MyObjectInvestigateRef,
|
MyObjectInvestigateRef,
|
||||||
} from "@/modules/11_discipline/interface/request/investigateFact";
|
} from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
|
|
||||||
import type {
|
import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
|
||||||
ArrayPersonAdd
|
|
||||||
} from '@/modules/11_discipline/interface/response/investigate'
|
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
|
|
@ -275,8 +273,10 @@ watch(props.data, async () => {
|
||||||
formData.investigationExtendHistory = props.data.investigationExtendHistory;
|
formData.investigationExtendHistory = props.data.investigationExtendHistory;
|
||||||
|
|
||||||
mainStore.rowsAdd = props.data.persons;
|
mainStore.rowsAdd = props.data.persons;
|
||||||
mainStore.rowsCheck = mainStore.rowsAdd.filter((item:any)=> item.isSend === false )
|
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
||||||
console.log(mainStore.rowsCheck)
|
(item: any) => item.isSend === false
|
||||||
|
);
|
||||||
|
|
||||||
const dataMap = props.data.directors.map((item: any) => ({
|
const dataMap = props.data.directors.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||||
|
|
@ -518,16 +518,21 @@ function inputEditExtend(val: boolean) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openModal(){
|
function openModal() {
|
||||||
modalPopup.value = true
|
modalPopup.value = true;
|
||||||
}
|
}
|
||||||
function closePopup() {
|
function closePopup() {
|
||||||
modalPopup.value = false;
|
modalPopup.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fetchData() {
|
||||||
|
setTimeout(() => {
|
||||||
|
props.getData();
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
|
||||||
function emitPerson(data: FormData[]) {
|
function emitPerson(data: FormData[]) {
|
||||||
const dataMapId = data.map((item: FormData) => item.id);
|
const dataMapId = data.map((item: FormData) => item.id);
|
||||||
console.log(dataMapId);
|
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.post(config.API.investigateReport(), {
|
.post(config.API.investigateReport(), {
|
||||||
|
|
@ -1514,6 +1519,7 @@ onMounted(async () => {
|
||||||
:visibleColumns="mainStore.visibleColumnsDirector"
|
:visibleColumns="mainStore.visibleColumnsDirector"
|
||||||
@return-person="emitPerson"
|
@return-person="emitPerson"
|
||||||
:checked-val="false"
|
:checked-val="false"
|
||||||
|
:fetch-data="fetchData"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ async function onSubmit(id: string) {
|
||||||
|
|
||||||
/** ยืนยัน ส่งไปออกคำสั่ง */
|
/** ยืนยัน ส่งไปออกคำสั่ง */
|
||||||
async function sentIssue() {
|
async function sentIssue() {
|
||||||
respondentRows.value = await store.rowSent.filter((x) => x.report === false); //x.report === false
|
respondentRows.value = await store.rowSent.filter((x) => x.report === false && x.isSend === false); //x.report === false
|
||||||
modalPopup.value = true;
|
modalPopup.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -341,13 +341,13 @@ function emitPerson(data: PersonsArray[]) {
|
||||||
persons: dataMapId,
|
persons: dataMapId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
success($q, "ส่งไปพักราชการสำเร็จ");
|
||||||
// router.push(`/discipline/investigatefacts`);
|
// router.push(`/discipline/investigatefacts`);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
success($q, "ส่งไปพักราชการสำเร็จ");
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
fetchDetailDisciplinary();
|
fetchDetailDisciplinary();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import type {
|
||||||
FormData,
|
FormData,
|
||||||
DisciplinaryRef,
|
DisciplinaryRef,
|
||||||
Director,
|
Director,
|
||||||
PersonsArray
|
PersonsArray,
|
||||||
} from "@/modules/11_discipline/interface/request/disciplinary";
|
} from "@/modules/11_discipline/interface/request/disciplinary";
|
||||||
import type {
|
import type {
|
||||||
DataOption,
|
DataOption,
|
||||||
|
|
@ -302,7 +302,9 @@ async function fetchDatadetail() {
|
||||||
formData.disciplinaryExtendHistory = props.data.disciplinaryExtendHistory;
|
formData.disciplinaryExtendHistory = props.data.disciplinaryExtendHistory;
|
||||||
|
|
||||||
mainStore.rowsAdd = props.data.persons;
|
mainStore.rowsAdd = props.data.persons;
|
||||||
mainStore.rowsCheck = mainStore.rowsAdd.filter((item:any)=> item.isSend === false )
|
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
||||||
|
(item: any) => item.isSend === false
|
||||||
|
);
|
||||||
/** MAP รายชื่อกรรมการ หน้าหลัก */
|
/** MAP รายชื่อกรรมการ หน้าหลัก */
|
||||||
const dataMap = props.data.director.map((item: any) => ({
|
const dataMap = props.data.director.map((item: any) => ({
|
||||||
id: item.directorId,
|
id: item.directorId,
|
||||||
|
|
@ -491,13 +493,19 @@ function inputEditExtend(val: boolean) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openModal(){
|
function openModal() {
|
||||||
modalPopup.value = true
|
modalPopup.value = true;
|
||||||
}
|
}
|
||||||
function closePopup() {
|
function closePopup() {
|
||||||
modalPopup.value = false;
|
modalPopup.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fetchDataList() {
|
||||||
|
setTimeout(() => {
|
||||||
|
props.fetchData();
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
|
||||||
function emitPerson(data: PersonsArray[]) {
|
function emitPerson(data: PersonsArray[]) {
|
||||||
const dataMapId = data.map((item: PersonsArray) => item.id);
|
const dataMapId = data.map((item: PersonsArray) => item.id);
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -545,7 +553,7 @@ onMounted(async () => {
|
||||||
<div class="row col-12 q-col-gutter-x-md">
|
<div class="row col-12 q-col-gutter-x-md">
|
||||||
<div class="col-xs-12 col-sm-3">
|
<div class="col-xs-12 col-sm-3">
|
||||||
<q-select
|
<q-select
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
for="SelectrespondentType"
|
for="SelectrespondentType"
|
||||||
v-model="formData.respondentType"
|
v-model="formData.respondentType"
|
||||||
|
|
@ -579,7 +587,7 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="col-xs-12 col-sm-3"
|
class="col-xs-12 col-sm-3"
|
||||||
v-if="formData.respondentType === 'ORGANIZATION'"
|
v-if="formData.respondentType === 'ORGANIZATION'"
|
||||||
|
|
@ -915,13 +923,12 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="q-pa-sm">
|
<div class="q-pa-sm">
|
||||||
|
|
||||||
<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="extendStatus" class="col-3">
|
<div v-if="extendStatus" class="col-3">
|
||||||
<q-select
|
<q-select
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
for="#daysExtend"
|
for="#daysExtend"
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -1409,7 +1416,7 @@ onMounted(async () => {
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
|
|
@ -1464,7 +1471,7 @@ onMounted(async () => {
|
||||||
<div class="row col-12 q-col-gutter-md">
|
<div class="row col-12 q-col-gutter-md">
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<q-select
|
<q-select
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
for="#fault"
|
for="#fault"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -1503,7 +1510,7 @@ onMounted(async () => {
|
||||||
class="col-3"
|
class="col-3"
|
||||||
>
|
>
|
||||||
<q-select
|
<q-select
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
for="#fault"
|
for="#fault"
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -1535,7 +1542,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<q-input
|
<q-input
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
class="full-width cursor-pointer"
|
class="full-width cursor-pointer"
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -1668,8 +1675,8 @@ onMounted(async () => {
|
||||||
:visibleColumns="mainStore.visibleColumnsDirector"
|
:visibleColumns="mainStore.visibleColumnsDirector"
|
||||||
@return-person="emitPerson"
|
@return-person="emitPerson"
|
||||||
:checked-val="false"
|
:checked-val="false"
|
||||||
|
:fetch-data="fetchDataList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => "",
|
default: () => "",
|
||||||
},
|
},
|
||||||
|
fetchData: {
|
||||||
|
type: Function,
|
||||||
|
default: () => console.log("function fetchData"),
|
||||||
|
},
|
||||||
rows: {
|
rows: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: [],
|
default: [],
|
||||||
|
|
@ -66,7 +70,8 @@ function onclickSend() {
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
// success($q, `ส่งข้อมูล${props.title}สำเร็จ`);
|
// success($q, `ส่งข้อมูล${props.title}สำเร็จ`);
|
||||||
emit("returnPerson", selected.value);
|
await emit("returnPerson", selected.value);
|
||||||
|
props.fetchData();
|
||||||
props.close?.();
|
props.close?.();
|
||||||
},
|
},
|
||||||
`ยืนยันการ${props.title}`,
|
`ยืนยันการ${props.title}`,
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,9 @@ function downloadFile(link: string) {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div v-if="!isReadonly" class="row">
|
<div v-if="!isReadonly" class="row">
|
||||||
<div class="col-11 q-pa-sm">
|
<div class="col-12 q-pa-sm row">
|
||||||
<q-file
|
<q-file
|
||||||
|
class="col-11"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
ref="fileRef"
|
ref="fileRef"
|
||||||
|
|
@ -129,19 +130,20 @@ function downloadFile(link: string) {
|
||||||
<q-icon name="attach_file" />
|
<q-icon name="attach_file" />
|
||||||
</template>
|
</template>
|
||||||
</q-file>
|
</q-file>
|
||||||
</div>
|
|
||||||
<div class="col-1 self-center text-center">
|
<div class="col-1 self-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="file"
|
v-if="file"
|
||||||
size="14px"
|
size="14px"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
color="add"
|
color="add"
|
||||||
icon="mdi-upload"
|
icon="mdi-upload"
|
||||||
@click="uploadFile()"
|
@click="uploadFile()"
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ interface Persons {
|
||||||
organization: string; //สังกัด
|
organization: string; //สังกัด
|
||||||
name: string;
|
name: string;
|
||||||
report?: boolean;
|
report?: boolean;
|
||||||
|
isSend?: boolean;
|
||||||
}
|
}
|
||||||
interface PersonsArray {
|
interface PersonsArray {
|
||||||
id: string; //id อ้างอิง profile
|
id: string; //id อ้างอิง profile
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue