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 }}
-
+
+
+ เลือกข้าราชการ
+
-
-
-
- เลือกข้าราชการ
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
+
+ !!val || `${'กรุณาเลือกประเภททุน'}`,
+ ]"
/>
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
@@ -1019,21 +772,24 @@ onMounted(() => {
}}
!!val || `${'กรุณาเลือกปีงบประมาณที่ได้รับทุน'}`,
+ ]"
>
{
-
+
+
+
-
+
+
+
+
+
+
{
outlined
:class="classInput(!checkRouteDetail)"
:model-value="
- formBody.reportBackNoDate
- ? date2Thai(formBody.reportBackNoDate)
+ formBody.bookNoDate
+ ? date2Thai(formBody.bookNoDate)
: null
"
:label="`${'ลงวันที่'}`"
hide-bottom-space
:rules="[
- (val: string) =>
- !!val || `${'กรุณาเลือกวันที่'}`,
- ]"
+ (val: string) =>
+ !!val || `${'กรุณาเลือกวันที่'}`,
+ ]"
>
{
-
+
{{ year + 543 }}
{{
@@ -1120,21 +929,21 @@ onMounted(() => {
}}
+ !!val || `${'กรุณาเลือกวันที่หนังสืออนุมัติเมื่อวันที่'}`,
+ ]"
>
{
-
-
-
- ข้อมูลผู้ค้ำประกัน
-
- เพิ่ม
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
เลขประจำตัวประชาชน
-
- {{ dataGuarantor.citizenId }}
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ข้อมูลผู้ค้ำประกัน
+
+ เพิ่ม
+
+
+
+
+
+
+
เลขประจำตัวประชาชน
+
+ {{ dataGuarantor.citizenId }}
+
+
ชื่อ-นามสกุล
+
+ {{ dataGuarantor.name }}
+
+
ตำแหน่ง
+
+ {{ dataGuarantor.position }}
+
+
ตำแหน่งประเภท
+
+ {{ dataGuarantor.type }}
+
-
ชื่อ-นามสกุล
-
- {{ dataGuarantor.name }}
-
-
ตำแหน่ง
-
- {{ dataGuarantor.position }}
-
-
ตำแหน่งประเภท
-
- {{ dataGuarantor.type }}
+
+
+
+
ระดับตำแหน่ง
+
+ {{ dataGuarantor.level }}
+
+
ตำแหน่งทางการบริหาร
+
+ {{ dataGuarantor.positionSide }}
+
+
หน่วยงานที่สังกัด
+
+ {{ dataGuarantor.org }}
+
-
-
-
ระดับตำแหน่ง
-
- {{ dataGuarantor.level }}
-
-
ตำแหน่งทางการบริหาร
-
- {{ dataGuarantor.positionSide }}
-
-
หน่วยงานที่สังกัด
-
- {{ dataGuarantor.org }}
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
+ )
+ "
+ >
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
+ )
+ "
+ >
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
- {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ year + 543 }}
- {{
- parseInt(value + 543)
- }}
-
-
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+ )
+ "
+ >
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- บันทึกข้อมูล
-
-
-
+
+
+ บันทึกข้อมูล
+
+
+
+
diff --git a/src/modules/15_development/views/EmployeeHistory.vue b/src/modules/15_development/views/EmployeeHistory.vue
index eca482159..eec0c747b 100644
--- a/src/modules/15_development/views/EmployeeHistory.vue
+++ b/src/modules/15_development/views/EmployeeHistory.vue
@@ -134,12 +134,13 @@ const columns = ref
([
]);
/** ดึงข้อมูลหน่วยงาน เเละ เรียกใช้ฟังชั่น ดึงข้อมูล */
-function fetchListOrg() {
+async function fetchListOrg() {
showLoader();
- http
+ await http
.get(config.API.developmentHistoryListOrg("employee", formFilter.year))
.then(async (res) => {
formFilter.root = null;
+ formFilter.page = 1;
rows.value = [];
const option = [{ name: "ทั้งหมด", id: null }];
const optionNew = await res.data.result.map((e: string) => ({
@@ -192,9 +193,9 @@ function onEdit(id: string) {
}
/** ดึงข้อมูล */
-function getData() {
+async function getData() {
showLoader();
- http
+ await http
.post(config.API.developmentHistoryList("employee"), formFilter)
.then((res) => {
const data = res.data.result.data;
@@ -241,8 +242,8 @@ watch(
);
/** ดึงข้อมูลเมื่อโหลดหน้าเสร็จสิ้น */
-onMounted(() => {
- fetchListOrg();
+onMounted(async () => {
+ await fetchListOrg();
});
@@ -387,7 +388,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
-
style="min-width: 140px"
/>
diff --git a/src/modules/15_development/views/History.vue b/src/modules/15_development/views/History.vue
index 2c9e27452..8866491f9 100644
--- a/src/modules/15_development/views/History.vue
+++ b/src/modules/15_development/views/History.vue
@@ -167,10 +167,12 @@ function fetchListOrg() {
}));
option.push(...optionNew);
agencyOp.value = option;
- getData();
+ await getData();
})
.catch((err) => {
messageError($q, err);
+ })
+ .finally(() => {
hideLoader();
});
}
@@ -178,9 +180,9 @@ function fetchListOrg() {
/**
* function เรียกข้อมูลรายการประวัติการฝึกอบรม/ดูงานของข้าราชการกรุงเทพมหานครสามัญ
*/
-function getData() {
+async function getData() {
showLoader();
- http
+ await http
.post(config.API.developmentHistoryList("officer"), formFilter)
.then((res) => {
const data = res.data.result.data;
@@ -217,10 +219,9 @@ function onDownload(type: string) {
year: formFilter.year,
root: formFilter.root,
})
- .then((res) => {
- const dataList = res.data.result;
-
- genReportXLSX(
+ .then(async (res) => {
+ const dataList = await res.data.result;
+ await genReportXLSX(
dataList,
"รายการประวัติการฝึกอบรม/ดูงานของข้าราชการกรุงเทพมหานครสามัญ",
type
@@ -408,7 +409,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
-
style="min-width: 140px"
/>
diff --git a/src/modules/15_development/views/Scholarship.vue b/src/modules/15_development/views/Scholarship.vue
index de34070b2..3ad5622ad 100644
--- a/src/modules/15_development/views/Scholarship.vue
+++ b/src/modules/15_development/views/Scholarship.vue
@@ -11,7 +11,6 @@ import genReportXLSX from "@/plugins/genreportxlsx";
import type {
DataOption,
- ItemsDownload,
NewPagination,
} from "@/modules/15_development/interface/index/Main";
import type { ListSholarship } from "@/modules/15_development/interface/response/Scholarship";
@@ -327,7 +326,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
-
style="min-width: 140px"
/>