แก้วินัย
This commit is contained in:
parent
456cf574f6
commit
91502f6d8b
8 changed files with 80 additions and 9 deletions
|
|
@ -127,4 +127,6 @@ export default {
|
||||||
disciplineDisciplinaryByGetId: (id: string,page?:string) => `${discipline}/${page}/${id}`,
|
disciplineDisciplinaryByGetId: (id: string,page?:string) => `${discipline}/${page}/${id}`,
|
||||||
|
|
||||||
disciplineReportByType: (type:string) => `${disciplineReport}/${type}`,
|
disciplineReportByType: (type:string) => `${disciplineReport}/${type}`,
|
||||||
|
|
||||||
|
disciplineFault:(id:string)=>`${disciplineMain}/result/summary/${id}`
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import config from "@/app.config";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
const mainStore = useDisciplineMainStore();
|
const mainStore = useDisciplineMainStore();
|
||||||
|
|
||||||
|
|
@ -14,6 +15,7 @@ const total = ref<number>(0);
|
||||||
const totalList = ref<number>(1);
|
const totalList = ref<number>(1);
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const route = useRoute();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogMessageNotify, showLoader, hideLoader, messageError } = mixin;
|
const { dialogMessageNotify, showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
|
|
@ -190,7 +192,23 @@ async function getSearch() {
|
||||||
child4DnaId: e.child4DnaId,
|
child4DnaId: e.child4DnaId,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
rows.value = list;
|
if (route.name == "disciplineInvestigatefactsEdit") {
|
||||||
|
const idIsSend = mainStore.rowsAdd
|
||||||
|
.filter(
|
||||||
|
(item: any) => item.isSend === "DONE" || item.isAncestorDNA === true
|
||||||
|
)
|
||||||
|
.map((item: any) => item.personId);
|
||||||
|
rows.value = list.filter(
|
||||||
|
(item: any) => !idIsSend.includes(item.personId)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
const idIsSend = mainStore.rowsAdd
|
||||||
|
.filter((item: any) => item.isAncestorDNA === true)
|
||||||
|
.map((item: any) => item.personId);
|
||||||
|
rows.value = list.filter(
|
||||||
|
(item: any) => !idIsSend.includes(item.personId)
|
||||||
|
);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -301,7 +319,7 @@ watch(
|
||||||
<div class="full-width">
|
<div class="full-width">
|
||||||
<d-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="mainStore.columnsRespondent?.filter((item:any)=>item.name !== 'profileType')"
|
:columns="mainStore.columnsRespondent?.filter((item:any)=>item.name !== 'profileType' && item.name !== 'isSend' && item.name !== 'remarkReject')"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
row-key="personId"
|
row-key="personId"
|
||||||
flat
|
flat
|
||||||
|
|
|
||||||
|
|
@ -554,7 +554,7 @@ onMounted(async () => {
|
||||||
<div class="col-12 row q-pa-sm">
|
<div class="col-12 row q-pa-sm">
|
||||||
<d-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="mainStore.columnsRespondent"
|
:columns="mainStore.columnsRespondent?.filter((item:any)=>item.name !== 'isSend' && item.name !== 'remarkReject')"
|
||||||
:rows="mainStore.rowsAdd"
|
:rows="mainStore.rowsAdd"
|
||||||
row-key="idcard"
|
row-key="idcard"
|
||||||
flat
|
flat
|
||||||
|
|
|
||||||
|
|
@ -686,6 +686,8 @@ watch(props.data, async () => {
|
||||||
child3DnaId: person.child3DnaId,
|
child3DnaId: person.child3DnaId,
|
||||||
child4DnaId: person.child4DnaId,
|
child4DnaId: person.child4DnaId,
|
||||||
citizenId: person.idcard,
|
citizenId: person.idcard,
|
||||||
|
remarkReject: person.remarkReject,
|
||||||
|
disciplineRejectDoc: person.disciplineRejectDoc,
|
||||||
}));
|
}));
|
||||||
mainStore.rowsAdd = listDataMain;
|
mainStore.rowsAdd = listDataMain;
|
||||||
mainStore.rowsAddCheck = listDataMain;
|
mainStore.rowsAddCheck = listDataMain;
|
||||||
|
|
@ -720,6 +722,9 @@ watch(props.data, async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function onLoadFile(file: any) {
|
||||||
|
window.open(file.pathName);
|
||||||
|
}
|
||||||
watch(
|
watch(
|
||||||
() => formData.investigationDetail,
|
() => formData.investigationDetail,
|
||||||
(newValue, oldValue) => {
|
(newValue, oldValue) => {
|
||||||
|
|
@ -963,9 +968,24 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||||
</q-btn>
|
</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
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
(!isReadonly &&
|
(!isReadonly &&
|
||||||
|
props.row.isSend == 'NEW' &&
|
||||||
!checkRoutePermisson &&
|
!checkRoutePermisson &&
|
||||||
props.row.isAncestorDNA === false) ||
|
props.row.isAncestorDNA === false) ||
|
||||||
!mainStore.rowsAddCheck.some(
|
!mainStore.rowsAddCheck.some(
|
||||||
|
|
|
||||||
|
|
@ -917,7 +917,7 @@ onMounted(async () => {
|
||||||
<div class="col-xs-12 q-pa-sm">
|
<div class="col-xs-12 q-pa-sm">
|
||||||
<d-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="mainStore.columnsRespondent"
|
:columns="mainStore.columnsRespondent?.filter((item:any)=> item.name !== 'isSend' && item.name !== 'remarkReject')"
|
||||||
:rows="mainStore.rowsAdd"
|
:rows="mainStore.rowsAdd"
|
||||||
row-key="personId"
|
row-key="personId"
|
||||||
flat
|
flat
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ const nameFault = ref<string>("");
|
||||||
const modalFault = ref<boolean>(false);
|
const modalFault = ref<boolean>(false);
|
||||||
const remark = ref<string>("");
|
const remark = ref<string>("");
|
||||||
|
|
||||||
|
const idRow = ref<string>("");
|
||||||
const checkValue = ref<FaultTypeOption[]>(
|
const checkValue = ref<FaultTypeOption[]>(
|
||||||
JSON.parse(JSON.stringify(mainStore.checkValueFaultT))
|
JSON.parse(JSON.stringify(mainStore.checkValueFaultT))
|
||||||
);
|
);
|
||||||
|
|
@ -264,12 +265,20 @@ function updatemodalPersonal(modal: boolean) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFault(data: any) {
|
function onFault(data: any) {
|
||||||
|
idRow.value = data.id;
|
||||||
nameFault.value = data.name;
|
nameFault.value = data.name;
|
||||||
modalFault.value = true;
|
modalFault.value = true;
|
||||||
personalId.value = data.personId;
|
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() {
|
function close() {
|
||||||
|
idRow.value = "";
|
||||||
modalFault.value = false;
|
modalFault.value = false;
|
||||||
personalId.value = "";
|
personalId.value = "";
|
||||||
remark.value = "";
|
remark.value = "";
|
||||||
|
|
@ -279,9 +288,21 @@ function close() {
|
||||||
function onFaultSubmit() {
|
function onFaultSubmit() {
|
||||||
if (checkValue.value.some((item) => item.value)) {
|
if (checkValue.value.some((item) => item.value)) {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
console.log("onFaultSubmit wait API");
|
showLoader();
|
||||||
close();
|
http
|
||||||
props.fetchData();
|
.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 {
|
} else {
|
||||||
dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 มาตรา");
|
dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 มาตรา");
|
||||||
|
|
@ -413,7 +434,7 @@ watch(
|
||||||
<div class="col-xs-12 q-pa-sm">
|
<div class="col-xs-12 q-pa-sm">
|
||||||
<d-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="mainStore.columnsRespondent"
|
:columns="mainStore.columnsRespondent?.filter((item:any)=>item.name !== 'isSend' && item.name !== 'remarkReject')"
|
||||||
:rows="mainStore.rowsAdd"
|
:rows="mainStore.rowsAdd"
|
||||||
row-key="idcard"
|
row-key="idcard"
|
||||||
flat
|
flat
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
<d-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="props.columns"
|
:columns="props.columns.filter((item:any)=>item.name !== 'isSend' && item.name !== 'remarkReject')"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
row-key="personId"
|
row-key="personId"
|
||||||
flat
|
flat
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,15 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "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",
|
"salary",
|
||||||
"organization",
|
"organization",
|
||||||
"isSend",
|
"isSend",
|
||||||
|
"remarkReject",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** หัวตารางกรรมการ */
|
/** หัวตารางกรรมการ */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue