wuggemail@foxmail.com 2 月之前
父節點
當前提交
7d6e9f70b4
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 2 2
      app/controller/Headquarters.php
  2. 4 0
      app/controller/UserInfo.php

+ 2 - 2
app/controller/Headquarters.php

@@ -33,7 +33,7 @@ class Headquarters extends BaseController
         if ($post['type'] !== '') $condition[] = ['type', '=', $post['type']];
         if ($post['type'] !== '') $condition[] = ['type', '=', $post['type']];
 
 
         //兼容原有各个接口的筛选
         //兼容原有各个接口的筛选
-        $count = Db::name('headquarters')
+        $count = Db::name('supplier')
             ->where($condition)
             ->where($condition)
             ->count('id');
             ->count('id');
 
 
@@ -336,7 +336,7 @@ class Headquarters extends BaseController
     {
     {
         $companyNo = $this->request->filter('trim')->post('code');
         $companyNo = $this->request->filter('trim')->post('code');
 
 
-        $res_1 = Db::name('headquarters')
+        $res_1 = Db::name('supplier')
             ->where('is_del', 0)
             ->where('is_del', 0)
             ->whereIn('code', $companyNo)
             ->whereIn('code', $companyNo)
             ->column('name', 'code');
             ->column('name', 'code');

+ 4 - 0
app/controller/UserInfo.php

@@ -95,6 +95,10 @@ class UserInfo extends BaseController
 		$list['system_version']=(new AccountPlat())->where(['account_id'=>$list['id']])->column('system_version','plat_code');
 		$list['system_version']=(new AccountPlat())->where(['account_id'=>$list['id']])->column('system_version','plat_code');
         $list['company_relaton'] = Db::name("account_company")->where(["account_id" => $list['id'], "is_del" => 0, "status" => 1])
         $list['company_relaton'] = Db::name("account_company")->where(["account_id" => $list['id'], "is_del" => 0, "status" => 1])
             ->column("companyCode,companyName,company_type,is_main,status");
             ->column("companyCode,companyName,company_type,is_main,status");
+        if($list['level']==1){
+
+            $list['company_relaton']= \app\user\model\Supplier::where(['is_del'=>0,"is_upgrade"=>1])->field("code companyCode ,name companyName,company_status status")->select();
+        }
         return json_show(0, "获取成功", $list);
         return json_show(0, "获取成功", $list);
     }
     }