From d714562571db93b85e762aaa1b552a641f4580f3 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 9 Oct 2024 11:02:17 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=AA?= =?UTF-8?q?=E0=B9=88=E0=B8=87=E0=B9=84=E0=B8=9B=E0=B8=AD=E0=B8=AD=E0=B8=81?= =?UTF-8?q?=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=20?= =?UTF-8?q?=E0=B8=A7=E0=B8=B4=E0=B8=99=E0=B8=B1=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../11_discipline/components/1_Complaint/Form.vue | 4 ++-- .../components/2_InvestigateFacts/Form.vue | 4 ++-- .../components/4_Result/DialogSendToCommand.vue | 12 +++++++++++- .../11_discipline/components/4_Result/EditPage.vue | 2 +- .../components/7_ListSuspend/DialogSendToCommand.vue | 12 +++++++++++- .../components/7_ListSuspend/ListsPage.vue | 1 - .../11_discipline/components/PopupSendToNext.vue | 2 +- .../11_discipline/interface/response/suspend.ts | 1 + src/modules/11_discipline/store/SuspendStore.ts | 1 + 9 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index e52e7e92a..5fdc30df7 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -276,7 +276,7 @@ function getListChannel() { /** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */ function changeFormData() { - isSave.value = props.data != null ?? true; + isSave.value = props.data != null ? true : false; if (organization.value) { formData.organizationId = organization.value.id; formData.organization = organization.value.name; @@ -339,7 +339,7 @@ function filterOptionFnAgency(val: string, update: Function) { watch(props.data, async () => { if (props.data !== null) { if (countNum.value === 1) { - isReadonly.value = props.data.status != "NEW" ?? true; + isReadonly.value = props.data.status != "NEW" ? true : false; isSave.value = false; fileList.value = props.data.disciplineComplaintDocs; diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue index b6eff6167..a8c20fcc2 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue @@ -11,7 +11,7 @@ import { useInvestigateDisStore } from "@/modules/11_discipline/store/Investigat import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore"; import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main"; -import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact"; +import type { FormData } from "@/modules/11_discipline/interface/request/InvestigateFact"; import type { OptionData } from "@/modules/07_insignia/interface/index/Main"; import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue"; @@ -608,7 +608,7 @@ function filterOptionFnCauseText(val: string, update: Function) { watch(props.data, async () => { if (props.data !== null) { if (countNum.value === 1) { - isReadonly.value = props.data.status != "NEW" ?? true; + isReadonly.value = props.data.status != "NEW" ? true : false; isSave.value = false; isUpdate.value = true; diff --git a/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue b/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue index c749ad311..339db43fa 100644 --- a/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue +++ b/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue @@ -39,6 +39,16 @@ const idPath = ref(route.params.id as string); const type = ref(""); const rows = ref([]); const selected = ref([]); +const dataMapToSend = computed(() => { + return selected.value.map((i: any) => ({ + id: i.id, + profileId: i.personId, + prefix: i.prefix, + firstName: i.firstName, + lastName: i.lastName, + citizenId: i.idcard, + })); +}); const modal = defineModel("modal", { required: true }); const props = defineProps({ @@ -305,6 +315,6 @@ watch( diff --git a/src/modules/11_discipline/components/4_Result/EditPage.vue b/src/modules/11_discipline/components/4_Result/EditPage.vue index ec274c68b..4250d7a48 100644 --- a/src/modules/11_discipline/components/4_Result/EditPage.vue +++ b/src/modules/11_discipline/components/4_Result/EditPage.vue @@ -14,7 +14,7 @@ import type { FormData as FormDataComplaint, ArrayPerson, ArrayFileList, -} from "@/modules/11_discipline/interface/request/Complaint"; +} from "@/modules/11_discipline/interface/request/complaint"; import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/InvestigateFact"; import DialogSendToCommand from "@/modules/11_discipline/components/4_Result/DialogSendToCommand.vue"; diff --git a/src/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue b/src/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue index 8956663cc..e6c3a42ec 100644 --- a/src/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue +++ b/src/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue @@ -25,6 +25,16 @@ const modalCommand = ref(false); // ตัวแปร popup สร้ const rows = ref([]); const selected = ref([]); +const dataMapToSend = computed(() => { + return selected.value.map((i: any) => ({ + id: i.id, + profileId: i.profileId, + prefix: i.prefix, + firstName: i.firstName, + lastName: i.lastName, + citizenId: i.citizenId, + })); +}); const commandType = ref(""); //ตัวแปรเก็บคำสั่งที่เลือก const commandOp = ref([]); @@ -283,6 +293,6 @@ watch( diff --git a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue index c2bf69938..d480982de 100644 --- a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue +++ b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue @@ -160,7 +160,6 @@ function openModalOrder() { r.organization ); rows2.value = dataMap; - console.log("🚀 ~ openModalOrder ~ rows2.value:", rows2.value); } /** ดึงข้อมูลหน้าหลัก */ diff --git a/src/modules/11_discipline/components/PopupSendToNext.vue b/src/modules/11_discipline/components/PopupSendToNext.vue index e7db380e6..8ee5bffba 100644 --- a/src/modules/11_discipline/components/PopupSendToNext.vue +++ b/src/modules/11_discipline/components/PopupSendToNext.vue @@ -16,6 +16,7 @@ const { dialogConfirm, dialogMessageNotify } = mixin; const dataMapToSend = computed(() => { return selected.value.map((i: any) => ({ id: i.id, + profileId: i.personId, prefix: i.prefix, firstName: i.firstName, lastName: i.lastName, @@ -120,7 +121,6 @@ watch( -
diff --git a/src/modules/11_discipline/interface/response/suspend.ts b/src/modules/11_discipline/interface/response/suspend.ts index 9b4a17f50..0bf18c5ec 100644 --- a/src/modules/11_discipline/interface/response/suspend.ts +++ b/src/modules/11_discipline/interface/response/suspend.ts @@ -1,5 +1,6 @@ interface listData { id: string; + profileId?: string; citizenId: string; prefix: string; firstName: string; diff --git a/src/modules/11_discipline/store/SuspendStore.ts b/src/modules/11_discipline/store/SuspendStore.ts index eb81dd4d7..c87fc13b4 100644 --- a/src/modules/11_discipline/store/SuspendStore.ts +++ b/src/modules/11_discipline/store/SuspendStore.ts @@ -33,6 +33,7 @@ export const useDisciplineSuspendStore = defineStore( async function getData(data: listData[]) { const dataList: dataType[] = data.map((item: listData) => ({ id: item.id, + profileId: item.profileId, citizenId: item.citizenId, name: `${item.prefix}${item.firstName} ${item.lastName}`, prefix: item.prefix,