แก้ กรรมการ
This commit is contained in:
parent
40e787af89
commit
72a1171b8f
6 changed files with 186 additions and 144 deletions
|
|
@ -54,6 +54,7 @@ const type = ref<string>("");
|
||||||
const modalEditDirector = ref<boolean>(false);
|
const modalEditDirector = ref<boolean>(false);
|
||||||
const editDirectorId = ref<string>();
|
const editDirectorId = ref<string>();
|
||||||
const dutyVal = ref<string>();
|
const dutyVal = ref<string>();
|
||||||
|
const commandNoVal = ref<string>();
|
||||||
|
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const isUpdate = ref<boolean>(false);
|
const isUpdate = ref<boolean>(false);
|
||||||
|
|
@ -128,7 +129,7 @@ const formData = reactive<FormData>({
|
||||||
organizationId: "",
|
organizationId: "",
|
||||||
persons: [],
|
persons: [],
|
||||||
investigationExtendHistory: [],
|
investigationExtendHistory: [],
|
||||||
isDisciplinary:false
|
isDisciplinary: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
||||||
|
|
@ -293,20 +294,21 @@ watch(props.data, async () => {
|
||||||
|
|
||||||
mainStore.rowsAdd = props.data.persons;
|
mainStore.rowsAdd = props.data.persons;
|
||||||
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
||||||
(item: any) => item.isDisciplinary === false && item.isSend === 'NEW'
|
(item: any) => item.isDisciplinary === false && item.isSend === "NEW"
|
||||||
);
|
);
|
||||||
|
|
||||||
const dataMap = props.data.directors.map((item: any) => ({
|
const dataMap = props.data.directors.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id ? item.id:'-',
|
||||||
directorId: item.directorId,
|
directorId: item.directorId ? item.directorId:'-',
|
||||||
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||||
prefix: item.prefix,
|
prefix: item.prefix ? item.prefix:'-',
|
||||||
firstName: item.firstName,
|
firstName: item.firstName ? item.firstName:'-',
|
||||||
lastName: item.lastName,
|
lastName: item.lastName ? item.lastName:'-',
|
||||||
position: item.position,
|
position: item.position ? item.position:'-',
|
||||||
email: item.email,
|
email: item.email ? item.email:'-',
|
||||||
phone: item.phone,
|
phone: item.phone ? item.phone:'-',
|
||||||
duty: item.duty,
|
commandNo: item.commandNo ? item.commandNo:'-',
|
||||||
|
duty: item.duty ? item.duty:'-',
|
||||||
check: "props",
|
check: "props",
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
@ -571,20 +573,24 @@ function emitPerson(data: FormData[]) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function openEditDirector(id: string, duty: string) {
|
function openEditDirector(data: any) {
|
||||||
editDirectorId.value = id;
|
editDirectorId.value = data.directorId;
|
||||||
modalEditDirector.value = true;
|
modalEditDirector.value = true;
|
||||||
dutyVal.value = duty;
|
dutyVal.value = data.duty;
|
||||||
|
commandNoVal.value = data.commandNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeEditDirector() {
|
function closeEditDirector() {
|
||||||
modalEditDirector.value = false;
|
modalEditDirector.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveDuty(id: string, duty: string) {
|
async function saveDuty(id: string, duty: string, resolution: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.investigateEditDuty(formData.id, id), { duty: duty })
|
.put(config.API.investigateEditDuty(formData.id, id), {
|
||||||
|
duty: duty,
|
||||||
|
commandNo: resolution,
|
||||||
|
})
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
success($q, "บันทึกสำเร็จ");
|
success($q, "บันทึกสำเร็จ");
|
||||||
closeEditDirector();
|
closeEditDirector();
|
||||||
|
|
@ -680,7 +686,10 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="col-xs-12 col-sm-4"
|
class="col-xs-12 col-sm-4"
|
||||||
v-if="route.name === 'disciplineInvestigatefactsEdit' && mainStore.rowsCheck.length >0"
|
v-if="
|
||||||
|
route.name === 'disciplineInvestigatefactsEdit' &&
|
||||||
|
mainStore.rowsCheck.length > 0
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
class="q-pa-sm"
|
class="q-pa-sm"
|
||||||
|
|
@ -1143,24 +1152,11 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="blue"
|
color="blue"
|
||||||
@click="
|
@click="openEditDirector(props.row)"
|
||||||
openEditDirector(
|
|
||||||
props.row.directorId,
|
|
||||||
props.row.duty
|
|
||||||
)
|
|
||||||
"
|
|
||||||
icon="mdi-pencil-outline"
|
icon="mdi-pencil-outline"
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไข</q-tooltip>
|
<q-tooltip>แก้ไข</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<DialogDuty
|
|
||||||
:modal="modalEditDirector"
|
|
||||||
:close-popup="closeEditDirector"
|
|
||||||
:id="editDirectorId"
|
|
||||||
:duty="dutyVal"
|
|
||||||
:save="saveDuty"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!isReadonly"
|
v-if="!isReadonly"
|
||||||
dense
|
dense
|
||||||
|
|
@ -1212,87 +1208,82 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
||||||
|
<div class="row col-12 q-col-gutter-sm q-pa-sm">
|
||||||
<div class="row col-12 q-col-gutter-sm q-pa-sm">
|
<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
|
:readonly="isReadonly"
|
||||||
:readonly="isReadonly"
|
ref="investigationStatusResultRef"
|
||||||
ref="investigationStatusResultRef"
|
v-model="formData.investigationStatusResult"
|
||||||
v-model="formData.investigationStatusResult"
|
:options="mainStore.statusResultOptions"
|
||||||
:options="mainStore.statusResultOptions"
|
label="ผลการสืบสวน"
|
||||||
label="ผลการสืบสวน"
|
emit-value
|
||||||
emit-value
|
map-options
|
||||||
map-options
|
option-label="name"
|
||||||
option-label="name"
|
option-value="id"
|
||||||
option-value="id"
|
use-input
|
||||||
use-input
|
@filter="(inputValue: any,
|
||||||
@filter="(inputValue: any,
|
|
||||||
doneFn: Function) => filterFnOptionsType(inputValue, doneFn, 'faultOp'
|
doneFn: Function) => filterFnOptionsType(inputValue, doneFn, 'faultOp'
|
||||||
)"
|
)"
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
><template v-slot:no-option>
|
><template v-slot:no-option>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section class="text-grey">
|
<q-item-section class="text-grey">
|
||||||
ไม่มีข้อมูล
|
ไม่มีข้อมูล
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</template>
|
</template>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
v-if="
|
|
||||||
formData.investigationStatusResult == 'HAVE_CAUSE'
|
|
||||||
"
|
|
||||||
class="col-3"
|
|
||||||
>
|
|
||||||
<q-select
|
|
||||||
:class="inputEdit(isReadonly)"
|
|
||||||
:readonly="isReadonly"
|
|
||||||
for="#fault"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
ref="investigationCauseTextRef"
|
|
||||||
v-model="formData.investigationCauseText"
|
|
||||||
:options="mainStore.causeTextOptions"
|
|
||||||
label="ร้ายแรง/ไม่ร้ายแรง"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
use-input
|
|
||||||
@update:model-value="changeFormData()"
|
|
||||||
><template v-slot:no-option>
|
|
||||||
<q-item>
|
|
||||||
<q-item-section class="text-grey">
|
|
||||||
ไม่มีข้อมูล
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</template>
|
|
||||||
</q-select>
|
|
||||||
</div>
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
:class="inputEdit(isReadonly)"
|
|
||||||
outlined
|
|
||||||
ref="resultRef"
|
|
||||||
:readonly="isReadonly"
|
|
||||||
dense
|
|
||||||
borderless
|
|
||||||
v-model="formData.result"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'เหตุผล'}`"
|
|
||||||
type="textarea"
|
|
||||||
@update:model-value="changeFormData()"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="formData.investigationStatusResult == 'HAVE_CAUSE'"
|
||||||
|
class="col-3"
|
||||||
|
>
|
||||||
|
<q-select
|
||||||
|
:class="inputEdit(isReadonly)"
|
||||||
|
:readonly="isReadonly"
|
||||||
|
for="#fault"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
ref="investigationCauseTextRef"
|
||||||
|
v-model="formData.investigationCauseText"
|
||||||
|
:options="mainStore.causeTextOptions"
|
||||||
|
label="ร้ายแรง/ไม่ร้ายแรง"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
use-input
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
|
><template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey">
|
||||||
|
ไม่มีข้อมูล
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
:class="inputEdit(isReadonly)"
|
||||||
|
outlined
|
||||||
|
ref="resultRef"
|
||||||
|
:readonly="isReadonly"
|
||||||
|
dense
|
||||||
|
borderless
|
||||||
|
v-model="formData.result"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'เหตุผล'}`"
|
||||||
|
type="textarea"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -1504,6 +1495,15 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<DialogDuty
|
||||||
|
:modal="modalEditDirector"
|
||||||
|
:close-popup="closeEditDirector"
|
||||||
|
:id="editDirectorId"
|
||||||
|
:duty="dutyVal"
|
||||||
|
:command="commandNoVal"
|
||||||
|
:save="saveDuty"
|
||||||
|
/>
|
||||||
|
|
||||||
<DialogAddPersonal
|
<DialogAddPersonal
|
||||||
title="ผู้ถูกร้องเรียน"
|
title="ผู้ถูกร้องเรียน"
|
||||||
:modal="modalPerson"
|
:modal="modalPerson"
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ const status = ref<string>("");
|
||||||
|
|
||||||
const idInvestigate = ref<string>("");
|
const idInvestigate = ref<string>("");
|
||||||
const idComplaint = ref<string>("");
|
const idComplaint = ref<string>("");
|
||||||
const respondentRows = ref<Persons[]>();
|
const respondentRows = ref<Persons[]>([]);
|
||||||
const personObjComplaint = reactive<ArrayPerson>({
|
const personObjComplaint = reactive<ArrayPerson>({
|
||||||
id: "",
|
id: "",
|
||||||
personId: "",
|
personId: "",
|
||||||
|
|
@ -117,6 +117,7 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||||
organizationId: "",
|
organizationId: "",
|
||||||
persons: [],
|
persons: [],
|
||||||
investigationExtendHistory: [],
|
investigationExtendHistory: [],
|
||||||
|
isDisciplinary: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** function fetchData สอบสวนความผิดทางวินัย*/
|
/** function fetchData สอบสวนความผิดทางวินัย*/
|
||||||
|
|
@ -251,7 +252,9 @@ async function onSubmit(id: string) {
|
||||||
|
|
||||||
/** ยืนยัน ส่งไปออกคำสั่ง */
|
/** ยืนยัน ส่งไปออกคำสั่ง */
|
||||||
async function sentIssue() {
|
async function sentIssue() {
|
||||||
respondentRows.value = await store.rowSent.filter((x) => x.isSuspend === 'NEW' && x.isSend === 'NEW');
|
respondentRows.value = await store.rowSent.filter(
|
||||||
|
(x) => x.isSuspend === "NEW" && x.isSend === "NEW"
|
||||||
|
);
|
||||||
modalPopup.value = true;
|
modalPopup.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -381,7 +384,6 @@ onMounted(async () => {
|
||||||
<template>
|
<template>
|
||||||
<div class="col-xs-12 col-sm-12 col-md-11">
|
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||||
<div class="toptitle col-12 row items-center">
|
<div class="toptitle col-12 row items-center">
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
icon="mdi-arrow-left"
|
icon="mdi-arrow-left"
|
||||||
unelevated
|
unelevated
|
||||||
|
|
@ -394,7 +396,6 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
<div class="q-ma-none">แก้ไขการสอบสวนความผิดทางวินัย</div>
|
<div class="q-ma-none">แก้ไขการสอบสวนความผิดทางวินัย</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<div class="q-gutter-x-sm">
|
<div class="q-gutter-x-sm">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="status === 'NEW'"
|
v-if="status === 'NEW'"
|
||||||
|
|
@ -452,7 +453,7 @@ onMounted(async () => {
|
||||||
:data="dataInvestigatefacts"
|
:data="dataInvestigatefacts"
|
||||||
/>
|
/>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
|
|
||||||
<q-tab-panel name="disciplinary">
|
<q-tab-panel name="disciplinary">
|
||||||
<FormDisciplinary
|
<FormDisciplinary
|
||||||
:on-submit="onSubmit"
|
:on-submit="onSubmit"
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ const listDirector = ref<any>([]);
|
||||||
const modalEditDirector = ref<boolean>(false);
|
const modalEditDirector = ref<boolean>(false);
|
||||||
const editDirectorId = ref<string>();
|
const editDirectorId = ref<string>();
|
||||||
const dutyVal = ref<string>();
|
const dutyVal = ref<string>();
|
||||||
|
const commandNoVal = ref<string>();
|
||||||
|
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const isUpdate = ref<boolean>(false);
|
const isUpdate = ref<boolean>(false);
|
||||||
|
|
@ -327,16 +328,17 @@ async function fetchDatadetail() {
|
||||||
);
|
);
|
||||||
/** MAP รายชื่อกรรมการ หน้าหลัก */
|
/** MAP รายชื่อกรรมการ หน้าหลัก */
|
||||||
const dataMap = props.data.director.map((item: any) => ({
|
const dataMap = props.data.director.map((item: any) => ({
|
||||||
idRaw: item.id,
|
idRaw: item.id ? item.id:'-',
|
||||||
id: item.directorId,
|
id: item.directorId ? item.directorId:'-',
|
||||||
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||||
prefix: item.prefix,
|
prefix: item.prefix ? item.prefix:'-',
|
||||||
firstName: item.firstName,
|
firstName: item.firstName ? item.firstName:'-',
|
||||||
lastName: item.lastName,
|
lastName: item.lastName ? item.lastName:'-',
|
||||||
position: item.position,
|
position: item.position ? item.position:'-',
|
||||||
email: item.email,
|
email: item.email ? item.email:'-',
|
||||||
phone: item.phone,
|
phone: item.phone ? item.phone:'-',
|
||||||
duty: item.duty,
|
duty: item.duty ? item.duty:'-',
|
||||||
|
commandNo: item.commandNo ? item.commandNo:'-',
|
||||||
check: "props",
|
check: "props",
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
@ -537,20 +539,42 @@ function emitPerson(data: PersonsArray[]) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function openEditDirector(idVal: string, duty: string) {
|
function openEditDirector(data: any) {
|
||||||
editDirectorId.value = idVal;
|
console.log(data)
|
||||||
|
editDirectorId.value = data.idRaw;
|
||||||
modalEditDirector.value = true;
|
modalEditDirector.value = true;
|
||||||
dutyVal.value = duty;
|
dutyVal.value = data.duty;
|
||||||
|
commandNoVal.value = data.commandNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeEditDirector() {
|
function closeEditDirector() {
|
||||||
modalEditDirector.value = false;
|
modalEditDirector.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveDuty(id: string, duty: string) {
|
// async function saveDuty(id: string, duty: string) {
|
||||||
|
// showLoader();
|
||||||
|
// await http
|
||||||
|
// .put(config.API.disciplinaryEditDuty(props.data.id, id), { duty: duty })
|
||||||
|
// .then((res: any) => {
|
||||||
|
// success($q, "บันทึกสำเร็จ");
|
||||||
|
// closeEditDirector();
|
||||||
|
// })
|
||||||
|
// .catch((e) => {
|
||||||
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(async () => {
|
||||||
|
// props.fetchData();
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
async function saveDuty(id: string, duty: string, resolution: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.disciplinaryEditDuty(props.data.id, id), { duty: duty })
|
.put(config.API.disciplinaryEditDuty(props.data.id, id), {
|
||||||
|
duty: duty,
|
||||||
|
commandNo: resolution,
|
||||||
|
})
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
success($q, "บันทึกสำเร็จ");
|
success($q, "บันทึกสำเร็จ");
|
||||||
closeEditDirector();
|
closeEditDirector();
|
||||||
|
|
@ -687,7 +711,8 @@ onMounted(async () => {
|
||||||
v-if="
|
v-if="
|
||||||
route.name === 'disciplineDisciplinaryEdit' &&
|
route.name === 'disciplineDisciplinaryEdit' &&
|
||||||
props.data &&
|
props.data &&
|
||||||
props.data.status === 'NEW'
|
props.data.status === 'NEW' &&
|
||||||
|
mainStore.rowsCheck.length > 0
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -1328,23 +1353,11 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="blue"
|
color="blue"
|
||||||
@click="
|
@click="openEditDirector(props.row)"
|
||||||
openEditDirector(
|
|
||||||
props.row.idRaw,
|
|
||||||
props.row.duty
|
|
||||||
)
|
|
||||||
"
|
|
||||||
icon="mdi-pencil-outline"
|
icon="mdi-pencil-outline"
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไข</q-tooltip>
|
<q-tooltip>แก้ไข</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<DialogDuty
|
|
||||||
:modal="modalEditDirector"
|
|
||||||
:close-popup="closeEditDirector"
|
|
||||||
:id="editDirectorId"
|
|
||||||
:duty="dutyVal"
|
|
||||||
:save="saveDuty"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!isReadonly"
|
v-if="!isReadonly"
|
||||||
|
|
@ -1711,6 +1724,15 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<DialogDuty
|
||||||
|
:modal="modalEditDirector"
|
||||||
|
:close-popup="closeEditDirector"
|
||||||
|
:id="editDirectorId"
|
||||||
|
:duty="dutyVal"
|
||||||
|
:command="commandNoVal"
|
||||||
|
:save="saveDuty"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- Popup ผู้ถูกร้องเรียน -->
|
<!-- Popup ผู้ถูกร้องเรียน -->
|
||||||
<DialogAddPersonal
|
<DialogAddPersonal
|
||||||
title="ผู้ถูกร้องเรียน"
|
title="ผู้ถูกร้องเรียน"
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import http from "@/plugins/http";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
||||||
const listCheck = ref<number>();
|
const listCheck = ref<number|null>();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modal: Boolean,
|
modal: Boolean,
|
||||||
|
|
@ -46,6 +46,9 @@ function clickList(index: number, data: any) {
|
||||||
|
|
||||||
watch(props, () => {
|
watch(props, () => {
|
||||||
if (props) {
|
if (props) {
|
||||||
|
listCheck.value = null
|
||||||
|
listInvestigateDetail.value = []
|
||||||
|
dataList.value = []
|
||||||
const data: DirectorRowsResponse = props.dataList as DirectorRowsResponse;
|
const data: DirectorRowsResponse = props.dataList as DirectorRowsResponse;
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,10 @@ const props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
command: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
resolution: {
|
resolution: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
|
|
@ -48,8 +52,9 @@ async function submit(){
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
await props.save(props.id, duty.value);
|
await props.save(props.id, duty.value,resolution.value);
|
||||||
duty.value = "";
|
duty.value = "";
|
||||||
|
resolution.value = "";
|
||||||
},
|
},
|
||||||
"ยืนยันการบันทึกข้อมูล",
|
"ยืนยันการบันทึกข้อมูล",
|
||||||
"ต้องการยืนยันการบันทึกข้อมูลหรือไม่?"
|
"ต้องการยืนยันการบันทึกข้อมูลหรือไม่?"
|
||||||
|
|
@ -60,8 +65,9 @@ async function submit(){
|
||||||
};
|
};
|
||||||
|
|
||||||
watch(props, () => {
|
watch(props, () => {
|
||||||
|
console.log(props.command)
|
||||||
duty.value = props?.duty;
|
duty.value = props?.duty;
|
||||||
resolution.value = props?.resolution;
|
resolution.value = props?.command;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -176,6 +176,7 @@ export const useInvestigateDisStore = defineStore(
|
||||||
"name",
|
"name",
|
||||||
"position",
|
"position",
|
||||||
"duty",
|
"duty",
|
||||||
|
"commandNo",
|
||||||
"email",
|
"email",
|
||||||
"phone",
|
"phone",
|
||||||
"total",
|
"total",
|
||||||
|
|
@ -217,6 +218,15 @@ export const useInvestigateDisStore = defineStore(
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "commandNo",
|
||||||
|
align: "left",
|
||||||
|
label: "มติ",
|
||||||
|
sortable: true,
|
||||||
|
field: "commandNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "email",
|
name: "email",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue