Browse Source

Merge branch 'master-new-wgg' of wugg/phpstock into master-new

wugg 1 year ago
parent
commit
1d7f05305f
3 changed files with 10 additions and 9 deletions
  1. 8 8
      app/admin/controller/GoodOfflineLog.php
  2. 1 0
      app/admin/controller/Goodup.php
  3. 1 1
      app/common.php

+ 8 - 8
app/admin/controller/GoodOfflineLog.php

@@ -27,14 +27,14 @@ class GoodOfflineLog extends Base
 //        if (!empty($role[DataGroupModel::$type_全部])) $where[] = ["createrid", "in", $role[DataGroupModel::$type_全部]];
 
         //只有level2的账号过滤数据权限
-        if ($this->level == 2) {
-            $role = $this->checkDataShare();
-            $hand = resign_hand_user($this->uid, 0);
-            if (!empty($role[DataGroupModel::$type_全部])) {
-                $arr = array_unique(array_merge($hand, $role[DataGroupModel::$type_全部]));
-                $where[] = ['a.createrid', 'in', $arr];
-            }
-        }
+//        if ($this->level == 2) {
+//            $role = $this->checkDataShare();
+//            $hand = resign_hand_user($this->uid, 0);
+//            if (!empty($role[DataGroupModel::$type_全部])) {
+//                $arr = array_unique(array_merge($hand, $role[DataGroupModel::$type_全部]));
+//                $where[] = ['a.createrid', 'in', $arr];
+//            }
+//        }
 
         $count = Db::name('good_offline_log')
             ->alias("a")

+ 1 - 0
app/admin/controller/Goodup.php

@@ -2254,6 +2254,7 @@ class Goodup extends Base
         if (($this->level == 2) && ($supplierNo != $data['supplierNo'])) {
             $supplier_account = checkHasAccountBySupplierNos([$supplierNo]);
             if (isset($supplier_account[$supplierNo])) return json_show(1004, '该供应商已开通账号,不允许操作');
+            if (isset($supplier_account[$data['supplierNo']])) return json_show(1004, '原供应商已开通账号,不允许操作');
         }
 
         $userCommon= \app\admin\common\User::getIns();

+ 1 - 1
app/common.php

@@ -122,7 +122,7 @@ if(!function_exists("GetFin")){
 	function GetFin($uri,$post){
 		$host =env("fin.hosturl");
 		$data =curl_request($host.$uri,$post);
-		return $data;
+		return json_decode($data,true);
 	}
 }