From 32ec4bdcd90cfcb0df72a3269b45baeea33f98c4 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Wed, 4 Oct 2023 09:42:11 +0700 Subject: [PATCH 1/8] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20ui?= =?UTF-8?q?=20=E0=B8=AA=E0=B8=A1=E0=B8=B1=E0=B8=84=E0=B8=A3=E0=B8=AA?= =?UTF-8?q?=E0=B8=AD=E0=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../03_recruiting/components/Career.vue | 100 +++++++++++++----- .../03_recruiting/components/Information.vue | 73 +++++++------ 2 files changed, 114 insertions(+), 59 deletions(-) diff --git a/src/modules/03_recruiting/components/Career.vue b/src/modules/03_recruiting/components/Career.vue index 5b0cc515f..0f4338186 100644 --- a/src/modules/03_recruiting/components/Career.vue +++ b/src/modules/03_recruiting/components/Career.vue @@ -79,6 +79,22 @@ />
+ +
+
(""); + +const type = ref(); +const opType = ref([ + "ลูกจ้างประจำ", + "ลูกจ้างชั่วคราว", + "ผู้ปฏิบัติงานอื่นในกรุงเทพมหานคร", +]); + const position = ref(); const group = ref(); const pile = ref(); @@ -302,9 +326,10 @@ const visibleColumns = ref([]); examData.career.columns.length == 0 ? (visibleColumns.value = [ "position", - "group", - "pile", - "org", + // "group", + // "pile", + // "org", + "type", "startDate", "endDate", "rangeDate", @@ -324,38 +349,49 @@ const columns = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "group", + name: "type", align: "left", - label: "กลุ่ม/ฝ่าย", + label: "ประเภท", sortable: true, - field: "group", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "pile", - align: "left", - label: "กอง", - sortable: true, - field: "pile", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "org", - align: "left", - label: "สังกัด", - sortable: true, - field: "org", + field: "type", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + // { + // name: "group", + // align: "left", + // label: "กลุ่ม/ฝ่าย", + // sortable: true, + // field: "group", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // sort: (a: string, b: string) => + // a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + // }, + // { + // name: "pile", + // align: "left", + // label: "กอง", + // sortable: true, + // field: "pile", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // sort: (a: string, b: string) => + // a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + // }, + // { + // name: "org", + // align: "left", + // label: "สังกัด", + // sortable: true, + // field: "org", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // sort: (a: string, b: string) => + // a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + // }, { name: "startDate", align: "left", @@ -479,6 +515,7 @@ const clickPrevious = async () => { startDate.value = row.startDate; endDate.value = row.endDate; rangeDate.value = row.rangeDate; + type.value = row.type; id.value = row.id; await checkRowPage(); }; @@ -496,6 +533,7 @@ const clickNext = () => { startDate.value = row.startDate; endDate.value = row.endDate; rangeDate.value = row.rangeDate; + type.value = row.type; id.value = row.id; checkRowPage(); }; @@ -591,6 +629,7 @@ const saveData = async () => { durationStart: dateToISO(new Date(startDate.value)), durationEnd: dateToISO(new Date(endDate.value)), rangeDate: rangeDate.value, + type: type.value, }) .then(() => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -618,6 +657,7 @@ const editData = async () => { durationStart: dateToISO(new Date(startDate.value)), durationEnd: dateToISO(new Date(endDate.value)), rangeDate: rangeDate.value, + type: type.value, }) .then(() => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -672,6 +712,7 @@ const selectData = (props: any) => { startDate.value = props.row.startDate; endDate.value = props.row.endDate; rangeDate.value = props.row.rangeDate; + type.value = props.row.type; id.value = props.row.id; next.value = false; previous.value = false; @@ -690,6 +731,7 @@ const addRow = () => { startDate.value = new Date(); endDate.value = new Date(); rangeDate.value = null; + type.value = null; }; /** diff --git a/src/modules/03_recruiting/components/Information.vue b/src/modules/03_recruiting/components/Information.vue index ffdb1d283..23526e63c 100644 --- a/src/modules/03_recruiting/components/Information.vue +++ b/src/modules/03_recruiting/components/Information.vue @@ -16,7 +16,31 @@
-
+
+ +
+
- --> +
@@ -185,30 +221,6 @@ :label="`${'เบอร์โทร'}`" />
-
- -
@@ -180,6 +185,7 @@ const files = ref([]); const filterRef = ref(null); const examId = ref(route.params.examId.toString()); const candidateId = ref([]); +const selected = ref([]); const { messageError, showLoader, hideLoader } = mixin; const props = defineProps({ inputfilter: String, @@ -191,6 +197,10 @@ const props = defineProps({ type: Array, defualt: [], }, + selected: { + type: Array, + defualt: [], + }, boss: { type: Boolean, defualt: false, @@ -406,10 +416,14 @@ const downloadFileDetail = async () => { }; const checkCandidates = async () => { + var _selected = []; + selected.value.map((r: any) => { + _selected.push(r.id.toString()); + }); showLoader(); await http .post(config.API.candidateCheckRegisters, { - candidateId: candidateId.value, + candidateId: _selected, }) .then((res) => { success($q, "ตรวจสอบข้อมูลสำเร็จ"); @@ -466,18 +480,18 @@ const candidateCheckProfileDialog = async () => { "mdi-email-check-outline", "ยืนยัน", "public", - candidateCheckProfile, + checkCandidates, undefined ); }; -const candidateCheckProfile = async () => { - const filter = attrs.value.rows.filter((r: any) => r.check == true); - filter.map((r: any) => { - candidateId.value.push(r.id.toString()); - }); - await checkCandidates(); -}; +// const candidateCheckProfile = async () => { +// const filter = attrs.value.rows.filter((r: any) => r.check == true); +// filter.map((r: any) => { +// candidateId.value.push(r.id.toString()); +// }); +// await checkCandidates(); +// }; const resetFilter = () => { // reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา diff --git a/src/modules/03_recruiting/views/02_qualify/PeriodAdd.vue b/src/modules/03_recruiting/views/02_qualify/PeriodAdd.vue index 1f9a54df3..5fd1d5bd9 100644 --- a/src/modules/03_recruiting/views/02_qualify/PeriodAdd.vue +++ b/src/modules/03_recruiting/views/02_qualify/PeriodAdd.vue @@ -372,6 +372,21 @@ >