From 7110b3dfc35932f5362005f4fd0f7f2db42ed126 Mon Sep 17 00:00:00 2001 From: "DESKTOP-2S5P7D1\\Windows 10" Date: Tue, 5 Sep 2023 17:31:23 +0700 Subject: [PATCH] comment build error --- .../10_order/components/step/step04.vue | 593 +++++++++++++----- 1 file changed, 447 insertions(+), 146 deletions(-) diff --git a/src/modules/10_order/components/step/step04.vue b/src/modules/10_order/components/step/step04.vue index 8c093072d..e043629aa 100644 --- a/src/modules/10_order/components/step/step04.vue +++ b/src/modules/10_order/components/step/step04.vue @@ -8,7 +8,7 @@ import { useQuasar } from "quasar"; import { useRoute } from "vue-router"; import http from "@/plugins/http"; import config from "@/app.config"; -import { aW } from "@fullcalendar/core/internal-common"; +// import { aW } from "@fullcalendar/core/internal-common"; const mixin = useCounterMixin(); const { @@ -48,11 +48,11 @@ const orderStatusName = ref(""); const orderId = ref(orderId_params.toString()); onMounted(async () => { if (orderId.value) { - showLoader() + showLoader(); await fetchAttachment(orderId.value); await fecthstatusOrder(); await getCommandDetail(); - hideLoader() + hideLoader(); } }); @@ -69,20 +69,22 @@ const getCommandDetail = async () => { fetchReportCover("pdf", orderId.value); - if (code.value != 'c-pm-10' && - code.value != 'c-pm-11' && - code.value != 'c-pm-12' && - code.value != 'c-pm-16' && - code.value != 'c-pm-18' && - code.value != 'c-pm-19' && - code.value != 'c-pm-20' && - code.value != 'c-pm-21') { + if ( + code.value != "c-pm-10" && + code.value != "c-pm-11" && + code.value != "c-pm-12" && + code.value != "c-pm-16" && + code.value != "c-pm-18" && + code.value != "c-pm-19" && + code.value != "c-pm-20" && + code.value != "c-pm-21" + ) { fetchReportAttachment("pdf", orderId.value); } }) .catch((e) => { messageError($q, e); - }) + }); }; const downloadCover = async (type: string) => { @@ -132,7 +134,7 @@ const fetchReportCover = async (type: string, orderId: string) => { }) .catch((e) => { messageError($q, e); - }) + }); }; const fetchReportAttachment = async (type: string, orderId: string) => { @@ -147,7 +149,7 @@ const fetchReportAttachment = async (type: string, orderId: string) => { }) .catch((e) => { messageError($q, e); - }) + }); }; // Fetch file upload & detail @@ -171,7 +173,7 @@ const fetchAttachment = async (orderId: string) => { }) .catch((e) => { messageError($q, e); - }) + }); }; const fecthstatusOrder = async () => { @@ -261,21 +263,23 @@ const saveUpload = () => { myFormUpload.value!.validate().then((success: Boolean) => { if (success) { dialogConfirm($q, async () => { - showLoader() + showLoader(); await postfileOrder(); - if (code.value != 'c-pm-10' && - code.value != 'c-pm-11' && - code.value != 'c-pm-12' && - code.value != 'c-pm-16' && - code.value != 'c-pm-18' && - code.value != 'c-pm-19' && - code.value != 'c-pm-20' && - code.value != 'c-pm-21') { + if ( + code.value != "c-pm-10" && + code.value != "c-pm-11" && + code.value != "c-pm-12" && + code.value != "c-pm-16" && + code.value != "c-pm-18" && + code.value != "c-pm-19" && + code.value != "c-pm-20" && + code.value != "c-pm-21" + ) { await postfileTailer(); } await fetchAttachment(orderId.value); await fecthstatusOrder(); - hideLoader() + hideLoader(); }); } }); @@ -323,8 +327,8 @@ const postfileOrder = async () => { success($q, "บันทึกข้อมูลสำเร็จ"); }) .catch((e) => { - messageError($q, e) - }) + messageError($q, e); + }); }; const postfileTailer = async () => { @@ -336,15 +340,15 @@ const postfileTailer = async () => { success($q, "บันทึกข้อมูลสำเร็จ"); }) .catch((e) => { - messageError($q, e) - }) + messageError($q, e); + }); }; const clickExecute = async (id: string) => { dialogConfirm( $q, async () => { - showLoader() + showLoader(); await http .put(config.API.executeOrder(id)) .then((res) => { @@ -352,11 +356,12 @@ const clickExecute = async (id: string) => { }) .catch((e) => { messageError($q, e); - }).finally(async () => { - await fecthstatusOrder() - await getCommandDetail() - hideLoader(); }) + .finally(async () => { + await fecthstatusOrder(); + await getCommandDetail(); + hideLoader(); + }); }, "ยืนยันการออกคำสั่ง", "ต้องการยืนยันการออกคำสั่งนี้ใช่หรือไม่?" @@ -364,14 +369,18 @@ const clickExecute = async (id: string) => { }; const validateFormUpload = () => { - if (code.value != 'c-pm-10' && - code.value != 'c-pm-11' && - code.value != 'c-pm-12' && - code.value != 'c-pm-16' && - code.value != 'c-pm-18' && - code.value != 'c-pm-19' && - code.value != 'c-pm-20' && - code.value != 'c-pm-21' && fileOrder.value !== null && fileTailer.value !== null) { + if ( + code.value != "c-pm-10" && + code.value != "c-pm-11" && + code.value != "c-pm-12" && + code.value != "c-pm-16" && + code.value != "c-pm-18" && + code.value != "c-pm-19" && + code.value != "c-pm-20" && + code.value != "c-pm-21" && + fileOrder.value !== null && + fileTailer.value !== null + ) { return true; } else if (fileOrder.value !== null) { return true; @@ -382,9 +391,7 @@ const validateFormUpload = () => { const validateForm = () => { return ( - order.value.trim() !== "" && - years.value !== null && - date.value !== null + order.value.trim() !== "" && years.value !== null && date.value !== null ); }; @@ -410,61 +417,108 @@ const viewFileUpload = async (url: string) => {