แก้วินัย

This commit is contained in:
setthawutttty 2025-04-21 16:29:32 +07:00
parent 456cf574f6
commit 91502f6d8b
8 changed files with 80 additions and 9 deletions

View file

@ -554,7 +554,7 @@ onMounted(async () => {
<div class="col-12 row q-pa-sm">
<d-table
ref="table"
:columns="mainStore.columnsRespondent"
:columns="mainStore.columnsRespondent?.filter((item:any)=>item.name !== 'isSend' && item.name !== 'remarkReject')"
:rows="mainStore.rowsAdd"
row-key="idcard"
flat

View file

@ -686,6 +686,8 @@ watch(props.data, async () => {
child3DnaId: person.child3DnaId,
child4DnaId: person.child4DnaId,
citizenId: person.idcard,
remarkReject: person.remarkReject,
disciplineRejectDoc: person.disciplineRejectDoc,
}));
mainStore.rowsAdd = listDataMain;
mainStore.rowsAddCheck = listDataMain;
@ -720,6 +722,9 @@ watch(props.data, async () => {
}
});
function onLoadFile(file: any) {
window.open(file.pathName);
}
watch(
() => formData.investigationDetail,
(newValue, oldValue) => {
@ -963,9 +968,24 @@ onMounted(async () => {
>
<q-tooltip>อมลในทะเบยนประว</q-tooltip>
</q-btn>
<q-btn
v-if="props.row.disciplineRejectDoc.length > 0"
flat
round
dense
color="blue"
icon="mdi-download"
@click="
onLoadFile(props.row.disciplineRejectDoc[0])
"
><q-tooltip
>ไฟลเอกสารทเกยวของกบการยเรอง</q-tooltip
></q-btn
>
<q-btn
v-if="
(!isReadonly &&
props.row.isSend == 'NEW' &&
!checkRoutePermisson &&
props.row.isAncestorDNA === false) ||
!mainStore.rowsAddCheck.some(

View file

@ -917,7 +917,7 @@ onMounted(async () => {
<div class="col-xs-12 q-pa-sm">
<d-table
ref="table"
:columns="mainStore.columnsRespondent"
:columns="mainStore.columnsRespondent?.filter((item:any)=> item.name !== 'isSend' && item.name !== 'remarkReject')"
:rows="mainStore.rowsAdd"
row-key="personId"
flat

View file

@ -62,6 +62,7 @@ const nameFault = ref<string>("");
const modalFault = ref<boolean>(false);
const remark = ref<string>("");
const idRow = ref<string>("");
const checkValue = ref<FaultTypeOption[]>(
JSON.parse(JSON.stringify(mainStore.checkValueFaultT))
);
@ -264,12 +265,20 @@ function updatemodalPersonal(modal: boolean) {
}
function onFault(data: any) {
idRow.value = data.id;
nameFault.value = data.name;
modalFault.value = true;
personalId.value = data.personId;
remark.value = data.remark ?? "";
if (data.offense !== null) {
checkValue.value = JSON.parse(data.offense);
} else {
checkValue.value = JSON.parse(JSON.stringify(mainStore.checkValueFaultT));
}
}
function close() {
idRow.value = "";
modalFault.value = false;
personalId.value = "";
remark.value = "";
@ -279,9 +288,21 @@ function close() {
function onFaultSubmit() {
if (checkValue.value.some((item) => item.value)) {
dialogConfirm($q, () => {
console.log("onFaultSubmit wait API");
close();
props.fetchData();
showLoader();
http
.put(config.API.disciplineFault(idRow.value), {
offense: JSON.stringify(checkValue.value),
remark: remark.value,
})
.then((res) => {
success($q, "ระบุฐานความผิด สำเร็จ");
close();
props.fetchData();
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {});
});
} else {
dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 มาตรา");
@ -413,7 +434,7 @@ watch(
<div class="col-xs-12 q-pa-sm">
<d-table
ref="table"
:columns="mainStore.columnsRespondent"
:columns="mainStore.columnsRespondent?.filter((item:any)=>item.name !== 'isSend' && item.name !== 'remarkReject')"
:rows="mainStore.rowsAdd"
row-key="idcard"
flat

View file

@ -183,7 +183,7 @@ watch(
</div>
<d-table
ref="table"
:columns="props.columns"
:columns="props.columns.filter((item:any)=>item.name !== 'isSend' && item.name !== 'remarkReject')"
:rows="rows"
row-key="personId"
flat

View file

@ -133,6 +133,15 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "remarkReject",
align: "left",
label: "หมายเหตุการยุติ",
sortable: true,
field: "remarkReject",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
/** หัวข้อที่เเสดงในตารางผู้ถูกร้องเรียน */
@ -147,6 +156,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
"salary",
"organization",
"isSend",
"remarkReject",
]);
/** หัวตารางกรรมการ */