Commit 15a2e17d authored by jingnan's avatar jingnan 👀

胶漆调配失效时间bug修改

parent c078f78c
...@@ -590,7 +590,7 @@ export default { ...@@ -590,7 +590,7 @@ export default {
this.$set(this.form, 'storeUpTo', res.items.content[0].storeUpTo) this.$set(this.form, 'storeUpTo', res.items.content[0].storeUpTo)
if (this.form.validityStart && this.form.freeTemperature) { if (this.form.validityStart && this.form.freeTemperature) {
const date = new Date(this.form.validityStart) const date = new Date(this.form.validityStart)
const data = this.form.freeTemperature === '-24' ? (this.form.storeUp ? Number(this.form.storeUp) : 21) : (this.form.storeUp ? Number(this.form.storeUpTo) : 30) const data = Number(this.form.freeTemperature) === -24 ? (this.form.storeUp ? Number(this.form.storeUp) : 21) : (this.form.storeUpTo ? Number(this.form.storeUpTo) : 30)
date.setDate(date.getDate() + data) date.setDate(date.getDate() + data)
this.$set(this.form, 'validityEnd', this.$utils.dateFormat(date.toISOString())) this.$set(this.form, 'validityEnd', this.$utils.dateFormat(date.toISOString()))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment