网站子站怎么做,恢复2345网址导航,网站seo分析常用的工具是,做网站的热门行业按照惯例#xff0c;先上图【销售出库单】保存#xff0c;如图#xff1a;已经打印出 登陆请求及登陆成功#xff0c;保存请求及保存成功的返回信息。如下代码#xff0c;是完全可以直接进行运行的代码#xff0c;具体详见代码中注释。[code]//K/3 Cloud 业务站点地址$cl…按照惯例先上图【销售出库单】保存如图已经打印出 登陆请求及登陆成功保存请求及保存成功的返回信息。如下代码是完全可以直接进行运行的代码具体详见代码中注释。[code]//K/3 Cloud 业务站点地址$cloudUrl http://192.168.18.133/k3cloud/;//登陆参数$data array(55b828ecd6fc90,//帐套Iddemo,//用户名888888,//密码2052//语言标识);//定义记录Cloud服务端返回的Session$cookie_jar tempnam(./tmp,CloudSession);$post_content create_postdata($data);$result invoke_login($cloudUrl,$post_content,$cookie_jar);//$array json_decode($result,true);header(Content-type: text/html; charsetgb2312);echo ;print_r(登陆请求数据);echo ;print_r($post_content);echo ;print_r(登陆返回结果);echo ;print_r($result);$data_model {Creator:String,NeedUpDateFields:[],Model:{FID:0,FBillTypeID:{FBillTypeID:,FNUMBER:XSCKD01_SYS},FSaleOrgId:{FOrgID:0,FNUMBER:103},FCustomerID:{FCUSTID:0,FNUMBER:CUST0002},FStockOrgId:{FOrgID:0,FNUMBER:101.2},FOwnerIdHead:{FItemID:0,FNUMBER:103},FNote:,SAL_OUTSTOCK__FEntity:[{FMaterialID:{FNumber:1.01.001},FUnitID:{FNumber:Pcs,FName:},FStockID:{FNumber:CK001},FStockStausID:{FNumber:KCZT01_SYS},FMustQty:1,FRealQty:1,FAmount:0,FPrice:0,FTaxPrice:0,FDiscount:0,FDiscountRate:0,FIsFree:true,FLot:{FNUMBER:0000}}],SAL_OUTSTOCK__SubHeadEntity:{FSettleCurrID:{FCURRENCYID:0,FNumber:PRE001},FLocalCurrID:{FCURRENCYID:0,FNumber:PRE001},FSettleOrgID:{FOrgID:0,FNumber:103},FExchangeTypeID:{FRATETYPEID:0,FNumber:HLTX01_SYS},FExchangeRate:1,FBillAllAmount:0}}};$data array(SAL_OUTSTOCK,//业务对象标识FormId$data_model//具体Json字串);$post_content create_postdata($data);$result invoke_save($cloudUrl,$post_content,$cookie_jar);//$array json_decode($result,true);echo ;print_r(销售出库单请求数据);echo ;print_r($post_content);echo ;print_r(保存返回结果);echo ;print_r($result);//登陆function invoke_login($cloudUrl,$post_content,$cookie_jar){$loginurl $cloudUrl.Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc;return invoke_post($loginurl,$post_content,$cookie_jar,TRUE);}//保存function invoke_save($cloudUrl,$post_content,$cookie_jar){$invokeurl $cloudUrl.Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.common.kdsvc;return invoke_post($invokeurl,$post_content,$cookie_jar,FALSE);}//审核function invoke_audit($cloudUrl,$post_content,$cookie_jar){$invokeurl $cloudUrl.Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit.common.kdsvc;return invoke_post($invokeurl,$post_content,$cookie_jar,FALSE);}function invoke_post($url,$post_content,$cookie_jar,$isLogin){$ch curl_init($url);$this_header array(Content-Type: application/json,Content-Length: .strlen($post_content));curl_setopt($ch, CURLOPT_CUSTOMREQUEST, POST);curl_setopt($ch, CURLOPT_HTTPHEADER, $this_header);curl_setopt($ch, CURLOPT_POSTFIELDS, $post_content);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);if($isLogin){curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_jar);}else{curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_jar);}curl_setopt($ch, CURLOPT_TIMEOUT, 30);$result curl_exec($ch);curl_close($ch);return $result;}//构造Web API请求格式function create_postdata($args) {$postdata array(format1,useragentApiClient,ridcreate_guid(),parameters$args,timestampdate(Y-m-d),v1.0);return json_encode($postdata);}//生成guidfunction create_guid() {$charid strtoupper(md5(uniqid(mt_rand(), true)));$hyphen chr(45);// -$uuid chr(123)// {.substr($charid, 0, 8).$hyphen.substr($charid, 8, 4).$hyphen.substr($charid,12, 4).$hyphen.substr($charid,16, 4).$hyphen.substr($charid,20,12).chr(125);// }return $uuid;}?[/code]