From 469d9ca3ded4a1dc2c3e08e41b65b96c6980cb0e Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 10 Oct 2025 16:54:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=85=89=E5=AD=90=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0work=5Fstart=5Ftime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm/mlog6_form.vue | 8 ++++---- src/views/wpm/otherlog_form.vue | 8 ++++---- src/views/wpm/worktask_form.vue | 7 +++---- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/views/wpm/mlog6_form.vue b/src/views/wpm/mlog6_form.vue index c28a42c7..122131d0 100644 --- a/src/views/wpm/mlog6_form.vue +++ b/src/views/wpm/mlog6_form.vue @@ -609,6 +609,10 @@ export default { this.form.material_out = this.material_out; this.form.handle_date = this.handle_date; this.form.mgroup = this.mgroup; + if(this.mode == "add"){ + let date = new Date(); + this.form.work_start_time = this.$TOOL.dateFormat1(date); + } }, methods: { getRouteOptions() { @@ -683,10 +687,6 @@ export default { open(mode = "add") { this.mode = mode; this.visible = true; - if(this.mode == "add"){ - let date = new Date(); - this.form.work_start_time = this.$TOOL.dateFormat1(date); - } return this; }, countNotOkSun() { diff --git a/src/views/wpm/otherlog_form.vue b/src/views/wpm/otherlog_form.vue index 7b378835..46cc7a84 100644 --- a/src/views/wpm/otherlog_form.vue +++ b/src/views/wpm/otherlog_form.vue @@ -68,16 +68,16 @@ export default { }; }, mounted() { + if(this.mode == "add"){ + let date = new Date(); + this.form.work_start_time = this.$TOOL.dateFormat1(date); + } }, methods: { //显示 open(mode = "add") { this.mode = mode; this.visible = true; - if(this.mode == "add"){ - let date = new Date(); - this.form.work_start_time = this.$TOOL.dateFormat1(date); - } return this; }, //提交 diff --git a/src/views/wpm/worktask_form.vue b/src/views/wpm/worktask_form.vue index 8db3eb39..283a3fdf 100644 --- a/src/views/wpm/worktask_form.vue +++ b/src/views/wpm/worktask_form.vue @@ -1075,6 +1075,9 @@ export default { let handle_date = year + "-" + month + "-" + day; let dateNow = "" + year + month + day; this.dateNow = dateNow; + if(this.mode == "add"){ + this.form.work_start_time = this.$TOOL.dateFormat1(date); + } this.form.material_out = this.material_out; this.form.material_in = this.material_in; this.form.mtask = this.mtask; @@ -1304,10 +1307,6 @@ export default { open(mode = "add") { this.mode = mode; this.visible = true; - if(this.mode == "add"){ - let date = new Date(); - this.form.work_start_time = this.$TOOL.dateFormat1(date); - } return this; }, countNotOkSun() {