|
|
@@ -209,7 +209,7 @@ Ext.define('school.view.interaction.timetable.Detail', {
|
|
|
preRecord = store.getAt(idx);
|
|
|
preDate = preRecord.get('_time2');
|
|
|
|
|
|
- if(!!preDate && Ext.Date.format(preDate, 'H:i') != '00:00') {
|
|
|
+ if(!!preDate && Ext.Date.format(preDate, 'H:i') != '00:00' && Ext.Date.add(preDate, Ext.Date.MINUTE, me.BREAK_TIME) <= Ext.Date.parse(Ext.Date.format(preDate, 'Y-m-d') + ' 22:00:00', 'Y-m-d H:i:s')) {
|
|
|
record.set('startTime', Ext.Date.format(Ext.Date.add(preDate, Ext.Date.MINUTE, me.BREAK_TIME), 'H:i:s'));
|
|
|
}
|
|
|
}
|
|
|
@@ -249,11 +249,10 @@ Ext.define('school.view.interaction.timetable.Detail', {
|
|
|
school.util.BaseUtil.showErrorToast('请先完成上一课时设置');
|
|
|
return false;
|
|
|
}
|
|
|
- if(Ext.Date.format(preDate, 'H:i') == '22:00') {
|
|
|
- school.util.BaseUtil.showErrorToast('已无可用课时(08:00~22:00)');
|
|
|
- return false;
|
|
|
+ if(Ext.Date.add(preDate, Ext.Date.MINUTE, me.BREAK_TIME) >= Ext.Date.parse(Ext.Date.format(preDate, 'Y-m-d') + ' 22:00:00', 'Y-m-d H:i:s')) {
|
|
|
+ school.util.BaseUtil.showErrorToast('可用课程时间不足(08:00~22:00)');
|
|
|
}
|
|
|
- minValue = Ext.Date.add(preDate, Ext.Date.MINUTE, me.BREAK_TIME);
|
|
|
+ minValue = Ext.Date.add(preDate, Ext.Date.MINUTE, me.MIN_BREAK_TIME);
|
|
|
}else {
|
|
|
minValue = Ext.Date.parse('08:00', 'H:i');
|
|
|
}
|
|
|
@@ -277,7 +276,7 @@ Ext.define('school.view.interaction.timetable.Detail', {
|
|
|
let record = btn.ownerCt.$widgetRecord;
|
|
|
let startDate = record.get('_time1');
|
|
|
|
|
|
- if(Ext.Date.format(startDate, 'H:i') != '00:00') {
|
|
|
+ if(Ext.Date.format(startDate, 'H:i') != '00:00' && Ext.Date.add(startDate, Ext.Date.MINUTE, me.CLASS_TIME) <= Ext.Date.parse(Ext.Date.format(startDate, 'Y-m-d') + ' 22:00:00', 'Y-m-d H:i:s')) {
|
|
|
record.set('endTime', Ext.Date.format(Ext.Date.add(startDate, Ext.Date.MINUTE, me.CLASS_TIME), 'H:i:s'));
|
|
|
}
|
|
|
|