From ef219472503a542e18678b3a0f82ef973f42d60c Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Fri, 1 Dec 2023 09:11:36 +0700 Subject: [PATCH 1/7] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B8=94=E0=B8=B6=E0=B8=87?= =?UTF-8?q?=20month=20=E0=B9=80=E0=B9=80=E0=B8=A5=E0=B8=B0=20year=20?= =?UTF-8?q?=E0=B8=A1=E0=B8=B2=E0=B8=88=E0=B8=B2=E0=B8=81=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=99=E0=B8=99=E0=B8=B5=E0=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/09_leave/stores/SpecialTimeStore.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/09_leave/stores/SpecialTimeStore.ts b/src/modules/09_leave/stores/SpecialTimeStore.ts index ecdd6ffd8..54230e6d7 100644 --- a/src/modules/09_leave/stores/SpecialTimeStore.ts +++ b/src/modules/09_leave/stores/SpecialTimeStore.ts @@ -40,8 +40,9 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => { const checkOutStatus = ref("ปกติ"); // paging - const year = ref(2023); - const month = ref(11); + const toDay = ref(new Date()); + const month = toDay.value.getMonth(); + const year = toDay.value.getFullYear(); const page = ref(1); const total = ref(0); const pageSize = ref(10); @@ -56,7 +57,7 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => { await http .get( config.API.specialTime() + - `?year=${year.value}&month=${month.value}&page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}` + `?year=${year}&month=${month}&page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}` ) .then(async (res) => { let data = res.data.result.data; From 97fde66a79e85139b192a0a1a1da004bd2e71536 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Fri, 1 Dec 2023 09:22:38 +0700 Subject: [PATCH 2/7] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20Date=20selecter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/09_leave/stores/SpecialTimeStore.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/09_leave/stores/SpecialTimeStore.ts b/src/modules/09_leave/stores/SpecialTimeStore.ts index 54230e6d7..d2c467879 100644 --- a/src/modules/09_leave/stores/SpecialTimeStore.ts +++ b/src/modules/09_leave/stores/SpecialTimeStore.ts @@ -41,8 +41,8 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => { // paging const toDay = ref(new Date()); - const month = toDay.value.getMonth(); - const year = toDay.value.getFullYear(); + const month = ref(11); + const year = ref(2023); const page = ref(1); const total = ref(0); const pageSize = ref(10); @@ -57,7 +57,7 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => { await http .get( config.API.specialTime() + - `?year=${year}&month=${month}&page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}` + `?year=${year.value}&month=${month.value}&page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}` ) .then(async (res) => { let data = res.data.result.data; From 62ad5673c623670a0bf1b9c7cc64dbf2dabe4a70 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 1 Dec 2023 11:44:11 +0700 Subject: [PATCH 3/7] =?UTF-8?q?=E0=B8=9C=E0=B8=B9=E0=B9=89=E0=B8=96?= =?UTF-8?q?=E0=B8=B9=E0=B8=81=E0=B8=A3=E0=B9=89=E0=B8=AD=E0=B8=87=E0=B9=80?= =?UTF-8?q?=E0=B8=A3=E0=B8=B5=E0=B8=A2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialogs/AddPersonal.vue | 14 +++++++++++--- .../components/1_Complaint/Form.vue | 2 +- .../components/2_InvestigateFacts/Form.vue | 2 +- .../interface/response/investigate.ts | 17 ++++++++++++++++- src/modules/11_discipline/store.ts | 4 ++-- 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/components/Dialogs/AddPersonal.vue b/src/components/Dialogs/AddPersonal.vue index 412b7a5b5..598b82936 100644 --- a/src/components/Dialogs/AddPersonal.vue +++ b/src/components/Dialogs/AddPersonal.vue @@ -46,7 +46,7 @@ const typeOps = ref([ /** รับค่ามาจาก หน้าหลัก */ const props = defineProps({ - checkId: { + mainData: { type: Array, default: [], }, @@ -118,8 +118,9 @@ async function searchInput() { .post(config.API.searchPersonal(), body) .then((res) => { const data = res.data.result; + console.log(data) const list = data.map((e: ResponsePreson) => ({ - personId: e.personId, + id: e.personId, idcard: e.idcard, prefix: e.prefix, firstName: e.firstName, @@ -145,10 +146,17 @@ async function searchInput() { } } + /** update เมื่อเปลี่ยน option */ function updateSelect() { search.value = ""; } +watch(()=>props.mainData,()=>{ + if(props.mainData){ + console.log('mainData',props.mainData) + selected.value = props.mainData + } +}) diff --git a/src/modules/11_discipline/components/1_Complaint/MainPage.vue b/src/modules/11_discipline/components/1_Complaint/MainPage.vue index fe1cd7ef5..e6887b68b 100644 --- a/src/modules/11_discipline/components/1_Complaint/MainPage.vue +++ b/src/modules/11_discipline/components/1_Complaint/MainPage.vue @@ -9,7 +9,6 @@ import { useComplainstDataStore } from "@/modules/11_discipline/store/Complaints import TableComplaint from "@/modules/11_discipline/components/1_Complaint/TableComplaint.vue"; import config from "@/app.config"; import http from "@/plugins/http"; -import { max } from "moment"; const $q = useQuasar(); const mixin = useCounterMixin(); From d47ef4efee762446cf2e965c72a13455d9a2fe71 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 1 Dec 2023 13:50:47 +0700 Subject: [PATCH 5/7] no message --- .../components/4_Result/DialogSendToCommand.vue | 10 +++++++++- .../11_discipline/components/4_Result/EditPage.vue | 10 +--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue b/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue index 257ab6d68..e58dbb534 100644 --- a/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue +++ b/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue @@ -1,5 +1,5 @@