Commit a04abffc by 王昆

gsb

parent ee2abfb2
......@@ -33,7 +33,7 @@ class UserCtl extends CtlBase {
ucname: loginName,
password: password,
});
if(loginUser.status != 0) {
if (loginUser.status != 0) {
return loginUser;
}
......@@ -61,8 +61,8 @@ class UserCtl extends CtlBase {
async getMenu(qobj, pobj, req) {
// return system.getResultSuccess(req.loginUser.menus);
let loginUser = req.loginUser;
if(!loginUser) {
return system.getResultSuccess({gtArr : [], pjArr: []})
if (!loginUser) {
return system.getResultSuccess({gtArr: [], pjArr: []})
}
let gtArr = this.getOrderMenu(loginUser);
......@@ -151,59 +151,32 @@ class UserCtl extends CtlBase {
}
];
}
}
getInvoiceMenu(loginUser) {
if (!loginUser) {
return [];
}
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"}
]
}
];
}
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"},
]
}
];
}
/**
* 添加
* @param {*} params
* 添加
* @param {*} params
*/
async addUser(params, pobj2, req) {
try {
......@@ -243,7 +216,7 @@ class UserCtl extends CtlBase {
/**
* 更新
* @param {*} params
* @param {*} params
*/
async updUser(params, pobj2, req) {
var user = {
......@@ -287,9 +260,9 @@ class UserCtl extends CtlBase {
/**
* 启用禁用
* @param {*} params
* @param {*} pobj2
* @param {*} req
* @param {*} params
* @param {*} pobj2
* @param {*} req
*/
async enabled(params, pobj2, req) {
try {
......@@ -311,7 +284,7 @@ class UserCtl extends CtlBase {
/**
* 查询明细
* @param {*} params
* @param {*} params
*/
async queryById(params, pobj2, req) {
try {
......@@ -320,9 +293,10 @@ class UserCtl extends CtlBase {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
async updPassword(params, pobj2, req) {
params.password = this.trim(params.password);
if(!params.password) {
if (!params.password) {
return system.getResult(null, `请填写密码`);
}
......@@ -335,7 +309,7 @@ class UserCtl extends CtlBase {
/**
* 根据pid查出子目录
* @param {*} params
* @param {*} params
*/
async page(params, pobj2, req) {
try {
......@@ -359,4 +333,5 @@ class UserCtl extends CtlBase {
}
}
}
module.exports = UserCtl;
\ No newline at end of file
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