[TOC]
## 門店列表
~~~[api]
post:/shop/list
string:key#排序字段名 如 id, name
string:order#排序規則
*int:page#頁碼
*int:limit#每頁數量
string:shop_name#名字篩選
int:type#類型篩選
int:state#狀態篩選
array:region_id#區域id篩選,
<<<
success
{
"code": 0,
"info": "成功",
"data": [{
"id": 1,
"shop_name": "222",
"region_id": 1,
"title": "",
"address": "",
"phone": "",
"state": 1,
"allocation": 0,
"type": "門店",
"user_id": 1000,
"region_title": "西安2",
"region_state": 1,
"counter_count": 2
}, {
"id": 2,
"shop_name": "444",
"region_id": 1,
"title": "",
"address": "",
"phone": "",
"state": 1,
"allocation": 0,
"type": "倉庫",
"user_id": 1000,
"region_title": "西安2",
"region_state": 1,
"counter_count": 0
}, {
"id": 3,
"shop_name": "333",
"region_id": 2,
"title": "",
"address": "",
"phone": "",
"state": 1,
"allocation": 0,
"type": "部門",
"user_id": 1000,
"region_title": "渭南",
"region_state": 1,
"counter_count": 0
}]
}
<<<
error
~~~
## 門店類型
~~~[api]
post:/shop/type
<<<
success
{
"code": 0,
"info": "成功",
"data": [{
"id": 0,
"title": "倉庫"
}, {
"id": 1,
"title": "門店"
}, {
"id": 2,
"title": "部門"
}, {
"id": 3,
"title": "分銷"
}]
}
<<<
error
~~~
## 可用門店數量
~~~[api]
post:/shop/overcount
<<<
success
{
"code": 0,
"info": "成功",
"data": 6
}
<<<
error
~~~
## 新建門店
~~~[api]
post:/shop/add
*string:shop_name#店鋪名稱
*region_id#區域id
*type#店鋪類型id
phone#電話
address#地址
<<<
success
{
"code": 0,
"info": "成功",
"data": {
"shop_name": "寶雞手機通訊",
"region_id": "2",
"type": "門店",
"phone": "12313123123",
"address": "xxxxxx",
"id": "4"
}
}
<<<
error
~~~
## 編輯門店
~~~[api]
post:/shop/edit
*int:id#id
*string:shop_name#店鋪名稱
*region_id#區域id
*type#店鋪類型id
phone#電話
address#地址
*state#狀態
<<<
success
{
"code": 0,
"info": "成功",
"data": {
"shop_name": "寶雞手機通訊",
"region_id": "2",
"type": "門店",
"phone": "12313123123",
"address": "xxxxxx",
"id": "4"
}
}
<<<
error
~~~
## 門店詳情
~~~[api]
post:/shop/get
*string:id=默認值#說明文字
<<<
success
{
"code": 0,
"info": "成功",
"data": [{
"id": 1,
"shop_name": "寶雞手機通訊3",
"region_id": 2,
"title": "",
"address": "xxxxxx",
"phone": "12313123123",
"state": 1,
"allocation": 0,
"type": "門店",
"user_id": 1000,
"region_title": "渭南",
"region_state": 1
}]
}
<<<
error
~~~
## 柜組列表
~~~[api]
post:/counter/list
*string:id=默認值#門店id
string:key#排序字段名 如 id, name
string:order#排序規則
*int:page#頁碼
*int:limit#每頁數量
string:counter_name#名字篩選
int:state#狀態篩選
<<<
success
{
"code": 0,
"info": "成功",
"data": [{
"id": 1,
"counter_name": "諾基亞",
"shop_id": 1,
"state": 1,
"user_id": 1000
}, {
"id": 2,
"counter_name": "333334",
"shop_id": 1,
"state": 1,
"user_id": 1000
}]
}
<<<
error
~~~
## 新建柜組
~~~[api]
post:/counter/add
*string:shop_id=默認值#店鋪id
counter_name#柜組名稱
<<<
success
{
"code": 0,
"info": "成功",
"data": {
"counter_name": "寶雞2",
"shop_id": "1",
"id": "4"
}
}
<<<
error
~~~
## 編輯柜組
~~~[api]
post:/counter/edit
*string:id=默認值#柜組id
counter_name#名稱
state#狀態
<<<
success
{
"code": 0,
"info": "成功",
"data": {
"counter_name": "寶雞2",
"shop_id": "1",
"id": "4"
}
}
<<<
error
~~~