Merge branch 'nice' into develop
This commit is contained in:
commit
ab5e777542
1 changed files with 17 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from "vue";
|
import { ref, reactive, onMounted, computed } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -37,7 +37,7 @@ const {
|
||||||
success,
|
success,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const baseColumns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "date",
|
name: "date",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -51,7 +51,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "amount",
|
name: "amount",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เงินเดือน",
|
label: empType.value === "-employee" ? "ค่าตอบแทนรายเดือน" : "เงินเดือน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "amount",
|
field: "amount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -127,6 +127,20 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
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[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"date",
|
"date",
|
||||||
"amount",
|
"amount",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue