diff --git a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue index 6f8d040d..11392c7a 100644 --- a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue +++ b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue @@ -334,6 +334,7 @@ type="date" placeholder="请输入检验时间" style="width: 400px" + @change="changeCheckTime" /> @@ -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; + } + }" /> @@ -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 = '' + } + }, }, }