diff --git a/package-lock.json b/package-lock.json index e0da68418..7c4200ef5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7709,7 +7709,7 @@ }, "node_modules/vue": { "version": "3.2.47", - "resolved": "https://npm.joolsoft.com/vue/-/vue-3.2.47.tgz", + // "resolved": "https://npm.joolsoft.com/vue/-/vue-3.2.47.tgz", "integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==", "dependencies": { "@vue/compiler-dom": "3.2.47", @@ -13775,7 +13775,7 @@ }, "vue": { "version": "3.2.47", - "resolved": "https://npm.joolsoft.com/vue/-/vue-3.2.47.tgz", + // "resolved": "https://npm.joolsoft.com/vue/-/vue-3.2.47.tgz", "integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==", "requires": { "@vue/compiler-dom": "3.2.47", diff --git a/src/api/07_insignia/api.insignia.ts b/src/api/07_insignia/api.insignia.ts index db50f6aac..fd15b5c1b 100644 --- a/src/api/07_insignia/api.insignia.ts +++ b/src/api/07_insignia/api.insignia.ts @@ -6,7 +6,7 @@ const insignia = `${env.API_URI}/insignia`; const Organization = `${env.API_URI}/Organization` export default { getRoundInsignia: (id: string) => `${insignia}/period/${id}`, - listRoundInsignia: (type: string) => `${insignia}/period/${type}`, + listRoundInsignia: () => `${insignia}/period/`, editRoundInsignia: (id: string) => `${insignia}/period/${id}`, RoundInsignia: (id: string) => `${insignia}/period/${id}`, requestInsignia: (insigniaPeriodId: string) => `${insignia}/request/${insigniaPeriodId}`, @@ -18,8 +18,8 @@ export default { insigniaManage: (type: string) => `${insignia}/manage/${type}`, insigniaCreate: () => `${insignia}/request`, insigniaList: (insigniaPeriodId: any, ocId: string, role: string, status: any) => `${insignia}/request/${insigniaPeriodId}/${ocId}/${role}/${status}`, - insigniaReject: (profileId: string) => `${insignia}/status/reject/${profileId}`, - insigniaDelete: (profileId: string) => `${insignia}/status/delete/${profileId}`, + insigniaReject: (profileId: string) => `${insignia}/request/status/reject/${profileId}`, + insigniaDelete: (profileId: string) => `${insignia}/request/status/delete/${profileId}`, insigniaEdit: (profileId: string) => `${insignia}/request/${profileId}`, insigniaAgency: () => `${insignia}/request/agency`, insigniaDashboard: (insigniaPeriodId: string) => `${insignia}/request/dashboard/${insigniaPeriodId}`, diff --git a/src/modules/05_placement/components/Receive/receiveDetail2.vue b/src/modules/05_placement/components/Receive/receiveDetail2.vue index 8f3b77a44..392b20507 100644 --- a/src/modules/05_placement/components/Receive/receiveDetail2.vue +++ b/src/modules/05_placement/components/Receive/receiveDetail2.vue @@ -82,6 +82,7 @@ label="แก้ไข" style="width: 80px" @click="edit = !edit" + v-if="!(status == 'REPORT' || status == 'DONE')" />
@@ -616,7 +617,7 @@ const title = ref({ positionTypeOld: "", }); -const value = ref(123554); +const status = ref(""); const myForm = ref(null); const edit = ref(false); @@ -790,6 +791,7 @@ const getData = async () => { posNo.value = data.positionNumberOld ?? ""; salary.value = data.amountOld ?? 0; reason.value = data.reason ?? ""; + status.value = data.status ?? ""; await calRetire(new Date(dateToISO(new Date(data.dateOfBirth)))); dateBefore.value = new Date(data.dateOfBirth); diff --git a/src/modules/05_placement/components/Receive/receiveMain.vue b/src/modules/05_placement/components/Receive/receiveMain.vue index 02c54f598..56d03433d 100644 --- a/src/modules/05_placement/components/Receive/receiveMain.vue +++ b/src/modules/05_placement/components/Receive/receiveMain.vue @@ -2,12 +2,13 @@ import { ref, computed, onMounted } from "vue"; import { useQuasar } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; +import { useTransferDataStore } from "@/modules/05_placement/store"; import http from "@/plugins/http"; import config from "@/app.config"; import { useRouter } from "vue-router"; -import DialogFooter from "@/modules/05_placement/components/Receive/DialogFooter.vue"; + import DialogHeader from "@/modules/05_placement/components/Receive/DialogHeader.vue"; import DialogOrgTree from "@/modules/05_placement/components/Receive/receiveModal.vue"; @@ -20,6 +21,8 @@ import type { const $q = useQuasar(); const router = useRouter(); const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง +const transferStore = useTransferDataStore(); +const { statusText } = transferStore; const { showLoader, hideLoader, @@ -34,6 +37,11 @@ const selected = ref([]); const modal = ref(false); const popup = () => { + const row = filters.value.filter( + (r: ResponseRow) => + r.status == "WAITTING" || r.status == "PENDING" || r.status == "APPROVE" + ); + rows2.value = row; modal.value = true; }; @@ -46,6 +54,8 @@ const visibleColumns = ref([ "fullname", "organizationName", "birthday", + "dateText", + "statusText", ]); const visibleColumns2 = ref([ @@ -54,6 +64,8 @@ const visibleColumns2 = ref([ "fullname", "organizationName", "birthday", + "dateText", + "statusText", ]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง const filterKeyword = ref(""); const filterKeyword2 = ref(""); @@ -96,6 +108,8 @@ const columns = ref([ field: "no", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "citizenId", @@ -105,6 +119,8 @@ const columns = ref([ field: "fullname", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "fullname", @@ -114,6 +130,8 @@ const columns = ref([ field: "fullname", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "organizationName", @@ -134,6 +152,31 @@ const columns = ref([ field: "birthday", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "dateText", + align: "left", + label: "วันที่ดำเนินการ", + sortable: true, + field: "dateText", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + sortOrder: "da", + }, + { + name: "statusText", + align: "left", + label: "สถานะ", + sortable: true, + field: "statusText", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, ]); const columns2 = ref([ @@ -145,6 +188,8 @@ const columns2 = ref([ field: "no", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "citizenId", @@ -154,6 +199,8 @@ const columns2 = ref([ field: "citizenId", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "fullname", @@ -163,6 +210,8 @@ const columns2 = ref([ field: "fullname", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "organizationName", @@ -183,6 +232,31 @@ const columns2 = ref([ field: "birthday", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "dateText", + align: "left", + label: "วันที่ดำเนินการ", + sortable: true, + field: "dateText", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + sortOrder: "da", + }, + { + name: "statusText", + align: "left", + label: "สถานะ", + sortable: true, + field: "statusText", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, ]); @@ -218,8 +292,12 @@ const fecthlistRecevice = async () => { positionPath: e.positionPath, birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth), status: e.status, + statusText: statusText(e.status ?? ""), + createdAt: e.createdAt !== null ? new Date(e.createdAt) : null, + dateText: e.createdAt !== null ? date2Thai(e.createdAt) : "-", }); }); + // console.log(list); rows.value = list; filters.value = list; }) @@ -243,12 +321,6 @@ const checkSelected = computed(() => { } }); -const row = filters.value.filter( - (r: ResponseRow) => - r.status == "WAITTING" || r.status == "PENDING" || r.status == "APPROVE" -); -rows2.value = row; - const add = () => { router.push(`/receive/add`); }; @@ -465,6 +537,20 @@ const saveOrder = async () => { > {{ props.row.birthday }} + + {{ props.row.dateText }} + + + {{ props.row.statusText }} + { clickable v-close-popup @click="openModalTree(props.row.personalId)" + :disable=" + props.row.status == 'REPORT' || + props.row.status == 'DONE' + " > { class="q-py-sm" > @@ -503,6 +598,10 @@ const saveOrder = async () => { clickable v-close-popup @click="openDelete(props.row.personalId)" + :disable=" + props.row.status == 'REPORT' || + props.row.status == 'DONE' + " > { class="q-py-sm" > ลบข้อมูล - + ลบ @@ -660,6 +768,16 @@ const saveOrder = async () => { {{ props.row.birthday }} + + {{ props.row.dateText }} + + + {{ props.row.statusText }} + diff --git a/src/modules/05_placement/components/Repatriate/RepatriateMain.vue b/src/modules/05_placement/components/Repatriate/RepatriateMain.vue index aecc10e5b..1d8a711b1 100644 --- a/src/modules/05_placement/components/Repatriate/RepatriateMain.vue +++ b/src/modules/05_placement/components/Repatriate/RepatriateMain.vue @@ -39,20 +39,24 @@ const modal = ref(false); const visibleColumns = ref([ "no", "fullname", + "posNo", "position", "positionLevel", "organizationPositionOld", // "organization", + "createdAt", "statusText", "btn", ]); const visibleColumns2 = ref([ "no", "fullname", + "posNo", "position", "positionLevel", "organizationPositionOld", // "organization", + "createdAt", "statusText", ]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง const filterKeyword = ref(""); @@ -134,6 +138,15 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "posNo", + align: "left", + label: "ตำแหน่งเลขที่", + sortable: true, + field: "posNo", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, { name: "position", align: "left", @@ -170,6 +183,18 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "createdAt", + align: "left", + label: "วันที่ดำเนินการ", + sortable: true, + field: "createdAt", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + sortOrder: "da", + }, { name: "statusText", align: "left", @@ -208,6 +233,15 @@ const columns2 = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "posNo", + align: "left", + label: "ตำแหน่งเลขที่", + sortable: true, + field: "posNo", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, { name: "position", align: "left", @@ -244,6 +278,18 @@ const columns2 = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "createdAt", + align: "left", + label: "วันที่ดำเนินการ", + sortable: true, + field: "createdAt", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + sortOrder: "da", + }, { name: "statusText", align: "left", @@ -436,6 +482,13 @@ onMounted(async () => { > {{ props.row.fullname }} + + {{ props.row.posNo }} + { {{ props.row.organization }}
+ + {{ props.row.createdAt }} + { ลบข้อมูล @@ -584,6 +651,9 @@ onMounted(async () => { {{ props.row.fullname }} + + {{ props.row.posNo }} + {{ props.row.position }} @@ -600,6 +670,9 @@ onMounted(async () => { {{ props.row.organization }} + + {{ props.row.createdAt }} + {{ props.row.statusText }} diff --git a/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue b/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue index 83df19af8..2dc9ecf59 100644 --- a/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue +++ b/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue @@ -1,14 +1,30 @@