|
@@ -631,6 +631,9 @@ export default {
|
|
|
schedule.startDate,
|
|
schedule.startDate,
|
|
|
self.currentShift
|
|
self.currentShift
|
|
|
)
|
|
)
|
|
|
|
|
+ self.beforeDateList = self.filterTodayList(
|
|
|
|
|
+ self.beforeDateList,
|
|
|
|
|
+ )
|
|
|
const filterid = self.$store.getters.userId || ''
|
|
const filterid = self.$store.getters.userId || ''
|
|
|
if (
|
|
if (
|
|
|
self.beforeDateList.length > 0 &&
|
|
self.beforeDateList.length > 0 &&
|
|
@@ -941,6 +944,16 @@ export default {
|
|
|
})
|
|
})
|
|
|
return result
|
|
return result
|
|
|
},
|
|
},
|
|
|
|
|
+ /*过滤今天之前的日期不可选 */
|
|
|
|
|
+ filterTodayList(dateList) {
|
|
|
|
|
+ // 将日期在今天之前的排班也锁定
|
|
|
|
|
+ dateList.forEach((el) => {
|
|
|
|
|
+ if (this.equalDate(el.value)) {
|
|
|
|
|
+ el.disabled = true
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ return dateList
|
|
|
|
|
+ },
|
|
|
/**
|
|
/**
|
|
|
* 过滤锁定班次,返回被过滤后的排班van数据
|
|
* 过滤锁定班次,返回被过滤后的排班van数据
|
|
|
* @param bList 锁定班次数组
|
|
* @param bList 锁定班次数组
|
|
@@ -951,12 +964,7 @@ export default {
|
|
|
// 根据锁定数据,过滤当前列表
|
|
// 根据锁定数据,过滤当前列表
|
|
|
const filterBList = bList[filterid] || []
|
|
const filterBList = bList[filterid] || []
|
|
|
const { startDate } = this.scheduleInfo
|
|
const { startDate } = this.scheduleInfo
|
|
|
- // 将日期在今天之前的排班也锁定
|
|
|
|
|
- // dateList.forEach((el) => {
|
|
|
|
|
- // if (this.equalDate(el.value)) {
|
|
|
|
|
- // el.disabled = true
|
|
|
|
|
- // }
|
|
|
|
|
- // })
|
|
|
|
|
|
|
+
|
|
|
filterBList.forEach((el) => {
|
|
filterBList.forEach((el) => {
|
|
|
const index = this.getDays(startDate, el.value)
|
|
const index = this.getDays(startDate, el.value)
|
|
|
if (
|
|
if (
|
|
@@ -1152,6 +1160,9 @@ export default {
|
|
|
this.scheduleInfo.startDate,
|
|
this.scheduleInfo.startDate,
|
|
|
this.targetShift
|
|
this.targetShift
|
|
|
) // 转换目标人能选择的日期
|
|
) // 转换目标人能选择的日期
|
|
|
|
|
+ this.afterDateList = this.filterTodayList(
|
|
|
|
|
+ this.afterDateList,
|
|
|
|
|
+ )
|
|
|
this.formData.adjustList[index]['afterDate'] = '' // 更换目标人时刷新目标日期
|
|
this.formData.adjustList[index]['afterDate'] = '' // 更换目标人时刷新目标日期
|
|
|
const filterid = val || ''
|
|
const filterid = val || ''
|
|
|
if (
|
|
if (
|
|
@@ -1497,6 +1508,9 @@ export default {
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ this.beforeDateList = this.filterTodayList(
|
|
|
|
|
+ this.beforeDateList,
|
|
|
|
|
+ )
|
|
|
// 刷新当前用户的过滤数据
|
|
// 刷新当前用户的过滤数据
|
|
|
const filterid = this.$store.getters.userId || ''
|
|
const filterid = this.$store.getters.userId || ''
|
|
|
if (
|
|
if (
|
|
@@ -1522,6 +1536,9 @@ export default {
|
|
|
'del'
|
|
'del'
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
+ this.beforeDateList = this.filterTodayList(
|
|
|
|
|
+ this.beforeDateList,
|
|
|
|
|
+ )
|
|
|
// 刷新当前用户的过滤数据
|
|
// 刷新当前用户的过滤数据
|
|
|
const filterid = this.$store.getters.userId || ''
|
|
const filterid = this.$store.getters.userId || ''
|
|
|
if (
|
|
if (
|
|
@@ -1585,7 +1602,7 @@ export default {
|
|
|
dateStr.split('-')[2]
|
|
dateStr.split('-')[2]
|
|
|
)
|
|
)
|
|
|
// 进行比较
|
|
// 进行比较
|
|
|
- if (dateObj >= today) {
|
|
|
|
|
|
|
+ if (dateObj > today) {
|
|
|
return false
|
|
return false
|
|
|
} else {
|
|
} else {
|
|
|
return true
|
|
return true
|