แก้ไข empType เงินเดือน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-04-29 17:36:58 +07:00
parent 8854b28277
commit 818f9d7723

View file

@ -110,7 +110,7 @@ const baseColumns = ref<QTableColumn[]>([
{
name: "posNo",
align: "left",
label: empType.value === "-employee" ? "ตำแหน่งเลขที่" : "เลขที่ตำแหน่ง",
label: empType.value === "" ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่",
sortable: true,
field: "posNo",
headerStyle: "font-size: 14px",
@ -130,7 +130,7 @@ const baseColumns = ref<QTableColumn[]>([
{
name: "positionName",
align: "left",
label: empType.value === "-employee" ? "ตำแหน่ง" : "ตำแหน่งในสายงาน",
label: empType.value === "" ? "ตำแหน่งในสายงาน" : "ตำแหน่ง",
sortable: true,
field: "positionName",
headerStyle: "font-size: 14px",
@ -143,7 +143,7 @@ const baseColumns = ref<QTableColumn[]>([
{
name: "positionType",
align: "left",
label: empType.value === "-employee" ? "กลุ่มงาน" : "ตำแหน่งประเภท",
label: empType.value === "" ? "ตำแหน่งประเภท" : "กลุ่มงาน",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -156,7 +156,7 @@ const baseColumns = ref<QTableColumn[]>([
{
name: "positionLevel",
align: "left",
label: empType.value === "-employee" ? "ระดับชั้นงาน" : "ระดับ",
label: empType.value === "" ? "ระดับ" : "ระดับชั้นงาน",
sortable: true,
field: "positionLevel",
format(val, row) {
@ -237,7 +237,7 @@ const baseColumns = ref<QTableColumn[]>([
{
name: "amount",
align: "left",
label: empType.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน",
label: empType.value === "" ? "เงินเดือน" : "ค่าจ้าง",
sortable: true,
field: "amount",
headerStyle: "font-size: 14px",
@ -347,7 +347,7 @@ const baseVisibleColumns = ref<string[]>([
]);
const columns = computed<QTableColumn[]>(() => {
if (empType.value === "-employee") {
if (empType.value !== "") {
if (baseColumns.value) {
return baseColumns.value.filter(
(column) =>
@ -371,7 +371,7 @@ const pagination = ref({
});
const columnsHistory = computed<QTableColumn[]>(() => {
if (empType.value === "-employee") {
if (empType.value !== "") {
if (baseColumns.value) {
return baseColumns.value.filter(
(column) =>
@ -961,8 +961,8 @@ onMounted(async () => {
<DialogHeader
:tittle="
isStatusEdit
? `แก้ไข${empType === '-employee' ? 'ค่าจ้าง' : 'เงินเดือน'}`
: `เพิ่ม${empType === '-employee' ? 'ค่าจ้าง' : 'เงินเดือน'}`
? `แก้ไข${empType === '' ? 'เงินเดือน' : 'ค่าจ้าง'}`
: `เพิ่ม${empType === '' ? 'เงินเดือน' : 'ค่าจ้าง'}`
"
:close="onClickCloseDialog"
/>