[TOC=2]
>[info] 訂單列表,包含訂單相關的數據,包含民工自己的訂單相關的數據,請注意區分。
## 枚舉變量
### 訂單類型(type):
| 可選值 | 說明 |
| --- | --- |
| bid | 招標單 |
| phone_reservation | 電話預約單 |
| online_reservation | 在線預約單 |
### 訂單狀態(status):
| 可選值 | 說明 |
| --- | --- |
| processing | 招標時,等待雇主確認;預約時,等待工人確認 |
| succeed | 招標成功或已接受預約 |
| cancelled | 已取消。雇主或工人主動取消 |
| timeout | 未及時接受預約,或雇主未及時處理招標 |
| refused | 工人拒絕預約或招標未被選中 |
### 取消原因(cancel_reason):
| 可選值 | 說明 |
| --- | --- |
| others | 其他原因 |
| null | 正常 |
### 勞務計費方式(charging_method):
| 可選值 | 說明 |
| --- | --- |
| total | 總價包干 |
| per_unit | 按件計費 |
| per_day | 按天計費 |
| null | 電話議價 |
### 訂單類型(order_type):
| 可選值 | 說明 |
| --- | --- |
| bid | 招標單 |
| phone_reservation | 電話預約單 |
| online_reservation | 在線預約單 |
### 訂單狀態(order_status):
| 可選值 | 說明 |
| --- | --- |
| pending | 待支付。如果雇主需要付費才能招工,會進入此狀態 |
| processing | 處理中。如果是招標單,表示招標中;如果是預約單,表示等待工人確認 |
| succeed | 成功。已選擇招標候選,或預約已被確認 |
| finished | 已完成。活干完了,或者工人沒來都算作完成狀態 |
| cancelled | 已取消。雇主或工人主動取消、預約被拒絕 |
| timeout | 招標或預約未及時處理 |
| refused | 預約被拒絕 |
### 訂單子狀態(sub_status):
| 可選值 | 說明 |
| --- | --- |
| normal | 正常 |
| labour_cancelled | 工人取消 |
| absence | 招工成功但工人沒來 |
## 我的訂單
## 訂單數量
~~~[api]
get:/reservation/getQuantity
<<<
success
{
"code": 0,
"data": {
"order_num": 12,//所有訂單數
"evaluate_num": 12//未評價訂單數
}
}
~~~
## 所有訂單
~~~[api]
get:/reservation/index
int:current_page=1#當前頁
int:page_number=10#頁碼
<<<
success
{
"code": 0,
"data": {
"list": [
{
"id": 13,
"type": "online_reservation",//訂單類型 詳情見枚舉變量
"status": "processing",//訂單狀態 詳情見枚舉變量
"cancel_reason": null,//取消原因 詳情見枚舉變量
"create_time": "2018-03-03 17:03:05",//搶單時間/被選中時間
"title": "推糞包溝7",//訂單標題
"description": "26262652",//訂單描述
"employer_name": "232",//用工人姓名
"employer_phone": "13551344444",//用工人手機號
"job_category_name": "推糞包溝",//工種類型
"job_name": "71212",//工種名
"specifications": [//工種詳細信息
{
"工作量": "1521袋/立方",
"包裝方式": "60公斤袋裝",
"服務內容": "推糞撒糞",
"糞肥類型": "干雞糞"
}
],
"address": [//詳細上工地址
{
"id": 2,
"area": "化龍區域",
"city": "濰坊市",
"name": "232",
"town": "化龍鎮",
"phone": "13551344444",
"area_id": 399,
"user_id": 3,
"village": "馬莊村",
"district": "壽光市",
"province": "山東省",
"is_default": false
}
],
"reservation_time": "2018-03-06 03:03:00",//上工時間
"labour_number": 45,//招工人數
"charging_method": null,//計費方式 詳情見枚舉變量
"cost": null,//勞務費用
"with_shuttle": 0,//是否接送
"memo": "1541541",//訂單其他信息
"order_type": "online_reservation",//訂單類型 詳情見枚舉變量
"order_status": "processing",//訂單狀態 詳情見枚舉變量
"sub_status": "normal",//訂單子狀態 詳情見枚舉變量
"labour_rated": 0,//民工是否評價 0 未評價 1 已評價
"extra": null,//訂單其他信息
"employer_id": 3,//雇主id
"pay_id": "E152006778544600",//訂單號
"rate1": 85,
"rate2": 85,
"rate3": 85,
"name": "1",//雇主姓名(發布招工信息的姓名)
"avatar": "1"//雇主頭像地址
}
],
"current_page": 1,//當前頁
"page_number": 10//頁碼
}
}
~~~
## 未評價訂單
~~~[api]
get:/reservation/getEvaluate
int:current_page=1#當前頁
int:page_number=10#頁碼
<<<
success
{
"code": 0,
"data": {
"list": [
{
"id": 13,
"type": "online_reservation",//訂單類型 詳情見枚舉變量
"status": "processing",//訂單狀態 詳情見枚舉變量
"cancel_reason": null,//取消原因 詳情見枚舉變量
"create_time": "2018-03-03 17:03:05",//搶單時間/被選中時間
"title": "推糞包溝7",//訂單標題
"description": "26262652",//訂單描述
"employer_name": "232",//用工人姓名
"employer_phone": "13551344444",//用工人手機號
"job_category_name": "推糞包溝",//工種類型
"job_name": "71212",//工種名
"specifications": [//工種詳細信息
{
"工作量": "1521袋/立方",
"包裝方式": "60公斤袋裝",
"服務內容": "推糞撒糞",
"糞肥類型": "干雞糞"
}
],
"address": [//詳細上工地址
{
"id": 2,
"area": "化龍區域",
"city": "濰坊市",
"name": "232",
"town": "化龍鎮",
"phone": "13551344444",
"area_id": 399,
"user_id": 3,
"village": "馬莊村",
"district": "壽光市",
"province": "山東省",
"is_default": false
}
],
"reservation_time": "2018-03-06 03:03:00",//上工時間
"labour_number": 45,//招工人數
"charging_method": null,//計費方式 詳情見枚舉變量
"cost": null,//勞務費用
"with_shuttle": 0,//是否接送
"memo": "1541541",//訂單其他信息
"order_type": "online_reservation",//訂單類型 詳情見枚舉變量
"order_status": "processing",//訂單狀態 詳情見枚舉變量
"sub_status": "normal",//訂單子狀態 詳情見枚舉變量
"labour_rated": 0,//民工是否評價 0 未評價 1 已評價
"extra": null,//訂單其他信息
"employer_id": 3,//雇主id
"pay_id": "E152006778544600",//訂單號
"rate1": 85,
"rate2": 85,
"rate3": 85,
"name": "1",//雇主姓名(發布招工信息的姓名)
"avatar": "1"//雇主頭像地址
}
],
"current_page": 1,//當前頁
"page_number": 10//頁碼
}
}
~~~
## 搶單
~~~[api]
post:/reservation/create
*int:order_id=1#訂單id
<<<
success
{
"code": 0
}
<<<
error
{
"code": -1,
"msg": "請勿重復搶單"
}
~~~
## 取消訂單
>[info] 訂單 id 就是 訂單詳情里面的訂單 id
~~~[api]
post:/reservation/cancel
*int:order_id=1#訂單id
string:cancel_reason=others#取消原因,默認其他
<<<
success
{
"code": 0
}
<<<
error
{
"code": -1,
"msg": "訂單已被取消"
}
~~~
## 接受預約
~~~[api]
post:/reservation/accept
*int:order_id=1#訂單id
<<<
success
{
"code": 0
}
<<<
error
{
"code": -1,
"msg": "訂單已被取消"
}
~~~
## 拒絕預約
~~~[api]
post:/reservation/refuse
*int:order_id=1#訂單id
<<<
success
{
"code": 0
}
<<<
error
{
"code": -1,
"msg": "訂單已被取消"
}
~~~
## 搶單中的
~~~[api]
get:/reservation/getOrder
<<<
success
<<<
error
~~~
- 使用須知
- 共用數據
- 數據庫
- 管理員
- 管理--登錄注冊
- 管理--個人資料
- 管理--工種相關
- 管理--工作相關
- 管理--蔬菜分類
- 管理--訂單相關
- 管理--用戶相關
- 管理--消息相關
- 管理--banner
- 管理--認證相關
- 管理--蔬菜改版
- 雇主端
- 雇主--登錄注冊
- 雇主--個人資料
- 雇主--設備相關
- 雇主--控制設備
- 雇主--用工地址
- 雇主--我的收藏
- 雇主--工種相關
- 雇主--我的訂單
- 雇主--我的紅包
- 雇主--評價訂單
- 雇主--消息相關
- 雇主--積分相關
- 雇主--民工列表
- 雇主--banner
- 雇主--邀請注冊
- 雇主--分享民工
- 民工端
- 民工--登錄注冊
- 民工--個人資料
- 民工--我的紅包
- 民工--訂單相關
- 民工--我的訂單
- 民工--評價訂單
- 民工--消息相關
- 民工--積分相關
- 民工--認證相關
- 民工--工種相關
- 民工--會員相關
- 民工--分享相關
- 民工--服務區域
- 民工--服務技能
- 民工--邀請注冊