แก้ วินัย

This commit is contained in:
setthawutttty 2025-07-08 10:44:23 +07:00
parent e9b6e34f38
commit 8eecf62c90
5 changed files with 7 additions and 7 deletions

View file

@ -20,7 +20,9 @@ async function onSubmit(data: any) {
.post(config.API.complaintAdd(), data) .post(config.API.complaintAdd(), data)
.then((res) => { .then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ"); success($q, "บันทึกข้อมูลสำเร็จ");
router.push(`/discipline/complaints/${res.data.result}`); setTimeout(() => {
router.push(`/discipline/complaints/${res.data.result}`);
}, 1200);
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);

View file

@ -381,10 +381,10 @@ watch(props.data, async () => {
onMounted(async () => { onMounted(async () => {
mainStore.rowsAdd = []; mainStore.rowsAdd = [];
try { try {
showLoader(); route.name == "disciplineComplaintsAdd" && showLoader();
await Promise.all([getActive(), getListChannel()]); await Promise.all([getActive(), getListChannel()]);
} finally { } finally {
hideLoader(); route.name == "disciplineComplaintsAdd" && hideLoader();
} }
}); });
</script> </script>

View file

@ -1029,7 +1029,7 @@ onMounted(async () => {
class="text-center" class="text-center"
> >
<q-btn <q-btn
v-if="props.row.disciplineRejectDoc.length > 0" v-if="props.row.disciplineRejectDoc && props.row.disciplineRejectDoc.length > 0"
flat flat
round round
dense dense

View file

@ -262,7 +262,6 @@ function updateLevel(val: string) {
const listData: any = posTypeMainOp.value.find( const listData: any = posTypeMainOp.value.find(
(item: PosType) => item.id == val (item: PosType) => item.id == val
); );
console.log(listData);
if (employeeClass.value === "officer") { if (employeeClass.value === "officer") {
posLevelMainOp.value = listData ? listData.posLevels : []; posLevelMainOp.value = listData ? listData.posLevels : [];
} else { } else {

View file

@ -3,7 +3,7 @@ import { defineStore } from "pinia";
import type { QTableProps } from "quasar"; import type { QTableProps } from "quasar";
import type { DataOption } from "@/modules/11_discipline/interface/index/Main"; import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
import type { FaultTypeOption } from "@/modules/11_discipline/interface/request/Result"; import type { FaultTypeOption } from "@/modules/11_discipline/interface/request/result";
import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate"; import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
export const useDisciplineMainStore = defineStore("disciplineMainStore", () => { export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
@ -736,7 +736,6 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
* @param data * @param data
*/ */
async function fetchData(data: ArrayPersonAdd[], type?: string) { async function fetchData(data: ArrayPersonAdd[], type?: string) {
console.log("🚀 ~ fetchData ~ data:", data);
const dataList: any = data.map((item: any) => ({ const dataList: any = data.map((item: any) => ({
profileType: item.profileType profileType: item.profileType
? item.profileType ? item.profileType