Commit e57c8e76 authored by lihui's avatar lihui

fix: bug 8月2日

parents 114b91a0 704ca965
This diff is collapsed.
......@@ -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],
};
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);
};
......@@ -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)
......
.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;
}
}
This diff is collapsed.
<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>
const headerConfig = [
{
name: "订单管理",
path: "/op/groupmeal/orderManagement"
},
{
path: '/op/groupmeal/distrib',
name: '配送员管理'
},
];
export default headerConfig;
\ No newline at end of file
<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>
<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>
.layout {
display: flex;
flex-direction: column;
height: 100%;
}
.main {
flex: 1;
}
<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>
.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
This diff is collapsed.
/**
* 团餐运营管理
*/
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
......@@ -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);
......
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}`;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment