Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
op-web-service
Commits
e8631179
Commit
e8631179
authored
Jul 28, 2021
by
pengyunqian
Browse files
Options
Browse Files
Download
Plain Diff
update:转换配送工具
parents
5c778d43
bde824ed
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
266 additions
and
176 deletions
+266
-176
groupmeal.js
server/controllers/groupmeal.js
+84
-83
router.js
server/router.js
+2
-2
index.vue
src/pages/Groupmeal/orderManagement/index.vue
+136
-63
groupmeal.js
src/service/Groupmeal/groupmeal.js
+44
-28
No files found.
server/controllers/groupmeal.js
View file @
e8631179
...
...
@@ -3,131 +3,132 @@ const req = require("../utils/request").httpReq;
// 获取订单管理列表
exports
.
getOrderList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取主页配送列表
exports
.
getList
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GROUPMEAL_URI
}
/order/deliverer/list_day_deliverer_conf`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
opts
=
{
url
:
`
${
GROUPMEAL_URI
}
/order/deliverer/list_day_deliverer_conf`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取配送列表
exports
.
getDelivererList
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GROUPMEAL_URI
}
/order/deliverer/list_day_deliverer`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
opts
=
{
url
:
`
${
GROUPMEAL_URI
}
/order/deliverer/list_day_deliverer`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 添加骑手
exports
.
getAddDeliverer
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GROUPMEAL_URI
}
/order/deliverer/add_deliverer`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
opts
=
{
url
:
`
${
GROUPMEAL_URI
}
/order/deliverer/add_deliverer`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 分配骑手
exports
.
getSaveDeliverer
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GROUPMEAL_URI
}
/order/deliverer/save_day_deliverer`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
opts
=
{
url
:
`
${
GROUPMEAL_URI
}
/order/deliverer/save_day_deliverer`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取活动名称
exports
.
getMarketingList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/marketing_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/marketing_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取商品名称
exports
.
getGoodsList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/goods_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/goods_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取自提点
exports
.
getSubShopList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/sub_shop_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/sub_shop_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 导出订单
exports
.
orderExport
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_export`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_export`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 打印订单
exports
.
orderPrint
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/
print`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_
print`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 订单退款列表
exports
.
orderItemList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_item_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_item_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 订单退款列表
exports
.
orderRefund
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_refundt`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_refund`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 订单驳回
exports
.
orderRefundReject
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_refund_reject`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_refund_reject`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
server/router.js
View file @
e8631179
...
...
@@ -75,9 +75,9 @@ router.get(`${API_VERSION}/order/background/goods_list`, groupmeal.getGoodsList)
router
.
get
(
`
${
API_VERSION
}
/order/background/sub_shop_list`
,
groupmeal
.
getSubShopList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_export`
,
groupmeal
.
orderExport
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_export`
,
groupmeal
.
orderExport
);
router
.
get
(
`
${
API_VERSION
}
/order/background/print`
,
groupmeal
.
orderPrint
);
router
.
get
(
`
${
API_VERSION
}
/order/background/
order_
print`
,
groupmeal
.
orderPrint
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_item_list`
,
groupmeal
.
orderItemList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_refund_reject`
,
groupmeal
.
orderRefundReject
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_refundt
`
,
groupmeal
.
orderRefund
);
router
.
post
(
`
${
API_VERSION
}
/order/background/order_refund
`
,
groupmeal
.
orderRefund
);
module
.
exports
=
router
;
src/pages/Groupmeal/orderManagement/index.vue
View file @
e8631179
This diff is collapsed.
Click to expand it.
src/service/Groupmeal/groupmeal.js
View file @
e8631179
...
...
@@ -6,60 +6,66 @@ export async function getList (params) {
return
res
;
}
// 获取分配配送员列表
export
async
function
getDelivererList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/order/deliverer/list_day_deliverer"
,
params
);
return
res
;
}
export
async
function
getDelivererList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/order/deliverer/list_day_deliverer"
,
params
);
return
res
;
}
// 添加配送员
export
async
function
getAddDeliverer
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/order/deliverer/add_deliverer"
,
params
);
return
res
;
export
async
function
getAddDeliverer
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/order/deliverer/add_deliverer"
,
params
);
return
res
;
}
// 分配配送员
export
async
function
getSaveDeliverer
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/order/deliverer/save_day_deliverer"
,
params
);
return
res
;
export
async
function
getSaveDeliverer
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/order/deliverer/save_day_deliverer"
,
params
);
return
res
;
}
// 获取订单列表
export
async
function
getOrderList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_list"
,{
// 获取订单列表
export
async
function
getOrderList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_list"
,
{
params
});
return
res
;
}
// 获取活动名称
export
async
function
getMarketingList
()
{
// 获取活动名称
export
async
function
getMarketingList
()
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/marketing_list"
);
return
res
;
}
// 获取商品名称
// 获取商品名称
export
async
function
getGoodsList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/goods_list"
,{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/goods_list"
,
{
params
});
return
res
;
}
// 获取自提点
// 获取自提点
export
async
function
getSubShopList
()
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/sub_shop_list"
);
return
res
;
}
// 导出订单
// 导出订单
export
async
function
orderExport
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_export"
,{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_export"
,
{
params
});
return
res
;
}
// 打印订单
// 打印订单
export
async
function
orderPrint
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/
print"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/
order_print"
,
{
params
});
return
res
;
...
...
@@ -67,24 +73,34 @@ export async function orderPrint(params) {
// 订单退款列表
export
async
function
orderItemList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_item_list"
,{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_item_list"
,
{
params
});
return
res
;
}
// 订单退款
export
async
function
orderRefund
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_refund"
,{
params
export
async
function
refundOrder
(
orderId
,
itemsToRefund
)
{
// const params = {
// order_id: orderId,
// refund_list: itemsToRefund
// };
const
res
=
await
axios
.
post
(
"/api/v1/order/background/order_refund"
,
{
order_id
:
orderId
,
refund_list
:
itemsToRefund
});
return
res
;
}
// 订单驳回
export
async
function
orderRefundReject
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_refund_reject"
,{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_refund_reject"
,
{
params
});
return
res
;
}
// 导出订单
export
function
getOrderExportURL
(
eventId
,
type
)
{
return
`http://bp-dev.ini.yidian-inc.com/order/background/order_export?marketing_id=
${
eventId
}
&type=
${
type
}
`
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment