+
ว่าง
@@ -1263,8 +1242,13 @@ watch(expiredAccount, () => {
{{ prop.node.positionLevel }}
-
+
@@ -1279,24 +1263,46 @@ watch(expiredAccount, () => {
-
+
{{ year + 543 }}
{{
parseInt(value + 543)
}}
-
+ ]"
+ :label="`${'วันที่รายงานตัว'}`"
+ hide-bottom-space
+ >
-
+
@@ -1305,58 +1311,145 @@ watch(expiredAccount, () => {
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+ ]"
+ :label="`${'เงินประจำตำแหน่ง'}`"
+ @update:modelValue="clickEditRow"
+ type="number"
+ hide-bottom-space
+ />
-
+ ]"
+ :label="`${'เงินค่าตอบแทนรายเดือน'}`"
+ @update:modelValue="clickEditRow"
+ type="number"
+ hide-bottom-space
+ />
@@ -1366,29 +1459,60 @@ watch(expiredAccount, () => {
-
+
-
+
-
-
+
+ {{ personId }}
-
-
+
+
@@ -1396,8 +1520,12 @@ watch(expiredAccount, () => {
-
+
@@ -1406,7 +1534,10 @@ watch(expiredAccount, () => {
-
+
@@ -1416,7 +1547,14 @@ watch(expiredAccount, () => {
เอกสารหลักฐาน
กรอกเหตุผล
-
+
diff --git a/src/modules/05_placement/components/pass/TableDetail.vue b/src/modules/05_placement/components/pass/TableDetail.vue
index b031d2121..bd7c159af 100644
--- a/src/modules/05_placement/components/pass/TableDetail.vue
+++ b/src/modules/05_placement/components/pass/TableDetail.vue
@@ -6,10 +6,35 @@ import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vu
import type { QTableProps } from "quasar";
import type { CheckboxItem } from "@/modules/05_placement/interface/index/Main";
import { useCounterMixin } from "@/stores/mixin";
+import http from "@/plugins/http";
+import config from "@/app.config";
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
const modal = ref
();
-const { success } = mixin;
+const graduationExample = "2023-03-01T00:00:00";
+const $q = useQuasar();
+
+const { success, date2Thai,messageError,
+showLoader ,hideLoader} = mixin;
const save = ref(true);
+const uid = ref()
+const idCard = ref()
+const fullName = ref()
+const dateOfBirth = ref()
+const gender = ref()
+const address = ref()
+const education = ref()
+const pointA = ref()
+const pointB = ref()
+const pointC = ref()
+const pointTotalA = ref()
+const pointTotalB = ref()
+const pointTotalC = ref()
+const point = ref()
+const pointTotal = ref()
+const examNumber = ref()
+const examRound = ref()
+const pass = ref()
+const isProperty = ref()
const props = defineProps({
Modal: Boolean,
close: {
@@ -25,15 +50,61 @@ const props = defineProps({
default: () => console.log("not function"),
},
});
+
+// const getDetailbyId = (props.getdetail) => {
+// showLoader();
+
+// // ดึงข้อมูล personalId จาก API ก่อน
+// try {
+// const response = await http.get(config.API.personalId(id));
+// const personalId = response.data.personalId;
+
+// // เมื่อได้รับ personalId แล้วให้ดึงข้อมูลอื่นๆ จาก API
+// const organizationResponse = await http.get(config.API.organizationName(personalId));
+// const data = organizationResponse.data.result;
+
+// // อัปเดตข้อมูลบนหน้า UI จากข้อมูลที่ได้รับ
+// uid.value = data.personalId;
+// idCard.value = data.idCard;
+// fullName.value = "tee";
+// dateOfBirth.value = new Date(data.dateOfBirth).toLocaleDateString();
+// gender.value = data.gender;
+// address.value = data.address;
+// education.value = data.education;
+// pointA.value = data.pointA;
+// pointB.value = data.pointB;
+// pointC.value = data.pointC;
+// pointTotalA.value = data.pointTotalA;
+// pointTotalB.value = data.pointTotalB;
+// pointTotalC.value = data.pointTotalC;
+// point.value = data.point;
+// pointTotal.value = data.pointTotal;
+// examNumber.value = data.examNumber;
+// examRound.value = data.examRound;
+// pass.value = data.pass;
+// isProperty.value = data.isProperty;
+// } catch (error) {
+// messageError($q, error);
+// } finally {
+// hideLoader();
+// }
+
+// };
+
const rows = ref([
{
university: props.getdetail.university || "-",
degree: props.getdetail.degree || "-",
major: props.getdetail.major || "-",
- graduation: "2022-01-01",
+ graduation: "",
},
-
]);
+//--------------------(แปลงวันที่เป็นไทย)------------------------------------//
+const graduationDate = new Date(graduationExample);
+rows.value[0].graduation = date2Thai(graduationDate, false, false);
+
+//--------------------------------------------------------------------//
+
const columns = ref([
{
name: "university",
@@ -125,7 +196,6 @@ const checkboxItems: CheckboxItem[] = [
"เป็นผู้เคยกระทำการทุจริตในการสอบเข้ารับราชการ หรือเข้าปฏิบัติงานใน หน่วยงานของรัฐ",
},
];
-const $q = useQuasar();
function isRequired(val: any): boolean | string {
return !!val || "กรุณาเลือกไฟล์เอกสารหลักฐาน";
}
@@ -164,7 +234,7 @@ const close = async () => {
@@ -231,6 +301,7 @@ const close = async () => {
virtual-scroll
:virtual-scroll-sticky-size-start="48"
dense
+ hide-bottom
>
diff --git a/src/modules/05_placement/interface/index/Main.ts b/src/modules/05_placement/interface/index/Main.ts
index 1e46a9961..657fbfbd7 100644
--- a/src/modules/05_placement/interface/index/Main.ts
+++ b/src/modules/05_placement/interface/index/Main.ts
@@ -1,10 +1,14 @@
import type { zipCodeOption } from "../../components/PersonalDetail/profileType";
interface DataOption {
- id: number | string;
- name: string;
+ id: number|null;
+ name:string|null;
+ disable?: boolean;
+}
+interface DataOption1 {
+ id: string|null;
+ name:string|null;
disable?: boolean;
}
-
interface DataOptionInsignia {
id: string;
name: string;
@@ -61,6 +65,7 @@ export type {
AddressOps,
Pagination,
EduOps,
+ DataOption1,
InsigniaOps,
CheckboxItem,
};
diff --git a/src/modules/05_placement/interface/request/Main.ts b/src/modules/05_placement/interface/request/Main.ts
index b7b38d6a1..84af7910f 100644
--- a/src/modules/05_placement/interface/request/Main.ts
+++ b/src/modules/05_placement/interface/request/Main.ts
@@ -4,8 +4,10 @@ interface FormPlacementMainData {
examRound: string;
examOrder: number;
fiscalYear: number;
- numberofCandidates: number;
- examType: number;
+ numberOfCandidates: number;
+ examTypeValue:string;
+ examTypeName: string;
+ accountStartDate: string;
accountExpirationDate: string;
isExpired?: boolean;
}
diff --git a/src/modules/05_placement/interface/request/placement.ts b/src/modules/05_placement/interface/request/placement.ts
index 541e5ccb7..0cfc57ac8 100644
--- a/src/modules/05_placement/interface/request/placement.ts
+++ b/src/modules/05_placement/interface/request/placement.ts
@@ -1,5 +1,5 @@
interface TableName {
- profileID: string;
+ personalId: string;
position: number;
fullName: string;
dateOfBirth: string;
@@ -7,14 +7,20 @@ interface TableName {
ExamOrder: number;
unitId: string;
UnitGroup: string;
+ positionNumber:string;
+ positionPath:string;
Unit: string;
- ReportingDate: string; //วันที่รายงานตัว
- BMAOfficer: string;
- Status: string;
+ reportingDate: string; //วันที่รายงานตัว
+ bmaOfficer: string;
+ statusId: string;
checkList: any;
address: string;
university: string;
degree: string;
+ disclaim: string;
+ profilePhoto:string;
+ organizationName:string;
+ organizationShortName:string;
major: string;
remark: string;
number: number;
@@ -31,5 +37,19 @@ interface TableName {
examResult: string;
};
}
-
-export type { TableName };
\ No newline at end of file
+interface PartialTableName {
+ personalId: string;
+ fullName: string;
+ idCard: string;
+ profilePhoto: string;
+ organizationName: string;
+ organizationShortName: string;
+ positionNumber: string;
+ positionPath: string;
+ reportingDate: string;
+ bmaOfficer: string;
+ number: number;
+ statusId: string;
+ disclaim: string;
+}
+export type { TableName ,PartialTableName};
\ No newline at end of file
diff --git a/src/modules/05_placement/router.ts b/src/modules/05_placement/router.ts
index bf38dfdb8..309706bde 100644
--- a/src/modules/05_placement/router.ts
+++ b/src/modules/05_placement/router.ts
@@ -43,7 +43,7 @@ export default [
},
},
{
- path: "/placement/detail",
+ path: "/placement/pass/:examId",
name: "placementDetail",
component: PlacementDetail,
meta: {
diff --git a/src/modules/05_placement/store.ts b/src/modules/05_placement/store.ts
index 634c46309..3f51227be 100644
--- a/src/modules/05_placement/store.ts
+++ b/src/modules/05_placement/store.ts
@@ -104,77 +104,77 @@ export const usePlacementDataStore = defineStore("placement", () => {
(DataMainYear.value = val);
const DataMain = (val: FormPlacementMainData[]) => (DataMainOrig.value = val);
const DataUpdateMain = (
- filter_1: number | null,
- filter_2: number | null,
+ filter_1: number | string,
+ filter_2: string | null,
filter_3: boolean
) => {
DataMainUpdate.value = [];
- if (filter_1 === null && filter_2 === 0 && filter_3 === false) {
+ if (filter_1 === "all" && filter_2 === "all" && filter_3 === false) {
// console.log('case 1');
// return DataMainUpdate.value = DataMainOrig.value; อันเก่า
return (DataMainUpdate.value = DataMainOrig.value.filter(
(item) => item.isExpired === filter_3
));
- } else if (filter_1 === null && filter_2 === null && filter_3 === false) {
+ } else if (filter_1 === "all" && filter_2 === "all" && filter_3 === false) {
// console.log('case 1.1');
return (DataMainUpdate.value = DataMainOrig.value.filter(
(item) => item.isExpired === filter_3
));
- } else if (filter_1 !== null && filter_2 === 0 && filter_3 === false) {
+ } else if (filter_1 !== "all" && filter_2 === "all" && filter_3 === false) {
// console.log('case 2');
return (DataMainUpdate.value = DataMainOrig.value.filter(
(item) => item.examOrder === filter_1 && item.isExpired === filter_3
));
- } else if (filter_1 !== null && filter_2 === null && filter_3 === false) {
+ } else if (filter_1 !== "all" && filter_2 === "all" && filter_3 === false) {
// console.log('case 2.1');
return (DataMainUpdate.value = DataMainOrig.value.filter(
(item) => item.examOrder === filter_1 && item.isExpired === filter_3
));
- } else if (filter_1 !== null && filter_2 !== 0 && filter_3 === false) {
+ } else if (filter_1 !== "all" && filter_2 !== "all" && filter_3 === false) {
// console.log('case 2.2');
return (DataMainUpdate.value = DataMainOrig.value.filter(
(item) =>
item.examOrder === filter_1 &&
- item.examType === filter_2 &&
+ item.examTypeValue === filter_2 &&
item.isExpired === filter_3
));
- } else if (filter_1 === null && filter_2 !== 0 && filter_3 === false) {
+ } else if (filter_1 === "all" && filter_2 !== "all" && filter_3 === false) {
// console.log('case 3');
return (DataMainUpdate.value = DataMainOrig.value.filter(
- (item) => item.examType === filter_2 && item.isExpired === filter_3
+ (item) => item.examTypeValue === filter_2 && item.isExpired === filter_3
));
- } else if (filter_1 === null && filter_2 === 0 && filter_3 === true) {
+ } else if (filter_1 === "all" && filter_2 === "all" && filter_3 === true) {
// console.log('case 3.1');
return (DataMainUpdate.value = DataMainOrig.value.filter(
(item) => item.isExpired === filter_3
));
- } else if (filter_1 === null && filter_2 === null && filter_3 === true) {
+ } else if (filter_1 === "all" && filter_2 === "all" && filter_3 === true) {
// console.log('case 3.2');
return (DataMainUpdate.value = DataMainOrig.value.filter(
(item) => item.isExpired === filter_3
));
- } else if (filter_1 !== null && filter_2 === 0 && filter_3 === true) {
+ } else if (filter_1 !== "all" && filter_2 === "all" && filter_3 === true) {
// console.log('case 3.3');
return (DataMainUpdate.value = DataMainOrig.value.filter(
(item) => item.examOrder == filter_1 && item.isExpired == filter_3
));
- } else if (filter_1 !== null && filter_2 === null && filter_3 === true) {
+ } else if (filter_1 !== "all" && filter_2 === "all" && filter_3 === true) {
// console.log('case 3.4');
return (DataMainUpdate.value = DataMainOrig.value.filter(
(item) => item.examOrder == filter_1 && item.isExpired == filter_3
));
- } else if (filter_1 !== null && filter_2 !== 0 && filter_3 === true) {
+ } else if (filter_1 !== "all" && filter_2 !== "all" && filter_3 === true) {
// console.log('case 3.5');
return (DataMainUpdate.value = DataMainOrig.value.filter(
(item) =>
item.examOrder == filter_1 &&
- item.examType == filter_2 &&
+ item.examTypeValue == filter_2 &&
item.isExpired == filter_3
));
- } else if (filter_1 === null && filter_2 !== 0 && filter_3 === true) {
+ } else if (filter_1 === "all" && filter_2 !== "all" && filter_3 === true) {
// console.log('case 3.6');
return (DataMainUpdate.value = DataMainOrig.value.filter(
- (item) => item.examType == filter_2 && item.isExpired == filter_3
+ (item) => item.examTypeValue == filter_2 && item.isExpired == filter_3
));
}
};