|
@@ -42,6 +42,15 @@ class Suppler extends BaseController
|
|
|
}
|
|
|
$createrid= isset($user["data"]['id']) ? $user["data"]['id'] : "";
|
|
|
$creater= isset($user["data"]['nickname']) ? $user["data"]['nickname'] : "";
|
|
|
+ $personid = isset($this->post['personid']) && $this->post['personid'] !==""? intval($this->post['personid']):"";
|
|
|
+ if($personid==""){
|
|
|
+ return error_show(1002,"参数personid不能为空");
|
|
|
+ }
|
|
|
+ $to= GetInfoById($token,['id'=>$personid]);
|
|
|
+ if(empty($to)||$to['code']!=0){
|
|
|
+ return app_show(1002,"负责人信息不存在");
|
|
|
+ }
|
|
|
+ $person = isset($to['data']['nickname']) &&$to['data']['nickname']!="" ? $to['data']['nickname'] :"" ;
|
|
|
$type = isset($this->post['type']) && $this->post['type']!==""? intval($this->post['type']) :"";
|
|
|
if($type===""){
|
|
|
return error_show(1002,"申请类型不能为空");
|
|
@@ -145,7 +154,9 @@ class Suppler extends BaseController
|
|
|
"license_img"=>$supplier_img,
|
|
|
"creater"=>$creater,
|
|
|
"createrid"=>$createrid,
|
|
|
- "registertime"=>date('Y-m-d H:i:s')
|
|
|
+ "registertime"=>date('Y-m-d H:i:s'),
|
|
|
+ "person"=>$person,
|
|
|
+ "personid"=>$personid,
|
|
|
];
|
|
|
if($supplier_img!==""){
|
|
|
$ocr=new Ocr();
|
|
@@ -244,6 +255,10 @@ class Suppler extends BaseController
|
|
|
return app_show("0","获取成功",['list'=>$list,'count'=>$count]);
|
|
|
}
|
|
|
public function edit(){
|
|
|
+ $token = isset($this->post['token'])&&$this->post['token']!='' ? trim($this->post['token']):"";
|
|
|
+ if($token==''){
|
|
|
+ return error_show(1005,"参数token不能为空");
|
|
|
+ }
|
|
|
$id = isset($this->post['id']) && $this->post['id'] !=="" ? intval($this->post['id']):"";
|
|
|
if($id==""){
|
|
|
return error_show(1002,"参数id不能为空");
|
|
@@ -288,6 +303,15 @@ class Suppler extends BaseController
|
|
|
if($prove_img==""){
|
|
|
return error_show(1002,"参数prove_img不能为空");
|
|
|
}
|
|
|
+ $personid = isset($this->post['personid']) && $this->post['personid'] !==""? intval($this->post['personid']):"";
|
|
|
+ if($personid==""){
|
|
|
+ return error_show(1002,"参数personid不能为空");
|
|
|
+ }
|
|
|
+ $to= GetInfoById($token,['id'=>$personid]);
|
|
|
+ if(empty($to)||$to['code']!=0){
|
|
|
+ return app_show(1002,"负责人信息不存在");
|
|
|
+ }
|
|
|
+ $person = isset($to['data']['nickname']) &&$to['data']['nickname']!="" ? $to['data']['nickname'] :"" ;
|
|
|
$name = isset($this->post['name']) && $this->post['name'] !=="" ? trim($this->post['name']) :"";
|
|
|
if($name==""){
|
|
|
return error_show(1002,"数据标题不能为空");
|
|
@@ -354,7 +378,9 @@ class Suppler extends BaseController
|
|
|
"ticket_type"=>$ticket_type,
|
|
|
"updatetime"=>date("Y-m-d H:i:s"),
|
|
|
"is_platform"=>$is_platform,
|
|
|
- "prove_img"=>$prove_img
|
|
|
+ "prove_img"=>$prove_img,
|
|
|
+ "person"=>$person,
|
|
|
+ "personid"=>$personid,
|
|
|
];
|
|
|
if($supplier_img!=="" &&$info['license_img']!=$supplier_img){
|
|
|
$ocr=new Ocr();
|