From 573eaff2ec29563507831bdcebe53542553140be Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 23 May 2024 17:20:19 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=A3?= =?UTF-8?q?=E0=B8=B0=E0=B8=9A=E0=B8=9A=E0=B8=A7=E0=B8=B4=E0=B8=99=E0=B8=B1?= =?UTF-8?q?=E0=B8=A2=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B9=83=E0=B8=8A=E0=B9=89?= =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5=E0=B8=97?= =?UTF-8?q?=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B9=83?= =?UTF-8?q?=E0=B8=AB=E0=B8=A1=E0=B9=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialogs/AddPersonal.vue | 32 +-- .../components/1_Complaint/Form.vue | 243 +++++++++--------- .../components/2_InvestigateFacts/Form.vue | 144 ++++++----- .../3_InvestigateDisciplinary/Form.vue | 2 +- .../components/4_Result/Form.vue | 150 +++++------ .../6_BasicInformation/Director/Form.vue | 27 +- .../components/7_ListSuspend/DetailPage.vue | 15 +- 7 files changed, 320 insertions(+), 293 deletions(-) diff --git a/src/components/Dialogs/AddPersonal.vue b/src/components/Dialogs/AddPersonal.vue index 40c173324..fb39e19e3 100644 --- a/src/components/Dialogs/AddPersonal.vue +++ b/src/components/Dialogs/AddPersonal.vue @@ -118,11 +118,11 @@ async function searchInput() { keyword: search.value, }; await http - .post(config.API.searchPersonal(), body) + .post(config.API.orgSearchPersonal(), body) .then((res) => { const data = res.data.result; - const list = data.map((e: ResponsePreson) => ({ - personId: e.personId, + const list = data.map((e: any) => ({ + personId: e.id, idcard: e.idcard, prefix: e.prefix, firstName: e.firstName, @@ -130,8 +130,8 @@ async function searchInput() { name: `${e.prefix}${e.firstName} ${e.lastName}`, posNo: e.posNo ?? "-", position: e.position ?? "-", - positionLevel: e.positionLevel ?? "-", - salary: e.salaries ?? "-", + positionLevel: e.positionLevelName ?? "-", + salary: e.salary ?? "-", organization: e.organization ?? "-", phone: e.phone ?? "-", email: e.email ?? "-", @@ -206,17 +206,17 @@ watch( label="คำค้น" :rules="[(val) => !!val || `กรุณากรอกคำค้น`]" > - + diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index b6a42b5cc..d316753e7 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -15,7 +15,7 @@ import { useDisciplineMainStore } from "@/modules/11_discipline/store/main"; import config from "@/app.config"; import http from "@/plugins/http"; -import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue"; +import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue"; import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue"; const $q = useQuasar(); @@ -152,7 +152,6 @@ function validateForm() { if (property.value && typeof property.value.validate === "function") { const isValid = property.value.validate(); hasError.push(isValid); - } } } @@ -165,16 +164,13 @@ function validateForm() { /** ฟังชั่น บันทึก */ function onSubmit() { - dialogConfirm( - $q, - async () => { - if (mainStore.rowsAdd) { - formData.persons = await mainStore.rowsAdd; - } - await props.onSubmit(formData); - isSave.value = false; + dialogConfirm($q, async () => { + if (mainStore.rowsAdd) { + formData.persons = await mainStore.rowsAdd; } - ); + await props.onSubmit(formData); + isSave.value = false; + }); } /** @@ -359,8 +355,8 @@ onMounted(() => { @@ -941,13 +948,13 @@ onMounted(() => { bordered separator > - + > {{ data.fileName }}
@@ -979,7 +986,9 @@ onMounted(() => {
- ไม่มีรายการเอกสาร + + ไม่มีรายการเอกสาร +
@@ -988,7 +997,7 @@ onMounted(() => { -
+
{
- - diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue index 711180deb..cfc12b7ac 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue @@ -14,7 +14,7 @@ import { useDisciplineMainStore } from "@/modules/11_discipline/store/main"; import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue"; import DialogDuty from "@/modules/11_discipline/components/DialogDuty.vue"; -import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue"; +import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue"; import type { FormData, @@ -139,17 +139,19 @@ const formData = reactive({ const rows = ref([]); const dateEndInputStyle = computed(() => { - if(formData.investigationDateStart){ - const currentDate = new Date(); - const investigationDateEnd = new Date(formData.investigationDateEnd as Date); + if (formData.investigationDateStart) { + const currentDate = new Date(); + const investigationDateEnd = new Date( + formData.investigationDateEnd as Date + ); - const isInNext7Days = - investigationDateEnd >= currentDate && - investigationDateEnd <= - new Date(currentDate.getTime() + 7 * 24 * 60 * 60 * 1000); + const isInNext7Days = + investigationDateEnd >= currentDate && + investigationDateEnd <= + new Date(currentDate.getTime() + 7 * 24 * 60 * 60 * 1000); - return isInNext7Days ? "input-alert" : ""; -} + return isInNext7Days ? "input-alert" : ""; + } }); const initialPagination = ref({ @@ -286,11 +288,11 @@ watch(props.data, async () => { prefix: item.prefix, firstName: item.firstName, lastName: item.lastName, - position: item.position == '' ? "-" : item.position, - email: item.email == '' ? '-' : item.email, - phone: item.phone == '' ? '-' : item.phone, - commandNo: item.commandNo == '' ? '-' : item.commandNo, - duty: item.duty == '' ? '-' : item.duty, + position: item.position == "" ? "-" : item.position, + email: item.email == "" ? "-" : item.email, + phone: item.phone == "" ? "-" : item.phone, + commandNo: item.commandNo == "" ? "-" : item.commandNo, + duty: item.duty == "" ? "-" : item.duty, check: "props", })); @@ -643,7 +645,7 @@ onMounted(async () => { - +
{ bordered separator > - + > {{ file.fileName }}
@@ -1459,14 +1472,22 @@ onMounted(async () => {
- ไม่มีรายการเอกสาร + + ไม่มีรายการเอกสาร +
- -
+ +
อัปโหลดไฟล์เอกสารหลักฐาน
@@ -1491,15 +1512,15 @@ onMounted(async () => { @@ -1514,11 +1535,12 @@ onMounted(async () => { bordered separator > - + clickable + v-ripple + > {{ file.fileName }}
@@ -1555,22 +1577,20 @@ onMounted(async () => {
- ไม่มีรายการเอกสาร + + ไม่มีรายการเอกสาร +
- -
+ +
- บันทึกข้อมูล
@@ -1578,8 +1598,8 @@ onMounted(async () => { - - + + (false); const personId = ref(""); diff --git a/src/modules/11_discipline/components/4_Result/Form.vue b/src/modules/11_discipline/components/4_Result/Form.vue index 466d897c1..ba3774785 100644 --- a/src/modules/11_discipline/components/4_Result/Form.vue +++ b/src/modules/11_discipline/components/4_Result/Form.vue @@ -8,7 +8,7 @@ import { useCounterMixin } from "@/stores/mixin"; import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore"; import { useDisciplineMainStore } from "@/modules/11_discipline/store/main"; import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue"; -import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue"; +import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue"; import type { FormData, @@ -127,22 +127,19 @@ function validateForm() { * หากยกเลิกจะกลับไปหน้าฟอร์ม */ function onSubmit() { - dialogConfirm( - $q, - async () => { - await http - .put(config.API.listResultById(id.value), formData) - .then(() => { - isSave.value = false; - success($q, "บันทึกข้อมูลสำเร็จ"); - props.fetchData(); - }) - .catch((err) => { - messageError($q, err); - }) - .finally(async () => {}); - } - ); + dialogConfirm($q, async () => { + await http + .put(config.API.listResultById(id.value), formData) + .then(() => { + isSave.value = false; + success($q, "บันทึกข้อมูลสำเร็จ"); + props.fetchData(); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(async () => {}); + }); } async function fetchDatadetail() { @@ -260,7 +257,7 @@ function updatemodalPersonal(modal: boolean) { - -
- +
+ + - - {{ data.fileName }} - - ดาวน์โหลดไฟล์ - ลบไฟล์ - - -
-
- ไม่มีรายการเอกสาร + {{ data.fileName }} + + ดาวน์โหลดไฟล์ + ลบไฟล์ + + +
+
+ ไม่มีรายการเอกสาร
- -
+ +
- + (false); const personId = ref(""); @@ -201,8 +201,7 @@ async function searchInput() { rows.value = list; }) - .catch((err) => { - }) + .catch((err) => {}) .finally(() => { hideLoader(); }); @@ -240,7 +239,7 @@ function updatemodalPersonal(modal: boolean) { * เมื่อมีข้อมูล * เก็บข้อมูลลง formData */ - watch(props.data, async () => { +watch(props.data, async () => { formData.prefix = props.data.prefix; formData.firstname = props.data.firstname; formData.lastname = props.data.lastname; @@ -283,16 +282,16 @@ function updatemodalPersonal(modal: boolean) { label="คำค้น" :rules="[(val) => !!val || `กรุณากรอกคำค้น`]" > - + diff --git a/src/modules/11_discipline/components/7_ListSuspend/DetailPage.vue b/src/modules/11_discipline/components/7_ListSuspend/DetailPage.vue index 9b37b8ac4..821d2d84d 100644 --- a/src/modules/11_discipline/components/7_ListSuspend/DetailPage.vue +++ b/src/modules/11_discipline/components/7_ListSuspend/DetailPage.vue @@ -12,7 +12,10 @@ import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/Suspend /**Import type */ import type { QForm } from "quasar"; import type { dataDetail } from "@/modules/11_discipline/interface/response/suspend"; -import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue"; +import type { DataProfile } from "@/modules/05_placement/interface/index/Main"; + +import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue"; +import CardProfile from "@/components/CardProfile.vue"; const modalPersonal = ref(false); const personId = ref(""); @@ -38,6 +41,7 @@ const { const myForm = ref(null); const roleAdmin = ref(false); const edit = ref(false); +const dataProfile = ref(); const data = reactive({ id: "", @@ -70,6 +74,8 @@ async function getData() { .get(config.API.suspendById(dataId)) .then((res) => { const dataGet = res.data.result; + dataProfile.value = dataGet as DataProfile; + data.id = dataGet.id; data.personId = dataGet.personId; data.citizenId = dataGet.citizenId; @@ -231,7 +237,8 @@ onMounted(async () => { /> รายละเอียดการของ {{ data.name }} - + + + +