From 17607f5482d62a14299759d8cb6f63d041f25a85 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Mon, 4 Sep 2023 11:39:44 +0700 Subject: [PATCH 1/5] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=84=E0=B8=A7=E0=B8=B2?= =?UTF-8?q?=E0=B8=A1=E0=B8=97=E0=B8=94=E0=B8=A5=E0=B8=AD=E0=B8=87=E0=B8=87?= =?UTF-8?q?=E0=B8=B2=E0=B8=99=E0=B9=80=E0=B8=9B=E0=B9=87=E0=B8=99=20"?= =?UTF-8?q?=E0=B8=97=E0=B8=94=E0=B8=A5=E0=B8=AD=E0=B8=87=E0=B8=9B=E0=B8=8F?= =?UTF-8?q?=E0=B8=B4=E0=B8=9A=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=AB=E0=B8=99?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interface/request/main/main.ts | 2 +- .../05_placement/components/probation/MainProbation.vue | 6 +++--- .../05_placement/components/probation/ProbationDetail.vue | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index 4b874ec33..a59ba2207 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -216,7 +216,7 @@ const menuList = readonly([ // }, { key: 6.3, - label: "การทดลองงาน", + label: "การทดลองปฏิบัติหน้าที่ราชการ", path: "probation", role: "probation", }, diff --git a/src/modules/05_placement/components/probation/MainProbation.vue b/src/modules/05_placement/components/probation/MainProbation.vue index 37cce33fe..a53f176b6 100644 --- a/src/modules/05_placement/components/probation/MainProbation.vue +++ b/src/modules/05_placement/components/probation/MainProbation.vue @@ -76,7 +76,7 @@ const columns = ref([ { name: "probation_no", align: "center", - label: "ครั้งที่ทดลองงาน", + label: "ครั้งที่ทดลองปฏิบัติหน้าที่ราชการ", sortable: true, field: "probation_no", headerStyle: "font-size: 14px", @@ -94,7 +94,7 @@ const columns = ref([ { name: "probation_status", align: "left", - label: "สถานะการทดลองงาน", + label: "สถานะ", sortable: true, field: "probation_status", headerStyle: "font-size: 14px", @@ -153,7 +153,7 @@ const columns2 = ref([ { name: "status", align: "left", - label: "สะถานะทดลองงาน", + label: "สถานะ", sortable: true, field: "status", headerStyle: "font-size: 14px", diff --git a/src/modules/05_placement/components/probation/ProbationDetail.vue b/src/modules/05_placement/components/probation/ProbationDetail.vue index 21401632f..cd1e9bfa6 100644 --- a/src/modules/05_placement/components/probation/ProbationDetail.vue +++ b/src/modules/05_placement/components/probation/ProbationDetail.vue @@ -185,8 +185,8 @@ const selectStatus = async () => { getpersonalList(); }); }, - "ยืนยันการเปลี่ยนสถานะทดลองงาน", - "ต้องการเปลี่ยนสถานะทดลองงานข้อมูลนี้หรือไม่ ?", + "ยืนยันการเปลี่ยนสถานะการทดลองปฏิบัติหน้าที่ราชการ", + "ต้องการเปลี่ยนสถานะการทดลองปฏิบัติหน้าที่ราชการข้อมูลนี้หรือไม่ ?", () => { probation_status.value = probation_statusold.value; } @@ -272,7 +272,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
-
สถานะการทดลองงาน
+
สถานะการทดลองปฏิบัติหน้าที่ราชการ
Date: Mon, 4 Sep 2023 11:51:38 +0700 Subject: [PATCH 2/5] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=9A?= =?UTF-8?q?=E0=B8=B1=E0=B8=84=20addData=20employee-temp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../08_registryEmployee/views/Information/Tempinformation.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/08_registryEmployee/views/Information/Tempinformation.vue b/src/modules/08_registryEmployee/views/Information/Tempinformation.vue index 464a29614..05c6f9596 100644 --- a/src/modules/08_registryEmployee/views/Information/Tempinformation.vue +++ b/src/modules/08_registryEmployee/views/Information/Tempinformation.vue @@ -603,6 +603,7 @@ const addData = async () => { employeeMoneyIncrease: employeeMoneyIncrease.value, employeeMoneyAllowance: employeeMoneyAllowance.value, employeeMoneyEmployee: employeeMoneyEmployee.value, + employeeMoneyEmployer: employeeMoneyEmployer.value, positionEmployeeGroupId: positionEmployeeGroupId.value, positionEmployeePositionId: positionEmployeePositionId.value, positionEmployeeLineId: positionEmployeeLineId.value, From 059297de06f3f8803394050924ea71936fd11492 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Mon, 4 Sep 2023 13:39:07 +0700 Subject: [PATCH 3/5] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84=E0=B8=B3=E0=B8=AA?= =?UTF-8?q?=E0=B8=B1=E0=B9=88=E0=B8=87=20step=20=E0=B8=AA=E0=B8=B8?= =?UTF-8?q?=E0=B8=94=E0=B8=97=E0=B9=89=E0=B8=B2=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../10_order/components/step/step04.vue | 602 ++++++------------ 1 file changed, 189 insertions(+), 413 deletions(-) diff --git a/src/modules/10_order/components/step/step04.vue b/src/modules/10_order/components/step/step04.vue index b2747c8cd..0ac4959ff 100644 --- a/src/modules/10_order/components/step/step04.vue +++ b/src/modules/10_order/components/step/step04.vue @@ -8,6 +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"; const mixin = useCounterMixin(); const { @@ -47,23 +48,24 @@ const orderStatusName = ref(""); const orderId = ref(orderId_params.toString()); onMounted(async () => { if (orderId.value) { - fetchAttachment(orderId.value); - fecthstatusOrder(orderId.value); - getType(); + showLoader() + await fetchAttachment(orderId.value); + await fecthstatusOrder(); + await getCommandDetail(); + hideLoader() } }); -const getType = async () => { - showLoader(); +const getCommandDetail = async () => { await http .get(config.API.detailOrder(orderId.value)) .then(async (res) => { - const data = res.data.result; - const orderTypeCode = data.orderTypeCode; + const data = await res.data.result; + const orderTypeCode = await data.orderTypeCode; code.value = orderTypeCode ?? ""; orderName.value = res.data.result.orderTitle; orderStatusName.value = data.orderStatusName; - console.log(orderStatusName.value); + // console.log(orderStatusName.value); fetchReportCover("pdf", orderId.value); fetchReportAttachment("pdf", orderId.value); @@ -71,9 +73,6 @@ const getType = async () => { .catch((e) => { messageError($q, e); }) - .finally(() => { - hideLoader(); - }); }; const downloadCover = async (type: string) => { @@ -111,27 +110,22 @@ const downloadAttachment = async (type: string) => { }; const fetchReportCover = async (type: string, orderId: string) => { - showLoader(); await http .get(config.API.reportOrderCover(type, orderId, code.value), { responseType: "blob", }) - .then(async (res) => { + .then((res) => { const blob = new Blob([res.data]); const objectUrl = URL.createObjectURL(blob); orderCoverPdf.value = objectUrl; viewPDF(orderCoverPdf.value); }) .catch((e) => { - // messageError($q, e); + messageError($q, e); }) - .finally(() => { - hideLoader(); - }); }; const fetchReportAttachment = async (type: string, orderId: string) => { - showLoader(); await http .get(config.API.reportOrderAttachment(type, orderId, code.value), { responseType: "blob", @@ -142,15 +136,12 @@ const fetchReportAttachment = async (type: string, orderId: string) => { orderAttachmentPdf.value = objectUrl; }) .catch((e) => { - // messageError($q, e); + messageError($q, e); }) - .finally(() => { - hideLoader(); - }); }; +// Fetch file upload & detail const fetchAttachment = async (orderId: string) => { - showLoader(); await http .get(config.API.attachmentOrder(orderId)) .then(async (res) => { @@ -171,14 +162,11 @@ const fetchAttachment = async (orderId: string) => { .catch((e) => { messageError($q, e); }) - .finally(() => { - hideLoader(); - }); }; -const fecthstatusOrder = async (orderId: string) => { +const fecthstatusOrder = async () => { await http - .get(config.API.orderReady(orderId)) + .get(config.API.orderReady(orderId.value)) .then((res) => { let status = res.data.result; statusOrder.value = status.result; @@ -187,6 +175,7 @@ const fecthstatusOrder = async (orderId: string) => { messageError($q, e); }); }; + const viewPDF = async (pdf: string) => { const pdfData = await usePDF(`${pdf}`); showLoader(); @@ -224,6 +213,7 @@ const page = ref(1); const vuePDFRef = ref(null); const myForm = ref(null); +const myFormUpload = ref(null); const props = defineProps({ next: { @@ -256,16 +246,33 @@ const downloadFile = (response: any, filename: string) => { document.body.removeChild(link); }; -const save = () => { +const saveUpload = () => { + if (myFormUpload.value !== null) { + myFormUpload.value!.validate().then((success: Boolean) => { + if (success) { + dialogConfirm($q, async () => { + showLoader() + await postfileOrder(); + await postfileTailer(); + await fetchAttachment(orderId.value); + await fecthstatusOrder(); + hideLoader() + }); + } + }); + } +}; + +const saveDetail = () => { if (myForm.value !== null) { myForm.value!.validate().then((success: Boolean) => { if (success) { dialogConfirm($q, async () => { + showLoader(); await putOrderData(); - await postfileOrder(); - await postfileTailer(); - await fetchAttachment(orderId.value); - await fecthstatusOrder(orderId.value); + await fetchReportCover("pdf", orderId.value); + await fecthstatusOrder(); + hideLoader(); }); } }); @@ -293,45 +300,60 @@ const postfileOrder = async () => { formData.append("File", fileOrder.value); await http .post(config.API.attachmentOrderId(orderId.value), formData) - .then(() => { - // fileOrder.value = null - }); + .catch((e) => { + messageError($q, e) + }) }; + const postfileTailer = async () => { const formData = new FormData(); formData.append("File", fileTailer.value); await http .post(config.API.attachmentFileId(orderId.value), formData) - .then(() => { - //fileTailer.value = null - }); + .then(()=>{ + success($q, "บันทึกข้อมูลสำเร็จ"); + }) + .catch((e) => { + messageError($q, e) + }) }; const clickExecute = async (id: string) => { dialogConfirm( $q, async () => { + showLoader() await http .put(config.API.executeOrder(id)) .then((res) => { - console.log(res); + success($q, "ออกคำสั่งสำเร็จ"); }) .catch((e) => { messageError($q, e); - }); + }).finally(async()=> { + await fecthstatusOrder() + await getCommandDetail() + hideLoader(); + }) }, "ยืนยันการออกคำสั่ง", "ต้องการยืนยันการออกคำสั่งนี้ใช่หรือไม่?" ); }; -const validateForm = () => { +const validateFormUpload = () => { return ( fileOrder.value !== null && - fileOrder.value !== null && + fileTailer.value !== null + ); +}; + +const validateForm = () => { + return ( order.value.trim() !== "" ); }; + const getClass = (val: boolean) => { return { "card-header-active q-px-lg q-py-md cursor-pointer": val, @@ -354,105 +376,60 @@ const viewFileUpload = async (url: string) => { From d46022d9d6b1a7b93d2e469d3e3bf96f38580bc8 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Mon, 4 Sep 2023 14:20:54 +0700 Subject: [PATCH 5/5] =?UTF-8?q?=E0=B8=9B=E0=B8=B4=E0=B8=94=20history=20?= =?UTF-8?q?=E0=B9=83=E0=B8=99=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2=E0=B8=97?= =?UTF-8?q?=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=A5?= =?UTF-8?q?=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/Information/Tempinformation.vue | 67 +++--- .../views/topEmployeeTemp.vue | 199 ++++++++++++++++++ 2 files changed, 233 insertions(+), 33 deletions(-) create mode 100644 src/modules/08_registryEmployee/views/topEmployeeTemp.vue diff --git a/src/modules/08_registryEmployee/views/Information/Tempinformation.vue b/src/modules/08_registryEmployee/views/Information/Tempinformation.vue index 05c6f9596..74a1e51b4 100644 --- a/src/modules/08_registryEmployee/views/Information/Tempinformation.vue +++ b/src/modules/08_registryEmployee/views/Information/Tempinformation.vue @@ -5,12 +5,11 @@ header="ข้อมูลลูกจ้างชั่วคราว" icon="mdi-account" :save="saveData" - :history="!statusAdd()" :changeBtn="changeBtn" :disable="statusEdit" :cancel="refreshData" - :historyClick="clickHistory" :addEmployee="statusAdd()" + :history="!statusAdd()" />
@@ -199,7 +198,7 @@ import http from "@/plugins/http"; import config from "@/app.config"; import type { DataOption } from "@/modules/04_registry/components/profileType"; import { defaultTempInformation } from "@/modules/04_registry/components/profileType"; -import HeaderTop from "@/modules/04_registry/components/Information/top.vue"; +import HeaderTop from "@/modules/08_registryEmployee/views/topEmployeeTemp.vue"; import HistoryTable from "@/components/TableHistory.vue"; import { useRoute } from "vue-router"; import type { QTableProps } from "quasar"; @@ -421,36 +420,38 @@ const fetchDataSelector = async () => { /** * ฟังชั้นดูข้อมูลประวัติแก้ไขข้อมูลที่เลือก */ -const clickHistory = async () => { - modalHistory.value = true; - showLoader(); - await http - .get(config.API.profileEmployeeTempId(route.params.id.toString())) - .then((res) => { - let data = res.data.result; - rowsHistory.value = []; - data.map((e: any) => { - rowsHistory.value.push({ - EmployeeMoneyIncrease: e.employeeMoneyIncrease, - EmployeeMoneyAllowance: e.employeeMoneyAllowance, - EmployeeMoneyEmployee: e.employeeMoneyEmployee, - EmployeeMoneyEmployer: e.employeeMoneyEmployer, - PositionEmployeeGroupId: e.positionEmployeeGroupId, - PositionEmployeePositionId: e.positionEmployeePositionId, - PositionEmployeeLineId: e.positionEmployeeLineId, - EmployeeTypeIndividual: e.employeeTypeIndividual, - EmployeeOc: e.employeeOc, - EmployeeWage: e.employeeWage, - }); - }); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - hideLoader(); - }); -}; +// const clickHistory = async () => { +// modalHistory.value = true; +// showLoader(); +// await http +// .get(config.API.profileEmployeeTempId(route.params.id.toString())) +// .then((res) => { +// let data = res.data.result; +// rowsHistory.value = []; +// data.map((e: any) => { +// rowsHistory.value.push({ +// employeeMoneyIncrease: e.employeeMoneyIncrease, +// employeeMoneyAllowance: e.employeeMoneyAllowance, +// employeeMoneyEmployee: e.employeeMoneyEmployee, +// employeeMoneyEmployer: e.employeeMoneyEmployer, +// positionEmployeeGroupId: e.positionEmployeeGroupId, +// positionEmployeePositionId: e.positionEmployeePositionId, +// positionEmployeeLineId: e.positionEmployeeLineId, +// employeeTypeIndividual: e.employeeTypeIndividual, +// employeeOc: e.employeeOc, +// employeeWage: e.employeeWage, +// createdFullName: e.createdFullName, +// createdAt: new Date(e.createdAt), +// }); +// }); +// }) +// .catch((e) => { +// messageError($q, e); +// }) +// .finally(() => { +// hideLoader(); +// }); +// }; const refreshData = async () => { myform.value.reset(); diff --git a/src/modules/08_registryEmployee/views/topEmployeeTemp.vue b/src/modules/08_registryEmployee/views/topEmployeeTemp.vue new file mode 100644 index 000000000..ac620aba9 --- /dev/null +++ b/src/modules/08_registryEmployee/views/topEmployeeTemp.vue @@ -0,0 +1,199 @@ + + +