Преглед на файлове

设备档案校准有效期计算逻辑修改

cfort преди 1 година
родител
ревизия
1d450a6575
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      src/views/component/device/deviceDialog.vue

+ 3 - 3
src/views/component/device/deviceDialog.vue

@@ -1053,9 +1053,9 @@ export default {
                         this.isFirstyiXiaoRiQi = false
                         return
                     }
-                    const zhouQi = this.form.xiaoZhunZQ || 0
-                    const result = this.$common.getFormatDate('string', 10, this.$common.getDate('month', Number(zhouQi), value))
-                    this.form.xiaoZhunYouXia = result
+                    const cycle = this.form.xiaoZhunZQ || 0
+                    const expiredDate = this.$common.getFormatDate('string', 10, this.$common.getDate('month', parseInt(cycle), value))
+                    this.form.xiaoZhunYouXia = this.$common.getFormatDate('string', 10, this.$common.getDate('day', -1, expiredDate))
                 }
             }
         }