From 2a9c0d44d737d6b74146f49a16f9f805751cd5d6 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 29 May 2025 12:45:43 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=A2=E0=B8=81=E0=B8=88=E0=B8=B1?= =?UTF-8?q?=E0=B8=94=E0=B8=97=E0=B8=B3=E0=B8=84=E0=B8=B3=E0=B8=82=E0=B8=AD?= =?UTF-8?q?=20=E0=B9=81=E0=B8=A5=E0=B8=B0=E0=B8=9A=E0=B8=B1=E0=B8=99?= =?UTF-8?q?=E0=B8=97=E0=B8=B6=E0=B8=81=E0=B8=9C=E0=B8=A5=E0=B8=82=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B9=80=E0=B8=84=E0=B8=A3=E0=B8=B7=E0=B9=88=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=A3=E0=B8=B2=E0=B8=8A=20=E0=B8=82=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=20=E0=B8=82=E0=B8=A3=E0=B8=81.=20=E0=B9=81=E0=B8=A5?= =?UTF-8?q?=E0=B8=B0=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2?= =?UTF-8?q?=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/07_insignia/api.insignia.ts | 8 +- src/api/manage/api.insignia.ts | 3 + .../07_insignia/components/2_Manage/Tab1.vue | 81 +- .../07_insignia/components/2_Manage/Tab2.vue | 24 +- .../07_insignia/components/2_Manage/Tab3.vue | 29 +- .../components/3_result/DialogResults.vue | 13 +- src/modules/07_insignia/router.ts | 13 +- .../07_insignia/views/!08_ManageEmpMain.vue | 192 +++ .../07_insignia/views/02_ManageMain.vue | 52 +- .../07_insignia/views/03_ResultMain.vue | 77 +- .../07_insignia/views/08_ManageEmpMain.vue | 739 +++++++++-- .../07_insignia/views/09_ResultMainEmp.vue | 1112 +++++++++++++++++ 12 files changed, 2176 insertions(+), 167 deletions(-) create mode 100644 src/modules/07_insignia/views/!08_ManageEmpMain.vue create mode 100644 src/modules/07_insignia/views/09_ResultMainEmp.vue diff --git a/src/api/07_insignia/api.insignia.ts b/src/api/07_insignia/api.insignia.ts index 551ade307..83b1d84b6 100644 --- a/src/api/07_insignia/api.insignia.ts +++ b/src/api/07_insignia/api.insignia.ts @@ -23,9 +23,10 @@ export default { ocId: string, role: string, status: any, - isDeputy: boolean = false + isDeputy: boolean = false, + type: string = "officer" ) => - `${insignia}/request/${insigniaPeriodId}/${ocId}/${role}/${status}/${isDeputy}`, + `${insignia}/request/${insigniaPeriodId}/${ocId}/${role}/${status}/${isDeputy}/${type}`, insigniaReject: (profileId: string) => `${insignia}/request/status/reject/${profileId}`, insigniaDelete: (profileId: string) => @@ -39,7 +40,8 @@ export default { // record noteround: () => `${insignia}/request/note`, requestDocNote: (id: string) => `${insignia}/request/note/doc/${id}`, - noteSearch: () => `${insignia}/request/note/search`, + noteSearch: (type: string = "officer") => + `${insignia}/request/note/search/${type}`, noteSearchList: () => `${insignia}/request/note-list/search`, noteAdd: (insigniaId: string) => `${insignia}/request/note/${insigniaId}`, noteByid: (id: string) => `${insignia}/request/note/${id}`, diff --git a/src/api/manage/api.insignia.ts b/src/api/manage/api.insignia.ts index 44342123e..089e204fc 100644 --- a/src/api/manage/api.insignia.ts +++ b/src/api/manage/api.insignia.ts @@ -49,4 +49,7 @@ export default { checkIsofficer: `${env.API_URI}/org/workflow/keycloak/isofficer/`, insigniaReclaim, + + // update คุณสมบัติการจัดการเครื่องราชฯ + insigniaUpdateProperty: `${env.API_URI}/insignia/request/update`, }; diff --git a/src/modules/07_insignia/components/2_Manage/Tab1.vue b/src/modules/07_insignia/components/2_Manage/Tab1.vue index 2555ab481..cfb694072 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab1.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab1.vue @@ -144,15 +144,15 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, - { - name: "employeeType", - align: "left", - label: "ประเภทตำแหน่ง", - sortable: true, - field: "employeeType", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, + // { + // name: "employeeType", + // align: "left", + // label: "ประเภทตำแหน่ง", + // sortable: true, + // field: "employeeType", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // }, { name: "position", align: "left", @@ -375,7 +375,7 @@ async function fecthlistperson() { http .get( config.API.registryNewOtherSystem( - employeeType.value == "officer" ? `` : `-employee` + DataStore.employeeClass == "officer" ? `` : `-employee` ), { params: { ...formFilter, nodeId: organization.value }, @@ -501,8 +501,7 @@ async function downloadFileexcel() { .put( config.API.insigniaDowanload(DataStore.requestId), { - profileType: - DataStore.employeeClass == "all" ? null : DataStore.employeeClass, + profileType: DataStore.employeeClass, InsigniaId: DataStore.typeinsignia == "all" ? null @@ -842,10 +841,11 @@ function clearInsigniaFilters(name: string) { if (name === "typeinsigniaOptions") { DataStore.typeinsignia = "all"; typeinsigniaOptions.value = DataStore.typeinsigniaOptions; - } else if (name === "employeeClassOps") { - DataStore.employeeClass = "all"; - employeeClassOps.value = DataStore.employeeClassOps; } + // else if (name === "employeeClassOps") { + // DataStore.employeeClass = "all"; + // employeeClassOps.value = DataStore.employeeClassOps; + // } } watch( @@ -1026,7 +1026,7 @@ onMounted(async () => { - { ไม่มีข้อมูล - + -->
{ > ดาวน์โหลด + { icon="mdi-plus" @click="clickmodalAdd" v-if=" - (DataStore.isLock == false && - DataStore.requestStatus == 'st5' && - DataStore.isOfficer) || - (checkStatus == true && checkPermission($route)?.attrIsCreate) + DataStore.isLock == false && + checkPermission($route)?.attrIsCreate && + ((DataStore.requestStatus == 'st5' && DataStore.isOfficer) || + checkStatus == true) " > เพิ่ม @@ -1330,11 +1328,14 @@ onMounted(async () => { --> +
-
+
-
{ " > +
-
{ " > +
-
@@ -1415,7 +1426,7 @@ onMounted(async () => {
-
+
{ dense placeholder="ค้นหา" v-model="formFilter.searchKeyword" - @keydown.enter.prevent="(formFilter.page = 1), fecthlistperson()" + @keydown.enter.prevent=" + (formFilter.page = 1), fecthlistperson() + " > - ไม่มีข้อมูล - + -->
diff --git a/src/modules/07_insignia/components/2_Manage/Tab3.vue b/src/modules/07_insignia/components/2_Manage/Tab3.vue index a6d1a30f1..032d09c74 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab3.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab3.vue @@ -68,15 +68,15 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, - { - name: "employeeType", - align: "left", - label: "ประเภทตำแหน่ง", - sortable: true, - field: "employeeType", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, + // { + // name: "employeeType", + // align: "left", + // label: "ประเภทตำแหน่ง", + // sortable: true, + // field: "employeeType", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // }, { name: "position", align: "left", @@ -254,10 +254,11 @@ function clearInsigniaFilters(name: string) { if (name === "typeinsigniaOptions") { DataStore.typeinsignia = "all"; typeinsigniaOptions.value = DataStore.typeinsigniaOptions; - } else if (name === "employeeClassOps") { - DataStore.employeeClass = "all"; - employeeClassOps.value = DataStore.employeeClassOps; } + // else if (name === "employeeClassOps") { + // DataStore.employeeClass = "all"; + // employeeClassOps.value = DataStore.employeeClassOps; + // } } function onSearch() { @@ -406,7 +407,7 @@ onMounted(async () => { - { ไม่มีข้อมูล - + -->
diff --git a/src/modules/07_insignia/components/3_result/DialogResults.vue b/src/modules/07_insignia/components/3_result/DialogResults.vue index 928aba2d2..1e5ea5c12 100644 --- a/src/modules/07_insignia/components/3_result/DialogResults.vue +++ b/src/modules/07_insignia/components/3_result/DialogResults.vue @@ -171,7 +171,7 @@ function findlist(id: string = "", idCard: string) { function fectDataByid(id: string) { showLoader(); if (props.profileType !== undefined) { - employeeClass.value = "officer"; + employeeClass.value = props.profileType; } http .get(config.API.noteByid(id)) @@ -291,7 +291,7 @@ function classInput(val: boolean) { watch(props, () => { if (props.modal === true) { filterinsigniaOp2.value = DataStore.insigniaOp2; - employeeClass.value = ""; + employeeClass.value = props.profileType || ""; cardid.value = ""; fullName.value = ""; position.value = ""; @@ -335,9 +335,6 @@ watch(props, () => {
{ map-options outlined v-model="employeeClass" - :label="`ขรก.สามัญ/ลูกจ้างประจำ`" + label="ประเภทตำแหน่ง" @update:model-value="selectType" - :class="classInput(status !== '')" + disable :readonly="status !== ''" lazy-rules /> @@ -383,7 +380,7 @@ watch(props, () => { label="เลขประจำตัวประชาชน" maxlength="13" mask="#############" - @keyup="searchcardid" + @change="searchcardid" />
diff --git a/src/modules/07_insignia/router.ts b/src/modules/07_insignia/router.ts index de589f379..6df25fbcf 100644 --- a/src/modules/07_insignia/router.ts +++ b/src/modules/07_insignia/router.ts @@ -33,6 +33,8 @@ const ReclaimMain = () => // รายชื่อลูกจ้างประจำ ที่มีสิทธิ์ยื่นขอพระราชทานเครื่องราชอิสริยาภรณ์ const ManageEmpMain = () => import("@/modules/07_insignia/views/08_ManageEmpMain.vue"); +const RecordInsigniaEmp = () => + import("@/modules/07_insignia/views/09_ResultMainEmp.vue"); export default [ { @@ -128,7 +130,6 @@ export default [ Role: "STAFF", }, }, - { path: "/insignia/manage-emp/list-manage", name: "insigniaManageEmp", @@ -139,4 +140,14 @@ export default [ Role: "STAFF", }, }, + { + path: "/insignia/record-emp", + name: "insigniaRecordEmp", + component: RecordInsigniaEmp, + meta: { + Auth: true, + Key: "SYS_INSIGNIA_RECORD_EMP", + Role: "STAFF", + }, + }, ]; diff --git a/src/modules/07_insignia/views/!08_ManageEmpMain.vue b/src/modules/07_insignia/views/!08_ManageEmpMain.vue new file mode 100644 index 000000000..74a790bd8 --- /dev/null +++ b/src/modules/07_insignia/views/!08_ManageEmpMain.vue @@ -0,0 +1,192 @@ + + + + + diff --git a/src/modules/07_insignia/views/02_ManageMain.vue b/src/modules/07_insignia/views/02_ManageMain.vue index 1f5059f9a..72865ea7e 100644 --- a/src/modules/07_insignia/views/02_ManageMain.vue +++ b/src/modules/07_insignia/views/02_ManageMain.vue @@ -242,6 +242,7 @@ async function fecthInsigniaByOc( await http .get(config.API.insigniaList(roundId, ocId, role, status, isDeputy)) .then(async (res) => { + DataStore.isLock = res.data.result.isLock; // เช็คว่ามีการล็อกข้อมูลหรือไม่ requestNote.value = res.data.result.requestNote; requestStatus.value = res.data.result.requestStatus; requestId.value = res.data.result.requestId; @@ -422,6 +423,35 @@ function requestSendNote() { }); } +/** + * function อัพเดตข้อมูลคุณสมบัติ + */ +async function updateDataProperty() { + dialogConfirm($q, async () => { + showLoader(); + await http + .put(config.API.insigniaUpdateProperty, { + insigniaPeriodId: round.value, + agencyId: DataStore.agency, + type: "officer", + }) + .then(async () => { + hideLoader(); + await fecthInsigniaByOc( + round.value, + DataStore.agency, + "officer", + tab.value + ); + success($q, "อัพเดตข้อมูลคุณสมบัติสำเร็จ"); + }) + .catch((err) => { + messageError($q, err); + hideLoader(); + }); + }); +} + /** * function อัปโหลดไฟล์เจ้าหน้าที่ * @param event file @@ -455,6 +485,7 @@ async function uploadFile(event: any) { * hook */ onMounted(async () => { + DataStore.employeeClass = "officer"; // กำหนดประเภทข้าราชการสามัญฯ เป็น ขรก. tab.value = DataStore.mainTab ?? ""; await Promise.all([fecthlistRound(), fecthInsignia(), fetchCheckIsofficer()]); }); @@ -507,6 +538,22 @@ onUnmounted(() => { > ล็อกข้อมูล + + + อัพเดตข้อมูลคุณสมบัติ +
@@ -642,7 +689,7 @@ onUnmounted(() => { dense v-model="fileUpload" accept=".pdf" - :style="fileUpload === null ? 'width: 150px' : 'width: auto'" + :style="fileUpload === null ? 'width: 250px' : 'width: auto'" label="อัปโหลดไฟล์" > - { - + -->
{ + diff --git a/src/modules/07_insignia/views/09_ResultMainEmp.vue b/src/modules/07_insignia/views/09_ResultMainEmp.vue new file mode 100644 index 000000000..791df0ec9 --- /dev/null +++ b/src/modules/07_insignia/views/09_ResultMainEmp.vue @@ -0,0 +1,1112 @@ + + + + +