Merge branch 'develop' into devTee
This commit is contained in:
commit
a1c835b70e
12 changed files with 343 additions and 159 deletions
|
|
@ -34,6 +34,8 @@ export default {
|
||||||
changestatusProbations: (personalId: string) =>
|
changestatusProbations: (personalId: string) =>
|
||||||
`${evaluate}/report/change-status?personal_id=${personalId}`,
|
`${evaluate}/report/change-status?personal_id=${personalId}`,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// probationGetAssignList: (personalId: string) =>
|
// probationGetAssignList: (personalId: string) =>
|
||||||
// `${finish}/probation-assign-list?personal_id=${personalId}`,
|
// `${finish}/probation-assign-list?personal_id=${personalId}`,
|
||||||
// clearPosition: (personalId:string) => `${placement}/position/clear/${personalId}`
|
// clearPosition: (personalId:string) => `${placement}/position/clear/${personalId}`
|
||||||
|
|
|
||||||
|
|
@ -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) => {
|
||||||
|
|
@ -168,11 +171,11 @@ watch(
|
||||||
() => props.modal,
|
() => props.modal,
|
||||||
async () => {
|
async () => {
|
||||||
modal.value = props.modal ? props.modal : false;
|
modal.value = props.modal ? props.modal : false;
|
||||||
modal.value &&
|
if (modal.value) {
|
||||||
props.id &&
|
props.id && (fetchInformation(props.id), fetchProfileGov(props.id));
|
||||||
(await fetchInformation(props.id), await fetchProfileGov(props.id)),
|
|
||||||
(fileName.value = `profile-${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) => {
|
.then(async (res) => {
|
||||||
avatar.avatar = res.data.downloadUrl;
|
avatar.avatar = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
statusLoad.value.val = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,6 @@ function validateFormPositionEdit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveSelectEdit() {
|
function saveSelectEdit() {
|
||||||
console.log(formPositionSelect.positionExecutive);
|
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
|
@ -133,8 +132,9 @@ function saveSelectEdit() {
|
||||||
posDictField: formPositionSelect.positionField, //สายงาน
|
posDictField: formPositionSelect.positionField, //สายงาน
|
||||||
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
||||||
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
||||||
posExecutiveId: dataExecutive, //ตำแหน่งทางการบริหาร
|
posExecutiveId: dataExecutive ?? "", //ตำแหน่งทางการบริหาร
|
||||||
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
posDictExecutiveField:
|
||||||
|
formPositionSelect.positionExecutiveField ?? "", //ด้านทางการบริหาร
|
||||||
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
||||||
isSpecial: isSpecial.value,
|
isSpecial: isSpecial.value,
|
||||||
}
|
}
|
||||||
|
|
@ -143,7 +143,7 @@ function saveSelectEdit() {
|
||||||
posDictField: formPositionSelect.positionField, //สายงาน
|
posDictField: formPositionSelect.positionField, //สายงาน
|
||||||
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
||||||
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
||||||
posExecutive: dataExecutive, //ตำแหน่งทางการบริหาร
|
posExecutive: dataExecutive ?? "", //ตำแหน่งทางการบริหาร
|
||||||
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
||||||
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
||||||
isSpecial: isSpecial.value,
|
isSpecial: isSpecial.value,
|
||||||
|
|
@ -169,7 +169,6 @@ function saveSelectEdit() {
|
||||||
}
|
}
|
||||||
/** ฟังชั่น บันทึก */
|
/** ฟังชั่น บันทึก */
|
||||||
function onSubmitSelectEdit() {
|
function onSubmitSelectEdit() {
|
||||||
console.log(formPositionSelect.positionExecutive);
|
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
|
@ -182,6 +181,7 @@ function onSubmitSelectEdit() {
|
||||||
? config.API.orgPosPosition
|
? config.API.orgPosPosition
|
||||||
: config.API.orgPosPositionExecutive();
|
: config.API.orgPosPositionExecutive();
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
||||||
const body =
|
const body =
|
||||||
shape.value == "false"
|
shape.value == "false"
|
||||||
? {
|
? {
|
||||||
|
|
@ -189,7 +189,7 @@ function onSubmitSelectEdit() {
|
||||||
posDictField: formPositionSelect.positionField, //สายงาน
|
posDictField: formPositionSelect.positionField, //สายงาน
|
||||||
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
||||||
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
||||||
posExecutiveId: dataExecutive, //ตำแหน่งทางการบริหาร
|
posExecutiveId: dataExecutive ?? "", //ตำแหน่งทางการบริหาร
|
||||||
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
||||||
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
||||||
isSpecial: isSpecial.value,
|
isSpecial: isSpecial.value,
|
||||||
|
|
@ -199,11 +199,12 @@ function onSubmitSelectEdit() {
|
||||||
posDictField: formPositionSelect.positionField, //สายงาน
|
posDictField: formPositionSelect.positionField, //สายงาน
|
||||||
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
||||||
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
||||||
posExecutive: dataExecutive, //ตำแหน่งทางการบริหาร
|
posExecutive: dataExecutive ?? "", //ตำแหน่งทางการบริหาร
|
||||||
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
||||||
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
||||||
isSpecial: isSpecial.value,
|
isSpecial: isSpecial.value,
|
||||||
};
|
};
|
||||||
|
|
||||||
await http
|
await http
|
||||||
.post(url, body)
|
.post(url, body)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
@ -313,10 +314,9 @@ watch(
|
||||||
if (modal.value === true) {
|
if (modal.value === true) {
|
||||||
await fetchType();
|
await fetchType();
|
||||||
await fetchExecutive();
|
await fetchExecutive();
|
||||||
|
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
const dataList = props.data;
|
const dataList = props.data;
|
||||||
console.log(dataList);
|
|
||||||
updateSelectType(dataList.posTypeId);
|
updateSelectType(dataList.posTypeId);
|
||||||
formPositionSelect.positionId = dataList.id;
|
formPositionSelect.positionId = dataList.id;
|
||||||
formPositionSelect.positionName = dataList.positionName;
|
formPositionSelect.positionName = dataList.positionName;
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,6 @@
|
||||||
:class="getClass(edit)"
|
:class="getClass(edit)"
|
||||||
:outlined="edit"
|
:outlined="edit"
|
||||||
dense
|
dense
|
||||||
|
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:model-value="date2Thai(formDataSalary.date)"
|
:model-value="date2Thai(formDataSalary.date)"
|
||||||
:rules="[
|
:rules="[
|
||||||
|
|
@ -198,6 +197,7 @@
|
||||||
|
|
||||||
<div class="row col-xs-12 col-sm-12 col-md-12">
|
<div class="row col-xs-12 col-sm-12 col-md-12">
|
||||||
<q-select
|
<q-select
|
||||||
|
clearable
|
||||||
ref="templatePosRef"
|
ref="templatePosRef"
|
||||||
:class="getClass(edit)"
|
:class="getClass(edit)"
|
||||||
:outlined="edit"
|
:outlined="edit"
|
||||||
|
|
@ -241,6 +241,7 @@
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-select
|
<q-select
|
||||||
|
clearable
|
||||||
ref="typePositionRef"
|
ref="typePositionRef"
|
||||||
:class="getClass(edit)"
|
:class="getClass(edit)"
|
||||||
:outlined="edit"
|
:outlined="edit"
|
||||||
|
|
@ -266,6 +267,7 @@
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-select
|
<q-select
|
||||||
|
clearable
|
||||||
ref="levelPositionRef"
|
ref="levelPositionRef"
|
||||||
:class="getClass(edit)"
|
:class="getClass(edit)"
|
||||||
:outlined="edit"
|
:outlined="edit"
|
||||||
|
|
@ -321,6 +323,7 @@
|
||||||
|
|
||||||
<div class="row col-xs-12 col-sm-12 col-md-12">
|
<div class="row col-xs-12 col-sm-12 col-md-12">
|
||||||
<q-select
|
<q-select
|
||||||
|
clearable
|
||||||
ref="templateDocRef"
|
ref="templateDocRef"
|
||||||
:class="getClass(edit)"
|
:class="getClass(edit)"
|
||||||
:outlined="edit"
|
:outlined="edit"
|
||||||
|
|
@ -1287,7 +1290,7 @@ function inputPositionLevelBlur() {
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!optionStore.optipnLevel.some(
|
!optionStore.optipnLevel.some(
|
||||||
(v) => v.name === tempPositionLevelInput.value
|
(v:any) => v.name === tempPositionLevelInput.value
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
createValue(tempPositionLevelInput.value);
|
createValue(tempPositionLevelInput.value);
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
success,
|
success,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
|
findOrgName,
|
||||||
|
findPosMasterNo,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||||
|
|
@ -71,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",
|
||||||
|
|
@ -89,7 +91,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",
|
||||||
|
|
@ -196,9 +198,14 @@ const getData = async () => {
|
||||||
rows.value = data.map((item: officerType) => ({
|
rows.value = data.map((item: officerType) => ({
|
||||||
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 != null ? 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,
|
||||||
|
|
@ -209,13 +216,14 @@ const getData = async () => {
|
||||||
positionTypeOld: item.positionTypeOld,
|
positionTypeOld: item.positionTypeOld,
|
||||||
positionLevelOld: item.positionLevelOld,
|
positionLevelOld: item.positionLevelOld,
|
||||||
positionNumberOld: item.positionNumberOld,
|
positionNumberOld: item.positionNumberOld,
|
||||||
organizationPositionOld: item.organizationPositionOld,
|
organizationPositionOld: findOrgName(item),
|
||||||
isActive: item.isActive,
|
isActive: item.isActive,
|
||||||
dateEnd: item.dateEnd == null ? "-" : date2Thai(new Date(item.dateEnd)),
|
dateEnd: item.dateEnd == null ? "" : date2Thai(new Date(item.dateEnd)),
|
||||||
dateStart:
|
dateStart:
|
||||||
item.dateStart == null ? "-" : date2Thai(new Date(item.dateStart)),
|
item.dateStart == null ? "" : date2Thai(new Date(item.dateStart)),
|
||||||
}));
|
}));
|
||||||
})
|
})
|
||||||
|
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
|
@ -243,6 +251,7 @@ onMounted(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">รายการช่วยราชการ</div>
|
<div class="toptitle text-dark col-12 row items-center">รายการช่วยราชการ</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm">
|
<q-card flat bordered class="col-12 q-mt-sm">
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ const ProductivityArray = computed(() => {
|
||||||
return Array(productivityCount.value).fill("");
|
return Array(productivityCount.value).fill("");
|
||||||
});
|
});
|
||||||
const OPmain = ref<
|
const OPmain = ref<
|
||||||
Array<{ id: number; title: string; description: string; level: number }>
|
Array<{ id: number; naem: string; description: string; level: string }>
|
||||||
>([]);
|
>([]);
|
||||||
const OPgroup = ref<
|
const OPgroup = ref<
|
||||||
Array<{ id: number; title: string; description: string; level: number }>
|
Array<{ id: number; title: string; description: string; level: number }>
|
||||||
|
|
@ -163,8 +163,8 @@ interface CheckboxItem {
|
||||||
* @param id personal id
|
* @param id personal id
|
||||||
*/
|
*/
|
||||||
async function dataEdit(id: string) {
|
async function dataEdit(id: string) {
|
||||||
await myForm.value.validate().then((result: boolean) => {
|
// await myForm.value.validate().then((result: boolean) => {
|
||||||
if (result) {
|
// if (result) {
|
||||||
showLoader();
|
showLoader();
|
||||||
const data = putDataEdit(id);
|
const data = putDataEdit(id);
|
||||||
http
|
http
|
||||||
|
|
@ -176,10 +176,10 @@ async function dataEdit(id: string) {
|
||||||
getAssign();
|
getAssign();
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
} else {
|
// } else {
|
||||||
dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
|
// dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -305,6 +305,7 @@ async function getUser() {
|
||||||
.get(config.API.orgProfilePlacement(personalId))
|
.get(config.API.orgProfilePlacement(personalId))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
OPcaretaker.value = data.caregiver.map((item: any) => ({
|
OPcaretaker.value = data.caregiver.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: item.prefix + item.firstName + " " + item.lastName,
|
name: item.prefix + item.firstName + " " + item.lastName,
|
||||||
|
|
@ -369,6 +370,7 @@ async function getUser() {
|
||||||
async function getAssignNew(id: string) {
|
async function getAssignNew(id: string) {
|
||||||
await http.get(config.API.newAssign(id)).then((res: any) => {
|
await http.get(config.API.newAssign(id)).then((res: any) => {
|
||||||
const data = res.data.data;
|
const data = res.data.data;
|
||||||
|
|
||||||
const monthOption = {
|
const monthOption = {
|
||||||
value: data.assign_month,
|
value: data.assign_month,
|
||||||
label: `${data.assign_month} เดือน`,
|
label: `${data.assign_month} เดือน`,
|
||||||
|
|
@ -388,30 +390,66 @@ async function getAssignNew(id: string) {
|
||||||
* get ข้อมูล สมรรถนะหลัก
|
* get ข้อมูล สมรรถนะหลัก
|
||||||
* @param id personal id
|
* @param id personal id
|
||||||
*/
|
*/
|
||||||
|
const assign_competencyMain = ref<any>();
|
||||||
async function getcompetency(id: string) {
|
async function getcompetency(id: string) {
|
||||||
await http.get(config.API.competencyOptions(id)).then((res: any) => {
|
http
|
||||||
const data = res.data.data;
|
.get(config.API.kpiCapacity + `/head`)
|
||||||
OPmain.value = data;
|
.then((res) => {
|
||||||
main.value = data[0];
|
const data = res.data.result;
|
||||||
main2.value = data[1];
|
assign_competencyMain.value = data;
|
||||||
main3.value = data[2];
|
main.value = data[0];
|
||||||
main4.value = data[3];
|
main2.value = data[1];
|
||||||
main5.value = data[4];
|
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 ข้อมูล สมรรถนะประจํากลุ่มงาน
|
* get ข้อมูล สมรรถนะประจํากลุ่มงาน
|
||||||
* @param id personal id
|
* @param id personal id
|
||||||
*/
|
*/
|
||||||
|
const assign_competencyGroupMain = ref<any>();
|
||||||
async function getCompetencyGroup(id: string) {
|
async function getCompetencyGroup(id: string) {
|
||||||
await http.get(config.API.competencyGroupOptions(id)).then((res: any) => {
|
console.log(position.value);
|
||||||
const data = res.data.data;
|
http
|
||||||
OPgroup.value = data;
|
.get(config.API.kpiCapacity + `/group?positionName=${position.value}`)
|
||||||
group.value = data[0];
|
.then((res) => {
|
||||||
group2.value = data[1];
|
const data = res.data.result;
|
||||||
group3.value = data[2];
|
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 });
|
if (skill4.value) allSkills.push({ level: skill4.value.level });
|
||||||
|
|
||||||
const allCompetency = [];
|
const allCompetency = [];
|
||||||
if (main.value) allCompetency.push({ level: main.value.level });
|
if (main.value) allCompetency.push(main.value);
|
||||||
if (main2.value) allCompetency.push({ level: main2.value.level });
|
if (main2.value) allCompetency.push(main2.value);
|
||||||
if (main3.value) allCompetency.push({ level: main3.value.level });
|
if (main3.value) allCompetency.push(main3.value);
|
||||||
if (main4.value) allCompetency.push({ level: main4.value.level });
|
if (main4.value) allCompetency.push(main4.value);
|
||||||
if (main5.value) allCompetency.push({ level: main5.value.level });
|
if (main5.value) allCompetency.push(main5.value);
|
||||||
|
|
||||||
const assign_director = [
|
const assign_director = [
|
||||||
{
|
{
|
||||||
|
|
@ -603,8 +641,8 @@ function putDataEdit(id: string) {
|
||||||
assign_jobs: assign_job.filter((item) => item !== null),
|
assign_jobs: assign_job.filter((item) => item !== null),
|
||||||
other_desc: OtherLaw.value,
|
other_desc: OtherLaw.value,
|
||||||
assign_skill: allSkills,
|
assign_skill: allSkills,
|
||||||
assign_competency: allCompetency,
|
assign_competency: assign_competencyMain.value,
|
||||||
assign_competency_group: allGroup,
|
assign_competency_group: assign_competencyGroupMain.value,
|
||||||
other4_desc: Other.value,
|
other4_desc: Other.value,
|
||||||
other5_no1_desc: Other5.value,
|
other5_no1_desc: Other5.value,
|
||||||
assign_outputs: Productivity_assign.filter((item) => item !== null),
|
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 (skill3.value) allSkills.push({ level: skill3.value.level });
|
||||||
if (skill4.value) allSkills.push({ level: skill4.value.level });
|
if (skill4.value) allSkills.push({ level: skill4.value.level });
|
||||||
|
|
||||||
const allCompetency = [];
|
const allCompetency = assign_competencyMain.value;
|
||||||
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 assign_director = [
|
const assign_director = [
|
||||||
{
|
{
|
||||||
|
|
@ -743,8 +776,8 @@ function putData(id: string) {
|
||||||
assign_jobs: assign_job.filter((item) => item !== null),
|
assign_jobs: assign_job.filter((item) => item !== null),
|
||||||
other_desc: OtherLaw.value,
|
other_desc: OtherLaw.value,
|
||||||
assign_skill: allSkills,
|
assign_skill: allSkills,
|
||||||
assign_competency: allCompetency,
|
assign_competency: assign_competencyMain.value,
|
||||||
assign_competency_group: allGroup,
|
assign_competency_group: assign_competencyGroupMain.value,
|
||||||
other4_desc: Other.value,
|
other4_desc: Other.value,
|
||||||
other5_no1_desc: Other5.value,
|
other5_no1_desc: Other5.value,
|
||||||
assign_outputs: Productivity_assign.filter((item) => item !== null),
|
assign_outputs: Productivity_assign.filter((item) => item !== null),
|
||||||
|
|
@ -768,13 +801,17 @@ function putData(id: string) {
|
||||||
* @param id personal id
|
* @param id personal id
|
||||||
*/
|
*/
|
||||||
async function saveData(id: string) {
|
async function saveData(id: string) {
|
||||||
await myForm.value.validate().then((result: boolean) => {
|
console.log("tests");
|
||||||
if (result) {
|
|
||||||
dialogConfirm($q, async () => await DataSave(id));
|
const data = putData(id);
|
||||||
} else {
|
console.log("data==>", data);
|
||||||
dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
|
// 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 () => {
|
onMounted(async () => {
|
||||||
await getUser();
|
await getUser();
|
||||||
|
await getAssignNew(personalId);
|
||||||
await getLaw(personalId);
|
await getLaw(personalId);
|
||||||
await getcompetency(personalId);
|
|
||||||
await getCompetencyGroup(personalId);
|
|
||||||
await getSkill(personalId);
|
await getSkill(personalId);
|
||||||
await getKnowledge(personalId);
|
await getKnowledge(personalId);
|
||||||
await getAssignNew(personalId);
|
await getcompetency(personalId);
|
||||||
|
await getCompetencyGroup(personalId);
|
||||||
if (assignId.value !== undefined) {
|
if (assignId.value !== undefined) {
|
||||||
await getAssign();
|
await getAssign();
|
||||||
}
|
}
|
||||||
|
|
@ -1019,7 +1056,11 @@ onMounted(async () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-form ref="myForm">
|
<q-form
|
||||||
|
greedy
|
||||||
|
@submit.prevent
|
||||||
|
@validation-success="assignId !== undefined ? saveEdit(assignId) : saveData(personalId)"
|
||||||
|
>
|
||||||
<div class="q-pa-sm">
|
<div class="q-pa-sm">
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -1098,14 +1139,14 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>ยกเลิก</q-tooltip>
|
<q-tooltip>ยกเลิก</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
<!-- @click="saveEdit(assignId)" -->
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
class="q-ml-md"
|
class="q-ml-md"
|
||||||
round
|
round
|
||||||
color="public"
|
color="public"
|
||||||
@click="saveEdit(assignId)"
|
type="submit"
|
||||||
icon="mdi-content-save-outline"
|
icon="mdi-content-save-outline"
|
||||||
>
|
>
|
||||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
|
|
@ -1820,8 +1861,10 @@ onMounted(async () => {
|
||||||
<div class="col-12 row q-col-gutter-sm">
|
<div class="col-12 row q-col-gutter-sm">
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-select
|
<q-select
|
||||||
|
:options-html="true"
|
||||||
:option-label="
|
:option-label="
|
||||||
(item) => `${item.title} - ${item.description}`
|
(item) =>
|
||||||
|
`${item.name} - ระดับ:๑ ${item.description}`
|
||||||
"
|
"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -1838,19 +1881,21 @@ onMounted(async () => {
|
||||||
v-model="main"
|
v-model="main"
|
||||||
label="ตัวที่ 1"
|
label="ตัวที่ 1"
|
||||||
>
|
>
|
||||||
<template v-slot:selected-item="scope">
|
<!-- <template v-slot:selected-item="scope">
|
||||||
<div class="ellipsis-2-lines">
|
<div class="ellipsis-2-lines">
|
||||||
{{ scope.opt.title }} -
|
{{ scope.opt.title }} -
|
||||||
{{ scope.opt.description }}
|
{{ scope.opt.description }}
|
||||||
</div>
|
</div>
|
||||||
</template></q-select
|
</template> -->
|
||||||
>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-select
|
<q-select
|
||||||
|
:options-html="true"
|
||||||
:option-label="
|
:option-label="
|
||||||
(item) => `${item.title} - ${item.description}`
|
(item) =>
|
||||||
|
`${item.name} - ระดับ:๑ ${item.description}`
|
||||||
"
|
"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -1867,19 +1912,21 @@ onMounted(async () => {
|
||||||
v-model="main2"
|
v-model="main2"
|
||||||
label="ตัวที่ 2"
|
label="ตัวที่ 2"
|
||||||
>
|
>
|
||||||
<template v-slot:selected-item="scope">
|
<!-- <template v-slot:selected-item="scope">
|
||||||
<div class="ellipsis-2-lines">
|
<div class="ellipsis-2-lines">
|
||||||
{{ scope.opt.title }} -
|
{{ scope.opt.title }} -
|
||||||
{{ scope.opt.description }}
|
{{ scope.opt.description }}
|
||||||
</div>
|
</div>
|
||||||
</template></q-select
|
</template> -->
|
||||||
>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-select
|
<q-select
|
||||||
|
:options-html="true"
|
||||||
:option-label="
|
:option-label="
|
||||||
(item) => `${item.title} - ${item.description}`
|
(item) =>
|
||||||
|
`${item.name} - ระดับ:๑ ${item.description}`
|
||||||
"
|
"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -1896,19 +1943,21 @@ onMounted(async () => {
|
||||||
v-model="main3"
|
v-model="main3"
|
||||||
label="ตัวที่ 3"
|
label="ตัวที่ 3"
|
||||||
>
|
>
|
||||||
<template v-slot:selected-item="scope">
|
<!-- <template v-slot:selected-item="scope">
|
||||||
<div class="ellipsis-2-lines">
|
<div class="ellipsis-2-lines">
|
||||||
{{ scope.opt.title }} -
|
{{ scope.opt.title }} -
|
||||||
{{ scope.opt.description }}
|
{{ scope.opt.description }}
|
||||||
</div>
|
</div>
|
||||||
</template></q-select
|
</template> -->
|
||||||
>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-select
|
<q-select
|
||||||
|
:options-html="true"
|
||||||
:option-label="
|
:option-label="
|
||||||
(item) => `${item.title} - ${item.description}`
|
(item) =>
|
||||||
|
`${item.name} - ระดับ:๑ ${item.description}`
|
||||||
"
|
"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -1925,13 +1974,13 @@ onMounted(async () => {
|
||||||
v-model="main4"
|
v-model="main4"
|
||||||
label="ตัวที่ 4"
|
label="ตัวที่ 4"
|
||||||
>
|
>
|
||||||
<template v-slot:selected-item="scope">
|
<!-- <template v-slot:selected-item="scope">
|
||||||
<div class="ellipsis-2-lines">
|
<div class="ellipsis-2-lines">
|
||||||
{{ scope.opt.title }} -
|
{{ scope.opt.title }} -
|
||||||
{{ scope.opt.description }}
|
{{ scope.opt.description }}
|
||||||
</div>
|
</div>
|
||||||
</template></q-select
|
</template> -->
|
||||||
>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
|
|
@ -1941,8 +1990,10 @@ onMounted(async () => {
|
||||||
:options="
|
:options="
|
||||||
filterMain(OPmain, [main, main2, main3, main4])
|
filterMain(OPmain, [main, main2, main3, main4])
|
||||||
"
|
"
|
||||||
|
:options-html="true"
|
||||||
:option-label="
|
:option-label="
|
||||||
(item) => `${item.title} - ${item.description}`
|
(item) =>
|
||||||
|
`${item.name} - ระดับ:๑ ${item.description}`
|
||||||
"
|
"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
class="bg-white"
|
class="bg-white"
|
||||||
|
|
@ -1954,13 +2005,13 @@ onMounted(async () => {
|
||||||
v-model="main5"
|
v-model="main5"
|
||||||
label="ตัวที่ 5"
|
label="ตัวที่ 5"
|
||||||
>
|
>
|
||||||
<template v-slot:selected-item="scope">
|
<!-- <template v-slot:selected-item="scope">
|
||||||
<div class="ellipsis-2-lines">
|
<div class="ellipsis-2-lines">
|
||||||
{{ scope.opt.title }} -
|
{{ scope.opt.title }} -
|
||||||
{{ scope.opt.description }}
|
{{ scope.opt.description }}
|
||||||
</div>
|
</div>
|
||||||
</template></q-select
|
</template> -->
|
||||||
>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1970,8 +2021,10 @@ onMounted(async () => {
|
||||||
<div class="col-12 row q-col-gutter-sm">
|
<div class="col-12 row q-col-gutter-sm">
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-select
|
<q-select
|
||||||
|
:options-html="true"
|
||||||
:option-label="
|
:option-label="
|
||||||
(item) => `${item.title} - ${item.description}`
|
(item) =>
|
||||||
|
`${item.name} - ระดับ:๒ ${item.description}`
|
||||||
"
|
"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -1988,19 +2041,21 @@ onMounted(async () => {
|
||||||
v-model="group"
|
v-model="group"
|
||||||
label="ตัวที่ 1"
|
label="ตัวที่ 1"
|
||||||
>
|
>
|
||||||
<template v-slot:selected-item="scope">
|
<!-- <template v-slot:selected-item="scope">
|
||||||
<div class="ellipsis-2-lines">
|
<div class="ellipsis-2-lines">
|
||||||
{{ scope.opt.title }} -
|
{{ scope.opt.title }} -
|
||||||
{{ scope.opt.description }}
|
{{ scope.opt.description }}
|
||||||
</div>
|
</div>
|
||||||
</template></q-select
|
</template> -->
|
||||||
>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-select
|
<q-select
|
||||||
|
:options-html="true"
|
||||||
:option-label="
|
:option-label="
|
||||||
(item) => `${item.title} - ${item.description}`
|
(item) =>
|
||||||
|
`${item.name} - ระดับ:๒ ${item.description}`
|
||||||
"
|
"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -2017,19 +2072,21 @@ onMounted(async () => {
|
||||||
v-model="group2"
|
v-model="group2"
|
||||||
label="ตัวที่ 2"
|
label="ตัวที่ 2"
|
||||||
>
|
>
|
||||||
<template v-slot:selected-item="scope">
|
<!-- <template v-slot:selected-item="scope">
|
||||||
<div class="ellipsis-2-lines">
|
<div class="ellipsis-2-lines">
|
||||||
{{ scope.opt.title }} -
|
{{ scope.opt.title }} -
|
||||||
{{ scope.opt.description }}
|
{{ scope.opt.description }}
|
||||||
</div>
|
</div>
|
||||||
</template></q-select
|
</template> -->
|
||||||
>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-select
|
<q-select
|
||||||
|
:options-html="true"
|
||||||
:option-label="
|
:option-label="
|
||||||
(item) => `${item.title} - ${item.description}`
|
(item) =>
|
||||||
|
`${item.name} - ระดับ:๒ ${item.description}`
|
||||||
"
|
"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
map-options
|
map-options
|
||||||
|
|
@ -2046,13 +2103,13 @@ onMounted(async () => {
|
||||||
v-model="group3"
|
v-model="group3"
|
||||||
label="ตัวที่ 3"
|
label="ตัวที่ 3"
|
||||||
>
|
>
|
||||||
<template v-slot:selected-item="scope">
|
<!-- <template v-slot:selected-item="scope">
|
||||||
<div class="ellipsis-2-lines">
|
<div class="ellipsis-2-lines">
|
||||||
{{ scope.opt.title }} -
|
{{ scope.opt.title }} -
|
||||||
{{ scope.opt.description }}
|
{{ scope.opt.description }}
|
||||||
</div>
|
</div>
|
||||||
</template></q-select
|
</template> -->
|
||||||
>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -2827,13 +2884,11 @@ onMounted(async () => {
|
||||||
v-show="routeName == 'probationWorkAdd'"
|
v-show="routeName == 'probationWorkAdd'"
|
||||||
class="flex justify-end q-pa-sm q-gutter-sm"
|
class="flex justify-end q-pa-sm q-gutter-sm"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn unelevated label="บันทึก" type="submit" color="public"
|
||||||
unelevated
|
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||||
label="บันทึก"
|
>
|
||||||
color="public"
|
|
||||||
@click="saveData(personalId)"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- @click="saveData(personalId)" -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-form>
|
</q-form>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,9 @@ interface officerType {
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
dateEnd: string;
|
dateEnd: string;
|
||||||
dateStart: string;
|
dateStart: string;
|
||||||
dateRepatriation: Date
|
dateRepatriation: Date;
|
||||||
|
posTypeName?: string;
|
||||||
|
posLevelName?: string;
|
||||||
}
|
}
|
||||||
interface ResponseData {
|
interface ResponseData {
|
||||||
data: {
|
data: {
|
||||||
|
|
@ -44,7 +46,9 @@ interface ResponseData {
|
||||||
positionNumberOld: string;
|
positionNumberOld: string;
|
||||||
organizationPositionOld: string;
|
organizationPositionOld: string;
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
dateRepatriation: Date
|
dateRepatriation: Date;
|
||||||
|
posTypeName: string;
|
||||||
|
posLevelName: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -71,11 +75,9 @@ interface resHelpDetail {
|
||||||
positionNumberOld: string;
|
positionNumberOld: string;
|
||||||
organizationPositionOld: string;
|
organizationPositionOld: string;
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
posTypeName: string;
|
||||||
|
posLevelName: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
export type {
|
export type { officerType, ResponseData, resHelpDetail };
|
||||||
officerType,
|
|
||||||
ResponseData,
|
|
||||||
resHelpDetail
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,7 @@ function formBmaofficer(val: string) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "OFFICER":
|
case "OFFICER":
|
||||||
return "ขรก.กทม. สามัญ";
|
return "ขรก.กทม. สามัญ";
|
||||||
case "EMPLOYEE_PERM":
|
case "EMPLOYEE":
|
||||||
return "ลูกจ้างประจำ";
|
return "ลูกจ้างประจำ";
|
||||||
case "EMPLOYEE_TEMP":
|
case "EMPLOYEE_TEMP":
|
||||||
return "ลูกจ้างชั่วคราว";
|
return "ลูกจ้างชั่วคราว";
|
||||||
|
|
|
||||||
|
|
@ -922,6 +922,62 @@ export const useCounterMixin = defineStore("mixin", () => {
|
||||||
return daydiff;
|
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 {
|
return {
|
||||||
calAge,
|
calAge,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
|
|
@ -959,5 +1015,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
||||||
convertDate,
|
convertDate,
|
||||||
convertDateDisplay,
|
convertDateDisplay,
|
||||||
diffDay,
|
diffDay,
|
||||||
|
findOrgName,
|
||||||
|
findPosMasterNo,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue