Merge branch 'develop' into dev-tee
# Conflicts: # src/modules/05_placement/router.ts
This commit is contained in:
commit
59cdff8851
12 changed files with 1474 additions and 468 deletions
|
|
@ -46,4 +46,6 @@ export default {
|
|||
placementEducationId: (id: string) => `${placement}/education/${id}`,
|
||||
// position
|
||||
placementPosition: () => `${placement}/position/use`,
|
||||
// putPositiom
|
||||
putPosition: (id:any) => `${placement}/position/${id}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@
|
|||
"
|
||||
>
|
||||
<selector
|
||||
class="col-3"
|
||||
hide-bottom-space
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก ประเภท'}`]"
|
||||
outlined
|
||||
|
|
@ -147,6 +148,7 @@
|
|||
doneFn:Function) => filterSelector(inputValue, doneFn,'employeeTypeOps'
|
||||
) " -->
|
||||
<q-input
|
||||
class="col-3"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -158,6 +160,7 @@
|
|||
type="number"
|
||||
/>
|
||||
<q-input
|
||||
class="col-2"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -168,6 +171,7 @@
|
|||
@update:model-value="updateFullname"
|
||||
/>
|
||||
<datepicker
|
||||
class="col-2"
|
||||
menu-class-name="modalfix"
|
||||
:model-value="retireYear"
|
||||
:locale="'th'"
|
||||
|
|
@ -208,6 +212,7 @@
|
|||
</template>
|
||||
</datepicker>
|
||||
<q-input
|
||||
class="col-2"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -219,6 +224,86 @@
|
|||
@update:model-value="updateGovAge"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
:class="
|
||||
$q.screen.lt.md
|
||||
? ' row col-12 q-col-gutter-xs'
|
||||
: 'no-wrap row col-12 q-col-gutter-xs'
|
||||
"
|
||||
>
|
||||
<q-input
|
||||
v-if="employeeClass == 'officer'"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:model-value="positionPath"
|
||||
hide-bottom-space
|
||||
label="ตำแหน่งในสายงาน"
|
||||
@update:model-value="updatePositionPath"
|
||||
class="col-3"
|
||||
/>
|
||||
<q-input
|
||||
v-if="employeeClass == 'officer'"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:model-value="positionLevel"
|
||||
hide-bottom-space
|
||||
label="ระดับ"
|
||||
@update:model-value="updatePositionLevel"
|
||||
class="col-3"
|
||||
/>
|
||||
<q-input
|
||||
v-if="employeeClass == 'officer'"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:model-value="positionExecutive"
|
||||
hide-bottom-space
|
||||
label="ตำแหน่งทางการบริหาร"
|
||||
@update:model-value="updatePositionExecutive"
|
||||
class="col-3"
|
||||
/>
|
||||
<q-input
|
||||
v-if="employeeClass != 'officer'"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:model-value="employeePosition"
|
||||
hide-bottom-space
|
||||
label="ตำแหน่ง"
|
||||
@update:model-value="updateEmployeePosition"
|
||||
class="col-3"
|
||||
/>
|
||||
<q-input
|
||||
v-if="employeeClass != 'officer'"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:model-value="employeeLevel"
|
||||
hide-bottom-space
|
||||
label="ระดับชั้นงาน"
|
||||
@update:model-value="updateEmployeeLevel"
|
||||
class="col-3"
|
||||
/>
|
||||
<q-input
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:model-value="posNo"
|
||||
hide-bottom-space
|
||||
label="ตำแหน่งเลขที่"
|
||||
@update:model-value="updatePosNo"
|
||||
class="col-3"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 row items-center">
|
||||
<q-toggle
|
||||
dense
|
||||
|
|
@ -332,6 +417,12 @@ const props = defineProps({
|
|||
// profileType: String,
|
||||
retireYear: Number || null,
|
||||
govAge: Number || null,
|
||||
positionPath: String,
|
||||
positionLevel: String,
|
||||
positionExecutive: String,
|
||||
employeePosition: String,
|
||||
employeeLevel: String,
|
||||
posNo: String,
|
||||
isTab: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
|
|
@ -363,6 +454,12 @@ const emit = defineEmits([
|
|||
"update:isShowRetire",
|
||||
// "update:profileType",
|
||||
"update:isProbation",
|
||||
"update:positionPath",
|
||||
"update:positionLevel",
|
||||
"update:positionExecutive",
|
||||
"update:employeePosition",
|
||||
"update:employeeLevel",
|
||||
"update:posNo",
|
||||
]);
|
||||
|
||||
const updateInput = (value: string | number | null) => {
|
||||
|
|
@ -393,6 +490,24 @@ const updateIsShowRetire = (value: string | number | null) => {
|
|||
const updateIsProbation = (value: string | number | null) => {
|
||||
emit("update:isProbation", value);
|
||||
};
|
||||
const updatePositionPath = (value: string | number | null) => {
|
||||
emit("update:positionPath", value);
|
||||
};
|
||||
const updatePositionLevel = (value: string | number | null) => {
|
||||
emit("update:positionLevel", value);
|
||||
};
|
||||
const updatePositionExecutive = (value: string | number | null) => {
|
||||
emit("update:positionExecutive", value);
|
||||
};
|
||||
const updateEmployeePosition = (value: string | number | null) => {
|
||||
emit("update:employeePosition", value);
|
||||
};
|
||||
const updateEmployeeLevel = (value: string | number | null) => {
|
||||
emit("update:employeeLevel", value);
|
||||
};
|
||||
const updatePosNo = (value: string | number | null) => {
|
||||
emit("update:posNo", value);
|
||||
};
|
||||
// const updateProfileType = (value: string | number | null) => {
|
||||
// emit("update:profileType", value);
|
||||
// };
|
||||
|
|
|
|||
|
|
@ -73,6 +73,12 @@
|
|||
v-model:govAge="govAge"
|
||||
v-model:isProbation="isProbation"
|
||||
v-model:isTab="isDrawer"
|
||||
v-model:positionPath="positionPath"
|
||||
v-model:positionLevel="positionLevel"
|
||||
v-model:positionExecutive="positionExecutive"
|
||||
v-model:employeePosition="employeePosition"
|
||||
v-model:employeeLevel="employeeLevel"
|
||||
v-model:posNo="posNo"
|
||||
:doSearch="doSearch"
|
||||
:onExport="onExport"
|
||||
:onTab="changeTab"
|
||||
|
|
@ -160,6 +166,12 @@ const profileType = ref<string>("officer");
|
|||
const profileEmployeeType = ref<string>("temp");
|
||||
const retireYear = ref<number>();
|
||||
const govAge = ref<number>();
|
||||
const positionPath = ref<string>("");
|
||||
const positionLevel = ref<string>("");
|
||||
const positionExecutive = ref<string>("");
|
||||
const employeePosition = ref<string>("");
|
||||
const employeeLevel = ref<string>("");
|
||||
const posNo = ref<string>("");
|
||||
const initialPagination = ref<Pagination>({
|
||||
rowsPerPage: 0,
|
||||
});
|
||||
|
|
@ -1256,6 +1268,48 @@ const doSearch = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
if (positionPath.value !== null && positionPath.value !== "") {
|
||||
cirteria.push({
|
||||
criteriaType: "position_path",
|
||||
criteriaValue: positionPath.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (positionLevel.value !== null && positionLevel.value !== "") {
|
||||
cirteria.push({
|
||||
criteriaType: "position_level",
|
||||
criteriaValue: positionLevel.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (positionExecutive.value !== null && positionExecutive.value !== "") {
|
||||
cirteria.push({
|
||||
criteriaType: "position_executive",
|
||||
criteriaValue: positionExecutive.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (employeePosition.value !== null && employeePosition.value !== "") {
|
||||
cirteria.push({
|
||||
criteriaType: "employee_position",
|
||||
criteriaValue: employeePosition.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (employeeLevel.value !== null && employeeLevel.value !== "") {
|
||||
cirteria.push({
|
||||
criteriaType: "employee_level",
|
||||
criteriaValue: employeeLevel.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (posNo.value !== null && posNo.value !== "") {
|
||||
cirteria.push({
|
||||
criteriaType: "pos_no",
|
||||
criteriaValue: posNo.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (selected.value == null || selected.value == "") return;
|
||||
loaderPage(true);
|
||||
await http
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { useQuasar, QForm } from "quasar";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { onMounted, reactive, ref, watch } from "vue";
|
||||
import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
|
||||
import DialogFooter from "@/modules/05_placement/components/PersonalList/DialogFooter.vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -18,6 +18,7 @@ const checkValidate = ref<boolean>(false);
|
|||
const myFormPosition = ref<any>();
|
||||
const selected = ref<string>("");
|
||||
const selectedFile = ref<string>("");
|
||||
const dataRespone = ref<any>();
|
||||
|
||||
// Set form field
|
||||
let dataForm = reactive({
|
||||
|
|
@ -29,9 +30,9 @@ let dataForm = reactive({
|
|||
positionLineId: "",
|
||||
positionPathSideId: "",
|
||||
positionTypeId: "",
|
||||
salaryAmount: null,
|
||||
mouthSalaryAmount: null,
|
||||
positionSalaryAmount: null,
|
||||
// salaryAmount: null,
|
||||
// mouthSalaryAmount: null,
|
||||
// positionSalaryAmount: null,
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
|
|
@ -57,10 +58,12 @@ const fetchPublishFile = async () => {
|
|||
// โหลดข้อมูลโครงสร้างจาก json
|
||||
const treeData = ref<Array<any>>([]);
|
||||
const loadTreeData = async () => {
|
||||
expanded.value = [];
|
||||
await http
|
||||
.get(`${config.s3ClusterUrl}${selectedFile.value}`)
|
||||
.then((res: any) => {
|
||||
treeData.value = res.data;
|
||||
dataRespone.value = res.data;
|
||||
|
||||
// Filter objects with "name" null
|
||||
const filteredData = res.data.filter(filterByPersonIdNull);
|
||||
|
|
@ -75,6 +78,7 @@ const loadTreeData = async () => {
|
|||
};
|
||||
|
||||
function filterByPersonIdNull(obj: any) {
|
||||
// console.log(obj);
|
||||
if (obj.name === null && obj.isCondition != true) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -113,29 +117,31 @@ const props = defineProps({
|
|||
type: Function,
|
||||
default: () => console.log("close modal"),
|
||||
},
|
||||
personal: Object,
|
||||
});
|
||||
|
||||
const myFilterMethod = (node: any, filter: string) => {
|
||||
const filt = filter;
|
||||
|
||||
return (
|
||||
((node.name && node.name == null) || !node.name) &&
|
||||
((node.organizationName && node.organizationName.indexOf(filt) > -1) ||
|
||||
(node.positionNum && node.positionNum.indexOf(filt) > -1) ||
|
||||
(node.positionName && node.positionName.indexOf(filt) > -1) ||
|
||||
(node.governmentCode &&
|
||||
node.governmentCode.toString().indexOf(filt) > -1) ||
|
||||
(node.agency && node.agency.indexOf(filt) > -1) ||
|
||||
(node.government && node.government.indexOf(filt) > -1) ||
|
||||
(node.department && node.department.indexOf(filt) > -1) ||
|
||||
(node.pile && node.pile.indexOf(filt) > -1) ||
|
||||
(node.organizationShortName &&
|
||||
node.organizationShortName.indexOf(filt) > -1) ||
|
||||
(node.positionSideName && node.positionSideName.indexOf(filt) > -1) ||
|
||||
(node.executivePosition && node.executivePosition.indexOf(filt) > -1) ||
|
||||
(node.executivePositionSide &&
|
||||
node.executivePositionSide.indexOf(filt) > -1) ||
|
||||
(node.positionLevel && node.positionLevel.indexOf(filt) > -1))
|
||||
// ((node.name && node.name == null) || !node.name) &&
|
||||
(node.name && node.name.indexOf(filt) > -1) ||
|
||||
(node.organizationName && node.organizationName.indexOf(filt) > -1) ||
|
||||
(node.positionNum && node.positionNum.indexOf(filt) > -1) ||
|
||||
(node.positionName && node.positionName.indexOf(filt) > -1) ||
|
||||
(node.governmentCode &&
|
||||
node.governmentCode.toString().indexOf(filt) > -1) ||
|
||||
(node.agency && node.agency.indexOf(filt) > -1) ||
|
||||
(node.government && node.government.indexOf(filt) > -1) ||
|
||||
(node.department && node.department.indexOf(filt) > -1) ||
|
||||
(node.pile && node.pile.indexOf(filt) > -1) ||
|
||||
(node.organizationShortName &&
|
||||
node.organizationShortName.indexOf(filt) > -1) ||
|
||||
(node.positionSideName && node.positionSideName.indexOf(filt) > -1) ||
|
||||
(node.executivePosition && node.executivePosition.indexOf(filt) > -1) ||
|
||||
(node.executivePositionSide &&
|
||||
node.executivePositionSide.indexOf(filt) > -1) ||
|
||||
(node.positionLevel && node.positionLevel.indexOf(filt) > -1)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -160,9 +166,9 @@ const saveAppoint = async () => {
|
|||
positionLineId: dataForm.positionLineId,
|
||||
positionPathSideId: dataForm.positionPathSideId,
|
||||
positionTypeId: dataForm.positionTypeId,
|
||||
salaryAmount: dataForm.salaryAmount,
|
||||
mouthSalaryAmount: dataForm.mouthSalaryAmount,
|
||||
positionSalaryAmount: dataForm.positionSalaryAmount,
|
||||
// salaryAmount: dataForm.salaryAmount,
|
||||
// mouthSalaryAmount: dataForm.mouthSalaryAmount,
|
||||
// positionSalaryAmount: dataForm.positionSalaryAmount,
|
||||
};
|
||||
// console.log("save appoint===>", dataAppoint);
|
||||
|
||||
|
|
@ -219,9 +225,9 @@ const closeAndClear = async () => {
|
|||
dataForm.positionLineId = "";
|
||||
dataForm.positionPathSideId = "";
|
||||
dataForm.positionTypeId = "";
|
||||
dataForm.salaryAmount = null;
|
||||
dataForm.mouthSalaryAmount = null;
|
||||
dataForm.positionSalaryAmount = null;
|
||||
// dataForm.salaryAmount = null;
|
||||
// dataForm.mouthSalaryAmount = null;
|
||||
// dataForm.positionSalaryAmount = null;
|
||||
};
|
||||
// ตำแหน่งเลขที่
|
||||
const posNoOptions = ref<Object[]>([
|
||||
|
|
@ -350,21 +356,80 @@ const selectedPosition = async (data: any) => {
|
|||
dataForm.positionTypeId = "";
|
||||
}
|
||||
};
|
||||
|
||||
const checkPosition = (val: string) => {
|
||||
const num = placementPosition.value.findIndex((e: string) => e === val);
|
||||
return num;
|
||||
};
|
||||
const personal = ref<any>();
|
||||
const expanded = ref<string[]>([]);
|
||||
|
||||
watch(props, () => {
|
||||
expanded.value = [];
|
||||
const dataPersonal = props.personal;
|
||||
if (dataPersonal) {
|
||||
dataPersonal.map((data: any) => {
|
||||
personal.value = data;
|
||||
});
|
||||
console.log("personal", personal.value);
|
||||
}
|
||||
|
||||
// console.log("draft===>", personal.value.draft);
|
||||
|
||||
if (personal.value.draft === false) {
|
||||
// const findData = dataRespone.value.find(findByPerson);
|
||||
let findData: any = null;
|
||||
console.log(dataRespone.value);
|
||||
|
||||
dataRespone.value.map((x: any) => {
|
||||
findData = findByPerson(x);
|
||||
if (findData != null) {
|
||||
console.log("findData===>", findData);
|
||||
selectedPosition(findData);
|
||||
for (let i = 3; i <= findData.keyId.length; i += 2) {
|
||||
expanded.value.push(findData.keyId.slice(0, i));
|
||||
}
|
||||
}
|
||||
});
|
||||
// loadTreeData();
|
||||
// selectedPosition(findData.children.children.children)
|
||||
}
|
||||
});
|
||||
|
||||
function findByPerson(element: any): any {
|
||||
// console.log("searchTree element===>", element)
|
||||
if (
|
||||
element.positionNumId &&
|
||||
element.positionLineId === personal.value.positionLineId &&
|
||||
element.positionTypeId === personal.value.positionTypeId &&
|
||||
element.positionNumId === personal.value.posNoId &&
|
||||
(element.positionLevelObj === null ||
|
||||
element.positionLevelObj[0].Id === personal.value.positionLevelId) &&
|
||||
(element.positionSideNameObj === null ||
|
||||
element.positionSideNameObj[0].Id === personal.value.positionPathSideId)
|
||||
) {
|
||||
return element;
|
||||
} else if (element.children) {
|
||||
var i;
|
||||
var result = null;
|
||||
for (i = 0; result == null && i < element.children.length; i++) {
|
||||
result = findByPerson(element.children[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="props.modal" persistent full-width>
|
||||
<q-card>
|
||||
<q-dialog v-model="props.modal" persistent>
|
||||
<q-card style="width: 900px; max-width: 80vw">
|
||||
<q-form ref="myFormPosition">
|
||||
<DialogHeader title="เลือกหน่วยงานที่รับบรรจุ" :close="closeModal" />
|
||||
<q-separator />
|
||||
<q-card-section class="q-pa-sm bg-grey-1">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<div class="col-xs-12 col-sm-7 row">
|
||||
<q-card flat bordered class="fit q-pa-sm">
|
||||
<q-scroll-area visible style="height: 70vh">
|
||||
<q-input
|
||||
|
|
@ -389,6 +454,7 @@ const checkPosition = (val: string) => {
|
|||
:no-results-label="notFound"
|
||||
:no-nodes-label="noData"
|
||||
:filter-method="myFilterMethod"
|
||||
v-model:expanded="expanded"
|
||||
>
|
||||
<template v-slot:header-organization="prop">
|
||||
<div class="col">
|
||||
|
|
@ -505,12 +571,12 @@ const checkPosition = (val: string) => {
|
|||
</q-scroll-area>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="col-xs-12 col-sm-5">
|
||||
<q-card flat bordered class="fit q-pa-sm">
|
||||
<q-scroll-area visible style="height: 70vh">
|
||||
<div class="row col-12 q-col-gutter-xs">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12"></div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dataForm.containDate"
|
||||
|
|
@ -532,10 +598,7 @@ const checkPosition = (val: string) => {
|
|||
:model-value="
|
||||
date2Thai(new Date(dataForm.containDate))
|
||||
"
|
||||
:rules="[
|
||||
(val: string) =>
|
||||
!!val ||
|
||||
`${'วันที่รายงานตัว'}`,
|
||||
:rules="[ (val: string) =>!!val ||`${'วันที่รายงานตัว'}`,
|
||||
]"
|
||||
:label="`${'วันที่รายงานตัว'}`"
|
||||
hide-bottom-space
|
||||
|
|
@ -553,7 +616,7 @@ const checkPosition = (val: string) => {
|
|||
</datepicker>
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-select
|
||||
class="full-width inputgreen cursor-pointer custom-input"
|
||||
outlined
|
||||
|
|
@ -567,7 +630,7 @@ const checkPosition = (val: string) => {
|
|||
map-options
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-select
|
||||
outlined
|
||||
class="full-width inputgreen cursor-pointer custom-input"
|
||||
|
|
@ -581,7 +644,7 @@ const checkPosition = (val: string) => {
|
|||
map-options
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-select
|
||||
outlined
|
||||
class="full-width inputgreen cursor-pointer custom-input"
|
||||
|
|
@ -596,7 +659,7 @@ const checkPosition = (val: string) => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-select
|
||||
outlined
|
||||
class="full-width inputgreen cursor-pointer custom-input"
|
||||
|
|
@ -610,7 +673,7 @@ const checkPosition = (val: string) => {
|
|||
map-options
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-select
|
||||
outlined
|
||||
class="full-width inputgreen cursor-pointer custom-input"
|
||||
|
|
@ -624,7 +687,7 @@ const checkPosition = (val: string) => {
|
|||
map-options
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-select
|
||||
outlined
|
||||
class="full-width inputgreen cursor-pointer custom-input"
|
||||
|
|
@ -640,10 +703,10 @@ const checkPosition = (val: string) => {
|
|||
map-options
|
||||
/>
|
||||
</div>
|
||||
<div class="col-sx-12 col-sm-12 col-md-12">
|
||||
<!-- <div class="col-sx-12 col-sm-12 col-md-12">
|
||||
<q-separator inset size="2px" class="q-my-md" />
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
</div> -->
|
||||
<!-- <div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -655,9 +718,9 @@ const checkPosition = (val: string) => {
|
|||
type="number"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<!-- <div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -671,9 +734,9 @@ const checkPosition = (val: string) => {
|
|||
type="number"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<!-- <div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -688,7 +751,7 @@ const checkPosition = (val: string) => {
|
|||
type="number"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</q-scroll-area>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch, reactive } from "vue";
|
||||
import { ref, onMounted, watch, reactive, computed } from "vue";
|
||||
import { useQuasar, QForm } from "quasar";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -37,6 +37,7 @@ const filter = ref<string>("");
|
|||
const Name = ref<string>();
|
||||
const rowsAll = ref<any>([]);
|
||||
const rows = ref<any>([]);
|
||||
const rowsFilter = ref<any>([]);
|
||||
const myForm = ref<any>();
|
||||
const files = ref<any>(null);
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
|
|
@ -52,13 +53,25 @@ const personalId = ref<string>("");
|
|||
const visibleColumns = ref<any[]>([
|
||||
"position",
|
||||
"fullName",
|
||||
"number",
|
||||
"examNumber",
|
||||
"idCard",
|
||||
"positionNumber",
|
||||
"organizationName",
|
||||
"reportingDate",
|
||||
"bmaOfficer",
|
||||
"statusName",
|
||||
"draft",
|
||||
"positionCandidate",
|
||||
]);
|
||||
const visibleColumnslist = ref<any>([
|
||||
"fullName",
|
||||
"examNumber",
|
||||
"idCard",
|
||||
"positionNumber",
|
||||
"organizationName",
|
||||
"draft",
|
||||
"bmaOfficer",
|
||||
"positionCandidate",
|
||||
]);
|
||||
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -81,11 +94,11 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "number",
|
||||
name: "examNumber",
|
||||
align: "center",
|
||||
label: "ลำดับที่สอบได้",
|
||||
sortable: true,
|
||||
field: "number",
|
||||
field: "examNumber",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -100,6 +113,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "positionCandidate",
|
||||
align: "left",
|
||||
label: "ตำแหน่งที่สอบ",
|
||||
sortable: true,
|
||||
field: "positionCandidate",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "reportingDate",
|
||||
align: "left",
|
||||
|
|
@ -120,6 +142,17 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "draft",
|
||||
align: "left",
|
||||
label: "สถานะการส่งรายชื่อ",
|
||||
sortable: true,
|
||||
field: "draft",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "statusName",
|
||||
align: "left",
|
||||
|
|
@ -160,38 +193,64 @@ const convertContainStatus = (val: string) => {
|
|||
return "-";
|
||||
}
|
||||
};
|
||||
const convertDraft = (val: boolean) => {
|
||||
switch (val) {
|
||||
case false:
|
||||
return "รอส่งตัว";
|
||||
case true:
|
||||
return "ส่งตัวแล้ว";
|
||||
default:
|
||||
return "-";
|
||||
}
|
||||
};
|
||||
|
||||
const getTable = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.personalList(examIdString))
|
||||
.then(async (res: any) => {
|
||||
console.log(res);
|
||||
dataRes.value = res.data.result;
|
||||
rowsAll.value = [];
|
||||
res.data.result.map((data: any) => {
|
||||
const rowData = {
|
||||
personalId: data.personalId,
|
||||
idCard: data.idCard,
|
||||
fullName: data.fullName + ' ' + data.idCard,
|
||||
name: data.fullName,
|
||||
profilePhoto: data.profilePhoto,
|
||||
organizationName: data.organizationName + ' ' + data.organizationShortName + ' ' + data.positionNumber + ' ' + data.positionPath,
|
||||
orgName: data.organizationName,
|
||||
organizationShortName: data.organizationShortName,
|
||||
positionNumber: data.positionNumber,
|
||||
positionPath: data.positionPath,
|
||||
reportingDate: dateText(new Date(data.reportingDate)),
|
||||
number: data.number,
|
||||
bmaOfficer: convertBmaOfficer(data.bmaOfficer),
|
||||
statusId: data.statusId,
|
||||
statusName: convertContainStatus(data.statusId)
|
||||
,
|
||||
deferment: data.deferment,
|
||||
};
|
||||
(rowsFilter.value = []),
|
||||
res.data.result.map((data: any) => {
|
||||
const rowData = {
|
||||
personalId: data.personalId,
|
||||
idCard: data.idCard,
|
||||
fullName: data.fullName + " " + data.idCard,
|
||||
name: data.fullName,
|
||||
profilePhoto: data.profilePhoto,
|
||||
organizationName:
|
||||
data.organizationName +
|
||||
" " +
|
||||
data.organizationShortName +
|
||||
" " +
|
||||
data.positionNumber +
|
||||
" " +
|
||||
data.positionPath,
|
||||
orgName: data.organizationName,
|
||||
organizationShortName: data.organizationShortName,
|
||||
positionNumber: data.positionNumber,
|
||||
positionPath: data.positionPath,
|
||||
reportingDate: dateText(new Date(data.reportingDate)),
|
||||
examNumber: data.examNumber,
|
||||
bmaOfficer: convertBmaOfficer(data.bmaOfficer),
|
||||
statusId: data.statusId,
|
||||
statusName: convertContainStatus(data.statusId),
|
||||
deferment: data.deferment,
|
||||
draft: convertDraft(data.draft),
|
||||
positionCandidate: data.positionCandidate,
|
||||
};
|
||||
|
||||
rowsAll.value.push(rowData);
|
||||
});
|
||||
rowsAll.value.push(rowData);
|
||||
});
|
||||
|
||||
rows.value = roleAdmin ? rowsAll.value : rowsAll.value.filter((x: any) => x.statusId != 'CONTAIN');
|
||||
rows.value = roleAdmin
|
||||
? rowsAll.value
|
||||
: rowsAll.value.filter((x: any) => x.statusId != "CONTAIN");
|
||||
|
||||
rowsFilter.value = rows.value.filter((e: any) => e.draft == "รอส่งตัว");
|
||||
console.log(rowsFilter.value);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -206,27 +265,40 @@ const appointModal = ref<boolean>(false);
|
|||
const saveDeferment = async () => {
|
||||
myForm.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
showLoader();
|
||||
const formData = new FormData();
|
||||
formData.append("personalId", personalId.value);
|
||||
formData.append("note", userNote.value);
|
||||
formData.append("files", files.value[0]);
|
||||
|
||||
await http
|
||||
.post(config.API.deferment(), formData)
|
||||
.then((res) => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
$q.dialog({
|
||||
title: "ยืนยันการขอผ่อนผัน",
|
||||
message: "ต้องการยืนยันการขอผ่อนผันข้อมูลนี้ใช่หรือไม่ ?",
|
||||
cancel: {
|
||||
flat: true,
|
||||
const: "negative",
|
||||
},
|
||||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
showLoader();
|
||||
console.log("ยืนยันการขอผ่อนผัน");
|
||||
await http
|
||||
.post(config.API.deferment(), formData)
|
||||
.then(() => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await getTable();
|
||||
props.statCard();
|
||||
userNote.value = "";
|
||||
modalDefermentDisclaim.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await getTable();
|
||||
props.statCard();
|
||||
userNote.value = "";
|
||||
modalDefermentDisclaim.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -234,29 +306,40 @@ const saveDeferment = async () => {
|
|||
const saveDisclaim = async () => {
|
||||
myForm.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
showLoader();
|
||||
// showLoader();
|
||||
const dataPost = {
|
||||
note: userNote.value,
|
||||
personId: personalId.value,
|
||||
};
|
||||
|
||||
// console.log("save disclaim===>", dataPost);
|
||||
|
||||
await http
|
||||
.post(config.API.disclaimF(), {
|
||||
note: dataPost.note,
|
||||
personalId: dataPost.personId,
|
||||
$q.dialog({
|
||||
title: "ยืนยันการสละสิทธิ์",
|
||||
message: "ต้องการยืนยันการสละสิทธิ์ข้อมูลนี้ใช่หรือไม่ ?",
|
||||
cancel: {
|
||||
flat: true,
|
||||
const: "negative",
|
||||
},
|
||||
})
|
||||
.onOk(async () => {
|
||||
showLoader();
|
||||
console.log("ยืนยันการสละสิทธิ์");
|
||||
await http
|
||||
.post(config.API.disclaimF(), {
|
||||
note: dataPost.note,
|
||||
personalId: dataPost.personId,
|
||||
})
|
||||
.then(() => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
.finally(async () => {
|
||||
await getTable();
|
||||
props.statCard();
|
||||
userNote.value = "";
|
||||
modalDefermentDisclaim.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
.finally(async () => {
|
||||
await getTable();
|
||||
props.statCard();
|
||||
userNote.value = "";
|
||||
modalDefermentDisclaim.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -334,9 +417,14 @@ const editDetail = (
|
|||
}
|
||||
};
|
||||
|
||||
const dataRes = ref<any>([]);
|
||||
const personal = ref<any>([]);
|
||||
const openAppointModal = (pid: string) => {
|
||||
appointModal.value = true;
|
||||
personalId.value = pid;
|
||||
personal.value = dataRes.value.filter(
|
||||
(e: any) => e.personalId == personalId.value
|
||||
);
|
||||
};
|
||||
|
||||
const clickCloseModalTree = async () => {
|
||||
|
|
@ -387,30 +475,106 @@ const containStatus = ref<boolean>(false);
|
|||
watch(containStatus, () => {
|
||||
// console.log("containStatus===>", containStatus.value);
|
||||
if (containStatus.value) {
|
||||
rows.value = rowsAll.value.filter((x: any) => x.statusId == 'CONTAIN');
|
||||
rows.value = rowsAll.value.filter((x: any) => x.statusId == "CONTAIN");
|
||||
} else {
|
||||
rows.value = rowsAll.value.filter((x: any) => x.statusId != 'CONTAIN');
|
||||
rows.value = rowsAll.value.filter((x: any) => x.statusId != "CONTAIN");
|
||||
}
|
||||
});
|
||||
|
||||
const modaladdlist = ref<boolean>(false);
|
||||
const selected = ref<any>([]);
|
||||
const personal_selected = ref<any>([]);
|
||||
const filterlistAdd = ref<string>("");
|
||||
const paging = ref<boolean>(true);
|
||||
const savelist = () => {
|
||||
selected.value.map((e: any) => {
|
||||
personal_selected.value.push(e.personalId);
|
||||
});
|
||||
if (personal_selected.value) {
|
||||
console.log(personal_selected.value);
|
||||
$q.dialog({
|
||||
title: "ยืนยันการส่งตัว",
|
||||
message: "ต้องการยืนยันการส่งตัวข้อมูลนี้หรือไม่ ?",
|
||||
cancel: {
|
||||
flat: true,
|
||||
const: "negative",
|
||||
},
|
||||
}).onOk(async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.putPosition(examId), personal_selected.value)
|
||||
.then(() => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
.catch((e: any) => {
|
||||
console.log(e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await getTable();
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
const handleModalAddListUpdate = (val: boolean) => {
|
||||
modaladdlist.value = val;
|
||||
(selected.value = []), (personal_selected.value = []);
|
||||
};
|
||||
const checkSelected = computed(() => {
|
||||
if (selected.value.length === 0) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
const pagination = ref({
|
||||
sortBy: "fullname",
|
||||
descending: true,
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
const paginationLabel = (start: number, end: number, total: number) => {
|
||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||
else return start + "-" + end + " ใน " + total;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-form ref="myForm">
|
||||
<Table :contain-status="containStatus" :rows="rows" :columns="columns" :filter="filter"
|
||||
:visible-columns="visibleColumns" v-model:inputfilter="filter" v-model:inputvisible="visibleColumns"
|
||||
v-model:editvisible="editvisible" v-model:containfilter="containStatus" :history="true" :boss="true"
|
||||
:saveNoDraft="true" :role-admin="roleAdmin">
|
||||
<Table
|
||||
:contain-status="containStatus"
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:filter="filter"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:inputfilter="filter"
|
||||
v-model:inputvisible="visibleColumns"
|
||||
v-model:editvisible="editvisible"
|
||||
v-model:containfilter="containStatus"
|
||||
@update-modaladdlist="handleModalAddListUpdate"
|
||||
:history="true"
|
||||
:boss="true"
|
||||
:saveNoDraft="true"
|
||||
:role-admin="roleAdmin"
|
||||
>
|
||||
<template #columns="props">
|
||||
<q-tr :props="props">
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props" @click="selectData(props.row.personalId)"
|
||||
class="cursor-pointer">
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
@click="selectData(props.row.personalId)"
|
||||
class="cursor-pointer"
|
||||
>
|
||||
<template v-if="col.name === 'position'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</template>
|
||||
<template v-else-if="col.name === 'fullName'" class="table_ellipsis">
|
||||
<template
|
||||
v-else-if="col.name === 'fullName'"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
<div class="row col-12 text-no-wrap items-center">
|
||||
<img v-if="props.row.avatar == null" src="@/assets/avatar_user.jpg" class="col-4 img-info" />
|
||||
<img
|
||||
v-if="props.row.avatar == null"
|
||||
src="@/assets/avatar_user.jpg"
|
||||
class="col-4 img-info"
|
||||
/>
|
||||
<img v-else :src="props.row.avatar" class="col-4 img-info" />
|
||||
<div class="col-4">
|
||||
<div class="text-weight-medium">{{ props.row.name }}</div>
|
||||
|
|
@ -418,39 +582,37 @@ watch(containStatus, () => {
|
|||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="col.name === 'number'">
|
||||
<template v-else-if="col.name === 'examNumber'">
|
||||
<div class="text-weight-medium">
|
||||
{{ props.row.number !== null ? props.row.number : "-" }}
|
||||
{{ props.row.examNumber !== null ? props.row.examNumber : "-" }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-else-if="col.name === 'organizationName'">
|
||||
<div v-if="props.row.orgName !== null ||
|
||||
props.row.positionPath !== null
|
||||
">
|
||||
<div
|
||||
v-if="
|
||||
props.row.orgName !== null || props.row.positionPath !== null
|
||||
"
|
||||
>
|
||||
<div class="col-4">
|
||||
<div class="text-weight-medium">
|
||||
{{
|
||||
props.row.orgName !== null
|
||||
? props.row.orgName
|
||||
: "-"
|
||||
}}
|
||||
{{ props.row.orgName !== null ? props.row.orgName : "-" }}
|
||||
{{
|
||||
props.row.organizationShortName !== null
|
||||
? `(${props.row.organizationShortName})`
|
||||
: ""
|
||||
? `(${props.row.organizationShortName})`
|
||||
: ""
|
||||
}}
|
||||
</div>
|
||||
<div class="text-weight-light">
|
||||
{{
|
||||
props.row.positionPath !== null
|
||||
? props.row.positionPath
|
||||
: "-"
|
||||
? props.row.positionPath
|
||||
: "-"
|
||||
}}
|
||||
{{
|
||||
props.row.positionNumber !== null
|
||||
? `(${props.row.positionNumber})`
|
||||
: ""
|
||||
? `(${props.row.positionNumber})`
|
||||
: ""
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -461,7 +623,20 @@ watch(containStatus, () => {
|
|||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="col.name === 'reportingDate' && col.value !== '-'">
|
||||
<template v-else-if="col.name === 'positionCandidate'">
|
||||
<div
|
||||
class="text-weight-medium"
|
||||
v-if="props.row.positionCandidate == null"
|
||||
>
|
||||
-
|
||||
</div>
|
||||
<div class="text-weight-medium" v-else>
|
||||
{{ props.row.positionCandidate }}
|
||||
</div>
|
||||
</template>
|
||||
<template
|
||||
v-else-if="col.name === 'reportingDate' && col.value !== '-'"
|
||||
>
|
||||
<div class="text-weight-medium">
|
||||
{{ props.row.reportingDate }}
|
||||
</div>
|
||||
|
|
@ -471,6 +646,11 @@ watch(containStatus, () => {
|
|||
{{ props.row.bmaOfficer !== null ? props.row.bmaOfficer : "-" }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="col.name === 'draft'">
|
||||
<div class="text-weight-medium">
|
||||
{{ props.row.draft }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="col.name === 'statusName'">
|
||||
<div class="text-weight-medium">
|
||||
{{ props.row.statusName }}
|
||||
|
|
@ -478,45 +658,120 @@ watch(containStatus, () => {
|
|||
</template>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn icon="mdi-dots-vertical" size="12px" color="grey-7" flat round dense>
|
||||
<q-btn
|
||||
icon="mdi-dots-vertical"
|
||||
size="12px"
|
||||
color="grey-7"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
>
|
||||
<q-menu transition-show="jump-down" transition-hide="jump-up">
|
||||
<q-list dense style="min-width: 100px">
|
||||
<q-item v-if="roleAdmin && props.row.statusId === 'UN-CONTAIN'" clickable v-close-popup
|
||||
@click="openAppointModal(props.row.personalId)">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-icon color="primary" size="xs" name="mdi-bookmark-outline" />
|
||||
<q-item
|
||||
v-if="
|
||||
(roleAdmin && props.row.statusId === 'UN-CONTAIN') ||
|
||||
props.row.draft === 'รอส่งตัว'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openAppointModal(props.row.personalId)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-icon
|
||||
color="primary"
|
||||
size="xs"
|
||||
name="mdi-bookmark-outline"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>เลือกหน่วยงานที่รับบรรจุ</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-separator />
|
||||
<q-item v-if="roleAdmin && props.row.statusId === 'UN-CONTAIN'" clickable v-close-popup
|
||||
@click="editDetail(props.row, 'deferment')">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-icon color="blue" size="xs" name="mdi-account-alert-outline" />
|
||||
<q-item
|
||||
v-if="roleAdmin && props.row.statusId === 'UN-CONTAIN'"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="editDetail(props.row, 'deferment')"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-icon
|
||||
color="blue"
|
||||
size="xs"
|
||||
name="mdi-account-alert-outline"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>ขอผ่อนผัน</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-else-if="props.row.deferment === true &&
|
||||
props.row.statusId != 'DISCLAIM'
|
||||
" clickable v-close-popup @click="editDetail(props.row, 'defermentInfo')">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-icon color="blue" size="xs" name="mdi-account-details-outline" />
|
||||
<q-item
|
||||
v-else-if="
|
||||
props.row.deferment === true &&
|
||||
props.row.statusId != 'DISCLAIM'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="editDetail(props.row, 'defermentInfo')"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-icon
|
||||
color="blue"
|
||||
size="xs"
|
||||
name="mdi-account-details-outline"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>ข้อมูลการผ่อนผัน</q-item-section>
|
||||
</q-item>
|
||||
<q-separator />
|
||||
<q-item v-if="props.row.statusId === 'UN-CONTAIN' ||
|
||||
props.row.statusId === 'PREPARE-CONTAIN'
|
||||
" clickable v-close-popup @click="editDetail(props.row, 'disclaim')">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-icon color="pink" size="xs" name="mdi-account-cancel-outline" />
|
||||
<q-item
|
||||
v-if="
|
||||
props.row.statusId === 'UN-CONTAIN' ||
|
||||
props.row.statusId === 'PREPARE-CONTAIN'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="editDetail(props.row, 'disclaim')"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-icon
|
||||
color="pink"
|
||||
size="xs"
|
||||
name="mdi-account-cancel-outline"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>สละสิทธิ์</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-else-if="props.row.statusId === 'DISCLAIM'" clickable v-close-popup
|
||||
@click="editDetail(props.row, 'disclaimInfo')">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-icon color="pink" size="xs" name="mdi-account-cancel-outline" />
|
||||
<q-item
|
||||
v-else-if="props.row.statusId === 'DISCLAIM'"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="editDetail(props.row, 'disclaimInfo')"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-icon
|
||||
color="pink"
|
||||
size="xs"
|
||||
name="mdi-account-cancel-outline"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>ข้อมูลการสละสิทธิ์</q-item-section>
|
||||
</q-item>
|
||||
|
|
@ -530,25 +785,58 @@ watch(containStatus, () => {
|
|||
</q-form>
|
||||
|
||||
<!-- เลือกหน่วยงานที่บรรจุ -->
|
||||
<DialogOrgTree v-model:modal="appointModal" :personalId="personalId" :close="clickCloseModalTree" />
|
||||
<DialogOrgTree
|
||||
v-model:modal="appointModal"
|
||||
:personalId="personalId"
|
||||
:close="clickCloseModalTree"
|
||||
:personal="personal"
|
||||
/>
|
||||
|
||||
<!-- popup ขอผ่อนผัน / สละสิทธิ์ -->
|
||||
<q-form ref="myForm">
|
||||
<DialogCard v-model:Modal="modal" :personal-id="personalId" :close="clickClose" :validate="validateData" />
|
||||
<DialogCard
|
||||
v-model:Modal="modal"
|
||||
:personal-id="personalId"
|
||||
:close="clickClose"
|
||||
:validate="validateData"
|
||||
/>
|
||||
</q-form>
|
||||
<q-dialog v-model="modalDefermentDisclaim" persistent>
|
||||
<q-card style="width: 800px">
|
||||
<q-form ref="myForm">
|
||||
<DialogHeader :title="`${modalDisclaim ? 'สละสิทธิ์' : 'ขอผ่อนผัน'} ชื่อ${Name}`" :close="clickClose" />
|
||||
<DialogHeader
|
||||
:title="`${modalDisclaim ? 'สละสิทธิ์' : 'ขอผ่อนผัน'} ชื่อ${Name}`"
|
||||
:close="clickClose"
|
||||
/>
|
||||
<q-separator />
|
||||
<q-card-section class="q-p-sm">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-input :class="getClass(edit)" hide-bottom-space :outlined="edit" dense lazy-rules
|
||||
:rules="[(val) => !!val || 'กรุณากรอกเหตุผล']" :readonly="!edit" :borderless="!edit" v-model="userNote"
|
||||
:label="`${'กรอกเหตุผล'}`" @update:model-value="clickEditRow" type="textarea" />
|
||||
<q-file v-if="getNumFile === 1" v-model="files" dense :label="`${'เลือกไฟล์เอกสารหลักฐาน'}`" outlined
|
||||
use-chips :rules="[(val) => !!val || 'กรุณาเลือกไฟล์เอกสารหลักฐาน']" multiple
|
||||
@update:model-value="clickEditRow" class="q-py-sm">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:rules="[(val) => !!val || 'กรุณากรอกเหตุผล']"
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="userNote"
|
||||
:label="`${'กรอกเหตุผล'}`"
|
||||
@update:model-value="clickEditRow"
|
||||
type="textarea"
|
||||
/>
|
||||
<q-file
|
||||
v-if="getNumFile === 1"
|
||||
v-model="files"
|
||||
dense
|
||||
:label="`${'เลือกไฟล์เอกสารหลักฐาน'}`"
|
||||
outlined
|
||||
use-chips
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกไฟล์เอกสารหลักฐาน']"
|
||||
multiple
|
||||
@update:model-value="clickEditRow"
|
||||
class="q-py-sm"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" color="primary" />
|
||||
</template>
|
||||
|
|
@ -556,7 +844,11 @@ watch(containStatus, () => {
|
|||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<DialogFooter :editvisible="true" :validate="validateData" :save="modalDisclaim ? saveDisclaim : saveDeferment" />
|
||||
<DialogFooter
|
||||
:editvisible="true"
|
||||
:validate="validateData"
|
||||
:save="modalDisclaim ? saveDisclaim : saveDeferment"
|
||||
/>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
|
@ -565,7 +857,10 @@ watch(containStatus, () => {
|
|||
<q-dialog v-model="modalwaitInfo" persistent>
|
||||
<q-card style="width: 500px; max-width: 500px">
|
||||
<q-form ref="myForm">
|
||||
<DialogHeader :title="`${modalDisclaim ? 'สละสิทธิ์' : 'ขอผ่อนผัน'} ชื่อ${Name}`" :close="clickClose" />
|
||||
<DialogHeader
|
||||
:title="`${modalDisclaim ? 'สละสิทธิ์' : 'ขอผ่อนผัน'} ชื่อ${Name}`"
|
||||
:close="clickClose"
|
||||
/>
|
||||
<q-separator />
|
||||
<q-card-section class="q-p-sm">
|
||||
<div class="row">
|
||||
|
|
@ -575,8 +870,17 @@ watch(containStatus, () => {
|
|||
<div v-if="!modalDisclaim" class="row q-pt-md">
|
||||
<div class="col-3 text-grey-7 q-mt-sm">เอกสารหลักฐาน</div>
|
||||
<div class="col-2 q-mt-sm">
|
||||
<q-btn type="a" :href="dataInfo.reliefDoc" color="primary" flat dense round size="14px" icon="mdi-download"
|
||||
target="_blank" />
|
||||
<q-btn
|
||||
type="a"
|
||||
:href="dataInfo.reliefDoc"
|
||||
color="primary"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
size="14px"
|
||||
icon="mdi-download"
|
||||
target="_blank"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
|
@ -584,6 +888,241 @@ watch(containStatus, () => {
|
|||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<!-- dialog เพิ่มรายชื่อ -->
|
||||
<q-dialog v-model="modaladdlist">
|
||||
<q-card style="width: 900px; max-width: 80vw">
|
||||
<q-card-section>
|
||||
<q-toolbar class="q-py-md">
|
||||
<q-toolbar-title class="header-text text-weight-bolder"
|
||||
>ส่งรายชื่อไปยังหน่วยงาน
|
||||
</q-toolbar-title>
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="modaladdlist = false"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/>
|
||||
</q-toolbar>
|
||||
</q-card-section>
|
||||
<q-card-section class="q-pt-none">
|
||||
<div class="row justify-end">
|
||||
<div class="col-5">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
debounce="300"
|
||||
v-model="filterlistAdd"
|
||||
placeholder="ค้นหา"
|
||||
style="width: 850px; max-width: auto"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
<q-select
|
||||
v-model="visibleColumnslist"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
class="gt-xs q-ml-sm"
|
||||
/>
|
||||
</q-toolbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-table
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
:rows="rowsFilter"
|
||||
:columns="columns"
|
||||
:filter="filterlistAdd"
|
||||
row-key="name"
|
||||
class="custom-header-table"
|
||||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
:pagination-label="paginationLabel"
|
||||
:visible-columns="visibleColumnslist"
|
||||
>
|
||||
<template v-slot:header-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
/>
|
||||
</template>
|
||||
<!-- <template v-slot:body-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
/>
|
||||
</template> -->
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td>
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
class="cursor-pointer"
|
||||
>
|
||||
<template v-if="col.name === 'position'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</template>
|
||||
<template
|
||||
v-else-if="col.name === 'fullName'"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
<div class="row col-12 text-no-wrap items-center">
|
||||
<img
|
||||
v-if="props.row.avatar == null"
|
||||
src="@/assets/avatar_user.jpg"
|
||||
class="col-4 img-info"
|
||||
/>
|
||||
<img
|
||||
v-else
|
||||
:src="props.row.avatar"
|
||||
class="col-4 img-info"
|
||||
/>
|
||||
<div class="col-4">
|
||||
<div class="text-weight-medium">{{ props.row.name }}</div>
|
||||
<div class="text-weight-light">
|
||||
{{ props.row.idCard }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="col.name === 'examNumber'">
|
||||
<div class="text-weight-medium">
|
||||
{{
|
||||
props.row.examNumber !== null ? props.row.examNumber : "-"
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-else-if="col.name === 'organizationName'">
|
||||
<div
|
||||
v-if="
|
||||
props.row.orgName !== null ||
|
||||
props.row.positionPath !== null
|
||||
"
|
||||
>
|
||||
<div class="col-4">
|
||||
<div class="text-weight-medium">
|
||||
{{
|
||||
props.row.orgName !== null ? props.row.orgName : "-"
|
||||
}}
|
||||
{{
|
||||
props.row.organizationShortName !== null
|
||||
? `(${props.row.organizationShortName})`
|
||||
: ""
|
||||
}}
|
||||
</div>
|
||||
<div class="text-weight-light">
|
||||
{{
|
||||
props.row.positionPath !== null
|
||||
? props.row.positionPath
|
||||
: "-"
|
||||
}}
|
||||
{{
|
||||
props.row.positionNumber !== null
|
||||
? `(${props.row.positionNumber})`
|
||||
: ""
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="col-4">
|
||||
<div class="text-weight-medium">-</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="col.name === 'positionCandidate'">
|
||||
<div
|
||||
class="text-weight-medium"
|
||||
v-if="props.row.positionCandidate == null"
|
||||
>
|
||||
-
|
||||
</div>
|
||||
<div class="text-weight-medium" v-else>
|
||||
{{ props.row.positionCandidate }}
|
||||
</div>
|
||||
</template>
|
||||
<template
|
||||
v-else-if="col.name === 'reportingDate' && col.value !== '-'"
|
||||
>
|
||||
<div class="text-weight-medium">
|
||||
{{ props.row.reportingDate }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="col.name === 'bmaOfficer'">
|
||||
<div class="text-weight-medium">
|
||||
{{
|
||||
props.row.bmaOfficer !== null ? props.row.bmaOfficer : "-"
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="col.name === 'draft'">
|
||||
<div class="text-weight-medium">
|
||||
{{ props.row.draft }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="col.name === 'statusName'">
|
||||
<div class="text-weight-medium">
|
||||
{{ props.row.statusName }}
|
||||
</div>
|
||||
</template>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="pagination.page"
|
||||
color="primary"
|
||||
:max="scope.pagesNumber"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</q-table>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
<q-btn
|
||||
flat
|
||||
label="ยืนยันการส่งตัว"
|
||||
@click="savelist"
|
||||
:disable="checkSelected"
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -1,44 +1,97 @@
|
|||
<template>
|
||||
<div class="q-px-md q-pb-md">
|
||||
<div class="col-12 row q-py-sm">
|
||||
<q-toggle v-if="roleAdmin === false" class="col-xs-12 col-sm-5 col-md-5 toggle-expired-account"
|
||||
:model-value="containStatus" color="blue" label="แสดงสถานะบรรจุแล้ว" @update:model-value="updateContain" />
|
||||
<q-toggle
|
||||
v-if="roleAdmin === false"
|
||||
class="col-xs-12 col-sm-5 col-md-5 toggle-expired-account"
|
||||
:model-value="containStatus"
|
||||
color="blue"
|
||||
label="แสดงสถานะบรรจุแล้ว"
|
||||
@update:model-value="updateContain"
|
||||
/>
|
||||
<div>
|
||||
<q-btn flat round color="primary" icon="mdi-account-arrow-right" @click="updateModaladdlist" />
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="items-center" style="display: flex">
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
:model-value="inputfilter"
|
||||
ref="filterRef"
|
||||
@update:model-value="updateInput"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
class="q-ml-sm"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="inputfilter == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="inputfilter !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
<!-- แสดง table ใน คอลัมน์ -->
|
||||
<q-select
|
||||
:model-value="inputvisible"
|
||||
@update:model-value="updateVisible"
|
||||
:display-value="$q.lang.table.columns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
:options="attrs.columns"
|
||||
options-dense
|
||||
option-value="name"
|
||||
map-options
|
||||
emit-value
|
||||
style="min-width: 150px"
|
||||
class="gt-xs q-ml-sm"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-space />
|
||||
<div class="items-center" style="display: flex">
|
||||
<q-input standout dense :model-value="inputfilter" ref="filterRef" @update:model-value="updateInput" outlined
|
||||
debounce="300" placeholder="ค้นหา" style="max-width: 200px" class="q-ml-sm">
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="inputfilter == ''" name="search" />
|
||||
<q-icon v-if="inputfilter !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
||||
</template>
|
||||
</q-input>
|
||||
<!-- แสดง table ใน คอลัมน์ -->
|
||||
<q-select :model-value="inputvisible" @update:model-value="updateVisible" :display-value="$q.lang.table.columns"
|
||||
multiple outlined dense :options="attrs.columns" options-dense option-value="name" map-options emit-value
|
||||
style="min-width: 150px" class="gt-xs q-ml-sm" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-table ref="table" flat bordered class="custom-header-table" v-bind="attrs" virtual-scroll
|
||||
:virtual-scroll-sticky-size-start="48" dense :pagination-label="paginationLabel" v-model:pagination="pagination">
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination v-model="pagination.page" active-color="primary" color="dark" :max="scope.pagesNumber" :max-pages="5" size="sm"
|
||||
boundary-links direction-links></q-pagination>
|
||||
</template>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
<q-th auto-width v-if="history == true" />
|
||||
</q-tr>
|
||||
</template>
|
||||
<template #body="props">
|
||||
<slot v-bind="props" name="columns"></slot>
|
||||
</template>
|
||||
</q-table>
|
||||
</div>
|
||||
<q-table
|
||||
ref="table"
|
||||
flat
|
||||
bordered
|
||||
class="custom-header-table"
|
||||
v-bind="attrs"
|
||||
virtual-scroll
|
||||
:virtual-scroll-sticky-size-start="48"
|
||||
dense
|
||||
:pagination-label="paginationLabel"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="pagination.page"
|
||||
active-color="primary"
|
||||
color="dark"
|
||||
:max="scope.pagesNumber"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
<q-th auto-width v-if="history == true" />
|
||||
</q-tr>
|
||||
</template>
|
||||
<template #body="props">
|
||||
<slot v-bind="props" name="columns"></slot>
|
||||
</template>
|
||||
</q-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
|
@ -55,6 +108,7 @@ const props = defineProps({
|
|||
inputvisibleFilter: String,
|
||||
editvisible: Boolean,
|
||||
titleText: String,
|
||||
modaladdlist: Boolean,
|
||||
optionsFilter: {
|
||||
type: Array,
|
||||
defualt: [],
|
||||
|
|
@ -134,7 +188,7 @@ const props = defineProps({
|
|||
default: () => console.log("not function"),
|
||||
},
|
||||
containStatus: Boolean,
|
||||
roleAdmin: Boolean
|
||||
roleAdmin: Boolean,
|
||||
});
|
||||
const pagination = ref({
|
||||
sortBy: "number",
|
||||
|
|
@ -158,7 +212,8 @@ const emit = defineEmits([
|
|||
"update:editvisible",
|
||||
"update:titleText",
|
||||
"update:inputvisibleFilter",
|
||||
"update:containfilter"
|
||||
"update:containfilter",
|
||||
"update-modaladdlist",
|
||||
]);
|
||||
|
||||
const updateInput = (value: any) => {
|
||||
|
|
@ -177,6 +232,9 @@ const resetFilter = () => {
|
|||
emit("update:inputfilter", "");
|
||||
filterRef.value.focus();
|
||||
};
|
||||
const updateModaladdlist = () => {
|
||||
emit("update-modaladdlist", true);
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.icon-color {
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer" @click="router.push(`/probation/work/1`)">
|
||||
<q-tr :props="props" class="cursor-pointer" @click="router.push(`/probation/form`)">
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ const probationDetail = () =>
|
|||
import("@/modules/05_placement/components/probation/ProbationDetail.vue");
|
||||
|
||||
const probationForm = () =>
|
||||
import("@/modules/05_placement/components/probation/form.vue");
|
||||
import("@/modules/05_placement/components/probation/MainDetail.vue");
|
||||
|
||||
const probationWorkAdd = () =>
|
||||
import("@/modules/05_placement/components/probation/MainDetail.vue");
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm">
|
||||
<div class="q-pa-md">
|
||||
<q-item to="/insignia/report/report-01" tag="q-item" dense>
|
||||
<q-item to="/insignia/report/report-01" dense class="hover-green">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="primary" name="mdi-file" size="xs" />
|
||||
</q-item-section>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item to="/insignia/report/report-02" dense>
|
||||
<q-item to="/insignia/report/report-01" dense class="hover-green">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="primary" name="mdi-file" size="xs" />
|
||||
</q-item-section>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item to="/insignia/report/report-03" dense>
|
||||
<q-item to="/insignia/report/report-01" dense class="hover-green">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="primary" name="mdi-file" size="xs" />
|
||||
</q-item-section>
|
||||
|
|
@ -38,4 +38,8 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scope></style>
|
||||
<style lang="scss" scope>
|
||||
.q-item.hover-green:hover {
|
||||
background-color: #d5f1ee;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,47 @@
|
|||
interface FormRegistryEmployee {
|
||||
no: string;
|
||||
name: string;
|
||||
positionNum: string;
|
||||
id: string;
|
||||
fullname: String;
|
||||
fullnameOld: String;
|
||||
oc: String;
|
||||
position: string;
|
||||
path: string;
|
||||
type: string;
|
||||
level: string;
|
||||
affiliation: string;
|
||||
yearly: number;
|
||||
pay: string;
|
||||
positionPathSide: String;
|
||||
positionLine: String;
|
||||
govAge: number;
|
||||
refSalary: String;
|
||||
positionEmployeePosition: String | null;
|
||||
positionEmployeePositionSide: String | null;
|
||||
positionEmployeeGroup: String | null;
|
||||
age: String;
|
||||
amount: String;
|
||||
dateAppoint: String | null;
|
||||
dateStart: String | null;
|
||||
createdAt: String | null;
|
||||
// salaryDate: String | null;
|
||||
isLeave: String;
|
||||
// leaveReason: string;
|
||||
leaveDateOrder: String | null;
|
||||
}
|
||||
export type { FormRegistryEmployee };
|
||||
interface ResponseEmployeeTemp {
|
||||
id: string;
|
||||
fullname: String;
|
||||
fullnameOld: String;
|
||||
oc: String;
|
||||
position: string;
|
||||
positionPathSide: String;
|
||||
positionLine: String;
|
||||
govAge: number;
|
||||
refSalary: String;
|
||||
positionEmployeePosition: String | null;
|
||||
positionEmployeePositionSide: String | null;
|
||||
positionEmployeeGroup: String | null;
|
||||
age: String;
|
||||
amount: String;
|
||||
dateAppoint: Date | null;
|
||||
dateStart: Date | null;
|
||||
createdAt: Date | null;
|
||||
salaryDate: Date | null;
|
||||
isLeave: boolean;
|
||||
leaveReason: string;
|
||||
leaveDateOrder: Date | null;
|
||||
}
|
||||
export type { ResponseEmployeeTemp, FormRegistryEmployee };
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
</q-input>
|
||||
<!-- แสดงคอลัมน์ใน table -->
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
v-model="visibleColumnsEmployeeTemp"
|
||||
:display-value="$q.lang.table.columns"
|
||||
multiple
|
||||
outlined
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
dense
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:visible-columns="visibleColumns"
|
||||
:visible-columns="visibleColumnsEmployeeTemp"
|
||||
:filter="filter"
|
||||
row-key="name"
|
||||
class="custom-header-table"
|
||||
|
|
@ -75,33 +75,58 @@
|
|||
<q-td key="no" :props="props">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
<q-td key="positionNum" :props="props">
|
||||
{{ props.row.positionNum }}
|
||||
<q-td key="fullname" :props="props">
|
||||
{{ props.row.fullname }}
|
||||
</q-td>
|
||||
<q-td key="name" :props="props">
|
||||
{{ props.row.name }}
|
||||
<q-td key="positionEmployeePosition" :props="props">
|
||||
{{ props.row.positionEmployeePosition }}
|
||||
</q-td>
|
||||
<q-td key="position" :props="props">
|
||||
{{ props.row.position }}
|
||||
<q-td key="positionEmployeePositionSide" :props="props">
|
||||
{{ props.row.positionEmployeePositionSide }}
|
||||
</q-td>
|
||||
<q-td key="path" :props="props">
|
||||
{{ props.row.path }}
|
||||
<q-td key="positionLine" :props="props">
|
||||
{{ props.row.positionLine }}
|
||||
</q-td>
|
||||
<q-td key="type" :props="props">
|
||||
{{ props.row.type }}
|
||||
<q-td key="positionEmployeeGroup" :props="props">
|
||||
{{ props.row.positionEmployeeGroup }}
|
||||
</q-td>
|
||||
<q-td key="level" :props="props">
|
||||
{{ props.row.level }}
|
||||
<q-td key="oc" :props="props">
|
||||
{{ props.row.oc }}
|
||||
</q-td>
|
||||
<q-td key="affiliation" :props="props">
|
||||
{{ props.row.affiliation }}
|
||||
<q-td key="amount" :props="props">
|
||||
{{ props.row.amount }}
|
||||
</q-td>
|
||||
<q-td key="yearly" :props="props">
|
||||
{{ props.row.yearly }}
|
||||
<q-td key="govAge" :props="props">
|
||||
{{ props.row.govAge }}
|
||||
</q-td>
|
||||
<q-td key="pay" :props="props">
|
||||
{{ props.row.pay }}
|
||||
<q-td key="dateAppoint" :props="props">
|
||||
{{ props.row.dateAppoint }}
|
||||
</q-td>
|
||||
<q-td key="dateStart" :props="props">
|
||||
{{ props.row.dateStart }}
|
||||
</q-td>
|
||||
<q-td key="salaryDate" :props="props">
|
||||
{{ props.row.salaryDate }}
|
||||
</q-td>
|
||||
<q-td key="refSalary" :props="props">
|
||||
{{ props.row.refSalary }}
|
||||
</q-td>
|
||||
<q-td key="age" :props="props">
|
||||
{{ props.row.age }}
|
||||
</q-td>
|
||||
<q-td key="fullnameOld" :props="props">
|
||||
{{ props.row.fullnameOld }}
|
||||
</q-td>
|
||||
<q-td key="createdAt" :props="props">
|
||||
{{ props.row.createdAt }}
|
||||
</q-td>
|
||||
<q-td key="isLeave" :props="props">
|
||||
{{ props.row.isLeave }}
|
||||
</q-td>
|
||||
<q-td key="leaveDateOrder" :props="props">
|
||||
{{ props.row.leaveDateOrder }}
|
||||
</q-td>
|
||||
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
icon="mdi-dots-vertical"
|
||||
|
|
@ -169,7 +194,11 @@
|
|||
</q-table>
|
||||
</div>
|
||||
</q-card>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card flat bordered class="col-12 q-mt-sm q-pt-sm q-pa-md"> </q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
|
@ -179,7 +208,11 @@ import { useRouter } from "vue-router";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import type { treeTab } from "@/modules/05_placement/interface/index/Main";
|
||||
import { FormRegistryEmployee } from "@/modules/08_registryEmployee/request/Main.ts";
|
||||
import {
|
||||
FormRegistryEmployee,
|
||||
ResponseEmployeeTemp,
|
||||
} from "@/modules/08_registryEmployee/request/Main.ts";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
|
||||
const props = defineProps({
|
||||
next: {
|
||||
|
|
@ -194,20 +227,16 @@ const props = defineProps({
|
|||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { dialogMessage, messageError, showLoader, hideLoader } = mixin;
|
||||
|
||||
const { typeRetire, success, messageError, showLoader, hideLoader, date2Thai } =
|
||||
mixin;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const router = useRouter();
|
||||
const myForm = ref<QForm>();
|
||||
const filterRef = ref<QInput>();
|
||||
const filter = ref<string>("");
|
||||
const mutiselect = ref([]);
|
||||
const selected = ref<string>("");
|
||||
const modal = ref<boolean>(false);
|
||||
const search = ref<string>("");
|
||||
const expanded = ref<string[]>([]);
|
||||
const nodesTree = ref<treeTab[]>([]);
|
||||
const send = ref<String[]>([]);
|
||||
const selectedModal = ref([]);
|
||||
const filterModal = ref<string>("");
|
||||
const visibleColumnsModal = ref<String[]>(["no", "positionNum", "name"]);
|
||||
const columnsModal = [
|
||||
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
|
||||
|
|
@ -227,12 +256,6 @@ const columnsModal = [
|
|||
},
|
||||
];
|
||||
|
||||
const paginationModal = ref({
|
||||
sortBy: "desc",
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
const pagination = ref({
|
||||
sortBy: "desc",
|
||||
descending: false,
|
||||
|
|
@ -242,231 +265,270 @@ const pagination = ref({
|
|||
|
||||
const visibleColumns = ref<String[]>([
|
||||
"no",
|
||||
"positionNum",
|
||||
"name",
|
||||
"position",
|
||||
"path",
|
||||
"type",
|
||||
"level",
|
||||
"affiliation",
|
||||
"yearly",
|
||||
"pay",
|
||||
"fullname",
|
||||
"fullnameOld",
|
||||
"oc",
|
||||
"positionEmployeePosition",
|
||||
"positionEmployeePositionSide",
|
||||
"positionLine",
|
||||
"govAge",
|
||||
"positionEmployeeGroup",
|
||||
"dateAppoint",
|
||||
"refSalary",
|
||||
"dateStart",
|
||||
"createdAt",
|
||||
"salaryDate",
|
||||
"age",
|
||||
"amount",
|
||||
"isLeave",
|
||||
"leaveDateOrder",
|
||||
]);
|
||||
|
||||
const visibleColumnsEmployeeTemp = ref<String[]>([]);
|
||||
visibleColumnsEmployeeTemp.value = [
|
||||
"no",
|
||||
"fullname",
|
||||
"fullnameOld",
|
||||
"oc",
|
||||
"positionEmployeePosition",
|
||||
"positionEmployeePositionSide",
|
||||
"positionLine",
|
||||
"govAge",
|
||||
"positionEmployeeGroup",
|
||||
"dateAppoint",
|
||||
"refSalary",
|
||||
"dateStart",
|
||||
"createdAt",
|
||||
"salaryDate",
|
||||
"age",
|
||||
"amount",
|
||||
"isLeave",
|
||||
"leaveDateOrder",
|
||||
];
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
|
||||
{
|
||||
name: "name",
|
||||
name: "no",
|
||||
align: "left",
|
||||
label: "ลำดับ",
|
||||
sortable: true,
|
||||
field: "no",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: "base",
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: "fullname",
|
||||
align: "left",
|
||||
label: "ชื่อ-สกุล",
|
||||
field: "name",
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: "positionNum",
|
||||
align: "left",
|
||||
label: "ตำแหน่งเลขที่",
|
||||
field: "positionNum",
|
||||
sortable: true,
|
||||
field: "fullname",
|
||||
headerStyle: "font-size: 14px; min-width: 200px",
|
||||
style: "font-size: 14px; ",
|
||||
},
|
||||
|
||||
{
|
||||
name: "position",
|
||||
name: "positionEmployeePosition",
|
||||
align: "left",
|
||||
label: "ตำแหน่ง",
|
||||
field: "position",
|
||||
sortable: true,
|
||||
field: "positionEmployeePosition",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: "base",
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: "path",
|
||||
name: "positionEmployeePositionSide",
|
||||
align: "left",
|
||||
label: "ด้านของตำแหน่ง",
|
||||
sortable: true,
|
||||
field: "positionEmployeePositionSide",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: "base",
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: "positionLine",
|
||||
align: "left",
|
||||
label: "สายงาน",
|
||||
field: "path",
|
||||
sortable: true,
|
||||
field: "positionLine",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: "base",
|
||||
}),
|
||||
},
|
||||
|
||||
{
|
||||
name: "type",
|
||||
name: "positionEmployeeGroup",
|
||||
align: "left",
|
||||
label: "ประเภท",
|
||||
field: "type",
|
||||
label: "กลุ่มงาน",
|
||||
sortable: true,
|
||||
field: "positionEmployeeGroup",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: "base",
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: "level",
|
||||
align: "left",
|
||||
label: "ระดับชั้นงาน",
|
||||
field: "level",
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: "affiliation",
|
||||
name: "oc",
|
||||
align: "left",
|
||||
label: "สังกัด",
|
||||
field: "affiliation",
|
||||
sortable: true,
|
||||
field: "oc",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: "base",
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: "yearly",
|
||||
align: "left",
|
||||
label: "ปีงบประมาณ",
|
||||
field: "yearly",
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: "pay",
|
||||
name: "amount",
|
||||
align: "left",
|
||||
label: "ค่าจ้าง",
|
||||
field: "pay",
|
||||
sortable: true,
|
||||
field: "amount",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: "base",
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: "govAge",
|
||||
align: "left",
|
||||
label: "อายุราชการ(ปี)",
|
||||
sortable: true,
|
||||
field: "govAge",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: "base",
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: "dateAppoint",
|
||||
align: "left",
|
||||
label: "วันที่จ้าง",
|
||||
sortable: true,
|
||||
field: "dateAppoint",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
// sort: (a: string, b: string) =>
|
||||
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "dateStart",
|
||||
align: "left",
|
||||
label: "วันที่เริ่มปฎิบัติราชการ",
|
||||
sortable: true,
|
||||
field: "dateStart",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
// sort: (a: string, b: string) =>
|
||||
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "salaryDate",
|
||||
align: "left",
|
||||
label: "วันที่แต่งตั้ง",
|
||||
sortable: true,
|
||||
field: "salaryDate",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
// sort: (a: string, b: string) =>
|
||||
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "refSalary",
|
||||
align: "left",
|
||||
label: "เอกสารอ้างอิง",
|
||||
sortable: true,
|
||||
field: "refSalary",
|
||||
headerStyle: "font-size: 14px; min-width: 200px",
|
||||
style: "font-size: 14px; ",
|
||||
},
|
||||
{
|
||||
name: "age",
|
||||
align: "left",
|
||||
label: "อายุ",
|
||||
sortable: true,
|
||||
field: "age",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: "base",
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: "fullnameOld",
|
||||
align: "left",
|
||||
label: "ชื่อ-สกุล(เดิม)",
|
||||
sortable: true,
|
||||
field: "fullnameOld",
|
||||
headerStyle: "font-size: 14px; min-width: 200px",
|
||||
style: "font-size: 14px; ",
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
label: "วันที่สร้าง",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
// sort: (a: string, b: string) =>
|
||||
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "isLeave",
|
||||
align: "left",
|
||||
label: "สถานะ",
|
||||
sortable: true,
|
||||
field: "isLeave",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
// sort: (a: string, b: string) =>
|
||||
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "leaveDateOrder",
|
||||
align: "left",
|
||||
label: "วันที่พ้นราชการ",
|
||||
sortable: true,
|
||||
field: "leaveDateOrder",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
// sort: (a: string, b: string) =>
|
||||
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
]);
|
||||
|
||||
const rows = ref<FormRegistryEmployee[]>([
|
||||
{
|
||||
no: "0ac56905-1a74-4606-a120-233340adde95",
|
||||
name: "นางนัทธ์ เหล่าสกุล",
|
||||
positionNum: "สกก.3",
|
||||
position: "นักบริหาร",
|
||||
path: "บริหาร",
|
||||
type: "บริหาร",
|
||||
level: "ชำนาญการพิเศษ",
|
||||
affiliation: "ฝ่ายบริหารงานทั่วไป",
|
||||
yearly: 2565,
|
||||
pay: "40,000",
|
||||
},
|
||||
{
|
||||
no: "0ac56905-1a74-4606-a120-233340adde95",
|
||||
name: "นายภูวนัย ต้นทอง",
|
||||
positionNum: "กทม.2",
|
||||
position: "นักบริหาร",
|
||||
path: "บริหาร",
|
||||
type: "บริหาร",
|
||||
level: "ชำนาญการพิเศษ",
|
||||
affiliation: "ฝ่ายบริหารงานทั่วไป",
|
||||
yearly: 2565,
|
||||
pay: "35,000",
|
||||
},
|
||||
{
|
||||
no: "0ac56905-1a74-4606-a120-233340adde95",
|
||||
name: "นางปริศนา ตรีวุฒิ",
|
||||
positionNum: "กบห.3",
|
||||
position: "นักบริหาร",
|
||||
path: "บริหาร",
|
||||
type: "บริหาร",
|
||||
level: "ชำนาญการพิเศษ",
|
||||
affiliation: "ฝ่ายบริหารงานทั่วไป",
|
||||
yearly: 2565,
|
||||
pay: "38,000",
|
||||
},
|
||||
{
|
||||
no: "0ac56905-1a74-4606-a120-233340adde95",
|
||||
name: "นางเมษา เกียรติบวรสกุล ",
|
||||
positionNum: "สกก.3",
|
||||
position: "นักบริหาร",
|
||||
path: "บริหาร",
|
||||
type: "บริหาร",
|
||||
level: "ชำนาญการพิเศษ",
|
||||
affiliation: "ฝ่ายบริหารงานทั่วไป",
|
||||
yearly: 2565,
|
||||
pay: "25,000",
|
||||
},
|
||||
{
|
||||
no: "0ac56905-1a74-4606-a120-233340adde95",
|
||||
name: "นางพริมา พงศ์พินิจ",
|
||||
positionNum: "สกก.3",
|
||||
position: "นักบริหาร",
|
||||
path: "บริหาร",
|
||||
type: "บริหาร",
|
||||
level: "ชำนาญการพิเศษ",
|
||||
affiliation: "ฝ่ายบริหารงานทั่วไป",
|
||||
yearly: 2565,
|
||||
pay: "30,000",
|
||||
},
|
||||
{
|
||||
no: "0ac56905-1a74-4606-a120-233340adde95",
|
||||
name: "นางพรพักตร์ พาใจขวัญ",
|
||||
positionNum: "สกก.3",
|
||||
position: "นักบริหาร",
|
||||
path: "บริหาร",
|
||||
type: "บริหาร",
|
||||
level: "ชำนาญการพิเศษ",
|
||||
affiliation: "ฝ่ายบริหารงานทั่วไป",
|
||||
yearly: 2565,
|
||||
pay: "40,000",
|
||||
},
|
||||
{
|
||||
no: "0ac56905-1a74-4606-a120-233340adde95",
|
||||
name: "นางชลธิมา คมสกุล ",
|
||||
positionNum: "สกก.3",
|
||||
position: "นักบริหาร",
|
||||
path: "บริหาร",
|
||||
type: "บริหาร",
|
||||
level: "ชำนาญการพิเศษ",
|
||||
affiliation: "ฝ่ายบริหารงานทั่วไป",
|
||||
yearly: 2565,
|
||||
pay: "15,000",
|
||||
},
|
||||
{
|
||||
no: "0ac56905-1a74-4606-a120-233340adde95",
|
||||
name: "นางนัทธ์ เหล่าสกุล",
|
||||
positionNum: "สกก.3",
|
||||
position: "นักบริหาร",
|
||||
path: "บริหาร",
|
||||
type: "บริหาร",
|
||||
level: "ชำนาญการพิเศษ",
|
||||
affiliation: "ฝ่ายบริหารงานทั่วไป",
|
||||
yearly: 2565,
|
||||
pay: "40,000",
|
||||
},
|
||||
{
|
||||
no: "0ac56905-1a74-4606-a120-233340adde95",
|
||||
name: "นางนัทธ์ เหล่าสกุล",
|
||||
positionNum: "สกก.3",
|
||||
position: "นักบริหาร",
|
||||
path: "บริหาร",
|
||||
type: "บริหาร",
|
||||
level: "ชำนาญการพิเศษ",
|
||||
affiliation: "ฝ่ายบริหารงานทั่วไป",
|
||||
yearly: 2565,
|
||||
pay: "40,000",
|
||||
},
|
||||
{
|
||||
no: "0ac56905-1a74-4606-a120-233340adde95",
|
||||
name: "นางนัทธ์ เหล่าสกุล",
|
||||
positionNum: "สกก.3",
|
||||
position: "นักบริหาร",
|
||||
path: "บริหาร",
|
||||
type: "บริหาร",
|
||||
level: "ชำนาญการพิเศษ",
|
||||
affiliation: "ฝ่ายบริหารงานทั่วไป",
|
||||
yearly: 2565,
|
||||
pay: "17,000",
|
||||
},
|
||||
{
|
||||
no: "0ac56905-1a74-4606-a120-233340adde95",
|
||||
name: "นางนัทธ์ เหล่าสกุล",
|
||||
positionNum: "สกก.3",
|
||||
position: "นักบริหาร",
|
||||
path: "บริหาร",
|
||||
type: "บริหาร",
|
||||
level: "ชำนาญการพิเศษ",
|
||||
affiliation: "ฝ่ายบริหารงานทั่วไป",
|
||||
yearly: 2565,
|
||||
pay: "40,000",
|
||||
},
|
||||
{
|
||||
no: "0ac56905-1a74-4606-a120-233340adde95",
|
||||
name: "นางนัทธ์ เหล่าสกุล",
|
||||
positionNum: "สกก.3",
|
||||
position: "นักบริหาร",
|
||||
path: "บริหาร",
|
||||
type: "บริหาร",
|
||||
level: "ชำนาญการพิเศษ",
|
||||
affiliation: "ฝ่ายบริหารงานทั่วไป",
|
||||
yearly: 2565,
|
||||
pay: "20,250",
|
||||
},
|
||||
]);
|
||||
|
||||
const rows = ref<FormRegistryEmployee[]>([]);
|
||||
onMounted(async () => {
|
||||
await nodeTree();
|
||||
});
|
||||
|
|
@ -522,7 +584,7 @@ const clickAdd = () => {
|
|||
};
|
||||
|
||||
const editDetail = (id: string) => {
|
||||
router.push({ name: "" });
|
||||
modal.value = true;
|
||||
};
|
||||
|
||||
const clickDelete = (id: string) => {
|
||||
|
|
@ -536,7 +598,19 @@ const clickDelete = (id: string) => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
await deleteData(id);
|
||||
loaderPage(true);
|
||||
await http
|
||||
.delete(config.API.profileInforId(id))
|
||||
.then((res) => {
|
||||
success($q, "ลบข้อมูลการสอบสำเร็จ");
|
||||
showEmployeeTemp();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
});
|
||||
})
|
||||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
|
|
@ -548,16 +622,76 @@ const nodeTree = async () => {
|
|||
.get(config.API.profileOrganizRoot)
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
nodesTree.value = data;
|
||||
if (data.length > 0) {
|
||||
expanded.value = [data[0].id];
|
||||
selected.value = data[0].id;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await showEmployeeTemp();
|
||||
});
|
||||
};
|
||||
|
||||
const showEmployeeTemp = async () => {
|
||||
let cirteria = [];
|
||||
|
||||
cirteria.push({
|
||||
criteriaType: "employee_class",
|
||||
criteriaValue: "temp",
|
||||
});
|
||||
|
||||
cirteria.push({
|
||||
criteriaType: "is_retire",
|
||||
criteriaValue: "false",
|
||||
});
|
||||
|
||||
if (selected.value == null || selected.value == "") return;
|
||||
loaderPage(true);
|
||||
await http
|
||||
.post(config.API.searchProfileByOcId(selected.value, "all"), {
|
||||
criterias: cirteria,
|
||||
})
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
rows.value = [];
|
||||
data.map((e: ResponseEmployeeTemp) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
fullname: e.fullname,
|
||||
fullnameOld: e.fullnameOld,
|
||||
position: e.position,
|
||||
positionPathSide: e.positionPathSide,
|
||||
positionLine: e.positionLine,
|
||||
govAge: e.govAge,
|
||||
positionEmployeePosition: e.positionEmployeePosition,
|
||||
positionEmployeePositionSide: e.positionEmployeePositionSide,
|
||||
positionEmployeeGroup: e.positionEmployeeGroup,
|
||||
oc: e.oc,
|
||||
age: e.age,
|
||||
amount: e.amount == null ? "" : e.amount.toLocaleString(),
|
||||
refSalary: e.refSalary,
|
||||
dateAppoint:
|
||||
e.dateAppoint == null ? null : date2Thai(new Date(e.dateAppoint)),
|
||||
dateStart:
|
||||
e.dateStart == null ? null : date2Thai(new Date(e.dateStart)),
|
||||
createdAt:
|
||||
e.createdAt == null ? null : date2Thai(new Date(e.createdAt)),
|
||||
isLeave: e.isLeave == false ? "ครอง" : `${typeRetire(e.leaveReason)}`,
|
||||
leaveDateOrder:
|
||||
e.leaveDateOrder == null
|
||||
? null
|
||||
: date2Thai(new Date(e.leaveDateOrder)),
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -754,7 +754,7 @@ if (keycloak.tokenParsed != null) {
|
|||
:to="{ name: `${subMenu2.path}` }"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label class="font-400"
|
||||
<q-item-label class="font-400 subLabel"
|
||||
>{{ subMenu2.label }}
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
|
@ -942,9 +942,12 @@ if (keycloak.tokenParsed != null) {
|
|||
.expan2 .q-item {
|
||||
padding-left: 10%;
|
||||
}
|
||||
/* .menuSubAct {
|
||||
background: #1e2529d9;
|
||||
} */
|
||||
.subLabel{
|
||||
white-space: nowrap;
|
||||
width: 160px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.font-400 {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue