| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| form | String | 是 | json 数组,控件信息 |
| ∟id | String | 是 | 控件 ID |
| ∟custom_id | String | 否 | 控件自定义 ID |
| ∟name | String | 是 | 控件名称 |
| ∟type | String | 是 | 控件类型 |
| ∟enable_default_value | bool | 是 | 此控件是否启用了默认值 |
| ∟widget_default_value | String | 是 | 控件的默认值 |
| ∟default_value_type | String | 是 | 控件的默认值类型 |
| ∟display_condition | String | 否 | 控件显隐条件 |
| ∟conditional | String | 否 | |
| ∟conditions | list | 否 | |
| ∟conditional | String | 否 | 多个条件同时满足 |
| ∟expressions | list | 否 | |
| ∟source_widget | String | 否 | |
| ∟compare_type | String | 否 | 判断规则 |
| ∟standard_value | String | 否 | 条件值 |
| 名称 | 类型 |
|---|---|
| 单行文本 | input |
| 多行文本 | textarea |
| 数字 | number |
| 金额 | amount |
| 日期 | date |
| 日期区间 | dateInterval |
| 计算公式 | formula |
| 附件 | attachment/attachmentV2 |
| 图片 | image/imageV2 |
| 联系人 | contact |
| 关联审批 | connect |
| 地址 | address |
| 电话 | telephone |
| 请假控件组 | leaveGroup |
| 加班控件组 | workGroup |
| 换班控件组 | shiftGroup |
| 补卡控件组 | remedyGroup |
| 出差控件组 | tripGroup |
| 外出控件组 | outGroup |
{
"id": "widget1",
"custom_id": "user_name",
"name": "Item application",
"type": "input",
"printable": true,
"required":true
}| 名称 | 类型 |
|---|---|
| 单选 | radio/radioV2 |
| 多选 | checkbox/checkboxV2 |
{
"id": "widget1",
"name": "Item application",
"type": "radio",
"printable": true,
"required":true,
"option": [
{
"text": "1",
"value": "jxpsebqp-0"
}
]
}| 名称 | 类型 |
|---|---|
| 明细 | fieldList |
{
"id": "widget1",
"name": "Item application",
"type": "fieldList",
"printable": true,
"required": true,
"option":{
"input_type": "LIST",
"print_type": "LIST"
},
"children":[
{
"id": "widget2",
"name": "Item name",
"type": "input"
}
]
}| 名称 | 类型 |
|---|---|
| 电话 | telephone |
{
"id":"widget1",
"name":"Item application",
"type":"telephone",
"printable": true,
"required":true,
"option":{
"available_type": "FIXED_LINE_OR_MOBILE"
}
}| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 400 | 1390001 | param is invalid | 参数错误 |
| 400 | 1390002 | approval code not found | 检查审批定义code是否正确 |
| 400 | 1395001 | There have been some errors. Please try again later | 服务出现错误,请稍候再试 |
| 400 | 1390016 | approval is deleted | 检查审批定义是否存在 |
curl --location --request GET '/approval/v4/approvals/?locale&with_admin_id=false&user_id_type=open_id' \
--header 'Authorization: Bearer <token>'{
"code": 0,
"msg": "success",
"data": {
"approval_name": "Payment",
"status": "ACTIVE",
"form": "[{\"id\": \"widget1\", \"custom_id\": \"user_name\",\"name\": \"Item application\",\"type\": \"textarea\",\"printable\": true,\"required\": true}\"]",
"node_list": [
{
"name": "Approval",
"need_approver": true,
"node_id": "46e6d96cfa756980907209209ec03b64",
"custom_node_id": "46e6d96cfa756980907209209ec03b64",
"node_type": "AND",
"approver_chosen_multi": true,
"approver_chosen_range": [
{
"approver_range_type": 2,
"approver_range_ids": [
"ou_e03053f0541cecc3269d7a9dc34a0b21"
]
}
],
"require_signature": false
}
],
"viewers": [
{
"type": "TENANT",
"id": "ou_e03053f0541cecc3269d7a9dc34a0b21",
"user_id": "f7cb567e"
}
],
"approval_admin_ids": [
"ou_3cda9c969f737aaa05e6915dce306cb9"
]
}
}