|
@@ -45,7 +45,19 @@ class After extends Base
|
|
|
if($wsm==false){
|
|
|
return error_show(1005,"未找到仓库数据");
|
|
|
}
|
|
|
+// $cgder =$wsm['contactor_name'] ??'';
|
|
|
+// $cgderid =$wsm['contactor'] ??0;
|
|
|
}
|
|
|
+// else{
|
|
|
+// $roleArr=\think\facade\Config::get("app");
|
|
|
+// $kuguan = Db::name("user_role")->where(["roleid"=>$roleArr['wsm_cgder_role'],"is_del"=>0])->column("uid");
|
|
|
+// if(empty($kuguan)){
|
|
|
+// return error_show(1005,"未找到仓库管理员数据");
|
|
|
+// }
|
|
|
+// $userinfo = Db::name("dapart_user")
|
|
|
+// $cgder =$wsm['contactor_name'] ??'';
|
|
|
+// $cgderid =$wsm['contactor'] ??0;
|
|
|
+// }
|
|
|
|
|
|
if ($oder['order_type'] == 3) {
|
|
|
$goon = Db::name("good_zixun")->where(["spuCode" => $oder['good_code'], "is_del" => 0])->find();
|
|
@@ -213,8 +225,9 @@ class After extends Base
|
|
|
$role=$this->checkRole();
|
|
|
$condition='';
|
|
|
if(!empty($role['write']) && $this->uid!=""){
|
|
|
- // $where[]=["a.apply_id","in",$role['write']];
|
|
|
- $condition .="a.cgderid = {$this->uid} or a.apply_id in (".implode(',',$role['write']).") or a.person_id={$this->uid}";
|
|
|
+ $cgdArr =\think\facade\Config::get("app");
|
|
|
+ $cgdids =implode(",",$cgdArr);
|
|
|
+ $condition .="a.cgderid = {$this->uid} or a.apply_id in (".implode(',',$role['write']).") or a.person_id={$this->uid} or (order_type=1 and {$this->roleid} in ($cgdids))";
|
|
|
}
|
|
|
$company_name = isset($this->post['company_name']) && $this->post['company_name'] !== "" ? trim($this->post['company_name']) : "";
|
|
|
if ($company_name !== "") $where[] = ["a.apply_id", 'in', get_company_item_user_by_name($company_name)];
|