Эх сурвалжийг харах

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

cfort 1 жил өмнө
parent
commit
1d450a6575

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

@@ -1053,9 +1053,9 @@ export default {
                         this.isFirstyiXiaoRiQi = false
                         this.isFirstyiXiaoRiQi = false
                         return
                         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))
                 }
                 }
             }
             }
         }
         }