From 35a5817db366e09119a2e20cd554a8eabd61153b Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 20 Dec 2024 10:29:07 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20code=20?= =?UTF-8?q?=E0=B8=9A=E0=B8=A3=E0=B8=A3=E0=B8=88=E0=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.placement.ts | 2 +- src/components/Dialogs/DialogOrgSelect.vue | 15 +- .../Dialogs/DialogOrgSelectEmployee.vue | 736 +++++++++--------- .../Dialogs/DialogOrgSelectOneStep.vue | 9 +- .../05_placement/interface/index/Main.ts | 12 + .../05_placement/interface/request/Main.ts | 19 +- .../interface/response/Receive.ts | 4 + src/modules/05_placement/store.ts | 9 +- src/modules/05_placement/views/01_Main.vue | 124 +-- .../05_placement/views/02_transferMain.vue | 61 +- .../05_placement/views/03_receiveMain.vue | 67 +- .../views/04_helpGovernmentMain.vue | 52 +- .../05_placement/views/05_repatriateMain.vue | 38 +- .../views/06_appointPromoteMain.vue | 31 +- .../views/07_appointEmployeeMain.vue | 57 +- .../05_placement/views/08_otherMain.vue | 23 +- 16 files changed, 559 insertions(+), 700 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 3fee87d90..e4f8372b7 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -3,7 +3,7 @@ const placement = `${env.API_PLACEMENT_URI}/placement`; const disciplineReportList = `${env.API_URI}/discipline/complaint/report`; const orgTree = `${env.API_URI_ORG_TREE}`; const order = `${env.API_PLACEMENT_URI}`; -const receive = `${env.API_PLACEMENT_URI}/placement/Receive`; +const receive = `${env.API_PLACEMENT_URI}/placement/receive`; const transfer = `${placement}/transfer`; const placemenHelpGov = `${placement}/officer`; const placemenRepatriation = `${placement}/repatriation`; diff --git a/src/components/Dialogs/DialogOrgSelect.vue b/src/components/Dialogs/DialogOrgSelect.vue index b8362ad85..90925d8ca 100644 --- a/src/components/Dialogs/DialogOrgSelect.vue +++ b/src/components/Dialogs/DialogOrgSelect.vue @@ -530,7 +530,7 @@ onMounted(async () => { - +
{ - + + {
-
+
{
-
+
{ @keydown.enter.prevent="onSearch" >
diff --git a/src/components/Dialogs/DialogOrgSelectEmployee.vue b/src/components/Dialogs/DialogOrgSelectEmployee.vue index c551475ce..ca0d96a82 100644 --- a/src/components/Dialogs/DialogOrgSelectEmployee.vue +++ b/src/components/Dialogs/DialogOrgSelectEmployee.vue @@ -40,7 +40,7 @@ const { hideLoader, date2Thai, dialogMessageNotify, - onSearchDataTable + onSearchDataTable, } = mixin; const route = useRoute(); @@ -496,7 +496,6 @@ function onSearch() { ); } - onMounted(() => { fetchTree(); }); @@ -504,379 +503,380 @@ onMounted(() => { + + - - บันทึกข้อมูล - + + +
+ +
+ +
+ เลือกตำแหน่งเลขที่ +
+
+
+ +
+ + แสดงเฉพาะตำแหน่งว่าง + +
+ + +
+ + แสดงตำแหน่งทั้งหมดภายใต้หน่วยงาน/ส่วนราชการที่เลือก + +
+ + + +
+
+ +
+
+
+ + + + +
+
+
+ + +
+ +
+ เลือกตำแหน่ง +
+
+ + +
+ + + + + + + + + + + + +
+
+
+
+
+
+
+
+ +
+ + + + + บันทึกข้อมูล + diff --git a/src/components/Dialogs/DialogOrgSelectOneStep.vue b/src/components/Dialogs/DialogOrgSelectOneStep.vue index 04c55f376..08deac9d8 100644 --- a/src/components/Dialogs/DialogOrgSelectOneStep.vue +++ b/src/components/Dialogs/DialogOrgSelectOneStep.vue @@ -252,7 +252,7 @@ onMounted(async () => { - +
{ - + +
diff --git a/src/modules/05_placement/interface/index/Main.ts b/src/modules/05_placement/interface/index/Main.ts index 8bb806ded..1644f460c 100644 --- a/src/modules/05_placement/interface/index/Main.ts +++ b/src/modules/05_placement/interface/index/Main.ts @@ -346,6 +346,18 @@ interface PersonData { statusName: string; organizationName: string; id: string; + posTypeOldId: string; + posLevelOldId: string; + positionOld: string; + status: string; + educationOld: string; + organizationPositionOld: string; + positionTypeOld: string; + positionLevelOld: string; + positionNumberOld: number; + positionDate: string; + posTypeNameOld: string; + posLevelNameOld: string; } interface AppointTopic { diff --git a/src/modules/05_placement/interface/request/Main.ts b/src/modules/05_placement/interface/request/Main.ts index d341762f5..e59bf4781 100644 --- a/src/modules/05_placement/interface/request/Main.ts +++ b/src/modules/05_placement/interface/request/Main.ts @@ -131,6 +131,22 @@ interface MemBerType { actFullName: string; isDirector?: boolean; } + +interface FormDataAppoint { + node: string; + nodeId: number; + orgRevisionId: string; + positionId: string; + posMasterNo: number; + positionName: string; + posTypeId: string; + posTypeName: string; + posLevelId: string; + posLevelName: string; + reportingDate: string; + posmasterId: string; + typeCommand: string; +} export type { FormPlacementMainData, FormOrderPlacementMainData, @@ -146,5 +162,6 @@ export type { AppointMainRows, FormAppointData, MemBerType, - PersonsAppointData + PersonsAppointData, + FormDataAppoint, }; diff --git a/src/modules/05_placement/interface/response/Receive.ts b/src/modules/05_placement/interface/response/Receive.ts index a5decffa9..421b39312 100644 --- a/src/modules/05_placement/interface/response/Receive.ts +++ b/src/modules/05_placement/interface/response/Receive.ts @@ -28,6 +28,10 @@ interface ResponseRow { positionTypeId: string; positionLevelId: string; amountOld: number; + posTypeOldId: string; + posLevelOldId: string; + positionOld: string; + posMasterNo: number; } interface ResponseData { diff --git a/src/modules/05_placement/store.ts b/src/modules/05_placement/store.ts index bb3e08d5a..1d6242742 100644 --- a/src/modules/05_placement/store.ts +++ b/src/modules/05_placement/store.ts @@ -89,8 +89,8 @@ export const useProfileDataStore = defineStore("profilePlacenent", () => { export const usePlacementDataStore = defineStore("placement", () => { const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง const tabsMain = ref("probation"); - const isOfficer = ref(null); - const isStaff = ref(null); + const isOfficer = ref(null); + const isStaff = ref(null); const { hideLoader } = mixin; interface placement { mappingPosition: { columns: String[] }; @@ -113,8 +113,9 @@ export const usePlacementDataStore = defineStore("placement", () => { let DataMainUpdate = ref([]); // ข้อมูลเปลี่ยนแปลง const DataMainYearSet = (val: FormPlacementMainData[]) => (DataMainYear.value = val); - const DataMain = (val: FormPlacementMainData[]) => (DataMainOrig.value = val); - const DataUpdateMain = ( + const DataMain = async (val: FormPlacementMainData[]) => + (DataMainOrig.value = val); + const DataUpdateMain = async ( filter_1: number | string, filter_2: string | null, filter_3: boolean diff --git a/src/modules/05_placement/views/01_Main.vue b/src/modules/05_placement/views/01_Main.vue index 6dd1198ca..1280597fc 100644 --- a/src/modules/05_placement/views/01_Main.vue +++ b/src/modules/05_placement/views/01_Main.vue @@ -17,7 +17,8 @@ import config from "@/app.config"; const DataStore = usePlacementDataStore(); const $q = useQuasar(); const mixin = useCounterMixin(); -const { showLoader, hideLoader, messageError, date2Thai,onSearchDataTable } = mixin; +const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = + mixin; const searchYear = ref(); const yearOptions = reactive([{ id: 0, name: "ทั้งหมด" }]); @@ -31,10 +32,6 @@ const rowsData = ref([]); /** ค้นหาในตาราง */ const filterKeyword = ref(""); const filterRef = ref(null); -const resetFilter = () => { - filterKeyword.value = ""; - filterRef.value.focus(); -}; /**ครั้งที่สอบ */ const examTime = ref(""); @@ -59,19 +56,6 @@ const pagination = ref({ rowsPerPage: 10, }); -/** ส่วนเเสดงผล ตาราง */ -const visibleColumns = ref([ - "id", - "examRound", - "examOrder", - "examOrder", - "fiscalYear", - "numberOfCandidates", - "examTypeName", - "accountStartDate", - "accountExpirationDate", -]); - /**หัวตาราง */ const columns = ref([ { @@ -151,6 +135,17 @@ const columns = ref([ style: "font-size: 14px", }, ]); +const visibleColumns = ref([ + "id", + "examRound", + "examOrder", + "examOrder", + "fiscalYear", + "numberOfCandidates", + "examTypeName", + "accountStartDate", + "accountExpirationDate", +]); /** * ฟังชั่นดึงข้อมูรายการสอบแข่งขัน / คัดเลือกตามปี @@ -165,8 +160,7 @@ async function fetchPlacementData(val: number) { const data = await res.data.result; dataPlacement.value = data; DataStore.DataMainOrig = dataPlacement.value; - const listData = - DataStore.DataMainOrig.map((e: any) => ({ + const listData = DataStore.DataMainOrig.map((e: any) => ({ id: e.id, examRound: e.examRound, examOrder: e.examOrder, @@ -178,8 +172,8 @@ async function fetchPlacementData(val: number) { fiscalYear: e.fiscalYear, numberOfCandidates: e.numberOfCandidates, })); - rows.value = listData - rowsData.value = listData + rows.value = listData; + rowsData.value = listData; filterKeyword.value = ""; examTime.value = "ทั้งหมด"; examType.value = "ทั้งหมด"; @@ -199,9 +193,7 @@ async function fetchPlacementData(val: number) { }); } -/** - * ฟังชั่นดึงข้อมูล ปี ค.ส. - */ +/** ฟังชั่นดึงข้อมูล ปี ค.ส. */ async function fetchYearOptions() { showLoader(); await http @@ -243,9 +235,7 @@ function redirectToPage(examId?: number) { router.push(`/placement/personal-list/${examId}`); } -/** - * ฟิลเตอร์หาครั้งที่สอบ ตาม ปี - */ +/** ฟิลเตอร์หาครั้งที่สอบ ตาม ปี*/ async function examTimeFilter() { for (const data of dataPlacement.value) { const examOrder = data.examOrder; @@ -275,9 +265,7 @@ function examTypeFilter() { }); } -/** - * ฟังก์ชันค้นหาข้อมูล ายการสอบแข่งขัน / คัดเลือก - */ +/** ฟังก์ชันค้นหาข้อมูล ายการสอบแข่งขัน / คัดเลือก*/ async function searchFilterTable() { rows.value = []; if (examType.value !== undefined && examType.value !== null) { @@ -287,7 +275,7 @@ async function searchFilterTable() { expiredAccount.value ); const dataArr: any = []; - await DataStore.DataMainUpdate.map((e: any) => { + DataStore.DataMainUpdate.map((e: any) => { dataArr.push({ id: e.id, examRound: e.examRound, @@ -373,11 +361,6 @@ function filterFnYear(val: string, update: any) { } } -function paginationLabel(start: number, end: number, total: number) { - if (paging.value == true) return " " + start + "-" + end + " ใน " + total; - else return start + "-" + end + " ใน " + total; -} - function onSearch() { rows.value = onSearchDataTable( filterKeyword.value, @@ -386,9 +369,7 @@ function onSearch() { ); } -/** - * เรียกใช้ฟังชั่น เมื่อเริ่มหน้านี้ - */ +/** เรียกใช้ฟังชั่น เมื่อเริ่มหน้านี้*/ onMounted(async () => { await fetchYearOptions(); }); @@ -398,9 +379,10 @@ onMounted(async () => {
รายการสอบแข่งขัน/คัดเลือก
+
-
+
{ { @keydown.enter="onSearch" > { hide-selected fill-input :clearable="examType !== 'all' && examType !== 'ทั้งหมด'" - @clear="(examType = 'all'), searchFilterTable()" + @clear=" + (examTimeOP2 = examTimeOP), + (examType = 'ทั้งหมด'), + searchFilterTable() + " >