แก้ไขรายการแต่งตั้งลูกจ้างประจำ
This commit is contained in:
parent
e4ca1d0349
commit
d58f8e0b85
1 changed files with 48 additions and 218 deletions
|
|
@ -60,7 +60,7 @@ const visibleColumnsPosition = ref<String[]>([
|
|||
"organizationOrganizationName",
|
||||
"organizationAgencyName",
|
||||
"organizationGovernmentAgencyName",
|
||||
"organizationShortNameName",
|
||||
"organizationShortName",
|
||||
"organizationTypeName",
|
||||
"organizationLevelName",
|
||||
"positionEmployeeLineName",
|
||||
|
|
@ -108,11 +108,11 @@ const columnsPosition = ref<QTableProps["columns"]>([
|
|||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "organizationShortNameName",
|
||||
name: "organizationShortName",
|
||||
align: "left",
|
||||
label: "ชื่อย่อหน่วยงาน",
|
||||
sortable: true,
|
||||
field: "organizationShortNameName",
|
||||
field: "organizationShortName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
|
|
@ -259,15 +259,9 @@ const fecthlistappointment = async () => {
|
|||
organizationName:
|
||||
e.organizationName +
|
||||
" " +
|
||||
e.organizationShortName +
|
||||
" " +
|
||||
e.positionNumber +
|
||||
" " +
|
||||
e.positionPath,
|
||||
e.organizationShortName,
|
||||
orgName: e.organizationName,
|
||||
organizationShortName: e.organizationShortName,
|
||||
positionNumber: e.positionNumber,
|
||||
positionPath: e.positionPath,
|
||||
status: statusText(e.status),
|
||||
createdAt: date2Thai(e.createdAt),
|
||||
birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth),
|
||||
|
|
@ -369,7 +363,7 @@ const getPosition = async (id: string) => {
|
|||
positionEmployeePositionName: r.positionEmployeePositionName,
|
||||
organizationAgencyName: r.organizationAgencyName,
|
||||
organizationGovernmentAgencyName: r.organizationGovernmentAgencyName,
|
||||
organizationShortNameName: r.organizationShortNameName,
|
||||
organizationShortName: r.organizationShortName,
|
||||
positionEmployeeLevels: r.positionEmployeeLevels,
|
||||
positionEmployeePositionSides: r.positionEmployeePositionSides,
|
||||
use: r.use,
|
||||
|
|
@ -494,65 +488,27 @@ 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">
|
||||
|
|
@ -563,38 +519,19 @@ 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">
|
||||
{{
|
||||
|
|
@ -602,20 +539,8 @@ const savePosition = async () => {
|
|||
}}
|
||||
{{
|
||||
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})`
|
||||
: ""
|
||||
? `(${props.row.organizationShortName})`
|
||||
: ""
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -626,73 +551,29 @@ 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>
|
||||
|
|
@ -717,88 +598,37 @@ 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