소스 검색

no message

linwenxin 5 달 전
부모
커밋
f7b32b2c86
1개의 변경된 파일70개의 추가작업 그리고 4개의 파일을 삭제
  1. 70 4
      src/packageMine/pages/workerEnter.vue

+ 70 - 4
src/packageMine/pages/workerEnter.vue

@@ -280,8 +280,20 @@
       <view class="btn" @click="submit()">提交审核</view>
     </template>
     <dateTimeBind v-model="idCardStateTime" ref="idCardStateTime" type="date" :maxDate="7258089600000" />
-    <dateTimeBind v-model="idCardEndTime" ref="idCardEndTime" type="date" :maxDate="7258089600000" />
-    <dateTimeBind v-model="reexamineTime" ref="reexamineTime" type="date" :maxDate="7258089600000" />
+    <dateTimeBind
+      v-model="idCardEndTime"
+      ref="idCardEndTime"
+      :minDate="idCardEndTimeMin"
+      type="date"
+      :maxDate="7258089600000"
+    />
+    <dateTimeBind
+      v-model="reexamineTime"
+      ref="reexamineTime"
+      type="date"
+      :minDate="altitudeDocumentEndTimeMin"
+      :maxDate="altitudeDocumentEndTimeMAX"
+    />
     <dateTimeBind
       v-model="altitudeDocumentStateTime"
       ref="altitudeDocumentStateTime"
@@ -292,10 +304,17 @@
       v-model="altitudeDocumentEndTime"
       ref="altitudeDocumentEndTime"
       type="date"
+      :minDate="altitudeDocumentEndTimeMin"
       :maxDate="7258089600000"
     />
     <dateTimeBind v-model="insuranceStateTime" ref="insuranceStateTime" type="date" :maxDate="7258089600000" />
-    <dateTimeBind v-model="insuranceEndTime" ref="insuranceEndTime" type="date" :maxDate="7258089600000" />
+    <dateTimeBind
+      v-model="insuranceEndTime"
+      ref="insuranceEndTime"
+      type="date"
+      :minDate="insuranceEndTimeMin"
+      :maxDate="7258089600000"
+    />
   </zj-page-layout>
 </template>
 
@@ -358,7 +377,8 @@ export default {
       // 保险结束日期
       insuranceEndTime: '',
       // 保险图片集合
-      imageList: [] //上传的文件数据
+      imageList: [], //上传的文件数据
+      boolsss: false
     }
   },
 
@@ -370,6 +390,44 @@ export default {
     this.getUser()
   },
 
+  watch: {
+    idCardStateTime() {
+      if (this.boolsss) {
+        this.idCardEndTime = ''
+      }
+    },
+    altitudeDocumentStateTime() {
+      if (this.boolsss) {
+        this.altitudeDocumentEndTime = ''
+      }
+    },
+    altitudeDocumentEndTime() {
+      if (this.boolsss) {
+        this.reexamineTime = ''
+      }
+    },
+    insuranceStateTime() {
+      if (this.boolsss) {
+        this.insuranceEndTime = ''
+      }
+    }
+  },
+
+  computed: {
+    idCardEndTimeMin() {
+      return this.idCardStateTime ? new Date(this.idCardStateTime + ' 23:59:59').getTime() : ''
+    },
+    altitudeDocumentEndTimeMin() {
+      return this.altitudeDocumentStateTime ? new Date(this.altitudeDocumentStateTime + ' 23:59:59').getTime() : ''
+    },
+    insuranceEndTimeMin() {
+      return this.insuranceStateTime ? new Date(this.insuranceStateTime + ' 23:59:59').getTime() : ''
+    },
+    altitudeDocumentEndTimeMAX() {
+      return this.altitudeDocumentEndTime ? new Date(this.altitudeDocumentEndTime + ' 23:59:59').getTime() : ''
+    }
+  },
+
   methods: {
     getUser() {
       this.$api
@@ -398,6 +456,14 @@ export default {
               (res.data?.workerImgs || []).filter(item => item.type == 'HIGHT').map(item => item.imgUrl || '')?.[1] ||
               ''
           }
+          this.$nextTick(() => {
+            this.boolsss = true
+          })
+        })
+        .catch(() => {
+          this.$nextTick(() => {
+            this.boolsss = true
+          })
         })
     },