瀏覽代碼

施工单

cqpCow 1 年之前
父節點
當前提交
c3ebd21c4f
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Service/ProductService.php

+ 2 - 2
app/Service/ProductService.php

@@ -370,7 +370,7 @@ class ProductService extends Service
         $customer['unit_name'] = $title;
         //库存
         $customer['product_inventory'] = $depart_id = [];
-        if(! $user['is_main']) $depart_id = array_column($user['rule_depart'],'depart_id');
+        if($user['id'] != Employee::SPECIAL_ADMIN) $depart_id = array_column($user['rule_depart'],'depart_id');
         $inventory = $this->getProductInventory([$data['id']], $depart_id);
         if(! empty($inventory)) $customer['product_inventory'] = $inventory;
 
@@ -427,7 +427,7 @@ class ProductService extends Service
             ->select('title','id','product_category_id','code','size','unit','bar_code','retail_price','cost','depart_price','state','crt_id','crt_time','mark')
             ->orderby('id', 'desc');
 
-        if(! $user['is_main']) {
+        if($user['id'] != Employee::SPECIAL_ADMIN) {
             $user_id = $user['id'];
             $depart_id = array_column($user['rule_depart'],'depart_id');
             $product_id = ProductRange::where('del_time',0)