|
|
@ -73547,7 +73547,7 @@ BI.Calendar = BI.inherit(BI.Widget, { |
|
|
|
min: "1900-01-01", // 最小日期
|
|
|
|
min: "1900-01-01", // 最小日期
|
|
|
|
max: "2099-12-31", // 最大日期
|
|
|
|
max: "2099-12-31", // 最大日期
|
|
|
|
year: 2015, |
|
|
|
year: 2015, |
|
|
|
month: 7, // 7表示八月
|
|
|
|
month: 8, |
|
|
|
day: 25 |
|
|
|
day: 25 |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -73565,18 +73565,23 @@ BI.Calendar = BI.inherit(BI.Widget, { |
|
|
|
var MD = Date._MD.slice(0); |
|
|
|
var MD = Date._MD.slice(0); |
|
|
|
MD[1] = BI.isLeapYear(log.ymd[0]) ? 29 : 28; |
|
|
|
MD[1] = BI.isLeapYear(log.ymd[0]) ? 29 : 28; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 日期所在月第一天
|
|
|
|
De.setFullYear(log.ymd[0], log.ymd[1], 1); |
|
|
|
De.setFullYear(log.ymd[0], log.ymd[1], 1); |
|
|
|
|
|
|
|
// 是周几
|
|
|
|
log.FDay = De.getDay(); |
|
|
|
log.FDay = De.getDay(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 当前月页第一天是几号
|
|
|
|
log.PDay = MD[M === 0 ? 11 : M - 1] - log.FDay + 1; |
|
|
|
log.PDay = MD[M === 0 ? 11 : M - 1] - log.FDay + 1; |
|
|
|
log.NDay = 1; |
|
|
|
log.NDay = 1; |
|
|
|
|
|
|
|
|
|
|
|
var items = []; |
|
|
|
var items = []; |
|
|
|
BI.each(BI.range(42), function (i) { |
|
|
|
BI.each(BI.range(42), function (i) { |
|
|
|
var td = {}, YY = log.ymd[0], MM = log.ymd[1] + 1, DD; |
|
|
|
var td = {}, YY = log.ymd[0], MM = log.ymd[1] + 1, DD; |
|
|
|
|
|
|
|
// 上个月的日期
|
|
|
|
if (i < log.FDay) { |
|
|
|
if (i < log.FDay) { |
|
|
|
td.lastMonth = true; |
|
|
|
td.lastMonth = true; |
|
|
|
DD = i + log.PDay; |
|
|
|
DD = i + log.PDay; |
|
|
|
|
|
|
|
// 上一年
|
|
|
|
MM === 1 && (YY -= 1); |
|
|
|
MM === 1 && (YY -= 1); |
|
|
|
MM = MM === 1 ? 12 : MM - 1; |
|
|
|
MM = MM === 1 ? 12 : MM - 1; |
|
|
|
} else if (i >= log.FDay && i < log.FDay + MD[log.ymd[1]]) { |
|
|
|
} else if (i >= log.FDay && i < log.FDay + MD[log.ymd[1]]) { |
|
|
@ -73619,7 +73624,7 @@ BI.Calendar = BI.inherit(BI.Widget, { |
|
|
|
vgap: 10 |
|
|
|
vgap: 10 |
|
|
|
}] |
|
|
|
}] |
|
|
|
}); |
|
|
|
}); |
|
|
|
var days = this._dateCreator(o.year, o.month, o.day); |
|
|
|
var days = this._dateCreator(o.year, o.month - 1, o.day); |
|
|
|
items = []; |
|
|
|
items = []; |
|
|
|
items.push(days.slice(0, 7)); |
|
|
|
items.push(days.slice(0, 7)); |
|
|
|
items.push(days.slice(7, 14)); |
|
|
|
items.push(days.slice(7, 14)); |
|
|
@ -86943,7 +86948,7 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
setValue: function (v) { |
|
|
|
this.trigger.setValue(v + 1); |
|
|
|
this.trigger.setValue(v); |
|
|
|
this.popup.setValue(v); |
|
|
|
this.popup.setValue(v); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -87048,7 +87053,7 @@ BI.DatePicker = BI.inherit(BI.Widget, { |
|
|
|
if (self._month === 0) { |
|
|
|
if (self._month === 0) { |
|
|
|
self.setValue({ |
|
|
|
self.setValue({ |
|
|
|
year: self.year.getValue() - 1, |
|
|
|
year: self.year.getValue() - 1, |
|
|
|
month: 11 |
|
|
|
month: 12 |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
self.setValue({ |
|
|
|
self.setValue({ |
|
|
@ -87140,14 +87145,14 @@ BI.DatePicker = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
_checkLeftValid: function () { |
|
|
|
_checkLeftValid: function () { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var valid = !(this._month === 0 && this._year === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear()); |
|
|
|
var valid = !(this._month === 1 && this._year === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear()); |
|
|
|
this.left.setEnable(valid); |
|
|
|
this.left.setEnable(valid); |
|
|
|
return valid; |
|
|
|
return valid; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_checkRightValid: function () { |
|
|
|
_checkRightValid: function () { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var valid = !(this._month === 11 && this._year === BI.parseDateTime(o.max, "%Y-%X-%d").getFullYear()); |
|
|
|
var valid = !(this._month === 12 && this._year === BI.parseDateTime(o.max, "%Y-%X-%d").getFullYear()); |
|
|
|
this.right.setEnable(valid); |
|
|
|
this.right.setEnable(valid); |
|
|
|
return valid; |
|
|
|
return valid; |
|
|
|
}, |
|
|
|
}, |
|
|
@ -90452,7 +90457,7 @@ BI.shortcut("bi.dynamic_date_param_item", BI.DynamicDateParamItem);BI.DynamicDat |
|
|
|
var date = BI.getDate(); |
|
|
|
var date = BI.getDate(); |
|
|
|
this.ymd.setValue({ |
|
|
|
this.ymd.setValue({ |
|
|
|
year: date.getFullYear(), |
|
|
|
year: date.getFullYear(), |
|
|
|
month: date.getMonth(), |
|
|
|
month: date.getMonth() + 1, |
|
|
|
day: date.getDate() |
|
|
|
day: date.getDate() |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")); |
|
|
|
this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")); |
|
|
@ -90547,7 +90552,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger |
|
|
|
type: BI.DynamicDateCombo.Static, |
|
|
|
type: BI.DynamicDateCombo.Static, |
|
|
|
value: { |
|
|
|
value: { |
|
|
|
year: date[0] | 0, |
|
|
|
year: date[0] | 0, |
|
|
|
month: date[1] - 1, |
|
|
|
month: date[1], |
|
|
|
day: date[2] | 0 |
|
|
|
day: date[2] | 0 |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
@ -90676,7 +90681,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger |
|
|
|
this.editor.setValue(""); |
|
|
|
this.editor.setValue(""); |
|
|
|
this.setTitle(""); |
|
|
|
this.setTitle(""); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
var dateStr = value.year + "-" + (value.month + 1) + "-" + value.day; |
|
|
|
var dateStr = value.year + "-" + (value.month) + "-" + value.day; |
|
|
|
this.editor.setState(dateStr); |
|
|
|
this.editor.setState(dateStr); |
|
|
|
this.editor.setValue(dateStr); |
|
|
|
this.editor.setValue(dateStr); |
|
|
|
this.setTitle(dateStr); |
|
|
|
this.setTitle(dateStr); |
|
|
@ -91166,7 +91171,7 @@ BI.extend(BI.DynamicDateTimeCombo, { |
|
|
|
var date = BI.getDate(); |
|
|
|
var date = BI.getDate(); |
|
|
|
this.ymd.setValue({ |
|
|
|
this.ymd.setValue({ |
|
|
|
year: date.getFullYear(), |
|
|
|
year: date.getFullYear(), |
|
|
|
month: date.getMonth(), |
|
|
|
month: date.getMonth() + 1, |
|
|
|
day: date.getDate() |
|
|
|
day: date.getDate() |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.timeSelect.setValue(); |
|
|
|
this.timeSelect.setValue(); |
|
|
@ -91431,7 +91436,7 @@ BI.extend(BI.DynamicDateTimeSelect, { |
|
|
|
type: BI.DynamicDateCombo.Static, |
|
|
|
type: BI.DynamicDateCombo.Static, |
|
|
|
value: { |
|
|
|
value: { |
|
|
|
year: date[0] | 0, |
|
|
|
year: date[0] | 0, |
|
|
|
month: date[1] - 1, |
|
|
|
month: date[1], |
|
|
|
day: date[2] | 0, |
|
|
|
day: date[2] | 0, |
|
|
|
hour: date[3] | 0, |
|
|
|
hour: date[3] | 0, |
|
|
|
minute: date[4] | 0, |
|
|
|
minute: date[4] | 0, |
|
|
@ -91563,7 +91568,7 @@ BI.extend(BI.DynamicDateTimeSelect, { |
|
|
|
this.editor.setValue(""); |
|
|
|
this.editor.setValue(""); |
|
|
|
this.setTitle(""); |
|
|
|
this.setTitle(""); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
var dateStr = value.year + "-" + (value.month + 1) + "-" + value.day + " " + |
|
|
|
var dateStr = value.year + "-" + (value.month) + "-" + value.day + " " + |
|
|
|
(value.hour || "00") + ":" + (value.minute || "00") + ":" + (value.second || "00"); |
|
|
|
(value.hour || "00") + ":" + (value.minute || "00") + ":" + (value.second || "00"); |
|
|
|
this.editor.setState(dateStr); |
|
|
|
this.editor.setState(dateStr); |
|
|
|
this.editor.setValue(dateStr); |
|
|
|
this.editor.setValue(dateStr); |
|
|
@ -93499,7 +93504,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
|
|
|
|
|
|
|
|
// 纵向排列月
|
|
|
|
// 纵向排列月
|
|
|
|
var month = [0, 6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11]; |
|
|
|
var month = [1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12]; |
|
|
|
var items = []; |
|
|
|
var items = []; |
|
|
|
items.push(month.slice(0, 2)); |
|
|
|
items.push(month.slice(0, 2)); |
|
|
|
items.push(month.slice(2, 4)); |
|
|
|
items.push(month.slice(2, 4)); |
|
|
@ -93519,7 +93524,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, { |
|
|
|
height: 23, |
|
|
|
height: 23, |
|
|
|
width: 38, |
|
|
|
width: 38, |
|
|
|
value: td, |
|
|
|
value: td, |
|
|
|
text: td + 1 |
|
|
|
text: td |
|
|
|
}; |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -106840,7 +106845,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear |
|
|
|
|
|
|
|
|
|
|
|
_createMonths: function () { |
|
|
|
_createMonths: function () { |
|
|
|
// 纵向排列月
|
|
|
|
// 纵向排列月
|
|
|
|
var month = [0, 6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11]; |
|
|
|
var month = [1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12]; |
|
|
|
var items = []; |
|
|
|
var items = []; |
|
|
|
items.push(month.slice(0, 2)); |
|
|
|
items.push(month.slice(0, 2)); |
|
|
|
items.push(month.slice(2, 4)); |
|
|
|
items.push(month.slice(2, 4)); |
|
|
@ -106860,7 +106865,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear |
|
|
|
height: 23, |
|
|
|
height: 23, |
|
|
|
width: 38, |
|
|
|
width: 38, |
|
|
|
value: td, |
|
|
|
value: td, |
|
|
|
text: td + 1 |
|
|
|
text: td |
|
|
|
}; |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -107502,7 +107507,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY |
|
|
|
case BI.DynamicDateCombo.Static: |
|
|
|
case BI.DynamicDateCombo.Static: |
|
|
|
default: |
|
|
|
default: |
|
|
|
value = value || {}; |
|
|
|
value = value || {}; |
|
|
|
var month = BI.isNull(value.month) ? null : value.month + 1; |
|
|
|
var month = BI.isNull(value.month) ? null : value.month; |
|
|
|
this.yearEditor.setValue(value.year); |
|
|
|
this.yearEditor.setValue(value.year); |
|
|
|
this.yearEditor.setTitle(value.year); |
|
|
|
this.yearEditor.setTitle(value.year); |
|
|
|
this.monthEditor.setValue(month); |
|
|
|
this.monthEditor.setValue(month); |
|
|
|