API อัตรากำลังลูกจ้างประจำฯ
This commit is contained in:
parent
5debc893e6
commit
2b3388c189
7 changed files with 77 additions and 519 deletions
|
|
@ -80,4 +80,5 @@ export default {
|
||||||
orgPosSortEmp: `${orgEmployeePos}/sort`,
|
orgPosSortEmp: `${orgEmployeePos}/sort`,
|
||||||
orgPosPositionEmpById: (id: string) => `${orgEmployeePos}/position/${id}`,
|
orgPosPositionEmpById: (id: string) => `${orgEmployeePos}/position/${id}`,
|
||||||
orgPosMoveEmp: `${orgEmployeePos}/move`,
|
orgPosMoveEmp: `${orgEmployeePos}/move`,
|
||||||
|
orgProfileEmp: `${orgEmployeePos}/profile`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -157,10 +157,15 @@ async function fetchPosition(id: string) {
|
||||||
.get(config.API.orgPosPositionEmpById(id))
|
.get(config.API.orgPosPositionEmpById(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
formData.prefixNo = data.posMasterNoPrefix;
|
formData.prefixNo = data.posMasterNoPrefix;
|
||||||
formData.positionNo = data.posMasterNo;
|
formData.positionNo = data.posMasterNo;
|
||||||
formData.suffixNo = data.posMasterNoSuffix;
|
formData.suffixNo = data.posMasterNoSuffix;
|
||||||
rows.value = data.positions;
|
rows.value = data.positions.map((e: any) => ({
|
||||||
|
...e,
|
||||||
|
posDictName: e.positionName,
|
||||||
|
}));
|
||||||
|
console.log(rows.value);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -306,6 +311,8 @@ function deletePos(id: string) {
|
||||||
|
|
||||||
function clearFormPositionSelect() {
|
function clearFormPositionSelect() {
|
||||||
isDisValidate.value = true;
|
isDisValidate.value = true;
|
||||||
|
search.value = "";
|
||||||
|
type.value = "positionName";
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
isDisValidate.value = false;
|
isDisValidate.value = false;
|
||||||
|
|
@ -315,12 +322,12 @@ function clearFormPositionSelect() {
|
||||||
function close() {
|
function close() {
|
||||||
props.close?.();
|
props.close?.();
|
||||||
isPosition.value = false;
|
isPosition.value = false;
|
||||||
|
clearFormPositionSelect();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function emitSearch(keyword: string, typeSelect: string) {
|
async function emitSearch(keyword: string, typeSelect: string) {
|
||||||
search.value = await keyword;
|
search.value = keyword;
|
||||||
type.value = await typeSelect;
|
type.value = typeSelect;
|
||||||
|
|
||||||
await searchInput();
|
await searchInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,11 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watch } from "vue";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
|
|
||||||
/** import type*/
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import type {
|
|
||||||
FormDetailPosition,
|
|
||||||
Position,
|
|
||||||
} from "@/modules/16_positionEmployee/interface/index/organizational";
|
|
||||||
|
|
||||||
/** importComponents*/
|
/** importComponents*/
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
/** importStore*/
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
|
||||||
|
|
||||||
/**use*/
|
/**use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const store = usePositionEmp();
|
|
||||||
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
|
||||||
|
|
||||||
/**Props*/
|
/**Props*/
|
||||||
const modal = defineModel<boolean>("positionDetail", { required: true });
|
const modal = defineModel<boolean>("positionDetail", { required: true });
|
||||||
|
|
@ -30,144 +13,10 @@ const prosp = defineProps({
|
||||||
dataDetailPos: { type: Object, require: true },
|
dataDetailPos: { type: Object, require: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
/** formData*/
|
|
||||||
const formData = reactive<FormDetailPosition>({
|
|
||||||
positionNo: "", //*เลขที่ตำแหน่ง
|
|
||||||
positionType: "", //*ตำแหน่งประเภท
|
|
||||||
positionPathSide: "", //*ตำแหน่งในสายงาน
|
|
||||||
positionLine: "", //*สายงาน
|
|
||||||
positionSide: "", //*ด้าน/สาขา
|
|
||||||
positionLevel: "", //*ระดับตำแหน่ง
|
|
||||||
positionExecutive: "", //*ตำแหน่งทางการบริหาร
|
|
||||||
positionExecutiveSide: "", //*ด้านทางการบริหาร
|
|
||||||
status: "", //*สถานะตำแหน่ง
|
|
||||||
});
|
|
||||||
|
|
||||||
// const columns = ref<QTableProps["columns"]>([
|
|
||||||
// {
|
|
||||||
// name: "no",
|
|
||||||
// align: "left",
|
|
||||||
// label: "ลำดับ",
|
|
||||||
// sortable: false,
|
|
||||||
// field: "no",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "positionName",
|
|
||||||
// align: "left",
|
|
||||||
// label: "ตำแหน่งในสายงาน",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "positionName",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "positionField",
|
|
||||||
// align: "left",
|
|
||||||
// label: "สายงาน",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "positionField",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "posTypeName",
|
|
||||||
// align: "left",
|
|
||||||
// label: "ประเภทตำเเหน่ง",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "posTypeName",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "posLevelName",
|
|
||||||
// align: "left",
|
|
||||||
// label: "ระดับตำแหน่ง",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "posLevelName",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "posExecutiveName",
|
|
||||||
// align: "left",
|
|
||||||
// label: "ตำแหน่งทางการบริหาร",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "posExecutiveName",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "positionExecutiveField",
|
|
||||||
// align: "left",
|
|
||||||
// label: "ด้านทางการบริหาร",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "positionExecutiveField",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "positionArea",
|
|
||||||
// align: "left",
|
|
||||||
// label: "ด้าน/สาขา",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "positionArea",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// ]);
|
|
||||||
// const row = ref<Position[]>([]);
|
|
||||||
|
|
||||||
/** function ปิด popup*/
|
/** function ปิด popup*/
|
||||||
function close() {
|
function close() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** callblack function ทำเมื่อเปิด popup set เลขที่ตำแหน่ง และสถานะตำแหน่ง */
|
|
||||||
watch(
|
|
||||||
() => modal.value,
|
|
||||||
() => {
|
|
||||||
if (modal.value == true) {
|
|
||||||
if (prosp.dataDetailPos) {
|
|
||||||
formData.positionNo = prosp.dataDetailPos.posMasterNo;
|
|
||||||
formData.status =
|
|
||||||
store.typeOrganizational === "current"
|
|
||||||
? "ปกติ"
|
|
||||||
: store.typeOrganizational === "draft"
|
|
||||||
? "แบบร่าง"
|
|
||||||
: "ยุบเลิก";
|
|
||||||
formData.positionType = prosp.dataDetailPos.posTypeName;
|
|
||||||
formData.positionPathSide = prosp.dataDetailPos.positionName;
|
|
||||||
formData.positionLine = prosp.dataDetailPos.positionField;
|
|
||||||
formData.positionSide = prosp.dataDetailPos.positionArea
|
|
||||||
? prosp.dataDetailPos.positionArea
|
|
||||||
: "-";
|
|
||||||
formData.positionLevel = prosp.dataDetailPos.posLevelName;
|
|
||||||
formData.positionExecutive = prosp.dataDetailPos.posExecutiveName
|
|
||||||
? prosp.dataDetailPos.posExecutiveName
|
|
||||||
: "-";
|
|
||||||
formData.positionExecutiveSide = prosp.dataDetailPos
|
|
||||||
.positionExecutiveField
|
|
||||||
? prosp.dataDetailPos.positionExecutiveField
|
|
||||||
: "-";
|
|
||||||
|
|
||||||
// row.value = prosp.dataDetailPos.positions.map((e: Position) => ({
|
|
||||||
// ...e,
|
|
||||||
// positionName: e.positionName ? e.positionName : "-",
|
|
||||||
// positionField: e.positionField ? e.positionField : "-",
|
|
||||||
// posTypeName: e.posTypeName ? e.posTypeName : "-",
|
|
||||||
// posLevelName: e.posLevelName ? e.posLevelName : "-",
|
|
||||||
// posExecutiveName: e.posExecutiveName ? e.posExecutiveName : "-",
|
|
||||||
// positionExecutiveField: e.positionExecutiveField
|
|
||||||
// ? e.positionExecutiveField
|
|
||||||
// : "-",
|
|
||||||
// positionArea: e.positionArea ? e.positionArea : "-",
|
|
||||||
// }));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -177,146 +26,48 @@ watch(
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="q-px-md">
|
<div class="q-px-md">
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
<!-- <div class="row q-col-gutter-sm q-mb-xs">
|
||||||
<div class="col-4 text-bold">
|
<div class="col-4 text-bold">
|
||||||
<div>
|
<div>
|
||||||
<p>เลขที่ตำแหน่ง</p>
|
<p>เลขที่ตำแหน่ง</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8 text-grey-8">
|
<div class="col-8 text-grey-8">
|
||||||
<p>{{ formData.positionNo }}</p>
|
<p>{{ prosp?.dataDetailPos?.posMasterNo }}</p>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">
|
|
||||||
<div>
|
|
||||||
<p>ตำแหน่งประเภท</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.positionType }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">
|
|
||||||
<div>
|
|
||||||
<p>ตำแหน่งในสายงาน</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.positionPathSide }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">
|
|
||||||
<div>
|
|
||||||
<p>สายงาน</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.positionLine }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">
|
|
||||||
<div>
|
|
||||||
<p>ด้าน/สาขา</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.positionSide }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">
|
|
||||||
<div>
|
|
||||||
<p>ระดับตำแหน่ง</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.positionLevel }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">
|
|
||||||
<div>
|
|
||||||
<p>ตำแหน่งทางการบริหาร</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.positionExecutive }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">
|
|
||||||
<div>
|
|
||||||
<p>ด้านทางการบริหาร</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.positionExecutiveSide }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-4 text-bold">
|
|
||||||
<div>
|
|
||||||
<p>สถานะตำแหน่ง</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-8 text-grey-8">
|
|
||||||
<p>{{ formData.status }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-12">
|
|
||||||
<d-table
|
|
||||||
flat
|
|
||||||
:columns="columns"
|
|
||||||
:rows="row"
|
|
||||||
row-key="id"
|
|
||||||
dense
|
|
||||||
hide-bottom
|
|
||||||
class="custom-header-table-expand"
|
|
||||||
>
|
|
||||||
<template v-slot:header="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-th
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
|
||||||
</q-th>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
|
||||||
<q-td
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
|
||||||
<div v-if="col.name == 'no'">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
<div class="row q-col-gutter-sm q-mb-xs">
|
||||||
|
<div class="col-4 text-bold">
|
||||||
|
<div>
|
||||||
|
<p>กลุ่มงาน</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-8 text-grey-8">
|
||||||
|
<p>{{ prosp?.dataDetailPos?.posTypeName }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row q-col-gutter-sm q-mb-xs">
|
||||||
|
<div class="col-4 text-bold">
|
||||||
|
<div>
|
||||||
|
<p>ตำแหน่ง</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-8 text-grey-8">
|
||||||
|
<p>{{ prosp?.dataDetailPos?.positionName }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row q-col-gutter-sm q-mb-xs">
|
||||||
|
<div class="col-4 text-bold">
|
||||||
|
<div>
|
||||||
|
<p>ระดับชั้นงาน</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-8 text-grey-8">
|
||||||
|
<p>{{ prosp?.dataDetailPos?.posLevelName }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -99,25 +99,17 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "positionName",
|
name: "positionName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งในสายงาน",
|
label: "ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionName",
|
field: "positionName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "positionField",
|
|
||||||
align: "left",
|
|
||||||
label: "สายงาน",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionField",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "posTypeName",
|
name: "posTypeName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ประเภทตำเเหน่ง",
|
label: "กลุ่มงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posTypeName",
|
field: "posTypeName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -126,39 +118,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posLevelName",
|
name: "posLevelName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับตำแหน่ง",
|
label: "ระดับชั้นงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posLevelName",
|
field: "posLevelName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "posExecutiveName",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่งทางการบริหาร",
|
|
||||||
sortable: true,
|
|
||||||
field: "posExecutiveName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionExecutiveField",
|
|
||||||
align: "left",
|
|
||||||
label: "ด้านทางการบริหาร",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionExecutiveField",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionArea",
|
|
||||||
align: "left",
|
|
||||||
label: "ด้าน/สาขา",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionArea",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
const columnsResult = ref<QTableProps["columns"]>([
|
const columnsResult = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -188,28 +153,29 @@ const columnsResult = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "posTypeName",
|
|
||||||
align: "left",
|
|
||||||
label: "ประเภทตำเเหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "posTypeName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "positionName",
|
name: "positionName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งในสายงาน",
|
label: "ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionName",
|
field: "positionName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "posTypeName",
|
||||||
|
align: "left",
|
||||||
|
label: "กลุ่มงาน",
|
||||||
|
sortable: true,
|
||||||
|
field: "posTypeName",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "posLevelName",
|
name: "posLevelName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับตำแหน่ง",
|
label: "ระดับชั้นงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posLevelName",
|
field: "posLevelName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -228,7 +194,7 @@ function close() {
|
||||||
async function fetchType() {
|
async function fetchType() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgPosType)
|
.get(config.API.orgEmployeeType)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
dataLevel.value = res.data.result;
|
dataLevel.value = res.data.result;
|
||||||
typeOpsMain.value = res.data.result.map((e: OptionType) => ({
|
typeOpsMain.value = res.data.result.map((e: OptionType) => ({
|
||||||
|
|
@ -291,7 +257,7 @@ function onSubmit() {
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.post(config.API.orgProfile, body)
|
.post(config.API.orgProfileEmp, body)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
props.fetchDataTable?.(store.treeId, store.level, false);
|
props.fetchDataTable?.(store.treeId, store.level, false);
|
||||||
props.getSummary();
|
props.getSummary();
|
||||||
|
|
@ -543,7 +509,7 @@ watch([() => page.value, () => pageSize.value], () => {
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
for="#position"
|
for="#position"
|
||||||
label="ตำแหน่งในสายงาน"
|
label="ตำแหน่ง"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
|
|
@ -552,7 +518,7 @@ watch([() => page.value, () => pageSize.value], () => {
|
||||||
<q-select
|
<q-select
|
||||||
ref="positionTypeRef"
|
ref="positionTypeRef"
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
label="ประเภทตำแหน่ง"
|
label="กลุ่มงาน"
|
||||||
v-model="formData.positionType"
|
v-model="formData.positionType"
|
||||||
:options="typeOps"
|
:options="typeOps"
|
||||||
emit-value
|
emit-value
|
||||||
|
|
@ -576,7 +542,7 @@ watch([() => page.value, () => pageSize.value], () => {
|
||||||
<q-select
|
<q-select
|
||||||
ref="positionLevelRef"
|
ref="positionLevelRef"
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
label="ระดับตำแหน่ง"
|
label="ระดับชั่นงาน"
|
||||||
v-model="formData.positionLevel"
|
v-model="formData.positionLevel"
|
||||||
:disable="formData.positionType == ''"
|
:disable="formData.positionType == ''"
|
||||||
:options="levelOps"
|
:options="levelOps"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
/** importType*/
|
/** importType*/
|
||||||
import type { ListMenu } from "@/modules/16_positionEmployee/interface/index/Main";
|
|
||||||
import type { OrgTree } from "@/modules/16_positionEmployee/interface/response/organizational";
|
import type { OrgTree } from "@/modules/16_positionEmployee/interface/response/organizational";
|
||||||
import type { DataTree } from "@/modules/16_positionEmployee/interface/index/organizational";
|
import type { DataTree } from "@/modules/16_positionEmployee/interface/index/organizational";
|
||||||
|
|
||||||
|
|
@ -16,14 +16,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = usePositionEmp();
|
const store = usePositionEmp();
|
||||||
const {
|
const {} = useCounterMixin();
|
||||||
dialogRemove,
|
|
||||||
showLoader,
|
|
||||||
hideLoader,
|
|
||||||
messageError,
|
|
||||||
success,
|
|
||||||
date2Thai,
|
|
||||||
} = useCounterMixin();
|
|
||||||
|
|
||||||
/** props*/
|
/** props*/
|
||||||
const nodeTEST = defineModel<OrgTree[]>("nodeTree", { default: [] });
|
const nodeTEST = defineModel<OrgTree[]>("nodeTree", { default: [] });
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "positionName",
|
name: "positionName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งในสายงาน",
|
label: "ตำแหน่ง",
|
||||||
field: "positionName",
|
field: "positionName",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -146,7 +146,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posTypeName",
|
name: "posTypeName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ประเภทตำแหน่ง",
|
label: "กลุ่มงาน",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posTypeName",
|
field: "posTypeName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -155,7 +155,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posLevelName",
|
name: "posLevelName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับตำแหน่ง",
|
label: "ระดับชั้นงาน",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posLevelName",
|
field: "posLevelName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -172,81 +172,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const columnsExpand = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "no",
|
|
||||||
align: "left",
|
|
||||||
label: "ลำดับ",
|
|
||||||
sortable: false,
|
|
||||||
field: "no",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionName",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่งในสายงาน",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionField",
|
|
||||||
align: "left",
|
|
||||||
label: "สายงาน",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionField",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "posTypeName",
|
|
||||||
align: "left",
|
|
||||||
label: "ประเภทตำเเหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "posTypeName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "posLevelName",
|
|
||||||
align: "left",
|
|
||||||
label: "ระดับตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "posLevelName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "posExecutiveName",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่งทางการบริหาร",
|
|
||||||
sortable: true,
|
|
||||||
field: "posExecutiveName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionExecutiveField",
|
|
||||||
align: "left",
|
|
||||||
label: "ด้านทางการบริหาร",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionExecutiveField",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionArea",
|
|
||||||
align: "left",
|
|
||||||
label: "ด้าน/สาขา",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionArea",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const dialogPosition = ref<boolean>(false);
|
const dialogPosition = ref<boolean>(false);
|
||||||
/**
|
/**
|
||||||
* function openPopup เพิ่มอัตรากำลัง
|
* function openPopup เพิ่มอัตรากำลัง
|
||||||
|
|
@ -462,7 +387,7 @@ async function onClickDownloadReport(val: string, name: string) {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
v-if="store.typeOrganizational === 'draft'"
|
v-if="store.typeOrganizational === 'draft'"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -487,7 +412,7 @@ async function onClickDownloadReport(val: string, name: string) {
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-menu>
|
</q-menu>
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-md">
|
<div class="row q-gutter-md">
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -544,17 +469,6 @@ async function onClickDownloadReport(val: string, name: string) {
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<!-- <q-td>
|
|
||||||
<q-btn
|
|
||||||
flat
|
|
||||||
size="14px"
|
|
||||||
color="primary"
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
@click="props.expand = !props.expand"
|
|
||||||
:icon="props.expand ? 'mdi-menu-down' : 'mdi-menu-right'"
|
|
||||||
/>
|
|
||||||
</q-td> -->
|
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{
|
{{
|
||||||
|
|
@ -673,76 +587,6 @@ async function onClickDownloadReport(val: string, name: string) {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
||||||
<!-- <q-tr v-show="props.expand" :props="props">
|
|
||||||
<q-td colspan="100%" class="bg-grey-1">
|
|
||||||
<q-card flat bordered class="text-left q-ma-sm">
|
|
||||||
<d-table
|
|
||||||
flat
|
|
||||||
:columns="columnsExpand"
|
|
||||||
:rows="props.row.positions"
|
|
||||||
table-class="text-grey-9"
|
|
||||||
row-key="id"
|
|
||||||
dense
|
|
||||||
hide-bottom
|
|
||||||
bordered
|
|
||||||
separator="vertical"
|
|
||||||
class="custom-header-table-expand"
|
|
||||||
>
|
|
||||||
<template v-slot:header="props">
|
|
||||||
<q-tr :props="props" class="bg-grey-2">
|
|
||||||
<q-th
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
|
||||||
<span class="q-px-sm text-body2 text-black">{{
|
|
||||||
col.label
|
|
||||||
}}</span>
|
|
||||||
</q-th>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
|
||||||
<q-td
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
|
||||||
<div v-if="col.name == 'no'" class="text-body2">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-else-if="col.name === 'posExecutiveName'"
|
|
||||||
class="text-body2"
|
|
||||||
>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
v-else-if="col.name === 'positionExecutiveField'"
|
|
||||||
class="text-body2"
|
|
||||||
>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
v-else-if="col.name === 'positionArea'"
|
|
||||||
class="text-body2"
|
|
||||||
>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else class="text-body2">
|
|
||||||
{{ col.value }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</q-card>
|
|
||||||
</q-td>
|
|
||||||
</q-tr> -->
|
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
<q-pagination
|
<q-pagination
|
||||||
|
|
|
||||||
|
|
@ -67,13 +67,9 @@ export const usePositionEmp = defineStore("positionEmpStore", () => {
|
||||||
function fetchPosMaster(data: PosMaster[]) {
|
function fetchPosMaster(data: PosMaster[]) {
|
||||||
const newPosMaster = data.map((e: PosMaster) => ({
|
const newPosMaster = data.map((e: PosMaster) => ({
|
||||||
...e,
|
...e,
|
||||||
positionIsSelected:
|
positionIsSelected: e.fullNameCurrentHolder
|
||||||
typeOrganizational.value === "draft" && e.fullNameNextHolder !== null
|
? e.fullNameCurrentHolder
|
||||||
? e.fullNameNextHolder
|
: "ว่าง",
|
||||||
: typeOrganizational.value !== "draft" &&
|
|
||||||
e.fullNameCurrentHolder !== null
|
|
||||||
? e.fullNameCurrentHolder
|
|
||||||
: "ว่าง",
|
|
||||||
posMasterNo:
|
posMasterNo:
|
||||||
e.orgShortname +
|
e.orgShortname +
|
||||||
e.posMasterNoPrefix +
|
e.posMasterNoPrefix +
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue