no message
This commit is contained in:
parent
6b80d6804f
commit
9ce455e100
5 changed files with 752 additions and 200 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: string) => `${placement}/position/${id}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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 () => {
|
||||||
|
|
@ -61,6 +62,7 @@ const loadTreeData = async () => {
|
||||||
.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 +77,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,6 +116,7 @@ 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) => {
|
||||||
|
|
@ -160,9 +164,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 +223,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[]>([
|
||||||
|
|
@ -354,11 +358,42 @@ 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>();
|
||||||
|
|
||||||
|
watch(props, () => {
|
||||||
|
const dataPersonal = props.personal;
|
||||||
|
if (dataPersonal) {
|
||||||
|
dataPersonal.map((data: any) => {
|
||||||
|
personal.value = data;
|
||||||
|
});
|
||||||
|
console.log("personal", personal.value);
|
||||||
|
}
|
||||||
|
if (personal.value.draft === false) {
|
||||||
|
const findData = dataRespone.value.find(findByPerson);
|
||||||
|
console.log(findData);
|
||||||
|
loadTreeData();
|
||||||
|
selectedPosition(findData.children.children.children)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const findByPerson = (obj: any) => {
|
||||||
|
if (
|
||||||
|
obj.positionLineId === personal.value.positionLineId &&
|
||||||
|
obj.positionTypeId === personal.value.positionTypeId &&
|
||||||
|
obj.positionNumId === personal.value.posNoId
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj.children && obj.children.length > 0) {
|
||||||
|
obj.children = obj.children.find(findByPerson);
|
||||||
|
return obj.children;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
</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: 700px; max-width: 80vw">
|
||||||
<q-form ref="myFormPosition">
|
<q-form ref="myFormPosition">
|
||||||
<DialogHeader title="เลือกหน่วยงานที่รับบรรจุ" :close="closeModal" />
|
<DialogHeader title="เลือกหน่วยงานที่รับบรรจุ" :close="closeModal" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
@ -510,7 +545,7 @@ const checkPosition = (val: string) => {
|
||||||
<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 +567,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 +585,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 +599,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 +613,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 +628,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 +642,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 +656,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 +672,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 +687,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 +703,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 +720,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,15 @@ 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 columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
|
@ -81,11 +84,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 +103,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 +132,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 +183,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 +255,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((res) => {
|
||||||
|
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 +296,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 +407,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 +465,94 @@ 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 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(() => {
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</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 +560,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 +601,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 +624,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 +636,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 +763,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 +822,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 +835,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 +848,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 +866,180 @@ watch(containStatus, () => {
|
||||||
</q-form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
|
<!-- dialog เพิ่มรายชื่อ -->
|
||||||
|
<q-dialog v-model="modaladdlist">
|
||||||
|
<q-card style="width: 850px; max-width: 80vw">
|
||||||
|
<q-card-section>
|
||||||
|
<div class="text-h6">ส่งรายชื่อไปยังหน่วยงาน</div>
|
||||||
|
</q-card-section>
|
||||||
|
<q-card-section class="q-pt-none">
|
||||||
|
<q-table
|
||||||
|
flat
|
||||||
|
bordered
|
||||||
|
dense
|
||||||
|
:rows="rowsFilter"
|
||||||
|
:columns="columns"
|
||||||
|
row-key="name"
|
||||||
|
class="custom-header-table"
|
||||||
|
selection="multiple"
|
||||||
|
v-model:selected="selected"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
</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 {
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue