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