diff --git a/src/api/09_leave/api.leave.ts b/src/api/09_leave/api.leave.ts index d0229b204..ffd727de9 100644 --- a/src/api/09_leave/api.leave.ts +++ b/src/api/09_leave/api.leave.ts @@ -25,6 +25,7 @@ export default { specialTime: () => `${leave}/admin/edit`, specialTimeApprove: (id: string) => `${leave}/admin/edit/approve/${id}`, specialTimeReject: (id: string) => `${leave}/admin/edit/reject/${id}`, + specialTimeApproveLists: `${leave}/admin/edit/approve-list`, /** รายการลา*/ leaveType: () => `${leave}/type`, @@ -63,4 +64,5 @@ export default { `${leave}/report/download/time-records/${type}`, leaveTask: `${leave}/admin/leave-task/process`, + leavePendingJobs: `${leave}/pending-jobs/`, }; diff --git a/src/api/recruiting/api.period-exam.ts b/src/api/recruiting/api.period-exam.ts index bf777e193..470303286 100644 --- a/src/api/recruiting/api.period-exam.ts +++ b/src/api/recruiting/api.period-exam.ts @@ -98,6 +98,9 @@ export default { `${env.API_URI}/placement/candidate/pdf/${candidateId}`, downloadCandidateExam: (id: string) => - `${periodExam}download/candidate-exam/${id}`, + `${exam_report}candidate/candidate-new/${id}`, downloadPassExam: (id: string) => `${periodExam}download/pass-exam/${id}`, + + downloadCandidatePassExam: (id: string) => + `${exam_report}candidate/pass-new/${id}`, }; diff --git a/src/modules/02_organization/components/DialogFormAgency.vue b/src/modules/02_organization/components/DialogFormAgency.vue index 32873fc17..72b3d228c 100644 --- a/src/modules/02_organization/components/DialogFormAgency.vue +++ b/src/modules/02_organization/components/DialogFormAgency.vue @@ -89,6 +89,11 @@ const formData = reactive({ DIVISION_CODE: "", SECTION_CODE: "", JOB_CODE: "", + ROOT_CODE: "", + CHILD1_CODE: "", + CHILD2_CODE: "", + CHILD3_CODE: "", + CHILD4_CODE: "", }); /** @@ -160,6 +165,11 @@ function onSubmit() { DIVISION_CODE: formData.DIVISION_CODE, SECTION_CODE: formData.SECTION_CODE, JOB_CODE: formData.JOB_CODE, + ROOT_CODE: formData.ROOT_CODE, + CHILD1_CODE: formData.CHILD1_CODE, + CHILD2_CODE: formData.CHILD2_CODE, + CHILD3_CODE: formData.CHILD3_CODE, + CHILD4_CODE: formData.CHILD4_CODE, }; // เพิ่มข้อมูล @@ -189,18 +199,20 @@ function onSubmit() { body ) .then(async () => { - await props.fetchDataTree(store.draftId); - await props.edit?.( - props.dataNode?.orgTreeId, - type, - body, - props.dataNode?.orgRootCode - ); - await props.fetchDataTable( - props?.dataNode?.orgTreeId, - props?.dataNode?.orgLevel, - false - ); + await Promise.all([ + await props.fetchDataTree(store.draftId), + await props.edit?.( + props.dataNode?.orgTreeId, + type, + body, + props.dataNode?.orgRootCode + ), + await props.fetchDataTable( + props?.dataNode?.orgTreeId, + props?.dataNode?.orgLevel, + false + ), + ]); await success($q, "บันทึกข้อมูลสำเร็จ"); closeClear(); }) @@ -231,6 +243,11 @@ function closeClear() { formData.isCommission = false; formData.isInformation = false; formData.misId = ""; + formData.ROOT_CODE = ""; + formData.CHILD1_CODE = ""; + formData.CHILD2_CODE = ""; + formData.CHILD3_CODE = ""; + formData.CHILD4_CODE = ""; formData.DEPARTMENT_CODE = ""; formData.DIVISION_CODE = ""; formData.SECTION_CODE = ""; @@ -456,6 +473,7 @@ watch( else { props.dataNode?.orgLevel === 1 && checkOfficer(); if (props.dataNode) { + console.log(props.dataNode); formData.orgName = props.dataNode.orgTreeName; formData.orgShortName = props.dataNode.orgTreeShortName; formData.orgCode = props.dataNode.orgTreeCode; @@ -474,6 +492,11 @@ watch( formData.DIVISION_CODE = props.dataNode.DIVISION_CODE; formData.SECTION_CODE = props.dataNode.SECTION_CODE; formData.JOB_CODE = props.dataNode.JOB_CODE; + formData.ROOT_CODE = props.dataNode.ROOT_CODE; + formData.CHILD1_CODE = props.dataNode.CHILD1_CODE; + formData.CHILD2_CODE = props.dataNode.CHILD2_CODE; + formData.CHILD3_CODE = props.dataNode.CHILD3_CODE; + formData.CHILD4_CODE = props.dataNode.CHILD4_CODE; orgLevelOption.value = props.dataNode.orgTreeRank === "DEPARTMENT" ? orgLevelOptionMain.value @@ -730,6 +753,66 @@ watch( +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
{ messageError($q, err); @@ -208,6 +218,41 @@ watch(
+
+
ROOT CODE
+
+

{{ formData.rootCode }}

+
+
+ +
+
CHILD1 CODE
+
+

{{ formData.child1Code }}

+
+
+ +
+
CHILD2 CODE
+
+

{{ formData.child2Code }}

+
+
+ +
+
CHILD3 CODE
+
+

{{ formData.child3Code }}

+
+
+ +
+
CHILD4 CODE
+
+

{{ formData.child4Code }}

+
+
+
หน้าที่ความรับผิดชอบ
diff --git a/src/modules/02_organization/interface/index/Main.ts b/src/modules/02_organization/interface/index/Main.ts index 8550b47e9..0103568c2 100644 --- a/src/modules/02_organization/interface/index/Main.ts +++ b/src/modules/02_organization/interface/index/Main.ts @@ -44,6 +44,11 @@ interface FormDataAgency { DIVISION_CODE: string; SECTION_CODE: string; JOB_CODE: string; + ROOT_CODE: string; + CHILD1_CODE: string; + CHILD2_CODE: string; + CHILD3_CODE: string; + CHILD4_CODE: string; } interface FormDataPosition { diff --git a/src/modules/03_recruiting/components/Table.vue b/src/modules/03_recruiting/components/Table.vue index b5f2877f6..6ff82cda4 100644 --- a/src/modules/03_recruiting/components/Table.vue +++ b/src/modules/03_recruiting/components/Table.vue @@ -56,6 +56,7 @@ const optionsStatus = ref([ { label: "ขาดสอบ", value: "missed_exam" }, { label: "ผ่าน", value: "pass" }, { label: "ไม่ผ่าน", value: "notpass" }, + { label: "อื่น ๆ", value: "other" }, ]); const emit = defineEmits([ diff --git a/src/modules/03_recruiting/components/TableCandidate.vue b/src/modules/03_recruiting/components/TableCandidate.vue index f5b1b2b21..d725a3bc1 100644 --- a/src/modules/03_recruiting/components/TableCandidate.vue +++ b/src/modules/03_recruiting/components/TableCandidate.vue @@ -363,37 +363,59 @@ async function downloadFileDashboard() { } async function clickPassExam() { - showLoader(); - await http - .get(config.API.downloadPassExam(examId.value)) - .then(async (res) => { - const data = res.data.result; - data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`; - await genReport(data, data.reportName, "pdf"); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - hideLoader(); - }); + try { + showLoader(); + const res = await http.get( + config.API.downloadCandidatePassExam(examId.value), + { + headers: { + "Content-Type": "application/pdf", + Accept: "application/pdf", + }, + responseType: "blob", + } + ); + const url = window.URL.createObjectURL(new Blob([res.data])); + const link = document.createElement("a"); + link.href = url; + link.setAttribute( + "download", + `Candidate_Dashboard_${dateToISO(new Date())}` + ".pdf" + ); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + window.URL.revokeObjectURL(url); + } catch (error) { + messageError($q, error); + } finally { + hideLoader(); + } } async function clickCandidateList() { - showLoader(); - await http - .get(config.API.downloadCandidateExam(examId.value)) - .then(async (res) => { - const data = res.data.result; - data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`; - await genReport(data, data.reportName, "pdf"); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - hideLoader(); + try { + showLoader(); + const res = await http.get(config.API.downloadCandidateExam(examId.value), { + headers: { + "Content-Type": "application/pdf", + Accept: "application/pdf", + }, + responseType: "blob", }); + const url = window.URL.createObjectURL(new Blob([res.data])); + const link = document.createElement("a"); + link.href = url; + link.setAttribute("download", "รายชื่อผู้มีสิทธิ์สอบ" + ".pdf"); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + window.URL.revokeObjectURL(url); + } catch (error) { + messageError($q, error); + } finally { + hideLoader(); + } } async function onCheckShowExaminfo() { @@ -549,8 +571,20 @@ watch(
- - ดาวน์โหลดไฟล์ + + + {{ + attrs.rows.length !== 0 + ? "ดาวน์โหลดไฟล์" + : "ไม่มีข้อมูลผู้สอบคัดเลือก" + }}
diff --git a/src/modules/05_placement/components/PersonalList/DialogDetail.vue b/src/modules/05_placement/components/PersonalList/DialogDetail.vue index 13aa09aef..dff09ffdd 100644 --- a/src/modules/05_placement/components/PersonalList/DialogDetail.vue +++ b/src/modules/05_placement/components/PersonalList/DialogDetail.vue @@ -525,14 +525,14 @@ watch(props, () => {
ผลการสอบ
ลำดับที่สอบได้
-
จำนวนครั้งที่สมัครสอบ
+
{{ personalForm?.pass }}
{{ personalForm?.examNumber }}
-
{{ personalForm?.examRound }}
+
diff --git a/src/modules/05_placement/components/probation/DialogOrder.vue b/src/modules/05_placement/components/probation/DialogOrder.vue index 2646905f0..f4a5cb2a4 100644 --- a/src/modules/05_placement/components/probation/DialogOrder.vue +++ b/src/modules/05_placement/components/probation/DialogOrder.vue @@ -264,7 +264,7 @@ watch( @@ -352,7 +352,7 @@ watch( keep-color color="primary" dense - :disable="commandType" + :disable="!commandType ? true : false" v-model="props.selected" /> diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue index 6017dcaa3..07e8a2409 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue @@ -97,6 +97,8 @@ const develop_result_option = ref([ const isCheckFile = ref(false); +const isSelectionPartfour = ref(false); + // score const score1 = computed(() => { if ( @@ -212,20 +214,21 @@ const percent_sum: any = computed(() => { }); const score4 = computed(() => { return ( - (Number(orientation.value) + - Number(self_learning.value) + - Number(training_seminar.value) + - Number(other_training.value)) / - 4 + Number(orientation.value) + + Number(self_learning.value) + + Number(training_seminar.value) + + (isSelectionPartfour.value ? Number(other_training.value) : 0) ); }); const score5 = computed(() => { - const total = + const rawTotal = (Number(orientation_percent.value) + Number(self_learning_percent.value) + Number(training_seminar_percent.value) + Number(other_training_percent.value)) / - 4; + (isSelectionPartfour.value ? 4 : 3); + + const total = Math.trunc(rawTotal); develop_result.value = total > 60 ? 1 : 0; @@ -1133,10 +1136,20 @@ onMounted(async () => {
+ 4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
{
([ // footer const dateAutherise = ref(null); +const isSelectionPartfour = ref(false); + onMounted(() => { fecthAssign(assignId.value); }); @@ -239,20 +241,21 @@ const percent_sum: any = computed(() => { }); const score4 = computed(() => { return ( - (Number(orientation.value) + - Number(self_learning.value) + - Number(training_seminar.value) + - Number(other_training.value)) / - 4 + Number(orientation.value) + + Number(self_learning.value) + + Number(training_seminar.value) + + (isSelectionPartfour.value ? Number(other_training.value) : 0) ); }); const score5 = computed(() => { - const total = + const rawTotal = (Number(orientation_percent.value) + Number(self_learning_percent.value) + Number(training_seminar_percent.value) + Number(other_training_percent.value)) / - 4; + (isSelectionPartfour.value ? 4 : 3); + + const total = Math.trunc(rawTotal); develop_result.value = total > 60 ? 1 : 0; @@ -1214,10 +1217,20 @@ watch(lengthdiscipline_level, (newLength) => {
+ 4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
{ outlined dense type="number" + :disable="!isSelectionPartfour" v-model="other_training_percent" :rules="[(val:number) => val <= 100 || 'ร้อยละต้องไม่เกิน 100']" hide-bottom-space diff --git a/src/modules/09_leave/components/01_RoundTime/DialogForm.vue b/src/modules/09_leave/components/01_RoundTime/DialogForm.vue index c6883cb11..8eaf9c6b5 100644 --- a/src/modules/09_leave/components/01_RoundTime/DialogForm.vue +++ b/src/modules/09_leave/components/01_RoundTime/DialogForm.vue @@ -212,7 +212,7 @@ watch( :close="close" /> - +
@@ -362,6 +362,7 @@ watch(
+
@@ -513,6 +514,7 @@ watch(
+ + /> +
@@ -541,6 +544,7 @@ watch(
+
@@ -559,6 +563,7 @@ watch(
+
diff --git a/src/modules/09_leave/components/02_WorkList/Tab4_Pending.vue b/src/modules/09_leave/components/02_WorkList/Tab4_Pending.vue new file mode 100644 index 000000000..60637c6b6 --- /dev/null +++ b/src/modules/09_leave/components/02_WorkList/Tab4_Pending.vue @@ -0,0 +1,263 @@ + + + + + diff --git a/src/modules/09_leave/components/04_SpecialTime/DialogApprove.vue b/src/modules/09_leave/components/04_SpecialTime/DialogApprove.vue index 2eb7b2cd0..af47e1dcf 100644 --- a/src/modules/09_leave/components/04_SpecialTime/DialogApprove.vue +++ b/src/modules/09_leave/components/04_SpecialTime/DialogApprove.vue @@ -96,8 +96,8 @@ watch( formData.checkOut = ""; formData.note = ""; } else if (props.editCheck === "PENDING") { - if (props.detailData) { - if (props.detailData.checkInEdit) { + if (props.detailData) { + if (props.detailData.checkInEdit && props.detailData.checkOutEdit) { formData.checkIn = props.detailData.startTimeMorning; formData.checkOut = props.detailData.endTimeAfternoon; } else if ( diff --git a/src/modules/09_leave/components/04_SpecialTime/DialogMultipleApprove.vue b/src/modules/09_leave/components/04_SpecialTime/DialogMultipleApprove.vue new file mode 100644 index 000000000..0caf9f339 --- /dev/null +++ b/src/modules/09_leave/components/04_SpecialTime/DialogMultipleApprove.vue @@ -0,0 +1,344 @@ + + + + + diff --git a/src/modules/09_leave/components/05_Leave/DetailLeavePage.vue b/src/modules/09_leave/components/05_Leave/DetailLeavePage.vue index d8192d5ce..b4be00203 100644 --- a/src/modules/09_leave/components/05_Leave/DetailLeavePage.vue +++ b/src/modules/09_leave/components/05_Leave/DetailLeavePage.vue @@ -260,6 +260,14 @@ const columns = ref([ style: "font-size: 14px", }, ]); + +const isSysCancel = computed(() => { + return ( + formData.reasonOligarch === "อนุมัติการขอยกเลิกการลา โดยระบบ" && + statusCheck.value === "DELETE" + ); +}); + /** * ฟังก์ชั่นเรียกรายละเอียดของข้อมูล * @param paramsId รับ ID จาก paramID @@ -1036,7 +1044,12 @@ onMounted(async () => { props.row.comment == '' " > +
+ ยังไม่ได้แสดงความคิดเห็น +
+
-
+
+ + ผู้มีอำนาจยังไม่ได้พิจารณา ใบลานี้ถูกยกเลิกแล้ว + +
+ +
diff --git a/src/modules/09_leave/components/05_Leave/DetailLeaveReject.vue b/src/modules/09_leave/components/05_Leave/DetailLeaveReject.vue index 6653eed35..51b2f5a29 100644 --- a/src/modules/09_leave/components/05_Leave/DetailLeaveReject.vue +++ b/src/modules/09_leave/components/05_Leave/DetailLeaveReject.vue @@ -1,5 +1,5 @@