From f0650d59a214d17192a59721dcc01b652052c65c Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 25 Apr 2024 14:04:53 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84=E0=B8=B3?= =?UTF-8?q?=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=E0=B9=80=E0=B8=A5=E0=B8=B7?= =?UTF-8?q?=E0=B9=88=E0=B8=AD=E0=B8=99=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99?= =?UTF-8?q?=E0=B9=80=E0=B8=94=E0=B8=B7=E0=B8=AD=E0=B8=99=20=3D>=20validate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../13_salary/components/Command/step01.vue | 100 ++++++++++-------- src/modules/13_salary/views/commandSalary.vue | 4 +- 2 files changed, 58 insertions(+), 46 deletions(-) diff --git a/src/modules/13_salary/components/Command/step01.vue b/src/modules/13_salary/components/Command/step01.vue index fdf22b4a5..cf7b5ce20 100644 --- a/src/modules/13_salary/components/Command/step01.vue +++ b/src/modules/13_salary/components/Command/step01.vue @@ -57,13 +57,13 @@ const salaryRoundOptionMain = ref([]); const salaryRoundOption = ref([]); //Main -const typeOrder = ref([]); +const typeOrder = ref(); const nameOrder = ref(""); const command = ref(); -const dateYear = ref(new Date().getFullYear()); -const dateCommand = ref(new Date()); +const dateYear = ref(null); +const dateCommand = ref(null); const byOrder = ref(""); -const nameCommand = ref([]); +const nameCommand = ref(); const positionCommand = ref(""); const year = ref(0); const SalaryRound = ref(""); @@ -114,8 +114,6 @@ const commandCodes = ref([ ]); // เรียกคำสั่ง const fecthTypeOption = async (actions: string) => { - console.log(actions); - showLoader(); await http .get(config.API.typeOrder()) @@ -165,8 +163,6 @@ const fetchdetailOrder = async () => { .then(async (res: any) => { const data = res.data.result; - console.log(data); - const orderTypeCode = await data.orderTypeCode.toUpperCase(); typeOrder.value = typeOrderOption.value.find( @@ -262,34 +258,34 @@ const submit = async () => { year: year.value, salaryPeriodId: SalaryRound.value, }; - if ( - typeOrder.value.commandCode == "C-PM-33" || - typeOrder.value.commandCode == "C-PM-34" || - typeOrder.value.commandCode == "C-PM-35" - ) { - Object.assign(formdata, { - // examRound: examRound.value, - // conclusionRegisterNo: conclusionRegisterNo.value, - // conclusionRegisterDate: conclusionRegisterDate.value, - // conclusionResultNo: conclusionResultNo.value.toString(), - // conclusionResultDate: conclusionResultDate.value, - }); - } + // if ( + // typeOrder.value.commandCode == "C-PM-33" || + // typeOrder.value.commandCode == "C-PM-34" || + // typeOrder.value.commandCode == "C-PM-35" + // ) { + // Object.assign(formdata, { + // // examRound: examRound.value, + // // conclusionRegisterNo: conclusionRegisterNo.value, + // // conclusionRegisterDate: conclusionRegisterDate.value, + // // conclusionResultNo: conclusionResultNo.value.toString(), + // // conclusionResultDate: conclusionResultDate.value, + // }); + // } // เช็คค่าว่าง - await myForm.value!.validate().then((result: boolean) => { - if (result) { - dialogConfirm($q, () => { - // ถ้ามี orderId ให้ อัพเดท ไม่มีให้สร้าง - if (!orderId) { - createListOrder(formdata, typeOrder.value.commandCode); - } else { - let orderIdString = orderId.toString(); - updateOrder(formdata, orderIdString, typeOrder.value.commandCode); - } - }); + // await myForm.value!.validate().then((result: boolean) => { + // if (result) { + dialogConfirm($q, () => { + // ถ้ามี orderId ให้ อัพเดท ไม่มีให้สร้าง + if (!orderId) { + createListOrder(formdata, typeOrder.value.commandCode); + } else { + let orderIdString = orderId.toString(); + updateOrder(formdata, orderIdString, typeOrder.value.commandCode); } }); + // } + // }); }; // สร้างคำสัง @@ -406,9 +402,10 @@ function fetchSalaryRound() { }