แก้ไขการแสดงผลกรณีถึงแก่กรรม

This commit is contained in:
Warunee Tamkoo 2023-09-01 18:12:43 +07:00
parent 5555706f20
commit f9d8d9486e
5 changed files with 160 additions and 421 deletions

View file

@ -2,54 +2,35 @@
<template>
<q-card flat bordered class="col-12 q-px-lg q-py-md">
<q-form ref="myForm">
<ProfileTable
:rows="rows"
:columns="columns"
:filter="filter"
:visible-columns="visibleColumns"
v-model:inputfilter="filter"
v-model:inputvisible="visibleColumns"
:add="clickAdd"
name="ตำแหน่ง/เงินเดือน"
icon="mdi-cash"
:statusEdit="statusEdit"
>
<ProfileTable :rows="rows" :columns="columns" :filter="filter" :visible-columns="visibleColumns"
v-model:inputfilter="filter" v-model:inputvisible="visibleColumns" :add="clickAdd" name="ตำแหน่ง/เงินเดือน"
icon="mdi-cash" :statusEdit="statusEdit">
<template #columns="props">
<q-tr :props="props">
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
@click="selectData(props)"
class="cursor-pointer"
>
<q-td v-for="col in props.cols" :key="col.name" :props="props" @click="selectData(props)"
class="cursor-pointer">
<div v-if="col.name == 'date'" class="table_ellipsis">
{{ date2Thai(col.value) }}
</div>
<div
v-else-if="
<div v-else-if="props.row.salaryStatus !== 'DEATH' && (
col.name == 'positionSalaryAmount' ||
col.name == 'mouthSalaryAmount' ||
col.name == 'amount'
"
class="table_ellipsis"
>
col.name == 'amount')
" class="table_ellipsis">
{{ col.value == null ? "" : col.value.toLocaleString("en-US") }}
</div>
<div v-else-if="props.row.salaryStatus === 'DEATH' && col.name == 'position'" class="table_ellipsis">
งแกกรรม
</div>
<div v-else-if="props.row.salaryStatus === 'DEATH' && col.name !== 'salaryRef'" class="table_ellipsis">
-
</div>
<div v-else class="table_ellipsis">
{{ col.value }}
</div>
</q-td>
<q-td auto-width>
<q-btn
color="info"
flat
dense
round
size="14px"
icon="mdi-history"
@click="clickHistory(props.row)"
/>
<q-btn color="info" flat dense round size="14px" icon="mdi-history" @click="clickHistory(props.row)" />
</q-td>
</q-tr>
</template>
@ -67,46 +48,19 @@
<div class="col-xs-12 col-sm-5 row">
<q-card flat bordered class="fit q-pa-sm">
<q-scroll-area visible style="height: 70vh">
<q-input
outlined
dense
v-model="search"
placeholder="ค้นหา"
class="q-mb-sm"
>
<q-input outlined dense v-model="search" placeholder="ค้นหา" class="q-mb-sm">
<template v-slot:append>
<q-icon name="mdi-magnify" />
</template>
</q-input>
<q-tree
v-if="edit"
:nodes="nodesTree"
dense
node-key="id"
v-model:selected="selected"
v-model:expanded="expanded"
no-selection-unset
selected-color="primary"
@update:selected="onSelected"
default-expand-all
/>
<q-tree
v-else
:nodes="nodesTree"
dense
node-key="id"
v-model:expanded="expanded"
no-selection-unset
selected-color="primary"
@update:selected="onSelected"
default-expand-all
>
<q-tree v-if="edit" :nodes="nodesTree" dense node-key="id" v-model:selected="selected"
v-model:expanded="expanded" no-selection-unset selected-color="primary" @update:selected="onSelected"
default-expand-all />
<q-tree v-else :nodes="nodesTree" dense node-key="id" v-model:expanded="expanded" no-selection-unset
selected-color="primary" @update:selected="onSelected" default-expand-all>
<template v-slot:default-header="prop">
<div class="row items-center">
<div
class="text-primary"
v-if="selected == prop.node.id"
>
<div class="text-primary" v-if="selected == prop.node.id">
{{ prop.node.label }}
</div>
<div v-else>
@ -124,46 +78,24 @@
<div class="row col-12 q-col-gutter-xs">
<div class="col-xs-12 col-sm-12 col-md-12"></div>
<div class="col-xs-6 col-sm-6 col-md-6">
<datepicker
menu-class-name="modalfix"
:readonly="!edit"
v-model="date"
:locale="'th'"
autoApply
:enableTimePicker="false"
@update:modelValue="clickEditRow"
week-start="0"
>
<datepicker menu-class-name="modalfix" :readonly="!edit" v-model="date" :locale="'th'" autoApply
:enableTimePicker="false" @update:modelValue="clickEditRow" week-start="0">
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:borderless="!edit"
:model-value="date2Thai(date)"
:rules="[
(val:string) =>
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :borderless="!edit"
:model-value="date2Thai(date)" :rules="[
(val: string) =>
!!val ||
`${'กรุณาเลือกวัน เดือน ปี'}`,
]"
:label="`${'วัน เดือน ปี'}`"
hide-bottom-space
>
]" :label="`${'วัน เดือน ปี'}`" hide-bottom-space>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
:style="
edit
? 'color: var(--q-primary)'
: 'color: var(--q-grey)'
"
>
<q-icon name="event" class="cursor-pointer" :style="edit
? 'color: var(--q-primary)'
: 'color: var(--q-grey)'
">
</q-icon>
</template>
</q-input>
@ -171,249 +103,96 @@
</datepicker>
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<selector
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="posNoId"
:rules="[
(val:string) => !!val || `${'กรุณาเลือกตำแหน่งเลขที่'}`,
]"
:label="`${'ตำแหน่งเลขที่'}`"
@update:modelValue="clickEditRow"
emit-value
map-options
option-label="name"
:options="posNoOptions"
option-value="id"
hide-bottom-space
use-input
input-debounce="0"
@filter="(inputValue:any,
doneFn:Function) => filterSelector(inputValue, doneFn,'1'
) "
/>
<selector :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="posNoId" :rules="[
(val: string) => !!val || `${'กรุณาเลือกตำแหน่งเลขที่'}`,
]" :label="`${'ตำแหน่งเลขที่'}`" @update:modelValue="clickEditRow" emit-value map-options
option-label="name" :options="posNoOptions" option-value="id" hide-bottom-space use-input
input-debounce="0" @filter="(inputValue: any,
doneFn: Function) => filterSelector(inputValue, doneFn, '1'
)" />
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<selector
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionId"
:rules="[(val:string) => !!val || `${'กรุณาเลือกตำแหน่ง'}`]"
:label="`${'ตำแหน่ง'}`"
@update:modelValue="clickEditRow"
emit-value
map-options
option-label="name"
:options="positionOptions"
option-value="id"
hide-bottom-space
use-input
input-debounce="0"
@filter="(inputValue:any,
doneFn:Function) => filterSelector(inputValue, doneFn,'2'
) "
/>
<selector :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="positionId"
:rules="[(val: string) => !!val || `${'กรุณาเลือกตำแหน่ง'}`]" :label="`${'ตำแหน่ง'}`"
@update:modelValue="clickEditRow" emit-value map-options option-label="name"
:options="positionOptions" option-value="id" hide-bottom-space use-input input-debounce="0"
@filter="(inputValue: any,
doneFn: Function) => filterSelector(inputValue, doneFn, '2'
)" />
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<!-- :rules="[(val:string) => !!val || `${'กรุณาเลือกด้าน/สาขา'}`]" -->
<selector
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionPathSideId"
:label="`${'ด้าน/สาขา'}`"
@update:modelValue="clickEditRow"
emit-value
map-options
option-label="name"
:options="positionSideOptions"
option-value="id"
hide-bottom-space
use-input
input-debounce="0"
@filter="(inputValue:any,
doneFn:Function) => filterSelector(inputValue, doneFn,'3'
) "
/>
<selector :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="positionPathSideId" :label="`${'ด้าน/สาขา'}`"
@update:modelValue="clickEditRow" emit-value map-options option-label="name"
:options="positionSideOptions" option-value="id" hide-bottom-space use-input input-debounce="0"
@filter="(inputValue: any,
doneFn: Function) => filterSelector(inputValue, doneFn, '3'
)" />
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<selector
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeId"
:rules="[
(val:string) => !!val || `${'กรุณาเลือกตำแหน่งประเภท'}`,
]"
:label="`${'ตำแหน่งประเภท'}`"
@update:modelValue="clickEditRow"
emit-value
map-options
option-label="name"
:options="positionTypeOptions"
option-value="id"
hide-bottom-space
use-input
input-debounce="0"
@filter="(inputValue:any,
doneFn:Function) => filterSelector(inputValue, doneFn,'4'
) "
/>
<selector :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="positionTypeId" :rules="[
(val: string) => !!val || `${'กรุณาเลือกตำแหน่งประเภท'}`,
]" :label="`${'ตำแหน่งประเภท'}`" @update:modelValue="clickEditRow" emit-value map-options
option-label="name" :options="positionTypeOptions" option-value="id" hide-bottom-space use-input
input-debounce="0" @filter="(inputValue: any,
doneFn: Function) => filterSelector(inputValue, doneFn, '4'
)" />
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<selector
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionLineId"
:rules="[(val:string) => !!val || `${'กรุณาเลือกสายงาน'}`]"
:label="`${'สายงาน'}`"
@update:modelValue="clickEditRow"
emit-value
map-options
option-label="name"
:options="positionLineOptions"
option-value="id"
hide-bottom-space
use-input
input-debounce="0"
@filter="(inputValue:any,
doneFn:Function) => filterSelector(inputValue, doneFn,'5'
) "
/>
<selector :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="positionLineId"
:rules="[(val: string) => !!val || `${'กรุณาเลือกสายงาน'}`]" :label="`${'สายงาน'}`"
@update:modelValue="clickEditRow" emit-value map-options option-label="name"
:options="positionLineOptions" option-value="id" hide-bottom-space use-input input-debounce="0"
@filter="(inputValue: any,
doneFn: Function) => filterSelector(inputValue, doneFn, '5'
)" />
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<selector
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelId"
:rules="[(val:string) => !!val || `${'กรุณาเลือกระดับ'}`]"
:label="`${'ระดับ'}`"
@update:modelValue="clickEditRow"
emit-value
map-options
option-label="name"
:options="positionLevelOptions"
option-value="id"
hide-bottom-space
use-input
input-debounce="0"
@filter="(inputValue:any,
doneFn:Function) => filterSelector(inputValue, doneFn,'6'
) "
/>
<selector :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="positionLevelId"
:rules="[(val: string) => !!val || `${'กรุณาเลือกระดับ'}`]" :label="`${'ระดับ'}`"
@update:modelValue="clickEditRow" emit-value map-options option-label="name"
:options="positionLevelOptions" option-value="id" hide-bottom-space use-input input-debounce="0"
@filter="(inputValue: any,
doneFn: Function) => filterSelector(inputValue, doneFn, '6'
)" />
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<selector
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionExecutiveId"
:label="`${'ตำแหน่งทางการบริหาร'}`"
@update:modelValue="clickEditRow"
emit-value
map-options
option-label="name"
:options="positionExecutiveOptions"
option-value="id"
hide-bottom-space
use-input
input-debounce="0"
@filter="(inputValue:any,
doneFn:Function) => filterSelector(inputValue, doneFn,'7'
) "
/>
<selector :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="positionExecutiveId" :label="`${'ตำแหน่งทางการบริหาร'}`"
@update:modelValue="clickEditRow" emit-value map-options option-label="name"
:options="positionExecutiveOptions" option-value="id" hide-bottom-space use-input
input-debounce="0" @filter="(inputValue: any,
doneFn: Function) => filterSelector(inputValue, doneFn, '7'
)" />
</div>
<div class="col-xs-4 col-sm-4 col-md-4">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="amount"
:rules="[(val:string) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
:label="`${'เงินเดือน'}`"
@update:modelValue="clickEditRow"
type="number"
hide-bottom-space
/>
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="amount" :rules="[(val: string) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
:label="`${'เงินเดือน'}`" @update:modelValue="clickEditRow" type="number" hide-bottom-space />
</div>
<div class="col-xs-4 col-sm-4 col-md-4">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionSalaryAmount"
:label="`${'เงินประจำตำแหน่ง'}`"
@update:modelValue="clickEditRow"
type="number"
hide-bottom-space
/>
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="positionSalaryAmount" :label="`${'เงินประจำตำแหน่ง'}`"
@update:modelValue="clickEditRow" type="number" hide-bottom-space />
</div>
<div class="col-xs-4 col-sm-4 col-md-4">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="mouthSalaryAmount"
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
@update:modelValue="clickEditRow"
type="number"
hide-bottom-space
/>
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="mouthSalaryAmount" :label="`${'เงินค่าตอบแทนรายเดือน'}`"
@update:modelValue="clickEditRow" type="number" hide-bottom-space />
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="refCommandNo"
hide-bottom-space
:label="`${'เลขที่คำสั่ง'}`"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่คำสั่ง'}`]"
@update:modelValue="clickEditRow"
>
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="refCommandNo" hide-bottom-space :label="`${'เลขที่คำสั่ง'}`"
:rules="[(val: string) => !!val || `${'กรุณากรอกเลขที่คำสั่ง'}`]"
@update:modelValue="clickEditRow">
<template v-slot:append>
<q-icon
name="mdi-file"
class="cursor-pointer"
@click="resetFilter"
/>
<q-icon name="mdi-file" class="cursor-pointer" @click="resetFilter" />
</template>
</q-input>
</div>
@ -451,41 +230,17 @@
</div> -->
<div class="row col-xs-12 col-sm-12 col-md-12">
<selector
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="refSelected"
:label="`${'ต้นแบบ (template) เอกสารอ้างอิง'}`"
@update:modelValue="clickEditRowRef"
option-label="name"
:options="refOptions"
option-value="id"
hide-bottom-space
use-input
input-debounce="0"
@filter="(inputValue:any,
doneFn:Function) => filterSelector(inputValue, doneFn,'8'
) "
/>
<selector :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="refSelected" :label="`${'ต้นแบบ (template) เอกสารอ้างอิง'}`"
@update:modelValue="clickEditRowRef" option-label="name" :options="refOptions" option-value="id"
hide-bottom-space use-input input-debounce="0" @filter="(inputValue: any,
doneFn: Function) => filterSelector(inputValue, doneFn, '8'
)" />
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="salaryRef"
:label="`${'เอกสารอ้างอิง'}`"
@update:modelValue="clickEditRow"
type="textarea"
hide-bottom-space
/>
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
:borderless="!edit" v-model="salaryRef" :label="`${'เอกสารอ้างอิง'}`"
@update:modelValue="clickEditRow" type="textarea" hide-bottom-space />
</div>
</div>
</q-scroll-area>
@ -494,49 +249,25 @@
</div>
</q-card-section>
<q-separator />
<DialogFooter
:cancel="clickCancel"
:edit="clickEdit"
:save="clickSave"
:validate="validateData"
:clickNext="clickNext"
:clickPrevious="clickPrevious"
:clickDelete="clickDelete"
v-model:editvisible="edit"
v-model:next="next"
v-model:previous="previous"
v-model:modalEdit="modalEdit"
/>
<DialogFooter :cancel="clickCancel" :edit="clickEdit" :save="clickSave" :validate="validateData"
:clickNext="clickNext" :clickPrevious="clickPrevious" :clickDelete="clickDelete" v-model:editvisible="edit"
v-model:next="next" v-model:previous="previous" v-model:modalEdit="modalEdit" />
</q-form>
</q-card>
</q-dialog>
<HistoryTable
:rows="rowsHistory"
:columns="columnsHistory"
:filter="filterHistory"
:visible-columns="visibleColumnsHistory"
v-model:modal="modalHistory"
v-model:inputfilter="filterHistory"
v-model:inputvisible="visibleColumnsHistory"
v-model:tittle="tittleHistory"
>
<HistoryTable :rows="rowsHistory" :columns="columnsHistory" :filter="filterHistory"
:visible-columns="visibleColumnsHistory" v-model:modal="modalHistory" v-model:inputfilter="filterHistory"
v-model:inputvisible="visibleColumnsHistory" v-model:tittle="tittleHistory">
<template #columns="props">
<q-tr :props="props">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div
v-if="col.name == 'date' || col.name == 'createdAt'"
class="table_ellipsis"
>
<div v-if="col.name == 'date' || col.name == 'createdAt'" class="table_ellipsis">
{{ date2Thai(col.value) }}
</div>
<div
v-else-if="
col.name == 'positionSalaryAmount' ||
col.name == 'mouthSalaryAmount' ||
col.name == 'amount'
"
class="table_ellipsis"
>
<div v-else-if="col.name == 'positionSalaryAmount' ||
col.name == 'mouthSalaryAmount' ||
col.name == 'amount'
" class="table_ellipsis">
{{ col.value == null ? "" : col.value.toLocaleString("en-US") }}
</div>
<div v-else class="table_ellipsis">
@ -917,23 +648,23 @@ const filter = ref<string>(""); //search data table
const visibleColumns = ref<String[]>([]);
profileData.salary.columns.length == 0
? (visibleColumns.value = [
"date",
"amount",
"positionSalaryAmount",
"mouthSalaryAmount",
"oc",
"position",
"posNo",
"positionLine",
"positionPathSide",
"positionType",
"positionLevel",
"positionExecutive",
"positionExecutiveSide",
"salaryClass",
"salaryRef",
"refCommandNo",
])
"date",
"amount",
"positionSalaryAmount",
"mouthSalaryAmount",
"oc",
"position",
"posNo",
"positionLine",
"positionPathSide",
"positionType",
"positionLevel",
"positionExecutive",
"positionExecutiveSide",
"salaryClass",
"salaryRef",
"refCommandNo",
])
: (visibleColumns.value = profileData.salary.columns);
const columns = ref<QTableProps["columns"]>([
{
@ -1507,7 +1238,7 @@ const fetchPosition = async () => {
positionLevelOptions.value = optionPositionLevels;
positionLevelOptionsFilter.value = optionPositionLevels;
})
.catch((e: any) => {})
.catch((e: any) => { })
.finally(() => {
hideLoader();
});
@ -1548,6 +1279,7 @@ const fetchData = async () => {
positionExecutiveSideId: e.positionExecutiveSideId,
salaryClass: e.salaryClass,
salaryRef: e.salaryRef,
salaryStatus: e.salaryStatus,
refCommandNo: e.refCommandNo,
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
@ -2024,6 +1756,7 @@ const clickHistory = async (row: RequestItemsObject) => {
positionExecutiveSide: e.positionExecutiveSide,
positionExecutiveSideId: e.positionExecutiveSideId,
salaryClass: e.salaryClass,
salaryStatus: e.salaryStatus,
salaryRef: e.salaryRef,
refCommandNo: e.refCommandNo,
createdFullName: e.createdFullName,
@ -2061,7 +1794,7 @@ const getClass = (val: boolean) => {
"full-width cursor-pointer": !val,
};
};
const resetFilter = () => {};
const resetFilter = () => { };
</script>
<style lang="scss">
.modalfix {

View file

@ -37,6 +37,7 @@ interface RequestItemsObject {
salaryRef: string;
refCommandNo: string;
// refCommandDate: Date | null;
salaryStatus: string | null;
createdFullName: string;
createdAt: Date;
}
@ -65,6 +66,7 @@ interface RequestItemsEmployee {
salaryClass: string | null;
salaryRef: string | null;
refCommandNo: string;
salaryStatus: string | null;
// refCommandDate: Date | null;
}

View file

@ -27,6 +27,7 @@ interface ResponseObject {
salaryRef: string;
refCommandNo: string;
// refCommandDate: Date | null;
salaryStatus: string | null;
createdFullName: string;
createdAt: Date;
}
@ -55,6 +56,7 @@ interface ResponseObjectEmployee {
salaryClass: string | null;
salaryRef: string | null;
refCommandNo: string;
salaryStatus: string | null;
// refCommandDate: Date | null;
}

View file

@ -16,26 +16,24 @@
>
<template #columns="props">
<q-tr :props="props">
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
@click="selectData(props)"
class="cursor-pointer"
>
<q-td v-for="col in props.cols" :key="col.name" :props="props" @click="selectData(props)"
class="cursor-pointer">
<div v-if="col.name == 'date'" class="table_ellipsis">
{{ date2Thai(col.value) }}
</div>
<div
v-else-if="
<div v-else-if="props.row.salaryStatus !== 'DEATH' && (
col.name == 'positionSalaryAmount' ||
col.name == 'mouthSalaryAmount' ||
col.name == 'amount'
"
class="table_ellipsis"
>
col.name == 'amount')
" class="table_ellipsis">
{{ col.value == null ? "" : col.value.toLocaleString("en-US") }}
</div>
<div v-else-if="props.row.salaryStatus === 'DEATH' && col.name == 'position'" class="table_ellipsis">
งแกกรรม
</div>
<div v-else-if="props.row.salaryStatus === 'DEATH' && col.name !== 'salaryRef'" class="table_ellipsis">
-
</div>
<div v-else class="table_ellipsis">
{{ col.value }}
</div>
@ -1548,6 +1546,7 @@ const fetchData = async () => {
positionExecutiveSideId: e.positionExecutiveSideId,
salaryClass: e.salaryClass,
salaryRef: e.salaryRef,
salaryStatus: e.salaryStatus,
refCommandNo: e.refCommandNo,
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
@ -2026,6 +2025,7 @@ const clickHistory = async (row: RequestItemsObject) => {
salaryClass: e.salaryClass,
salaryRef: e.salaryRef,
refCommandNo: e.refCommandNo,
salaryStatus: e.salaryStatus,
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
});

View file

@ -1513,6 +1513,7 @@ const fetchData = async () => {
salaryClass: e.salaryClass,
salaryRef: e.salaryRef,
refCommandNo: e.refCommandNo,
salaryStatus: e.salaryStatus,
// refCommandDate: new Date(e.refCommandDate),
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
@ -1982,6 +1983,7 @@ const clickHistory = async (row: RequestItemsEmployee) => {
salaryClass: e.salaryClass,
salaryRef: e.salaryRef,
refCommandNo: e.refCommandNo,
salaryStatus: e.salaryStatus,
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
});