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
e57c8e76
Commit
e57c8e76
authored
Aug 02, 2021
by
lihui
Browse files
Options
Browse Files
Download
Plain Diff
fix: bug 8月2日
parents
114b91a0
704ca965
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
23244 additions
and
23 deletions
+23244
-23
package-lock.json
package-lock.json
+21532
-21
config.js
server/config.js
+2
-1
groupmeal.js
server/controllers/groupmeal.js
+134
-0
router.js
server/router.js
+18
-0
index.less
src/pages/Groupmeal/Distrib/index.less
+28
-0
index.vue
src/pages/Groupmeal/Distrib/index.vue
+419
-0
User.vue
src/pages/Groupmeal/components/PageHeader/User.vue
+54
-0
config.js
src/pages/Groupmeal/components/PageHeader/config.js
+13
-0
index.vue
src/pages/Groupmeal/components/PageHeader/index.vue
+56
-0
index.vue
src/pages/Groupmeal/components/Pagination/index.vue
+22
-0
index.less
src/pages/Groupmeal/layout/index.less
+9
-0
index.vue
src/pages/Groupmeal/layout/index.vue
+21
-0
index.less
src/pages/Groupmeal/orderManagement/index.less
+23
-0
index.vue
src/pages/Groupmeal/orderManagement/index.vue
+776
-0
index.js
src/router/Groupmeal/index.js
+19
-0
index.js
src/router/index.js
+4
-1
groupmeal.js
src/service/Groupmeal/groupmeal.js
+114
-0
No files found.
package-lock.json
View file @
e57c8e76
This diff is collapsed.
Click to expand it.
server/config.js
View file @
e57c8e76
...
...
@@ -19,5 +19,6 @@ module.exports = {
API_INTERNAL_URI
:
API_INTERNAL_URI
[
env
],
PANDORA_URI
:
PANDORA_URI
[
env
],
GOODS_URI
:
API_INTERNAL_URI
[
env
],
WITHDRAWAL_URI
:
API_INTERNAL_URI
[
env
]
WITHDRAWAL_URI
:
API_INTERNAL_URI
[
env
],
GROUPMEAL_URI
:
API_INTERNAL_URI
[
env
],
};
server/controllers/groupmeal.js
0 → 100644
View file @
e57c8e76
const
GROUPMEAL_URI
=
require
(
"../config.js"
).
GROUPMEAL_URI
;
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
);
};
// 获取主页配送列表
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
);
};
// 获取配送列表
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
);
};
// 添加骑手
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
);
};
// 分配骑手
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
);
};
// 获取活动名称
exports
.
getMarketingList
=
async
ctx
=>
{
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
);
};
// 获取自提点
exports
.
getSubShopList
=
async
ctx
=>
{
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
);
};
// 打印订单
exports
.
orderPrint
=
async
ctx
=>
{
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
);
};
// 订单退款列表
exports
.
orderRefund
=
async
ctx
=>
{
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
);
};
server/router.js
View file @
e57c8e76
...
...
@@ -7,6 +7,7 @@ const role = require('./controllers/role')
const
life
=
require
(
'./controllers/life-no'
);
const
goods
=
require
(
'./controllers/goods'
);
const
withdrawal
=
require
(
'./controllers/withdrawal'
);
const
groupmeal
=
require
(
'./controllers/groupmeal'
);
const
router
=
Router
();
const
API_VERSION
=
"/api/v1"
;
...
...
@@ -62,6 +63,23 @@ router.post(`${API_VERSION}/merchant/lifeinner/life_info`, life.get_life_info)
router
.
get
(
`
${
API_VERSION
}
/merchant/lifeinner/life_list`
,
life
.
get_life_list
)
//用户
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/get_user_info`
,
user
.
getUser_detail
)
// 团餐运营--配送
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/list_day_deliverer_conf`
,
groupmeal
.
getList
)
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/list_day_deliverer`
,
groupmeal
.
getDelivererList
)
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/add_deliverer`
,
groupmeal
.
getAddDeliverer
)
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/save_day_deliverer`
,
groupmeal
.
getSaveDeliverer
)
// 订单管理
router
.
get
(
`
${
API_VERSION
}
/order/background/order_list`
,
groupmeal
.
getOrderList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/marketing_list`
,
groupmeal
.
getMarketingList
);
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/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
.
post
(
`
${
API_VERSION
}
/order/background/order_refund`
,
groupmeal
.
orderRefund
);
// 钱包提现审核 wallet/background/apply_detail
router
.
get
(
`
${
API_VERSION
}
/get_withdrawal_apply_list`
,
withdrawal
.
getApplyList
)
...
...
src/pages/Groupmeal/Distrib/index.less
0 → 100644
View file @
e57c8e76
.goods {
width: 100%;
height: 100%;
padding: 0 30px;
.header {
text-align: right;
margin-bottom: 30px;
}
.dioFor {
margin-left: 5%;
width: 70%;
}
.diotab {
margin-left: 5%;
margin-top: 10px;
}
.dialog-footer {
display: flex;
align-items: center;
justify-content: center;
}
.commodity_list {
margin-top: 30px;
}
.pagination {
margin-top: 30px;
}
}
src/pages/Groupmeal/Distrib/index.vue
0 → 100644
View file @
e57c8e76
This diff is collapsed.
Click to expand it.
src/pages/Groupmeal/components/PageHeader/User.vue
0 → 100644
View file @
e57c8e76
<
template
>
<el-dropdown>
<div
class=
"user-info"
>
<el-avatar
:src=
"userInfo.avatar || DEFAULT_AVATAR"
size=
"small"
></el-avatar>
<span
class=
"user-name"
>
{{
userInfo
.
name
}}
</span>
</div>
<template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-item>
<i
class=
"el-icon-message"
></i>
{{
userInfo
.
email
}}
</el-dropdown-item>
<el-dropdown-item>
<span><a
class=
"link"
href=
"//pandora.yidian-inc.com/"
>
返回pandora工具平台
</a></span>
</el-dropdown-item>
</el-dropdown-menu>
</
template
>
</el-dropdown>
</template>
<
script
>
import
{
mapState
}
from
'vuex'
import
{
HEADER_CONFIG
}
from
'@/config/pageconfig'
;
export
default
{
computed
:
mapState
({
userInfo
:
state
=>
(
state
.
userInfo
||
{}),
}),
data
()
{
return
{
DEFAULT_AVATAR
:
HEADER_CONFIG
.
miscellaneous
.
defaultAvatar
,
};
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.user-info {
display: flex;
align-items: center;
}
.user-name {
margin-left: 12px;
color: #fff;
}
</
style
>
src/pages/Groupmeal/components/PageHeader/config.js
0 → 100644
View file @
e57c8e76
const
headerConfig
=
[
{
name
:
"订单管理"
,
path
:
"/op/groupmeal/orderManagement"
},
{
path
:
'/op/groupmeal/distrib'
,
name
:
'配送员管理'
},
];
export
default
headerConfig
;
\ No newline at end of file
src/pages/Groupmeal/components/PageHeader/index.vue
0 → 100644
View file @
e57c8e76
<
template
>
<div
id=
"pageheader"
>
<div
class=
"line"
></div>
<el-menu
class=
"header-menu"
mode=
"horizontal"
:router=
"true"
background-color=
"#545c64"
text-color=
"#fff"
:default-active=
"activeMenu"
active-text-color=
"#ffd04b"
unique-opened
>
<el-menu-item
v-for=
"item in headerConfig"
:index=
"item.path"
:key=
"item.path"
>
{{
item
.
name
}}
</el-menu-item>
<el-menu-item
key=
"usermenu"
class=
"user-menu"
>
<user></user>
</el-menu-item>
</el-menu>
</div>
</
template
>
<
script
>
import
headerConfig
from
"./config"
;
import
User
from
"./User.vue"
;
export
default
{
name
:
"PageHeader"
,
components
:
{
User
},
data
()
{
return
{
headerConfig
};
},
computed
:
{
activeMenu
()
{
return
this
.
$route
.
path
;
}
},
beforeMount
()
{
},
methods
:
{}
};
</
script
>
<
style
lang=
"less"
>
</
style
>
src/pages/Groupmeal/components/Pagination/index.vue
0 → 100644
View file @
e57c8e76
<
template
>
<div
class=
"block"
>
<el-pagination
class=
"pagination"
layout=
"prev, pager, next, jumper, ->,page , total"
v-bind=
"$attrs"
v-on=
"$listener"
>
</el-pagination>
</div>
</
template
>
<
script
>
export
default
{
name
:
'Pagination'
};
</
script
>
<
style
lang=
"less"
>
.block {
margin-top: 50px;
}
</
style
>
src/pages/Groupmeal/layout/index.less
0 → 100644
View file @
e57c8e76
.layout {
display: flex;
flex-direction: column;
height: 100%;
}
.main {
flex: 1;
}
src/pages/Groupmeal/layout/index.vue
0 → 100644
View file @
e57c8e76
<
template
>
<div
class=
"layout"
>
<!-- 页面公共 header -->
<page-header
class=
"page-header"
></page-header>
<!-- 页面主体部分 -->
<div
class=
"main"
>
<slot></slot>
</div>
</div>
</
template
>
<
script
>
import
PageHeader
from
'../components/PageHeader'
;
export
default
{
components
:
{
PageHeader
},
};
</
script
>
<
style
lang=
"less"
src=
"./index.less"
></
style
>
src/pages/Groupmeal/orderManagement/index.less
0 → 100644
View file @
e57c8e76
.orderManage {
padding: 30px;
box-sizing: border-box;
}
.tabHead{
margin-bottom:10px;
}
.exportForm,.exportBtn{
text-align:center;
}
.refundBtnGroup {
display: block;
text-align: center;
}
.refundCon /deep/ .el-row {
margin-bottom: 15px;
display: flex;
align-items: center;
}
\ No newline at end of file
src/pages/Groupmeal/orderManagement/index.vue
0 → 100644
View file @
e57c8e76
This diff is collapsed.
Click to expand it.
src/router/Groupmeal/index.js
0 → 100644
View file @
e57c8e76
/**
* 团餐运营管理
*/
const
groupmealRouters
=
[
{
path
:
"/op/groupmeal/orderManagement"
,
name
:
"orderManagement"
,
// redirect: "/op/groupmeal/orderManagement",
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Groupmeal/orderManagement"
)
},
{
path
:
"/op/groupmeal/distrib"
,
name
:
"Distrib"
,
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Groupmeal/Distrib"
)
},
];
export
default
groupmealRouters
;
\ No newline at end of file
src/router/index.js
View file @
e57c8e76
...
...
@@ -11,6 +11,7 @@ import ManageRole from "../pages/Role/manage-role.vue";
import
RoleDetail
from
"../pages/Role/role-detail.vue"
;
import
goodsRouter
from
"./Goods/index"
;
import
withdrawalRoutes
from
"./Withdrawal/index"
;
import
groupmealRouters
from
"./Groupmeal/index"
;
const
routes
=
[
{
path
:
"/op/enterprise"
,
...
...
@@ -96,7 +97,9 @@ const routes = [
// 商品管理路由
...
goodsRouter
,
// 钱包审核
...
withdrawalRoutes
...
withdrawalRoutes
,
// 团餐运营
...
groupmealRouters
];
console
.
log
(
routes
);
...
...
src/service/Groupmeal/groupmeal.js
0 → 100644
View file @
e57c8e76
import
axios
from
"@/utils/request"
;
// 获取主页配送员列表
export
async
function
getList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/order/deliverer/list_day_deliverer_conf"
,
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
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"
,
{
params
});
return
res
;
}
// 获取活动名称
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"
,
{
params
});
return
res
;
}
// 获取自提点
export
async
function
getSubShopList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/sub_shop_list"
,{
params
});
return
res
;
}
// 导出订单
export
async
function
orderExport
(
params
)
{
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/order_print"
,
{
params
});
return
res
;
}
// 订单退款列表
export
async
function
orderItemList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_item_list"
,
{
params
});
return
res
;
}
// 订单退款
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"
,
{
params
});
return
res
;
}
// 导出订单
export
function
getOrderExportURL
(
eventId
,
type
)
{
var
ENV
;
if
(
process
.
env
.
NODE_ENV
==
"development"
){
ENV
=
"http://bp-dev.ini.yidian-inc.com/"
}
else
{
ENV
=
"http://bp-test.ini.yidian-inc.com/"
}
return
`
${
ENV
}
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