Merge branches 'develop' and 'develop' of github.com:Frappet/bma-ehr-frontend into develop
* 'develop' of github.com:Frappet/bma-ehr-frontend: เงินเดือน => ปรีบ code รอบการขึ้นเงินเดือน clear code + comment เงินเดือน => ผังบัญชีค่าจ้างลูกจ้างประจำ เงินเดือน => ปรับ code รายการผังบัญชีเงินเดือน no message fix bug calendar * 'develop' of github.com:Frappet/bma-ehr-frontend: เงินเดือน => ปรีบ code รอบการขึ้นเงินเดือน clear code + comment เงินเดือน => ผังบัญชีค่าจ้างลูกจ้างประจำ เงินเดือน => ปรับ code รายการผังบัญชีเงินเดือน no message fix bug calendar
This commit is contained in:
commit
726490179e
140 changed files with 2793 additions and 2740 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
|
@ -14,7 +13,7 @@ import type { QForm } from "quasar";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
const $q = useQuasar();
|
||||
|
|
@ -68,8 +67,9 @@ const fecthappointmentByid = async () => {
|
|||
const data = res.data.result;
|
||||
appointment.value = data;
|
||||
profileId.value = data.profileId;
|
||||
title.value.fullname = `${data.prefix}${data.firstname ?? "-"} ${data.lastname ?? "-"
|
||||
}`;
|
||||
title.value.fullname = `${data.prefix}${data.firstname ?? "-"} ${
|
||||
data.lastname ?? "-"
|
||||
}`;
|
||||
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
||||
title.value.positionLevelOld = data.positionLevelOld ?? "-";
|
||||
title.value.positionTypeOld = data.positionTypeOld ?? "-";
|
||||
|
|
@ -164,8 +164,16 @@ onMounted(async () => {
|
|||
</script>
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm"
|
||||
@click="router.push(`/appoint-employee`)" />
|
||||
<q-btn
|
||||
icon="mdi-arrow-left"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
flat
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
@click="router.push(`/appoint-employee`)"
|
||||
/>
|
||||
รายละเอียดการปรับระดับชั้นงานลูกจ้าง {{ title.fullname }}
|
||||
</div>
|
||||
<q-card bordered class="row col-12 text-dark">
|
||||
|
|
@ -174,8 +182,15 @@ onMounted(async () => {
|
|||
{{ title.fullname }}
|
||||
</div>
|
||||
<q-space />
|
||||
<q-btn outline color="blue" dense icon-right="mdi-open-in-new" class="q-px-sm" label="ดูข้อมูลทะเบียนประวัติ"
|
||||
@click="onclickViewinfo(profileId)" />
|
||||
<q-btn
|
||||
outline
|
||||
color="blue"
|
||||
dense
|
||||
icon-right="mdi-open-in-new"
|
||||
class="q-px-sm"
|
||||
label="ดูข้อมูลทะเบียนประวัติ"
|
||||
@click="onclickViewinfo(profileId)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="row col-12 q-pa-md">
|
||||
|
|
@ -220,12 +235,36 @@ onMounted(async () => {
|
|||
<q-space />
|
||||
<div v-if="status !== 'DONE' && status !== 'REPORT'">
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn outline color="primary" dense icon-right="mdi-file-edit-outline" class="q-px-sm" label="แก้ไข"
|
||||
style="width: 80px" @click="edit = !edit" />
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
dense
|
||||
icon-right="mdi-file-edit-outline"
|
||||
class="q-px-sm"
|
||||
label="แก้ไข"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
</div>
|
||||
<div class="q-gutter-sm" v-else>
|
||||
<q-btn outline color="public" dense class="q-px-sm" label="บันทึก" style="width: 80px" @click="clickSave" />
|
||||
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก" style="width: 80px" @click="cancel()" />
|
||||
<q-btn
|
||||
outline
|
||||
color="public"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="บันทึก"
|
||||
style="width: 80px"
|
||||
@click="clickSave"
|
||||
/>
|
||||
<q-btn
|
||||
outline
|
||||
color="red"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="ยกเลิก"
|
||||
style="width: 80px"
|
||||
@click="cancel()"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -236,9 +275,19 @@ onMounted(async () => {
|
|||
<div class="text-weight-bold">วุฒิการศึกษา</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||
v-model="educationOld" :rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]" hide-bottom-space
|
||||
:label="`${'วุฒิการศึกษา'}`" type="text" />
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="educationOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'วุฒิการศึกษา'}`"
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row col-12 q-pa-md">
|
||||
|
|
@ -249,58 +298,119 @@ onMounted(async () => {
|
|||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||
v-model="organizationPositionOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
||||
hide-bottom-space :label="`${'ตำแหน่ง/สังกัด'}`" type="textarea" />
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="organizationPositionOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตำแหน่ง/สังกัด'}`"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-3 row">
|
||||
<div class="col-12">
|
||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||
v-model="positionTypeOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]" hide-bottom-space
|
||||
:label="`${'ตำแหน่งประเภท'}`" />
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="positionTypeOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตำแหน่งประเภท'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row">
|
||||
<div class="col-12">
|
||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||
v-model="positionLevelOld" :rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]" hide-bottom-space
|
||||
:label="`${'ระดับ'}`" />
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="positionLevelOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ระดับ'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row">
|
||||
<div class="col-12">
|
||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||
v-model="posNo" :rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]" hide-bottom-space
|
||||
:label="`${'เลขที่'}`" />
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="posNo"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'เลขที่'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row">
|
||||
<div class="col-12">
|
||||
<CurrencyInput v-model="salary" label="เงินเดือน" :edit="edit"
|
||||
:rules="[(val: number) => !!val || `${'กรุณากรอกเงินเดือน'}`]" lazy-rules />
|
||||
<CurrencyInput
|
||||
v-model="salary"
|
||||
label="เงินเดือน"
|
||||
:edit="edit"
|
||||
:rules="[(val: number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
lazy-rules
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="col-xs-6 col-sm-6 row items-center">
|
||||
<div class="col-12">
|
||||
<datepicker menu-class-name="modalfix" :readonly="!edit" v-model="date" :locale="'th'" autoApply
|
||||
:enableTimePicker="false" week-start="0">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
:readonly="!edit"
|
||||
v-model="date"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :borderless="!edit" :readonly="!edit"
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
:borderless="!edit"
|
||||
:readonly="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]" hide-bottom-space
|
||||
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`">
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" :style="edit
|
||||
? 'color: var(--q-primary)'
|
||||
: 'color: var(--q-grey)'
|
||||
">
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
:style="
|
||||
edit
|
||||
? 'color: var(--q-primary)'
|
||||
: 'color: var(--q-grey)'
|
||||
"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
|
|
@ -309,8 +419,18 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||
v-model="reason" hide-bottom-space :label="`${'หมายเหตุ '}`" type="textarea" />
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="reason"
|
||||
hide-bottom-space
|
||||
:label="`${'หมายเหตุ '}`"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,14 @@ import config from "@/app.config";
|
|||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { date2Thai, hideLoader, messageError, showLoader, success, dialogConfirm } = mixin; //ฟังก์ชันกลางที่เรียกใช้
|
||||
const {
|
||||
date2Thai,
|
||||
hideLoader,
|
||||
messageError,
|
||||
showLoader,
|
||||
success,
|
||||
dialogConfirm,
|
||||
} = mixin; //ฟังก์ชันกลางที่เรียกใช้
|
||||
|
||||
const notFound = ref<string>("ไม่พบข้อมูลที่ค้นหา");
|
||||
const noData = ref<string>("ไม่พบข้อมูลผังโครงสร้าง");
|
||||
|
|
@ -115,15 +122,18 @@ const myFilterMethod = (node: any, filter: string) => {
|
|||
(node.organizationName && node.organizationName.indexOf(filt) > -1) ||
|
||||
(node.positionNum && node.positionNum.indexOf(filt) > -1) ||
|
||||
(node.positionName && node.positionName.indexOf(filt) > -1) ||
|
||||
(node.governmentCode && node.governmentCode.toString().indexOf(filt) > -1) ||
|
||||
(node.governmentCode &&
|
||||
node.governmentCode.toString().indexOf(filt) > -1) ||
|
||||
(node.agency && node.agency.indexOf(filt) > -1) ||
|
||||
(node.government && node.government.indexOf(filt) > -1) ||
|
||||
(node.department && node.department.indexOf(filt) > -1) ||
|
||||
(node.pile && node.pile.indexOf(filt) > -1) ||
|
||||
(node.organizationShortName && node.organizationShortName.indexOf(filt) > -1) ||
|
||||
(node.organizationShortName &&
|
||||
node.organizationShortName.indexOf(filt) > -1) ||
|
||||
(node.positionSideName && node.positionSideName.indexOf(filt) > -1) ||
|
||||
(node.executivePosition && node.executivePosition.indexOf(filt) > -1) ||
|
||||
(node.executivePositionSide && node.executivePositionSide.indexOf(filt) > -1) ||
|
||||
(node.executivePositionSide &&
|
||||
node.executivePositionSide.indexOf(filt) > -1) ||
|
||||
(node.positionLevel && node.positionLevel.indexOf(filt) > -1)
|
||||
);
|
||||
};
|
||||
|
|
@ -242,7 +252,6 @@ const positionLevelOptions = ref<Object[]>([
|
|||
|
||||
const selectedPosition = async (data: any) => {
|
||||
if (data.name == null && selected.value != data.keyId) {
|
||||
|
||||
editDataStatus.value = true;
|
||||
selected.value = data.keyId;
|
||||
|
||||
|
|
@ -330,7 +339,6 @@ const checkPosition = (val: string) => {
|
|||
return num;
|
||||
};
|
||||
|
||||
|
||||
watch(props, () => {
|
||||
expanded.value = [];
|
||||
const dataPersonal = props.personal;
|
||||
|
|
@ -352,7 +360,6 @@ watch(props, () => {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -389,24 +396,46 @@ function findByPerson(element: any): any {
|
|||
<div class="col-xs-12 col-sm-7 row">
|
||||
<q-card flat bordered class="fit q-pa-sm">
|
||||
<q-scroll-area visible style="height: 70vh">
|
||||
<q-input outlined dense ref="filterRef" v-model="search" placeholder="ค้นหา" class="q-mb-sm">
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
ref="filterRef"
|
||||
v-model="search"
|
||||
placeholder="ค้นหา"
|
||||
class="q-mb-sm"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="mdi-magnify" />
|
||||
</template>
|
||||
</q-input>
|
||||
<div class="q-pa-sm q-gutter-sm">
|
||||
<q-tree no-transition dense :nodes="treeData" node-key="keyId" :filter="search"
|
||||
:no-results-label="notFound" :no-nodes-label="noData" :filter-method="myFilterMethod"
|
||||
v-model:expanded="expanded">
|
||||
<q-tree
|
||||
no-transition
|
||||
dense
|
||||
:nodes="treeData"
|
||||
node-key="keyId"
|
||||
:filter="search"
|
||||
:no-results-label="notFound"
|
||||
:no-nodes-label="noData"
|
||||
:filter-method="myFilterMethod"
|
||||
v-model:expanded="expanded"
|
||||
>
|
||||
<template v-slot:header-organization="prop">
|
||||
<div class="col">
|
||||
<div class="row items-center q-px-xs q-pt-xs q-gutter-sm">
|
||||
<div
|
||||
class="row items-center q-px-xs q-pt-xs q-gutter-sm"
|
||||
>
|
||||
<!--แสดงชื่อแผนก พิมพ์ตัวหนา คลิกแล้วกาง/หุบ Tree-->
|
||||
<div class="text-weight-medium">
|
||||
{{ prop.node.organizationName }}
|
||||
</div>
|
||||
<q-badge v-if="prop.node.totalPositionVacant > 0" rounded color="red" outline
|
||||
:label="prop.node.totalPositionVacant" />
|
||||
<q-badge
|
||||
v-if="prop.node.totalPositionVacant > 0"
|
||||
rounded
|
||||
color="red"
|
||||
outline
|
||||
:label="prop.node.totalPositionVacant"
|
||||
/>
|
||||
|
||||
<q-space />
|
||||
</div>
|
||||
|
|
@ -420,31 +449,53 @@ function findByPerson(element: any): any {
|
|||
</template>
|
||||
|
||||
<template v-slot:header-person="prop">
|
||||
<q-item clickable :active="selected == prop.node.keyId" @click="selectedPosition(prop.node)"
|
||||
:disable="prop.node.name != null ||
|
||||
<q-item
|
||||
clickable
|
||||
:active="selected == prop.node.keyId"
|
||||
@click="selectedPosition(prop.node)"
|
||||
:disable="
|
||||
prop.node.name != null ||
|
||||
checkPosition(prop.node.positionNumId) != -1
|
||||
" active-class="my-list-link text-primary text-weight-medium"
|
||||
class="row items-center text-dark q-py-xs q-pl-sm rounded-borders my-list">
|
||||
<img v-if="prop.node.avatar == '' ||
|
||||
prop.node.avatar ==
|
||||
'https://cdn.quasar.dev/img/boy-avatar.png'
|
||||
" src="@/assets/avatar_user.jpg" class="col-xs-1 col-sm-2" style="
|
||||
"
|
||||
active-class="my-list-link text-primary text-weight-medium"
|
||||
class="row items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||
>
|
||||
<img
|
||||
v-if="
|
||||
prop.node.avatar == '' ||
|
||||
prop.node.avatar ==
|
||||
'https://cdn.quasar.dev/img/boy-avatar.png'
|
||||
"
|
||||
src="@/assets/avatar_user.jpg"
|
||||
class="col-xs-1 col-sm-2"
|
||||
style="
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 50%;
|
||||
" />
|
||||
<img v-else :src="prop.node.avatar" class="col-xs-1 col-sm-2" style="
|
||||
"
|
||||
/>
|
||||
<img
|
||||
v-else
|
||||
:src="prop.node.avatar"
|
||||
class="col-xs-1 col-sm-2"
|
||||
style="
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 50%;
|
||||
" />
|
||||
"
|
||||
/>
|
||||
<!--=====ตำแหน่งว่าง สีแดง=====-->
|
||||
<div v-if="prop.node.name == null" class="q-px-sm text-weight-medium text-red">
|
||||
<div
|
||||
v-if="prop.node.name == null"
|
||||
class="q-px-sm text-weight-medium text-red"
|
||||
>
|
||||
ว่าง
|
||||
</div>
|
||||
<!--=====หัวหน้า สีเขียว=====-->
|
||||
<div v-else-if="prop.node.positionLeaderFlag">
|
||||
<div class="q-px-sm text-weight-medium text-primary">
|
||||
<div
|
||||
class="q-px-sm text-weight-medium text-primary"
|
||||
>
|
||||
{{ prop.node.name }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -464,8 +515,13 @@ function findByPerson(element: any): any {
|
|||
<div class="q-pr-sm">
|
||||
{{ prop.node.positionLevel }}
|
||||
</div>
|
||||
<q-icon v-if="prop.node.positionLeaderFlag" class="q-mr-sm" size="15px" color="primary"
|
||||
name="mdi-bookmark"></q-icon>
|
||||
<q-icon
|
||||
v-if="prop.node.positionLeaderFlag"
|
||||
class="q-mr-sm"
|
||||
size="15px"
|
||||
color="primary"
|
||||
name="mdi-bookmark"
|
||||
></q-icon>
|
||||
|
||||
<q-space />
|
||||
</q-item>
|
||||
|
|
@ -481,18 +537,36 @@ function findByPerson(element: any): any {
|
|||
<div class="row col-12 q-col-gutter-xs">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12"></div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<datepicker menu-class-name="modalfix" v-model="dataForm.containDate" :locale="'th'" autoApply
|
||||
:enableTimePicker="false" week-start="0">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dataForm.containDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input class="full-width inputgreen cursor-pointer" outlined dense lazy-rules :model-value="date2Thai(new Date(dataForm.containDate))
|
||||
" :rules="[(val: string) => !!val || `${'วันที่รายงานตัว'}`]"
|
||||
:label="`${'วันที่รายงานตัว'}`" hide-bottom-space>
|
||||
<q-input
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
:model-value="
|
||||
date2Thai(new Date(dataForm.containDate))
|
||||
"
|
||||
:rules="[(val: string) => !!val || `${'วันที่รายงานตัว'}`]"
|
||||
:label="`${'วันที่รายงานตัว'}`"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
|
|
@ -501,36 +575,92 @@ function findByPerson(element: any): any {
|
|||
</div>
|
||||
<q-space />
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-select class="full-width inputgreen cursor-pointer custom-input" outlined standout dense
|
||||
hide-bottom-space lazy-rules :options="posNoOptions" v-model="dataForm.posNoId"
|
||||
:label="`${'ตำแหน่งเลขที่'}`" map-options />
|
||||
<q-select
|
||||
class="full-width inputgreen cursor-pointer custom-input"
|
||||
outlined
|
||||
standout
|
||||
dense
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
:options="posNoOptions"
|
||||
v-model="dataForm.posNoId"
|
||||
:label="`${'ตำแหน่งเลขที่'}`"
|
||||
map-options
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-select outlined class="full-width inputgreen cursor-pointer custom-input" standout dense
|
||||
hide-bottom-space lazy-rules :options="positionOptions" v-model="dataForm.positionId"
|
||||
:label="`${'ตำแหน่ง'}`" map-options />
|
||||
<q-select
|
||||
outlined
|
||||
class="full-width inputgreen cursor-pointer custom-input"
|
||||
standout
|
||||
dense
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
:options="positionOptions"
|
||||
v-model="dataForm.positionId"
|
||||
:label="`${'ตำแหน่ง'}`"
|
||||
map-options
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-select outlined class="full-width inputgreen cursor-pointer custom-input" standout dense
|
||||
hide-bottom-space lazy-rules emit-value :options="positionPathSideOptions"
|
||||
v-model="dataForm.positionPathSideId" :label="`${'ด้าน/สาขา'}`" map-options />
|
||||
<q-select
|
||||
outlined
|
||||
class="full-width inputgreen cursor-pointer custom-input"
|
||||
standout
|
||||
dense
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
emit-value
|
||||
:options="positionPathSideOptions"
|
||||
v-model="dataForm.positionPathSideId"
|
||||
:label="`${'ด้าน/สาขา'}`"
|
||||
map-options
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-select outlined class="full-width inputgreen cursor-pointer custom-input" standout dense
|
||||
hide-bottom-space lazy-rules :options="positionTypeOptions" v-model="dataForm.positionTypeId"
|
||||
:label="`${'ประเภทตำแหน่ง'}`" map-options />
|
||||
<q-select
|
||||
outlined
|
||||
class="full-width inputgreen cursor-pointer custom-input"
|
||||
standout
|
||||
dense
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
:options="positionTypeOptions"
|
||||
v-model="dataForm.positionTypeId"
|
||||
:label="`${'ประเภทตำแหน่ง'}`"
|
||||
map-options
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-select outlined class="full-width inputgreen cursor-pointer custom-input" standout dense
|
||||
hide-bottom-space lazy-rules :options="positionLineOptions" v-model="dataForm.positionLineId"
|
||||
:label="`${'สายงาน'}`" map-options />
|
||||
<q-select
|
||||
outlined
|
||||
class="full-width inputgreen cursor-pointer custom-input"
|
||||
standout
|
||||
dense
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
:options="positionLineOptions"
|
||||
v-model="dataForm.positionLineId"
|
||||
:label="`${'สายงาน'}`"
|
||||
map-options
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-select outlined class="full-width inputgreen cursor-pointer custom-input" standout dense
|
||||
lazy-rules :options="positionLevelOptions" v-model="dataForm.positionLevelId"
|
||||
:label="`${'ระดับ'}`" hide-bottom-space
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกระดับ'}`]" emit-value map-options />
|
||||
<q-select
|
||||
outlined
|
||||
class="full-width inputgreen cursor-pointer custom-input"
|
||||
standout
|
||||
dense
|
||||
lazy-rules
|
||||
:options="positionLevelOptions"
|
||||
v-model="dataForm.positionLevelId"
|
||||
:label="`${'ระดับ'}`"
|
||||
hide-bottom-space
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกระดับ'}`]"
|
||||
emit-value
|
||||
map-options
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-scroll-area>
|
||||
|
|
@ -540,8 +670,12 @@ function findByPerson(element: any): any {
|
|||
</q-card-section>
|
||||
|
||||
<q-separator />
|
||||
<DialogFooter :editvisible="true" :validate="validateData" :save="saveAppoint"
|
||||
v-model:modalEdit="editDataStatus" />
|
||||
<DialogFooter
|
||||
:editvisible="true"
|
||||
:validate="validateData"
|
||||
:save="saveAppoint"
|
||||
v-model:modalEdit="editDataStatus"
|
||||
/>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,14 @@ import config from "@/app.config";
|
|||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { date2Thai, hideLoader, messageError, showLoader, success,dialogConfirm } = mixin; //ฟังก์ชันกลางที่เรียกใช้
|
||||
const {
|
||||
date2Thai,
|
||||
hideLoader,
|
||||
messageError,
|
||||
showLoader,
|
||||
success,
|
||||
dialogConfirm,
|
||||
} = mixin; //ฟังก์ชันกลางที่เรียกใช้
|
||||
|
||||
const notFound = ref<string>("ไม่พบข้อมูลที่ค้นหา");
|
||||
const noData = ref<string>("ไม่พบข้อมูลผังโครงสร้าง");
|
||||
|
|
@ -106,8 +113,6 @@ const fetchplacementPosition = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
personalId: String,
|
||||
modal: Boolean,
|
||||
|
|
@ -126,15 +131,18 @@ const myFilterMethod = (node: any, filter: string) => {
|
|||
(node.organizationName && node.organizationName.indexOf(filt) > -1) ||
|
||||
(node.positionNum && node.positionNum.indexOf(filt) > -1) ||
|
||||
(node.positionName && node.positionName.indexOf(filt) > -1) ||
|
||||
(node.governmentCode && node.governmentCode.toString().indexOf(filt) > -1) ||
|
||||
(node.governmentCode &&
|
||||
node.governmentCode.toString().indexOf(filt) > -1) ||
|
||||
(node.agency && node.agency.indexOf(filt) > -1) ||
|
||||
(node.government && node.government.indexOf(filt) > -1) ||
|
||||
(node.department && node.department.indexOf(filt) > -1) ||
|
||||
(node.pile && node.pile.indexOf(filt) > -1) ||
|
||||
(node.organizationShortName && node.organizationShortName.indexOf(filt) > -1) ||
|
||||
(node.organizationShortName &&
|
||||
node.organizationShortName.indexOf(filt) > -1) ||
|
||||
(node.positionSideName && node.positionSideName.indexOf(filt) > -1) ||
|
||||
(node.executivePosition && node.executivePosition.indexOf(filt) > -1) ||
|
||||
(node.executivePositionSide && node.executivePositionSide.indexOf(filt) > -1) ||
|
||||
(node.executivePositionSide &&
|
||||
node.executivePositionSide.indexOf(filt) > -1) ||
|
||||
(node.positionLevel && node.positionLevel.indexOf(filt) > -1)
|
||||
);
|
||||
};
|
||||
|
|
@ -183,7 +191,6 @@ const saveAppoint = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
const closeModal = () => {
|
||||
if (editDataStatus.value == true) {
|
||||
dialogConfirm(
|
||||
|
|
@ -258,7 +265,6 @@ const positionLevelOptions = ref<Object[]>([
|
|||
|
||||
const selectedPosition = async (data: any) => {
|
||||
if (data.name == null && selected.value != data.keyId) {
|
||||
|
||||
editDataStatus.value = true;
|
||||
selected.value = data.keyId;
|
||||
|
||||
|
|
@ -346,7 +352,6 @@ const checkPosition = (val: string) => {
|
|||
return num;
|
||||
};
|
||||
|
||||
|
||||
watch(props, () => {
|
||||
expanded.value = [];
|
||||
const dataPersonal = props.personal;
|
||||
|
|
@ -368,7 +373,6 @@ watch(props, () => {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -566,7 +570,6 @@ function findByPerson(element: any): any {
|
|||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
:model-value="
|
||||
date2Thai(new Date(dataForm.containDate))
|
||||
"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import type { QForm } from "quasar";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
const $q = useQuasar();
|
||||
|
|
@ -395,7 +395,6 @@ onMounted(async () => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:readonly="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
|
|
@ -429,7 +428,6 @@ onMounted(async () => {
|
|||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="reason"
|
||||
|
||||
hide-bottom-space
|
||||
:label="`${'หมายเหตุ '}`"
|
||||
type="textarea"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import keycloak from "@/plugins/keycloak";
|
|||
|
||||
import CurruncyInput from "@/components/CurruncyInput.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
const $q = useQuasar();
|
||||
|
|
@ -434,7 +434,6 @@ onMounted(async () => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
|
|
@ -528,7 +527,6 @@ onMounted(async () => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:model-value="
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ const saveAppoint = async () => {
|
|||
// mouthSalaryAmount: dataForm.mouthSalaryAmount,
|
||||
// positionSalaryAmount: dataForm.positionSalaryAmount,
|
||||
};
|
||||
|
||||
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.otherPosition(id.value), dataAppoint)
|
||||
|
|
@ -277,8 +277,6 @@ const positionLevelOptions = ref<Object[]>([
|
|||
|
||||
const selectedPosition = async (data: any) => {
|
||||
if (data.name == null && selected.value != data.keyId) {
|
||||
|
||||
|
||||
editDataStatus.value = true;
|
||||
selected.value = data.keyId;
|
||||
|
||||
|
|
@ -359,7 +357,6 @@ const selectedPosition = async (data: any) => {
|
|||
dataForm.positionPathSideId = "";
|
||||
dataForm.positionTypeId = "";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const checkPosition = (val: string) => {
|
||||
|
|
@ -372,25 +369,19 @@ const expanded = ref<string[]>([]);
|
|||
watch(props, () => {
|
||||
expanded.value = [];
|
||||
const dataPersonal = props.personal;
|
||||
|
||||
|
||||
if (dataPersonal) {
|
||||
dataPersonal.map((data: any) => {
|
||||
personal.value = data;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (personal.value) {
|
||||
|
||||
let findData: any = null;
|
||||
dataRespone.value.map((x: any) => {
|
||||
findData = findByPerson(x);
|
||||
|
||||
|
||||
if (findData != null) {
|
||||
|
||||
selectedPosition(findData);
|
||||
for (let i = 3; i <= findData.keyId.length; i += 2) {
|
||||
expanded.value.push(findData.keyId.slice(0, i));
|
||||
|
|
@ -597,7 +588,6 @@ function findByPerson(element: any): any {
|
|||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
:model-value="
|
||||
date2Thai(new Date(dataForm.containDate))
|
||||
"
|
||||
|
|
|
|||
|
|
@ -870,7 +870,6 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="startDate + 543"
|
||||
:rules="[
|
||||
|
|
@ -915,7 +914,6 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="date2Thai(startDate2)"
|
||||
:rules="[
|
||||
|
|
@ -965,7 +963,6 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="endDate + 543"
|
||||
:rules="[
|
||||
|
|
@ -1009,7 +1006,6 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="date2Thai(endDate2)"
|
||||
:rules="[
|
||||
|
|
@ -1059,7 +1055,6 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="date2Thai(finishDate)"
|
||||
:rules="[
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ const clickSave = async () => {
|
|||
/**
|
||||
* บันทึกเพิ่มข้อมูล
|
||||
*/
|
||||
const saveData = async () => {
|
||||
const saveData = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.placementCertId(route.params.personalId.toString()), {
|
||||
|
|
@ -699,7 +699,6 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="date2Thai(issueDate)"
|
||||
:rules="[
|
||||
|
|
@ -745,7 +744,6 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="date2Thai(expireDate)"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่หมดอายุ'}`]"
|
||||
|
|
|
|||
|
|
@ -438,7 +438,6 @@ const getClass = (val: boolean) => {
|
|||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:model-value="
|
||||
|
|
|
|||
|
|
@ -369,7 +369,6 @@ onMounted(async () => {
|
|||
hide-bottom-space
|
||||
:model-value="date != null ? date2Thai(date) : null"
|
||||
label="วันที่รายงานตัว"
|
||||
lazy-rules
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ let dataForm = reactive({
|
|||
});
|
||||
|
||||
/** ฟังชั่น get file*/
|
||||
async function fetchPublishFile(){
|
||||
async function fetchPublishFile() {
|
||||
await http
|
||||
.get(config.API.getPublishFileHistory)
|
||||
.then((res) => {
|
||||
|
|
@ -74,7 +74,7 @@ async function fetchPublishFile(){
|
|||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/** โหลดข้อมูลโครงสร้างจาก json */
|
||||
const loadTreeData = async () => {
|
||||
|
|
@ -596,7 +596,6 @@ onMounted(async () => {
|
|||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
:model-value="
|
||||
date2Thai(new Date(dataForm.containDate))
|
||||
"
|
||||
|
|
|
|||
|
|
@ -661,7 +661,7 @@ onMounted(async () => {
|
|||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:model-value="
|
||||
|
|
|
|||
|
|
@ -538,7 +538,7 @@ onMounted(async () => {
|
|||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
|
||||
:model-value="
|
||||
date2Thai(new Date(dataForm.containDate))
|
||||
"
|
||||
|
|
|
|||
|
|
@ -283,8 +283,6 @@ const positionLevelOptions = ref<Object[]>([
|
|||
|
||||
const selectedPosition = async (data: any) => {
|
||||
if (data.name == null && selected.value != data.keyId) {
|
||||
|
||||
|
||||
editDataStatus.value = true;
|
||||
selected.value = data.keyId;
|
||||
|
||||
|
|
@ -384,7 +382,6 @@ watch(props, () => {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
if (personal.value) {
|
||||
// const findData = dataRespone.value.find(findByPerson);
|
||||
let findData: any = null;
|
||||
|
|
@ -598,7 +595,6 @@ function findByPerson(element: any): any {
|
|||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
:model-value="
|
||||
date2Thai(new Date(dataForm.containDate))
|
||||
"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import config from "@/app.config";
|
|||
import type { QForm } from "quasar";
|
||||
import type { ResponseData } from "@/modules/05_placement/interface/response/officer";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personalId = ref<string>("");
|
||||
const $q = useQuasar();
|
||||
|
|
@ -386,7 +386,6 @@ onMounted(async () => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
|
|
@ -431,7 +430,6 @@ onMounted(async () => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:model-value="
|
||||
|
|
|
|||
|
|
@ -664,7 +664,7 @@ onMounted(async () => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
||||
:borderless="!edit"
|
||||
:readonly="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import config from "@/app.config";
|
|||
import type { QForm } from "quasar";
|
||||
import type { resHelpDetail } from "@/modules/05_placement/interface/response/officer";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
const $q = useQuasar();
|
||||
|
|
@ -316,7 +316,6 @@ onMounted(async () => {
|
|||
:outlined="edit"
|
||||
dense
|
||||
:readonly="!edit"
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||
:model-value="
|
||||
|
|
@ -363,7 +362,6 @@ onMounted(async () => {
|
|||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="dateEnd !== null ? date2Thai(dateEnd) : null"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue