|
@@ -917,6 +917,18 @@
|
|
|
|
|
|
this.isShowValidity = false
|
|
|
},
|
|
|
+ getTime:function(){
|
|
|
+
|
|
|
+ var date = new Date().getTime()
|
|
|
+ year = date.getFullYear(),
|
|
|
+ month = date.getMonth() + 1,
|
|
|
+ day = date.getDate(),
|
|
|
+
|
|
|
+ month >= 1 && month <= 9 ? (month = "0" + month) : "";
|
|
|
+ day >= 0 && day <= 9 ? (day = "0" + day) : "";
|
|
|
+ var timer = year + '-' + month + '-' + day
|
|
|
+ return timer;
|
|
|
+ },
|
|
|
confirmValidityPeriodcq(e) {
|
|
|
if (e.value[0] == '长期') {
|
|
|
this.dataObj.taskValidity = e.value[0]
|
|
@@ -928,9 +940,22 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
|
|
|
+ var datetime = new Date().getTime()
|
|
|
+ var datetime1 = datetime + (24*60*60*1000*30*6)
|
|
|
+ var currecttime =new Date(e.value[0] + '-' + e.value[1] + '-' + e.value[2]).getTime()
|
|
|
+ if(currecttime<datetime||currecttime>datetime1){
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: "请选择今天到往后六个月之内的日期!",
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
|
|
|
+ this.isShowcardValidity = false
|
|
|
+ }
|
|
|
+ console.log(datetime,currecttime)
|
|
|
+
|
|
|
}
|
|
|
- this.isShowcardValidity = false
|
|
|
+
|
|
|
},
|
|
|
selectValidityPeriod(type) {
|
|
|
this.ValidityPeriodType = type
|