diff --git a/src/api/05_placement/api.probation.ts b/src/api/05_placement/api.probation.ts
index e81bc8db0..a4f54e3ea 100644
--- a/src/api/05_placement/api.probation.ts
+++ b/src/api/05_placement/api.probation.ts
@@ -34,6 +34,8 @@ export default {
changestatusProbations: (personalId: string) =>
`${evaluate}/report/change-status?personal_id=${personalId}`,
+
+
// probationGetAssignList: (personalId: string) =>
// `${finish}/probation-assign-list?personal_id=${personalId}`,
// clearPosition: (personalId:string) => `${placement}/position/clear/${personalId}`
diff --git a/src/components/Dialogs/PopupPersonalNew.vue b/src/components/Dialogs/PopupPersonalNew.vue
index 3dedffa82..d9664e4cb 100644
--- a/src/components/Dialogs/PopupPersonalNew.vue
+++ b/src/components/Dialogs/PopupPersonalNew.vue
@@ -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) => {
@@ -168,11 +171,11 @@ watch(
() => props.modal,
async () => {
modal.value = props.modal ? props.modal : false;
- modal.value &&
- props.id &&
- (await fetchInformation(props.id), await fetchProfileGov(props.id)),
+ if (modal.value) {
+ props.id && (fetchInformation(props.id), fetchProfileGov(props.id));
(fileName.value = `profile-${props.id}`),
- await fetchProfile(props.id as string);
+ fetchProfile(props.id as string);
+ }
}
);
@@ -189,9 +192,8 @@ async function fetchProfile(id: string) {
.then(async (res) => {
avatar.avatar = res.data.downloadUrl;
})
- .catch(() => {})
.finally(() => {
- hideLoader();
+ statusLoad.value.val = true;
});
}
diff --git a/src/modules/02_organizationalNew/components/DialogAddPosition.vue b/src/modules/02_organizationalNew/components/DialogAddPosition.vue
index 4860a9e3e..3ac2c622d 100644
--- a/src/modules/02_organizationalNew/components/DialogAddPosition.vue
+++ b/src/modules/02_organizationalNew/components/DialogAddPosition.vue
@@ -112,7 +112,6 @@ function validateFormPositionEdit() {
}
function saveSelectEdit() {
- console.log(formPositionSelect.positionExecutive);
dialogConfirm(
$q,
async () => {
@@ -133,8 +132,9 @@ function saveSelectEdit() {
posDictField: formPositionSelect.positionField, //สายงาน
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
- posExecutiveId: dataExecutive, //ตำแหน่งทางการบริหาร
- posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
+ posExecutiveId: dataExecutive ?? "", //ตำแหน่งทางการบริหาร
+ posDictExecutiveField:
+ formPositionSelect.positionExecutiveField ?? "", //ด้านทางการบริหาร
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
isSpecial: isSpecial.value,
}
@@ -143,7 +143,7 @@ function saveSelectEdit() {
posDictField: formPositionSelect.positionField, //สายงาน
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
- posExecutive: dataExecutive, //ตำแหน่งทางการบริหาร
+ posExecutive: dataExecutive ?? "", //ตำแหน่งทางการบริหาร
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
isSpecial: isSpecial.value,
@@ -169,7 +169,6 @@ function saveSelectEdit() {
}
/** ฟังชั่น บันทึก */
function onSubmitSelectEdit() {
- console.log(formPositionSelect.positionExecutive);
dialogConfirm(
$q,
async () => {
@@ -182,6 +181,7 @@ function onSubmitSelectEdit() {
? config.API.orgPosPosition
: config.API.orgPosPositionExecutive();
showLoader();
+
const body =
shape.value == "false"
? {
@@ -189,7 +189,7 @@ function onSubmitSelectEdit() {
posDictField: formPositionSelect.positionField, //สายงาน
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
- posExecutiveId: dataExecutive, //ตำแหน่งทางการบริหาร
+ posExecutiveId: dataExecutive ?? "", //ตำแหน่งทางการบริหาร
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
isSpecial: isSpecial.value,
@@ -199,11 +199,12 @@ function onSubmitSelectEdit() {
posDictField: formPositionSelect.positionField, //สายงาน
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
- posExecutive: dataExecutive, //ตำแหน่งทางการบริหาร
+ posExecutive: dataExecutive ?? "", //ตำแหน่งทางการบริหาร
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
isSpecial: isSpecial.value,
};
+
await http
.post(url, body)
.then(() => {
@@ -313,10 +314,9 @@ watch(
if (modal.value === true) {
await fetchType();
await fetchExecutive();
-
if (props.data) {
const dataList = props.data;
- console.log(dataList);
+
updateSelectType(dataList.posTypeId);
formPositionSelect.positionId = dataList.id;
formPositionSelect.positionName = dataList.positionName;
diff --git a/src/modules/04_registry/components/Salary.vue b/src/modules/04_registry/components/Salary.vue
index 079629228..4538d1a1c 100644
--- a/src/modules/04_registry/components/Salary.vue
+++ b/src/modules/04_registry/components/Salary.vue
@@ -150,7 +150,6 @@
:class="getClass(edit)"
:outlined="edit"
dense
-
:borderless="!edit"
:model-value="date2Thai(formDataSalary.date)"
:rules="[
@@ -198,6 +197,7 @@
v.name === tempPositionLevelInput.value
+ (v:any) => v.name === tempPositionLevelInput.value
)
) {
createValue(tempPositionLevelInput.value);
diff --git a/src/modules/05_placement/components/Repatriate/RepatriateMain.vue b/src/modules/05_placement/components/Repatriate/RepatriateMain.vue
index 0faa5a41d..b08374d15 100644
--- a/src/modules/05_placement/components/Repatriate/RepatriateMain.vue
+++ b/src/modules/05_placement/components/Repatriate/RepatriateMain.vue
@@ -30,6 +30,8 @@ const {
hideLoader,
success,
dialogRemove,
+ findOrgName,
+ findPosMasterNo,
} = mixin;
const visibleColumns = ref([
@@ -73,7 +75,7 @@ const columns = ref([
{
name: "posNo",
align: "left",
- label: "ตำแหน่งเลขที่",
+ label: "เลขที่ตำแหน่ง",
sortable: true,
field: "posNo",
headerStyle: "font-size: 14px",
@@ -91,7 +93,7 @@ const columns = ref([
{
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 ?? "-" }}
(false);
const personalId = ref("");
@@ -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 () => {
ตำแหน่งในสายงาน
- {{ positionTypeOld }}
+ {{ position }}
-
ระดับ
+
ประเภทตำแหน่ง
- {{ positionLevelOld }}
+ {{ positionLevel }}
@@ -216,7 +238,7 @@ onMounted(async () => {
สังกัด
- {{ organizationPositionOld }}
+ {{ organization }}
diff --git a/src/modules/05_placement/components/helpgovernment/governmentDetail.vue b/src/modules/05_placement/components/helpgovernment/governmentDetail.vue
index f22988124..aa3e2b197 100644
--- a/src/modules/05_placement/components/helpgovernment/governmentDetail.vue
+++ b/src/modules/05_placement/components/helpgovernment/governmentDetail.vue
@@ -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(false);
const personId = ref("");
@@ -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 () => {
ตำแหน่งในสายงาน
- {{ positionTypeOld }}
+ {{ position }}
-
ระดับ
+
ประเภทตำแหน่ง
- {{ positionLevelOld }}
+ {{ positionLevel }}
@@ -206,7 +230,7 @@ onMounted(async () => {
สังกัด
- {{ organizationPositionOld }}
+ {{ organization }}
diff --git a/src/modules/05_placement/components/helpgovernment/mainHelp.vue b/src/modules/05_placement/components/helpgovernment/mainHelp.vue
index 6bda234e8..b5a6c995d 100644
--- a/src/modules/05_placement/components/helpgovernment/mainHelp.vue
+++ b/src/modules/05_placement/components/helpgovernment/mainHelp.vue
@@ -31,6 +31,8 @@ const {
hideLoader,
success,
dialogRemove,
+ findOrgName,
+ findPosMasterNo,
} = mixin;
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
@@ -71,7 +73,7 @@ const columns = ref([
{
name: "posNo",
align: "left",
- label: "ตำแหน่งเลขที่",
+ label: "เลขที่ตำแหน่ง",
sortable: true,
field: "posNo",
headerStyle: "font-size: 14px",
@@ -89,7 +91,7 @@ const columns = ref([
{
name: "positionLevel",
align: "left",
- label: "ระดับ",
+ label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
@@ -196,9 +198,14 @@ const getData = async () => {
rows.value = data.map((item: officerType) => ({
id: item.id,
fullname: `${item.prefix}${item.firstName} ${item.lastName}`,
- position: item.position,
- posNo: item.posNo,
- positionLevel: item.positionLevel,
+ position: item.position != null ? item.position : "-",
+ 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,
@@ -209,13 +216,14 @@ const getData = async () => {
positionTypeOld: item.positionTypeOld,
positionLevelOld: item.positionLevelOld,
positionNumberOld: item.positionNumberOld,
- organizationPositionOld: item.organizationPositionOld,
+ organizationPositionOld: findOrgName(item),
isActive: item.isActive,
- dateEnd: item.dateEnd == null ? "-" : date2Thai(new Date(item.dateEnd)),
+ dateEnd: item.dateEnd == null ? "" : date2Thai(new Date(item.dateEnd)),
dateStart:
- item.dateStart == null ? "-" : date2Thai(new Date(item.dateStart)),
+ item.dateStart == null ? "" : date2Thai(new Date(item.dateStart)),
}));
})
+
.catch((e) => {})
.finally(() => {
hideLoader();
@@ -243,6 +251,7 @@ onMounted(async () => {
await getData();
});
+
รายการช่วยราชการ
diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue
index b06bd3e4f..484e7cee3 100644
--- a/src/modules/05_placement/components/probation/FormAssign.vue
+++ b/src/modules/05_placement/components/probation/FormAssign.vue
@@ -87,7 +87,7 @@ const ProductivityArray = computed(() => {
return Array(productivityCount.value).fill("");
});
const OPmain = ref<
- Array<{ id: number; title: string; description: string; level: number }>
+ Array<{ id: number; naem: string; description: string; level: string }>
>([]);
const OPgroup = ref<
Array<{ id: number; title: string; description: string; level: number }>
@@ -163,8 +163,8 @@ interface CheckboxItem {
* @param id personal id
*/
async function dataEdit(id: string) {
- await myForm.value.validate().then((result: boolean) => {
- if (result) {
+ // await myForm.value.validate().then((result: boolean) => {
+ // if (result) {
showLoader();
const data = putDataEdit(id);
http
@@ -176,10 +176,10 @@ async function dataEdit(id: string) {
getAssign();
hideLoader();
});
- } else {
- dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
- }
- });
+ // } else {
+ // dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
+ // }
+ // });
}
/**
@@ -305,6 +305,7 @@ async function getUser() {
.get(config.API.orgProfilePlacement(personalId))
.then((res: any) => {
const data = res.data.result;
+
OPcaretaker.value = data.caregiver.map((item: any) => ({
id: item.id,
name: item.prefix + item.firstName + " " + item.lastName,
@@ -369,6 +370,7 @@ async function getUser() {
async function getAssignNew(id: string) {
await http.get(config.API.newAssign(id)).then((res: any) => {
const data = res.data.data;
+
const monthOption = {
value: data.assign_month,
label: `${data.assign_month} เดือน`,
@@ -388,30 +390,66 @@ async function getAssignNew(id: string) {
* get ข้อมูล สมรรถนะหลัก
* @param id personal id
*/
+const assign_competencyMain = ref();
async function getcompetency(id: string) {
- await http.get(config.API.competencyOptions(id)).then((res: any) => {
- const data = res.data.data;
- OPmain.value = data;
- main.value = data[0];
- main2.value = data[1];
- main3.value = data[2];
- main4.value = data[3];
- main5.value = data[4];
- });
+ http
+ .get(config.API.kpiCapacity + `/head`)
+ .then((res) => {
+ const data = res.data.result;
+ assign_competencyMain.value = data;
+ main.value = data[0];
+ main2.value = data[1];
+ main3.value = data[2];
+ main4.value = data[3];
+ main5.value = data[4];
+ console.log(main.value);
+ })
+ .catch((err) => {
+ messageError($q, err);
+ });
+ // await http.get(config.API.competencyOptions(id)).then((res: any) => {
+ // const data = res.data.data;
+
+ // console.log(data);
+
+ // OPmain.value = data;
+ // main.value = data[0];
+ // main2.value = data[1];
+ // main3.value = data[2];
+ // main4.value = data[3];
+ // main5.value = data[4];
+ // });
}
/**
* get ข้อมูล สมรรถนะประจํากลุ่มงาน
* @param id personal id
*/
+const assign_competencyGroupMain = ref();
async function getCompetencyGroup(id: string) {
- await http.get(config.API.competencyGroupOptions(id)).then((res: any) => {
- const data = res.data.data;
- OPgroup.value = data;
- group.value = data[0];
- group2.value = data[1];
- group3.value = data[2];
- });
+ console.log(position.value);
+ http
+ .get(config.API.kpiCapacity + `/group?positionName=${position.value}`)
+ .then((res) => {
+ const data = res.data.result;
+ assign_competencyGroupMain.value = data;
+
+ OPgroup.value = data;
+ group.value = data[0];
+ group2.value = data[1];
+ group3.value = data[2];
+ })
+ .catch((err) => {
+ messageError($q, err);
+ });
+
+ // await http.get(config.API.competencyGroupOptions(id)).then((res: any) => {
+ // const data = res.data.data;
+ // OPgroup.value = data;
+ // group.value = data[0];
+ // group2.value = data[1];
+ // group3.value = data[2];
+ // });
}
/**
@@ -518,11 +556,11 @@ function putDataEdit(id: string) {
if (skill4.value) allSkills.push({ level: skill4.value.level });
const allCompetency = [];
- if (main.value) allCompetency.push({ level: main.value.level });
- if (main2.value) allCompetency.push({ level: main2.value.level });
- if (main3.value) allCompetency.push({ level: main3.value.level });
- if (main4.value) allCompetency.push({ level: main4.value.level });
- if (main5.value) allCompetency.push({ level: main5.value.level });
+ if (main.value) allCompetency.push(main.value);
+ if (main2.value) allCompetency.push(main2.value);
+ if (main3.value) allCompetency.push(main3.value);
+ if (main4.value) allCompetency.push(main4.value);
+ if (main5.value) allCompetency.push(main5.value);
const assign_director = [
{
@@ -603,8 +641,8 @@ function putDataEdit(id: string) {
assign_jobs: assign_job.filter((item) => item !== null),
other_desc: OtherLaw.value,
assign_skill: allSkills,
- assign_competency: allCompetency,
- assign_competency_group: allGroup,
+ assign_competency: assign_competencyMain.value,
+ assign_competency_group: assign_competencyGroupMain.value,
other4_desc: Other.value,
other5_no1_desc: Other5.value,
assign_outputs: Productivity_assign.filter((item) => item !== null),
@@ -668,12 +706,7 @@ function putData(id: string) {
if (skill3.value) allSkills.push({ level: skill3.value.level });
if (skill4.value) allSkills.push({ level: skill4.value.level });
- const allCompetency = [];
- if (main.value) allCompetency.push({ level: main.value.level });
- if (main2.value) allCompetency.push({ level: main2.value.level });
- if (main3.value) allCompetency.push({ level: main3.value.level });
- if (main4.value) allCompetency.push({ level: main4.value.level });
- if (main5.value) allCompetency.push({ level: main5.value.level });
+ const allCompetency = assign_competencyMain.value;
const assign_director = [
{
@@ -743,8 +776,8 @@ function putData(id: string) {
assign_jobs: assign_job.filter((item) => item !== null),
other_desc: OtherLaw.value,
assign_skill: allSkills,
- assign_competency: allCompetency,
- assign_competency_group: allGroup,
+ assign_competency: assign_competencyMain.value,
+ assign_competency_group: assign_competencyGroupMain.value,
other4_desc: Other.value,
other5_no1_desc: Other5.value,
assign_outputs: Productivity_assign.filter((item) => item !== null),
@@ -768,13 +801,17 @@ function putData(id: string) {
* @param id personal id
*/
async function saveData(id: string) {
- await myForm.value.validate().then((result: boolean) => {
- if (result) {
- dialogConfirm($q, async () => await DataSave(id));
- } else {
- dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
- }
- });
+ console.log("tests");
+
+ const data = putData(id);
+ console.log("data==>", data);
+ // await myForm.value.validate().then((result: boolean) => {
+ // if (result) {
+ dialogConfirm($q, async () => await DataSave(id));
+ // } else {
+ // dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
+ // }
+ // });
}
/**
@@ -1006,12 +1043,12 @@ function filterFnChairman(val: string, update: any) {
/** เมื่อโหลดหน้า เรียกใช้งานฟังชั่น */
onMounted(async () => {
await getUser();
+ await getAssignNew(personalId);
await getLaw(personalId);
- await getcompetency(personalId);
- await getCompetencyGroup(personalId);
await getSkill(personalId);
await getKnowledge(personalId);
- await getAssignNew(personalId);
+ await getcompetency(personalId);
+ await getCompetencyGroup(personalId);
if (assignId.value !== undefined) {
await getAssign();
}
@@ -1019,7 +1056,11 @@ onMounted(async () => {
-
+
{
>
ยกเลิก
-
+
บันทึกข้อมูล
@@ -1820,8 +1861,10 @@ onMounted(async () => {
{
v-model="main"
label="ตัวที่ 1"
>
-
+
+
{
v-model="main2"
label="ตัวที่ 2"
>
-
+
+
{
v-model="main3"
label="ตัวที่ 3"
>
-
+
+
{
v-model="main4"
label="ตัวที่ 4"
>
-
+
+
@@ -1941,8 +1990,10 @@ onMounted(async () => {
:options="
filterMain(OPmain, [main, main2, main3, main4])
"
+ :options-html="true"
:option-label="
- (item) => `${item.title} - ${item.description}`
+ (item) =>
+ `${item.name} - ระดับ:๑ ${item.description}`
"
option-value="id"
class="bg-white"
@@ -1954,13 +2005,13 @@ onMounted(async () => {
v-model="main5"
label="ตัวที่ 5"
>
-
+
+
@@ -1970,8 +2021,10 @@ onMounted(async () => {
{
v-model="group"
label="ตัวที่ 1"
>
-
+
+
{
v-model="group2"
label="ตัวที่ 2"
>
-
+
+
{
v-model="group3"
label="ตัวที่ 3"
>
-
+
+
@@ -2827,13 +2884,11 @@ onMounted(async () => {
v-show="routeName == 'probationWorkAdd'"
class="flex justify-end q-pa-sm q-gutter-sm"
>
-
+ บันทึกข้อมูล
+
diff --git a/src/modules/05_placement/interface/response/officer.ts b/src/modules/05_placement/interface/response/officer.ts
index db0860ffc..ee18c7ac1 100644
--- a/src/modules/05_placement/interface/response/officer.ts
+++ b/src/modules/05_placement/interface/response/officer.ts
@@ -19,7 +19,9 @@ interface officerType {
isActive: boolean;
dateEnd: string;
dateStart: string;
- dateRepatriation: Date
+ dateRepatriation: Date;
+ posTypeName?: string;
+ posLevelName?: string;
}
interface ResponseData {
data: {
@@ -44,7 +46,9 @@ interface ResponseData {
positionNumberOld: string;
organizationPositionOld: string;
isActive: boolean;
- dateRepatriation: Date
+ dateRepatriation: Date;
+ posTypeName: string;
+ posLevelName: string;
};
};
}
@@ -71,11 +75,9 @@ interface resHelpDetail {
positionNumberOld: string;
organizationPositionOld: string;
isActive: boolean;
+ posTypeName: string;
+ posLevelName: string;
};
};
}
-export type {
- officerType,
- ResponseData,
- resHelpDetail
-};
+export type { officerType, ResponseData, resHelpDetail };
diff --git a/src/modules/15_development/components/Record.vue b/src/modules/15_development/components/Record.vue
index c48cc80f6..23bbf3fe1 100644
--- a/src/modules/15_development/components/Record.vue
+++ b/src/modules/15_development/components/Record.vue
@@ -224,7 +224,7 @@ function formBmaofficer(val: string) {
switch (val) {
case "OFFICER":
return "ขรก.กทม. สามัญ";
- case "EMPLOYEE_PERM":
+ case "EMPLOYEE":
return "ลูกจ้างประจำ";
case "EMPLOYEE_TEMP":
return "ลูกจ้างชั่วคราว";
diff --git a/src/stores/mixin.ts b/src/stores/mixin.ts
index 16df8875c..d86913f2a 100644
--- a/src/stores/mixin.ts
+++ b/src/stores/mixin.ts
@@ -922,6 +922,62 @@ export const useCounterMixin = defineStore("mixin", () => {
return daydiff;
}
+ function findOrgName(obj: any) {
+ if (obj) {
+ let name =
+ obj.child4 != null && obj.child3 != null
+ ? obj.child4 + "/"
+ : obj.child4 != null
+ ? obj.child4
+ : "";
+
+ name +=
+ obj.child3 != null && obj.child2 != null
+ ? obj.child3 + "/"
+ : obj.child3 !== null
+ ? obj.child3
+ : "";
+
+ name +=
+ obj.child2 != null && obj.child1 != null
+ ? obj.child2 + "/"
+ : obj.child2 != null
+ ? obj.child2
+ : "";
+
+ name +=
+ obj.child1 != null && obj.root != null
+ ? obj.child1 + "/"
+ : obj.child1 != null
+ ? obj.child1
+ : "";
+ name += obj.root != null ? obj.root : "";
+ return name == "" ? "-" : name;
+ } else {
+ return "";
+ }
+ }
+
+ function findPosMasterNo(obj: any) {
+ if (obj) {
+ let shortName =
+ (obj.child4ShortName != null
+ ? obj.child4ShortName
+ : obj.child3ShortName != null
+ ? obj.child3ShortName
+ : obj.child2ShortName != null
+ ? obj.child2ShortName
+ : obj.child1ShortName != null
+ ? obj.child1ShortName
+ : obj.rootShortName != null
+ ? obj.rootShortName
+ : "") + (obj.posMasterNo != null ? obj.posMasterNo : "");
+ return shortName == "" ? "-" : shortName;
+ } else {
+ return "";
+ }
+ }
+
return {
calAge,
date2Thai,
@@ -959,5 +1015,7 @@ export const useCounterMixin = defineStore("mixin", () => {
convertDate,
convertDateDisplay,
diffDay,
+ findOrgName,
+ findPosMasterNo,
};
});