เงินเดือน => pemission รายการเลื่อนค่าจ้างลูกจ้างประจำ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-08-13 14:49:34 +07:00
parent e422ef250c
commit 891955e26e
9 changed files with 96 additions and 71 deletions

View file

@ -523,7 +523,7 @@ watch([() => props?.snapShot, () => props.roundFilter], () => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr :props="props">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div class="table_ellipsis">
{{ col.value }}

View file

@ -1,6 +1,7 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import { checkPermission } from "@/utils/permissions";
import axios from "axios";
import http from "@/plugins/http";
@ -248,7 +249,10 @@ onMounted(() => {
<div class="row col-12 q-pa-md">
<q-toolbar style="padding: 0px">
<q-file
v-if="store.statusQuota == 'PENDING'"
v-if="
store.statusQuota == 'PENDING' &&
checkPermission($route)?.attrIsUpdate
"
bg-color="white"
clearable
outlined
@ -274,7 +278,10 @@ onMounted(() => {
<div>
<!-- การเจาหนาทของหนวยงานสงเอกสารให ผอ. หนวยงานตรวจสอบ -->
<q-btn
v-if="store.statusQuota == 'PENDING'"
v-if="
store.statusQuota == 'PENDING' &&
checkPermission($route)?.attrIsUpdate
"
unelevated
color="public"
label="ส่งเอกสารให้ ผอ. ตรวจสอบ"
@ -283,7 +290,10 @@ onMounted(() => {
<!-- ผอ. หนวยงานทำการยนยนและสงให สกจ. -->
<q-btn
v-if="store.statusQuota == 'WAITHEAD1'"
v-if="
store.statusQuota == 'WAITHEAD1' &&
checkPermission($route)?.attrIsUpdate
"
unelevated
color="public"
label="ยืนยันและส่งเอกสารให้ สกจ."
@ -292,7 +302,10 @@ onMounted(() => {
<!-- สกจ. ตรวจสอบเอกสารและขอมลรายการเงนเดอนทแตละหนวยงานสงมา ไมปรบโควต -->
<q-btn
v-if="store.statusQuota == 'WAITOWNER1'"
v-if="
store.statusQuota == 'WAITOWNER1' &&
checkPermission($route)?.attrIsUpdate
"
unelevated
color="green"
label="ยืนยันการตรวจสอบ"
@ -301,7 +314,10 @@ onMounted(() => {
<!-- สกจ. ตรวจสอบเอกสารและขอมลรายการเงนเดอนทแตละหนวยงานสงมา ปรบโควต -->
<q-btn
v-if="store.statusQuota == 'WAITOWNER1'"
v-if="
store.statusQuota == 'WAITOWNER1' &&
checkPermission($route)?.attrIsUpdate
"
class="q-ml-sm"
unelevated
color="warning"
@ -311,7 +327,10 @@ onMounted(() => {
<!-- ผอ.หนวยงานสงคำแนะนำใหการเจาหนาทหนวยงาน -->
<q-btn
v-if="store.statusQuota == 'WAITHEAD2'"
v-if="
store.statusQuota == 'WAITHEAD2' &&
checkPermission($route)?.attrIsUpdate
"
unelevated
color="public"
label="ส่งคำแนะนำให้การเจ้าหน้าที่หน่วยงาน"
@ -321,13 +340,19 @@ onMounted(() => {
/>
<q-btn
v-if="store.statusQuota == 'WAITOFFICER2'"
v-if="
store.statusQuota == 'WAITOFFICER2' &&
checkPermission($route)?.attrIsUpdate
"
unelevated
color="public"
label="ส่งไปออกคำสั่ง"
/>
<q-btn
v-if="store.statusQuota == 'REPORT'"
v-if="
store.statusQuota == 'REPORT' &&
checkPermission($route)?.attrIsUpdate
"
unelevated
color="public"
disable
@ -348,6 +373,7 @@ onMounted(() => {
<div class="row">
<div>
<q-btn
v-if="checkPermission($route)?.attrIsGet"
dense
flat
round
@ -361,6 +387,7 @@ onMounted(() => {
</div>
<div>
<q-btn
v-if="checkPermission($route)?.attrIsDelete"
dense
flat
round

View file

@ -1,6 +1,7 @@
<script setup lang="ts">
import { ref, onMounted, reactive, computed } from "vue";
import { useQuasar } from "quasar";
import { checkPermission } from "@/utils/permissions";
import http from "@/plugins/http";
import config from "@/app.config";
import genReportXLSX from "@/plugins/genreportxlsx";
@ -250,6 +251,7 @@ function fetchDataQuota(id: string) {
* @param id กล
*/
function fetchDataPeriod(id: string) {
showLoader();
rows.value = [];
let formData = {
page: formFilter.page.toString(),
@ -273,6 +275,11 @@ function fetchDataPeriod(id: string) {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
setTimeout(() => {
hideLoader();
}, 1000);
});
}
@ -356,41 +363,13 @@ onMounted(() => {
});
const isRetire = ref<boolean | string>(false);
const updateIsShowRetire = async () => {
isRetire.value = await !isRetire.value;
const updateIsShowRetire = () => {
isRetire.value = !isRetire.value;
fetchDataPeriodNew();
};
</script>
<template>
<!-- Tab กล -->
<!-- <q-tabs
v-model="store.tabGroup"
dense
class="text-grey"
active-color="primary"
active-class="bg-teal-1"
indicator-color="primary"
align="left"
>
<div
v-for="(item, index) in itemsTabGroup"
:key="index"
@click="changeTabGroup"
>
<q-tab :name="item.name" :label="item.lable" />
</div>
<q-space />
<q-btn
dense
flat
icon="info"
class="q-mr-sm"
label="หลักเกณฑ์การพิจารณาเลื่อนขั้นเงินข้าราชการ"
@click="() => (modalDialogInfoCriteria = true)"
/>
</q-tabs> -->
<!-- <q-separator /> -->
<q-tab-panels v-model="store.tabGroup" animated class="bg-grey-1">
<q-tab-panel
@ -403,7 +382,9 @@ const updateIsShowRetire = async () => {
<div class="row col-12 q-pa-md" v-if="store.roundMainCode !== 'SPECIAL'">
<div
:class="`row col-12 ${
store.roundMainCode === 'APR' ? `q-col-gutter-md` : `q-gutter-md`
store.roundMainCode === 'APR'
? `q-col-gutter-md`
: `q-col-gutter-md`
} items-start`"
>
<div
@ -435,7 +416,10 @@ const updateIsShowRetire = async () => {
</div>
<div
class="row col justify-end self-center"
v-if="store.roundMainCode !== 'SPECIAL'"
v-if="
store.roundMainCode !== 'SPECIAL' &&
checkPermission($route)?.attrIsGet
"
>
<q-btn-dropdown color="blue-5" label="ดาวน์โหลด">
<q-list>

View file

@ -1,6 +1,7 @@
<script setup lang="ts">
import { ref, watch, computed } from "vue";
import { useQuasar } from "quasar";
import { checkPermission } from "@/utils/permissions";
import config from "@/app.config";
import http from "@/plugins/http";
@ -300,7 +301,7 @@ watch(
<template>
<q-toolbar class="text-primary" style="padding: 0px">
<q-btn
v-if="!store.isClosedRound"
v-if="!store.isClosedRound && checkPermission($route)?.attrIsCreate"
flat
round
dense
@ -375,21 +376,28 @@ watch(
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr :props="props">
<q-td>
<q-btn
v-if="!store.isClosedRound"
v-if="
!store.isClosedRound &&
(checkPermission($route)?.attrIsUpdate ||
checkPermission($route)?.attrIsDelete)
"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
color="secondary"
icon="mdi-dots-horizontal-circle-outline"
round
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties')"
v-for="(item, index) in checkPermission($route)?.attrIsUpdate && !checkPermission($route)?.attrIsDelete
? store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties' && x.type !== 'delete')
: !checkPermission($route)?.attrIsUpdate && checkPermission($route)?.attrIsDelete
? store.itemMenu.filter((x:any)=> x.type === 'delete')
: store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties' )"
:key="index"
clickable
v-close-popup
@ -500,7 +508,6 @@ watch(
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -1,6 +1,7 @@
<script setup lang="ts">
import { ref, watch } from "vue";
import { useQuasar } from "quasar";
import { checkPermission } from "@/utils/permissions";
/** importType*/
import type { QTableProps } from "quasar";
@ -45,7 +46,6 @@ const props = defineProps({
/** ข้อมูล Table*/
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
@ -175,7 +175,6 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
const visibleColumns = ref<string[]>([
"no",
@ -317,7 +316,7 @@ function onClickViewInfo(type: string, id: string) {
<template>
<q-toolbar class="text-primary" style="padding: 0px">
<q-btn
v-if="!store.isClosedRound"
v-if="!store.isClosedRound && checkPermission($route)?.attrIsCreate"
flat
round
dense
@ -350,7 +349,9 @@ function onClickViewInfo(type: string, id: string) {
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns"
:options="!checkPermission($route)?.attrIsGet
? columns?.filter((col:any) => col.name !== 'posSalary' && col.name !== 'discipline' && col.name !== 'leave' )
: columns"
option-value="name"
options-cover
style="min-width: 150px"
@ -359,7 +360,9 @@ function onClickViewInfo(type: string, id: string) {
</q-toolbar>
<d-table
ref="table"
:columns="columns"
:columns="!checkPermission($route)?.attrIsGet
? columns?.filter((col:any) => col.name !== 'posSalary' && col.name !== 'discipline' && col.name !== 'leave' )
: columns"
:rows="props.rows"
row-key="id"
flat
@ -376,25 +379,31 @@ function onClickViewInfo(type: string, id: string) {
<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-tr :props="props" >
<q-td>
<q-btn
v-if="!store.isClosedRound"
v-if="
!store.isClosedRound &&
(checkPermission($route)?.attrIsUpdate ||
checkPermission($route)?.attrIsDelete)
"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
color="secondary"
icon="mdi-dots-horizontal-circle-outline"
round
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
v-for="(item, index) in checkPermission($route)?.attrIsUpdate &&!checkPermission($route)?.attrIsDelete
? store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'delete')
: !checkPermission($route)?.attrIsUpdate && checkPermission($route)?.attrIsDelete
? store.itemMenu.filter((x:any)=> x.type === 'delete')
: store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
:key="index"
clickable
v-close-popup
@ -487,6 +496,7 @@ function onClickViewInfo(type: string, id: string) {
"
>
<q-btn
v-if="checkPermission($route)?.attrIsGet"
flat
dense
icon="info"
@ -502,7 +512,6 @@ function onClickViewInfo(type: string, id: string) {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -575,7 +575,7 @@ watch([() => props?.snapShot, () => props.roundFilter], () => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr :props="props">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div class="table_ellipsis">
{{ col.value }}

View file

@ -1,9 +1,9 @@
<script setup lang="ts">
import { ref, watch, computed } from "vue";
import { useQuasar } from "quasar";
import { checkPermission } from "@/utils/permissions";
import config from "@/app.config";
import http from "@/plugins/http";
import { checkPermission } from "@/utils/permissions";
/** importType*/
import type { QTableProps } from "quasar";

View file

@ -53,8 +53,8 @@ const nextPage = ref<number>(1);
/**function เรียกข้อมูลรอบการขึ้นค่าจ้าง*/
function getRound() {
isDisable.value = false;
showLoader();
isDisable.value = false;
http
.get(
config.API.salaryPeriodActive(year.value.toString()) +
@ -100,9 +100,6 @@ function getRound() {
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
@ -238,7 +235,7 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
.finally(() => {
setTimeout(() => {
hideLoader();
}, 800);
}, 1500);
});
}
}

View file

@ -50,6 +50,7 @@ const lastPage = ref<number>(0);
/**function เรียกข้อมูลรอบการขึ้นเงินเดือน*/
function getRound() {
showLoader();
isDisable.value = false;
http
.get(