From 1612713e6a4937380eccdd2119ca275a128474b5 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 8 Aug 2024 14:53:07 +0700 Subject: [PATCH 1/6] =?UTF-8?q?=E0=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3/=E0=B8=AB=E0=B8=A5=E0=B8=B1?= =?UTF-8?q?=E0=B8=81=E0=B8=AA=E0=B8=B9=E0=B8=95=E0=B8=A3=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=9D=E0=B8=B6=E0=B8=81=E0=B8=AD=E0=B8=9A=E0=B8=A3?= =?UTF-8?q?=E0=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ProjectDetail.vue | 20 ++++++++------- .../15_development/interface/index/Main.ts | 2 +- src/modules/17_acting/views/main.vue | 25 +++++++++++++------ 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/modules/15_development/components/ProjectDetail.vue b/src/modules/15_development/components/ProjectDetail.vue index 08cf267ed..5ec7ab03f 100644 --- a/src/modules/15_development/components/ProjectDetail.vue +++ b/src/modules/15_development/components/ProjectDetail.vue @@ -314,6 +314,7 @@ function onSubmit() { http .put(config.API.developmentMainTab("tab3", projectId.value), { ...formData, + totalDate: formData.totalDate === "" ? null : formData.totalDate, reasonPlanned70: reasonPlanned70.value, reasonPlanned20: reasonPlanned20.value, reasonPlanned10: reasonPlanned10.value, @@ -376,14 +377,11 @@ const filterSelector = (val: string, update: Function) => { }); }; -watch( - () => [formData.dateStart, formData.dateEnd], - () => { - if (formData.dateStart && formData.dateEnd) { - formData.totalDate = diffDay(formData.dateStart, formData.dateEnd); - } +function updatetotalDate() { + if (formData.dateStart && formData.dateEnd) { + formData.totalDate = diffDay(formData.dateStart, formData.dateEnd); } -); +} /** * function ไปยัง Tab ค่อไป @@ -586,7 +584,9 @@ defineExpose({ :enableTimePicker="false" week-start="0" :max-date="formData.dateEnd" - @update:model-value="props.onCheckChangeData()" + @update:model-value=" + props.onCheckChangeData(), updatetotalDate() + " >