Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop
* 'develop' of github.com:Frappet/bma-ehr-frontend: no message ทะเบียนประวัติ => เงินเดือน/ค่าจัาง อัตราค่าจ้าง => เพิ่ม title salary => report
This commit is contained in:
commit
465ad27055
4 changed files with 45 additions and 13 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { ref, reactive, onMounted, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute } from "vue-router";
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -37,7 +37,7 @@ const {
|
|||
success,
|
||||
} = useCounterMixin();
|
||||
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
const baseColumns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "date",
|
||||
align: "left",
|
||||
|
|
@ -51,7 +51,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "amount",
|
||||
align: "left",
|
||||
label: "เงินเดือน",
|
||||
label: empType.value === "-employee" ? "ค่าตอบแทนรายเดือน" : "เงินเดือน",
|
||||
sortable: true,
|
||||
field: "amount",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -127,6 +127,20 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
const columns = computed(() => {
|
||||
if (empType.value === "-employee") {
|
||||
if (baseColumns.value) {
|
||||
return baseColumns.value.filter(
|
||||
(column) =>
|
||||
column.name !== "positionSalaryAmount" &&
|
||||
column.name !== "mouthSalaryAmount"
|
||||
);
|
||||
}
|
||||
}
|
||||
return baseColumns.value;
|
||||
});
|
||||
|
||||
const visibleColumns = ref<string[]>([
|
||||
"date",
|
||||
"amount",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -29,7 +29,7 @@ const empType = ref<string>(
|
|||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const salaryId = defineModel<string>("salaryId", { required: true });
|
||||
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
const baseColumns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "date",
|
||||
align: "left",
|
||||
|
|
@ -43,7 +43,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "amount",
|
||||
align: "left",
|
||||
label: "เงินเดือน",
|
||||
label: empType.value === "-employee" ? "ค่าตอบแทนรายเดือน" : "เงินเดือน",
|
||||
sortable: true,
|
||||
field: "amount",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -218,6 +218,19 @@ const visibleColumns = ref<string[]>([
|
|||
"lastUpdateFullName",
|
||||
"lastUpdatedAt",
|
||||
]);
|
||||
|
||||
const columns = computed(() => {
|
||||
if (empType.value === "-employee") {
|
||||
if (baseColumns.value) {
|
||||
return baseColumns.value.filter(
|
||||
(column) =>
|
||||
column.name !== "positionSalaryAmount" &&
|
||||
column.name !== "mouthSalaryAmount"
|
||||
);
|
||||
}
|
||||
}
|
||||
return baseColumns.value;
|
||||
});
|
||||
const rows = ref<any>([]);
|
||||
const pagination = ref({
|
||||
page: 1,
|
||||
|
|
|
|||
|
|
@ -340,9 +340,11 @@ function onClickDownload(data: DataOption) {
|
|||
|
||||
const isGovernmentId =
|
||||
data.id === "gov-01" ||
|
||||
data.id === "gov-03" ||
|
||||
data.id === "gov-04" ||
|
||||
data.id === "gov-05" ||
|
||||
data.id === "gov-07";
|
||||
data.id === "gov-07" ||
|
||||
data.id === "gov-08";
|
||||
|
||||
const finalUrl = isGovernmentId ? `${url}/${store.tabGroup}` : url;
|
||||
http
|
||||
|
|
|
|||
|
|
@ -107,15 +107,18 @@ const pagination = ref({
|
|||
rowsPerPage: formFilter.pageSize,
|
||||
});
|
||||
const isActive = ref<boolean>(false);
|
||||
const groupSalary = ref<string>("");
|
||||
|
||||
function fetchDataDetail() {
|
||||
http
|
||||
.get(config.API.salaryEmployeeChartByid(salaryEmployeeId.value))
|
||||
.then((res) => {
|
||||
isActive.value = res.data.result.isActive;
|
||||
groupSalary.value = res.data.result.group;
|
||||
})
|
||||
.catch((e) => {})
|
||||
.finally(() => {});
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
});
|
||||
}
|
||||
|
||||
function fetchSalalyEmployeeRate() {
|
||||
|
|
@ -222,9 +225,9 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
fetchSalalyEmployeeRate();
|
||||
fetchDataDetail();
|
||||
onMounted(async () => {
|
||||
await fetchDataDetail();
|
||||
await fetchSalalyEmployeeRate();
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
|
|
@ -240,7 +243,7 @@ onMounted(() => {
|
|||
class="q-mr-sm"
|
||||
@click="router.go(-1)"
|
||||
/>
|
||||
อัตราค่าจ้าง
|
||||
อัตราค่าจ้าง กลุ่มที่{{ groupSalary }}
|
||||
</div>
|
||||
</div>
|
||||
<q-card flat bordered class="q-pa-md">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue