Commit 008ca6a8 by 王昆

gsb

parent dca8c66f
...@@ -54,7 +54,148 @@ class UserCtl extends CtlBase { ...@@ -54,7 +54,148 @@ class UserCtl extends CtlBase {
} }
async getMenu(qobj, pobj, req) { async getMenu(qobj, pobj, req) {
return system.getResultSuccess(req.loginUser.menus); // return system.getResultSuccess(req.loginUser.menus);
let loginUser = req.loginUser;
if(!loginUser) {
return system.getResultSuccess({gtArr : [], pjArr: []})
}
let gtArr = this.getOrderMenu(loginUser);
let pjArr = this.getInvoiceMenu(loginUser);
return system.getResultSuccess({gtArr: gtArr, pjArr: pjArr});
}
getOrderMenu(loginUser) {
if (loginUser.isMain) {
return [
{
"name": "数据概览",
"icon": "iconfont icon-gth-gsshujugailan",
"team": [
{
"name": "业务数据汇总",
"path": "/"
}
]
},
{
"name": "订单中心",
"icon": "iconfont icon-gth-gsdingdanzhongxin",
"team": [
{
"name": "订单管理",
"path": "/trading/ordersAll"
},
{
"name": "我的业务订单",
"path": "/trading/orderInformation"
}
]
},
{
"name": "个体户中心",
"icon": "iconfont icon-gth-gsgetihuzhongxin",
"team": [
{
"name": "个体户管理",
"path": "/trading/userInformation"
},
{
"name": "个体户",
"path": "/trading/userAll"
}
]
},
{
"name": "用户中心",
"icon": "iconfont icon-gth-gsgetihuzhongxin",
"team": [
{
"name": "用户管理",
"path": "/user/userCenter"
}
]
}
];
} else {
return [
{
"name": "数据概览",
"icon": "iconfont icon-gth-gsshujugailan",
"team": [
{
"name": "业务数据汇总",
"path": "/"
}
]
},
{
"name": "订单中心",
"icon": "iconfont icon-gth-gsdingdanzhongxin",
"team": [
{
"name": "我的业务订单",
"path": "/trading/orderInformation"
}
]
},
{
"name": "个体户中心",
"icon": "iconfont icon-gth-gsgetihuzhongxin",
"team": [
{
"name": "个体户",
"path": "/trading/userAll"
}
]
}
];
}
}
getInvoiceMenu(loginUser) {
if (loginUser.isMain) {
return [
{
name: "数据概览",
icon: "iconfont icon-gth-gsshujugailan",
team: [{name: "业务数据汇总", path: "/information"}]
},
{
name: "发票管理",
icon: "iconfont icon-gth-gsfapiaozhongxin",
team: [
{name: "发票申请", path: "/trading/invoiceTransact"},
{name: "发票管理", path: "/trading/invoiceManagement"},
{name: "红冲申请", path: "/trading/invoiceApplyFor"}
]
},
{
name: "用户中心",
icon: "iconfont icon-gth-gsgetihuzhongxin",
team: [{name: "用户管理", path: "/user/userCentertwo"}]
}
];
} else {
return [
{
name: "数据概览",
icon: "iconfont icon-gth-gsshujugailan",
team: [{name: "业务数据汇总", path: "/information"}]
},
{
name: "发票管理",
icon: "iconfont icon-gth-gsfapiaozhongxin",
team: [
{name: "发票申请", path: "/trading/invoiceTransact"},
{name: "发票管理", path: "/trading/invoiceManagement"},
{name: "红冲申请", path: "/trading/invoiceApplyFor"}
]
}
];
}
} }
/** /**
...@@ -195,6 +336,7 @@ class UserCtl extends CtlBase { ...@@ -195,6 +336,7 @@ class UserCtl extends CtlBase {
*/ */
async page(params, pobj2, req) { async page(params, pobj2, req) {
try { try {
params.uctypeId = params.deliver_id;
return await this.userSve.page(params); return await this.userSve.page(params);
} catch (error) { } catch (error) {
console.log(error); console.log(error);
......
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