บรรจุ => ปรับ รายการช่วยราชการ,รายการส่งตัวกลับ
This commit is contained in:
parent
e9e618ad41
commit
7e4c274bc0
6 changed files with 98 additions and 38 deletions
|
|
@ -109,9 +109,8 @@ async function fetchInformation(id: string) {
|
||||||
imformation.age = data.birthDate ? calculateAge(data.birthDate) : "-";
|
imformation.age = data.birthDate ? calculateAge(data.birthDate) : "-";
|
||||||
imformation.gender = data.gender ?? "-";
|
imformation.gender = data.gender ?? "-";
|
||||||
|
|
||||||
avatar.fullname = data.createdFullName
|
avatar.fullname = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||||
? `${data.prefix}${data.lastUpdateFullName}`
|
|
||||||
: "-";
|
|
||||||
avatar.position = data.position ? data.position : "-";
|
avatar.position = data.position ? data.position : "-";
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -133,15 +132,19 @@ async function fetchProfileGov(id: string) {
|
||||||
.get(config.API.profileNewGovernmentById(id))
|
.get(config.API.profileNewGovernmentById(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
goverment.oc = data.org ?? "-";
|
goverment.oc = data.org !== "" ? data.org : "-";
|
||||||
goverment.posNo = data.posMasterNo ?? "-";
|
goverment.posNo = data.posMasterNo !== "" ? data.posMasterNo : "-";
|
||||||
goverment.position = data.position ?? "-";
|
goverment.position = data.position !== "" ? data.position : "-";
|
||||||
goverment.positionPathSide = data.positionArea ?? "-";
|
goverment.positionPathSide =
|
||||||
goverment.positionLine = data.positionField ?? "-";
|
data.positionArea !== "" ? data.positionArea : "-";
|
||||||
goverment.positionType = data.posType ?? "-";
|
goverment.positionLine =
|
||||||
goverment.positionLevel = data.posLevel ?? "-";
|
data.positionField !== "" ? data.positionField : "-";
|
||||||
goverment.positionExecutive = data.posExecutive ?? "-";
|
goverment.positionType = data.posType !== "" ? data.posType : "-";
|
||||||
goverment.positionExecutiveSide = data.positionExecutiveField ?? "-";
|
goverment.positionLevel = data.posLevel !== "" ? data.posLevel : "-";
|
||||||
|
goverment.positionExecutive =
|
||||||
|
data.posExecutive !== "" ? data.posExecutive : "-";
|
||||||
|
goverment.positionExecutiveSide =
|
||||||
|
data.positionExecutiveField !== "" ? data.positionExecutiveField : "-";
|
||||||
})
|
})
|
||||||
|
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
success,
|
success,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
|
findOrgName,
|
||||||
|
findPosMasterNo,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
|
|
@ -73,7 +75,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posNo",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งเลขที่",
|
label: "เลขที่ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posNo",
|
field: "posNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -91,7 +93,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "positionLevel",
|
name: "positionLevel",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับ",
|
label: "ประเภทตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionLevel",
|
field: "positionLevel",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -181,8 +183,13 @@ const getData = async () => {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
fullname: `${item.prefix}${item.firstName} ${item.lastName}`,
|
fullname: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||||
position: item.position,
|
position: item.position,
|
||||||
posNo: item.posNo,
|
posNo: findPosMasterNo(item),
|
||||||
positionLevel: item.positionLevel,
|
positionLevel:
|
||||||
|
item.posTypeName == null && item.posLevelName == null
|
||||||
|
? "-"
|
||||||
|
: (item.posTypeName != null ? item.posTypeName : "") +
|
||||||
|
" " +
|
||||||
|
(item.posLevelName != null ? ` (${item.posLevelName})` : ""),
|
||||||
createdAt: date2Thai(item.createdAt),
|
createdAt: date2Thai(item.createdAt),
|
||||||
organization: item.organization,
|
organization: item.organization,
|
||||||
reason: item.reason,
|
reason: item.reason,
|
||||||
|
|
@ -323,7 +330,7 @@ onMounted(async () => {
|
||||||
:props="props"
|
:props="props"
|
||||||
@click="openDetail(props.row.id)"
|
@click="openDetail(props.row.id)"
|
||||||
>
|
>
|
||||||
{{ props.row.position }}
|
{{ props.row.position ?? "-" }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
key="positionLevel"
|
key="positionLevel"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import config from "@/app.config";
|
||||||
|
|
||||||
import type { QForm } from "quasar";
|
import type { QForm } from "quasar";
|
||||||
import type { ResponseData } from "@/modules/05_placement/interface/response/officer";
|
import type { ResponseData } from "@/modules/05_placement/interface/response/officer";
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
|
|
||||||
const modalPersonal = ref<boolean>(false);
|
const modalPersonal = ref<boolean>(false);
|
||||||
const personalId = ref<string>("");
|
const personalId = ref<string>("");
|
||||||
|
|
@ -67,10 +67,10 @@ const getData = async () => {
|
||||||
prefix.value = data.prefix;
|
prefix.value = data.prefix;
|
||||||
firstName.value = data.firstName;
|
firstName.value = data.firstName;
|
||||||
lastName.value = data.lastName;
|
lastName.value = data.lastName;
|
||||||
avatar.value = data.avatar ?? "";
|
|
||||||
position.value = data.position;
|
position.value = data.position ?? "-";
|
||||||
posNo.value = data.posNo;
|
posNo.value = data.posNo;
|
||||||
positionLevel.value = data.positionLevel;
|
positionLevel.value = `${data.posTypeName}(${data.posLevelName})`;
|
||||||
createdAt.value = data.createdAt;
|
createdAt.value = data.createdAt;
|
||||||
organization.value = data.organization;
|
organization.value = data.organization;
|
||||||
reason.value = data.reason;
|
reason.value = data.reason;
|
||||||
|
|
@ -82,6 +82,7 @@ const getData = async () => {
|
||||||
positionNumberOld.value = data.positionNumberOld;
|
positionNumberOld.value = data.positionNumberOld;
|
||||||
organizationPositionOld.value = data.organizationPositionOld;
|
organizationPositionOld.value = data.organizationPositionOld;
|
||||||
dateRepatriation.value = data.dateRepatriation;
|
dateRepatriation.value = data.dateRepatriation;
|
||||||
|
fetchProfile(data.profileId);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -91,6 +92,27 @@ const getData = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function fetchProfile(id: string) {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(
|
||||||
|
config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `profile-${id}`)
|
||||||
|
)
|
||||||
|
.then(async (res) => {
|
||||||
|
avatar.value = res.data.downloadUrl;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
if (e.response.data.message === "ไม่พบไฟล์ในระบบ") {
|
||||||
|
avatar.value = "";
|
||||||
|
} else {
|
||||||
|
messageError($q, e);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const getClass = (val: boolean) => {
|
const getClass = (val: boolean) => {
|
||||||
return {
|
return {
|
||||||
"full-width inputgreen cursor-pointer": val,
|
"full-width inputgreen cursor-pointer": val,
|
||||||
|
|
@ -200,15 +222,15 @@ onMounted(async () => {
|
||||||
<div class="col-12 q-pl-md">
|
<div class="col-12 q-pl-md">
|
||||||
<div class="col-12 text-top">ตำแหน่งในสายงาน</div>
|
<div class="col-12 text-top">ตำแหน่งในสายงาน</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{ positionTypeOld }}
|
{{ position }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="col-12 text-top">ระดับ</div>
|
<div class="col-12 text-top">ประเภทตำแหน่ง</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{ positionLevelOld }}
|
{{ positionLevel }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -216,7 +238,7 @@ onMounted(async () => {
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="col-12 text-top">สังกัด</div>
|
<div class="col-12 text-top">สังกัด</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{ organizationPositionOld }}
|
{{ organization }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import type { QForm } from "quasar";
|
import type { QForm } from "quasar";
|
||||||
import type { resHelpDetail } from "@/modules/05_placement/interface/response/officer";
|
import type { resHelpDetail } from "@/modules/05_placement/interface/response/officer";
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
|
|
||||||
const modalPersonal = ref<boolean>(false);
|
const modalPersonal = ref<boolean>(false);
|
||||||
const personId = ref<string>("");
|
const personId = ref<string>("");
|
||||||
|
|
@ -60,28 +60,52 @@ const getData = async () => {
|
||||||
(id.value = data.id);
|
(id.value = data.id);
|
||||||
profileId.value = data.profileId;
|
profileId.value = data.profileId;
|
||||||
prefix.value = data.prefix;
|
prefix.value = data.prefix;
|
||||||
avatar.value = data.avatar ?? "";
|
|
||||||
firstName.value = data.firstName;
|
firstName.value = data.firstName;
|
||||||
lastName.value = data.lastName;
|
lastName.value = data.lastName;
|
||||||
position.value = data.position;
|
position.value = data.position ?? "-";
|
||||||
posNo.value = data.posNo;
|
posNo.value = data.posNo;
|
||||||
positionLevel.value = data.positionLevel;
|
positionLevel.value = `${data.posTypeName}(${data.posLevelName})`;
|
||||||
createdAt.value = data.createdAt;
|
createdAt.value = data.createdAt;
|
||||||
organization.value = data.organization;
|
organization.value = data.organization;
|
||||||
reason.value = data.reason;
|
reason.value = data.reason;
|
||||||
status.value = data.status;
|
status.value = data.status;
|
||||||
dateStart.value = data.dateStart;
|
dateStart.value = data.dateStart;
|
||||||
dateEnd.value = data.dateEnd;
|
dateEnd.value = data.dateEnd;
|
||||||
positionTypeOld.value = data.positionTypeOld;
|
positionTypeOld.value = data.position;
|
||||||
positionLevelOld.value = data.positionLevelOld;
|
positionLevelOld.value = `${data.posTypeName}(${data.posLevelName})`;
|
||||||
positionNumberOld.value = data.positionNumberOld;
|
positionNumberOld.value = data.positionNumberOld;
|
||||||
organizationPositionOld.value = data.organizationPositionOld;
|
organizationPositionOld.value = data.organizationPositionOld;
|
||||||
|
fetchProfile(data.profileId);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function fetchProfile(id: string) {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(
|
||||||
|
config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `profile-${id}`)
|
||||||
|
)
|
||||||
|
.then(async (res) => {
|
||||||
|
avatar.value = res.data.downloadUrl;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
if (e.response.data.message === "ไม่พบไฟล์ในระบบ") {
|
||||||
|
avatar.value = "";
|
||||||
|
} else {
|
||||||
|
messageError($q, e);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const getClass = (val: boolean) => {
|
const getClass = (val: boolean) => {
|
||||||
return {
|
return {
|
||||||
"full-width inputgreen cursor-pointer": val,
|
"full-width inputgreen cursor-pointer": val,
|
||||||
|
|
@ -124,7 +148,7 @@ const saveData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.officerMainEdit(dataId), body)
|
.put(config.API.officerMainEdit(dataId), body)
|
||||||
.then((res: any) => {
|
.then(() => {
|
||||||
success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ");
|
success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ");
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
})
|
})
|
||||||
|
|
@ -190,15 +214,15 @@ onMounted(async () => {
|
||||||
<div class="col-12 q-pl-md">
|
<div class="col-12 q-pl-md">
|
||||||
<div class="col-12 text-top">ตำแหน่งในสายงาน</div>
|
<div class="col-12 text-top">ตำแหน่งในสายงาน</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{ positionTypeOld }}
|
{{ position }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="col-12 text-top">ระดับ</div>
|
<div class="col-12 text-top">ประเภทตำแหน่ง</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{ positionLevelOld }}
|
{{ positionLevel }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -206,7 +230,7 @@ onMounted(async () => {
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="col-12 text-top">สังกัด</div>
|
<div class="col-12 text-top">สังกัด</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{ organizationPositionOld }}
|
{{ organization }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posNo",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งเลขที่",
|
label: "เลขที่ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posNo",
|
field: "posNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,8 @@ interface ResponseData {
|
||||||
organizationPositionOld: string;
|
organizationPositionOld: string;
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
dateRepatriation: Date;
|
dateRepatriation: Date;
|
||||||
|
posTypeName: string;
|
||||||
|
posLevelName: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -73,6 +75,8 @@ interface resHelpDetail {
|
||||||
positionNumberOld: string;
|
positionNumberOld: string;
|
||||||
organizationPositionOld: string;
|
organizationPositionOld: string;
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
posTypeName: string;
|
||||||
|
posLevelName: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue