[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
~~~