เงินเดือน => permission รายการผังบัญชีเงินเดือน
This commit is contained in:
parent
ac40fb9674
commit
44a6ef192b
5 changed files with 146 additions and 108 deletions
|
|
@ -69,6 +69,8 @@ const title = computed(() => {
|
|||
? "เพิ่มผังบัญชีเงินเดือน"
|
||||
: props.typeAction === "edit"
|
||||
? "แก้ไขผังบัญชีเงินเดือน"
|
||||
: props.typeAction === "view"
|
||||
? "รายละเอียด"
|
||||
: "บัญชีเงินเดือน";
|
||||
|
||||
return name;
|
||||
|
|
@ -131,7 +133,7 @@ function fetchSalaryDetail(id: string) {
|
|||
formData.endDate = data.endDate;
|
||||
formData.details = data.details;
|
||||
formData.isSpecial = data.isSpecial;
|
||||
isReadonly.value = data.isActive;
|
||||
isReadonly.value = props.typeAction === 'view'? true: data.isActive;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -150,7 +152,7 @@ watch(
|
|||
if (modal.value) {
|
||||
await fetchPosType();
|
||||
|
||||
if (props.typeAction === "edit") {
|
||||
if (props.typeAction === "edit" || props.typeAction === "view") {
|
||||
showLoader();
|
||||
setTimeout(() => {
|
||||
if (props.data) {
|
||||
|
|
@ -522,7 +524,7 @@ const getClass = (val: boolean) => {
|
|||
</q-card-section>
|
||||
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-card-actions align="right" v-if="!isReadonly">
|
||||
<q-btn label="บันทึก" color="secondary" type="submit"
|
||||
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from "vue";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useQuasar } from "quasar";
|
||||
import axios from "axios";
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -238,7 +239,7 @@ watch(
|
|||
|
||||
<template>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card class="col-12" style="width: 80%">
|
||||
<q-card class="col-12" style="width: 40%">
|
||||
<Header :tittle="`อัปโหลดเอกสารอ้างอิง`" :close="closeDialog" />
|
||||
<q-separator />
|
||||
<q-card-section class="scroll" style="max-height: 70vh">
|
||||
|
|
@ -249,7 +250,10 @@ watch(
|
|||
<div class="col-12 row">
|
||||
<div v-if="!props.isActive" class="full-width">
|
||||
<q-file
|
||||
v-if="props.typeAction === 'edit'"
|
||||
v-if="
|
||||
props.typeAction === 'edit' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
class="col-12"
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -301,7 +305,12 @@ watch(
|
|||
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="!props.isActive">
|
||||
<div
|
||||
v-if="
|
||||
!props.isActive &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
>
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue