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