- คำสั่ง เพิ่ม get เรื่องร้องเรียน
- แก้ bug
This commit is contained in:
parent
53cd8e593c
commit
79288c80f5
5 changed files with 111 additions and 20 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import env from "../index";
|
import env from "../index";
|
||||||
const placement = `${env.API_PLACEMENT_URI}/placement`;
|
const placement = `${env.API_PLACEMENT_URI}/placement`;
|
||||||
|
const disciplineReportList = `${env.API_URI}/discipline/complaint/report`;
|
||||||
const orgTree = `${env.API_URI_ORG_TREE}`;
|
const orgTree = `${env.API_URI_ORG_TREE}`;
|
||||||
const order = `${env.API_PLACEMENT_URI}`;
|
const order = `${env.API_PLACEMENT_URI}`;
|
||||||
const receive = `${env.API_PLACEMENT_URI}/placement/Receive`;
|
const receive = `${env.API_PLACEMENT_URI}/placement/Receive`;
|
||||||
|
|
@ -10,7 +11,6 @@ const placemenRelocation = `${placement}/relocation`;
|
||||||
const placemenOther = `${env.API_URI}/retirement/other`;
|
const placemenOther = `${env.API_URI}/retirement/other`;
|
||||||
const placemenAppointment = `${placement}/appointment`;
|
const placemenAppointment = `${placement}/appointment`;
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
MainDetail: (year: number) => `${placement}/exam/${year}`,
|
MainDetail: (year: number) => `${placement}/exam/${year}`,
|
||||||
yearOptions: () => `${placement}/fiscal`,
|
yearOptions: () => `${placement}/fiscal`,
|
||||||
|
|
@ -60,10 +60,10 @@ export default {
|
||||||
// clear Position
|
// clear Position
|
||||||
clearPosition: (personalId: string) =>
|
clearPosition: (personalId: string) =>
|
||||||
`${placement}/position/clear/${personalId}`,
|
`${placement}/position/clear/${personalId}`,
|
||||||
// Document
|
// Document
|
||||||
documentByid: (personalId: string) => `${placement}/doc/${personalId}`,
|
documentByid: (personalId: string) => `${placement}/doc/${personalId}`,
|
||||||
documentDelid: (personalId: string, docid: string) => `${placement}/doc/${personalId}/${docid}`,
|
documentDelid: (personalId: string, docid: string) =>
|
||||||
|
`${placement}/doc/${personalId}/${docid}`,
|
||||||
|
|
||||||
// order
|
// order
|
||||||
organizationsOrder: () => `${order}/order/organizations`,
|
organizationsOrder: () => `${order}/order/organizations`,
|
||||||
|
|
@ -99,7 +99,7 @@ export default {
|
||||||
orderReady: (id: string) => `${order}/order/ready/${id}`,
|
orderReady: (id: string) => `${order}/order/ready/${id}`,
|
||||||
attachmentOrder: (orderId: string) => `${order}/order/attachment/${orderId}`,
|
attachmentOrder: (orderId: string) => `${order}/order/attachment/${orderId}`,
|
||||||
searchOrderprofile: () => `${order}/order/search/profile/command`,
|
searchOrderprofile: () => `${order}/order/search/profile/command`,
|
||||||
|
disciplineReportList,
|
||||||
//receive ระบบรับโอน
|
//receive ระบบรับโอน
|
||||||
receiveData: () => `${receive}`,
|
receiveData: () => `${receive}`,
|
||||||
receiveReport: `${receive}/report`,
|
receiveReport: `${receive}/report`,
|
||||||
|
|
@ -168,7 +168,9 @@ export default {
|
||||||
//appoint-employee
|
//appoint-employee
|
||||||
appointEmployee: () => `${placement}/appointment/temp`,
|
appointEmployee: () => `${placement}/appointment/temp`,
|
||||||
appointEmployeeByid: (id: string) => `${placement}/appointment/temp/${id}`,
|
appointEmployeeByid: (id: string) => `${placement}/appointment/temp/${id}`,
|
||||||
appointEmployeePosition: (id: string) => `${placement}/appointment/temp/position/${id}`,
|
appointEmployeePosition: (id: string) =>
|
||||||
appointEmployeeOrder: (typeId: string) => `${placement}/appointment/temp/report/${typeId}`,
|
`${placement}/appointment/temp/position/${id}`,
|
||||||
|
appointEmployeeOrder: (typeId: string) =>
|
||||||
|
`${placement}/appointment/temp/report/${typeId}`,
|
||||||
apppointmentPositionUse: () => `${placement}/appointment/temp/use`,
|
apppointmentPositionUse: () => `${placement}/appointment/temp/use`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ onMounted(() => {
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="
|
@click="
|
||||||
route.name == 'disciplineOrderDatail'
|
route.name == 'disciplineOrderDatail' || route.name == 'disciplineOrderAdd'
|
||||||
? router.push(`/discipline-order`)
|
? router.push(`/discipline-order`)
|
||||||
: router.push(`/order`)
|
: router.push(`/order`)
|
||||||
"
|
"
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,12 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import type { treeTab } from "@/modules/05_placement/interface/index/Main";
|
import type { treeTab } from "@/modules/05_placement/interface/index/Main";
|
||||||
import type { ResponseOrganiz } from "@/modules/05_placement/interface/response/Order";
|
import type { ResponseOrganiz } from "@/modules/05_placement/interface/response/Order";
|
||||||
|
import type { complaintLists } from "@/modules/10_order/interface/response/Order";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { DataOption1, OrederResult } from "@/modules/10_order/interface/index/Main";
|
import type {
|
||||||
|
DataOption1,
|
||||||
|
OrederResult,
|
||||||
|
} from "@/modules/10_order/interface/index/Main";
|
||||||
|
|
||||||
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
||||||
import { useOrderPlacementDataStore } from "@/modules/10_order/store";
|
import { useOrderPlacementDataStore } from "@/modules/10_order/store";
|
||||||
|
|
@ -121,12 +125,6 @@ const caseFault = ref<string>("");
|
||||||
const result = ref<string>("");
|
const result = ref<string>("");
|
||||||
const refRaw = ref<string>("");
|
const refRaw = ref<string>("");
|
||||||
const complaintId = ref<string>("");
|
const complaintId = ref<string>("");
|
||||||
const complaintOption = ref<DataOption1[]>([
|
|
||||||
{
|
|
||||||
id: "00000000-0000-0000-0000-000000000000",
|
|
||||||
name: "ทุจริตต่อหน้าที่",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const typeOrderFilter = ref<any>({
|
const typeOrderFilter = ref<any>({
|
||||||
typeOrderOption: [],
|
typeOrderOption: [],
|
||||||
|
|
@ -138,6 +136,13 @@ onMounted(async () => {
|
||||||
} else {
|
} else {
|
||||||
await fecthTypeOption("noData");
|
await fecthTypeOption("noData");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
route.name == "disciplineOrderDatail" ||
|
||||||
|
route.name == "disciplineOrderAdd"
|
||||||
|
) {
|
||||||
|
await getComplaint();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// เลือกคำสั่งโดย
|
// เลือกคำสั่งโดย
|
||||||
watch(byOrder, async () => {
|
watch(byOrder, async () => {
|
||||||
|
|
@ -312,13 +317,62 @@ const fecthCommand = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const selectCMP = (selectOrder: OrederResult) => {
|
const selectCMP = async (selectOrder: OrederResult) => {
|
||||||
if (selectOrder != null) {
|
if (selectOrder != null) {
|
||||||
fecthExamRoundOption(selectOrder.commandCode);
|
fecthExamRoundOption(selectOrder.commandCode);
|
||||||
if (selectOrder.commandCode === "C-PM-10") {
|
if (selectOrder.commandCode === "C-PM-10") {
|
||||||
nodeTree();
|
nodeTree();
|
||||||
}
|
}
|
||||||
nameOrder.value = DataStore.nameOrderFilter(selectOrder.commandCode);
|
nameOrder.value = DataStore.nameOrderFilter(selectOrder.commandCode);
|
||||||
|
|
||||||
|
// บรรจุ แต่งตั้ง ย้าย 01 - 04
|
||||||
|
if (
|
||||||
|
selectOrder.commandCode == "C-PM-01" ||
|
||||||
|
selectOrder.commandCode == "C-PM-02" ||
|
||||||
|
selectOrder.commandCode == "C-PM-03" ||
|
||||||
|
selectOrder.commandCode == "C-PM-04"
|
||||||
|
) {
|
||||||
|
fecthExamRoundOption(selectOrder.commandCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
// คำสั่งวินัย
|
||||||
|
// console.log(DataStore.complaintLists)
|
||||||
|
DataStore.complaintOption = [];
|
||||||
|
if (
|
||||||
|
selectOrder.commandCode == "C-PM-25" ||
|
||||||
|
selectOrder.commandCode == "C-PM-26"
|
||||||
|
) {
|
||||||
|
await DataStore.complaintLists
|
||||||
|
.filter((x: complaintLists) => x.isDisciplinary === true)
|
||||||
|
.map((val: complaintLists) => {
|
||||||
|
DataStore.complaintOption.push({ id: val.id, name: val.title });
|
||||||
|
});
|
||||||
|
} else if (selectOrder.commandCode == "C-PM-32") {
|
||||||
|
await DataStore.complaintLists
|
||||||
|
.filter(
|
||||||
|
(x: complaintLists) =>
|
||||||
|
x.isInvestigate === true ||
|
||||||
|
x.isDisciplinary === true ||
|
||||||
|
x.isResult === true
|
||||||
|
)
|
||||||
|
.map((val: complaintLists) => {
|
||||||
|
DataStore.complaintOption.push({ id: val.id, name: val.title });
|
||||||
|
});
|
||||||
|
} else if (
|
||||||
|
selectOrder.commandCode == "C-PM-19" ||
|
||||||
|
selectOrder.commandCode == "C-PM-20" ||
|
||||||
|
selectOrder.commandCode == "C-PM-27" ||
|
||||||
|
selectOrder.commandCode == "C-PM-28" ||
|
||||||
|
selectOrder.commandCode == "C-PM-29" ||
|
||||||
|
selectOrder.commandCode == "C-PM-30" ||
|
||||||
|
selectOrder.commandCode == "C-PM-31"
|
||||||
|
) {
|
||||||
|
await DataStore.complaintLists
|
||||||
|
.filter((x: complaintLists) => x.isResult === true)
|
||||||
|
.map((val: complaintLists) => {
|
||||||
|
DataStore.complaintOption.push({ id: val.id, name: val.title });
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//01-04
|
//01-04
|
||||||
examRound.value = "";
|
examRound.value = "";
|
||||||
|
|
@ -391,6 +445,21 @@ const fecthExamRoundOption = async (commandCode: string) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ดึงรายการเรื่องร้องเรียนจาก API
|
||||||
|
*/
|
||||||
|
async function getComplaint() {
|
||||||
|
await http
|
||||||
|
.get(config.API.disciplineReportList)
|
||||||
|
.then((res: any) => {
|
||||||
|
const dataArr = res.data.result;
|
||||||
|
DataStore.complaintLists = dataArr;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// บันทึกข้อมูล
|
// บันทึกข้อมูล
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
let signBy = null;
|
let signBy = null;
|
||||||
|
|
@ -557,6 +626,7 @@ const submit = async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// สร้างคำสัง
|
// สร้างคำสัง
|
||||||
const createListOrder = async (formData: Object, type: string) => {
|
const createListOrder = async (formData: Object, type: string) => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -1936,7 +2006,7 @@ const getClass = (val: boolean) => {
|
||||||
:label="`${'เรื่องร้องเรียน'}`"
|
:label="`${'เรื่องร้องเรียน'}`"
|
||||||
map-options
|
map-options
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="complaintOption"
|
:options="DataStore.complaintOption"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
|
|
@ -2160,7 +2230,7 @@ const getClass = (val: boolean) => {
|
||||||
:label="`${'เรื่องร้องเรียน'}`"
|
:label="`${'เรื่องร้องเรียน'}`"
|
||||||
map-options
|
map-options
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="complaintOption"
|
:options="DataStore.complaintOption"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ interface ResponseData {
|
||||||
personalId: string;
|
personalId: string;
|
||||||
selectStatus: boolean;
|
selectStatus: boolean;
|
||||||
sequence: number;
|
sequence: number;
|
||||||
refRecordId: string
|
refRecordId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ResponseOrganiz {
|
interface ResponseOrganiz {
|
||||||
|
|
@ -41,4 +41,14 @@ interface DataCopyOrder {
|
||||||
mutiselect: number[];
|
mutiselect: number[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { ResponseData, ResponseOrganiz, ResponseCopyOrder, DataCopyOrder };
|
interface complaintLists {
|
||||||
|
id: string;
|
||||||
|
title: string;
|
||||||
|
dateConsideration: Date | null;
|
||||||
|
isComplaint: boolean;
|
||||||
|
isInvestigate: boolean;
|
||||||
|
isDisciplinary: boolean;
|
||||||
|
isResult: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type { ResponseData, ResponseOrganiz, ResponseCopyOrder, DataCopyOrder, complaintLists };
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,18 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type { FormOrderPlacementMainData } from "@/modules/10_order/interface/request/Main";
|
import type { FormOrderPlacementMainData } from "@/modules/10_order/interface/request/Main";
|
||||||
|
import type { complaintLists } from "@/modules/10_order/interface/response/Order";
|
||||||
|
import type { DataOption1 } from "@/modules/10_order/interface/index/Main";
|
||||||
|
|
||||||
export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
||||||
interface placementOrder {
|
interface placementOrder {
|
||||||
mappingPosition: { columns: String[] };
|
mappingPosition: { columns: String[] };
|
||||||
}
|
}
|
||||||
|
|
||||||
const placementOrderData = ref<placementOrder>({
|
const placementOrderData = ref<placementOrder>({
|
||||||
mappingPosition: { columns: [] },
|
mappingPosition: { columns: [] },
|
||||||
});
|
});
|
||||||
|
|
||||||
const changePlacementColumns = (system: String, val: String[]) => {
|
const changePlacementColumns = (system: String, val: String[]) => {
|
||||||
if (system == "mappingPosition")
|
if (system == "mappingPosition")
|
||||||
placementOrderData.value.mappingPosition.columns = val;
|
placementOrderData.value.mappingPosition.columns = val;
|
||||||
|
|
@ -168,6 +172,9 @@ export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const complaintLists = ref<complaintLists[]>([]);
|
||||||
|
const complaintOption = ref<DataOption1[]>([]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
placementOrderData,
|
placementOrderData,
|
||||||
changePlacementColumns,
|
changePlacementColumns,
|
||||||
|
|
@ -178,5 +185,7 @@ export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
||||||
DataMainYearSetOrder,
|
DataMainYearSetOrder,
|
||||||
DataMainOrder,
|
DataMainOrder,
|
||||||
nameOrderFilter,
|
nameOrderFilter,
|
||||||
|
complaintLists,
|
||||||
|
complaintOption,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue