From 52affdb0b22c402ddb07510a7d97163f9459ac94 Mon Sep 17 00:00:00 2001
From: churf <123456>
Date: Fri, 15 Sep 2023 10:04:31 +0000
Subject: [PATCH] 日报已消耗工时表现优化

---
 eladmin-web-master/src/views/task/taskDaliy/index.vue |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/eladmin-web-master/src/views/task/taskDaliy/index.vue b/eladmin-web-master/src/views/task/taskDaliy/index.vue
index b054aea..38704e2 100644
--- a/eladmin-web-master/src/views/task/taskDaliy/index.vue
+++ b/eladmin-web-master/src/views/task/taskDaliy/index.vue
@@ -440,7 +440,8 @@
       tempValue: '',
       resData: true,
       userIds: [],
-      watchFlg: false
+      watchFlg: false,
+      editVar: ''
     }
   },
   computed: {
@@ -453,6 +454,9 @@
       if (newVal === 0 && this.userIds.includes(this.form.taskUserMongo.id)) {
         this.form.alreadyConsumedHours = this.tempValue
       }
+      if (this.crud.status.edit === 1 && newVal === 0) {
+        this.form.alreadyConsumedHours = this.form.alreadyConsumedHours - (this.editVar - 0)
+      }
       if (this.watchFlg) {
         this.form.alreadyConsumedHours = (this.form.alreadyConsumedHours) - (oldVal - 0) + (newVal - 0)
         this.watchFlg = false
@@ -463,6 +467,9 @@
     },
     'confirmHours': function(newVal) {
       this.confirmHours = newVal
+    },
+    'crud.status.edit': function() {
+      this.editVar = this.form.consumedHours
     }
   },
   methods: {

--
Gitblit v1.9.3