签批控件使用场景特性:在签署合同的时候, 使用签批控件进行签署。如下图:
⚠️ 签批控件分为主子控件的概念1. 主控件 : SIGN_VIRTUAL_COMBINATION 是个虚拟的控件,只是表示下面的子控件为签批控件的组合。子控件 : 其中包括 SIGN_SIGNATURE (签名控件) (必须包含) , SIGN_DATE (日期控件, 通常跟签名控件一起出现)(可选), SIGN_SELECTOR(审批意见) (可选), SIGN_MULTI_LINE_TEXT(批注附言)(可选)
每一种类的子控件有且只能有一个。适用场景:签署方在签署的时候,需要进行批注。使用限制:签批控件的子组件必须包含签名控件。使用包含签批控件的模板发起合同接下来的示例默认您对通过模板发起签署流程
已经熟悉,如您未阅读过此部分,建议先了解如何通过模版发起签署流程。
通过子客企业控制台创建模版。参见第三方应用子客企业自建模板。
在模板中,配置一个包含签批控件的模板。
保存模板。
使用创建签署流程(CreateFlowsByTemplates)创建一个流程即可。
使用文件发起一份包含签批控件的合同接下来的示例默认您对通过文件发起签署流程
已经熟悉,如您未阅读过此部分,建议先了解如何通过文件发起签署流程。
调用创建签署流程接口(CreateFlowByFiles)创建签署流程,如:
此示例为 一份 B2C 合同,B 端签署人有两个签署控件 (签字和审批控件), C 端签署人只有审批控件
{ "Action": "ChannelCreateFlowByFiles", "Agent": { "ProxyOperator": { "OpenId": "n9527" }, "ProxyOrganizationOpenId": "org_dianziqian", "AppId": "yDwhxUUckp3gl8j5UuFX33LSNozpRsbi" }, "FlowName": "文件发起-签批", "FlowApprovers": [ { "ApproverType": "ORGANIZATION", "OrganizationOpenId": "org_dianziqian", "OpenId": "n9527", "Name": "典子谦", "Mobile": "13200000000", "OrganizationName": "典子谦示例企业", "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" }, { "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, "ComponentRequired": false }, { "ComponentExtra": "{\"Values\":[\"审批通过\",\"审批不通过\"],\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"MultiSelect\":false}", "ComponentHeight": 20, "ComponentId": "ComponentId_29", "ComponentName": "审批意见", "ComponentPage": 1, "ComponentPosX": 180, "ComponentPosY": 567, "ComponentRequired": true, "ComponentType": "SIGN_SELECTOR", "ComponentWidth": 210 }, { "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\":\"黑体\",\"isAfterCut\":true}", "ComponentHeight": 20, "ComponentId": "ComponentId_28", "ComponentName": "签署日期", "ComponentPage": 1, "ComponentPosX": 185, "ComponentPosY": 541, "ComponentRequired": true, "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, "ComponentRequired": true, "ComponentType": "SIGN_MULTI_LINE_TEXT", "ComponentWidth": 210 } ] }, { "ApproverType": "PERSON", "Name": "张三", "Mobile": "18888888888", "SignComponents": [ { "ComponentPosY": 260, "ComponentWidth": 100, "FileIndex": 0, "ComponentType": "SIGN_SIGNATURE", "ComponentPage": 1, "ComponentPosX": 160, "ComponentHeight": 100 }, { "ComponentExtra": "{\"Children\":[\"ComponentId_19\",\"ComponentId_17\",\"ComponentId_18\",\"ComponentId_20\"]}", "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}", "ComponentHeight": 20, "ComponentId": "ComponentId_19", "ComponentName": "审批意见", "ComponentPage": 1, "ComponentPosX": 280, "ComponentPosY": 567, "ComponentRequired": true, "ComponentType": "SIGN_SELECTOR", "ComponentWidth": 210 }, { "ComponentExtra": "{\"Format\":\"yyyy年m月d日\",\"Gaps\":\"2,2\",\"FontSize\":12,\"FontAlign\":\"Center\",\"Font\":\"黑体\",\"isAfterCut\":true}", "ComponentHeight": 20, "ComponentId": "ComponentId_18", "ComponentName": "签署日期", "ComponentPage": 1, "ComponentPosX": 285, "ComponentPosY": 541, "ComponentRequired": true, "ComponentType": "SIGN_DATE", "ComponentWidth": 119, "Relation": "ComponentId_17" }, { "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": "{\"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 } ``` - `OpenId` 为发起方经办人的用户 ID,具体可在调用接口前请确保您已清楚通用参数Agent中各字段的含义(可参见[接口通用参数说明](/developers/partner/common_params)),以及TemplateId(模版ID)从哪获取。需要注意的是,第三方应用集成的合同发起方只能是子客企业。因此,涉及到的合同发起时的模板、印章等参数,都必须是子客企业下的。。 - `FlowName` 为合同名称。 - `FlowApprovers` 指定签署方信息。 - `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, "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 } ]