Merge branch 'nice_dev' into develop
This commit is contained in:
commit
6135443d05
7 changed files with 77 additions and 519 deletions
|
|
@ -80,4 +80,5 @@ export default {
|
|||
orgPosSortEmp: `${orgEmployeePos}/sort`,
|
||||
orgPosPositionEmpById: (id: string) => `${orgEmployeePos}/position/${id}`,
|
||||
orgPosMoveEmp: `${orgEmployeePos}/move`,
|
||||
orgProfileEmp: `${orgEmployeePos}/profile`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -157,10 +157,15 @@ async function fetchPosition(id: string) {
|
|||
.get(config.API.orgPosPositionEmpById(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
|
||||
formData.prefixNo = data.posMasterNoPrefix;
|
||||
formData.positionNo = data.posMasterNo;
|
||||
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) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -306,6 +311,8 @@ function deletePos(id: string) {
|
|||
|
||||
function clearFormPositionSelect() {
|
||||
isDisValidate.value = true;
|
||||
search.value = "";
|
||||
type.value = "positionName";
|
||||
|
||||
setTimeout(() => {
|
||||
isDisValidate.value = false;
|
||||
|
|
@ -315,12 +322,12 @@ function clearFormPositionSelect() {
|
|||
function close() {
|
||||
props.close?.();
|
||||
isPosition.value = false;
|
||||
clearFormPositionSelect();
|
||||
}
|
||||
|
||||
async function emitSearch(keyword: string, typeSelect: string) {
|
||||
search.value = await keyword;
|
||||
type.value = await typeSelect;
|
||||
|
||||
search.value = keyword;
|
||||
type.value = typeSelect;
|
||||
await searchInput();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from "vue";
|
||||
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*/
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
||||
|
||||
/**use*/
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const store = usePositionEmp();
|
||||
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
||||
|
||||
/**Props*/
|
||||
const modal = defineModel<boolean>("positionDetail", { required: true });
|
||||
|
|
@ -30,144 +13,10 @@ const prosp = defineProps({
|
|||
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 close() {
|
||||
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>
|
||||
<template>
|
||||
<template>
|
||||
|
|
@ -177,146 +26,48 @@ watch(
|
|||
<q-separator />
|
||||
<q-card-section>
|
||||
<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>
|
||||
<p>เลขที่ตำแหน่ง</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8 text-grey-8">
|
||||
<p>{{ formData.positionNo }}</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>
|
||||
<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>{{ 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>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -99,25 +99,17 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "positionName",
|
||||
align: "left",
|
||||
label: "ตำแหน่งในสายงาน",
|
||||
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: "ประเภทตำเเหน่ง",
|
||||
label: "กลุ่มงาน",
|
||||
sortable: true,
|
||||
field: "posTypeName",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -126,39 +118,12 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "posLevelName",
|
||||
align: "left",
|
||||
label: "ระดับตำแหน่ง",
|
||||
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 columnsResult = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -188,28 +153,29 @@ const columnsResult = ref<QTableProps["columns"]>([
|
|||
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: "positionName",
|
||||
align: "left",
|
||||
label: "ตำแหน่งในสายงาน",
|
||||
label: "ตำแหน่ง",
|
||||
sortable: true,
|
||||
field: "positionName",
|
||||
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: "ระดับตำแหน่ง",
|
||||
label: "ระดับชั้นงาน",
|
||||
sortable: true,
|
||||
field: "posLevelName",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -228,7 +194,7 @@ function close() {
|
|||
async function fetchType() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.orgPosType)
|
||||
.get(config.API.orgEmployeeType)
|
||||
.then((res) => {
|
||||
dataLevel.value = res.data.result;
|
||||
typeOpsMain.value = res.data.result.map((e: OptionType) => ({
|
||||
|
|
@ -291,7 +257,7 @@ function onSubmit() {
|
|||
};
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.orgProfile, body)
|
||||
.post(config.API.orgProfileEmp, body)
|
||||
.then(() => {
|
||||
props.fetchDataTable?.(store.treeId, store.level, false);
|
||||
props.getSummary();
|
||||
|
|
@ -543,7 +509,7 @@ watch([() => page.value, () => pageSize.value], () => {
|
|||
dense
|
||||
outlined
|
||||
for="#position"
|
||||
label="ตำแหน่งในสายงาน"
|
||||
label="ตำแหน่ง"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
/>
|
||||
|
|
@ -552,7 +518,7 @@ watch([() => page.value, () => pageSize.value], () => {
|
|||
<q-select
|
||||
ref="positionTypeRef"
|
||||
:class="inputEdit(isReadonly)"
|
||||
label="ประเภทตำแหน่ง"
|
||||
label="กลุ่มงาน"
|
||||
v-model="formData.positionType"
|
||||
:options="typeOps"
|
||||
emit-value
|
||||
|
|
@ -576,7 +542,7 @@ watch([() => page.value, () => pageSize.value], () => {
|
|||
<q-select
|
||||
ref="positionLevelRef"
|
||||
:class="inputEdit(isReadonly)"
|
||||
label="ระดับตำแหน่ง"
|
||||
label="ระดับชั่นงาน"
|
||||
v-model="formData.positionLevel"
|
||||
:disable="formData.positionType == ''"
|
||||
:options="levelOps"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
/** importType*/
|
||||
import type { ListMenu } from "@/modules/16_positionEmployee/interface/index/Main";
|
||||
|
||||
import type { OrgTree } from "@/modules/16_positionEmployee/interface/response/organizational";
|
||||
import type { DataTree } from "@/modules/16_positionEmployee/interface/index/organizational";
|
||||
|
||||
|
|
@ -16,14 +16,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
/** use*/
|
||||
const $q = useQuasar();
|
||||
const store = usePositionEmp();
|
||||
const {
|
||||
dialogRemove,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
date2Thai,
|
||||
} = useCounterMixin();
|
||||
const {} = useCounterMixin();
|
||||
|
||||
/** props*/
|
||||
const nodeTEST = defineModel<OrgTree[]>("nodeTree", { default: [] });
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "positionName",
|
||||
align: "left",
|
||||
label: "ตำแหน่งในสายงาน",
|
||||
label: "ตำแหน่ง",
|
||||
field: "positionName",
|
||||
sortable: false,
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -146,7 +146,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "posTypeName",
|
||||
align: "left",
|
||||
label: "ประเภทตำแหน่ง",
|
||||
label: "กลุ่มงาน",
|
||||
sortable: false,
|
||||
field: "posTypeName",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -155,7 +155,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "posLevelName",
|
||||
align: "left",
|
||||
label: "ระดับตำแหน่ง",
|
||||
label: "ระดับชั้นงาน",
|
||||
sortable: false,
|
||||
field: "posLevelName",
|
||||
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);
|
||||
/**
|
||||
* function openPopup เพิ่มอัตรากำลัง
|
||||
|
|
@ -462,7 +387,7 @@ async function onClickDownloadReport(val: string, name: string) {
|
|||
</q-btn>
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
<!-- <q-btn
|
||||
v-if="store.typeOrganizational === 'draft'"
|
||||
flat
|
||||
round
|
||||
|
|
@ -487,7 +412,7 @@ async function onClickDownloadReport(val: string, name: string) {
|
|||
</q-list>
|
||||
</q-menu>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
</q-btn> -->
|
||||
<q-space />
|
||||
<div class="row q-gutter-md">
|
||||
<div>
|
||||
|
|
@ -544,17 +469,6 @@ async function onClickDownloadReport(val: string, name: string) {
|
|||
</template>
|
||||
<template v-slot:body="props">
|
||||
<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">
|
||||
<div v-if="col.name == 'no'">
|
||||
{{
|
||||
|
|
@ -673,76 +587,6 @@ async function onClickDownloadReport(val: string, name: string) {
|
|||
</q-btn>
|
||||
</q-td>
|
||||
</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 v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
|
|
|
|||
|
|
@ -67,13 +67,9 @@ export const usePositionEmp = defineStore("positionEmpStore", () => {
|
|||
function fetchPosMaster(data: PosMaster[]) {
|
||||
const newPosMaster = data.map((e: PosMaster) => ({
|
||||
...e,
|
||||
positionIsSelected:
|
||||
typeOrganizational.value === "draft" && e.fullNameNextHolder !== null
|
||||
? e.fullNameNextHolder
|
||||
: typeOrganizational.value !== "draft" &&
|
||||
e.fullNameCurrentHolder !== null
|
||||
? e.fullNameCurrentHolder
|
||||
: "ว่าง",
|
||||
positionIsSelected: e.fullNameCurrentHolder
|
||||
? e.fullNameCurrentHolder
|
||||
: "ว่าง",
|
||||
posMasterNo:
|
||||
e.orgShortname +
|
||||
e.posMasterNoPrefix +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue