wugg 1 year ago
parent
commit
acf4f09437
1 changed files with 16 additions and 16 deletions
  1. 16 16
      app/admin/controller/OrderOutChild.php

+ 16 - 16
app/admin/controller/OrderOutChild.php

@@ -223,7 +223,7 @@ class OrderOutChild extends Base
         if ($param['use_type'] !== '') $where[] = ['p.use_type', '=', $param['use_type']];
         if ($param['cgdNo'] !== '') $where[] = ['m.cgdNo', '=', $param['cgdNo']];
         $condition = '1=1';
-        if($param['IsByMe']==1)$condition = '1=0';
+//        if($param['IsByMe']==1)$condition = '1=0';
         //只有level2的账号过滤数据权限
         if ($this->level == 2) {
             //库管只能看到库存品订单,供应商负责人只能看到非库存品订单
@@ -233,28 +233,28 @@ class OrderOutChild extends Base
             //库管看到所有的库存品发货申请单
             if (!empty($tmp)) $condition .= " or (a.order_type=1 AND c.contactor=" . $this->uid.")";
             else {
-            	if($param['IsByMe']==0){
+//            	if($param['IsByMe']==0){
 	                 $role = $this->checkDataShare();
 	                if (!empty($role[DataGroupModel::$type_全部])) {
 	                    $condition .= " or (a.apply_id in (" . implode(',', $role[DataGroupModel::$type_全部]) . "))";
 	                }
-            	}
+//            	}
 
             }
-            $person_supplier = Db::connect('mysql_sys')
-                ->name('supplier')
-                ->where(['is_del' => 0, 'personid' => $this->uid])
-                ->column('code');
-            if ($person_supplier) {
-            	if($param['IsByMe']==1){
-            		$suppe = checkHasAccountBySupplierNos($person_supplier);
-            		$suppAcco =array_diff($person_supplier,array_keys($suppe));
-		            $person_supplier= $suppAcco;
-            	}
-                $condition .= " or (a.order_type<>1 and a.supplierNo in ('" . implode('\',\'', $person_supplier) . "'))";
-            }
+//            $person_supplier = Db::connect('mysql_sys')
+//                ->name('supplier')
+//                ->where(['is_del' => 0, 'personid' => $this->uid])
+//                ->column('code');
+//            if ($person_supplier) {
+////            	if($param['IsByMe']==1){
+//            		$suppe = checkHasAccountBySupplierNos($person_supplier);
+//            		$suppAcco =array_diff($person_supplier,array_keys($suppe));
+//		            $person_supplier= $suppAcco;
+////            	}
+//                $condition .= " or (a.order_type<>1 and a.supplierNo in ('" . implode('\',\'', $person_supplier) . "'))";
+//            }
         }
-         if ($this->level == 3 && $param['IsByMe']==1) {
+         if ($this->level == 3) {
 
          	 //是否是仓库管理员
             $tmp = Db::name('warehouse_info')->field('id')->where(['is_del' => 0, 'contactor' => $this->uid])->findOrEmpty();