แก้ไข แสดงราชชื่อหน่วยงาน กำหนดตำแหน่ง ส่วนรายการแต่งตั้งลูกจ้างประจำ
This commit is contained in:
parent
d58f8e0b85
commit
be0d571361
1 changed files with 207 additions and 60 deletions
|
|
@ -256,10 +256,7 @@ const fecthlistappointment = async () => {
|
||||||
personalId: e.id,
|
personalId: e.id,
|
||||||
citizenId: e.citizenId,
|
citizenId: e.citizenId,
|
||||||
fullname: e.prefix + e.firstname + " " + e.lastname,
|
fullname: e.prefix + e.firstname + " " + e.lastname,
|
||||||
organizationName:
|
organizationName: e.organizationName + " " + e.organizationShortName,
|
||||||
e.organizationName +
|
|
||||||
" " +
|
|
||||||
e.organizationShortName,
|
|
||||||
orgName: e.organizationName,
|
orgName: e.organizationName,
|
||||||
organizationShortName: e.organizationShortName,
|
organizationShortName: e.organizationShortName,
|
||||||
status: statusText(e.status),
|
status: statusText(e.status),
|
||||||
|
|
@ -313,7 +310,6 @@ const fecthTypeOption = async () => {
|
||||||
// เปิดโครงสร้าง
|
// เปิดโครงสร้าง
|
||||||
const openModalEmployee = async (id: string) => {
|
const openModalEmployee = async (id: string) => {
|
||||||
personalId.value = id;
|
personalId.value = id;
|
||||||
|
|
||||||
await getPosition(id);
|
await getPosition(id);
|
||||||
};
|
};
|
||||||
const getPosition = async (id: string) => {
|
const getPosition = async (id: string) => {
|
||||||
|
|
@ -353,16 +349,16 @@ const getPosition = async (id: string) => {
|
||||||
organizationGovernmentAgencyId: r.organizationGovernmentAgencyId,
|
organizationGovernmentAgencyId: r.organizationGovernmentAgencyId,
|
||||||
organizationShortNameId: r.organizationShortNameId,
|
organizationShortNameId: r.organizationShortNameId,
|
||||||
organizationFaxName: r.organizationFaxName,
|
organizationFaxName: r.organizationFaxName,
|
||||||
organizationLevelName: r.organizationLevelName,
|
organizationLevelName: r.organizationLevel,
|
||||||
organizationOrganizationName: r.organizationOrganizationName,
|
organizationOrganizationName: r.organizationOrganization,
|
||||||
organizationTelExternalName: r.organizationTelExternalName,
|
organizationTelExternalName: r.organizationTelExternal,
|
||||||
organizationTelInternalName: r.organizationTelInternalName,
|
organizationTelInternalName: r.organizationTelInternal,
|
||||||
organizationTypeName: r.organizationTypeName,
|
organizationTypeName: r.organizationType,
|
||||||
positionEmployeeStatusName: r.positionEmployeeStatusName,
|
positionEmployeeStatusName: r.positionEmployeeStatus,
|
||||||
positionEmployeeLineName: r.positionEmployeeLineName,
|
positionEmployeeLineName: r.positionEmployeeLine,
|
||||||
positionEmployeePositionName: r.positionEmployeePositionName,
|
positionEmployeePositionName: r.positionEmployeePosition,
|
||||||
organizationAgencyName: r.organizationAgencyName,
|
organizationAgencyName: r.organizationAgencyCode,
|
||||||
organizationGovernmentAgencyName: r.organizationGovernmentAgencyName,
|
organizationGovernmentAgencyName: r.organizationGovernmentAgencyCode,
|
||||||
organizationShortName: r.organizationShortName,
|
organizationShortName: r.organizationShortName,
|
||||||
positionEmployeeLevels: r.positionEmployeeLevels,
|
positionEmployeeLevels: r.positionEmployeeLevels,
|
||||||
positionEmployeePositionSides: r.positionEmployeePositionSides,
|
positionEmployeePositionSides: r.positionEmployeePositionSides,
|
||||||
|
|
@ -374,8 +370,7 @@ const getPosition = async (id: string) => {
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
selectedPosition.value = [data[index]];
|
selectedPosition.value = [data[index]];
|
||||||
}
|
}
|
||||||
|
rowsPosition.value = data;
|
||||||
rowsPosition.value = data;
|
|
||||||
ModalEmployee.value = true;
|
ModalEmployee.value = true;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -488,27 +483,65 @@ const savePosition = async () => {
|
||||||
<div class="row q-pa-md">
|
<div class="row q-pa-md">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<q-btn @click="popup()" size="14px" flat round color="add" icon="mdi-account-arrow-right">
|
<q-btn
|
||||||
|
@click="popup()"
|
||||||
|
size="14px"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="add"
|
||||||
|
icon="mdi-account-arrow-right"
|
||||||
|
>
|
||||||
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-input class="col-xs-12 col-sm-3 col-md-2" standout dense v-model="filterKeyword" ref="filterRef" outlined
|
<q-input
|
||||||
debounce="300" placeholder="ค้นหา">
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
|
standout
|
||||||
|
dense
|
||||||
|
v-model="filterKeyword"
|
||||||
|
ref="filterRef"
|
||||||
|
outlined
|
||||||
|
debounce="300"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
<q-icon v-if="filterKeyword !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
<q-icon
|
||||||
|
v-if="filterKeyword !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
<q-select v-model="visibleColumns" multiple outlined dense options-dense :display-value="$q.lang.table.columns"
|
<q-select
|
||||||
emit-value map-options :options="columns" option-value="name" options-cover style="min-width: 150px"
|
v-model="visibleColumns"
|
||||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm" />
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="columns"
|
||||||
|
option-value="name"
|
||||||
|
options-cover
|
||||||
|
style="min-width: 150px"
|
||||||
|
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 q-pt-sm">
|
<div class="col-12 q-pt-sm">
|
||||||
<d-table :columns="columns" :rows="rows" :filter="filterKeyword" row-key="citizenId"
|
<d-table
|
||||||
:visible-columns="visibleColumns" v-model:pagination="pagination">
|
:columns="columns"
|
||||||
|
:rows="rows"
|
||||||
|
:filter="filterKeyword"
|
||||||
|
row-key="citizenId"
|
||||||
|
:visible-columns="visibleColumns"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
|
|
@ -519,19 +552,38 @@ const savePosition = async () => {
|
||||||
</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 key="no" :props="props" @click="nextPage(props.row.personalId)">
|
<q-td
|
||||||
|
key="no"
|
||||||
|
:props="props"
|
||||||
|
@click="nextPage(props.row.personalId)"
|
||||||
|
>
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="citizenId" :props="props" @click="nextPage(props.row.personalId)">
|
<q-td
|
||||||
|
key="citizenId"
|
||||||
|
:props="props"
|
||||||
|
@click="nextPage(props.row.personalId)"
|
||||||
|
>
|
||||||
{{ props.row.citizenId }}
|
{{ props.row.citizenId }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="fullname" :props="props" @click="nextPage(props.row.personalId)">
|
<q-td
|
||||||
|
key="fullname"
|
||||||
|
:props="props"
|
||||||
|
@click="nextPage(props.row.personalId)"
|
||||||
|
>
|
||||||
{{ props.row.fullname }}
|
{{ props.row.fullname }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="organizationName" :props="props" @click="nextPage(props.row.personalId)">
|
<q-td
|
||||||
<div v-if="props.row.orgName !== null ||
|
key="organizationName"
|
||||||
props.row.positionPath !== null
|
:props="props"
|
||||||
">
|
@click="nextPage(props.row.personalId)"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
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">
|
||||||
{{
|
{{
|
||||||
|
|
@ -539,8 +591,8 @@ const savePosition = async () => {
|
||||||
}}
|
}}
|
||||||
{{
|
{{
|
||||||
props.row.organizationShortName !== null
|
props.row.organizationShortName !== null
|
||||||
? `(${props.row.organizationShortName})`
|
? `(${props.row.organizationShortName})`
|
||||||
: ""
|
: ""
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -551,29 +603,73 @@ const savePosition = async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="birthday" :props="props" @click="nextPage(props.row.personalId)">
|
<q-td
|
||||||
|
key="birthday"
|
||||||
|
:props="props"
|
||||||
|
@click="nextPage(props.row.personalId)"
|
||||||
|
>
|
||||||
{{ props.row.birthday }}
|
{{ props.row.birthday }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="createdAt" :props="props" @click="nextPage(props.row.personalId)">
|
<q-td
|
||||||
|
key="createdAt"
|
||||||
|
:props="props"
|
||||||
|
@click="nextPage(props.row.personalId)"
|
||||||
|
>
|
||||||
{{ props.row.createdAt }}
|
{{ props.row.createdAt }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="status" :props="props" @click="nextPage(props.row.personalId)">
|
<q-td
|
||||||
|
key="status"
|
||||||
|
:props="props"
|
||||||
|
@click="nextPage(props.row.personalId)"
|
||||||
|
>
|
||||||
{{ props.row.status }}
|
{{ props.row.status }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn v-if="props.row.status !== 'ส่งรายชื่อไปออกคำสั่ง' &&
|
<q-btn
|
||||||
props.row.status !== 'ออกคำสั่งแล้ว'
|
v-if="
|
||||||
" icon="mdi-dots-vertical" size="12px" color="grey-7" flat round dense>
|
props.row.status !== 'ส่งรายชื่อไปออกคำสั่ง' &&
|
||||||
<q-menu transition-show="jump-down" transition-hide="jump-up">
|
props.row.status !== 'ออกคำสั่งแล้ว'
|
||||||
|
"
|
||||||
|
icon="mdi-dots-vertical"
|
||||||
|
size="12px"
|
||||||
|
color="grey-7"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
>
|
||||||
|
<q-menu
|
||||||
|
transition-show="jump-down"
|
||||||
|
transition-hide="jump-up"
|
||||||
|
>
|
||||||
<q-list dense style="min-width: 200px">
|
<q-list dense style="min-width: 200px">
|
||||||
<q-item clickable v-close-popup @click="openModalEmployee(props.row.personalId)">
|
<q-item
|
||||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
clickable
|
||||||
<q-icon color="primary" size="xs" name="mdi-bookmark-outline" />
|
v-close-popup
|
||||||
|
@click="openModalEmployee(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-item clickable v-close-popup @click="clickDelete(props.row.personalId)">
|
<q-item
|
||||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="clickDelete(props.row.personalId)"
|
||||||
|
>
|
||||||
|
<q-item-section
|
||||||
|
style="min-width: 0px"
|
||||||
|
avatar
|
||||||
|
class="q-py-sm"
|
||||||
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
<q-icon color="red" size="xs" name="mdi-delete" />
|
<q-icon color="red" size="xs" name="mdi-delete" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
@ -598,37 +694,88 @@ const savePosition = async () => {
|
||||||
<div class="row justify-end">
|
<div class="row justify-end">
|
||||||
<div class="col-5">
|
<div class="col-5">
|
||||||
<q-toolbar style="padding: 0">
|
<q-toolbar style="padding: 0">
|
||||||
<q-input borderless outlined dense ref="filterRef" debounce="300" v-model="filterKeyword2"
|
<q-input
|
||||||
placeholder="ค้นหา" style="width: 850px; max-width: auto">
|
borderless
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
ref="filterRef"
|
||||||
|
debounce="300"
|
||||||
|
v-model="filterKeyword2"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
style="width: 850px; max-width: auto"
|
||||||
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
||||||
<q-icon v-if="filterKeyword2 !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
<q-icon
|
||||||
|
v-if="filterKeyword2 !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<q-select v-model="visibleColumnsPosition" multiple outlined dense options-dense
|
<q-select
|
||||||
:display-value="$q.lang.table.columns" emit-value map-options :options="columnsPosition"
|
v-model="visibleColumnsPosition"
|
||||||
option-value="name" options-cover style="min-width: 150px" class="gt-xs q-ml-sm" />
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="columnsPosition"
|
||||||
|
option-value="name"
|
||||||
|
options-cover
|
||||||
|
style="min-width: 150px"
|
||||||
|
class="gt-xs q-ml-sm"
|
||||||
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<d-table :rows="rowsPosition" :columns="columnsPosition" :filter="filterKeyword2" row-key="id" selection="single"
|
<d-table
|
||||||
v-model:selected="selectedPosition" :visible-columns="visibleColumnsPosition">
|
:rows="rowsPosition"
|
||||||
|
:columns="columnsPosition"
|
||||||
|
:filter="filterKeyword2"
|
||||||
|
row-key="id"
|
||||||
|
selection="single"
|
||||||
|
v-model:selected="selectedPosition"
|
||||||
|
:visible-columns="visibleColumnsPosition"
|
||||||
|
>
|
||||||
<template v-slot:body-selection="scope">
|
<template v-slot:body-selection="scope">
|
||||||
<q-checkbox keep-color color="primary" dense v-model="scope.selected" />
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
v-model="scope.selected"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-actions align="right">
|
<q-card-actions align="right">
|
||||||
<q-btn dense unelevated label="บันทึก" color="public" @click="checkSave" class="q-px-md">
|
<q-btn
|
||||||
|
dense
|
||||||
|
unelevated
|
||||||
|
label="บันทึก"
|
||||||
|
color="public"
|
||||||
|
@click="checkSave"
|
||||||
|
class="q-px-md"
|
||||||
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
<Dialogbody v-model:Modal="modal" :clickClose="clickClose" :optionsType="optionsType" :rows2="rows2"
|
<Dialogbody
|
||||||
v-model:filterKeyword2="filterKeyword2" v-model:type="type" :nextPage="nextPage"
|
v-model:Modal="modal"
|
||||||
:fecthlistappointment="fecthlistappointment" />
|
:clickClose="clickClose"
|
||||||
|
:optionsType="optionsType"
|
||||||
|
:rows2="rows2"
|
||||||
|
v-model:filterKeyword2="filterKeyword2"
|
||||||
|
v-model:type="type"
|
||||||
|
:nextPage="nextPage"
|
||||||
|
:fecthlistappointment="fecthlistappointment"
|
||||||
|
/>
|
||||||
<!-- <DialogOrgTree
|
<!-- <DialogOrgTree
|
||||||
v-model:modal="modalTree"
|
v-model:modal="modalTree"
|
||||||
:close="closeModalTree"
|
:close="closeModalTree"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue