|
@@ -107,8 +107,8 @@
|
|
|
changePlanList.push({
|
|
|
index: i, // 第一次计划修改的下标
|
|
|
baseEmpListIndex: baseEmpList.length -1,
|
|
|
- startDiffTimestamp: startDate ? this.dateToTimestamp(startDate) - planStartTimestamp : 0, // 开始时间差
|
|
|
- endDifTimestamp: endDate ? this.dateToTimestamp(endDate) - planStartTimestamp : 0 // 结束时间差
|
|
|
+ startDiffTimestamp: (startDate && planStartTimestamp != -1) ? this.dateToTimestamp(startDate) - planStartTimestamp : -1, // 开始时间差
|
|
|
+ endDifTimestamp: (endDate && planStartTimestamp != -1) ? this.dateToTimestamp(endDate) - planStartTimestamp : -1 // 结束时间差
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -124,9 +124,9 @@
|
|
|
(planList || []).map(((planItem, planI) => {
|
|
|
if(planI != 0){ // 过滤掉第一条
|
|
|
// 计划开始时间戳
|
|
|
- let planStartTimestamp = planItem.startDate ? this.dateToTimestamp(planItem.startDate + ' 00:00') : 0;
|
|
|
+ let planStartTimestamp = planItem.startDate ? this.dateToTimestamp(planItem.startDate + ' 00:00') : -1;
|
|
|
// 计划结束时间戳
|
|
|
- let planEndTimestamp = planItem.endDate ? this.dateToTimestamp(planItem.endDate + ' 23:59') : 0;
|
|
|
+ let planEndTimestamp = planItem.endDate ? this.dateToTimestamp(planItem.endDate + ' 23:59') : -1;
|
|
|
|
|
|
planItem.empList && planItem.empList.map((empItem, empI) => {
|
|
|
// 当前分配明细
|
|
@@ -139,10 +139,10 @@
|
|
|
empName,
|
|
|
checkId: empItem.checkId,
|
|
|
deptId: empItem.deptId,
|
|
|
- startDate: (planStartTimestamp && startDiffTimestamp)
|
|
|
+ startDate: (planStartTimestamp > -1 && startDiffTimestamp > -1)
|
|
|
? this.getDateStr(planStartTimestamp, planEndTimestamp, startDiffTimestamp, planItem.endDate)
|
|
|
: '',
|
|
|
- endDate: (planStartTimestamp && endDifTimestamp)
|
|
|
+ endDate: (planStartTimestamp > -1 && endDifTimestamp > -1)
|
|
|
? this.getDateStr(planStartTimestamp, planEndTimestamp, endDifTimestamp, planItem.endDate)
|
|
|
: ''
|
|
|
});
|
|
@@ -195,7 +195,7 @@
|
|
|
},
|
|
|
// 日期时间转换为时间戳
|
|
|
dateToTimestamp(dataStr) {
|
|
|
- return dataStr ? moment(dataStr).valueOf() : 0
|
|
|
+ return dataStr ? moment(dataStr).valueOf() : -1
|
|
|
},
|
|
|
checkEdit(data, index, title) {
|
|
|
if(data.completeState){ // 计划已开始, 不能编辑查核人和计划时间
|