เงินเดือน => permission ผังบัญชีค่าจ้างลูกจ้างประจำ
This commit is contained in:
parent
864b67fbe5
commit
38d5697a7c
9 changed files with 323 additions and 252 deletions
|
|
@ -32,14 +32,14 @@ const store = useSalaryEmployeeChartDataStore();
|
|||
<q-separator />
|
||||
|
||||
<q-tab-panels v-model="store.mainTab" animated>
|
||||
<q-tab-panel name="structure">
|
||||
<div class="q-pa-sm">
|
||||
<q-tab-panel name="structure" class="q-pt-none">
|
||||
<div class="q-pa-xs">
|
||||
<TabStructure />
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="criteria">
|
||||
<div class="q-pa-sm">
|
||||
<q-tab-panel name="criteria" class="q-pt-none">
|
||||
<div class="q-pa-xs">
|
||||
<TabCriteris />
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, watch } from "vue";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -145,20 +146,6 @@ const modalDialogEmployeeRate = ref<boolean>(false);
|
|||
const isStatusEdit = ref<boolean>(false);
|
||||
const dataRow = ref<EmployeeRateSalary>();
|
||||
|
||||
function onClickAction(type: string, data: EmployeeRateSalary) {
|
||||
switch (type) {
|
||||
case "edit":
|
||||
onEdit(data);
|
||||
break;
|
||||
case "delete":
|
||||
onDelete(data.id);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function onEdit(data: EmployeeRateSalary) {
|
||||
modalDialogEmployeeRate.value = true;
|
||||
isStatusEdit.value = true;
|
||||
|
|
@ -186,11 +173,6 @@ function onClickAdd() {
|
|||
isStatusEdit.value = false;
|
||||
}
|
||||
|
||||
function filterFn() {
|
||||
formFilter.page = 1;
|
||||
fetchSalalyEmployeeRate();
|
||||
}
|
||||
|
||||
function updatePage(val: number) {
|
||||
formFilter.page = val;
|
||||
fetchSalalyEmployeeRate();
|
||||
|
|
@ -243,12 +225,19 @@ onMounted(async () => {
|
|||
class="q-mr-sm"
|
||||
@click="router.go(-1)"
|
||||
/>
|
||||
อัตราค่าจ้างของ กลุ่มที่ {{ groupSalary }}
|
||||
อัตราค่าจ้างของกลุ่มที่ {{ groupSalary }}
|
||||
</div>
|
||||
</div>
|
||||
<q-card flat bordered class="q-pa-md">
|
||||
<q-toolbar class="text-primary" style="padding: 0px">
|
||||
<q-btn v-if="!isActive" flat round dense icon="add" @click="onClickAdd">
|
||||
<q-btn
|
||||
v-if="!isActive && checkPermission($route)?.attrIsUpdate"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="add"
|
||||
@click="onClickAdd"
|
||||
>
|
||||
<q-tooltip>เพิ่ม </q-tooltip>
|
||||
</q-btn>
|
||||
<q-space />
|
||||
|
|
@ -259,34 +248,6 @@ onMounted(async () => {
|
|||
color="blue"
|
||||
@click="clickDownload()"
|
||||
/>
|
||||
<!-- <q-input
|
||||
borderless
|
||||
dense
|
||||
outlined
|
||||
v-model="formFilter.keyword"
|
||||
@keydown.enter.pervrnt="filterFn"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
<q-select
|
||||
for="#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-toolbar>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
|
|
@ -314,41 +275,28 @@ onMounted(async () => {
|
|||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-if="!isActive">
|
||||
<q-btn
|
||||
v-if="!isActive && checkPermission($route)?.attrIsUpdate"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-dots-vertical"
|
||||
class="q-pa-none q-ml-xs"
|
||||
color="grey-13"
|
||||
size="12px"
|
||||
v-for="(item, index) in itemMenu"
|
||||
:key="index"
|
||||
:color="item.color"
|
||||
:icon="item.icon"
|
||||
@click.stop="
|
||||
item.type === 'edit'
|
||||
? onEdit(props.row)
|
||||
: item.type === 'delete'
|
||||
? onDelete(props.row.id)
|
||||
: null
|
||||
"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list dense style="min-width: 200px">
|
||||
<q-item
|
||||
v-for="(item, index) in itemMenu"
|
||||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click.stop="onClickAction(item.type, props.row)"
|
||||
>
|
||||
<q-item-section>
|
||||
<div class="row items-center">
|
||||
<q-icon
|
||||
:color="item.color"
|
||||
size="17px"
|
||||
:name="item.icon"
|
||||
/>
|
||||
<div class="q-pl-md">{{ item.label }}</div>
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
<q-tooltip>{{ item.label }}</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</q-td>
|
||||
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
|
|
|
|||
|
|
@ -176,17 +176,18 @@ function onClickSalaryRate(type: string, data: SalaryRate | null) {
|
|||
}
|
||||
|
||||
function onClickDelete(id: string) {
|
||||
dialogRemove($q, async () => {
|
||||
await http
|
||||
dialogRemove($q, () => {
|
||||
showLoader();
|
||||
http
|
||||
.delete(config.API.salaryRateListByid(id))
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
.then(async () => {
|
||||
await fetchListSalalyRate();
|
||||
await success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
fetchListSalalyRate();
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue