dingtalk.oapi.process.form.get (获取表单schema)

ISV通过这个接口获取流程的表单schema信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
process_code String 必须 PROC-5A11E770-D8A5-4101-AEFE-9E2AD79A939F 流程模板code

响应参数

名称 类型 示例值 描述
result ProcessTopVo result result
  • form_component_vos
  • FormComponentVo []
  • formComponentVOS
  • 表单列表
  • children
  • FormComponent1Vo []
  • children
  • 子组件
  • children
  • FormComponent2Vo []
  • children
  • 子组件
  • props
  • FormComponentPropVo
  • props
  • 组件属性
  • └ label
  • String
  • 出差事由
  • 标题
  • └ id
  • String
  • TextField-JAM4DKLB
  • id
  • └ disable
  • Boolean
  • true
  • 是否可编辑
  • └ biz_alias
  • String
  • alitrip.business
  • 业务别名, 当组件属于业务套件的一部分时方便业务识别(DDBizSuite)
  • └ not_print
  • String
  • 1
  • 是否参与打印(1表示不打印, 0表示打印)
  • └ required
  • Boolean
  • true
  • 必填
  • └ biz_type
  • String
  • DDBizSuite
  • 业务套件类型(DDBizSuite)
  • └ invisible
  • Boolean
  • true
  • 隐藏字段
  • └ child_field_visible
  • Json
  • {"costCenter":true,"invoiceTitle":true,"days":false,"partner":true}
  • 套件内子组件可见性,key为label,value=false不可见
  • └ not_upper
  • String
  • 1
  • 是否需要大写 默认是需要; 1:不需要大写, 空或者0:需要大写
  • stat_field
  • FormComponentStatVo []
  • statField
  • 明细里需要统计的字段
  • └ unit
  • String
  • 单位
  • └ upper
  • Boolean
  • true
  • 是否大写
  • └ label
  • String
  • 金额
  • 标题
  • └ id
  • String
  • MoneyField-JAM4DKLB
  • 组件id
  • └ duration
  • Boolean
  • true
  • 是否开启时长
  • └ duration_label
  • String
  • 234
  • 时长文案
  • └ attend_type_label
  • String
  • 外出类型
  • 考勤类型文案
  • behavior_linkage
  • BehaviorLinkageVo []
  • behaviorLinkage
  • 明细里的表单联动属性
  • └ value
  • String
  • option_0
  • 联动对应的单选组件选项
  • targets
  • LinkageTargetVo []
  • targets
  • 联动对应的目标
  • └ behavior
  • String
  • NORMAL
  • 对应目标的行为
  • └ field_id
  • String
  • TableField-K3DW5VF4
  • 对应目标的id
  • └ format
  • String
  • yyyy-MM-dd
  • 时间格式
  • └ options
  • String []
  • [{"key": "options_1", "value": "选项1"}]
  • 选项列表
  • └ fields_info
  • String
  • []
  • 关联表单属性
  • └ component_name
  • String
  • TextField
  • 控件类型
  • props
  • FormComponentPropVo
  • props
  • 组件属性
  • └ label
  • String
  • 出差事由
  • 标题
  • └ id
  • String
  • TextField-JAM4DKLB
  • id
  • └ disable
  • Boolean
  • true
  • 是否可编辑
  • └ biz_alias
  • String
  • alitrip.business
  • 业务别名, 当组件属于业务套件的一部分时方便业务识别(DDBizSuite)
  • └ not_print
  • String
  • 1
  • 是否参与打印(1表示不打印, 0表示打印)
  • └ required
  • Boolean
  • true
  • 必填
  • └ biz_type
  • String
  • DDBizSuite
  • 业务套件类型(DDBizSuite)
  • └ invisible
  • Boolean
  • true
  • 隐藏字段
  • └ child_field_visible
  • Json
  • {"costCenter":true,"invoiceTitle":true,"days":false,"partner":true}
  • 套件内子组件可见性,key为label,value=false不可见
  • └ not_upper
  • String
  • 1
  • 是否需要大写 默认是需要; 1:不需要大写, 空或者0:需要大写
  • stat_field
  • FormComponentStatVo []
  • statField
  • 明细里需要统计的字段
  • └ unit
  • String
  • 单位
  • └ upper
  • Boolean
  • true
  • 是否大写
  • └ label
  • String
  • 金额
  • 标题
  • └ id
  • String
  • MoneyField-JAM4DKLB
  • 组件id
  • └ duration
  • Boolean
  • true
  • 是否开启时长
  • └ duration_label
  • String
  • 234
  • 时长文案
  • └ attend_type_label
  • String
  • 外出类型
  • 考勤类型文案
  • behavior_linkage
  • BehaviorLinkageVo []
  • behaviorLinkage
  • 明细里的表单联动属性
  • └ value
  • String
  • option_0
  • 联动对应的单选组件选项
  • targets
  • LinkageTargetVo []
  • targets
  • 联动对应的目标
  • └ field_id
  • String
  • TableField-K3DW5VF4
  • 对应目标的id
  • └ behavior
  • String
  • NORMAL
  • 对应目标的行为
  • └ format
  • String
  • yyyy-MM-dd
  • 时间格式
  • └ options
  • String []
  • [{"key": "options_1", "value": "选项1"}]
  • 选项列表
  • └ fields_info
  • String
  • []
  • 关联表单属性
  • └ component_name
  • String
  • TextField
  • 控件类型
  • props
  • FormComponentPropVo
  • props
  • 组件属性
  • └ label
  • String
  • 出差事由
  • 标题
  • └ id
  • String
  • TextField-JAM4DKLB
  • id
  • └ disable
  • Boolean
  • true
  • 是否可编辑
  • └ biz_type
  • String
  • DDBizSuite
  • 业务套件类型(DDBizSuite)
  • └ biz_alias
  • String
  • alitrip.business
  • 业务别名, 当组件属于业务套件的一部分时方便业务识别(DDBizSuite)
  • └ not_print
  • String
  • 1
  • 是否参与打印(1表示不打印, 0表示打印)
  • └ required
  • Boolean
  • true
  • 必填
  • └ invisible
  • Boolean
  • true
  • 隐藏字段
  • └ child_field_visible
  • Json
  • {"costCenter":true,"invoiceTitle":true,"days":false,"partner":true}
  • 套件内子组件可见性,key为label,value=false不可见
  • └ not_upper
  • String
  • 1
  • 是否需要大写 默认是需要; 1:不需要大写, 空或者0:需要大写
  • stat_field
  • FormComponentStatVo []
  • statField
  • 明细里需要统计的字段
  • └ unit
  • String
  • 单位
  • └ upper
  • Boolean
  • true
  • 是否大写
  • └ label
  • String
  • 金额
  • 标题
  • └ id
  • String
  • MoneyField-JAM4DKLB
  • 组件id
  • └ duration
  • Boolean
  • true
  • 是否开启时长
  • └ duration_label
  • String
  • 234
  • 时长文案
  • └ attend_type_label
  • String
  • 外出类型
  • 考勤类型文案
  • behavior_linkage
  • BehaviorLinkageVo []
  • behaviorLinkage
  • 明细里的表单联动属性
  • └ value
  • String
  • option_0
  • 联动对应的单选组件选项
  • targets
  • LinkageTargetVo []
  • targets
  • 联动对应的目标
  • └ field_id
  • String
  • TableField-K3DW5VF4
  • 对应目标的id
  • └ behavior
  • String
  • NORMAL
  • 对应目标的行为
  • └ format
  • String
  • yyyy-MM-dd
  • 时间格式
  • └ options
  • String []
  • [{"key": "options_1", "value": "选项1"}]
  • 选项列表
  • └ fields_info
  • String
  • []
  • 关联表单属性
  • └ is_old_suite
  • Boolean
  • false
  • 是否为旧套件
  • └ component_name
  • String
  • TextField
  • 控件类型
  • └ icon_url
  • String
  • https://gw.alicdn.com/tps/TB1zXtqOpXXXXa6XXXXXXXXXXXX-102-102.png
  • 图片地址
  • └ name
  • String
  • 测试模板
  • 模板名称
  • └ hand_sign_enable
  • Boolean
  • false
  • 是否开启手写签名
  • └ processConfig
  • String
  • [{"name":"直接主管","nodeId":"eb33_fc1f"},{"name":"审批人","nodeId":"15c3_b828"},{"name":"发起人自选","nodeId":"994e_be33"},{"name":"审批人","nodeId":"6b70_9472"}]
  • 流程相关信息
errcode Number 10001 错误码
errmsg String 系统出错 错误信息
success Boolean true 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/process/form/get");
OapiProcessFormGetRequest req = new OapiProcessFormGetRequest();
req.setProcessCode("PROC-5A11E770-D8A5-4101-AEFE-9E2AD79A939F");
OapiProcessFormGetResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());

响应示例

  • JSON示例
{
    "result":{
        "form_component_vos":[
            {
                    "children":[
                        {
                                "children":[
                                    {
                                            "props":{
                                                "label":"出差事由",
                                                "id":"TextField-JAM4DKLB",
                                                "disable":true,
                                                "biz_alias":"alitrip.business",
                                                "not_print":"1",
                                                "required":true,
                                                "biz_type":"DDBizSuite",
                                                "invisible":true,
                                                "child_field_visible":"{\"costCenter\":true,\"invoiceTitle\":true,\"days\":false,\"partner\":true}",
                                                "not_upper":"1",
                                                "stat_field":[
                                                    {
                                                            "unit":"天",
                                                            "upper":true,
                                                            "label":"金额",
                                                            "id":"MoneyField-JAM4DKLB"
                                                    }
                                                ],
                                                "duration":true,
                                                "duration_label":"234",
                                                "attend_type_label":"外出类型",
                                                "behavior_linkage":[
                                                    {
                                                            "value":"option_0",
                                                            "targets":[
                                                                {
                                                                        "behavior":"NORMAL",
                                                                        "field_id":"TableField-K3DW5VF4"
                                                                }
                                                            ]
                                                    }
                                                ],
                                                "format":"yyyy-MM-dd",
                                                "options":{
                                                    "string":[
                                                        "[{\"key\": \"options_1\"",
                                                        " \"value\": \"选项1\"}]"
                                                    ]
                                                },
                                                "fields_info":"[]"
                                            },
                                            "component_name":"TextField"
                                    }
                                ],
                                "props":{
                                    "label":"出差事由",
                                    "id":"TextField-JAM4DKLB",
                                    "disable":true,
                                    "biz_alias":"alitrip.business",
                                    "not_print":"1",
                                    "required":true,
                                    "biz_type":"DDBizSuite",
                                    "invisible":true,
                                    "child_field_visible":"{\"costCenter\":true,\"invoiceTitle\":true,\"days\":false,\"partner\":true}",
                                    "not_upper":"1",
                                    "stat_field":[
                                        {
                                                "unit":"天",
                                                "upper":true,
                                                "label":"金额",
                                                "id":"MoneyField-JAM4DKLB"
                                        }
                                    ],
                                    "duration":true,
                                    "duration_label":"234",
                                    "attend_type_label":"外出类型",
                                    "behavior_linkage":[
                                        {
                                                "value":"option_0",
                                                "targets":[
                                                    {
                                                            "field_id":"TableField-K3DW5VF4",
                                                            "behavior":"NORMAL"
                                                    }
                                                ]
                                        }
                                    ],
                                    "format":"yyyy-MM-dd",
                                    "options":{
                                        "string":[
                                            "[{\"key\": \"options_1\"",
                                            " \"value\": \"选项1\"}]"
                                        ]
                                    },
                                    "fields_info":"[]"
                                },
                                "component_name":"TextField"
                        }
                    ],
                    "props":{
                        "label":"出差事由",
                        "id":"TextField-JAM4DKLB",
                        "disable":true,
                        "biz_type":"DDBizSuite",
                        "biz_alias":"alitrip.business",
                        "not_print":"1",
                        "required":true,
                        "invisible":true,
                        "child_field_visible":"{\"costCenter\":true,\"invoiceTitle\":true,\"days\":false,\"partner\":true}",
                        "not_upper":"1",
                        "stat_field":[
                            {
                                    "unit":"天",
                                    "upper":true,
                                    "label":"金额",
                                    "id":"MoneyField-JAM4DKLB"
                            }
                        ],
                        "duration":true,
                        "duration_label":"234",
                        "attend_type_label":"外出类型",
                        "behavior_linkage":[
                            {
                                    "value":"option_0",
                                    "targets":[
                                        {
                                                "field_id":"TableField-K3DW5VF4",
                                                "behavior":"NORMAL"
                                        }
                                    ]
                            }
                        ],
                        "format":"yyyy-MM-dd",
                        "options":{
                            "string":[
                                "[{\"key\": \"options_1\"",
                                " \"value\": \"选项1\"}]"
                            ]
                        },
                        "fields_info":"[]"
                    },
                    "is_old_suite":false,
                    "component_name":"TextField"
            }
        ],
        "icon_url":"https:\/\/gw.alicdn.com\/tps\/TB1zXtqOpXXXXa6XXXXXXXXXXXX-102-102.png",
        "name":"测试模板",
        "hand_sign_enable":false,
        "processConfig":"[{\"name\":\"直接主管\",\"nodeId\":\"eb33_fc1f\"},{\"name\":\"审批人\",\"nodeId\":\"15c3_b828\"},{\"name\":\"发起人自选\",\"nodeId\":\"994e_be33\"},{\"name\":\"审批人\",\"nodeId\":\"6b70_9472\"}]"
    },
    "errcode":10001,
    "errmsg":"系统出错",
    "success":true
}

异常示例

  • JSON示例
{
	"errcode":88,
	"errmsg":"ding talk error"
}

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部