เงินเดือน => premission รายการเลื่อนเงินเดือนข้าราชการ ฯ
This commit is contained in:
parent
dcdc8c5d4b
commit
8bb6fedd32
5 changed files with 97 additions and 50 deletions
|
|
@ -1,6 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, defineProps, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import axios from "axios";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -263,7 +264,10 @@ onMounted(() => {
|
|||
<div class="row col-12 q-pa-md">
|
||||
<q-toolbar class="q-pa-none">
|
||||
<q-file
|
||||
v-if="store.statusQuota == 'PENDING'"
|
||||
v-if="
|
||||
store.statusQuota == 'PENDING' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
bg-color="white"
|
||||
clearable
|
||||
outlined
|
||||
|
|
@ -305,7 +309,10 @@ onMounted(() => {
|
|||
<div>
|
||||
<!-- การเจ้าหน้าที่ของหน่วยงานส่งเอกสารให้ ผอ. หน่วยงานตรวจสอบ -->
|
||||
<q-btn
|
||||
v-if="store.statusQuota == 'PENDING'"
|
||||
v-if="
|
||||
store.statusQuota == 'PENDING' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
unelevated
|
||||
color="public"
|
||||
label="ส่งเอกสารให้ ผอ. ตรวจสอบ"
|
||||
|
|
@ -314,7 +321,10 @@ onMounted(() => {
|
|||
|
||||
<!-- ผอ. หน่วยงานทำการยืนยันและส่งให้ สกจ. -->
|
||||
<q-btn
|
||||
v-if="store.statusQuota == 'WAITHEAD1'"
|
||||
v-if="
|
||||
store.statusQuota == 'WAITHEAD1' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
unelevated
|
||||
color="public"
|
||||
label="ยืนยันและส่งเอกสารให้ สกจ."
|
||||
|
|
@ -323,7 +333,10 @@ onMounted(() => {
|
|||
|
||||
<!-- สกจ. ตรวจสอบเอกสารและข้อมูลรายการเงินเดือนที่แต่ละหน่วยงานส่งมา ไม่มีปรับโควต้า -->
|
||||
<q-btn
|
||||
v-if="store.statusQuota == 'WAITOWNER1'"
|
||||
v-if="
|
||||
store.statusQuota == 'WAITOWNER1' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
unelevated
|
||||
color="green"
|
||||
label="ยืนยันการตรวจสอบ"
|
||||
|
|
@ -332,7 +345,10 @@ onMounted(() => {
|
|||
|
||||
<!-- สกจ. ตรวจสอบเอกสารและข้อมูลรายการเงินเดือนที่แต่ละหน่วยงานส่งมา มีปรับโควต้า -->
|
||||
<q-btn
|
||||
v-if="store.statusQuota == 'WAITOWNER1'"
|
||||
v-if="
|
||||
store.statusQuota == 'WAITOWNER1' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
class="q-ml-sm"
|
||||
unelevated
|
||||
color="warning"
|
||||
|
|
@ -342,7 +358,10 @@ onMounted(() => {
|
|||
|
||||
<!-- ผอ.หน่วยงานส่งคำแนะนำให้การเจ้าหน้าที่หน่วยงาน -->
|
||||
<q-btn
|
||||
v-if="store.statusQuota == 'WAITHEAD2'"
|
||||
v-if="
|
||||
store.statusQuota == 'WAITHEAD2' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
unelevated
|
||||
color="public"
|
||||
label="ส่งคำแนะนำให้การเจ้าหน้าที่หน่วยงาน"
|
||||
|
|
@ -352,13 +371,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
|
||||
|
|
@ -378,6 +403,7 @@ onMounted(() => {
|
|||
<div class="row">
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
|
|
@ -391,6 +417,7 @@ onMounted(() => {
|
|||
</div>
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsDelete"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, computed } from "vue";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -251,6 +252,7 @@ function fetchDataQuota(id: string) {
|
|||
* @param id กลุ่ม
|
||||
*/
|
||||
function fetchDataPeriod(id: string) {
|
||||
showLoader();
|
||||
rows.value = [];
|
||||
let formData = {
|
||||
page: formFilter.page.toString(),
|
||||
|
|
@ -274,6 +276,11 @@ function fetchDataPeriod(id: string) {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoader();
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -493,7 +500,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
|
||||
|
|
@ -526,7 +535,10 @@ const updateIsShowRetire = async () => {
|
|||
|
||||
<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>
|
||||
|
|
@ -547,7 +559,6 @@ const updateIsShowRetire = async () => {
|
|||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
<!-- <q-btn color="blue-5" icon="download" label="ดาวน์โหลด" /> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { ref, watch, computed } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
/** importType*/
|
||||
import type { QTableProps } from "quasar";
|
||||
|
|
@ -176,7 +177,6 @@ const columns = computed(() => {
|
|||
return baseColumns.value.filter((column) => column.name !== "remark");
|
||||
}
|
||||
}
|
||||
console.log(baseColumns.value);
|
||||
|
||||
return baseColumns.value;
|
||||
});
|
||||
|
|
@ -289,7 +289,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
|
||||
|
|
@ -364,21 +364,33 @@ 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.roundCode !== 'SPECIAL' ? store.itemMenu.filter((x:any)=>x.type !== 'properties') :store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties')"
|
||||
v-for="(item, index) in store.roundCode !== 'SPECIAL' ? checkPermission($route)?.attrIsUpdate &&!checkPermission($route)?.attrIsDelete
|
||||
? store.itemMenu.filter((x:any)=>x.type !== 'properties' && x.type !== 'delete')
|
||||
: !checkPermission($route)?.attrIsUpdate && checkPermission($route)?.attrIsDelete
|
||||
? store.itemMenu.filter((x:any)=>x.type !== 'properties' && x.type === 'delete')
|
||||
: store.itemMenu.filter((x:any)=>x.type !== 'properties')
|
||||
: 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 !== 'moveGroup' && x.type !== 'properties' && x.type === 'delete')
|
||||
: store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties')"
|
||||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
|
|
@ -401,11 +413,7 @@ watch(
|
|||
>
|
||||
<q-item-section>
|
||||
<div class="row items-center">
|
||||
<q-icon
|
||||
:color="item.color"
|
||||
size="17px"
|
||||
:name="item.icon"
|
||||
/>
|
||||
<q-icon :color="item.color" size="xs" :name="item.icon" />
|
||||
<div class="q-pl-md">{{ item.label }}</div>
|
||||
</div>
|
||||
</q-item-section>
|
||||
|
|
@ -487,7 +495,6 @@ watch(
|
|||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
@ -163,10 +163,8 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
|
||||
"no",
|
||||
"fullName",
|
||||
"posType",
|
||||
|
|
@ -306,7 +304,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
|
||||
|
|
@ -339,7 +337,7 @@ 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"
|
||||
|
|
@ -348,7 +346,7 @@ 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
|
||||
|
|
@ -368,21 +366,33 @@ function onClickViewInfo(type: string, id: string) {
|
|||
</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.roundCode !== 'SPECIAL'? store.itemMenu :store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
|
||||
v-for="(item, index) in store.roundCode !== 'SPECIAL'? checkPermission($route)?.attrIsUpdate &&!checkPermission($route)?.attrIsDelete
|
||||
? store.itemMenu.filter((x:any)=>x.type !== 'delete')
|
||||
:!checkPermission($route)?.attrIsUpdate && checkPermission($route)?.attrIsDelete
|
||||
? store.itemMenu.filter((x:any)=>x.type === 'delete')
|
||||
:store.itemMenu
|
||||
: 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 !== 'moveGroup' && x.type === 'delete')
|
||||
: store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
|
||||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
|
|
@ -408,7 +418,7 @@ function onClickViewInfo(type: string, id: string) {
|
|||
<div class="row items-center">
|
||||
<q-icon
|
||||
:color="item.color"
|
||||
size="17px"
|
||||
size="xs"
|
||||
:name="item.icon"
|
||||
/>
|
||||
<div class="q-pl-md">{{ item.label }}</div>
|
||||
|
|
@ -472,12 +482,11 @@ function onClickViewInfo(type: string, id: string) {
|
|||
"
|
||||
>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
dense
|
||||
icon="info"
|
||||
class="q-pa-none q-ml-xs"
|
||||
color="info"
|
||||
size="12px"
|
||||
@click.pervent="onClickViewInfo(col.name, props.row.profileId)"
|
||||
>
|
||||
</q-btn>
|
||||
|
|
@ -487,7 +496,6 @@ function onClickViewInfo(type: string, id: string) {
|
|||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, nextTick } from "vue";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -47,12 +47,9 @@ const isDisable = ref<boolean>(false);
|
|||
const page = ref<number>(1);
|
||||
const pageSize = ref<number>(50);
|
||||
const lastPage = ref<number>(0);
|
||||
const loading = ref(false);
|
||||
const nextPage = ref<number>(1);
|
||||
|
||||
/**function เรียกข้อมูลรอบการขึ้นเงินเดือน*/
|
||||
function getRound() {
|
||||
showLoader();
|
||||
isDisable.value = false;
|
||||
http
|
||||
.get(
|
||||
|
|
@ -100,9 +97,6 @@ function getRound() {
|
|||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue