|
|
@@ -389,16 +389,10 @@ class PurchaseOrderController extends BaseController
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
//小向花卉采购控制
|
|
|
if ($this->mainId == 23390) {
|
|
|
- if (!in_array($this->adminId, [24586, 24115, 24759, 26390, 23960])) {
|
|
|
+ if (!in_array($this->adminId, [24586, 24115, 24759, 26390, 23960, 25011])) {
|
|
|
util::fail('你不能采购哦');
|
|
|
}
|
|
|
}
|
|
|
- } else {
|
|
|
- if ($this->mainId == 644) {
|
|
|
-// if (!in_array($this->adminId, [919])) {
|
|
|
-// util::fail('你不能采购哈');
|
|
|
-// }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -497,7 +491,7 @@ class PurchaseOrderController extends BaseController
|
|
|
{
|
|
|
$where = [];
|
|
|
$get = Yii::$app->request->get();
|
|
|
- $export = $get['export']??0;
|
|
|
+ $export = $get['export'] ?? 0;
|
|
|
$where['shopId'] = $this->shopId;
|
|
|
$orderStatus = $get['status'] ?? '';
|
|
|
if ($orderStatus) {
|
|
|
@@ -529,19 +523,19 @@ class PurchaseOrderController extends BaseController
|
|
|
$where['entryTime'] = ['between', [$period['startTime'], $period['endTime']]];
|
|
|
}
|
|
|
|
|
|
- if($export == 1){
|
|
|
+ if ($export == 1) {
|
|
|
ini_set('memory_limit', '2045M');
|
|
|
set_time_limit(0);
|
|
|
- if(isset($where['entryTime']) == false){
|
|
|
+ if (isset($where['entryTime']) == false) {
|
|
|
util::fail('请选时间段');
|
|
|
}
|
|
|
$start = $where['entryTime'][1][0];
|
|
|
$end = $where['entryTime'][1][1];
|
|
|
- $monthTime = bcmul(31,86400);
|
|
|
+ $monthTime = bcmul(31, 86400);
|
|
|
$startArea = strtotime($start);
|
|
|
$endArea = strtotime($end);
|
|
|
- $diff = bcsub($endArea,$startArea);
|
|
|
- if($diff>$monthTime){
|
|
|
+ $diff = bcsub($endArea, $startArea);
|
|
|
+ if ($diff > $monthTime) {
|
|
|
util::fail('最长可导出一个月');
|
|
|
}
|
|
|
}
|