Browse Source

上一次操作的延续

wufeng 2 years ago
parent
commit
7bf2622ea5
1 changed files with 4 additions and 4 deletions
  1. 4 4
      app/admin/controller/Report.php

+ 4 - 4
app/admin/controller/Report.php

@@ -913,7 +913,7 @@ class Report extends Base
 
         if (!$val_params->check($param)) return error_show(1004, $val_params->getError());
 
-        $where = [['or.is_del','=',0]];
+        $where = [['or.is_del', '=', 0]];
         if ($param['start_date'] != '' && $param['end_date'] != '') $where[] = ['or.addtime', 'between', [$param['start_date'] . ' 00:00:00', $param['end_date'] . ' 23:59:59']];
 
         $all_status = [1 => '待业务审核', 2 => '待采购审核', 3 => '待设置仓库', 4 => '待客户退货', 5 => '售后已完成', 6 => '业务已驳回', 7 => '采购已驳回', 8 => '申请已取消'];
@@ -965,7 +965,7 @@ class Report extends Base
 
         if (!$val_params->check($param)) return error_show(1004, $val_params->getError());
 
-        $where = [['or.is_del','=',0]];
+        $where = [['or.is_del', '=', 0]];
         if ($param['start_date'] != '' && $param['end_date'] != '') $where[] = ['or.addtime', 'between', [$param['start_date'] . ' 00:00:00', $param['end_date'] . ' 23:59:59']];
 
         $all_status = [2 => '业务主管审核', 3 => '采购主管审核', 6 => '业务驳回', 7 => '采购驳回', 8 => '取消'];
@@ -1147,7 +1147,7 @@ class Report extends Base
 
         $data = [];
         foreach ($list as $value) {
-            $value['name'] = get_company_name_by_uid($value['cgder_id']);
+            $value['name'] = get_company_name_by_uid($value['cgder_id'] ?? 0);
             $data[] = $value;
         }
 
@@ -1190,7 +1190,7 @@ class Report extends Base
         foreach ($list as $value) {
             $value['供应商是否可以退货'] = isset($all_is_th[$value['供应商是否可以退货']]) ? $all_is_th[$value['供应商是否可以退货']] : '';
             $value['商品库存性质'] = isset($all_is_stock[$value['商品库存性质']]) ? $all_is_stock[$value['商品库存性质']] : '';
-            $value['采购员所属部门'] = get_company_name_by_uid($value['cgder_id']);
+            $value['采购员所属部门'] = get_company_name_by_uid($value['cgder_id'] ?? 0);
             unset($value['cgder_id']);
             $data[] = $value;
         }