签批控件使用场景特性:在签署合同的时候, 使用签批控件进行签署。如下图:
⚠️ 签批控件分为主子控件的概念1. 主控件 : SIGN_VIRTUAL_COMBINATION 是个虚拟的控件,只是表示下面的子控件为签批控件的组合。 2. 子控件 : 其中包括 SIGN_SIGNATURE (签名控件) (必须包含) , SIGN_DATE (日期控件, 通常跟签名控件一起出现)(可选), SIGN_SELECTOR(审批意见) (可选), SIGN_MULTI_LINE_TEXT(批注附言)(可选)每一种类的子控件只能有一个。适用场景:签署方在签署的时候,需要进行批注。使用限制:签批控件的子组件必须包含签名控件。使用包含签批控件的模板发起合同接下来的示例默认您对通过模板发起签署流程
已经熟悉,如您未阅读过此部分,建议先了解如何通过模版发起签署流程。
登录 腾讯电子签控制台 。
在模板中,配置一个包含签批控件的模板。
保存模板。
在合同中,选择模板发起合同,使用刚才创建的模板进行发起, 即可发起一份包含签批控件的合同。
使用文件发起一份包含签批控件的合同接下来的示例默认您对通过文件发起签署流程
已经熟悉,如您未阅读过此部分,建议先了解如何通过文件发起签署流程。
调用创建签署流程接口(CreateFlowByFiles)创建签署流程,如:
此示例为 一份 B2C 合同,B 端签署人有两个签署控件 (签字和审批控件), C 端签署人只有审批控件
{ "Operator": { "UserId": "yDRCLUUgygq2xun5UuO4zjEwg0vjoimj" }, "FlowName": "文件发起签批控件", "Approvers": [ { "ApproverType": 0, "OrganizationName": "典子谦示例企业", "Required": true, "ApproverName": "典子谦", "ApproverMobile": "13200000000", "NotifyType": "NONE", "RecipientId": "yDR4yUUgyg1q0y4tUuoJSJ78uOg0ZjBM", "SignComponents": [ { "ComponentId": "ComponentId_1", "ComponentPosY": 260, "ComponentWidth": 100, "FileIndex": 0, "ComponentType": "SIGN_SIGNATURE", "ComponentPage": 1, "ComponentPosX": 160, "ComponentHeight": 100, "Relation":"ComponentId_2" }, { "ComponentId": "ComponentId_2", "ComponentPosY": 360, "ComponentWidth": 100, "FileIndex": 0, "ComponentType": "SIGN_DATE", "ComponentPage": 1, "ComponentPosX": 160, "ComponentHeight": 50, "Relation":"ComponentId_1" }, { "ComponentId": "ComponentId_26", "ComponentExtra": "{\"Children\":[\"ComponentId_29\",\"ComponentId_27\",\"ComponentId_28\",\"ComponentId_30\"]}", //这里写子签批控件, 最多支持4种,且子控件类型不能重复。 "ComponentHeight": 211, "ComponentName": "签批1", "ComponentPage": 1, "ComponentPosX": 180, "ComponentPosY": 478, "ComponentType": "SIGN_VIRTUAL_COMBINATION", "ComponentWidth": 210, "ComponentRequired": false }, { "ComponentExtra": "{\"Date\":true,\"isAfterCut\":true}", "ComponentHeight": 43, "ComponentId": "ComponentId_27", "ComponentName": "个人签名/印章", "ComponentPage": 1, "ComponentPosX": 185, "ComponentPosY": 478, "ComponentRequired": true, "ComponentType": "SIGN_SIGNATURE", "ComponentWidth": 119, "Relation": "ComponentId_28" }, { "ComponentExtra": "{\"Format\":\"yyyy年m月d日\",\"Gaps\":\"2,2\",\"FontSize\":12,\"FontAlign\":\"Center\",\"Font\":\"黑体\"}", "ComponentHeight": 20, "ComponentId": "ComponentId_28", "ComponentName": "签署日期", "ComponentPage": 1, "ComponentPosX": 185, "ComponentPosY": 541, "ComponentRequired": true, "ComponentType": "SIGN_DATE", "ComponentWidth": 119, "Relation": "ComponentId_27" }, { "ComponentId": "ComponentId_29", "ComponentExtra": "{\"Values\":[\"审批通过\",\"审批不通过\"],\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"MultiSelect\":false}", //Values可以自定义, "ComponentHeight": 20, "ComponentName": "审批意见", "ComponentPage": 1, "ComponentPosX": 180, "ComponentPosY": 567, "ComponentRequired": true, "ComponentType": "SIGN_SELECTOR", "ComponentWidth": 210 }, { "ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"VerticalAlign\":\"Top\",\"Font\":\"黑体\"}", "ComponentHeight": 54, "ComponentId": "ComponentId_30", "ComponentName": "批注附言", "ComponentPage": 1, "ComponentPosX": 180, "ComponentPosY": 635, "ComponentRequired": true, "ComponentType": "SIGN_MULTI_LINE_TEXT", "ComponentWidth": 210 } ] }, { "ApproverType": 1, "Required": true, "ApproverName": "何规", "ApproverMobile": "18888888888", "NotifyType": "NONE", "RecipientId": "yDR4yUUgyg1q0y4tUuoJSJ78uOg0ZjBM", "SignComponents": [ { "ComponentExtra": "{\"Children\":[\"ComponentId_19\",\"ComponentId_17\",\"ComponentId_18\",\"ComponentId_20\"]}",//这里写子签批控件, 最多支持4种,且子控件类型不能重复。 "ComponentHeight": 211, "ComponentId": "ComponentId_16", "ComponentName": "签批1", "ComponentPage": 1, "ComponentPosX": 280, "ComponentPosY": 478, "ComponentType": "SIGN_VIRTUAL_COMBINATION", "ComponentWidth": 210 }, { "ComponentExtra": "{\"Values\":[\"审批通过\",\"审批不通过\"],\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"MultiSelect\":false}",//Values可以自定义, "ComponentHeight": 20, "ComponentId": "ComponentId_19", "ComponentName": "审批意见", "ComponentPage": 1, "ComponentPosX": 280, "ComponentPosY": 567, "ComponentRequired": true, "ComponentType": "SIGN_SELECTOR", "ComponentWidth": 210 }, { "ComponentExtra": "{\"Date\":true,\"isAfterCut\":true}", "ComponentHeight": 43, "ComponentId": "ComponentId_17", "ComponentName": "个人签名/印章", "ComponentPage": 1, "ComponentPosX": 285, "ComponentPosY": 478, "ComponentRequired": true, "ComponentType": "SIGN_SIGNATURE", "ComponentWidth": 119, "Relation": "ComponentId_18" }, { "ComponentExtra": "{\"Format\":\"yyyy年m月d日\",\"Gaps\":\"2,2\",\"FontSize\":12,\"FontAlign\":\"Center\",\"Font\":\"黑体\"}", "ComponentHeight": 20, "ComponentId": "ComponentId_18", "ComponentName": "签署日期", "ComponentPage": 1, "ComponentPosX": 285, "ComponentPosY": 541, "ComponentRequired": true, "ComponentType": "SIGN_DATE", "ComponentWidth": 119, "Relation": "ComponentId_17" }, { "ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"VerticalAlign\":\"Top\",\"Font\":\"黑体\"}", "ComponentHeight": 54, "ComponentId": "ComponentId_20", "ComponentName": "批注附言", "ComponentPage": 1, "ComponentPosX": 280, "ComponentPosY": 635, "ComponentRequired": true, "ComponentType": "SIGN_MULTI_LINE_TEXT", "ComponentWidth": 210 } ] } ], "FileIds": [ "yDRSRUUgygj6qnwfUuO4zjEwc193c2hH" ], "Unordered":true } 记录下响应体中的 FlowId,即此处的yDCm3UU0a5b1y7UiQSZKIFoKjfpS35yJ。
{ "Response": { "Approvers": [ { "ApproverRoleName": "", "RecipientId": "yDCm3UU0a5b1a5UiQSZKRiiwiBL2jO6C", "SignId": "yDCm3UU0a5b1y4UiQSZKRSacGyaALNPR" }, { "ApproverRoleName": "", "RecipientId": "yDCm3UU0a5b1yiUiQSZKED1MCsiOvy9u", "SignId": "yDCm3UU0a5b1yuUiQSZKS8iB9RDjFHDw" } ], "FlowId": "yDCm3UU0a5b1y7UiQSZKIFoKjfpS35yJ", "PreviewUrl": "", "RequestId": "s1726213176993331673" } }- `UserId` 为发起方经办人的用户 ID,访问 [腾讯电子签控制台](https://qian.tencent.com) 获取。- `FlowName` 为合同名称。- `Approvers` 指定签署方信息。- `ApproverType` 签署方类型。审批控件类型解释审批控件属于一种特殊的签署控件。由一个虚拟组合控件(ComponentType 为SIGN_VIRTUAL_COMBINATION), 最多四个不同类型的子控件。其中包括 SIGN_SIGNATURE (签名控件) (必须包含) , SIGN_DATE (日期控件, 通常跟签名控件一起出现)(可选), SIGN_SELECTOR(审批意见) (可选), SIGN_MULTI_LINE_TEXT(批注附言)(可选)
SIGN_VIRTUAL_COMBINATION 签批component_typecomponent_extra描述SIGN_VIRTUAL_COMBINATION必须包含 Children children中包含的子Component的ComponentId,保证唯一即可子控件的集合SIGN_SIGNATURE 签名component_typecomponent_extra描述SIGN_SIGNATURE无普通签名控件,子控件中必须项SIGN_DATE 日期component_typecomponent_extra描述SIGN_DATE无 可以定义日期格式日期控件,如果需要和签名控件分开 可以添加 \"isAfterCut\":true, 子控件中非必须项SIGN_SELECTOR 审批意见component_typecomponent_extra描述SIGN_SELECTORValues 必须包含,表示审批的意见审批意见的值,单个审批意见的字数长度不能超过这个签署控件的宽度, 子控件中非必须项SIGN_MULTI_LINE_TEXT 批注附言component_typecomponent_extra描述SIGN_MULTI_LINE_TEXT无批注附言 子控件中非必须项示例 1 四个子控件都有的签批控件
"SignComponents": [ { "ComponentExtra": "{\"Children\":[\"ComponentId_29\",\"ComponentId_27\",\"ComponentId_28\",\"ComponentId_30\"]}", "ComponentHeight": 211, "ComponentId": "ComponentId_26", "ComponentName": "签批1", "ComponentPage": 1, "ComponentPosX": 180, "ComponentPosY": 478, "ComponentType": "SIGN_VIRTUAL_COMBINATION", "ComponentWidth": 210 }, { "ComponentExtra": "{\"Values\":[\"审批通过\",\"审批不通过\"],\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"MultiSelect\":false}", "ComponentHeight": 20, "ComponentId": "ComponentId_29", "ComponentName": "审批意见", "ComponentPage": 1, "ComponentPosX": 180, "ComponentPosY": 567, "component_required": true, "ComponentType": "SIGN_SELECTOR", "ComponentWidth": 210 }, { "ComponentExtra": "{\"Date\":true,\"isAfterCut\":true}", "ComponentHeight": 43, "ComponentId": "ComponentId_27", "ComponentName": "个人签名/印章", "ComponentPage": 1, "ComponentPosX": 185, "ComponentPosY": 478, "ComponentType": "SIGN_SIGNATURE", "ComponentWidth": 119, "relation": "ComponentId_28" }, { "ComponentExtra": "{\"Format\":\"yyyy年m月d日\",\"Gaps\":\"2,2\",\"FontSize\":12,\"FontAlign\":\"Center\",\"Font\":\"黑体\",\"isAfterCut\":true}", "ComponentHeight": 20, "ComponentId": "ComponentId_28", "ComponentName": "签署日期", "ComponentPage": 1, "ComponentPosX": 185, "ComponentPosY": 541, "ComponentType": "SIGN_DATE", "ComponentWidth": 119, "relation": "ComponentId_27" }, { "ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"VerticalAlign\":\"Top\",\"Font\":\"黑体\"}", "ComponentHeight": 54, "ComponentId": "ComponentId_30", "ComponentName": "批注附言", "ComponentPage": 1, "ComponentPosX": 180, "ComponentPosY": 635, "ComponentType": "SIGN_MULTI_LINE_TEXT", "ComponentWidth": 210 } ]
示例 2:仅有签名和审批意见的签批控件。
"SignComponents": [ { "ComponentExtra": "{\"Children\":[\"ComponentId_29\",\"ComponentId_27\"]}", "ComponentHeight": 211, "ComponentId": "ComponentId_26", "ComponentName": "签批1", "ComponentPage": 1, "ComponentPosX": 180, "ComponentPosY": 478, "ComponentType": "SIGN_VIRTUAL_COMBINATION", "ComponentWidth": 210 }, { "ComponentExtra": "{\"Values\":[\"审批通过\",\"审批不通过\"],\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"MultiSelect\":false}", "ComponentHeight": 20, "ComponentId": "ComponentId_29", "ComponentName": "审批意见", "ComponentPage": 1, "ComponentPosX": 180, "ComponentPosY": 567, "ComponentType": "SIGN_SELECTOR", "ComponentWidth": 210 }, { "ComponentExtra": "{\"Date\":true,\"isAfterCut\":true}", "ComponentHeight": 43, "ComponentId": "ComponentId_27", "ComponentName": "个人签名/印章", "ComponentPage": 1, "ComponentPosX": 185, "ComponentPosY": 478, "ComponentType": "SIGN_SIGNATURE", "ComponentWidth": 119 } ]