fix: 2036 检验时间可以晚于下次检验时间

This commit is contained in:
binbin_pan 2024-06-12 11:16:47 +08:00
parent 91c0464a0e
commit 940378a692
1 changed files with 18 additions and 0 deletions

View File

@ -334,6 +334,7 @@
type="date"
placeholder="请输入检验时间"
style="width: 400px"
@change="changeCheckTime"
/>
</el-form-item>
</el-col>
@ -349,6 +350,15 @@
type="date"
placeholder="请输入检验时间"
style="width: 13vw"
:disabled="!codeForm.thisCheckTime"
:picker-options="{
disabledDate(time) {
if (codeForm.thisCheckTime) {
return time.getTime() < new Date(codeForm.thisCheckTime).getTime();
}
return false;
}
}"
/>
</el-form-item>
</el-col>
@ -1509,6 +1519,14 @@ export default {
this.$message.warning('设备编码不能为空')
}
},
//
changeCheckTime() {
if (this.codeForm.thisCheckTime > this.codeForm.nextCheckTime) {
this.codeForm.nextCheckTime = ''
} else if (!this.codeForm.thisCheckTime) {
this.codeForm.nextCheckTime = ''
}
},
},
}
</script>