{ "date": { "type": "day" }}| 参数 | 说明 |
|---|---|
| date | 类型标志,日期/日期+时间控件的config中会包含此参数 |
| └ type | 时间展示类型:day-日期;hour-日期+时间 |
{ "selector": { "type": "single", "options": [ { "key": "option-15111111111", "value": [ { "text": "选项1", "lang": "zh_CN" } ] }, { "key": "option-15222222222", "value": [ { "text": "选项2", "lang": "zh_CN" } ] } ] }}| 参数 | 说明 |
|---|---|
| selector | 类型标志,单选/多选控件的config中会包含此参数 |
| └ type | 选择类型:single-单选;multi-多选 |
| └ options | 选项,包含单选/多选控件中的所有选项,可能有多个 |
| └ └ key | 选项key,选项的唯一id,可用于发起审批申请,为单选/多选控件赋值 |
| └ └ value | 选项值,若配置了多语言则会包含中英文的选项值,默认为zh_CN中文 |
{ "contact": { "type": "multi", "mode": "department" }}| 参数 | 说明 |
|---|---|
| contact | 类型标志,单选/多选控件的config中会包含此参数 |
| └ type | 选择方式:single-单选;multi-多选 |
| └ mode | 选择对象:user-成员;department-部门 |
{ "table": { "children": [ { "property": { "control": "Text", "id": "Text-15111111111", "title": [ { "text": "明细内文本控件", "lang": "zh_CN" } ], "placeholder": [ { "text": "这是明细内文本控件的说明", "lang": "zh_CN" } ], "require": 0, "un_print": 0 } } ], "stat_field": [] }}| 参数 | 说明 |
|---|---|
| table | 类型标志,明细控件的config中会包含此参数 |
| └ children | 明细内的子控件,内部结构同controls |
{ "attendance": { "date_range": { "type": "hour" }, "type": 3 }}| 参数 | 说明 |
|---|---|
| attendance | 类型标志,假勤控件的config中会包含此参数 |
| └ date_range | 假期控件属性 |
| └└ type | 时间刻度:hour-精确到分钟, halfday—上午/下午 |
| └ type | 假勤控件类型:1-请假,3-出差,4-外出,5-加班 |
{ "vacation_list": { "item": [{ "id": 1, "name": [{ "text": "年假", "lang": "zh_CN" }] }, { "id": 2, "name": [{ "text": "事假", "lang": "zh_CN" }] } ...//省略 ] }}| 参数 | 说明 |
|---|---|
| vacation_list | 假期类型数组 |
| └ item | 单个假期类型属性 |
| └└ id | 假期类型标识id |
| └└ name | 假期类型名称,默认zh_CN中文名称 |
| 错误码 | 说明 |
|---|---|
| 301025 | 参数错误,请求template_id非法 |
| 301026 | 通用错误码,拉取审批模板内部接口失败 |
curl --location -g --request POST 'https://qyapi.weixin.qq.com/cgi-bin/oa/gettemplatedetail?access_token=' \
--header 'Content-Type: application/json' \
--data-raw '{"template_id":"ZLqk8pcsAoXZ1eYa6vpAgfX28MPdYU3ayMaSPHaaa"}'{
"errcode": 0,
"errmsg": "ok",
"template_names": [
{
"text": "全字段",
"lang": "zh_CN"
}
],
"template_content": {
"controls": [
{
"property": {
"control": "Selector",
"id": "Selector-15111111111",
"title": [
{
"text": "单选控件",
"lang": "zh_CN"
}
],
"placeholder": [
{
"text": "这是单选控件的说明",
"lang": "zh_CN"
}
],
"require": 0,
"un_print": 0
},
"config": {
"selector": {
"type": "single",
"exp_type": 0,
"options": [
{
"key": "option-15111111111",
"value": [
{
"text": "选项1",
"lang": "zh_CN"
}
]
},
{
"key": "option-15222222222",
"value": [
{
"text": "选项2",
"lang": "zh_CN"
}
]
}
]
}
}
}
]
}
}