|
@@ -6,7 +6,7 @@ use app\BaseController;
|
|
|
use think\App;
|
|
|
use think\facade\Db;
|
|
|
use app\admin\model\ActionLog;
|
|
|
-class Supplier extends BaseController
|
|
|
+class Supplier extends Base
|
|
|
{
|
|
|
public $post = "";
|
|
|
public function __construct(App $app){
|
|
@@ -216,6 +216,14 @@ public function selec(){
|
|
|
if ($post['companyNo'] != '') $condition [] = ['code', '=', $post['companyNo']];
|
|
|
if ($post['name'] != '') $condition [] = ['name|a.contector', 'like', '%' . $post['name'] . '%'];
|
|
|
if ($post['type'] != '') $condition [] = ['type', '=', $post['type']];
|
|
|
+ if ($this->level != 1) {
|
|
|
+ //查询当前账号关联了哪几家公司
|
|
|
+ $userCommon = new \app\admin\common\User();
|
|
|
+ $company = $userCommon->handle('userlist', ['uid' => $this->uid]);
|
|
|
+ $company = json_decode($company, true);
|
|
|
+ $company = array_column($company['data']['list'][0]['company_relaton'], 'companyCode');
|
|
|
+ $condition[] = ['code', 'in', $company];
|
|
|
+ }
|
|
|
|
|
|
$count = Db::name('supplier_info')
|
|
|
->alias('a')
|