From 0939d490df56e5403123c74a888c3adae08ecd3e Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 27 Oct 2023 10:12:09 +0700 Subject: [PATCH] =?UTF-8?q?filter=20Date=20=20=E0=B8=A3=E0=B8=B2=E0=B8=A2?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=87=E0=B9=80=E0=B8=A7?= =?UTF-8?q?=E0=B8=A5=E0=B8=B2=E0=B8=9B=E0=B8=8F=E0=B8=B4=E0=B8=9A=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4=E0=B8=87=E0=B8=B2=E0=B8=99=20=E0=B9=81?= =?UTF-8?q?=E0=B8=A5=E0=B8=B0=20=E0=B8=A5=E0=B8=9A=E0=B8=84=E0=B8=B3?= =?UTF-8?q?=E0=B8=99=E0=B8=B3=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2=E0=B8=AD?= =?UTF-8?q?=E0=B8=AD=E0=B8=81=E0=B8=A2=E0=B8=B7=E0=B8=A1=E0=B8=84=E0=B8=B7?= =?UTF-8?q?=E0=B8=99=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?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/5_Borrow/DialogForm.vue | 12 +- .../07_insignia/components/5_Borrow/Main.vue | 202 ++++++++++++++---- .../09_leave/interface/response/work.ts | 17 +- src/modules/09_leave/stores/WorkStore.ts | 23 +- src/modules/09_leave/views/WorkingMain.vue | 11 +- 5 files changed, 209 insertions(+), 56 deletions(-) diff --git a/src/modules/07_insignia/components/5_Borrow/DialogForm.vue b/src/modules/07_insignia/components/5_Borrow/DialogForm.vue index 328b23924..3d6069993 100644 --- a/src/modules/07_insignia/components/5_Borrow/DialogForm.vue +++ b/src/modules/07_insignia/components/5_Borrow/DialogForm.vue @@ -8,8 +8,11 @@ import type { DataOption } from "@/modules/04_registry/components/profileType"; import type { ItemType } from "@/modules/07_insignia/interface/request/Main"; import DialogHeader from "@/components/DialogHeader.vue"; +import { useBrrowDataStore } from "@/modules/07_insignia/storeBrrow"; + const $q = useQuasar(); const myForm = ref(); +const DataStore = useBrrowDataStore(); const mixin = useCounterMixin(); const { date2Thai, @@ -35,7 +38,7 @@ const filterOrgList = ref([]); const insigniaNoteProfileId = ref(""); const filterSelectRound = ref(); const selectRound = ref(); -const type = ref(); +const type = ref(DataStore.type); // เคลียร์ข้อมูลในฟอร์ม const clearData = () => { receivedate.value = null; @@ -88,7 +91,7 @@ const props = defineProps({ // เช็ค props ถ้าเปิด dialog ให้ดึงรายการข้อมูล watch(props, () => { - type.value = props.type; + // type.value = props.type; if (props.modal == true && props.roundId != "all") { roundNo.value = props.roundId; fecthlistInsignia(); @@ -220,25 +223,28 @@ const clickSave = async () => { // ค้นหาคนจากเลขประจำตัวประชาชน const searchcardid = async () => { + showLoader(); if (cardid.value.length === 13) { const node = await listPerson.value.find( (e: any) => e.citizenId === cardid.value ); if (node) { - fullName.value = `${node.prefix} ${node.fullName}`; + fullName.value = ` ${node.fullName}`; brand.value = `${node.requestInsignia} (${ type.value.find((item: any) => item.name === node.requestInsignia) ?.shortName || "" })`; insigniaNoteProfileId.value = node.id; insigniaNoteProfileId.value = node.id; + hideLoader(); } else { notifyError($q, "ไม่พบข้อมูลการได้รับในรอบนี้"); fullName.value = ""; brand.value = ""; OrganazationId.value = ""; reason.value = ""; + hideLoader(); } } }; diff --git a/src/modules/07_insignia/components/5_Borrow/Main.vue b/src/modules/07_insignia/components/5_Borrow/Main.vue index a6963b395..55c0681b0 100644 --- a/src/modules/07_insignia/components/5_Borrow/Main.vue +++ b/src/modules/07_insignia/components/5_Borrow/Main.vue @@ -22,7 +22,7 @@ const selectRoundOption = ref([]); const filterSelectRoundOption = ref([]); const selectRoundAllOption = ref([]); const filterSelectRoundAllOption = ref([]); -const type = ref(DataStore.type) +const type = ref(DataStore.type); const modal = ref(false); const action = ref(""); const profileId = ref(""); @@ -64,7 +64,6 @@ const fecthRound = async () => { filterSelectRoundAllOption.value = selectRoundAllOption.value; selectRound.value = data[0].id; filterSelectRoundOption.value = selectRoundOption.value; - console.log(filterSelectRoundOption.value); yearRound.value = data[0].year; roundYear.value = data[0].year; if (roundYear.value) { @@ -109,7 +108,7 @@ const fecthInsigniaType = async () => { .catch((err) => { messageError($q, err); }) - .finally(() => { }); + .finally(() => {}); }; const visibleColumns = ref([ @@ -438,23 +437,54 @@ const clearInsigniaFilters = (name: string) => {
ยืม-คืนเครื่องราชฯ
- - + +
- +
- + )" + >