Merge branch 'develop' into dev
This commit is contained in:
commit
09a16070b8
9 changed files with 233 additions and 173 deletions
|
|
@ -36,15 +36,6 @@ const rejectName = computed(() =>
|
||||||
const selected = ref<any[]>([]);
|
const selected = ref<any[]>([]);
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
|
||||||
name: "posNo",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขที่ตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "posNo",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "fullName",
|
name: "fullName",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -58,11 +49,20 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "posExecutiveName",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งทางการบริหาร",
|
label: "เลขที่ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posExecutiveName",
|
field: "posNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionSign",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งใต้ลายเซ็น",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionSign",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -103,14 +103,14 @@ const visibleColumns = ref<string[]>([
|
||||||
"positionType",
|
"positionType",
|
||||||
"actFullName",
|
"actFullName",
|
||||||
]);
|
]);
|
||||||
const visibleColumnsMember = ref<string[]>([
|
const visibleColumnsMemberBase = ref<string[]>([
|
||||||
"no",
|
// "no",
|
||||||
"posNo",
|
"posNo",
|
||||||
"name",
|
"name",
|
||||||
"position",
|
"position",
|
||||||
"posLevel",
|
"posLevel",
|
||||||
"posType",
|
"posType",
|
||||||
"actFullName",
|
"positionSign",
|
||||||
]);
|
]);
|
||||||
/** หัวตาราง */
|
/** หัวตาราง */
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
|
@ -173,24 +173,33 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
}`;
|
}`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: "actFullName",
|
// name: "actFullName",
|
||||||
align: "left",
|
// align: "left",
|
||||||
label: "รักษาการแทน",
|
// label: "รักษาการแทน",
|
||||||
sortable: true,
|
// sortable: true,
|
||||||
field: "actFullName",
|
// field: "actFullName",
|
||||||
headerStyle: "font-size: 14px",
|
// headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
// style: "font-size: 14px",
|
||||||
},
|
// },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const baseColumnsMember = ref<QTableProps["columns"]>([
|
const baseColumnsMember = ref<QTableProps["columns"]>([
|
||||||
|
// {
|
||||||
|
// name: "no",
|
||||||
|
// align: "left",
|
||||||
|
// label: "ลำดับ",
|
||||||
|
// sortable: false,
|
||||||
|
// field: "no",
|
||||||
|
// headerStyle: "font-size: 14px",
|
||||||
|
// style: "font-size: 14px",
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ลำดับ",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: false,
|
sortable: true,
|
||||||
field: "no",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -203,16 +212,6 @@ const baseColumnsMember = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "name",
|
|
||||||
align: "left",
|
|
||||||
label: "ชื่อ-นามสกุล",
|
|
||||||
sortable: true,
|
|
||||||
field: "name",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "position",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -236,6 +235,15 @@ const baseColumnsMember = ref<QTableProps["columns"]>([
|
||||||
}`;
|
}`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "positionSign",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งใต้ลายเซ็น",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionSign",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const columnsMember = computed(() => {
|
const columnsMember = computed(() => {
|
||||||
|
|
@ -243,13 +251,20 @@ const columnsMember = computed(() => {
|
||||||
const actColumns = JSON.parse(JSON.stringify(baseColumnsMember.value));
|
const actColumns = JSON.parse(JSON.stringify(baseColumnsMember.value));
|
||||||
const posNoCol = actColumns.find((col: any) => col.name === "posNo");
|
const posNoCol = actColumns.find((col: any) => col.name === "posNo");
|
||||||
if (posNoCol) {
|
if (posNoCol) {
|
||||||
posNoCol.label = "เลขที่ตำแหน่ง (รักษาการแทน)";
|
posNoCol.label = "เลขที่ตำแหน่งรักษาการแทน";
|
||||||
}
|
}
|
||||||
return actColumns;
|
return actColumns;
|
||||||
}
|
}
|
||||||
return baseColumnsMember.value;
|
return baseColumnsMember.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const visibleColumnsMember = computed(() => {
|
||||||
|
if (isAct.value || isDirector.value) {
|
||||||
|
return ["name", "posNo", "positionSign"];
|
||||||
|
}
|
||||||
|
return ["name", "posNo", "position", "posLevel", "posType"];
|
||||||
|
});
|
||||||
|
|
||||||
/** เพิ่ม คณะกรรมการ */
|
/** เพิ่ม คณะกรรมการ */
|
||||||
function onAdd() {
|
function onAdd() {
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
|
|
|
||||||
|
|
@ -31,15 +31,15 @@ const pageSize = ref<number>(10);
|
||||||
const maxPaeg = ref<number>(1);
|
const maxPaeg = ref<number>(1);
|
||||||
const total = ref<number>(0);
|
const total = ref<number>(0);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
// {
|
||||||
name: "citizenId",
|
// name: "citizenId",
|
||||||
align: "left",
|
// align: "left",
|
||||||
label: "เลขประจำตัวประชาชน",
|
// label: "เลขประจำตัวประชาชน",
|
||||||
sortable: true,
|
// sortable: true,
|
||||||
field: "citizenId",
|
// field: "citizenId",
|
||||||
headerStyle: "font-size: 14px",
|
// headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
// style: "font-size: 14px",
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: "posNo",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -86,6 +86,39 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const columnsAct = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "fullName",
|
||||||
|
align: "left",
|
||||||
|
label: "ชื่อ-นามสกุล",
|
||||||
|
sortable: true,
|
||||||
|
field: "fullName",
|
||||||
|
format(val, row) {
|
||||||
|
return `${row.prefix}${row.firstName} ${row.lastName}`;
|
||||||
|
},
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "posNo",
|
||||||
|
align: "left",
|
||||||
|
label: "เลขที่ตำแหน่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "posNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionSign",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งใต้ลายเซ็น",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionSign",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
function onCloseDialog() {
|
function onCloseDialog() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
isAct.value = false;
|
isAct.value = false;
|
||||||
|
|
@ -197,7 +230,7 @@ watch(modal, (val) => {
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<d-table
|
<d-table
|
||||||
flat
|
flat
|
||||||
:columns="columns"
|
:columns="isAct ? columnsAct : columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
row-key="key"
|
row-key="key"
|
||||||
dense
|
dense
|
||||||
|
|
@ -246,7 +279,7 @@ watch(modal, (val) => {
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
{{ col.value ?? "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -48,15 +48,6 @@ const pagination = ref({
|
||||||
|
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
|
||||||
name: "posNo",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขที่ตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "posNo",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "fullName",
|
name: "fullName",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -70,11 +61,20 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "posExecutiveName",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งทางการบริหาร",
|
label: "เลขที่ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posExecutiveName",
|
field: "posNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionSign",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งใต้ลายเซ็น",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionSign",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -127,60 +127,61 @@ async function getData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
if (selected.value.length !== 0) {
|
// if (selected.value.length !== 0) {
|
||||||
dialogConfirm($q, async () => {
|
dialogConfirm($q, async () => {
|
||||||
if (props.keycloakUserId) {
|
if (props.keycloakUserId) {
|
||||||
const body = selected.value.map((items: any, index: any) => ({
|
const body = selected.value.map((items: any, index: any) => ({
|
||||||
seq: index,
|
seq: index,
|
||||||
prefix: items.prefix,
|
prefix: items.prefix,
|
||||||
firstName: items.firstName,
|
firstName: items.firstName,
|
||||||
lastName: items.lastName,
|
lastName: items.lastName,
|
||||||
positionName: items.position,
|
positionName: items.position,
|
||||||
profileId: items.id,
|
profileId: items.id,
|
||||||
keycloakId: items.keycloakId,
|
keycloakId: items.keycloakId,
|
||||||
...(items.posExecutiveName
|
PositionExecutiveName: items.positionSign,
|
||||||
? { PositionExecutiveName: items.posExecutiveName }
|
// ...(items.positionSign
|
||||||
: {}),
|
// ? { PositionExecutiveName: items.positionSign }
|
||||||
}));
|
// : {}),
|
||||||
showLoader();
|
}));
|
||||||
const profileSuffix =
|
showLoader();
|
||||||
(props.profileType?.toLocaleLowerCase() as string) === "officer"
|
const profileSuffix =
|
||||||
? ""
|
(props.profileType?.toLocaleLowerCase() as string) === "officer"
|
||||||
: "-employee";
|
? ""
|
||||||
|
: "-employee";
|
||||||
|
|
||||||
const apiEndpoint =
|
const apiEndpoint =
|
||||||
routeName.value === "resignReject" ||
|
routeName.value === "resignReject" ||
|
||||||
routeName.value === "resignRejectEMP"
|
routeName.value === "resignRejectEMP"
|
||||||
? config.API.addResignCancel(
|
? config.API.addResignCancel(
|
||||||
profileSuffix,
|
profileSuffix,
|
||||||
props.type?.toLocaleLowerCase() as string,
|
props.type?.toLocaleLowerCase() as string,
|
||||||
pageId.value
|
pageId.value
|
||||||
)
|
)
|
||||||
: config.API.addResign(
|
: config.API.addResign(
|
||||||
profileSuffix,
|
profileSuffix,
|
||||||
props.type?.toLocaleLowerCase() as string,
|
props.type?.toLocaleLowerCase() as string,
|
||||||
pageId.value
|
pageId.value
|
||||||
);
|
);
|
||||||
await http
|
await http
|
||||||
.post(apiEndpoint, body)
|
.post(apiEndpoint, body)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await props.getData?.(pageId.value);
|
await props.getData?.(pageId.value);
|
||||||
closeDialog();
|
closeDialog();
|
||||||
success($q, "บันทึกสำเร็จ");
|
success($q, "บันทึกสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
closeDialog();
|
closeDialog();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
// } else {
|
||||||
dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 คน");
|
// dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 คน");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
|
|
|
||||||
|
|
@ -48,15 +48,6 @@ const pagination = ref({
|
||||||
|
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
|
||||||
name: "posNo",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขที่ตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "posNo",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "fullName",
|
name: "fullName",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -69,6 +60,15 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "posNo",
|
||||||
|
align: "left",
|
||||||
|
label: "เลขที่ตำแหน่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "posNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "positionSign",
|
name: "positionSign",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -136,7 +136,7 @@ function onSubmit() {
|
||||||
firstName: items.firstName ?? "",
|
firstName: items.firstName ?? "",
|
||||||
lastName: items.lastName ?? "",
|
lastName: items.lastName ?? "",
|
||||||
positionName: items.position ?? "",
|
positionName: items.position ?? "",
|
||||||
positionSign: items.positionSign ?? items.posExecutiveName ?? "",
|
positionSign: items.positionSign,
|
||||||
profileId: items.id,
|
profileId: items.id,
|
||||||
keycloakId: items.keycloakId,
|
keycloakId: items.keycloakId,
|
||||||
positionLeaveName:
|
positionLeaveName:
|
||||||
|
|
@ -243,6 +243,7 @@ watch(
|
||||||
v-model="isAct"
|
v-model="isAct"
|
||||||
label="แสดงเฉพาะรักษาการแทน"
|
label="แสดงเฉพาะรักษาการแทน"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
@update:model-value="onSearchData"
|
||||||
>
|
>
|
||||||
<q-tooltip>แสดงเฉพาะรักษาการแทน </q-tooltip>
|
<q-tooltip>แสดงเฉพาะรักษาการแทน </q-tooltip>
|
||||||
</q-checkbox>
|
</q-checkbox>
|
||||||
|
|
|
||||||
|
|
@ -31,19 +31,10 @@ const rows = ref<DataOperators[]>([]);
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"posNo",
|
"posNo",
|
||||||
"fullName",
|
"fullName",
|
||||||
"posExecutiveName",
|
"positionSign",
|
||||||
"actFullName",
|
// "actFullName",
|
||||||
]);
|
]);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
|
||||||
name: "posNo",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขที่ตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "posNo",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "fullName",
|
name: "fullName",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -57,11 +48,20 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "posExecutiveName",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งทางการบริหาร",
|
label: "เลขที่ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posExecutiveName",
|
field: "posNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionSign",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งใต้ลายเซ็น",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionSign",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -95,7 +95,7 @@ function onSubmit() {
|
||||||
posType: data.posType ?? "",
|
posType: data.posType ?? "",
|
||||||
posLevel: data.posLevel ?? "",
|
posLevel: data.posLevel ?? "",
|
||||||
position: data.position ?? "",
|
position: data.position ?? "",
|
||||||
positionExecutive: data.posExecutiveName ?? "",
|
positionExecutive: data.positionSign ?? "",
|
||||||
roleName: roleName.value.trim(),
|
roleName: roleName.value.trim(),
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -274,7 +274,9 @@ watch(modal, (newVal) => {
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
<span class="text-weight-medium">{{ getColumnLabel(col, isAct) }}</span>
|
<span class="text-weight-medium">{{
|
||||||
|
getColumnLabel(col, isAct)
|
||||||
|
}}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -293,7 +295,7 @@ watch(modal, (newVal) => {
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
{{ col.value ?? "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -59,25 +59,15 @@ const search = ref<string>("");
|
||||||
const rows = ref<DataDirector[]>([]); //รายชื่อผู้บังคับบัญชา/ผู้มีอำนาจออกคำสั่ง
|
const rows = ref<DataDirector[]>([]); //รายชื่อผู้บังคับบัญชา/ผู้มีอำนาจออกคำสั่ง
|
||||||
const selected = ref<DataDirector[]>([]); //เลือกผู้บังคับบัญชา/ผู้มีอำนาจออกคำสั่ง
|
const selected = ref<DataDirector[]>([]); //เลือกผู้บังคับบัญชา/ผู้มีอำนาจออกคำสั่ง
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
// {
|
||||||
name: "citizenId",
|
// name: "citizenId",
|
||||||
align: "left",
|
// align: "left",
|
||||||
label: "เลขประจำตัวประชาชน",
|
// label: "เลขประจำตัวประชาชน",
|
||||||
sortable: true,
|
// sortable: true,
|
||||||
field: "citizenId",
|
// field: "citizenId",
|
||||||
headerStyle: "font-size: 14px",
|
// headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
// style: "font-size: 14px",
|
||||||
},
|
// },
|
||||||
{
|
|
||||||
name: "posNo",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขที่ตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "posNo",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "firstName",
|
name: "firstName",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -90,25 +80,42 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่ง",
|
label: "เลขที่ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "position",
|
field: "posNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// name: "position",
|
||||||
|
// align: "left",
|
||||||
|
// label: "ตำแหน่ง",
|
||||||
|
// sortable: true,
|
||||||
|
// field: "position",
|
||||||
|
// headerStyle: "font-size: 14px",
|
||||||
|
// style: "font-size: 14px",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: "posType",
|
||||||
|
// align: "left",
|
||||||
|
// label: "ประเภทตำแหน่ง",
|
||||||
|
// sortable: true,
|
||||||
|
// field: "posType",
|
||||||
|
// format(val, row) {
|
||||||
|
// return `${row.posType} ${row.posLevel ? `(${row.posLevel})` : ""} `;
|
||||||
|
// },
|
||||||
|
// headerStyle: "font-size: 14px",
|
||||||
|
// style: "font-size: 14px",
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
name: "posType",
|
name: "positionSign",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ประเภทตำแหน่ง",
|
label: "ตำแหน่งใต้ลายเซ็น",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posType",
|
field: "positionSign",
|
||||||
format(val, row) {
|
|
||||||
return `${row.posType} ${row.posLevel ? `(${row.posLevel})` : ""} `;
|
|
||||||
},
|
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -790,7 +797,7 @@ onMounted(async () => {
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
{{ col.value ?? "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,7 @@ interface DataOperators {
|
||||||
profileId: string;
|
profileId: string;
|
||||||
roleName: string;
|
roleName: string;
|
||||||
posExecutiveName?: string;
|
posExecutiveName?: string;
|
||||||
|
positionSign?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ export function calculateAge(birthDate: Date | null) {
|
||||||
*/
|
*/
|
||||||
export function getColumnLabel(col: any, isAct: boolean) {
|
export function getColumnLabel(col: any, isAct: boolean) {
|
||||||
if (col.name === "posNo" && isAct) {
|
if (col.name === "posNo" && isAct) {
|
||||||
return `${col.label} (รักษาการแทน)`;
|
return `${col.label}รักษาการแทน`;
|
||||||
}
|
}
|
||||||
return col.label;
|
return col.label;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue