From d25bf232750be4d9d5830c6ccd77de81c00ff343 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 25 Aug 2023 17:57:03 +0700 Subject: [PATCH 1/2] =?UTF-8?q?api=20=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84?= =?UTF-8?q?=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../10_order/components/step/step01.vue | 211 +++++++++++++++++- 1 file changed, 200 insertions(+), 11 deletions(-) diff --git a/src/modules/10_order/components/step/step01.vue b/src/modules/10_order/components/step/step01.vue index 84aa15ad2..9979cb946 100644 --- a/src/modules/10_order/components/step/step01.vue +++ b/src/modules/10_order/components/step/step01.vue @@ -191,11 +191,20 @@ const receiveOcOption = ref([ id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", }, ]); +// C-PM-14 +const transferOrganizationName = ref(""); // C-PM-16 const orderNumber = ref(); const orderNumberDate = ref(new Date()); +// C-PM-18-20 +const fault = ref(""); +const guiltyBasis = ref(""); +const conclusionFireNo = ref(""); +const conclusionFireDate = ref(new Date()); +const conclusionFireResolution = ref(""); + onMounted(async () => { if (orderId) { fecthTypeOption("hasData"); @@ -251,9 +260,8 @@ const fetchdetailOrder = async () => { await http .get(config.API.detailOrder(orderIdString)) .then((res: any) => { - // console.log(typeOrderOption.value); - const data = res.data.result; + console.log(data); typeOrder.value = typeOrderOption.value.find( (e) => e.id === data.orderTypeValue ); @@ -271,6 +279,57 @@ const fetchdetailOrder = async () => { conclusionRegisterDate.value = data.conclusionRegisterDate; conclusionResultNo.value = data.conclusionResultNo; conclusionResultDate.value = data.conclusionResultDate; + // 05 -06 + meeting.value = data.conclusionMeetingNo; + dateMeeting.value = data.conclusionMeetingDate; + + // 08 + conclusionReceive.value = data.conclusionReturnNo; + conclusionReceiveDate.value = data.conclusionReturnDate; + + //09 + organizations.value = data.sourceOrganizationName; + order.value = data.conclusionReturnNo; + orderDate.value = data.conclusionReturnDate; + book.value = data.militaryCommandNo; + bookDate.value = data.militaryCommandDate; + + //10 + organizationsOld.value = data.placementCommandIssuer; + orderOld.value = data.placementCommandNo; + orderOldDate.value = data.placementCommandDate; + locationname.value = data.placementPositionName; + experimentOc.value = data.placementOrganizationName; + experimentformDate.value = data.probationStartDate; + experimenttoDate.value = data.probationEndDate; + chairman.value = data.chairManFullName; + director.value = data.member1FullName; + director2.value = data.member2FullName; + + //11-12 + committeeOc.value = data.placementCommandIssuer; + committeeOrder.value = data.placementCommandNo; + committeeDate.value = data.placementCommandDate; + + //13 + receiveOc.value = data.receiveOrganizationName; + + //14 + transferOrganizationName.value = data.transferOrganizationName; + conclusionReceive.value = data.conclusionReceiveNo; + conclusionReceiveDate.value = data.conclusionReceiveDate; + + //16 + orderNumber.value = data.govAidCommandNo; + orderNumberDate.value = data.govAidCommandDate; + + //18-20 + fault.value = data.fault; + guiltyBasis.value = data.guiltyBasis; + conclusionFireNo.value = data.conclusionFireNo; + conclusionFireDate.value = data.conclusionFireDate; + conclusionFireResolution.value = data.conclusionFireResolution; + fecthExamRoundOption(data.orderTypeCode); }) .catch((e) => { @@ -285,7 +344,6 @@ const fecthCommand = async () => { await http .get(config.API.organizationsOrder()) .then((res: any) => { - console.log(res); byOrderOption.value = res.data.result; }) .catch((e: any) => { @@ -397,7 +455,7 @@ const submit = async () => { }); } else if (typeOrder.value.commandCode == "C-PM-14") { Object.assign(formdata, { - transferOrganizationName: "", + transferOrganizationName: transferOrganizationName.value, conclusionReceiveNo: conclusionReceive.value, conclusionReceiveDate: conclusionReceiveDate.value, }); @@ -412,11 +470,11 @@ const submit = async () => { typeOrder.value.commandCode == "C-PM-20" ) { Object.assign(formdata, { - fault: "", - guiltyBasis: "", - conclusionFireNo: "", - conclusionFireDate: new Date(), - conclusionFireResolution: "", + fault: fault.value, + guiltyBasis: guiltyBasis.value, + conclusionFireNo: conclusionFireNo.value, + conclusionFireDate: conclusionFireDate.value, + conclusionFireResolution: conclusionFireResolution.value, }); } @@ -1874,7 +1932,24 @@ const getClass = (val: boolean) => { class="row col-12 q-col-gutter-x-lg q-col-gutter-y-md" v-if="typeOrder.commandCode === 'C-PM-14'" > -
+
+ + + +
+
{ :label="`${'มติ กก. ครั้งที่ '}`" emit-value map-options option-label="name" :options="ReceiveOption" option-value="id" use-input input-debounce="0" /> -->
-
+
{
+ + +
+
+ +
+
+ +
+
+ +
+
+ + + + + +
+
+ +
+
From fead3df4059c84b05681db8e876e8edbebcf6ffc Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 25 Aug 2023 18:00:10 +0700 Subject: [PATCH 2/2] =?UTF-8?q?=E0=B9=81=E0=B8=9A=E0=B8=9A=20=E0=B8=AA?= =?UTF-8?q?=E0=B8=B3=E0=B8=A3=E0=B8=A7=E0=B8=88=20=E0=B8=84=E0=B8=A7?= =?UTF-8?q?=E0=B8=B2=E0=B8=A1=E0=B8=84=E0=B8=B4=E0=B8=94=E0=B9=80=E0=B8=AB?= =?UTF-8?q?=E0=B9=87=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.probation.ts | 2 +- .../components/probation/SummarySurvey.vue | 108 ++++++++---------- 2 files changed, 50 insertions(+), 60 deletions(-) diff --git a/src/api/05_placement/api.probation.ts b/src/api/05_placement/api.probation.ts index e9d5c6e4d..7254dc5f9 100644 --- a/src/api/05_placement/api.probation.ts +++ b/src/api/05_placement/api.probation.ts @@ -60,7 +60,7 @@ export default { - + summarySurveyDetail:(id:string) => `${evaluate}/survey?assign_id=${id}` diff --git a/src/modules/05_placement/components/probation/SummarySurvey.vue b/src/modules/05_placement/components/probation/SummarySurvey.vue index d5b5867a1..8f1a2e4d9 100644 --- a/src/modules/05_placement/components/probation/SummarySurvey.vue +++ b/src/modules/05_placement/components/probation/SummarySurvey.vue @@ -32,8 +32,9 @@ const score2 = ref(0); const score3 = ref(0); const Allscore = ref(0); -const comment_1 = ref(""); -const comment_2 = ref(""); +const answer1 = ref(""); +const answer2 = ref(""); +const answer3 = ref(0); const result = ref(); const result_option = ref([ @@ -55,68 +56,47 @@ const cancel = () => { status.value = false; }; +const getSurveyData = async () => { + await http + .get(config.API.summarySurveyDetail(assignId.value)) + .then((res: any) => { + const data = res.data.data; + answer1.value = data.answer1, + answer2.value = data.answer2, + answer3.value = data.answer3 + status.value = false +}) + .catch((e) => { + console.log(e); + }); +}; +const save = () => { + const data = { + answer1: answer1.value, + answer2: answer2.value, + answer3: answer3.value, + }; + dialogConfirm($q, async () => { + await http + .post(config.API.summarySurveyDetail(assignId.value), data) + .then((res: any) => { + // console.log(res); + success($q, "บันทึกสำเร็จ"); + }) + .catch((e: any) => { + messageError($q, e); + }); + }); +}; onMounted(() => { - // fecthResult(assignId.value); + getSurveyData(); }); - -// const fecthResult = async (id: string) => { -// await http -// .get(config.API.createformReport(id)) -// .then((res: any) => { -// let data = res.data.data.evaluate; -// console.log(data); -// date_start.value = data.date_start; -// date_finish.value = data.date_finish; -// develop.value = Number(data.develop_complete); -// result.value = Number(data.pass_result); -// reson.value = data.reson; -// chairman_dated.value = data.chairman_dated; -// director1_dated.value = data.director1_dated; -// director2_dated.value = data.director2_dated; -// status.value = false; -// action.value = 'edit'; -// }) -// .catch((e) => { -// console.log(e); -// }); -// }; +
+ +
+ +
+ + +