From ac0bc84da326f8a6337e07df5bab32f6746aa473 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 3 Dec 2024 13:07:22 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AD=E0=B8=B1=E0=B8=95=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=81=E0=B8=B3=E0=B8=A5=E0=B8=B1=E0=B8=87=E0=B8=A5=E0=B8=B9?= =?UTF-8?q?=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=9B=E0=B8=A3?= =?UTF-8?q?=E0=B8=B0=E0=B8=88=E0=B8=B3=20=E0=B8=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DialogFormAgency.vue | 90 +++++++++++++------ .../components/DialogFormDateTime.vue | 1 + .../components/DialogFormPosition.vue | 8 +- .../components/DialogHistoryPos.vue | 3 + .../components/DialogMovePos.vue | 17 ++-- .../components/DialogNewStructure.vue | 2 + .../components/DialogSuccession.vue | 22 ++--- .../components/{TreeView.vue => MainView.vue} | 27 +++--- .../{TreeTable.vue => TableMain.vue} | 0 .../02_organization/components/TreeMain.vue | 12 +-- src/modules/02_organization/views/main.vue | 30 ++----- 11 files changed, 114 insertions(+), 98 deletions(-) rename src/modules/02_organization/components/{TreeView.vue => MainView.vue} (94%) rename src/modules/02_organization/components/{TreeTable.vue => TableMain.vue} (100%) diff --git a/src/modules/02_organization/components/DialogFormAgency.vue b/src/modules/02_organization/components/DialogFormAgency.vue index d94a89858..500e38279 100644 --- a/src/modules/02_organization/components/DialogFormAgency.vue +++ b/src/modules/02_organization/components/DialogFormAgency.vue @@ -316,6 +316,43 @@ async function onCheckIsDeputy() { }); } +/** ถ้ามีการเลือก สกจ. และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสกจ. */ +function onChangeIsOfficer() { + if (formData.isOfficer === true && checkIsOfficer.value === true) { + dialogConfirm( + $q, + () => (formData.isOfficer = true), + "ยืนยันการแก้ไข", + "คุณต้องการแก้ไข สกจ. เป็นส่วนราชการนี้ใช่หรือไม่?", + () => (formData.isOfficer = false) + ); + } +} + +/** ถ้ามีการเลือก สำนักปลัด และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสำนักปลัด */ +function onChangeIsDeputy() { + if (formData.isDeputy == true && checkIsDeputy.value == true) { + dialogConfirm( + $q, + () => (formData.isDeputy = true), + "ยืนยันการแก้ไข", + "คุณต้องการแก้ไข สำนักปลัด เป็นส่วนราชการนี้ใช่หรือไม่?", + () => (formData.isDeputy = false) + ); + } +} + +/** + * class input + * @param val + */ +function classInput(val: boolean) { + return { + "full-width cursor-pointer ": val, + "full-width cursor-pointer inputgreen": !val, + }; +} + /** * callback function ทำงานเมื่อ props.modal เป็น true */ @@ -375,32 +412,6 @@ watch( } } ); - -/** ถ้ามีการเลือก สกจ. และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสกจ. */ -function onChangeIsOfficer() { - if (formData.isOfficer === true && checkIsOfficer.value === true) { - dialogConfirm( - $q, - () => (formData.isOfficer = true), - "ยืนยันการแก้ไข", - "คุณต้องการแก้ไข สกจ. เป็นส่วนราชการนี้ใช่หรือไม่?", - () => (formData.isOfficer = false) - ); - } -} - -/** ถ้ามีการเลือก สำนักปลัด และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสำนักปลัด */ -function onChangeIsDeputy() { - if (formData.isDeputy == true && checkIsDeputy.value == true) { - dialogConfirm( - $q, - () => (formData.isDeputy = true), - "ยืนยันการแก้ไข", - "คุณต้องการแก้ไข สำนักปลัด เป็นส่วนราชการนี้ใช่หรือไม่?", - () => (formData.isDeputy = false) - ); - } -}