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