แก้ไข แสดงราชชื่อหน่วยงาน กำหนดตำแหน่ง ส่วนรายการแต่งตั้งลูกจ้างประจำ
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,
|
||||
citizenId: e.citizenId,
|
||||
fullname: e.prefix + e.firstname + " " + e.lastname,
|
||||
organizationName:
|
||||
e.organizationName +
|
||||
" " +
|
||||
e.organizationShortName,
|
||||
organizationName: e.organizationName + " " + e.organizationShortName,
|
||||
orgName: e.organizationName,
|
||||
organizationShortName: e.organizationShortName,
|
||||
status: statusText(e.status),
|
||||
|
|
@ -313,7 +310,6 @@ const fecthTypeOption = async () => {
|
|||
// เปิดโครงสร้าง
|
||||
const openModalEmployee = async (id: string) => {
|
||||
personalId.value = id;
|
||||
|
||||
await getPosition(id);
|
||||
};
|
||||
const getPosition = async (id: string) => {
|
||||
|
|
@ -353,16 +349,16 @@ const getPosition = async (id: string) => {
|
|||
organizationGovernmentAgencyId: r.organizationGovernmentAgencyId,
|
||||
organizationShortNameId: r.organizationShortNameId,
|
||||
organizationFaxName: r.organizationFaxName,
|
||||
organizationLevelName: r.organizationLevelName,
|
||||
organizationOrganizationName: r.organizationOrganizationName,
|
||||
organizationTelExternalName: r.organizationTelExternalName,
|
||||
organizationTelInternalName: r.organizationTelInternalName,
|
||||
organizationTypeName: r.organizationTypeName,
|
||||
positionEmployeeStatusName: r.positionEmployeeStatusName,
|
||||
positionEmployeeLineName: r.positionEmployeeLineName,
|
||||
positionEmployeePositionName: r.positionEmployeePositionName,
|
||||
organizationAgencyName: r.organizationAgencyName,
|
||||
organizationGovernmentAgencyName: r.organizationGovernmentAgencyName,
|
||||
organizationLevelName: r.organizationLevel,
|
||||
organizationOrganizationName: r.organizationOrganization,
|
||||
organizationTelExternalName: r.organizationTelExternal,
|
||||
organizationTelInternalName: r.organizationTelInternal,
|
||||
organizationTypeName: r.organizationType,
|
||||
positionEmployeeStatusName: r.positionEmployeeStatus,
|
||||
positionEmployeeLineName: r.positionEmployeeLine,
|
||||
positionEmployeePositionName: r.positionEmployeePosition,
|
||||
organizationAgencyName: r.organizationAgencyCode,
|
||||
organizationGovernmentAgencyName: r.organizationGovernmentAgencyCode,
|
||||
organizationShortName: r.organizationShortName,
|
||||
positionEmployeeLevels: r.positionEmployeeLevels,
|
||||
positionEmployeePositionSides: r.positionEmployeePositionSides,
|
||||
|
|
@ -374,8 +370,7 @@ const getPosition = async (id: string) => {
|
|||
if (index >= 0) {
|
||||
selectedPosition.value = [data[index]];
|
||||
}
|
||||
|
||||
rowsPosition.value = data;
|
||||
rowsPosition.value = data;
|
||||
ModalEmployee.value = true;
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -488,27 +483,65 @@ const savePosition = async () => {
|
|||
<div class="row q-pa-md">
|
||||
<div class="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-btn>
|
||||
|
||||
<q-space />
|
||||
<q-input class="col-xs-12 col-sm-3 col-md-2" standout dense v-model="filterKeyword" ref="filterRef" outlined
|
||||
debounce="300" placeholder="ค้นหา">
|
||||
<q-input
|
||||
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>
|
||||
<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>
|
||||
</q-input>
|
||||
|
||||
<q-select v-model="visibleColumns" 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" />
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
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 class="col-12 q-pt-sm">
|
||||
<d-table :columns="columns" :rows="rows" :filter="filterKeyword" row-key="citizenId"
|
||||
:visible-columns="visibleColumns" v-model:pagination="pagination">
|
||||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword"
|
||||
row-key="citizenId"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
|
|
@ -519,19 +552,38 @@ const savePosition = async () => {
|
|||
</template>
|
||||
<template v-slot:body="props">
|
||||
<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 }}
|
||||
</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 }}
|
||||
</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 }}
|
||||
</q-td>
|
||||
<q-td key="organizationName" :props="props" @click="nextPage(props.row.personalId)">
|
||||
<div v-if="props.row.orgName !== null ||
|
||||
props.row.positionPath !== null
|
||||
">
|
||||
<q-td
|
||||
key="organizationName"
|
||||
:props="props"
|
||||
@click="nextPage(props.row.personalId)"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
props.row.orgName !== null ||
|
||||
props.row.positionPath !== null
|
||||
"
|
||||
>
|
||||
<div class="col-4">
|
||||
<div class="text-weight-medium">
|
||||
{{
|
||||
|
|
@ -539,8 +591,8 @@ const savePosition = async () => {
|
|||
}}
|
||||
{{
|
||||
props.row.organizationShortName !== null
|
||||
? `(${props.row.organizationShortName})`
|
||||
: ""
|
||||
? `(${props.row.organizationShortName})`
|
||||
: ""
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -551,29 +603,73 @@ const savePosition = async () => {
|
|||
</div>
|
||||
</div>
|
||||
</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 }}
|
||||
</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 }}
|
||||
</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 }}
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn v-if="props.row.status !== 'ส่งรายชื่อไปออกคำสั่ง' &&
|
||||
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-btn
|
||||
v-if="
|
||||
props.row.status !== 'ส่งรายชื่อไปออกคำสั่ง' &&
|
||||
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-item clickable 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
|
||||
clickable
|
||||
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>
|
||||
<q-item clickable v-close-popup @click="clickDelete(props.row.personalId)">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-item
|
||||
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-icon color="red" size="xs" name="mdi-delete" />
|
||||
</q-item-section>
|
||||
|
|
@ -598,37 +694,88 @@ const savePosition = async () => {
|
|||
<div class="row justify-end">
|
||||
<div class="col-5">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-input borderless outlined dense ref="filterRef" debounce="300" v-model="filterKeyword2"
|
||||
placeholder="ค้นหา" style="width: 850px; max-width: auto">
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
ref="filterRef"
|
||||
debounce="300"
|
||||
v-model="filterKeyword2"
|
||||
placeholder="ค้นหา"
|
||||
style="width: 850px; max-width: auto"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<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>
|
||||
</q-input>
|
||||
<q-select v-model="visibleColumnsPosition" 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-select
|
||||
v-model="visibleColumnsPosition"
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<d-table :rows="rowsPosition" :columns="columnsPosition" :filter="filterKeyword2" row-key="id" selection="single"
|
||||
v-model:selected="selectedPosition" :visible-columns="visibleColumnsPosition">
|
||||
<d-table
|
||||
:rows="rowsPosition"
|
||||
:columns="columnsPosition"
|
||||
:filter="filterKeyword2"
|
||||
row-key="id"
|
||||
selection="single"
|
||||
v-model:selected="selectedPosition"
|
||||
:visible-columns="visibleColumnsPosition"
|
||||
>
|
||||
<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>
|
||||
</d-table>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<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-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<Dialogbody v-model:Modal="modal" :clickClose="clickClose" :optionsType="optionsType" :rows2="rows2"
|
||||
v-model:filterKeyword2="filterKeyword2" v-model:type="type" :nextPage="nextPage"
|
||||
:fecthlistappointment="fecthlistappointment" />
|
||||
<Dialogbody
|
||||
v-model:Modal="modal"
|
||||
:clickClose="clickClose"
|
||||
:optionsType="optionsType"
|
||||
:rows2="rows2"
|
||||
v-model:filterKeyword2="filterKeyword2"
|
||||
v-model:type="type"
|
||||
:nextPage="nextPage"
|
||||
:fecthlistappointment="fecthlistappointment"
|
||||
/>
|
||||
<!-- <DialogOrgTree
|
||||
v-model:modal="modalTree"
|
||||
:close="closeModalTree"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue