Przeglądaj źródła

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

cfort 1 rok temu
rodzic
commit
1d450a6575
1 zmienionych plików z 3 dodań i 3 usunięć
  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))
                 }
             }
         }