diff --git a/src/modules/04_registryPerson/components/detail/PersonalInformation/04_FamilyNew.vue b/src/modules/04_registryPerson/components/detail/PersonalInformation/04_FamilyNew.vue index 4d84657b1..23c69e2bb 100644 --- a/src/modules/04_registryPerson/components/detail/PersonalInformation/04_FamilyNew.vue +++ b/src/modules/04_registryPerson/components/detail/PersonalInformation/04_FamilyNew.vue @@ -177,6 +177,7 @@ const coupleData = reactive({ job: "", lastNameOld: "", statusMarital: "", + isCouple: false, // ใช้สำหรับการแสดงผลใน UI }); const childData = ref([]); @@ -266,6 +267,7 @@ async function fetchDataCouple() { coupleData.job = data.coupleCareer; coupleData.lastNameOld = data.coupleLastNameOld; coupleData.statusMarital = data.relationship; + coupleData.isCouple = data.couple; } }) .catch((err) => { @@ -677,7 +679,7 @@ onMounted(async () => { > -
+
{
- +
คู่สมรส
diff --git a/src/modules/04_registryPerson/interface/index/family.ts b/src/modules/04_registryPerson/interface/index/family.ts index 395bbcdfd..cc8e78b38 100644 --- a/src/modules/04_registryPerson/interface/index/family.ts +++ b/src/modules/04_registryPerson/interface/index/family.ts @@ -7,6 +7,7 @@ interface FormPerson { job: string; lastNameOld?: string; statusMarital?: string; + isCouple?: boolean; } interface ChildrenFamily { diff --git a/src/modules/06_retirement/views/08_dismissOrderEmp.vue b/src/modules/06_retirement/views/08_dismissOrderEmp.vue index fc0a7bdde..2e65aa5e9 100644 --- a/src/modules/06_retirement/views/08_dismissOrderEmp.vue +++ b/src/modules/06_retirement/views/08_dismissOrderEmp.vue @@ -282,7 +282,6 @@ onMounted(async () => {
- {{ filterKeyword }} { + .then(async () => { await props.getData(); success($q, `ลบไฟล์สำเร็จ`); }) .catch((e) => { messageError($q, e); }) - .finally(() => {}); + .finally(() => { + hideLoader(); + }); } /** @@ -188,7 +190,7 @@ function upLoadFileDoc() { showLoader(); http .put(config.API.complaintFileUpload(formData.id), Data) - .then(async (res) => { + .then(async () => { await props.getData(); countNum.value = 2; formData.documentFile = null; @@ -198,7 +200,7 @@ function upLoadFileDoc() { .catch((e) => { messageError($q, e); }) - .finally(async () => { + .finally(() => { hideLoader(); }); } @@ -215,7 +217,6 @@ async function addPerson(data: any, type?: string) { /** ดึงข้อมูล active */ async function getActive() { if (!formData.activeId) { - showLoader(); await http .get(config.API.activeOrganization) .then(async (res) => { @@ -225,16 +226,12 @@ async function getActive() { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { - hideLoader(); }); } } /** ดึงข้อมูลหน่วยงานจาก api */ async function getOc(activeId: string) { - showLoader(); await http .get(config.API.orgByIdSystem(activeId, route.meta.Key as string)) .then(async (res) => { @@ -246,9 +243,6 @@ async function getOc(activeId: string) { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { - hideLoader(); }); } @@ -264,8 +258,8 @@ function deletePerson(id: string) { } /** ช่องทางการร้องเรียน และฟังก์ชั่นการดึงข้อมูลช่องทางการร้องเรียนมาจาก api*/ -function getListChannel() { - http +async function getListChannel() { + await http .get( config.API.complaintListOp( mainStore.pathComplaintsChannal(route.name as string) @@ -386,7 +380,12 @@ watch(props.data, async () => { /** โหลดข้อมูลเมื่อเข้าหน้านี้ */ onMounted(async () => { mainStore.rowsAdd = []; - await Promise.all([getActive(), getListChannel()]); + try { + showLoader(); + await Promise.all([getActive(), getListChannel()]); + } finally { + hideLoader(); + } }); diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue index 1fd503615..28bd4e0a9 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue @@ -526,10 +526,10 @@ async function saveDuty(id: string, duty: string, resolution: string) { duty: duty, commandNo: resolution, }) - .then((res: any) => { + .then(async () => { + await props.getData?.(); success($q, "บันทึกสำเร็จ"); closeEditDirector(); - props.getData?.(); }) .catch((e) => { messageError($q, e); diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue index c0acb1948..20c0b1308 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue @@ -619,7 +619,7 @@ function emitPerson(data: PersonsArray[]) { .post(config.API.disciplinaryReport(), { Id: dataMapId, }) - .then((res) => { + .then(() => { getActive(); }) .catch((e) => { @@ -648,10 +648,10 @@ async function saveDuty(id: string, duty: string, resolution: string) { duty: duty, commandNo: resolution, }) - .then((res: any) => { + .then(async () => { + await props.fetchData(); success($q, "บันทึกสำเร็จ"); closeEditDirector(); - props.fetchData(); }) .catch((e) => { messageError($q, e); diff --git a/src/modules/11_discipline/components/4_Result/Form.vue b/src/modules/11_discipline/components/4_Result/Form.vue index d8bfabf96..8d5d433d5 100644 --- a/src/modules/11_discipline/components/4_Result/Form.vue +++ b/src/modules/11_discipline/components/4_Result/Form.vue @@ -161,17 +161,20 @@ async function selectComplainant(val: string) { */ function onSubmit() { dialogConfirm($q, async () => { + showLoader(); await http .put(config.API.listResultById(id.value), formData) - .then(() => { + .then(async () => { + await props.fetchData(); isSave.value = false; success($q, "บันทึกข้อมูลสำเร็จ"); - props.fetchData(); }) .catch((err) => { messageError($q, err); }) - .finally(async () => {}); + .finally(() => { + hideLoader(); + }); }); } @@ -194,7 +197,6 @@ function changeFormData() { /**เมื่อเริ่มโหลดหน้า * ส่งข้อมูลจำลองไปยัง store */ - function uploadFile() { /** uploadFile */ const Data = new FormData(); @@ -202,7 +204,7 @@ function uploadFile() { showLoader(); http .put(config.API.upLoadFileResult(id.value), Data) - .then(async (res) => { + .then(async () => { await props.fetchData(); countNum.value = 2; success($q, "อัปโหลดไฟล์สำเร็จ"); @@ -229,7 +231,7 @@ function confirmDelete(docid: string) { showLoader(); http .delete(config.API.deleteFileResult(id.value, docid)) - .then(async (res) => { + .then(async () => { await props.fetchData(); success($q, `ลบไฟล์สำเร็จ`); }) @@ -294,15 +296,17 @@ function onFaultSubmit() { offense: JSON.stringify(checkValue.value), remark: remark.value, }) - .then((res) => { + .then(async () => { + await props.fetchData(); success($q, "ระบุฐานความผิด สำเร็จ"); close(); - props.fetchData(); }) .catch((e) => { messageError($q, e); }) - .finally(() => {}); + .finally(() => { + hideLoader(); + }); }); } else { dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 มาตรา"); diff --git a/src/modules/13_salary/components/04_salaryLists/TabMain.vue b/src/modules/13_salary/components/04_salaryLists/TabMain.vue index 84836c688..a1266e979 100644 --- a/src/modules/13_salary/components/04_salaryLists/TabMain.vue +++ b/src/modules/13_salary/components/04_salaryLists/TabMain.vue @@ -364,7 +364,11 @@ function onClickDownload(data: DataOption, type: string = "xlsx") { data.id === "gov-08" || data.id === "gov-10"; - const finalUrl = isGovernmentId ? `${url}/${store.tabGroup}` : url; + const finalUrl = isGovernmentId + ? `${url}/${store.tabGroup}${ + data.id === "gov-04" ? `/${data.typeName}` : "" + }` + : url; http .get(finalUrl) .then(async (res) => { diff --git a/src/modules/13_salary/store/SalaryListsStore.ts b/src/modules/13_salary/store/SalaryListsStore.ts index c7491fe98..f2d82c345 100644 --- a/src/modules/13_salary/store/SalaryListsStore.ts +++ b/src/modules/13_salary/store/SalaryListsStore.ts @@ -75,7 +75,13 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => { }, { id: "gov-04", - name: "แบบ 1 กท รอบเมษายน", + name: "แบบ 1 กท รอบเมษายน (0.5 ขั้น)", + typeName: "HAFT", + }, + { + id: "gov-04", + name: "แบบ 1 กท รอบเมษายน (1 ขั้น)", + typeName: "FULL", }, { id: "gov-05", @@ -121,7 +127,18 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => { }, { id: "gov-04", - name: "แบบ 1 กท รอบตุลาคม", + name: "แบบ 1 กท รอบตุลาคม (0.5 ขั้น)", + typeName: "HAFT", + }, + { + id: "gov-04", + name: "แบบ 1 กท รอบตุลาคม (1 ขั้น)", + typeName: "FULL", + }, + { + id: "gov-04", + name: "แบบ 1 กท รอบตุลาคม (1.5 ขั้น)", + typeName: "FULLHAFT", }, { id: "gov-04-01", diff --git a/src/modules/16_positionEmployee/components/DialogSelectPerson.vue b/src/modules/16_positionEmployee/components/DialogSelectPerson.vue index e1a171523..4d50cef94 100644 --- a/src/modules/16_positionEmployee/components/DialogSelectPerson.vue +++ b/src/modules/16_positionEmployee/components/DialogSelectPerson.vue @@ -536,6 +536,7 @@ watch( label="ค้นหาจากชื่อ-นามสกุล หรือเลขประจำตัวประชาชน" lazy-rules hide-bottom-space + @keydown.enter.prevent="getSearch()" />
@@ -549,6 +550,7 @@ watch( label="ตำแหน่ง" lazy-rules hide-bottom-space + @keydown.enter.prevent="getSearch()" />
@@ -560,20 +562,24 @@ watch( :options="typeOps" emit-value dense - @update:model-value="updateSelectType" + @update:model-value=" + updateSelectType(formData.positionType), getSearch() + " map-options outlined option-label="name" option-value="id" lazy-rules hide-bottom-space - > +
+ /> + +
diff --git a/src/modules/20_positionTemp/components/DialogSelectPerson.vue b/src/modules/20_positionTemp/components/DialogSelectPerson.vue index 1e6413433..6498094be 100644 --- a/src/modules/20_positionTemp/components/DialogSelectPerson.vue +++ b/src/modules/20_positionTemp/components/DialogSelectPerson.vue @@ -534,6 +534,7 @@ watch( label="ค้นหาจากชื่อ-นามสกุล หรือเลขประจำตัวประชาชน" lazy-rules hide-bottom-space + @keydown.enter.prevent="getSearch()" />
@@ -547,6 +548,7 @@ watch( label="ตำแหน่ง" lazy-rules hide-bottom-space + @keydown.enter.prevent="getSearch()" />
@@ -564,13 +566,16 @@ watch( option-value="id" lazy-rules hide-bottom-space - > +