Merge branch 'develop' into devTee

This commit is contained in:
STW_TTTY\stwtt 2024-06-07 18:02:00 +07:00
commit cbf94f1daa
13 changed files with 106 additions and 94 deletions

View file

@ -51,41 +51,41 @@ const menuList = readonly<any[]>([
path: "dashboard",
role: "dashboard",
},
{
key: 2,
icon: "o_person",
activeIcon: "person",
label: "ข้อมูลหลัก",
path: "metadataNew",
role: "metadata",
children: [
{
key: 2.0,
label: "ข้อมูลเกี่ยวกับบุคคล",
path: "masterPersonal",
},
{
key: 2.0,
label: "ข้อมูลตำแหน่งข้าราชการ ฯ",
path: "masterPosition",
},
{
key: 2.0,
label: "ข้อมูลตำแหน่งลูกจ้างประจำ",
path: "masterPositionEmployee",
},
{
key: 2.0,
label: "ข้อมูลปฏิทินวันหยุด",
path: "masterCalendarWork",
},
{
key: 2.0,
label: "ข้อมูลเครื่องราชอิสริยาภรณ์",
path: "masterInsignia",
},
],
},
// {
// key: 2,
// icon: "o_person",
// activeIcon: "person",
// label: "ข้อมูลหลัก",
// path: "metadataNew",
// role: "metadata",
// children: [
// {
// key: 2.0,
// label: "ข้อมูลเกี่ยวกับบุคคล",
// path: "masterPersonal",
// },
// {
// key: 2.0,
// label: "ข้อมูลตำแหน่งข้าราชการ ฯ",
// path: "masterPosition",
// },
// {
// key: 2.0,
// label: "ข้อมูลตำแหน่งลูกจ้างประจำ",
// path: "masterPositionEmployee",
// },
// {
// key: 2.0,
// label: "ข้อมูลปฏิทินวันหยุด",
// path: "masterCalendarWork",
// },
// {
// key: 2.0,
// label: "ข้อมูลเครื่องราชอิสริยาภรณ์",
// path: "masterInsignia",
// },
// ],
// },
{
key: 2,
icon: "o_person",

View file

@ -146,7 +146,8 @@ function onSubmit() {
["org" + type + "RankSub"]:
level.value !== 0 ? formData.orgLevelSub : undefined,
[nameId]: rootId,
responsibility: formData.responsibility,
responsibility:
formData.responsibility != null ? formData.responsibility : "",
};
if (actionType.value === "ADD") {

View file

@ -99,9 +99,6 @@
</div>
</template>
<script setup lang="ts">
import { useProfileDataStore } from "@/modules/04_registry/store";
const profileStore = useProfileDataStore();
const props = defineProps({
header: {
type: String,

View file

@ -15,8 +15,8 @@ import type { QForm } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
import HeaderTop from "@/modules/04_registry/components/Information/top.vue";
import ProfileTable from "@/modules/04_registry/components/Table.vue";
import HeaderTop from "@/modules/03_recruiting/components/top1.vue";
import ProfileTable from "@/modules/03_recruiting/components/Table1.vue";
import { useQuasar } from "quasar";
@ -130,7 +130,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "lastUpdatedAt",
align: "left",
label: "วนที่แก้ไขล่าสุด",
label: "วนที่แก้ไขล่าสุด",
sortable: true,
field: "lastUpdatedAt",
headerStyle: "font-size: 14px",

View file

@ -224,7 +224,7 @@ watchEffect(() => {
:columns="columns2"
:rows="rows2"
:filter="filterKeyword2"
row-key="personalId"
row-key="profileId"
flat
:visible-columns="visibleColumns2"
selection="multiple"

View file

@ -241,7 +241,7 @@ watchEffect(() => {
:columns="columns2"
:rows="rows2"
:filter="filterKeyword2"
row-key="personalId"
row-key="profileId"
flat
:visible-columns="visibleColumns2"
selection="multiple"

View file

@ -146,7 +146,7 @@ const addOther = async () => {
let pId: string[] = [];
let Type = props.type as string;
selected.value.forEach((e: any) => {
pId.push(e.personalId);
pId.push(e.profileId);
});
let data = {
id: pId,

View file

@ -224,7 +224,7 @@ watchEffect(() => {
:columns="columns2"
:rows="rows2"
:filter="filterKeyword2"
row-key="personalId"
row-key="id"
flat
:visible-columns="visibleColumns2"
selection="multiple"

View file

@ -173,11 +173,14 @@ const columns2 = ref<QTableProps["columns"]>([
{
name: "posLevelName",
align: "left",
label: "ระดับ",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "posLevelName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.posTypeName + " (" + row.posLevelName + ")";
},
},
{
name: "organizationOrganization",
@ -299,21 +302,21 @@ async function filterKeyword2Fn(page: number) {
}
/** fecth profile */
async function fecthlistPersonal() {
showLoader();
await http
.get(config.API.profileOrganizRoot)
.then((res) => {
const id = res.data.result[0].id;
if (id !== "") {
findlist(id);
}
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {});
}
// async function fecthlistPersonal() {
// showLoader();
// await http
// .get(config.API.profileOrganizRoot)
// .then((res) => {
// const id = res.data.result[0].id;
// if (id !== "") {
// findlist(id);
// }
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {});
// }
/**
* งขอมลเพ res
@ -341,34 +344,34 @@ async function fecthlistProbation(id: string, data: any) {
* นหาขอมลตามไอด
* @param id string
*/
async function findlist(id: string) {
let data: CriteriaType[] = [
{ criteriaType: "is_retire", criteriaValue: "false" },
{ criteriaType: "is_probation", criteriaValue: "true" },
];
let data2: CriteriaType[] = [
{ criteriaType: "is_retire", criteriaValue: "false" },
{ criteriaType: "is_probation", criteriaValue: "false" },
];
let response1 = await fecthlistProbation(id, data);
let response2 = await fecthlistProbation(id, data2);
// async function findlist(id: string) {
// let data: CriteriaType[] = [
// { criteriaType: "is_retire", criteriaValue: "false" },
// { criteriaType: "is_probation", criteriaValue: "true" },
// ];
// let data2: CriteriaType[] = [
// { criteriaType: "is_retire", criteriaValue: "false" },
// { criteriaType: "is_probation", criteriaValue: "false" },
// ];
// let response1 = await fecthlistProbation(id, data);
// let response2 = await fecthlistProbation(id, data2);
response1.forEach((e: any) =>
probationlist.value.push({ ...e, probation: true })
);
response2.forEach((e: any) =>
probationlist.value.push({ ...e, probation: false })
);
rows2.value = probationlist.value.map((e: mapData) => ({
id: e.id,
fullname: e.fullname,
position: e.position,
level: e.positionEmployeeLevel,
organizationOrganization: e.oc,
status: e.probation,
}));
modal.value = true;
}
// response1.forEach((e: any) =>
// probationlist.value.push({ ...e, probation: true })
// );
// response2.forEach((e: any) =>
// probationlist.value.push({ ...e, probation: false })
// );
// rows2.value = probationlist.value.map((e: mapData) => ({
// id: e.id,
// fullname: e.fullname,
// position: e.position,
// level: e.positionEmployeeLevel,
// organizationOrganization: e.oc,
// status: e.probation,
// }));
// modal.value = true;
// }
/**
* เพมขอม ทดลองปฏหนาทราชการ

View file

@ -184,7 +184,7 @@ async function searchInput() {
.then((res) => {
const data = res.data.result;
const list = data.map((e: ResponsePreson) => ({
personId: e.personId,
personId: e.id,
idcard: e.idcard,
prefix: e.prefix,
firstName: e.firstName,
@ -249,6 +249,7 @@ watch(props.data, async () => {
formData.qualification = props.data.qualification;
});
</script>
<template>
<form @submit.prevent.stop="onValidate">
<q-card bordered>

View file

@ -33,7 +33,8 @@ interface typeOp {
}
interface ResponsePreson {
personId: string; //id อ้างอิง profile
id?: string; //id อ้างอิง profile
personId?: string; //id อ้างอิง profile
idcard: string; //เลขประจำตัวประชาชน
prefix: string; //คำนำหน้า
firstName: string; //ชื่อ

View file

@ -12,7 +12,7 @@ import type {
} from "@/modules/11_discipline/interface/request/director";
import http from "@/plugins/http";
import config from "@/app.config";
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
const modalPersonal = ref<boolean>(false);
const personId = ref<string>("");
@ -207,7 +207,7 @@ async function searchInput() {
.then((res) => {
const data = res.data.result;
const list = data.map((e: ResponsePreson) => ({
personId: e.personId,
personId: e.id,
idcard: e.idcard,
prefix: e.prefix,
firstName: e.firstName,

View file

@ -300,12 +300,12 @@ function deletePos(id: string) {
.delete(config.API.orgEmployeePosById(id))
.then(() => {
success($q, "ลบข้อมูลสำเร็จ");
searchInput();
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
searchInput();
hideLoader();
});
});
@ -351,6 +351,15 @@ watch(
}
}
);
watch(
() => modalAdd.value,
() => {
if (!modalAdd.value) {
dataCopy.value = [];
}
}
);
</script>
<template>