Browse Source

工作日

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

12
dist/bundle.js vendored

@ -90357,9 +90357,19 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
date = date.getOffsetDate(BI.parseInt(obj.day));
}
if (BI.isNotNull(obj.workDay)) {
// todo 根据工作日做偏移 暂时按天偏移
// 配置了节假日就按照节假日计算工作日偏移,否则按正常的天去算
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) {
date = this.getBeginDate(date, obj);
}

12
dist/fineui.js vendored

@ -90600,9 +90600,19 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
date = date.getOffsetDate(BI.parseInt(obj.day));
}
if (BI.isNotNull(obj.workDay)) {
// todo 根据工作日做偏移 暂时按天偏移
// 配置了节假日就按照节假日计算工作日偏移,否则按正常的天去算
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) {
date = this.getBeginDate(date, obj);
}

12
dist/widget.js vendored

@ -2778,9 +2778,19 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
date = date.getOffsetDate(BI.parseInt(obj.day));
}
if (BI.isNotNull(obj.workDay)) {
// todo 根据工作日做偏移 暂时按天偏移
// 配置了节假日就按照节假日计算工作日偏移,否则按正常的天去算
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) {
date = this.getBeginDate(date, obj);
}

12
src/widget/dynamicdate/dynamicdate.caculate.js

@ -28,9 +28,19 @@
date = date.getOffsetDate(BI.parseInt(obj.day));
}
if (BI.isNotNull(obj.workDay)) {
// todo 根据工作日做偏移 暂时按天偏移
// 配置了节假日就按照节假日计算工作日偏移,否则按正常的天去算
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) {
date = this.getBeginDate(date, obj);
}

Loading…
Cancel
Save