|
|
@@ -108,6 +108,12 @@ class BonusController extends BaseController {
|
|
|
$period = Period::instance();
|
|
|
$periodNum = $period->getNowPeriodNum();
|
|
|
$month = $period->getNowYearMonth();
|
|
|
+ $newMonth = 0;
|
|
|
+ if($period->periodArr['WEEK_NUMBER']==1){
|
|
|
+ $periodNum = $periodNum - 1;
|
|
|
+ $month = $period->getLastMonth()['yearMonth'];
|
|
|
+ $newMonth = 1;
|
|
|
+ }
|
|
|
// 判断是否是周日,并且是否是月结节点
|
|
|
// 特殊要求,测试环境要去掉是否是周日的判断,周一至周日都能看.正式环境只有周日能看
|
|
|
// 读取加入到忽略文件的common/config/config.php文件内容
|
|
|
@@ -117,8 +123,12 @@ class BonusController extends BaseController {
|
|
|
//特殊要求,测试环境要去掉是否是周日的判断,周一至周日都能看
|
|
|
if($preparePerfLimit === true && $isCalcMonth != 1) {
|
|
|
return static::notice(['user' => [],'team'=>[]]);
|
|
|
- } else if ($preparePerfLimit !== true && ($w != '0' || $isCalcMonth != 1)) {
|
|
|
+ } else if ($preparePerfLimit !== true && (($w != '0' && $w != '1') || $isCalcMonth != 1)) {
|
|
|
return static::notice(['user' => [],'team'=>[]]);
|
|
|
+ } else if ($preparePerfLimit !== true && (($w == '0' || $w == '1') || $isCalcMonth != 1)) {
|
|
|
+ if ($newMonth && $w != '1'){
|
|
|
+ return static::notice(['user' => [],'team'=>[]]);
|
|
|
+ }
|
|
|
}
|
|
|
// 判断此业绩期是否已经完成生成了预计算业绩单,生成完毕才能看到
|
|
|
$isPerfed = PeriodPrepare::isPerfed($periodNum);
|