|
|
@@ -133,9 +133,17 @@ Ext.define('school.view.interaction.timetable.Detail', {
|
|
|
data: [['第一学期'], ['第二学期']]
|
|
|
}),
|
|
|
defaultValue: (function() {
|
|
|
- let now = new Date();
|
|
|
- let month = now.getMonth() + 1;
|
|
|
- return (month < 9) ? '第一学期' : '第二学期'
|
|
|
+ let now = new Date(),
|
|
|
+ month = now.getMonth() + 1,
|
|
|
+ date = now.getDate(),
|
|
|
+ term;
|
|
|
+
|
|
|
+ if((month > 2 && month < 8) || (month == 2 && date > 15) || (month == 8 && date < 15)) {
|
|
|
+ term = '第二学期';
|
|
|
+ }else {
|
|
|
+ term = '第一学期'
|
|
|
+ }
|
|
|
+ return term;
|
|
|
})()
|
|
|
}, {
|
|
|
xtype: "textfield",
|