|
|
@@ -121,15 +121,21 @@ class BonusController extends BaseController {
|
|
|
$isCalcMonth = $period->isCalcMonth($periodNum);
|
|
|
$w = date('w', time());
|
|
|
//特殊要求,测试环境要去掉是否是周日的判断,周一至周日都能看
|
|
|
- if($preparePerfLimit === true && $isCalcMonth != 1) {
|
|
|
- return static::notice(['user' => [],'team'=>[]]);
|
|
|
- } else if ($preparePerfLimit !== true && (($w != '0' && $w != '1') || $isCalcMonth != 1)) {
|
|
|
+// if($preparePerfLimit === true && $isCalcMonth != 1) {
|
|
|
+// return static::notice(['user' => [],'team'=>[]]);
|
|
|
+// } 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'=>[]]);
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
+ $endTime = mktime(0,0,0, date('m'),date('d') + 1, date('Y')) - 1;
|
|
|
+ if ((($w != '1') && ($w != '2')) || time() > $endTime) {
|
|
|
return static::notice(['user' => [],'team'=>[]]);
|
|
|
- } else if ($preparePerfLimit !== true && (($w == '0' || $w == '1') || $isCalcMonth != 1)) {
|
|
|
- if ($newMonth && $w != '1' && $w != '2'){
|
|
|
- return static::notice(['user' => [],'team'=>[]]);
|
|
|
- }
|
|
|
}
|
|
|
+
|
|
|
// 判断此业绩期是否已经完成生成了预计算业绩单,生成完毕才能看到
|
|
|
$isPerfed = PeriodPrepare::isPerfed($periodNum);
|
|
|
if (!$isPerfed) {
|