+
อัปโหลดไฟล์
diff --git a/src/modules/06_evaluate/interface/evalute.ts b/src/modules/06_evaluate/interface/evalute.ts
index 60f9e8e..696509a 100644
--- a/src/modules/06_evaluate/interface/evalute.ts
+++ b/src/modules/06_evaluate/interface/evalute.ts
@@ -1,17 +1,27 @@
+interface FormSpec {
+ isEducationalQft: boolean;
+ isGovermantServiceHtr: boolean;
+ isOperatingExp: boolean;
+ isMinPeriodOfTenure: boolean;
+ isHaveSpecificQft: boolean;
+ isHaveProLicense: boolean;
+ isHaveMinPeriodOrHoldPos: boolean;
+}
+
interface FormCommand {
- elementaryFullName: string;
- elementaryPosition: string;
- abovelevelFullname: string;
- abovelevelPosition: string;
+ commanderFullname: string;
+ commanderPosition: string;
+ commanderAboveFullname: string;
+ commanderAbovePosition: string;
}
interface FormCommandRef {
- elementaryFullName: object | null;
- elementaryPosition: object | null;
- abovelevelFullname: object | null;
- abovelevelPosition: object | null;
+ commanderFullname: object | null;
+ commanderPosition: object | null;
+ commanderAboveFullname: object | null;
+ commanderAbovePosition: object | null;
[key: string]: any;
}
-export type { FormCommand, FormCommandRef };
+export type { FormCommand, FormCommandRef, FormSpec };
diff --git a/src/modules/06_evaluate/store.ts b/src/modules/06_evaluate/store.ts
index e26dd3e..11efe15 100644
--- a/src/modules/06_evaluate/store.ts
+++ b/src/modules/06_evaluate/store.ts
@@ -3,11 +3,13 @@ import { ref } from "vue";
export const useEvaluateStore = defineStore("evaluateStore", () => {
const tabMenu = ref("1");
+ const showLoadStatus = ref(false);
const step = ref(1);
- const titel = ref([
+ const currentStep = ref(1);
+ const title = ref([
"ตรวจสอบคุณสมบัติ",
- "จัดเตรียมเอกสาร",
- "ตรวจสอบเอกสาร",
+ "จัดเตรียมเอกสารเล่ม 1",
+ "ตรวจสอบเอกสารเล่ม 1",
"รอตรวจสอบคุณสมบัติ",
"ประกาศบนเว็บไซต์",
"จัดเตรียมเอกสารเล่ม 2",
@@ -23,7 +25,10 @@ export const useEvaluateStore = defineStore("evaluateStore", () => {
return {
tabMenu,
step,
- titel,
+ currentStep,
+ title,
tabPanels,
+ evaluateId,
+ showLoadStatus,
};
});
diff --git a/src/modules/06_evaluate/stores/evaluationFunction.ts b/src/modules/06_evaluate/stores/evaluationFunction.ts
index 7df3e64..e7fe232 100644
--- a/src/modules/06_evaluate/stores/evaluationFunction.ts
+++ b/src/modules/06_evaluate/stores/evaluationFunction.ts
@@ -5,20 +5,27 @@ import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { useEvaluateStore } from "@/modules/06_evaluate/store";
-const stroe = useEvaluateStore();
+const store = useEvaluateStore();
const mixin = useCounterMixin();
const $q = useQuasar();
const { showLoader, hideLoader, messageError } = mixin;
+/** function เช็คการยื่นข้อประเมิน*/
async function fetchCheckStatus() {
- console.log(stroe.tabMenu);
+ store.showLoadStatus = false;
+ store.currentStep = 1;
showLoader();
await http
.get(config.API.evaluationCheckStatus())
.then((res) => {
- console.log(res);
- // stroe.tabMenu === 1 ? stroe.evaluateId = 1 : stroe.evaluateId = 2
+ const data = res.data.result;
+ store.tabMenu === "1"
+ ? (store.evaluateId = data.expertId)
+ : (store.evaluateId = data.specialExpertId);
+ store.evaluateId && fetchCheckStep();
+
+ store.showLoadStatus = true;
})
.catch((err) => {
messageError($q, err);
@@ -28,18 +35,214 @@ async function fetchCheckStatus() {
});
}
-async function saveEvaluation(body: any) {
- console.log(body);
+async function fetchCheckStep() {
+ await http
+ .get(config.API.evaluationCheckStep(store.evaluateId))
+ .then((res) => {
+ const data = res.data.result;
+ let step =
+ data.Step === "CHECK_SPEC"
+ ? 1
+ : data.Step === "PREPARE_DOC_V1"
+ ? 2
+ : data.Step === "CHECK_DOC_V1"
+ ? 3
+ : data.Step === "WAIT_CHECK_DOC_V1"
+ ? 4
+ : data.Step === "ANNOUNCE_WEB"
+ ? 5
+ : data.Step === "PREPARE_DOC_V2"
+ ? 6
+ : data.Step === "CHECK_DOC_V2"
+ ? 7
+ : data.Step === "WAIT_CHECK_DOC_V2"
+ ? 8
+ : data.Step === "DONE"
+ ? 9
+ : 0;
- // try {
- // showLoader();
- // const res = await http.post(config.API.evaluationCheckspec(), body);
- // return res;
- // } catch (err) {
- // messageError($q, err);
- // } finally {
- // hideLoader();
- // }
+ store.currentStep = step;
+ store.step = step;
+ })
+ .catch((err) => {
+ messageError($q, err);
+ });
}
-export default { fetchCheckStatus, saveEvaluation };
+async function saveEvaluation(body: any) {
+ console.log(body);
+ // const form = {
+ // UserId: "08dbca3a-8b6a-4a4e-8b23-1f62e4f30ef6",
+ // CitizenId: "1540200054020",
+ // Prefix: "นางสาว",
+ // FullName: "สาวิตรี ศรีสมัย",
+ // Position: "นักทรัพยากรบุคคล",
+ // Oc: "สำนักปลัดกรุงเทพมหานคร/สำนักงานการเจ้าหน้าที่",
+ // Salary: "10000",
+ // PositionLevel: "นักทรัพยากรบุคคล",
+ // PosNo: "10",
+ // BirthDate: "string",
+ // GovAge: "string",
+ // Type: "string",
+ // Step: "string",
+ // IsEducationalQft: true,
+ // IsGovermantServiceHtr: true,
+ // IsOperatingExp: true,
+ // IsMinPeriodOfTenure: true,
+ // IsHaveSpecificQft: true,
+ // IsHaveProLicense: true,
+ // IsHaveMinPeriodOrHoldPos: true,
+ // Reason: "string",
+ // Educations: [
+ // {
+ // EducationLevel: "string",
+ // Institute: "string",
+ // IsDate: true,
+ // StartDate: "2023-12-19T03:20:04.460Z",
+ // EndDate: "2023-12-19T03:20:04.460Z",
+ // FinishDate: "2023-12-19T03:20:04.460Z",
+ // IsEducation: true,
+ // Degree: "string",
+ // Field: "string",
+ // FundName: "string",
+ // Gpa: "string",
+ // Country: "string",
+ // Other: "string",
+ // Duration: "string",
+ // DurationYear: "string",
+ // },
+ // ],
+ // Certificates: [
+ // {
+ // Step: "string",
+ // CertificateType: "string",
+ // Issuer: "string",
+ // CertificateNo: "string",
+ // IssueDate: "2023-12-19T03:20:04.460Z",
+ // ExpireDate: "2023-12-19T03:20:04.460Z",
+ // },
+ // ],
+ // Salaries: [
+ // {
+ // Step: "string",
+ // Date: "2023-12-19T03:20:04.460Z",
+ // Amount: 0,
+ // PositionSalaryAmount: 0,
+ // MouthSalaryAmount: 0,
+ // Position: "string",
+ // PosNo: "string",
+ // SalaryClass: "string",
+ // SalaryRef: "string",
+ // RefCommandNo: "string",
+ // RefCommandDate: "2023-12-19T03:20:04.460Z",
+ // SalaryStatus: "string",
+ // },
+ // ],
+ // Trainings: [
+ // {
+ // Name: "string",
+ // Topic: "string",
+ // StartDate: "2023-12-19T03:20:04.460Z",
+ // EndDate: "2023-12-19T03:20:04.460Z",
+ // Yearly: 0,
+ // Place: "string",
+ // Duration: "string",
+ // Department: "string",
+ // NumberOrder: "string",
+ // DateOrder: "2023-12-19T03:20:04.460Z",
+ // },
+ // ],
+ // Assessments: [
+ // {
+ // Date: "2023-12-19T03:20:04.460Z",
+ // Point1Total: 0,
+ // Point1: 0,
+ // Point2Total: 0,
+ // Point2: 0,
+ // PointSumTotal: 0,
+ // PointSum: 0,
+ // },
+ // ],
+ // };
+
+ showLoader();
+ await http
+ .post(config.API.evaluationCheckspec(), body)
+ .then((res) => {
+ console.log(res);
+ })
+ .catch((err) => {
+ messageError($q, err);
+ })
+ .finally(() => {
+ hideLoader();
+ fetchCheckStep();
+ });
+}
+
+async function nextPrapare(type: string, body: any) {
+ showLoader();
+ await http
+ .put(config.API.evaluationPreparedoc(store.evaluateId, type), body)
+ .then((res) => {
+ console.log(res);
+ })
+ .catch((err) => {
+ messageError($q, err);
+ })
+ .finally(() => {
+ hideLoader();
+ fetchCheckStep();
+ });
+}
+
+async function peviousPrapare(type: string) {
+ showLoader();
+ await http
+ .put(config.API.evaluationPreparedoc(store.evaluateId, type))
+ .then((res) => {
+ console.log(res);
+ })
+ .catch((err) => {
+ messageError($q, err);
+ })
+ .finally(() => {
+ hideLoader();
+ });
+}
+
+async function nextCheckDoc(type: string) {
+ showLoader();
+ await http
+ .put(config.API.evaluationCheckdoc(store.evaluateId, type))
+ .then((res) => {
+ console.log(res);
+ })
+ .catch((err) => {
+ messageError($q, err);
+ })
+ .finally(() => {
+ hideLoader();
+ fetchCheckStep();
+ });
+}
+
+async function nextCheckDoc2() {
+ showLoader();
+ await http
+ .put(config.API.evaluationCheckdocV1(store.evaluateId))
+ .then((res) => {})
+ .catch((err) => {})
+ .finally(() => {
+ hideLoader();
+ });
+}
+
+export default {
+ fetchCheckStatus,
+ saveEvaluation,
+ nextPrapare,
+ peviousPrapare,
+ nextCheckDoc,
+ nextCheckDoc2,
+};
diff --git a/src/modules/06_evaluate/views/EvaluateMain.vue b/src/modules/06_evaluate/views/EvaluateMain.vue
index 9dcbec3..4ac14c1 100644
--- a/src/modules/06_evaluate/views/EvaluateMain.vue
+++ b/src/modules/06_evaluate/views/EvaluateMain.vue
@@ -57,9 +57,11 @@ onMounted(async () => {});
-
+
-
+
+