procedure TDocumentStatus_Frame.loginKingdee;
var
RESTClient: TRESTClient;
RESTRequest: TRESTRequest;
RESTResponse: TRESTResponse;
JSONArr, JSONArr1: TJSONArray;
json_str: string;
html: Tstrings;
i: Integer;
Status:string;
FReqQty:string;
FBillNo:string;
begin
try
html := TStringList.Create;
RESTClient := TRESTClient.Create(self);
RESTRequest := TRESTRequest.Create(self);
RESTResponse := TRESTResponse.Create(self);
RESTRequest.Client := RESTClient;
RESTRequest.Response := RESTResponse;
// 登录金蝶
json_str := '{' + '"acctID":"202001*****31592",' + '"username":"Pc",' +
'"password":"",' + '"lcid":2052' + '}';
RESTClient.BaseURL :=
'https://tomi.ik3cloud.com/K3Cloud/Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc';
RESTRequest.Method := TRESTRequestMethod.rmpost;
RESTRequest.AddBody(TStringStream.Create(json_str, TEncoding.UTF8),
TRESTContentType.ctAPPLICATION_JSON);
RESTRequest.Execute();
// 查询物料信息
json_str := '{' + '"data":{' + '"FormId": "BD_MATERIAL",' +
'"FieldKeys": "FNumber,FName,FSpecification,FUseOrgId.FName,FDocumentStatus,FForbidStatus,FBaseUnitId.Fname,FCreatorId.Fname,FCreateDate,FBaseProperty,FMaterialGroup.Fname",'
+ '"FilterString": [' +
'{"Left":"(","FieldName":"Fnumber","Compare":"=","Value":"' +
Trim(UniEdit1.Text) + '","Right"