แก้บรรจุแต่งตั้ง รายชื่อที่สอบผ่าน
This commit is contained in:
parent
627696ea65
commit
e6dcc39765
5 changed files with 87 additions and 102 deletions
|
|
@ -75,6 +75,7 @@ export default {
|
||||||
activeOrganizationRoot: `${organization}/active/root`,
|
activeOrganizationRoot: `${organization}/active/root`,
|
||||||
activeOrganizationRootById: (id: string) =>
|
activeOrganizationRootById: (id: string) =>
|
||||||
`${organization}/active/root/${id}`,
|
`${organization}/active/root/${id}`,
|
||||||
|
orgPosPlacementAll: `${orgPos}/placement/search-all`,
|
||||||
|
|
||||||
/** ข้อมูลตำแหน่งลูกจ้างประจำ*/
|
/** ข้อมูลตำแหน่งลูกจ้างประจำ*/
|
||||||
orgEmployeePos: `${orgEmployeePos}/position`,
|
orgEmployeePos: `${orgEmployeePos}/position`,
|
||||||
|
|
@ -137,11 +138,12 @@ export default {
|
||||||
checkIsOfficer: (id: string) => `${organization}/check/child1/${id}`,
|
checkIsOfficer: (id: string) => `${organization}/check/child1/${id}`,
|
||||||
checkIsDeputys: (id: string) => `${organization}/check/root/${id}`,
|
checkIsDeputys: (id: string) => `${organization}/check/root/${id}`,
|
||||||
|
|
||||||
orgPosReport:`${orgPos}/report/draft`,
|
orgPosReport: `${orgPos}/report/draft`,
|
||||||
orgPosReportAct:`${orgPos}/act/report/draft`,
|
orgPosReportAct: `${orgPos}/act/report/draft`,
|
||||||
/**
|
/**
|
||||||
* workflow
|
* workflow
|
||||||
*/
|
*/
|
||||||
workflow: `${workflow}/`,
|
workflow: `${workflow}/`,
|
||||||
workflowKeycloakSystem:(type:string)=> `${workflow}/keycloak/isofficer/${type}`,
|
workflowKeycloakSystem: (type: string) =>
|
||||||
|
`${workflow}/keycloak/isofficer/${type}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,8 @@ async function addAvatarToData(item: any) {
|
||||||
// เพิ่ม avatar ให้กับ item
|
// เพิ่ม avatar ให้กับ item
|
||||||
const updatedItem = {
|
const updatedItem = {
|
||||||
...item,
|
...item,
|
||||||
avatar: item.avatar ? await fetchProfile(item.avatar) : avatar,
|
// avatar: item.avatar ? await fetchProfile(item.avatar) : avatar,
|
||||||
|
avatar: avatar,
|
||||||
// ตรวจสอบว่า item มี children หรือไม่
|
// ตรวจสอบว่า item มี children หรือไม่
|
||||||
children: item.children
|
children: item.children
|
||||||
? await Promise.all(item.children.map(addAvatarToData))
|
? await Promise.all(item.children.map(addAvatarToData))
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ const date = defineModel<Date>("datePos", { required: true }); //วันยท
|
||||||
const positionData = defineModel<any[]>("position", { required: true }); //ข้อมูลรายการตำแหน่งเลขที่
|
const positionData = defineModel<any[]>("position", { required: true }); //ข้อมูลรายการตำแหน่งเลขที่
|
||||||
const isAll = defineModel<boolean>("isAll", { required: true }); //แสดงตำแหน่งทั้งหมด
|
const isAll = defineModel<boolean>("isAll", { required: true }); //แสดงตำแหน่งทั้งหมด
|
||||||
const isBlank = defineModel<boolean>("isBlank", { required: true }); //แสดงเฉพาะตำแหน่งว่าง
|
const isBlank = defineModel<boolean>("isBlank", { required: true }); //แสดงเฉพาะตำแหน่งว่าง
|
||||||
const isPosition = defineModel<boolean>("isPosition", { required: true });
|
const isPosition = defineModel<string>("isPosition", { required: true });
|
||||||
const isPositionOld = defineModel<boolean>("isPositionOld", { required: true }); //แสดงตำแหน่งที่ตรงกับประเภทและระดับเดิม
|
// const isPositionOld = defineModel<boolean>("isPositionOld", { required: true }); //แสดงตำแหน่งที่ตรงกับประเภทและระดับเดิม
|
||||||
const posType = defineModel<FormPosType>("posType", { required: true }); //ประเภทตำแหน่ง
|
const posType = defineModel<FormPosType>("posType", { required: true }); //ประเภทตำแหน่ง
|
||||||
const posLevel = defineModel<string>("posLevel", { required: true }); //ระดับตำแหน่ง
|
const posLevel = defineModel<string>("posLevel", { required: true }); //ระดับตำแหน่ง
|
||||||
const optionPosType = defineModel<FormPosType[]>("optionPosType", {
|
const optionPosType = defineModel<FormPosType[]>("optionPosType", {
|
||||||
|
|
@ -37,6 +37,7 @@ const optionPosType = defineModel<FormPosType[]>("optionPosType", {
|
||||||
const optionPosLevel = defineModel<FormPosLevel[]>("optionPosLevel", {
|
const optionPosLevel = defineModel<FormPosLevel[]>("optionPosLevel", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
|
const bmaOfficer = defineModel<string>("bmaOfficer", { required: true });
|
||||||
|
|
||||||
const positionRows = ref<DataPositionNo[]>(positionData.value);
|
const positionRows = ref<DataPositionNo[]>(positionData.value);
|
||||||
|
|
||||||
|
|
@ -219,16 +220,16 @@ async function onClickSelectPos(id: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPositionOld() {
|
// function onPositionOld() {
|
||||||
props.fetchDataTable?.(props.nodeId, props.nodeLevel);
|
// props.fetchDataTable?.(props.nodeId, props.nodeLevel);
|
||||||
if (isPositionOld.value == false) {
|
// if (isPositionOld.value == false) {
|
||||||
posType.value.id = "";
|
// posType.value.id = "";
|
||||||
posType.value.posTypeName = "";
|
// posType.value.posTypeName = "";
|
||||||
posType.value.posTypeRank = null;
|
// posType.value.posTypeRank = null;
|
||||||
posType.value.posLevels = [];
|
// posType.value.posLevels = [];
|
||||||
posLevel.value = "";
|
// posLevel.value = "";
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// เช็คว่าถ้ามีการปรับ filter ระบบจะนำข้อมูลไปเช็ค filter แสดงเฉพาะตำแหน่งที่ตรงกับการสอบใหม่อีกครั้ง
|
// เช็คว่าถ้ามีการปรับ filter ระบบจะนำข้อมูลไปเช็ค filter แสดงเฉพาะตำแหน่งที่ตรงกับการสอบใหม่อีกครั้ง
|
||||||
watch(positionData, (newVal, oldVal) => {
|
watch(positionData, (newVal, oldVal) => {
|
||||||
|
|
@ -269,18 +270,6 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แสดงเฉพาะตำแหน่งว่าง </q-tooltip>
|
<q-tooltip>แสดงเฉพาะตำแหน่งว่าง </q-tooltip>
|
||||||
</q-checkbox>
|
</q-checkbox>
|
||||||
<q-checkbox
|
|
||||||
keep-color
|
|
||||||
v-model="isPosition"
|
|
||||||
label="แสดงเฉพาะตำแหน่งที่ตรงกับการสอบ"
|
|
||||||
color="primary"
|
|
||||||
@update:model-value="
|
|
||||||
props.fetchDataTable?.(props.nodeId, props.nodeLevel)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-tooltip>แสดงเฉพาะตำแหน่งที่ตรงกับการสอบ</q-tooltip>
|
|
||||||
</q-checkbox>
|
|
||||||
|
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
v-model="isAll"
|
v-model="isAll"
|
||||||
|
|
@ -295,20 +284,34 @@ onMounted(async () => {
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row q-gutter-sm no-wrap">
|
<div class="row q-gutter-sm no-wrap">
|
||||||
<div>
|
<div>
|
||||||
<q-checkbox
|
<q-radio
|
||||||
keep-color
|
keep-color
|
||||||
v-model="isPositionOld"
|
v-model="isPosition"
|
||||||
label="แสดงตำแหน่งที่ตรงกับประเภทและระดับเดิม"
|
val="exam"
|
||||||
|
label="แสดงเฉพาะตำแหน่งที่ตรงกับการสอบ"
|
||||||
color="primary"
|
color="primary"
|
||||||
@update:model-value="onPositionOld"
|
:disable="bmaOfficer == 'บุคคลภายนอก'"
|
||||||
>
|
>
|
||||||
<q-tooltip>แสดงตำแหน่งที่ตรงกับประเภทและระดับเดิม</q-tooltip>
|
<q-tooltip>แสดงเฉพาะตำแหน่งที่ตรงกับการสอบ</q-tooltip>
|
||||||
</q-checkbox>
|
</q-radio>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-3">
|
<div>
|
||||||
|
<q-radio
|
||||||
|
keep-color
|
||||||
|
v-model="isPosition"
|
||||||
|
val="select"
|
||||||
|
label="แสดงตำแหน่งที่ตรงกับประเภทและระดับ"
|
||||||
|
color="primary"
|
||||||
|
:disable="bmaOfficer == 'บุคคลภายนอก'"
|
||||||
|
>
|
||||||
|
<q-tooltip>แสดงตำแหน่งที่ตรงกับประเภทและระดับ</q-tooltip>
|
||||||
|
</q-radio>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-2">
|
||||||
<q-select
|
<q-select
|
||||||
v-if="isPositionOld"
|
v-if="isPosition == 'select'"
|
||||||
v-model="posType"
|
v-model="posType"
|
||||||
:options="optionPosType"
|
:options="optionPosType"
|
||||||
option-label="posTypeName"
|
option-label="posTypeName"
|
||||||
|
|
@ -319,14 +322,14 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-2">
|
||||||
<q-select
|
<q-select
|
||||||
v-if="isPositionOld"
|
v-if="isPosition == 'select'"
|
||||||
:readonly="posType == null"
|
:readonly="posType == null"
|
||||||
v-model="posLevel"
|
v-model="posLevel"
|
||||||
:options="optionPosLevel"
|
:options="optionPosLevel"
|
||||||
option-label="posLevelName"
|
option-label="posLevelName"
|
||||||
option-value="posLevelName"
|
option-value="id"
|
||||||
label="ระดับตำแหน่ง"
|
label="ระดับตำแหน่ง"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,6 @@ const props = defineProps({
|
||||||
require: true,
|
require: true,
|
||||||
},
|
},
|
||||||
fetchStatCard: { type: Function, require: true },
|
fetchStatCard: { type: Function, require: true },
|
||||||
typeCommand: {
|
|
||||||
type: String,
|
|
||||||
require: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/** Tree*/
|
/** Tree*/
|
||||||
|
|
@ -116,32 +112,34 @@ function updateSelected(data: TreeMain) {
|
||||||
*/
|
*/
|
||||||
const isAll = ref<boolean>(false);
|
const isAll = ref<boolean>(false);
|
||||||
const isBlank = ref<boolean>(true);
|
const isBlank = ref<boolean>(true);
|
||||||
const isPosition = ref<boolean>(true);
|
const isPosition = ref<string>("exam");
|
||||||
const isPositionOld = ref<boolean>(false);
|
// const isPositionOld = ref<boolean>(false);
|
||||||
async function fetchDataTable(id: string, level: number = 0) {
|
async function fetchDataTable(id: string, level: number = 0) {
|
||||||
showLoader();
|
showLoader();
|
||||||
const body = {
|
const body = {
|
||||||
node: level,
|
node: level,
|
||||||
nodeId: id,
|
nodeId: id,
|
||||||
position: props?.dataRow?.positionCandidate,
|
position:
|
||||||
typeCommand: props.typeCommand,
|
isPosition.value === "exam" ? props?.dataRow?.positionCandidate : null,
|
||||||
posLevel: props.dataRow?.posLevelCandidateId
|
posLevel:
|
||||||
? props.dataRow?.posLevelCandidateId
|
isPosition.value === "exam"
|
||||||
: "",
|
? props.dataRow?.posLevelCandidateId
|
||||||
posType: props.dataRow?.posTypeCandidateId
|
: posLevel.value
|
||||||
? props.dataRow?.posTypeCandidateId
|
? posLevel.value
|
||||||
: "",
|
: null,
|
||||||
|
|
||||||
|
posType:
|
||||||
|
isPosition.value === "exam"
|
||||||
|
? props.dataRow?.posTypeCandidateId
|
||||||
|
: posType.value
|
||||||
|
? posType.value.id
|
||||||
|
: null,
|
||||||
isAll: isAll.value,
|
isAll: isAll.value,
|
||||||
isBlank: isBlank.value,
|
isBlank: isBlank.value,
|
||||||
isPosition: isPosition.value,
|
|
||||||
isPositionOld: isPositionOld.value,
|
|
||||||
|
|
||||||
positionType: posType.value ? posType.value.posTypeName : null,
|
|
||||||
positionLevel: posLevel.value ? posLevel.value : null,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
await http
|
await http
|
||||||
.post(config.API.orgPosPlacement, body)
|
.post(config.API.orgPosPlacementAll, body)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const dataMain: PositionMaim[] = [];
|
const dataMain: PositionMaim[] = [];
|
||||||
posMasterMain.value = res.data.result.data;
|
posMasterMain.value = res.data.result.data;
|
||||||
|
|
@ -236,7 +234,6 @@ async function onClickSubmit() {
|
||||||
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
||||||
reportingDate: datePos.value,
|
reportingDate: datePos.value,
|
||||||
posmasterId: dataPosMaster.id,
|
posmasterId: dataPosMaster.id,
|
||||||
typeCommand: props.typeCommand,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
await http
|
await http
|
||||||
|
|
@ -268,7 +265,7 @@ function clearData() {
|
||||||
expanded.value = [];
|
expanded.value = [];
|
||||||
posType.value = null;
|
posType.value = null;
|
||||||
posLevel.value = "";
|
posLevel.value = "";
|
||||||
isPositionOld.value = false;
|
isPosition.value = "exam";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** callback function เมื่อมีการเปิด popup*/
|
/** callback function เมื่อมีการเปิด popup*/
|
||||||
|
|
@ -351,7 +348,7 @@ watch(
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => isPositionOld.value,
|
() => isPosition.value === "select",
|
||||||
(value, oldVal) => {
|
(value, oldVal) => {
|
||||||
if (value !== oldVal) {
|
if (value !== oldVal) {
|
||||||
fetchDataTable(nodeId.value, nodeLevel.value);
|
fetchDataTable(nodeId.value, nodeLevel.value);
|
||||||
|
|
@ -463,7 +460,6 @@ onMounted(() => {
|
||||||
v-model:is-all="isAll"
|
v-model:is-all="isAll"
|
||||||
v-model:is-blank="isBlank"
|
v-model:is-blank="isBlank"
|
||||||
v-model:is-position="isPosition"
|
v-model:is-position="isPosition"
|
||||||
v-model:is-position-old="isPositionOld"
|
|
||||||
v-model:pos-type="posType as FormPosType"
|
v-model:pos-type="posType as FormPosType"
|
||||||
v-model:pos-level="posLevel"
|
v-model:pos-level="posLevel"
|
||||||
v-model:option-pos-type="optionPosType"
|
v-model:option-pos-type="optionPosType"
|
||||||
|
|
@ -472,6 +468,7 @@ onMounted(() => {
|
||||||
:on-pos-type="onPosType"
|
:on-pos-type="onPosType"
|
||||||
:node-id="nodeId"
|
:node-id="nodeId"
|
||||||
:node-level="nodeLevel"
|
:node-level="nodeLevel"
|
||||||
|
:bma-officer="props.dataRow?.bmaOfficer"
|
||||||
/>
|
/>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import config from "@/app.config";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { tokenParsed } from "@/plugins/auth";
|
|
||||||
import { usePlacementDataStore } from "@/modules/05_placement/store";
|
import { usePlacementDataStore } from "@/modules/05_placement/store";
|
||||||
import avatar from "@/assets/avatar_user.jpg";
|
import avatar from "@/assets/avatar_user.jpg";
|
||||||
|
|
||||||
|
|
@ -257,24 +256,24 @@ function convertContainStatus(val: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* แปลงสถานะ
|
// * แปลงสถานะ
|
||||||
* @param val type
|
// * @param val type
|
||||||
*/
|
// */
|
||||||
function convertTypeCommand(val: string) {
|
// function convertTypeCommand(val: string) {
|
||||||
switch (val) {
|
// switch (val) {
|
||||||
case "APPOINTED":
|
// case "APPOINTED":
|
||||||
return "บรรจุแต่งตั้ง";
|
// return "บรรจุแต่งตั้ง";
|
||||||
case "APPOINT":
|
// case "APPOINT":
|
||||||
return "แต่งตั้ง/ย้าย";
|
// return "แต่งตั้ง/ย้าย";
|
||||||
// case "SLIP":
|
// // case "SLIP":
|
||||||
// return "เลื่อน";
|
// // return "เลื่อน";
|
||||||
// case "MOVE":
|
// // case "MOVE":
|
||||||
// return "ย้าย";
|
// // return "ย้าย";
|
||||||
default:
|
// default:
|
||||||
return "";
|
// return "";
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* แปลงสถานะการส่งรายชื่อ
|
* แปลงสถานะการส่งรายชื่อ
|
||||||
|
|
@ -579,13 +578,8 @@ function editDetail(
|
||||||
const modalDialogSelectOrg = ref<boolean>(false);
|
const modalDialogSelectOrg = ref<boolean>(false);
|
||||||
const typeCommand = ref<string>("");
|
const typeCommand = ref<string>("");
|
||||||
const dataRow = ref<DataList>();
|
const dataRow = ref<DataList>();
|
||||||
function openAppointModal(
|
function openAppointModal(pid: string, data: DataList) {
|
||||||
pid: string,
|
|
||||||
data: DataList,
|
|
||||||
typeCommandVal: "APPOINTED" | "APPOINT" | "SLIP" | "MOVE"
|
|
||||||
) {
|
|
||||||
dataRow.value = data;
|
dataRow.value = data;
|
||||||
typeCommand.value = typeCommandVal;
|
|
||||||
modalDialogSelectOrg.value = !modalDialogSelectOrg.value;
|
modalDialogSelectOrg.value = !modalDialogSelectOrg.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -936,13 +930,7 @@ onMounted(async () => {
|
||||||
"
|
"
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="
|
@click="openAppointModal(props.row.personalId, props.row)"
|
||||||
openAppointModal(
|
|
||||||
props.row.personalId,
|
|
||||||
props.row,
|
|
||||||
'APPOINT'
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<q-item-section
|
<q-item-section
|
||||||
style="min-width: 0px"
|
style="min-width: 0px"
|
||||||
|
|
@ -970,13 +958,7 @@ onMounted(async () => {
|
||||||
"
|
"
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="
|
@click="openAppointModal(props.row.personalId, props.row)"
|
||||||
openAppointModal(
|
|
||||||
props.row.personalId,
|
|
||||||
props.row,
|
|
||||||
'APPOINTED'
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<q-item-section
|
<q-item-section
|
||||||
style="min-width: 0px"
|
style="min-width: 0px"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue