[TOC]
## 职务列表
~~~[api]
post:/office/list
string:key#排序字段名 如 id, name
string:order#排序规则
*int:page#页码
*int:limit#每页数量
string:title#名字筛选
int:state#状态筛选
<<<
success
{
"code": 0,
"info": "成功",
"data": [{
"id": 1,
"title": "总经理",
"state": 1
}]
}
<<<
error
~~~
## 添加职务
~~~[api]
post:/office/add
*string:title=默认值#名称
<<<
success
{
"code": 0,
"info": "成功",
"data": {
"title": "经理",
"id": "2"
}
}
<<<
error
~~~
## 编辑职务
~~~[api]
post:/office/edit
*string:id=默认值#ID
*title#名称
*state#状态
<<<
success
{
"code": 0,
"info": "成功",
"data": {
"title": "总经理",
"id": "1",
"state": "1"
}
}
<<<
error
~~~
## 职务权限列表
~~~[api]
post:/office/competence
*string:id=默认值#ID
<<<
success
{
"code": 0,
"info": "成功",
"data": [{
"title": "公共权限",
"child": [{
"id": 1,
"state": 0,
"title": "门店管理",
"sort": 0,
"type": 0,
"about": null,
"child": [{
"id": 4,
"state": 0,
"title": "区域管理",
"sort": 0,
"type": 1,
"about": null,
"checked": true
}, {
"id": 5,
"state": 0,
"title": "门店管理",
"sort": 0,
"type": 1,
"about": null,
"checked": false
}]
}]
}, {
"title": "区域权限",
"child": [{
"id": 2,
"state": 1,
"title": "员工管理",
"sort": 0,
"type": 0,
"about": null,
"child": [{
"id": 6,
"state": 1,
"title": "职务管理",
"sort": 0,
"type": 2,
"about": null,
"checked": true
}, {
"id": 7,
"state": 1,
"title": "用户组管理",
"sort": 0,
"type": 2,
"about": null,
"checked": false
}, {
"id": 8,
"state": 1,
"title": "员工管理",
"sort": 0,
"type": 2,
"about": null,
"checked": false
}, {
"id": 9,
"state": 1,
"title": "权限管理",
"sort": 0,
"type": 2,
"about": null,
"checked": false
}]
}],
"public": 1 //1=全部区域,2=归属区域
}, {
"title": "门店权限",
"child": [{
"id": 3,
"state": 2,
"title": "商家工资",
"sort": 0,
"type": 0,
"about": null,
"child": [{
"id": 10,
"state": 2,
"title": "区域管理",
"sort": 0,
"type": 3,
"about": null,
"checked": true
}, {
"id": 11,
"state": 2,
"title": "商家管理",
"sort": 0,
"type": 3,
"about": null,
"checked": false
}, {
"id": 12,
"state": 2,
"title": "财务统计",
"sort": 0,
"type": 3,
"about": null,
"checked": false
}]
}],
"public": 3 //3=全部门店,4=归属区域门店,5=归属门店
}, {
"title": "仓库权限",
"child": [{
"id": 3,
"state": 2,
"title": "商家工资",
"sort": 0,
"type": 0,
"about": null,
"child": [{
"id": 10,
"state": 2,
"title": "区域管理",
"sort": 0,
"type": 3,
"about": null,
"checked": true
}, {
"id": 11,
"state": 2,
"title": "商家管理",
"sort": 0,
"type": 3,
"about": null,
"checked": false
}, {
"id": 12,
"state": 2,
"title": "财务统计",
"sort": 0,
"type": 3,
"about": null,
"checked": false
}]
}],
"public": 6 //6=全部仓库,7=归属区域仓库,8=归属仓库
}]
}
<<<
error
~~~
## 职务权限修改提交
~~~[api]
post:/office/competenceedit
*string:id=默认值#ID
*array:com_id#权限ID数组,第三级的;
*int:region# 1=全部区域,2=归属区域
*int:shop# 3=全部门店,4=归属区域门店,5=归属门店
*int:depot# 6=全部仓库,7=归属区域仓库,8=归属仓库
<<<
success
{
"code": 0,
"info": "成功",
"data": 5
}
<<<
error
~~~