From 03c41dae6c924dbd059fbe88c88fef3108063daf Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 6 Aug 2024 16:04:14 +0700 Subject: [PATCH 1/3] updated develop form --- .../15_development/components/BasicInfo.vue | 70 +++++++++++++------ 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/src/modules/15_development/components/BasicInfo.vue b/src/modules/15_development/components/BasicInfo.vue index 5a1163aa7..75dd64fec 100644 --- a/src/modules/15_development/components/BasicInfo.vue +++ b/src/modules/15_development/components/BasicInfo.vue @@ -19,6 +19,9 @@ const mixin = useCounterMixin(); const { dialogConfirm, showLoader, hideLoader, messageError, success } = mixin; const projectId = ref(route.params.id.toLocaleString()); +const props = defineProps({ + nextStep: { type: Function, required: true }, +}); const checkRoutePermission = ref( route.name == "developmentDetailPage" ); @@ -75,21 +78,22 @@ function fetchData(id: string) { /** function บันทึกข้อมูล*/ function onSubmit() { - dialogConfirm($q, () => { - showLoader(); - http - .put(config.API.developmentMainTab("tab1", projectId.value), formData) - .then(() => { - fetchData(projectId.value); - success($q, "บันทึกข้อมูลสำเร็จ"); - }) - .catch((err) => { - messageError($q, err); - }) - .finally(() => { - hideLoader(); - }); - }); + // dialogConfirm($q, () => { + showLoader(); + http + .put(config.API.developmentMainTab("tab1", projectId.value), formData) + .then(() => { + fetchData(projectId.value); + // success($q, "บันทึกข้อมูลสำเร็จ"); + props.nextStep(); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); + // }); } /** function fetch หา Id หน่วยงานที่ Active*/ @@ -149,7 +153,13 @@ onMounted(async () => {
หน่วยงาน/ส่วนราชการ
- +