40 lines
1.6 KiB
JavaScript
40 lines
1.6 KiB
JavaScript
import request from './request';
|
|
|
|
export default {
|
|
status:{
|
|
created:'CREATED',
|
|
cancelled:'CANCELLED',
|
|
received:'RECEIVED',
|
|
delivering:'DELIVERING',
|
|
unpaid:'UNPAID',
|
|
completed:'COMPLETED'
|
|
},
|
|
statusKV:{
|
|
CREATED:'已创建',CANCELLED:'已取消',RECEIVED:'已接单',DELIVERING:'配送中',UNPAID:'未支付',COMPLETED:'已完成'
|
|
},
|
|
deliverStatusKV:{
|
|
DELIVERY_AT_DOORSTEP:"放在门口",
|
|
DELIVERY_TO_ROOM:"敲门递件"
|
|
},
|
|
|
|
buildingList:(community_id,status)=>request.get('/api/order/community_building/count',{community_id,status}),
|
|
list:(data)=>request.get('/api/order/deliveryman/list',data),
|
|
detail:(orderid)=>request.get(`/api/order/${orderid}`),
|
|
|
|
statusDetail:(community_id)=>request.get('/api/order/status/count',{community_id}),
|
|
receive:(orderid)=>request.post(`/api/order/${orderid}/deliveryman/receive`),
|
|
pickup:(orderid)=>request.post(`/api/order/${orderid}/deliveryman/pickup`),
|
|
complete:(orderid,images)=>request.post(`/api/order/${orderid}/deliveryman/complete`,{images:images}),
|
|
cancel:(orderid,reason)=>request.post(`/api/order/${orderid}/deliveryman/cancel`,{reason}),
|
|
check:()=>request.get('/api/order/deliveryman/check_new_order'),
|
|
|
|
markUp:{
|
|
status:{pending:"PENDING",accepted:"ACCEPTED"},
|
|
statusKV:{
|
|
PENDING:'申请中',ACCEPTED:'已同意'
|
|
},
|
|
add:(data)=>request.post('/api/order-additional-fee',data),
|
|
get:(orderid)=>request.get(`/api/order-additional-fee/order/${orderid}`,{},{noTips:true}),
|
|
update:(data)=>request.put(`/api/order-additional-fee/${data.id}`,data)
|
|
}
|
|
} |