แก้ space ขึ้นบรรทัดใหม่ เเก้คำ พ้นราชการ

This commit is contained in:
setthawutttty 2025-03-19 17:41:35 +07:00
parent 90ed596dec
commit b8f971e251
23 changed files with 377 additions and 170 deletions

View file

@ -31,11 +31,13 @@ const {
date2Thai,
dateToISO,
findOrgName,
findOrgNameHtml,
onSearchDataTable,
} = mixin;
const myForm = ref<QForm | null>(null);
/** ตัวแปร */
const modal = ref<boolean>(false);
const retireld_params = route.params.retirementId;
const retireld = ref<string>(retireld_params.toString());
const modalPersonal = ref<boolean>(false);
@ -54,7 +56,7 @@ const fileUpload = ref<any>(null);
const round = ref<number>();
const typeReport = ref<string>("");
const statusReport = ref<boolean>();
const dataProfile = ref<Object>([]);
const dataProfile = ref<any>([]);
/** คอลัมน์ที่แสดง */
const columns = computed(() => [
@ -75,6 +77,9 @@ const columns = computed(() => [
field: "name",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val: any, row: any) {
return `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`;
},
},
{
name: "position",
@ -92,8 +97,8 @@ const columns = computed(() => [
label: `ตำแหน่ง (${
employeeType.value == "OFFICER" ? "ประเภท" : "กลุ่มงาน"
})`,
title: "ตำแหน่ง",
subtitle: employeeType.value == "OFFICER" ? "ประเภท" : "กลุ่มงาน",
title: employeeType.value == "OFFICER" ? "ตำแหน่ง" : "กลุ่มงาน",
subtitle: employeeType.value == "OFFICER" ? "ประเภท" : "",
field: "positionType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -103,8 +108,8 @@ const columns = computed(() => [
name: "positionNumber",
align: "left",
label: "ตำแหน่ง (เลขที่)",
title: "ตำแหน่ง",
subtitle: "เลขที่",
title: employeeType.value == "OFFICER" ? "เลขที่" : "ตำแหน่ง",
subtitle: employeeType.value == "OFFICER" ? "ตำแหน่ง" : "เลขที่",
field: "positionNumber",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -168,7 +173,6 @@ async function fetchlistprofile(id: string) {
prefix: e.prefix,
firstName: e.firstName,
lastName: e.lastName,
name: `${e.prefix}${e.firstName} ${e.lastName}`,
organization: e.root,
position: e.position,
positionNumber: e.posNo,
@ -452,18 +456,15 @@ onMounted(async () => {
<q-card class="col-12 q-pa-md">
<div class="row col-12 q-pb-sm">
<div class="row">
<AddList
:dataProfile="dataProfile"
:retireld="retireld"
:profile-id="profileId"
:UpdateListId="UpdateListId"
v-if="
!checkRoutePermisson &&
!statusReport &&
(typeReport == 'ADD' || typeReport == '' || typeReport == null) &&
!statusUpload
"
/>
<q-btn
flat
round
color="primary"
icon="mdi-plus"
@click="modal = true"
>
<q-tooltip>เพมรายช</q-tooltip></q-btn
>
<q-btn color="primary" flat round icon="mdi-dots-vertical">
<q-menu>
<q-list style="min-width: 100px">
@ -670,7 +671,10 @@ onMounted(async () => {
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div class="table_ellipsis">
<div v-if="col.name == 'organization'" class="text-html">
{{ props.row ? findOrgNameHtml(props.row) : "-" }}
</div>
<div v-else class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
@ -845,11 +849,27 @@ onMounted(async () => {
:textReport="textReport"
/>
<AddList
v-model:modal="modal"
v-model:dataProfile="dataProfile"
:retireld="retireld"
:employeeType="employeeType == 'OFFICER' ? true : false"
:profile-id="profileId"
:UpdateListId="UpdateListId"
v-if="
!checkRoutePermisson &&
!statusReport &&
(typeReport == 'ADD' || typeReport == '' || typeReport == null) &&
!statusUpload
"
/>
<PopupPersonal
:modal="modalPersonal"
:id="personId"
@update:modal="updatemodalPersonal"
v-model:is-employee="employeeType"
:type="employeeType === 'OFFICER' ? 'officer' : 'employee'"
/>
</template>