Foxtable(狐表)用户栏目专家坐堂 → 回写钉钉审批流程明细控件


  共有7137人关注过本帖树形打印复制链接

主题:回写钉钉审批流程明细控件

帅哥哟,离线,有人找我吗?
linswcfr
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:600 积分:5509 威望:0 精华:0 注册:2011/9/30 8:42:00
回写钉钉审批流程明细控件  发帖心情 Post By:2019/9/10 15:13:00 [只看该作者]

// 明细包含控件 // 明细-单行输入框 OapiProcessinstanceCreateRequest.FormComponentValueVo ItemName1 = new OapiProcessinstanceCreateRequest.FormComponentValueVo(); ItemName1.setName("明细-单行输入框示例"); ItemName1.setValue("明细-单行输入框value"); // 明细-多行输入框 OapiProcessinstanceCreateRequest.FormComponentValueVo ItemName2 = new OapiProcessinstanceCreateRequest.FormComponentValueVo(); ItemName2.setName("明细-多行输入框示例"); ItemName2.setValue("明细-多行输入框value"); // 明细-照片 OapiProcessinstanceCreateRequest.FormComponentValueVo ItemName3 = new OapiProcessinstanceCreateRequest.FormComponentValueVo(); ItemName3.setName("明细-图片示例"); ItemName3.setValue("[\"http://xxxxx\"]"); // 明细 OapiProcessinstanceCreateRequest.FormComponentValueVo vo4 = new OapiProcessinstanceCreateRequest.FormComponentValueVo(); vo4.setName("明细示例"); vo4.setValue(JSON.toJSONString(Arrays.asList(Arrays.asList(ItemName1, ItemName2, ItemName3))));
这个.net要怎么写
vo4.value = ?

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110587 积分:562831 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/9/10 15:42:00 [只看该作者]

没看懂,相关开发文档发上来看看

 回到顶部
帅哥哟,离线,有人找我吗?
linswcfr
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:600 积分:5509 威望:0 精华:0 注册:2011/9/30 8:42:00
  发帖心情 Post By:2019/9/10 15:44:00 [只看该作者]


 回到顶部
帅哥,在线噢!
有点蓝
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110587 积分:562831 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/9/10 15:50:00 [只看该作者]

参考这里Http接口用法:http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&Id=139788

使用Foxtable的HttpClient即可

 回到顶部
帅哥哟,离线,有人找我吗?
linswcfr
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:600 积分:5509 威望:0 精华:0 注册:2011/9/30 8:42:00
  发帖心情 Post By:2019/9/10 15:59:00 [只看该作者]

Dim client As DingTalk.Api.IDingTalkClient =  New DingTalk.Api.DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/create")
Dim request As DingTalk.Api.Request.OapiProcessinstanceCreateRequest = new DingTalk.Api.Request.OapiProcessinstanceCreateRequest()
request.AgentId = xxxxxxxx
request.ProcessCode = "PROC-5D736E2B-xxxx-xxx-B604-8247099BFA3D"

''' 审批流表单参数,设置各表单项值
Dim lst As List(Of DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain) = New List (Of DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain)()
Dim r As Row = Tables("销售主表").Current
If r IsNot Nothing Then
    If r.IsNull("流程ID") Then
        ' 单行输入框|多行输入框
        Dim vo1 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
        vo1.Name = "单据日期"
        vo1.Value = r(vo1.Name)
        Dim vo2 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
        vo2.Name = "单据号"
        vo2.Value = r(vo2.Name)
        
        Dim vo3 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
        vo3.Name = "客户名称"
        vo3.Value = r(vo3.Name)
        
        Dim vo4 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
        vo4.Name = "部门名称"
        vo4.Value = r(vo4.Name)
        
        Dim vo5 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
        vo5.Name = "用户名称"
        vo5.Value = r(vo5.Name)
        
        Dim drs As List(Of DataRow)
        drs = r.DataRow.GetChildRows("销售子表")
        For Each sr As DataRow In drs
            Output.Show(sr("单据号"))
            '明细包含控件
            '明细-单行输入框|明细-多行输入框
            Dim its1 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
            its1.Name = "明细-单据号"
            its1.Value = sr("单据号")
            '明细-单行输入框|明细-多行输入框
            Dim its2 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
            its2.Name = "明细-品名"
            its2.Value = sr("品名")
            '明细-单行输入框|明细-多行输入框
            Dim its3 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
            its3.Name = "明细-数量"
            its3.Value = sr("数量")
            '明细-单行输入框|明细-多行输入框
            Dim its4 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
            its4.Name = "明细-单价"
            its4.Value = sr("单价")
            '明细-单行输入框|明细-多行输入框
            Dim its5 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
            its5.Name = "明细-金额"
            its5.Value = sr("金额")
        Next
        
        '// 明细
        'OapiProcessinstanceCreateRequest.FormComponentValueVo vo4 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
        'vo4.setName("明细示例");
        'vo4.setValue(JSON.toJSONString(Arrays.asList(Arrays.asList(ItemName1, ItemName2, ItemName3))));
        
        '' 明细
        Dim vo10 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
        vo10.Name = "明细"
        vo10.Value =
        
        lst.add(vo1)
        lst.add(vo2)
        lst.add(vo3)
        lst.add(vo4)
        lst.add(vo5)
        lst.Add(vo6)

        '''
        request.FormComponentValues_ = lst
        request.OriginatorUserId = "0500181526219737" '必填
        request.DeptId = 87654365 '必填
        request.Approvers("userid1,userid2"); '选填
        request.CcList ="userid1,userid2" '选填
        request.CcPosition = "START_FINISH" '选填
        Dim response As DingTalk.Api.Response.OapiProcessinstanceCreateResponse = client.execute(request,Functions.Execute("GetQYAccessToken"))
        Output.Show(response.Body)
    End If
End If

红色位置搞不定,求老师帮忙!
[此贴子已经被作者于2019/10/16 10:48:51编辑过]

 回到顶部
帅哥,在线噢!
有点蓝
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110587 积分:562831 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/9/10 16:48:00 [只看该作者]

Dim lst2 As List(Of DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain) = New List (Of DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain)()

For Each sr As DataRow In drs
            Output.Show(sr("单据号"))
            '明细包含控件
            '明细-单行输入框|明细-多行输入框
            Dim its1 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
            its1.Name = "明细-单据号"
            its1.Value = sr("单据号")
lst2.add(its1)
……
next

Dim vo10 As DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain = New DingTalk.Api.Request.OapiProcessinstanceCreateRequest.FormComponentValueVoDomain()
        vo10.Name = "明细"
        vo10.Value = FastJSON.JSON.ToJSON(lst2

 回到顶部
帅哥哟,离线,有人找我吗?
linswcfr
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:600 积分:5509 威望:0 精华:0 注册:2011/9/30 8:42:00
  发帖心情 Post By:2019/9/10 17:15:00 [只看该作者]

{"errcode":820001,"errmsg":"发起审批实例失败,错误原因为【审批表单组件格式错误,组件名:明细】","request_id":"1079tgg0tz1f5"}



 回到顶部
帅哥哟,离线,有人找我吗?
linswcfr
  8楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:600 积分:5509 威望:0 精华:0 注册:2011/9/30 8:42:00
  发帖心情 Post By:2019/9/10 17:19:00 [只看该作者]

[{"$type":"DingTalk.Api.Request.OapiProcessinstanceCreateRequest+FormComponentValueVoDomain, TopSdk, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null","ExtValue":null,"Name":"明细-单据号","Value":"201909-003"},{"$type":"DingTalk.Api.Request.OapiProcessinstanceCreateRequest+FormComponentValueVoDomain, TopSdk, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null","ExtValue":null,"Name":"明细-单据号","Value":"201909-003"},{"$type":"DingTalk.Api.Request.OapiProcessinstanceCreateRequest+FormComponentValueVoDomain, TopSdk, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null","ExtValue":null,"Name":"明细-单据号","Value":"201909-003"}]
{"errcode":820001,"errmsg":"发起审批实例失败,错误原因为【审批表单组件格式错误,组件名:明细】","request_id":"47fm9hogwvmc"}

 回到顶部
帅哥,在线噢!
有点蓝
  9楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110587 积分:562831 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/9/10 17:26:00 [只看该作者]

这种错误请自行查我文档错误码。

提示很明显了,没有“明细”这名称的组件

 回到顶部
帅哥哟,离线,有人找我吗?
linswcfr
  10楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:600 积分:5509 威望:0 精华:0 注册:2011/9/30 8:42:00
  发帖心情 Post By:2019/9/10 17:31:00 [只看该作者]

没有是这样提示        '{"errcode":820001,"errmsg":"发起审批实例失败,错误原因为【找不到表单组件:找不到表单组件:单据日期A】","request_id":"7meia87xqpj3"}

 回到顶部
总数 12 1 2 下一页