dedsudiyu 2 years ago
parent
commit
dffcf3c7e7
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/views/safetyCheck/startInspection/index.vue

+ 6 - 0
src/views/safetyCheck/startInspection/index.vue

@@ -327,6 +327,12 @@
       upDataButton(type){
         this.$refs["addForm"].validate(valid => {
           if (valid) {
+            let startTime = Date.parse(new Date(this.addForm.dateRange[0]));
+            let currentTime = Date.parse(new Date);
+            if(currentTime<startTime){
+              this.msgError('当前时间不在计划周期内')
+              return
+            }
             if(this.planType == 1){
               //新计划
               let obj = JSON.parse(JSON.stringify(this.addForm));