diff --git a/public/File/สรรหาสอบแข่งขัน_จำนวนผู้สอบทั้งหมด.xlsx b/public/File/ข้อมูลผู้สมัครสอบ.xlsx similarity index 100% rename from public/File/สรรหาสอบแข่งขัน_จำนวนผู้สอบทั้งหมด.xlsx rename to public/File/ข้อมูลผู้สมัครสอบ.xlsx diff --git a/public/File/บัญชีรวมคะแนนทั้งหมด (เรียงตามเลขประจำตัวสอบ).xlsx b/public/File/บัญชีรวมคะแนนทั้งหมด (เรียงตามเลขประจำตัวสอบ).xlsx new file mode 100644 index 000000000..583c3aeec Binary files /dev/null and b/public/File/บัญชีรวมคะแนนทั้งหมด (เรียงตามเลขประจำตัวสอบ).xlsx differ diff --git a/public/File/ผลการสอบแข่งขันฯ (บัญชีรายชื่อ).xlsx b/public/File/ผลการสอบแข่งขันฯ (บัญชีรายชื่อ).xlsx new file mode 100644 index 000000000..3e012c58c Binary files /dev/null and b/public/File/ผลการสอบแข่งขันฯ (บัญชีรายชื่อ).xlsx differ diff --git a/src/api/recruiting/api.recruit.ts b/src/api/recruiting/api.recruit.ts index 38d004a97..6d2c2fc6f 100644 --- a/src/api/recruiting/api.recruit.ts +++ b/src/api/recruiting/api.recruit.ts @@ -21,6 +21,7 @@ export default { editPeriod: (id: string) => `${recruit}period/${id}`, getPeriodById: (id: string) => `${recruit}period/${id}`, uploadCandidates: (id: string) => `${recruit}candidate/${id}`, + uploadResult: (id: string) => `${recruit}result/${id}`, getImportHistory: (id: string) => `${recruit}history/${id}`, //upload diff --git a/src/modules/03_recruiting/views/01_compete/Detail.vue b/src/modules/03_recruiting/views/01_compete/Detail.vue index 9067e995a..956d403e3 100644 --- a/src/modules/03_recruiting/views/01_compete/Detail.vue +++ b/src/modules/03_recruiting/views/01_compete/Detail.vue @@ -39,6 +39,7 @@ const visibleColumns = ref([ "examID", "profileID", "fullName", + "hddPosition", "dateOfBirth", "gender", "position_name", @@ -88,6 +89,15 @@ const columns = ref([ headerStyle: "font-size: 14px; min-width: 250px", style: "font-size: 14px; ", }, + { + name: "hddPosition", + align: "left", + label: "บัญชีสอบ", + sortable: true, + field: "hddPosition", + headerStyle: "font-size: 14px; min-width: 250px", + style: "font-size: 14px; ", + }, { name: "dateOfBirth", align: "left", diff --git a/src/modules/03_recruiting/views/01_compete/Period.vue b/src/modules/03_recruiting/views/01_compete/Period.vue index d117f368c..ffe72ff79 100644 --- a/src/modules/03_recruiting/views/01_compete/Period.vue +++ b/src/modules/03_recruiting/views/01_compete/Period.vue @@ -42,9 +42,11 @@ const order = ref(1); const files = ref(null); const files_score = ref(null); const files_candidate = ref(null); +const files_result = ref(null); const modalAdd = ref(false); const modalScore = ref(false); const modalCandidate = ref(false); +const modalResult = ref(false); const selected_row_id = ref(""); const rowsHistory = ref([]); //select data history const tittleHistory = ref("ประวัติการนำเข้าข้อมูล"); // @@ -58,6 +60,7 @@ const filter = ref(""); //search data table const textTittle = ref(""); const textTittleScore = ref(""); const textTittleCandidate = ref(""); +const textTittleResult = ref(""); const rows = ref([]); const rowsData = ref([]); const initialPagination = ref({ @@ -71,6 +74,7 @@ const visibleColumns = ref([ "year", "examCount", "scoreCount", + "result", ]); const columns = ref([ @@ -113,7 +117,7 @@ const columns = ref([ }, { name: "examCount", - label: "จำนวนผู้สอบทั้งหมด", + label: "ข้อมูลผู้สมัครสอบ", align: "right", field: "examCount", sortable: true, @@ -122,13 +126,22 @@ const columns = ref([ }, { name: "scoreCount", - label: "จำนวนที่บันทึกผลสอบ", + label: "บัญชีรวมคะแนน", align: "right", field: "scoreCount", sortable: true, headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "result", + label: "ผลการสอบ", + align: "right", + field: "result", + sortable: true, + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, ]); const columnsHistory = ref([ @@ -257,13 +270,23 @@ function clickDetail(id: string) { router.push(`/compete/import/${id}`); } +/** + * นำเข้าไฟล์ผู้สมัครสอบอีกครั้ง + * @param id รอบสอบเเข่งขัน + */ +async function clickUpload(id: string) { + modalCandidate.value = true; + textTittleCandidate.value = "นำเข้าผู้สมัครสอบแข่งขัน"; + selected_row_id.value = id; +} + /** * นำเข้าไฟล์ผลคะแนนสอบอีกครั้ง * @param id รอบสอบเเข่งขัน */ async function clickEdit(id: string) { modalScore.value = true; - textTittleScore.value = "นำเข้าผลคะแนนสอบแข่งขัน"; + textTittleScore.value = "นำเข้าบัญชีรวมคะแนนทั้งหมด (เรียงตามเลขประจำตัวสอบ)"; selected_row_id.value = id; } @@ -271,9 +294,9 @@ async function clickEdit(id: string) { * นำเข้าไฟล์ผู้สมัครสอบอีกครั้ง * @param id รอบสอบเเข่งขัน */ -async function clickUpload(id: string) { - modalCandidate.value = true; - textTittleCandidate.value = "นำเข้าผู้สมัครสอบแข่งขัน"; +async function clickResult(id: string) { + modalResult.value = true; + textTittleResult.value = "นำเข้าไฟล์ผลการสอบแข่งขันฯ (บัญชีรายชื่อ)"; selected_row_id.value = id; } @@ -366,6 +389,11 @@ async function clickCloseCandidate() { modalCandidate.value = false; files_candidate.value = null; } +/** ปิด dialog เลือกไฟล์ผลการสอบแข่งขันฯ */ +async function clickCloseResult() { + modalResult.value = false; + files_result.value = null; +} /** บันทึกข้อมูล เลือกไฟล์ผู้สมัครสอบแข่งขัน */ async function checkSaveCandidate() { @@ -411,6 +439,28 @@ async function checkSaveScore() { }); } +/** บันทึกข้อมูล เลือกไฟล์ผลการสอบแข่งขันฯ */ +async function checkSaveResult() { + const fd = new FormData(); + fd.append("attachment", files_result.value[0]); + showLoader(); + await http + .post(config.API.uploadResult(selected_row_id.value), fd) + .then((res) => { + success($q, "นำเข้าข้อมูลผลการสอบแข่งขันฯ (บัญชีรายชื่อ)"); + modalResult.value = false; + files_result.value = null; + selected_row_id.value = ""; + fetchData(); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); +} + /** save data */ async function checkSave() { const fd = new FormData(); @@ -539,7 +589,9 @@ onMounted(async () => { name="mdi-history" /> - แสดงประวัติการทำงาน + แสดงประวัติการนำเข้าข้อมูล @@ -555,52 +607,6 @@ onMounted(async () => {
{{ col.value + 543 }}
-
- - - - นำเข้าไฟล์ผลคะแนนสอบ - -
- {{ col.value }} - - นำเข้าไฟล์ผลคะแนนสอบอีกครั้ง - - - - ดาวน์โหลดรายชื่อผู้สอบแข่งขันได้ - -
-
{
+
+ + + + นำเข้าไฟล์บัญชีรวมคะแนนทั้งหมด + (เรียงตามเลขประจำตัวสอบ) + +
+ {{ props.row.score.scoreCount }} + + + + นำเข้าไฟล์บัญชีรวมคะแนนทั้งหมด (เรียงตามเลขประจำตัวสอบ) + อีกครั้ง + +
+
+ +
+ + + นำเข้าไฟล์ผลการสอบแข่งขันฯ (บัญชีรายชื่อ) + +
+ {{ props.row.score.resultCount }} + + นำเข้าไฟล์ผลการสอบแข่งขันฯ (บัญชีรายชื่อ) + อีกครั้ง + + + + ดาวน์โหลดรายชื่อผู้สอบแข่งขันได้ + +
+
{{ col.value }}
@@ -768,57 +867,13 @@ onMounted(async () => { - - - - - - -
-
- - - -
-
-
- - - - - บันทึก - - -
-
-
- @@ -855,6 +910,94 @@ onMounted(async () => { + + + + + + + +
+
+ + + +
+
+
+ + + + + บันทึก + + +
+
+
+ + + + + + + +
+
+ + + +
+
+
+ + + + + บันทึก + + +
+
+
diff --git a/src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue b/src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue index f455d9a65..84176e4fd 100644 --- a/src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue +++ b/src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue @@ -513,7 +513,7 @@ onMounted(async () => { name="mdi-history" /> - แสดงประวัติการทำงาน + แสดงประวัติการนำเข้าข้อมูล