diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 62f8615d1..306bdee6b 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -1,5 +1,5 @@ -import env from "../index" -const placement = `${env.API_URI}/Placement/placement` +import env from "../index"; +const placement = `${env.API_PLACEMENT_URI}/Placement/placement`; const orgTree = `${env.API_URI_ORG_TREE}`; export default { @@ -15,4 +15,33 @@ export default { placementPass: () => `${placement}/pass`, placementDefermentInfo: (id: string) => `${placement}/pass/deferment/${id}`, placementDisclaimInfo: (id: string) => `${placement}/pass/disclaim/${id}`, -}; \ No newline at end of file + + //personal + placementPersonalId: (personalId: string) => + `${placement}/personal/${personalId}`, + + //personal + placementPropertyId: (personalId: string) => + `${placement}/property/${personalId}`, + + //information + placementInformationId: (personalId: string) => + `${placement}/information/${personalId}`, + + //address + placementAddressId: (personalId: string) => + `${placement}/address/${personalId}`, + + //family + placementFamilyId: (personalId: string) => + `${placement}/family/${personalId}`, + + //certificate + placementCertId: (personalId: string) => + `${placement}/certificate/${personalId}`, + placementCertDetailId: (personalId: string, certificateId: string) => + `${placement}/certificate/${personalId}/${certificateId}`, + + //education + placementEducationId: (id: string) => `${placement}/education/${id}`, +}; diff --git a/src/api/index.ts b/src/api/index.ts index 376b4378c..99db277a8 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -20,6 +20,7 @@ const config = ref({ API_CANDIDATE_URI: "https://bma-ehr.frappet.synology.me/api/v1", // API_REPORT_URI: "https://localhost:7187/api/v1", API_REPORT_URI: "https://bma-ehr.frappet.synology.me/api/v1", + API_PLACEMENT_URI: "https://localhost:7260/api", API_URI_ORG_TREE: "https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230712_172702.json", MEET_URI: "meet.frappet.com", @@ -59,6 +60,9 @@ const MEET_URI = ref(config.value[env.value].MEET_URI); const API_URI_PROFILE_SERVICE = ref( config.value[env.value].API_URI_PROFILE_SERVICE ); +const API_PLACEMENT_URI = ref( + config.value[env.value].API_PLACEMENT_URI +); const API_URI_ORG_TREE = ref(config.value[env.value].API_URI_ORG_TREE); export default { @@ -70,6 +74,7 @@ export default { API_URI_ORG_SERVICE: API_URI_ORG_SERVICE.value, API_URI_ORG_EMPLOYEE_SERVICE: API_URI_ORG_EMPLOYEE_SERVICE.value, API_URI_PROFILE_SERVICE: API_URI_PROFILE_SERVICE.value, + API_PLACEMENT_URI: API_PLACEMENT_URI.value, API_URI_ORG_TREE: API_URI_ORG_TREE.value, MEET_URI: MEET_URI.value, }; diff --git a/src/modules/04_registry/components/Information/layout.vue b/src/modules/04_registry/components/Information/layout.vue index 971238b44..be8382309 100644 --- a/src/modules/04_registry/components/Information/layout.vue +++ b/src/modules/04_registry/components/Information/layout.vue @@ -1,6 +1,11 @@ diff --git a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue b/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue index f461ed10a..372f15139 100644 --- a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue +++ b/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue @@ -616,7 +616,7 @@ const fiscalYearFilter = async () => { }; const OrderType = ref(""); -const OrderTypeOption = reactive([{ id: "", name: "ทั้งหมด" }]); +const OrderTypeOption = reactive([{ id: 0, name: "ทั้งหมด" }]); const addedOrderTypeValues: string[] = []; const OrderTypeFilter = async () => { // API @@ -640,7 +640,8 @@ const OrderTypeFilter = async () => { // } if (!addedOrderTypeValues.includes(OrderTypeValue)) { OrderTypeOption.push({ - id: OrderTypeValue, + // id: OrderTypeValue ?? 0, + id: OrderTypeOption.length, name: OrderTypeValue, }); addedOrderTypeValues.push(OrderTypeValue); @@ -658,7 +659,7 @@ const OrderStatus = ref(""); const OrderStatusText = ref( DataStore.DataMainOrigOrder ); -const OrderStatusOption = reactive([{ id: "", name: "ทั้งหมด" }]); +const OrderStatusOption = reactive([{ id: 1, name: "ทั้งหมด" }]); const addedOrderStatusValues: string[] = []; const OrderStatusFilter = async () => { // API @@ -686,7 +687,8 @@ const OrderStatusFilter = async () => { if (!addedOrderStatusValues.includes(OrderStatusValue)) { OrderStatusOption.push({ - id: OrderStatusValue, + // id: OrderStatusValue, + id: OrderStatusOption.length, name: OrderStatusValue, }); addedOrderStatusValues.push(OrderStatusValue); diff --git a/src/modules/05_placement/components/OrderPlacement/step/step01.vue b/src/modules/05_placement/components/OrderPlacement/step/step01.vue index be299f242..a671ac437 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step01.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step01.vue @@ -449,14 +449,14 @@ const filterSelector = (val: any, update: Function, filtername: string) => { case "typeOrderOption": update(() => { typeOrderOption.value = typeOrderOptionFilter.value.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: DataOption) => v.name!.indexOf(val) > -1 ); }); break; case "byOrderOption": update(() => { byOrderOption.value = byOrderOptionFilter.value.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: DataOption) => v.name!.indexOf(val) > -1 ); }); break; @@ -464,7 +464,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => { case "registerOption": update(() => { registerOption.value = registerOptionFilter.value.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: DataOption) => v.name!.indexOf(val) > -1 ); }); break; @@ -472,7 +472,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => { case "announceOption": update(() => { announceOption.value = announceOptionFilter.value.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: DataOption) => v.name!.indexOf(val) > -1 ); }); break; @@ -480,14 +480,14 @@ const filterSelector = (val: any, update: Function, filtername: string) => { case "positionOption": update(() => { positionOption.value = positionOptionFilter.value.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: DataOption) => v.name!.indexOf(val) > -1 ); }); break; case "testOption": update(() => { testOption.value = testOptionFilter.value.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: DataOption) => v.name!.indexOf(val) > -1 ); }); break; diff --git a/src/modules/05_placement/components/OrderPlacement/step/step04.vue b/src/modules/05_placement/components/OrderPlacement/step/step04.vue index 7d9d21328..62502cd72 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step04.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step04.vue @@ -22,11 +22,15 @@ - + ไฟล์ .PDF - + ไฟล์ .docx @@ -47,82 +51,84 @@ - + ไฟล์ .PDF - + ไฟล์ .xls + + - + -
+ - - - + + - - หน้าที่ {{ page }} จาก {{ numOfPages }} - + + หน้าที่ {{ page }} จาก {{ numOfPages }} + - - - -
-
- - -
-
- - - + + +
+
+ + +
+
+ + + - - หน้าที่ {{ page }} จาก {{ numOfPages }} - + + หน้าที่ {{ page }} จาก {{ numOfPages }} + - - - -
+ + + +
- - - @@ -302,9 +323,97 @@
+ ต่อไป + --> + + + + + +
+ +
+ +
+ + + + + + หน้าที่ {{ page }} จาก {{ numOfPages }} + + + + + +
+
+ + +
+
+ + + + + + หน้าที่ {{ page }} จาก {{ numOfPages }} + + + + + +
+
+
+
\ No newline at end of file + diff --git a/src/modules/05_placement/components/PersonalDetail/Education.vue b/src/modules/05_placement/components/PersonalDetail/Education.vue index 37c25205a..e9d3014c8 100644 --- a/src/modules/05_placement/components/PersonalDetail/Education.vue +++ b/src/modules/05_placement/components/PersonalDetail/Education.vue @@ -13,18 +13,31 @@ import type { DataProps, } from "@/modules/05_placement/interface/request/Education"; import type { ResponseObject } from "@/modules/05_placement/interface/response/Education"; -import type { DataOption } from "@/modules/05_placement/interface/index/Main"; import HistoryTable from "@/components/TableHistory.vue"; import http from "@/plugins/http"; import config from "@/app.config"; -import type { EduOps } from "@/modules/05_placement/interface/index/Main"; +import type { + EduOps, + Education, + DataOption, + optionData, +} from "@/modules/05_placement/interface/index/Main"; import type { QTableProps } from "quasar"; +import type { PropType } from "vue"; const props = defineProps({ statusEdit: { type: Boolean, required: true, }, + fetch: { + type: Function, + default: () => console.log("not function"), + }, + data: { + type: Array as PropType, + default: [], + }, }); const $q = useQuasar(); @@ -74,9 +87,9 @@ const tittleHistory = ref("ประวัติแก้ไขประ const filterHistory = ref(""); //search data table history const modalHistory = ref(false); //modal ประวัติการแก้ไขข้อมูล const checkValidate = ref(false); //validate data ผ่านหรือไม่ -const profileId = ref(''); +const profileId = ref(""); // const profileId = ref(route.params.id.toString()); -const rows = ref([]); +const rows = ref(props.data); const filter = ref(""); //search data table const visibleColumns = ref([]); profileData.education.columns.length == 0 @@ -459,8 +472,8 @@ watch(visibleColumns, async (count: String[], prevCount: String[]) => { }); onMounted(async () => { - // await fetchLevel(); - // await fetchPositionPath(); + await fetchLevel(); + await fetchPositionPath(); // await fetchData(); }); @@ -470,8 +483,8 @@ const fetchLevel = async () => { .get(config.API.educationLevel) .then((res) => { const data = res.data.result; - let option: DataOption[] = []; - data.map((r: DataOption) => { + let option: optionData[] = []; + data.map((r: optionData) => { option.push({ id: r.id.toString(), name: r.name.toString() }); }); Ops.value.levelOptions = option; @@ -491,8 +504,8 @@ const fetchPositionPath = async () => { .get(config.API.positionPath) .then((res) => { const data = res.data.result; - let option: DataOption[] = []; - data.map((r: DataOption) => { + let option: optionData[] = []; + data.map((r: optionData) => { option.push({ id: r.id.toString(), name: r.name.toString() }); }); Ops.value.positionPathOptions = option; @@ -511,7 +524,7 @@ const filterSelector = (val: any, update: Function, refData: string) => { case "levelOptions": update(() => { Ops.value.levelOptions = OpsFilter.value.levelOptions.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: optionData) => v.name.indexOf(val) > -1 ); }); break; @@ -519,7 +532,7 @@ const filterSelector = (val: any, update: Function, refData: string) => { update(() => { Ops.value.positionPathOptions = OpsFilter.value.positionPathOptions.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: optionData) => v.name.indexOf(val) > -1 ); }); break; @@ -536,27 +549,27 @@ const fetchData = async () => { let data = res.data.result; rows.value = []; data.map((e: ResponseObject) => { - rows.value.push({ - id: e.id, - level: e.educationLevel, - levelId: e.educationLevelId, - positionPath: e.positionPath, - positionPathId: e.positionPathId, - institute: e.institute, - degree: e.degree, - field: e.field, - gpa: e.gpa, - country: e.country, - duration: e.duration, - durationYear: e.durationYear, - other: e.other, - fundName: e.fundName, - finishDate: new Date(e.finishDate), - startDate: new Date(e.startDate).getFullYear(), - endDate: new Date(e.endDate).getFullYear(), - createdFullName: e.createdFullName, - createdAt: new Date(e.createdAt), - }); + // rows.value.push({ + // id: e.id, + // level: e.educationLevel, + // levelId: e.educationLevelId, + // positionPath: e.positionPath, + // positionPathId: e.positionPathId, + // institute: e.institute, + // degree: e.degree, + // field: e.field, + // gpa: e.gpa, + // country: e.country, + // duration: e.duration, + // durationYear: e.durationYear, + // other: e.other, + // fundName: e.fundName, + // finishDate: new Date(e.finishDate), + // startDate: new Date(e.startDate).getFullYear(), + // endDate: new Date(e.endDate).getFullYear(), + // createdFullName: e.createdFullName, + // createdAt: new Date(e.createdAt), + // }); }); }) .catch((e) => { @@ -591,22 +604,22 @@ const clickNext = async () => { * กดดูข้อมูลต่อไป */ const getData = () => { - const row = rows.value[rowIndex.value]; - levelId.value = row.levelId; - positionPathId.value = row.positionPathId; - institute.value = row.institute; - degree.value = row.degree; - field.value = row.field; - gpa.value = row.gpa; - country.value = row.country; - duration.value = row.duration; - durationYear.value = row.durationYear; - other.value = row.other; - fundName.value = row.fundName; - finishDate.value = row.finishDate; - startDate.value = row.startDate; - endDate.value = row.endDate; - id.value = row.id; + // const row = rows.value[rowIndex.value]; + // levelId.value = row.levelId; + // positionPathId.value = row.positionPathId; + // institute.value = row.institute; + // degree.value = row.degree; + // field.value = row.field; + // gpa.value = row.gpa; + // country.value = row.country; + // duration.value = row.duration; + // durationYear.value = row.durationYear; + // other.value = row.other; + // fundName.value = row.fundName; + // finishDate.value = row.finishDate; + // startDate.value = row.startDate; + // endDate.value = row.endDate; + // id.value = row.id; }; /** diff --git a/src/modules/05_placement/components/PersonalDetail/ExamResult.vue b/src/modules/05_placement/components/PersonalDetail/ExamResult.vue index cbee59678..5792bcf8b 100644 --- a/src/modules/05_placement/components/PersonalDetail/ExamResult.vue +++ b/src/modules/05_placement/components/PersonalDetail/ExamResult.vue @@ -1,101 +1,137 @@ \ No newline at end of file + diff --git a/src/modules/05_placement/components/PersonalDetail/Information/Address.vue b/src/modules/05_placement/components/PersonalDetail/Information/Address.vue index bb299a3ee..e5afc189b 100644 --- a/src/modules/05_placement/components/PersonalDetail/Information/Address.vue +++ b/src/modules/05_placement/components/PersonalDetail/Information/Address.vue @@ -8,7 +8,6 @@ import http from "@/plugins/http"; import config from "@/app.config"; import type { Address, - DataOption, zipCodeOption, } from "@/modules/05_placement/components/PersonalDetail/profileType"; import { defaultAddress } from "@/modules/05_placement/components/PersonalDetail/profileType"; @@ -17,8 +16,15 @@ import type { RequestItemsHistoryObject } from "@/modules//05_placement/interfac import type { ResponseObject } from "@/modules//05_placement/interface/response/Address"; import HistoryTable from "@/components/TableHistory.vue"; import { useRoute } from "vue-router"; -import type { AddressOps } from "@/modules//05_placement/interface/index/Main"; +import { AddressDataDefualt } from "@/modules//05_placement/interface/index/Main"; + +import type { + AddressOps, + Address as AddressType, + optionData, +} from "@/modules//05_placement/interface/index/Main"; import type { QTableProps } from "quasar"; +import type { PropType } from "vue"; const props = defineProps({ statusEdit: { @@ -29,6 +35,14 @@ const props = defineProps({ type: Function, default: () => console.log("not function"), }, + fetch: { + type: Function, + default: () => console.log("not function"), + }, + data: { + type: Object as PropType, + default: AddressDataDefualt, + }, }); const emit = defineEmits(["update:statusEdit"]); @@ -232,35 +246,35 @@ const filterSelector = (val: any, update: Function, refData: string) => { case "provinceOps": update(() => { Ops.value.provinceOps = OpsFilter.value.provinceOps.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: optionData) => v.name.indexOf(val) > -1 ); }); break; case "districtOps": update(() => { Ops.value.districtOps = OpsFilter.value.districtOps.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: optionData) => v.name.indexOf(val) > -1 ); }); break; case "districtCOps": update(() => { Ops.value.districtCOps = OpsFilter.value.districtCOps.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: optionData) => v.name.indexOf(val) > -1 ); }); break; case "subdistrictOps": update(() => { Ops.value.subdistrictOps = OpsFilter.value.subdistrictOps.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: optionData) => v.name.indexOf(val) > -1 ); }); break; case "subdistrictCOps": update(() => { Ops.value.subdistrictCOps = OpsFilter.value.subdistrictCOps.filter( - (v: DataOption) => v.name.indexOf(val) > -1 + (v: optionData) => v.name.indexOf(val) > -1 ); }); break; @@ -450,7 +464,7 @@ const fetchProvince = async () => { .get(config.API.province) .then((res) => { const data = res.data.result; - let option: DataOption[] = []; + let option: optionData[] = []; data.map((r: any) => { option.push({ id: r.id.toString(), name: r.name.toString() }); }); @@ -472,17 +486,17 @@ const fetchDistrict = async (id: string | null, position: string) => { .get(config.API.listDistrict(id)) .then((res) => { const data = res.data.result; - let option: DataOption[] = []; + let option: optionData[] = []; data.map((r: any) => { option.push({ id: r.id.toString(), name: r.name.toString() }); }); - if (position == "1") { - Ops.value.districtOps = option; - OpsFilter.value.districtOps = option; - } else { - Ops.value.districtCOps = option; - OpsFilter.value.districtCOps = option; - } + // if (position == "1") { + // Ops.value.districtOps = option; + // OpsFilter.value.districtOps = option; + // } else { + // Ops.value.districtCOps = option; + // OpsFilter.value.districtCOps = option; + // } }) .catch((e) => { messageError($q, e); @@ -831,4 +845,4 @@ const getClass = (val: boolean) => { - \ No newline at end of file + diff --git a/src/modules/05_placement/components/PersonalDetail/Information/Certicate.vue b/src/modules/05_placement/components/PersonalDetail/Information/Certicate.vue index 3082baed4..2f2186299 100644 --- a/src/modules/05_placement/components/PersonalDetail/Information/Certicate.vue +++ b/src/modules/05_placement/components/PersonalDetail/Information/Certicate.vue @@ -28,6 +28,10 @@ const props = defineProps({ type: String, required: true, }, + fetch: { + type: Function, + default: () => console.log("not function"), + }, }); const $q = useQuasar(); diff --git a/src/modules/05_placement/components/PersonalDetail/Information/Family.vue b/src/modules/05_placement/components/PersonalDetail/Information/Family.vue index dc8850be0..c7347e5f3 100644 --- a/src/modules/05_placement/components/PersonalDetail/Information/Family.vue +++ b/src/modules/05_placement/components/PersonalDetail/Information/Family.vue @@ -27,6 +27,10 @@ const props = defineProps({ type: Function, default: () => console.log("not function"), }, + fetch: { + type: Function, + default: () => console.log("not function"), + }, }); const emit = defineEmits(["update:statusEdit"]); @@ -121,13 +125,13 @@ const fetchPrefix = async () => { }; const addChildren = async () => { - familyData.value.childrens.push({ - id: `${familyData.value.childrens.length + 1}`, - childrenPrefixId: "", - childrenFirstName: "", - childrenLastName: "", - childrenCareer: "", - }); + // familyData.value.childrens.push({ + // id: `${familyData.value.childrens.length + 1}`, + // childrenPrefixId: "", + // childrenFirstName: "", + // childrenLastName: "", + // childrenCareer: "", + // }); familyData.value.childrens.sort( (a: childrenFamily, b: childrenFamily) => Number(b.id) - Number(a.id) @@ -150,26 +154,26 @@ const fetchHistory = async () => { .then((res) => { const data: ResponseObject[] = res.data.result; data.map((row: ResponseObject) => { - const arrayData: ResponseHistory = { - couple: row.couple ? "1" : "0", - couplePrefixId: row.couplePrefixId, - coupleFirstName: row.coupleFirstName, - coupleLastName: row.coupleLastName, - coupleLastNameOld: row.coupleLastNameOld, - coupleCareer: row.coupleCareer, - fatherPrefixId: row.fatherPrefixId, - fatherFirstName: row.fatherFirstName, - fatherLastName: row.fatherLastName, - fatherCareer: row.fatherCareer, - motherPrefixId: row.motherPrefixId, - motherFirstName: row.motherFirstName, - motherLastName: row.motherLastName, - motherCareer: row.motherCareer, - childrens: row.childrens, - createdFullName: row.createdFullName, - createdAt: new Date(row.createdAt), - }; - familyDataHistory.value.push(arrayData); + // const arrayData: ResponseHistory = { + // couple: row.couple ? "1" : "0", + // couplePrefixId: row.couplePrefixId, + // coupleFirstName: row.coupleFirstName, + // coupleLastName: row.coupleLastName, + // coupleLastNameOld: row.coupleLastNameOld, + // coupleCareer: row.coupleCareer, + // fatherPrefixId: row.fatherPrefixId, + // fatherFirstName: row.fatherFirstName, + // fatherLastName: row.fatherLastName, + // fatherCareer: row.fatherCareer, + // motherPrefixId: row.motherPrefixId, + // motherFirstName: row.motherFirstName, + // motherLastName: row.motherLastName, + // motherCareer: row.motherCareer, + // childrens: row.childrens, + // createdFullName: row.createdFullName, + // createdAt: new Date(row.createdAt), + // }; + // familyDataHistory.value.push(arrayData); }); }) .catch((e) => { @@ -198,56 +202,55 @@ const fetchHistory = async () => { }; const fetchData = async () => { - familyData.value.childrens = []; // loaderPage(true); // await http // .get(config.API.profileFamiId(route.params.id.toString())) // .then((res) => { - // const data: ResponseObject = res.data.result; - // familyData.value.prefixC = ""; - // familyData.value.prefixIdC = data.couplePrefixId; - // familyData.value.firstnameC = data.coupleFirstName; - // familyData.value.lastnameC = data.coupleLastName; - // familyData.value.lastnameCOld = data.coupleLastNameOld; - // familyData.value.occupationC = data.coupleCareer; - // familyData.value.prefixM = ""; - // familyData.value.prefixIdM = data.fatherPrefixId; + // const data: ResponseObject = res.data.result; + // familyData.value.prefixC = ""; + // familyData.value.prefixIdC = data.couplePrefixId; + // familyData.value.firstnameC = data.coupleFirstName; + // familyData.value.lastnameC = data.coupleLastName; + // familyData.value.lastnameCOld = data.coupleLastNameOld; + // familyData.value.occupationC = data.coupleCareer; + // familyData.value.prefixM = ""; + // familyData.value.prefixIdM = data.fatherPrefixId; - // familyData.value.firstnameM = data.fatherFirstName; - // familyData.value.lastnameM = data.fatherLastName; - // familyData.value.occupationM = data.fatherCareer; - // familyData.value.prefixF = ""; - // familyData.value.prefixIdF = data.motherPrefixId; + // familyData.value.firstnameM = data.fatherFirstName; + // familyData.value.lastnameM = data.fatherLastName; + // familyData.value.occupationM = data.fatherCareer; + // familyData.value.prefixF = ""; + // familyData.value.prefixIdF = data.motherPrefixId; - // familyData.value.firstnameF = data.motherFirstName; - // familyData.value.lastnameF = data.motherLastName; - // familyData.value.occupationF = data.motherCareer; - // familyData.value.same = data.couple ? "1" : "0"; + // familyData.value.firstnameF = data.motherFirstName; + // familyData.value.lastnameF = data.motherLastName; + // familyData.value.occupationF = data.motherCareer; + // familyData.value.same = data.couple ? "1" : "0"; - // if (data.childrens.length > 0) { - // let dataChild: childrenFamily[] = []; - // data.childrens.map((row: childrenFamily, index: number) => { - // dataChild.push({ - // id: `${index + 1}`, - // childrenPrefixId: row.childrenPrefixId, - // childrenFirstName: row.childrenFirstName, - // childrenLastName: row.childrenLastName, - // childrenCareer: row.childrenCareer, - // }); - // }); - // familyData.value.childrens = dataChild; - // } else { - // familyData.value.childrens = []; - // } - // }) - // .catch((e) => { - // messageError($q, e); - // }) - // .finally(async () => { - // loaderPage(false); - // }); + // if (data.childrens.length > 0) { + // let dataChild: childrenFamily[] = []; + // data.childrens.map((row: childrenFamily, index: number) => { + // dataChild.push({ + // id: `${index + 1}`, + // childrenPrefixId: row.childrenPrefixId, + // childrenFirstName: row.childrenFirstName, + // childrenLastName: row.childrenLastName, + // childrenCareer: row.childrenCareer, + // }); + // }); + // familyData.value.childrens = dataChild; + // } else { + // familyData.value.childrens = []; + // } + // }) + // .catch((e) => { + // messageError($q, e); + // }) + // .finally(async () => { + // loaderPage(false); + // }); }; const editData = async () => { @@ -1094,6 +1097,6 @@ const getClass = (val: boolean) => { \ No newline at end of file + diff --git a/src/modules/05_placement/components/PersonalDetail/Information/Information.vue b/src/modules/05_placement/components/PersonalDetail/Information/Information.vue index a2e99b4a9..e03652847 100644 --- a/src/modules/05_placement/components/PersonalDetail/Information/Information.vue +++ b/src/modules/05_placement/components/PersonalDetail/Information/Information.vue @@ -2,26 +2,26 @@ diff --git a/src/modules/05_placement/components/PersonalDetail/Qualification.vue b/src/modules/05_placement/components/PersonalDetail/Qualification.vue index 778ad5c4d..6ba5f8f09 100644 --- a/src/modules/05_placement/components/PersonalDetail/Qualification.vue +++ b/src/modules/05_placement/components/PersonalDetail/Qualification.vue @@ -1,46 +1,69 @@ \ No newline at end of file + diff --git a/src/modules/05_placement/components/PersonalDetail/profileType.ts b/src/modules/05_placement/components/PersonalDetail/profileType.ts index 9ba368651..1e8e1ee75 100644 --- a/src/modules/05_placement/components/PersonalDetail/profileType.ts +++ b/src/modules/05_placement/components/PersonalDetail/profileType.ts @@ -8,23 +8,25 @@ interface ChangeActive { //ข้อมูลส่วนตัว interface Information { - cardid: string | null; + idCard: string | null; prefix: string | null; - age: string | null; prefixId: string | null; + fullName: string | null; firstname: string | null; lastname: string | null; - birthDate: Date; - genderId: string | null; - bloodId: string | null; nationality: string | null; - ethnicity: string | null; - statusId: string | null; + race: string | null; + dateOfBirth: Date | null; + age: string | null; + telephone: string | null; + gender: string | null; + genderId: string | null; + relationship: string | null; + relationshipId: string | null; + bloodGroup: string | null; + bloodGroupId: string | null; + religion: string | null; religionId: string | null; - tel: string | null; - employeeType: string | null; - employeeClass: string | null; - profileType: string | null; } interface Family { @@ -119,23 +121,25 @@ const defaultAddress: Address = { }; const defaultInformation: Information = { - cardid: null, - age: null, + idCard: null, prefix: null, prefixId: null, + fullName: null, firstname: null, lastname: null, - birthDate: new Date(), - genderId: null, - bloodId: null, nationality: null, - ethnicity: null, - statusId: null, + race: null, + dateOfBirth: new Date(), + age: null, + telephone: null, + gender: null, + genderId: null, + relationship: null, + relationshipId: null, + bloodGroup: null, + bloodGroupId: null, + religion: null, religionId: null, - tel: null, - employeeType: null, - employeeClass: null, - profileType: null, }; const defaultFamily: Family = { diff --git a/src/modules/05_placement/components/pass/Table.vue b/src/modules/05_placement/components/pass/Table.vue index 9ca780db6..f0e0fb7ee 100644 --- a/src/modules/05_placement/components/pass/Table.vue +++ b/src/modules/05_placement/components/pass/Table.vue @@ -18,11 +18,11 @@ import router from "@/router"; let roleAdmin = ref(false); const props = defineProps({ - statCard:{ - type:Function, + statCard: { + type: Function, default: () => console.log("getStat"), - } -}) + }, +}); const edit = ref(true); const modal = ref(false); //modal ขอผ่อนผัน + สละสิทธิ์ const editRow = ref(false); //เช็คมีการแก้ไขข้อมูล @@ -41,13 +41,7 @@ const files = ref(null); const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง const $q = useQuasar(); // show dialog -const { - messageError, - showLoader, - hideLoader, - dateText, - success -} = mixin; +const { messageError, showLoader, hideLoader, dateText, success } = mixin; const route = useRoute(); const examId = route.params.examId; @@ -144,22 +138,42 @@ const getTable = async () => { .get(config.API.redirectToPage(examIdString)) .then((res: any) => { const dataArray: PartialTableName[] = res.data.result; - rows.value = [] + rows.value = []; dataArray.map((data) => { const rowData = { personalId: data.personalId, idCard: data.idCard, - fullName: data.fullName, + fullName: data.fullName + ' ' + data.idCard, + name: data.fullName, profilePhoto: data.profilePhoto, - organizationName: data.organizationName, + organizationName: data.organizationName + ' ' + data.organizationShortName + ' ' + data.positionNumber + ' ' + data.positionPath, + orgName: data.organizationName, organizationShortName: data.organizationShortName, positionNumber: data.positionNumber, positionPath: data.positionPath, reportingDate: dateText(new Date(data.reportingDate)), number: data.number, - bmaOfficer: data.bmaOfficer == 'OFFICER' ? 'ขรก.กทม. สามัญ' : data.bmaOfficer == 'EMPLOYEE_PERM' ? 'ลูกจ้างประจำ' : data.bmaOfficer == 'EMPLOYEE_TEMP' ? 'ลูกจ้างชั่วคราว' : data.bmaOfficer == null ? 'บุคคลภายนอก' : '-', + bmaOfficer: + data.bmaOfficer == "OFFICER" + ? "ขรก.กทม. สามัญ" + : data.bmaOfficer == "EMPLOYEE_PERM" + ? "ลูกจ้างประจำ" + : data.bmaOfficer == "EMPLOYEE_TEMP" + ? "ลูกจ้างชั่วคราว" + : data.bmaOfficer == null + ? "บุคคลภายนอก" + : "-", statusId: data.statusId, - statusName: data.statusId == 'UN-CONTAIN' ? 'ยังไม่บรรจุ' : data.statusId == 'PREPARE-CONTAIN' ? 'เตรียมบรรจุ' : data.statusId == 'CONTAIN' ? 'บรรจุแล้ว' : data.statusId == 'DISCLAIM' ? 'สละสิทธิ์' : '-', + statusName: + data.statusId == "UN-CONTAIN" + ? "ยังไม่บรรจุ" + : data.statusId == "PREPARE-CONTAIN" + ? "เตรียมบรรจุ" + : data.statusId == "CONTAIN" + ? "บรรจุแล้ว" + : data.statusId == "DISCLAIM" + ? "สละสิทธิ์" + : "-", deferment: data.deferment, }; @@ -179,7 +193,7 @@ const appointModal = ref(false); const saveDeferment = async () => { myForm.value.validate().then(async (result: boolean) => { if (result) { - showLoader() + showLoader(); const formData = new FormData(); formData.append("personalId", personalId.value); formData.append("note", userNote.value); @@ -196,7 +210,7 @@ const saveDeferment = async () => { .finally(async () => { await getTable(); props.statCard(); - userNote.value = "" + userNote.value = ""; modalDefermentDisclaim.value = false; hideLoader(); }); @@ -207,7 +221,7 @@ const saveDeferment = async () => { const saveDisclaim = async () => { myForm.value.validate().then(async (result: boolean) => { if (result) { - showLoader() + showLoader(); const dataPost = { note: userNote.value, personId: personalId.value, @@ -220,11 +234,13 @@ const saveDisclaim = async () => { note: dataPost.note, personalId: dataPost.personId, }) - .then(() => { success($q, "บันทึกสำเร็จ"); }) + .then(() => { + success($q, "บันทึกสำเร็จ"); + }) .finally(async () => { await getTable(); props.statCard(); - userNote.value = "" + userNote.value = ""; modalDefermentDisclaim.value = false; hideLoader(); }); @@ -245,7 +261,7 @@ const getClass = (val: boolean) => { const selectData = (pid: string) => { if (roleAdmin.value === true) { - personalId.value = pid + personalId.value = pid; modal.value = true; } else { router.push("/placement/detail/" + pid); @@ -255,7 +271,7 @@ const selectData = (pid: string) => { const getNumFile = ref(0); const dataInfo = reactive({ reason: "", - reliefDoc: "" + reliefDoc: "", }); const editDetail = ( @@ -276,12 +292,11 @@ const editDetail = ( modalDisclaim.value = false; modalDefermentDisclaim.value = true; } else if (action === "defermentInfo") { - http .get(config.API.placementDefermentInfo(props.personalId)) .then((res: any) => { dataInfo.reason = res.data.result.reliefReason; - dataInfo.reliefDoc = res.data.result.reliefDoc + dataInfo.reliefDoc = res.data.result.reliefDoc; }) .catch((e) => { messageError($q, e); @@ -313,8 +328,8 @@ const openAppointModal = (pid: string) => { const clickCloseModalTree = async () => { await getTable(); - appointModal.value = false -} + appointModal.value = false; +}; const validateData = async () => { checkValidate.value = true; @@ -370,188 +385,334 @@ const pagination = ref({