Browse Source

工作日

es6
windy 7 years ago
parent
commit
7ea988cb5f
  1. 14
      dist/bundle.js
  2. 14
      dist/fineui.js
  3. 14
      dist/widget.js
  4. 14
      src/widget/dynamicdate/dynamicdate.caculate.js

14
dist/bundle.js vendored

@ -90357,8 +90357,18 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
date = date.getOffsetDate(BI.parseInt(obj.day)); date = date.getOffsetDate(BI.parseInt(obj.day));
} }
if (BI.isNotNull(obj.workDay)) { if (BI.isNotNull(obj.workDay)) {
// todo 根据工作日做偏移 暂时按天偏移 // 配置了节假日就按照节假日计算工作日偏移,否则按正常的天去算
date = date.getOffsetDate(BI.parseInt(obj.workDay)); if(BI.isNotNull(Date.holidays)) {
var count = Math.abs(obj.workDay);
for (var i = 0; i < count; i++) {
date = date.getOffsetDate(obj.workDay < 0 ? -1 : 1);
if(BI.isNotNull(Date.holidays[date.print("%Y-%X-%d")])) {
i--;
}
}
} else {
date = date.getOffsetDate(BI.parseInt(obj.workDay));
}
} }
if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) { if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) {
date = this.getBeginDate(date, obj); date = this.getBeginDate(date, obj);

14
dist/fineui.js vendored

@ -90600,8 +90600,18 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
date = date.getOffsetDate(BI.parseInt(obj.day)); date = date.getOffsetDate(BI.parseInt(obj.day));
} }
if (BI.isNotNull(obj.workDay)) { if (BI.isNotNull(obj.workDay)) {
// todo 根据工作日做偏移 暂时按天偏移 // 配置了节假日就按照节假日计算工作日偏移,否则按正常的天去算
date = date.getOffsetDate(BI.parseInt(obj.workDay)); if(BI.isNotNull(Date.holidays)) {
var count = Math.abs(obj.workDay);
for (var i = 0; i < count; i++) {
date = date.getOffsetDate(obj.workDay < 0 ? -1 : 1);
if(BI.isNotNull(Date.holidays[date.print("%Y-%X-%d")])) {
i--;
}
}
} else {
date = date.getOffsetDate(BI.parseInt(obj.workDay));
}
} }
if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) { if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) {
date = this.getBeginDate(date, obj); date = this.getBeginDate(date, obj);

14
dist/widget.js vendored

@ -2778,8 +2778,18 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
date = date.getOffsetDate(BI.parseInt(obj.day)); date = date.getOffsetDate(BI.parseInt(obj.day));
} }
if (BI.isNotNull(obj.workDay)) { if (BI.isNotNull(obj.workDay)) {
// todo 根据工作日做偏移 暂时按天偏移 // 配置了节假日就按照节假日计算工作日偏移,否则按正常的天去算
date = date.getOffsetDate(BI.parseInt(obj.workDay)); if(BI.isNotNull(Date.holidays)) {
var count = Math.abs(obj.workDay);
for (var i = 0; i < count; i++) {
date = date.getOffsetDate(obj.workDay < 0 ? -1 : 1);
if(BI.isNotNull(Date.holidays[date.print("%Y-%X-%d")])) {
i--;
}
}
} else {
date = date.getOffsetDate(BI.parseInt(obj.workDay));
}
} }
if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) { if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) {
date = this.getBeginDate(date, obj); date = this.getBeginDate(date, obj);

14
src/widget/dynamicdate/dynamicdate.caculate.js

@ -28,8 +28,18 @@
date = date.getOffsetDate(BI.parseInt(obj.day)); date = date.getOffsetDate(BI.parseInt(obj.day));
} }
if (BI.isNotNull(obj.workDay)) { if (BI.isNotNull(obj.workDay)) {
// todo 根据工作日做偏移 暂时按天偏移 // 配置了节假日就按照节假日计算工作日偏移,否则按正常的天去算
date = date.getOffsetDate(BI.parseInt(obj.workDay)); if(BI.isNotNull(Date.holidays)) {
var count = Math.abs(obj.workDay);
for (var i = 0; i < count; i++) {
date = date.getOffsetDate(obj.workDay < 0 ? -1 : 1);
if(BI.isNotNull(Date.holidays[date.print("%Y-%X-%d")])) {
i--;
}
}
} else {
date = date.getOffsetDate(BI.parseInt(obj.workDay));
}
} }
if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) { if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) {
date = this.getBeginDate(date, obj); date = this.getBeginDate(date, obj);

Loading…
Cancel
Save