From 247989c9e853364d3228b98d7b4ef5d3adfda450 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 11 Nov 2024 11:23:34 +0700 Subject: [PATCH] =?UTF-8?q?fix=20=E0=B8=A3=E0=B8=B0=E0=B8=9A=E0=B8=9A?= =?UTF-8?q?=E0=B8=9E=E0=B8=B1=E0=B8=92=E0=B8=99=E0=B8=B2=E0=B8=9A=E0=B8=B8?= =?UTF-8?q?=E0=B8=84=E0=B8=84=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/history/AddPage.vue | 14 +- .../components/history/DialogGov.vue | 4 +- .../components/historyEmployee/AddPage.vue | 6 +- .../components/scholarship/DetailView.vue | 4700 +++++++++-------- .../15_development/views/EmployeeHistory.vue | 14 +- src/modules/15_development/views/History.vue | 16 +- .../15_development/views/Scholarship.vue | 2 - 7 files changed, 2387 insertions(+), 2369 deletions(-) diff --git a/src/modules/15_development/components/history/AddPage.vue b/src/modules/15_development/components/history/AddPage.vue index 042e43f47..1ad00f9df 100644 --- a/src/modules/15_development/components/history/AddPage.vue +++ b/src/modules/15_development/components/history/AddPage.vue @@ -60,9 +60,9 @@ function getClass() { } /** ดึงข้อมูล */ -function fetchData() { +async function fetchData() { showLoader(); - http + await http .get(config.API.developmentHistoryListByid("officer", id.value)) .then((res) => { const data = res.data.result; @@ -104,9 +104,9 @@ function fetchData() { } /** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */ -onMounted(() => { +onMounted(async () => { if (id.value) { - fetchData(); + await fetchData(); } }); @@ -232,7 +232,11 @@ onMounted(() => {
- {{ Number(formMainProject.year) + 543 ?? "-" }} + {{ + formMainProject.year + ? Number(formMainProject.year) + 543 + : "-" + }}
diff --git a/src/modules/15_development/components/history/DialogGov.vue b/src/modules/15_development/components/history/DialogGov.vue index 96541bfaa..753b7ecb2 100644 --- a/src/modules/15_development/components/history/DialogGov.vue +++ b/src/modules/15_development/components/history/DialogGov.vue @@ -254,7 +254,6 @@ watch( :options="govOp" map-options emit-value - :class="getClass()" @update:model-value="inputSearch = ''" />
@@ -264,7 +263,6 @@ watch( outlined label="ค้นหา" v-model="inputSearch" - :class="getClass()" :mask="search === 'citizenId' ? '#############' : undefined" /> @@ -274,7 +272,7 @@ watch( class="full-width full-height" unelevated color="teal" - @click="searchFilter()" + @click="(formFilter.page = 1), searchFilter()" > diff --git a/src/modules/15_development/components/historyEmployee/AddPage.vue b/src/modules/15_development/components/historyEmployee/AddPage.vue index 4266de2b1..8319c75e2 100644 --- a/src/modules/15_development/components/historyEmployee/AddPage.vue +++ b/src/modules/15_development/components/historyEmployee/AddPage.vue @@ -235,7 +235,11 @@ onMounted(() => {
- {{ Number(formMainProject.year) + 543 ?? "-" }} + {{ + formMainProject.year + ? Number(formMainProject.year) + 543 + : "-" + }}
diff --git a/src/modules/15_development/components/scholarship/DetailView.vue b/src/modules/15_development/components/scholarship/DetailView.vue index 438cdacbe..463bdf5c8 100644 --- a/src/modules/15_development/components/scholarship/DetailView.vue +++ b/src/modules/15_development/components/scholarship/DetailView.vue @@ -173,9 +173,9 @@ const formBody = reactive({ * ดึงข้อมูลรายละเอียด * @param id จาก id */ -function fetchDataDetail(id: string) { +async function fetchDataDetail(id: string) { showLoader(); - http + await http .get(config.API.devScholarshipByid(id)) .then(async (res) => { const data: DataSholarship = await res.data.result; @@ -303,7 +303,7 @@ function onSubmit() { await http[method](url, formBody); scholarshipId.value - ? fetchDataDetail(scholarshipId.value) + ? await fetchDataDetail(scholarshipId.value) : router.push("/development/scholarship"); success($q, "บันทึกข้อมูลสำเร็จ"); } catch (e) { @@ -374,9 +374,9 @@ function onClickUpdateStatus(type: string) { showLoader(); http .get(config.API.devScholarshipStatus(scholarshipId.value, type)) - .then(() => { + .then(async () => { if (scholarshipId.value) { - fetchDataDetail(scholarshipId.value); + await fetchDataDetail(scholarshipId.value); } }) .catch((err) => { @@ -474,17 +474,12 @@ function upDate(data: DataPerson) { * @param id id ของรายการ */ async function checkFileBackReceived(id: string) { - showLoader(); await http .get( config.API.file("ระบบพัฒนาบุคคล", "ฟอร์มรายงานตัวกลับเข้ารับราชการ", id) ) .then(async (res) => { fileBackReceived.value = res.data.length > 0 ? res.data[0].fileName : ""; - }) - .catch(() => {}) - .finally(() => { - hideLoader(); }); } @@ -560,10 +555,10 @@ const convertCourse = () => { }; /** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */ -onMounted(() => { +onMounted(async () => { if (scholarshipId.value) { - fetchDataDetail(scholarshipId.value); - checkFileBackReceived(scholarshipId.value); + await fetchDataDetail(scholarshipId.value); + await checkFileBackReceived(scholarshipId.value); } }); @@ -621,395 +616,153 @@ onMounted(() => {
- - -
- -
- ข้อมูลราชการ - - เพิ่ม - -
-
-
-
-
-
เลขประจำตัวประชาชน
-
- {{ dataPerson.citizenId }} +
+ + +
+ +
+ ข้อมูลราชการ + + เพิ่ม + +
+
+
+
+
+
เลขประจำตัวประชาชน
+
+ {{ dataPerson.citizenId }} +
+
ชื่อ-นามสกุล
+
+ {{ dataPerson.name }} +
+
ตำแหน่ง
+
+ {{ dataPerson.position }} +
+
ตำแหน่งประเภท
+
+ {{ dataPerson.type }} +
-
ชื่อ-นามสกุล
-
- {{ dataPerson.name }} -
-
ตำแหน่ง
-
- {{ dataPerson.position }} -
-
ตำแหน่งประเภท
-
- {{ dataPerson.type }} +
+
+
+
ระดับตำแหน่ง
+
+ {{ dataPerson.level }} +
+
ตำแหน่งทางการบริหาร
+
+ {{ dataPerson.positionSide }} +
+
หน่วยงานที่สังกัด
+
+ {{ dataPerson.org }} +
-
-
-
ระดับตำแหน่ง
-
- {{ dataPerson.level }} -
-
ตำแหน่งทางการบริหาร
-
- {{ dataPerson.positionSide }} -
-
หน่วยงานที่สังกัด
-
{{ dataPerson.org }}
-
+
+ + เลือกข้าราชการ +
-
-
- - เลือกข้าราชการ - -
- -
- -
-
- -
-
- +
-
- - -
- -
-
- - - - - -
-
+
+
-
-
-
-
- -
-
- -
-
- + + !!val || `${'กรุณาเลือกประเภททุน'}`, + ]" />
-
- - - - - -
-
- - - - - -
-
- + +
-
-
- -
- -
- -
-
@@ -1019,21 +772,24 @@ onMounted(() => { }}