From 92edcfb5338b39c1c0347f09908c3a92ad2cd44a Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 4 Aug 2023 12:07:24 +0700 Subject: [PATCH 1/8] list Order --- src/api/05_placement/api.placement.ts | 11 +- .../OrderPlacement/MainOrderPlacement.vue | 187 ++-- .../OrderPlacement/detailOrderPlacement.vue | 15 +- .../components/OrderPlacement/step/step01.vue | 943 ++++++++++-------- src/modules/05_placement/router.ts | 12 +- src/modules/05_placement/store.ts | 2 + 6 files changed, 658 insertions(+), 512 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 6be4c2dde..5ca86af6d 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -1,6 +1,7 @@ import env from "../index"; const placement = `${env.API_PLACEMENT_URI}/placement`; const orgTree = `${env.API_URI_ORG_TREE}`; +const order = `${env.API_PLACEMENT_URI}`; export default { MainDetail: (year: number) => `${placement}/exam/${year}`, @@ -47,7 +48,13 @@ export default { // position placementPosition: () => `${placement}/position/use`, // putPositiom - putPosition: (id:any) => `${placement}/position/${id}`, + putPosition: (id: any) => `${placement}/position/${id}`, // clear Position - clearPosition: (personalId:string) => `${placement}/position/clear/${personalId}` + clearPosition: (personalId: string) => `${placement}/position/clear/${personalId}`, + + // order + yearOptionsOrder: () => `${order}/order/fiscal-year`, + listOrder: () => `${order}/order`, + typeOrder: () => `${order}/order/order-type`, + examroundOrder: () => `${order}/order/detail/exam-round`, }; diff --git a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue b/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue index 6894b70cd..efc769971 100644 --- a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue +++ b/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue @@ -97,7 +97,7 @@ map-options option-label="name" :options="OrderTypeOption" - option-value="id" + option-value="name" lazy-rules hide-bottom-space :readonly="false" @@ -115,7 +115,7 @@ map-options option-label="name" :options="OrderStatusOption" - option-value="id" + option-value="name" lazy-rules hide-bottom-space :readonly="false" @@ -153,54 +153,30 @@ diff --git a/src/modules/07_insignia/components/4_Allocate/addDetail.vue b/src/modules/07_insignia/components/4_Allocate/addDetail.vue new file mode 100644 index 000000000..7095a5a26 --- /dev/null +++ b/src/modules/07_insignia/components/4_Allocate/addDetail.vue @@ -0,0 +1,678 @@ + + + + + diff --git a/src/modules/07_insignia/components/4_Allocate/allocateAdd.vue b/src/modules/07_insignia/components/4_Allocate/allocateAdd.vue new file mode 100644 index 000000000..9b3597e6a --- /dev/null +++ b/src/modules/07_insignia/components/4_Allocate/allocateAdd.vue @@ -0,0 +1,77 @@ + + diff --git a/src/modules/07_insignia/components/4_Allocate/detail.vue b/src/modules/07_insignia/components/4_Allocate/detail.vue new file mode 100644 index 000000000..514c8d7b9 --- /dev/null +++ b/src/modules/07_insignia/components/4_Allocate/detail.vue @@ -0,0 +1,353 @@ + + + + + diff --git a/src/modules/07_insignia/components/4_Allocate/listAllocate.vue b/src/modules/07_insignia/components/4_Allocate/listAllocate.vue new file mode 100644 index 000000000..d7834ae25 --- /dev/null +++ b/src/modules/07_insignia/components/4_Allocate/listAllocate.vue @@ -0,0 +1,359 @@ + + + + + diff --git a/src/modules/07_insignia/components/DialogHeader.vue b/src/modules/07_insignia/components/DialogHeader.vue new file mode 100644 index 000000000..8aa03351d --- /dev/null +++ b/src/modules/07_insignia/components/DialogHeader.vue @@ -0,0 +1,27 @@ + + diff --git a/src/modules/07_insignia/components/RecordInsignia.vue b/src/modules/07_insignia/components/RecordInsignia.vue index 5cae3b3c6..25d261701 100644 --- a/src/modules/07_insignia/components/RecordInsignia.vue +++ b/src/modules/07_insignia/components/RecordInsignia.vue @@ -22,10 +22,11 @@ > +
-
+
+ +
+ + + +
+
+ + + +
-
- -
-
- -
-
- -
-
- -
-
- - - -
-
- - - +
+
diff --git a/src/modules/07_insignia/router.ts b/src/modules/07_insignia/router.ts index 81ae5c6da..5eb982863 100644 --- a/src/modules/07_insignia/router.ts +++ b/src/modules/07_insignia/router.ts @@ -14,7 +14,16 @@ const insigniaProposals = () => import("@/modules/07_insignia/components/1_Proposals/listProposals.vue"); const roundAdd = () => import("@/modules/07_insignia/components/1_Proposals/addProposals.vue"); - +const listMange = () => + import("@/modules/07_insignia/components/2_Manage/listManage.vue"); +const listAllocate = () => + import("@/modules/07_insignia/components/4_Allocate/listAllocate.vue"); +const allocateAdd = () => + import("@/modules/07_insignia/components/4_Allocate/allocateAdd.vue"); +const allocateDetail = () => + import("@/modules/07_insignia/components/4_Allocate/detail.vue"); +const allocateDetailAdd = () => + import("@/modules/07_insignia/components/4_Allocate/addDetail.vue"); export default [ { path: "/insignia", @@ -87,4 +96,54 @@ export default [ Role: "insignia", }, }, + { + path: "/insignia/manage/list-manage", + name: "insigniaManage", + component: listMange, + meta: { + Auth: true, + Key: [8.6], + Role: "insignia", + }, + }, + { + path: "/insignia/allocate/list-allocate", + name: "insigniaAllocate", + component: listAllocate, + meta: { + Auth: true, + Key: [8.7], + Role: "insignia", + }, + }, + { + path: "/insignia/allocate/allocate-add", + name: "allocateAdd", + component: allocateAdd, + meta: { + Auth: true, + Key: [8.8], + Role: "insignia", + }, + }, + { + path: "/insignia/allocate/detail", + name: "allocateDetail", + component: allocateDetail, + meta: { + Auth: true, + Key: [8.9], + Role: "insignia", + }, + }, + { + path: "/insignia/allocate/detail-add", + name: "allocateDetailAdd", + component: allocateDetailAdd, + meta: { + Auth: true, + Key: [8.9], + Role: "insignia", + }, + }, ]; From d6c5aef69e551e70b8e6e20a5faff86df7aeb9b9 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 4 Aug 2023 14:26:13 +0700 Subject: [PATCH 6/8] api get,delete listOrder --- src/api/05_placement/api.placement.ts | 1 + .../OrderPlacement/MainOrderPlacement.vue | 279 +++++------------- .../components/OrderPlacement/step/step01.vue | 23 +- src/modules/05_placement/store.ts | 2 + 4 files changed, 97 insertions(+), 208 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 5ca86af6d..c2159003a 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -55,6 +55,7 @@ export default { // order yearOptionsOrder: () => `${order}/order/fiscal-year`, listOrder: () => `${order}/order`, + detailOrder:(orderId:string) => `${order}/order/${orderId}`, typeOrder: () => `${order}/order/order-type`, examroundOrder: () => `${order}/order/detail/exam-round`, }; diff --git a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue b/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue index b00790382..8d0e90c74 100644 --- a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue +++ b/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue @@ -156,7 +156,7 @@ {{ props.row.Order }} @@ -186,7 +186,7 @@ flat round color="red" - @click.stop="clickDelete(props.row.id)" + @click.stop="clickDelete(props.row.orderId)" icon="mdi-delete" > ลบข้อมูล @@ -217,7 +217,10 @@ import { onMounted, reactive, ref, useAttrs, computed } from "vue"; import type { QTableProps } from "quasar"; import type { FormOrderPlacementMainData } from "@/modules/05_placement/interface/request/Main"; -import type { DataOption } from "@/modules/05_placement/interface/index/Main"; +import type { + DataOption, + DataOption1, +} from "@/modules/05_placement/interface/index/Main"; import { useCounterMixin } from "@/stores/mixin"; import { useOrderPlacementDataStore } from "@/modules/05_placement/store"; import router from "@/router"; @@ -227,11 +230,10 @@ import config from "@/app.config"; const $q = useQuasar(); //ใช้ noti quasar const mixin = useCounterMixin(); -const { showLoader, hideLoader, messageError, date2Thai, dateText } = mixin; +const { showLoader, hideLoader, messageError, date2Thai, dateText, success } = + mixin; const DataStore = useOrderPlacementDataStore(); - - const pagination = ref({ sortBy: "desc", descending: false, @@ -344,146 +346,17 @@ const columns = ref([ // ข้อมูลตาราง (จำลอง) const rows = ref([ - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2565", - fiscalYear: 2565, - OrderDate: "30 พ.ค. 2565", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "จัดทำร่างคำสั่ง", - OrderType: "คำสั่งย้าย", - }, - - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2565", - fiscalYear: 2565, - OrderDate: "30 พ.ค. 2565", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "จัดทำร่างคำสั่ง", - OrderType: "คำสั่งบรรจุและแต่งตั้ง", - }, - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2564", - fiscalYear: 2564, - OrderDate: "30 พ.ค. 2564", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "บัญชีแนบท้าย", - OrderType: "คำสั่งบรรจุและแต่งตั้ง", - }, - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2564", - fiscalYear: 2564, - OrderDate: "30 พ.ค. 2564", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "บัญชีแนบท้าย", - OrderType: "คำสั่งย้าย", - }, - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2564", - fiscalYear: 2564, - OrderDate: "30 พ.ค. 2564", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "ส่งสำเนาคำสั่ง", - OrderType: "คำสั่งย้าย", - }, - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2564", - fiscalYear: 2564, - OrderDate: "30 พ.ค. 2564", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "ส่งสำเนาคำสั่ง", - OrderType: "คำสั่งบรรจุและแต่งตั้ง", - }, - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2566", - fiscalYear: 2566, - OrderDate: "30 พ.ค. 2566", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "รอลงนาม", - OrderType: "คำสั่งบรรจุและแต่งตั้ง", - }, - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2566", - fiscalYear: 2566, - OrderDate: "30 พ.ค. 2566", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "ออกคำสั่งแล้ว", - OrderType: "คำสั่งแต่งตั้ง", - }, - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2565", - fiscalYear: 2565, - OrderDate: "30 พ.ค. 2565", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "ออกคำสั่งแล้ว", - OrderType: "คำสั่งบรรจุและแต่งตั้ง", - }, - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2566", - fiscalYear: 2566, - OrderDate: "30 พ.ค. 2566", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "ออกคำสั่งแล้ว", - OrderType: "คำสั่งแต่งตั้ง", - }, - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2566", - fiscalYear: 2566, - OrderDate: "30 พ.ค. 2566", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "ออกคำสั่งแล้ว", - OrderType: "คำสั่งย้าย", - }, - - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2564", - fiscalYear: 2564, - OrderDate: "30 พ.ค. 2564", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "ออกคำสั่งแล้ว", - OrderType: "คำสั่งแต่งตั้ง", - }, - - { - Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", - OrderNum: "1/2566", - fiscalYear: 2566, - OrderDate: "30 พ.ค. 2566", - OrderBy: "สำนักงาน กทม.", - Signer: "นาม สมคิด ยอดใจ ", - OrderStatus: "ออกคำสั่งแล้ว", - OrderType: "คำสั่งแต่งตั้ง", - }, + // { + // Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้", + // OrderNum: "1/2565", + // fiscalYear: 2565, + // OrderDate: "30 พ.ค. 2565", + // OrderBy: "สำนักงาน กทม.", + // Signer: "นาม สมคิด ยอดใจ ", + // OrderStatus: "จัดทำร่างคำสั่ง", + // OrderType: "คำสั่งย้าย", + // }, ]); -// const OrderStatusOption = [ -// "ทั้งหมด", -// "ยังไม่ได้บรรจุ", -// "บรรจุแล้ว", -// "ยังไม่ได้ออกคำสั่ง", -// ]; let OriginalData = ref([]); let UpdataData = ref([]); @@ -497,13 +370,27 @@ onMounted(async () => { }); const OriginalDataFetch = async () => { - // API - // await http.get(config.API.listOrder()).then((res: any) => { - // console.log("list", res); - // }); - // .catch((e: any) => { - // messageError($q, e); - // }) + await http + .get(config.API.listOrder()) + .then((res: any) => { + console.log("list", res); + rows.value = res.data.result.map((e: any) => ({ + orderId: e.orderId, + Order: e.orderName, + OrderNum: e.orderNo, + fiscalYear: Number(e.fiscalYear), + OrderDate: date2Thai(e.orderDate), + OrderBy: e.orderBy, + Signer: "นาม สมคิด ยอดใจ ", + OrderStatus: e.orderStatusName, + orderStatusValue: e.orderStatusValue, + OrderType: e.orderTypeName, + orderTypeValue: e.orderTypeValue, + })); + }) + .catch((e: any) => { + messageError($q, e); + }); // .finally(async () => { // }); await DataStore.DataMainOrder(rows.value); @@ -513,7 +400,6 @@ const OriginalDataFetch = async () => { // ดูรายการหน้าต่อไป const redirectToPage = (id?: string) => { - console.log(id); router.push(`/placement/order/detail/${id}`); }; @@ -528,27 +414,27 @@ const clickDelete = (id: string) => { persistent: true, }) .onOk(async () => { - // await deleteData(id); + await deleteData(id); }) .onCancel(() => {}) .onDismiss(() => {}); }; -// const deleteData = async (id: string) => { -// showLoader(); -// await http -// .delete(config.API.orderReplace(id)) -// .then((res) => { -// success($q, "ลบข้อมูลสำเร็จ"); -// }) -// .catch((e) => { -// messageError($q, e); -// }) -// .finally(async () => { -// hideLoader(); -// await fetchData(); -// }); -// }; +const deleteData = async (id: string) => { + showLoader(); + await http + .delete(config.API.detailOrder(id)) + .then((res) => { + success($q, "ลบข้อมูลสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(async () => { + hideLoader(); + await OriginalDataFetch(); + }); +}; const clickAdd = () => { router.push({ name: "Orderplacementadd" }); @@ -568,14 +454,13 @@ const fiscalyearOP = reactive([{ id: 0, name: "ทั้งหม const addedfiscalYearValues: number[] = []; const fiscalYearFilter = async () => { await http.get(config.API.yearOptionsOrder()).then((res) => { - console.log(res); + // console.log(res); const response = res.data.result; fiscalyearOP.push(...response); // const maxNumber = fiscalyearOP.reduce((max: any, e: any) => { // return e.id > max ? e.id : max; // }, ""); // fiscalyear.value = maxNumber; - // console.log(fiscalyear.value); }); // API // await http @@ -607,13 +492,13 @@ const fiscalYearFilter = async () => { }; const OrderType = ref(""); -const OrderTypeOption = reactive([{ id: 0, name: "ทั้งหมด" }]); +const OrderTypeOption = reactive([{ id: "", name: "ทั้งหมด" }]); const addedOrderTypeValues: string[] = []; const OrderTypeFilter = async () => { await http .get(config.API.typeOrder()) .then((res) => { - console.log(res.data); + // console.log(res.data); const response = res.data.result; OrderTypeOption.push(...response); }) @@ -660,7 +545,9 @@ const OrderStatus = ref(""); const OrderStatusText = ref( DataStore.DataMainOrigOrder ); -const OrderStatusOption = reactive([{ id: 1, name: "ทั้งหมด" }]); +const OrderStatusOption = reactive([ + { id: "", name: "ทั้งหมด" }, +]); const addedOrderStatusValues: string[] = []; const OrderStatusFilter = async () => { // API @@ -677,7 +564,6 @@ const OrderStatusFilter = async () => { // }); for (let data of OriginalData.value) { const OrderStatusValue = data.OrderStatus; - console.log(OrderStatusValue); if ( OrderStatusValue === null || @@ -687,35 +573,17 @@ const OrderStatusFilter = async () => { } if (!addedOrderStatusValues.includes(OrderStatusValue)) { + // console.log(OrderStatusValue); + OrderStatusOption.push({ // id: OrderStatusValue, - id: OrderStatusOption.length, + id: OrderStatusOption.length.toString(), name: OrderStatusValue, }); addedOrderStatusValues.push(OrderStatusValue); } } }; - -// เลือกปีงบประมาณตาม API -const searchfiscalyear = async () => { - const yearNum = fiscalyear.value! + 543; - - await DataStore.DataUpdateOrder(OrderType.value, OrderStatus.value, yearNum); - UpdataData.value = DataStore.DataMainUpdateOrder; - - // API - // await http - // .get(config.API.// ตัวอย่าง) - // .then((res: any) => { - // }) - // .catch((e: any) => { - // messageError($q, e); - // }) - // .finally(async () => { - // }); -}; - // ค้นหาในตาราง const filterKeyword = ref(""); const filterRef = ref(null); @@ -727,22 +595,27 @@ const resetFilter = () => { const attrs = ref(useAttrs()); const searchFilterTable = async () => { - if (fiscalyear.value !== null && fiscalyear.value !== 0) { - fiscalyear.value += 543; + if (OrderType.value == "ทั้งหมด") { + OrderType.value = ""; } - console.log(fiscalyear.value, OrderType.value, OrderStatus.value); + if (OrderStatus.value == "ทั้งหมด") { + OrderStatus.value = ""; + } + console.log( + "Input value changed:", + OrderType.value, + OrderStatus.value, + fiscalyear.value + ); - // console.log('Input value changed:', examTime.value, examType.value, expiredAccount.value); await DataStore.DataUpdateOrder( OrderType.value, OrderStatus.value, fiscalyear.value ); UpdataData.value = DataStore.DataMainUpdateOrder; - console.log(UpdataData.value); + // console.log(UpdataData.value); }; -// UpdataData.value = DataStore.DataMainUpdate; -// console.log("Input value changed:", OrderStatus.value, OrderType.value); const paging = ref(true); const paginationLabel = (start: string, end: string, total: string) => { diff --git a/src/modules/05_placement/components/OrderPlacement/step/step01.vue b/src/modules/05_placement/components/OrderPlacement/step/step01.vue index 250093399..526d9a895 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step01.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step01.vue @@ -511,9 +511,10 @@ const clickEditRow = () => (editRow.value = true); onMounted(async () => { if (orderId) { await fetchdetailOrder(); + } else { + fecthTypeOption(); + fecthExamRoundOption(); } - fecthTypeOption(); - fecthExamRoundOption(); // const data = localStorage.getItem("formData"); // if (data) { @@ -537,6 +538,20 @@ onMounted(async () => { const fetchdetailOrder = async () => { showLoader(); console.log(orderId); + let orderIdString = orderId.toString(); + await http + .get(config.API.detailOrder(orderIdString)) + .then((res) => { + console.log(res); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + fecthTypeOption(); + fecthExamRoundOption(); + }); }; const fecthTypeOption = async () => { await http @@ -567,7 +582,7 @@ const submit = async () => { orderBy: byOrder.value, signatoryBy: nameCommand.value, signatoryPosition: positionCommand.value, - examRound: test.value, + examRound: examRound.value, registerPosition: position.value, conclusionRegisterNo: register.value, conclusionRegisterDate: dateRegister.value, @@ -586,9 +601,7 @@ const submit = async () => { persistent: true, }).onOk(async () => { showLoader(); - // localStorage.setItem("formData", JSON.stringify(formdata)); createListOrder(formdata); - // next(); }); } }); diff --git a/src/modules/05_placement/store.ts b/src/modules/05_placement/store.ts index 283530593..0fca902c5 100644 --- a/src/modules/05_placement/store.ts +++ b/src/modules/05_placement/store.ts @@ -269,6 +269,8 @@ export const useOrderPlacementDataStore = defineStore("placementOrder", () => { item.OrderStatus === filter_2 && item.fiscalYear === filterYear ); + } else if (filter_1 == "ทั้งหมด" && filter_2 == "ทั้งหมด" && filterYear !== null) { + DataMainUpdateOrder.value = DataMainOrigOrder.value; } }; From 7ee07b9d851d28126eafe8eabeb3ac7979e4911a Mon Sep 17 00:00:00 2001 From: Thanit Konmek Date: Fri, 4 Aug 2023 14:52:57 +0700 Subject: [PATCH 7/8] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5?= =?UTF-8?q?=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89?= =?UTF-8?q?=E0=B8=B2=E0=B8=87=E0=B8=8A=E0=B8=B1=E0=B9=88=E0=B8=A7=E0=B8=84?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../08_registryEmployee/request/Main.ts | 10 +- .../08_registryEmployee/views/Main.vue | 294 +++++++++--------- 2 files changed, 160 insertions(+), 144 deletions(-) diff --git a/src/modules/08_registryEmployee/request/Main.ts b/src/modules/08_registryEmployee/request/Main.ts index ed0a008b2..78ad46293 100644 --- a/src/modules/08_registryEmployee/request/Main.ts +++ b/src/modules/08_registryEmployee/request/Main.ts @@ -16,10 +16,14 @@ interface FormRegistryEmployee { dateAppoint: String | null; dateStart: String | null; createdAt: String | null; -// salaryDate: String | null; + // salaryDate: String | null; isLeave: String; -// leaveReason: string; + // leaveReason: string; leaveDateOrder: String | null; + draftPositionEmployee: String | null; + draftOrganizationOrganization: String | null; + newAgency: String | null; + currentAgency: String | null; } interface ResponseEmployeeTemp { id: string; @@ -43,5 +47,7 @@ interface ResponseEmployeeTemp { isLeave: boolean; leaveReason: string; leaveDateOrder: Date | null; + draftPositionEmployee: String | null; + draftOrganizationOrganization: String | null; } export type { ResponseEmployeeTemp, FormRegistryEmployee }; diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index 4e5908aea..36e9e8553 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -56,18 +56,12 @@
- - - +
@@ -416,18 +445,6 @@ - @@ -439,7 +456,7 @@ - + From fef7c21fcd2125cfa1e6751d0f3d346388b74a37 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Fri, 4 Aug 2023 15:12:23 +0700 Subject: [PATCH 8/8] =?UTF-8?q?fix=20api=20=E0=B8=AD=E0=B8=AD=E0=B8=81?= =?UTF-8?q?=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=20&=20se?= =?UTF-8?q?t=20value=20step=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.placement.ts | 4 +- .../OrderPlacement/MainOrderPlacement.vue | 2 +- .../components/OrderPlacement/step/step01.vue | 342 +++++------------- 3 files changed, 89 insertions(+), 259 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index c2159003a..94259b628 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -54,8 +54,10 @@ export default { // order yearOptionsOrder: () => `${order}/order/fiscal-year`, + createOrder: () => `${order}/order/detail`, listOrder: () => `${order}/order`, - detailOrder:(orderId:string) => `${order}/order/${orderId}`, + detailOrder:(orderId:string) => `${order}/order/detail/${orderId}`, + deleteOrder:(orderId:string) => `${order}/order/${orderId}`, typeOrder: () => `${order}/order/order-type`, examroundOrder: () => `${order}/order/detail/exam-round`, }; diff --git a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue b/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue index 8d0e90c74..ea465c3e6 100644 --- a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue +++ b/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue @@ -423,7 +423,7 @@ const clickDelete = (id: string) => { const deleteData = async (id: string) => { showLoader(); await http - .delete(config.API.detailOrder(id)) + .delete(config.API.deleteOrder(id)) .then((res) => { success($q, "ลบข้อมูลสำเร็จ"); }) diff --git a/src/modules/05_placement/components/OrderPlacement/step/step01.vue b/src/modules/05_placement/components/OrderPlacement/step/step01.vue index 526d9a895..300a25878 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step01.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step01.vue @@ -3,24 +3,10 @@
- + @@ -29,73 +15,36 @@
- +
- +
- +
- +
- + @@ -103,24 +52,12 @@ {{ parseInt(value + 543) }}