|
@@ -275,6 +275,26 @@ class DwyController extends BaseController
|
|
|
return json_encode($data);
|
|
|
}
|
|
|
|
|
|
+ public function boxOut(Request $request)
|
|
|
+ {
|
|
|
+
|
|
|
+ $param = $request->all();
|
|
|
+ //商标绑定
|
|
|
+ $url = 'https://tm.dwycloud.com/jbl/api/module-data/brand_in_stock/brand_in_stock/diy/lead_bind';
|
|
|
+ $header = [
|
|
|
+ 'Content-Type:application/json',
|
|
|
+ 'Authorization: ' . $request->header('Authorization'),
|
|
|
+ ];
|
|
|
+ $lead_bind = $param['lead_bind'];
|
|
|
+ $this->post_helper($url, json_encode($lead_bind), $header);
|
|
|
+
|
|
|
+ //商标出库
|
|
|
+ $url = 'https://tm.dwycloud.com/jbl/api/module-data/brand_in_stock/brand_in_stock/diy/lead_bind_out_stock';
|
|
|
+ $lead_bind = $param['lead_out'];
|
|
|
+ $this->post_helper($url, json_encode($lead_bind), $header);
|
|
|
+ return ['status'=>200,'success'];
|
|
|
+ }
|
|
|
+
|
|
|
public function post_helper($url, $data, $header)
|
|
|
{
|
|
|
$ch = curl_init();
|