fix salary
This commit is contained in:
parent
931a25af8f
commit
3212193de2
5 changed files with 106 additions and 131 deletions
|
|
@ -26,6 +26,7 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
success,
|
success,
|
||||||
findOrgNameHtml,
|
findOrgNameHtml,
|
||||||
|
dialogConfirm,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
const empType = ref<string>(route.params.type.toString());
|
const empType = ref<string>(route.params.type.toString());
|
||||||
|
|
@ -43,6 +44,15 @@ const rows = ref<DataPosition[]>([]);
|
||||||
const rowsMain = ref<DataPosition[]>([]);
|
const rowsMain = ref<DataPosition[]>([]);
|
||||||
const keyword = ref<string>("");
|
const keyword = ref<string>("");
|
||||||
const baseColumns = ref<QTableColumn[]>([
|
const baseColumns = ref<QTableColumn[]>([
|
||||||
|
{
|
||||||
|
name: "no",
|
||||||
|
align: "left",
|
||||||
|
label: "ลำดับ",
|
||||||
|
sortable: false,
|
||||||
|
field: "no",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "commandDateAffect",
|
name: "commandDateAffect",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -52,10 +62,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (v) => date2Thai(v),
|
format: (v) => date2Thai(v),
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a
|
|
||||||
.toString()
|
|
||||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "commandDateSign",
|
name: "commandDateSign",
|
||||||
|
|
@ -66,10 +72,24 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (v) => date2Thai(v),
|
format: (v) => date2Thai(v),
|
||||||
sort: (a: string, b: string) =>
|
},
|
||||||
a
|
{
|
||||||
.toString()
|
name: "posNumCodeSit",
|
||||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
align: "left",
|
||||||
|
label: "หน่วยงานที่ออกคำสั่ง",
|
||||||
|
sortable: false,
|
||||||
|
field: "posNumCodeSit",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "posNumCodeSitAbb",
|
||||||
|
align: "left",
|
||||||
|
label: "ตัวย่อหน่วยงานที่ออกคำสั่ง",
|
||||||
|
sortable: false,
|
||||||
|
field: "posNumCodeSitAbb",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "posNo",
|
name: "posNo",
|
||||||
|
|
@ -86,10 +106,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
? row.posNo
|
? row.posNo
|
||||||
: "-";
|
: "-";
|
||||||
},
|
},
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a
|
|
||||||
.toString()
|
|
||||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionName",
|
name: "positionName",
|
||||||
|
|
@ -99,10 +115,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
field: "positionName",
|
field: "positionName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a
|
|
||||||
.toString()
|
|
||||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionType",
|
name: "positionType",
|
||||||
|
|
@ -112,10 +124,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
field: "positionType",
|
field: "positionType",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a
|
|
||||||
.toString()
|
|
||||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionLevel",
|
name: "positionLevel",
|
||||||
|
|
@ -134,8 +142,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
},
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionExecutive",
|
name: "positionExecutive",
|
||||||
|
|
@ -145,8 +151,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
field: "positionExecutive",
|
field: "positionExecutive",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "commandNo",
|
name: "commandNo",
|
||||||
|
|
@ -161,8 +165,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
},
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "commandCode",
|
name: "commandCode",
|
||||||
|
|
@ -175,8 +177,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
},
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "organization",
|
name: "organization",
|
||||||
|
|
@ -184,7 +184,7 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
label: "สังกัด",
|
label: "สังกัด",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "organization",
|
field: "organization",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px;min-width: 280px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return findOrgName({
|
return findOrgName({
|
||||||
|
|
@ -195,8 +195,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
child4: row.orgChild4,
|
child4: row.orgChild4,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "amount",
|
name: "amount",
|
||||||
|
|
@ -215,10 +213,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
}`
|
}`
|
||||||
: "-";
|
: "-";
|
||||||
},
|
},
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a
|
|
||||||
.toString()
|
|
||||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "mouthSalaryAmount",
|
name: "mouthSalaryAmount",
|
||||||
|
|
@ -229,10 +223,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (v) => Number(v).toLocaleString(),
|
format: (v) => Number(v).toLocaleString(),
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a
|
|
||||||
.toString()
|
|
||||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionSalaryAmount",
|
name: "positionSalaryAmount",
|
||||||
|
|
@ -243,10 +233,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (v) => Number(v).toLocaleString(),
|
format: (v) => Number(v).toLocaleString(),
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a
|
|
||||||
.toString()
|
|
||||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -257,14 +243,13 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
field: "remark",
|
field: "remark",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a
|
|
||||||
.toString()
|
|
||||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
|
"no",
|
||||||
"commandDateAffect",
|
"commandDateAffect",
|
||||||
|
"posNumCodeSit",
|
||||||
|
"posNumCodeSitAbb",
|
||||||
"posNo",
|
"posNo",
|
||||||
"positionName",
|
"positionName",
|
||||||
"positionType",
|
"positionType",
|
||||||
|
|
@ -309,6 +294,7 @@ async function fetchData() {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsMain.value = data;
|
rowsMain.value = data;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
serchDataTable();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -351,26 +337,39 @@ async function onSwapData(action: string, id: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDeleteData(id: string, isDelete: boolean) {
|
function onConfirmDeleteData(id: string, isDelete: boolean) {
|
||||||
dialogRemove($q, async () => {
|
isDelete
|
||||||
showLoader();
|
? dialogConfirm(
|
||||||
const path = isDelete ? "/delete-renew" : "/delete";
|
$q,
|
||||||
await http
|
() => {
|
||||||
.post(config.API.salaryTemp + `${path}`, {
|
onDeleteData(id, isDelete);
|
||||||
type: empType.value,
|
},
|
||||||
salaryId: id,
|
"ยืนยันการย้อนกลับข้อมูล",
|
||||||
})
|
"ต้องการยืนยันการย้อนกลับข้อมูลนี้ใช่หรือไม่?"
|
||||||
.then(async () => {
|
)
|
||||||
await fetchData();
|
: dialogRemove($q, () => {
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
onDeleteData(id, isDelete);
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
messageError($q, err);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
|
async function onDeleteData(id: string, isDelete: boolean) {
|
||||||
|
showLoader();
|
||||||
|
const path = isDelete ? "/delete-renew" : "/delete";
|
||||||
|
await http
|
||||||
|
.post(config.API.salaryTemp + `${path}`, {
|
||||||
|
type: empType.value,
|
||||||
|
salaryId: id,
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
await fetchData();
|
||||||
|
success($q, isDelete ? "ย้อนกลับข้อมูลสำเร็จ" : "ลบข้อมูลสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function classColorRow(isDelete: boolean, isEdit: boolean, isEntry: boolean) {
|
function classColorRow(isDelete: boolean, isEdit: boolean, isEntry: boolean) {
|
||||||
|
|
@ -484,7 +483,7 @@ onMounted(() => {
|
||||||
:icon="props.row.isDelete ? 'mdi-refresh-circle' : 'delete'"
|
:icon="props.row.isDelete ? 'mdi-refresh-circle' : 'delete'"
|
||||||
:color="props.row.isDelete ? 'orange' : 'red'"
|
:color="props.row.isDelete ? 'orange' : 'red'"
|
||||||
@click.stop.pervent="
|
@click.stop.pervent="
|
||||||
onDeleteData(props.row.id, props.row.isDelete)
|
onConfirmDeleteData(props.row.id, props.row.isDelete)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-tooltip>{{
|
<q-tooltip>{{
|
||||||
|
|
@ -505,10 +504,10 @@ onMounted(() => {
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div
|
<div v-if="col.name === 'no'">
|
||||||
v-if="col.name === 'organization'"
|
{{ props.rowIndex + 1 }}
|
||||||
class="text-html table_ellipsis"
|
</div>
|
||||||
>
|
<div v-else-if="col.name === 'organization'" class="text-html">
|
||||||
{{
|
{{
|
||||||
findOrgNameHtml({
|
findOrgNameHtml({
|
||||||
root: props.row.orgRoot,
|
root: props.row.orgRoot,
|
||||||
|
|
@ -519,10 +518,8 @@ onMounted(() => {
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
v-else-if="col.name === 'commandCode'"
|
<div v-else-if="col.name === 'commandCode'">
|
||||||
class="table_ellipsis"
|
|
||||||
>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posNo",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งเลขที่",
|
label: "เลขที่ตำแหน่ง",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posNo",
|
field: "posNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -86,7 +86,7 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posType",
|
name: "posType",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ประเภทตำแหน่ง",
|
label: "ตำแหน่งประเภท",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posType",
|
field: "posType",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -95,7 +95,7 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posLevel",
|
name: "posLevel",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับตำแหน่ง",
|
label: "ระดับ",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posLevel",
|
field: "posLevel",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,14 @@ import config from "@/app.config";
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useSalaryListSDataStore();
|
const store = useSalaryListSDataStore();
|
||||||
const { dialogRemove, messageError, showLoader, hideLoader, success } =
|
const {
|
||||||
useCounterMixin();
|
dialogRemove,
|
||||||
|
messageError,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
success,
|
||||||
|
findOrgNameHtml,
|
||||||
|
} = useCounterMixin();
|
||||||
|
|
||||||
/** Props*/
|
/** Props*/
|
||||||
const formFilter = defineModel<DataFilter>("formFilter", { required: true });
|
const formFilter = defineModel<DataFilter>("formFilter", { required: true });
|
||||||
|
|
@ -68,7 +74,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posType",
|
name: "posType",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ประเภทตำแหน่ง",
|
label: "ตำแหน่งประเภท",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posType",
|
field: "posType",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -95,7 +101,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posLevel",
|
name: "posLevel",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับตำแหน่ง",
|
label: "ระดับ",
|
||||||
field: "posLevel",
|
field: "posLevel",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -116,7 +122,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "สังกัด",
|
label: "สังกัด",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "organization",
|
field: "organization",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px;min-width:280px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -361,7 +367,7 @@ function onClickViewInfo(type: string, id: string) {
|
||||||
:options="!checkPermission($route)?.attrIsGet ? columns?.filter((col:any) => col.name !== 'posSalary' && col.name !== 'discipline' && col.name !== 'leave' ) : columns"
|
:options="!checkPermission($route)?.attrIsGet ? columns?.filter((col:any) => col.name !== 'posSalary' && col.name !== 'discipline' && col.name !== 'leave' ) : columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
class="q-ml-sm"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<d-table
|
<d-table
|
||||||
|
|
@ -457,25 +463,8 @@ function onClickViewInfo(type: string, id: string) {
|
||||||
`${props.row.prefix}${props.row.firstName} ${props.row.lastName}`
|
`${props.row.prefix}${props.row.firstName} ${props.row.lastName}`
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'organization'" class="table_ellipsis">
|
<div v-else-if="col.name == 'organization'" class="text-html">
|
||||||
<div
|
{{ findOrgNameHtml(props.row) }}
|
||||||
v-if="
|
|
||||||
props.row.child4 === null &&
|
|
||||||
props.row.child3 === null &&
|
|
||||||
props.row.child2 === null &&
|
|
||||||
props.row.child1 === null &&
|
|
||||||
props.row.root === null
|
|
||||||
"
|
|
||||||
>
|
|
||||||
-
|
|
||||||
</div>
|
|
||||||
{{
|
|
||||||
`${props.row.child4 ? props.row.child4 + " " : ""}${
|
|
||||||
props.row.child3 ? props.row.child3 + " " : ""
|
|
||||||
}${props.row.child2 ? props.row.child2 + " " : ""}${
|
|
||||||
props.row.child1 ? props.row.child1 + " " : ""
|
|
||||||
}${props.row.root ? props.row.root : ""}`
|
|
||||||
}}
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'amount'">
|
<div v-else-if="col.name == 'amount'">
|
||||||
{{ Number(props.row.amount).toLocaleString() }}
|
{{ Number(props.row.amount).toLocaleString() }}
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,14 @@ import DialogInfo from "@/modules/13_salary/components/DialogInfoMain.vue";
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useSalaryEmployeeListSDataStore();
|
const store = useSalaryEmployeeListSDataStore();
|
||||||
const { dialogRemove, messageError, showLoader, hideLoader, success } =
|
const {
|
||||||
useCounterMixin();
|
dialogRemove,
|
||||||
|
messageError,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
success,
|
||||||
|
findOrgNameHtml,
|
||||||
|
} = useCounterMixin();
|
||||||
|
|
||||||
/** Props*/
|
/** Props*/
|
||||||
const formFilter = defineModel<DataFilter>("formFilter", { required: true });
|
const formFilter = defineModel<DataFilter>("formFilter", { required: true });
|
||||||
|
|
@ -128,7 +134,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "สังกัด",
|
label: "สังกัด",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "organization",
|
field: "organization",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px;min-width:280px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -378,7 +384,7 @@ watch(
|
||||||
: columns"
|
: columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
class=" q-ml-sm"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<d-table
|
<d-table
|
||||||
|
|
@ -475,25 +481,8 @@ watch(
|
||||||
`${props.row.prefix}${props.row.firstName} ${props.row.lastName}`
|
`${props.row.prefix}${props.row.firstName} ${props.row.lastName}`
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'organization'" class="table_ellipsis">
|
<div v-else-if="col.name == 'organization'" class="text-html">
|
||||||
<div
|
{{ findOrgNameHtml(props.row) }}
|
||||||
v-if="
|
|
||||||
props.row.child4 === null &&
|
|
||||||
props.row.child3 === null &&
|
|
||||||
props.row.child2 === null &&
|
|
||||||
props.row.child1 === null &&
|
|
||||||
props.row.root === null
|
|
||||||
"
|
|
||||||
>
|
|
||||||
-
|
|
||||||
</div>
|
|
||||||
{{
|
|
||||||
`${props.row.child4 ? props.row.child4 + " " : ""}${
|
|
||||||
props.row.child3 ? props.row.child3 + " " : ""
|
|
||||||
}${props.row.child2 ? props.row.child2 + " " : ""}${
|
|
||||||
props.row.child1 ? props.row.child1 + " " : ""
|
|
||||||
}${props.row.root ? props.row.root : ""}`
|
|
||||||
}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="col.name == 'isSuspension'">
|
<div v-else-if="col.name == 'isSuspension'">
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,7 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "amount",
|
name: "amount",
|
||||||
align: "left",
|
align: "left",
|
||||||
label:
|
label: employeeClass.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน",
|
||||||
employeeClass.value === "-employee" ? "ค่าตอบแทนรายเดือน" : "เงินเดือน",
|
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "amount",
|
field: "amount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -78,7 +77,8 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posNo",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งเลขที่",
|
label:
|
||||||
|
employeeClass.value === "-employee" ? "ตำแหน่งเลขที่" : "เลขที่ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posNo",
|
field: "posNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -88,7 +88,7 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "positionType",
|
name: "positionType",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ประเภทตำแหน่ง",
|
label: employeeClass.value === "-employee" ? "กลุ่มงาน" : "ตำแหน่งประเภท",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionType",
|
field: "positionType",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -97,7 +97,7 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "positionLevel",
|
name: "positionLevel",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับ",
|
label: employeeClass.value === "-employee" ? "ระดับชั้นงาน" : "ระดับ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionLevel",
|
field: "positionLevel",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue