no message
This commit is contained in:
parent
ab5e777542
commit
5775054ef1
1 changed files with 16 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue