From d4172aaec7f2466cfe92f7c151b8ff30aced143e Mon Sep 17 00:00:00 2001 From: zelian_wu Date: Thu, 25 Jan 2024 10:31:49 +0800 Subject: [PATCH] =?UTF-8?q?2024/1/19=20=E8=BF=94=E5=B7=A5=E8=BF=94?= =?UTF-8?q?=E4=BF=AE=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/production/reworkRecord.vue | 49 +++++++++++++++---- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/src/views/modules/production/reworkRecord.vue b/src/views/modules/production/reworkRecord.vue index 0890b53..2f049b7 100644 --- a/src/views/modules/production/reworkRecord.vue +++ b/src/views/modules/production/reworkRecord.vue @@ -117,6 +117,11 @@ export default { this.saveRework.reworkEndDate = new Date() this.reportWorkDialog = true this.saveType = type + if (type === 0){ + if (this.saveRework.productionTime || this.saveRework.productionTime === 0){ + return + } + } this.saveRework.productionTime = new Decimal(dayjs(new Date()).diff(this.saveRework.createTime,'hour',true)).toFixed(2, Decimal.ROUND_HALF_UP) this.saveRework.productionTime = new Decimal(this.saveRework.productionTime).toSignificantDigits() }, @@ -228,7 +233,7 @@ export default {