diff --git a/pages/stampingRecordList/stampingRecordList.vue b/pages/stampingRecordList/stampingRecordList.vue
index a0bdf22..f6c3dff 100644
--- a/pages/stampingRecordList/stampingRecordList.vue
+++ b/pages/stampingRecordList/stampingRecordList.vue
@@ -26,8 +26,7 @@
- 生产时间:{{item.production}}{{item.week}}
+ 生产时间:{{item.production}}{{item.week}}
@@ -136,7 +135,7 @@
jurisdiction: [],
todays: '',
todayTime: '',
- timeArea:''
+ timeArea: ''
};
},
methods: {
@@ -153,12 +152,10 @@
day >= 0 && day <= 9 ? (day = "0" + day) : "";
var timer = year + '-' + month + '-' + day + '\xa0' + hour + ':' + minute + ':' + second;
this.todays = year + '-' + month + '-' + day
- this.todayTime=year + '-' + month + '-' + day + '\xa0' + hour + ':' + minute + ':' + second;
- this.timeAreaBb=this.todays+ '\xa0' + '07:45:00'
- this.timeAreaYb=this.todays+ '\xa0' + '19:45:00'
- console.log("当前时间", this.todayTime)
- console.log("夜班时间", this.timeAreaYb)
- console.log("白班时间", this.timeAreaBb)
+ this.todayTime = year + '-' + month + '-' + day + '\xa0' + hour + ':' + minute + ':' + second;
+ this.timeAreaBb = this.todays + '\xa0' + '07:45:00'
+ this.timeAreaYb = this.todays + '\xa0' + '19:45:00'
+
return timer;
},
@@ -183,8 +180,12 @@
this.froms.status = e.target.value + 1
},
openLine(plan_id, item) {
+ console.log("夜班时间", this.timeAreaYb)
+ console.log("当前时间", this.todayTime)
+
+ //console.log("白班时间", this.timeAreaBb)
this.getTime()
- if( moment(this.timeAreaYb) < moment(this.todayTime)){
+ if (!moment(this.timeAreaYb).isBefore(moment(this.todayTime))) {
this.$functions.error("夜班时间大于当前时间");
return false;
}
@@ -192,15 +193,14 @@
this.$functions.error("已开线,请勿重复操作");
return false;
}
- if(item.frequency==0 && moment(this.timeAreaYb)>moment(this.todayTime)){
+ if (item.frequency == 0 && moment(this.timeAreaYb) > moment(this.todayTime)) {
this.$functions.error("未到开线时间,夜班请于当天晚上七点四十五分后操作");
return false;
}
- if(item.frequency==1 && moment(this.todayTime)>moment(this.timeAreaBb)){
+ if (item.frequency == 1 && moment(this.todayTime) > moment(this.timeAreaBb)) {
this.$functions.error("未到开线时间,白班请于当天早上七点四十五后操作");
return false;
- }
- else {
+ } else {
openLine({
id: plan_id
}).then(res => {
@@ -227,14 +227,14 @@
} else {
item.tr = "";
}
- if(moment(item.production) <= moment(this.todays)){
- item.today=true
-
+ if (moment(item.production) <= moment(this.todays)) {
+ item.today = true
+
} else {
item.today = false
}
})
- console.log("记录列表",this.list)
+ console.log("记录列表", this.list)
})
},
stopLine(item) {