Commit a04abffc by 王昆

gsb

parent ee2abfb2
...@@ -33,7 +33,7 @@ class UserCtl extends CtlBase { ...@@ -33,7 +33,7 @@ class UserCtl extends CtlBase {
ucname: loginName, ucname: loginName,
password: password, password: password,
}); });
if(loginUser.status != 0) { if (loginUser.status != 0) {
return loginUser; return loginUser;
} }
...@@ -61,8 +61,8 @@ class UserCtl extends CtlBase { ...@@ -61,8 +61,8 @@ 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; let loginUser = req.loginUser;
if(!loginUser) { if (!loginUser) {
return system.getResultSuccess({gtArr : [], pjArr: []}) return system.getResultSuccess({gtArr: [], pjArr: []})
} }
let gtArr = this.getOrderMenu(loginUser); let gtArr = this.getOrderMenu(loginUser);
...@@ -151,59 +151,32 @@ class UserCtl extends CtlBase { ...@@ -151,59 +151,32 @@ class UserCtl extends CtlBase {
} }
]; ];
} }
} }
getInvoiceMenu(loginUser) { getInvoiceMenu(loginUser) {
if (!loginUser) { if (!loginUser) {
return []; return [];
} }
if (loginUser.isMain) { return [
return [ {
{ name: "数据概览",
name: "数据概览", icon: "iconfont icon-gth-gsshujugailan",
icon: "iconfont icon-gth-gsshujugailan", team: [{name: "业务数据汇总", path: "/information"}]
team: [{name: "业务数据汇总", path: "/information"}] },
}, {
{ name: "发票管理",
name: "发票管理", icon: "iconfont icon-gth-gsfapiaozhongxin",
icon: "iconfont icon-gth-gsfapiaozhongxin", team: [
team: [ {name: "发票办理", path: "/trading/invoiceTransact"},
{name: "发票申请", path: "/trading/invoiceTransact"}, {name: "发票管理", path: "/trading/invoiceManagement"},
{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"}
]
}
];
}
} }
/** /**
* 添加 * 添加
* @param {*} params * @param {*} params
*/ */
async addUser(params, pobj2, req) { async addUser(params, pobj2, req) {
try { try {
...@@ -243,7 +216,7 @@ class UserCtl extends CtlBase { ...@@ -243,7 +216,7 @@ class UserCtl extends CtlBase {
/** /**
* 更新 * 更新
* @param {*} params * @param {*} params
*/ */
async updUser(params, pobj2, req) { async updUser(params, pobj2, req) {
var user = { var user = {
...@@ -287,9 +260,9 @@ class UserCtl extends CtlBase { ...@@ -287,9 +260,9 @@ class UserCtl extends CtlBase {
/** /**
* 启用禁用 * 启用禁用
* @param {*} params * @param {*} params
* @param {*} pobj2 * @param {*} pobj2
* @param {*} req * @param {*} req
*/ */
async enabled(params, pobj2, req) { async enabled(params, pobj2, req) {
try { try {
...@@ -311,7 +284,7 @@ class UserCtl extends CtlBase { ...@@ -311,7 +284,7 @@ class UserCtl extends CtlBase {
/** /**
* 查询明细 * 查询明细
* @param {*} params * @param {*} params
*/ */
async queryById(params, pobj2, req) { async queryById(params, pobj2, req) {
try { try {
...@@ -320,9 +293,10 @@ class UserCtl extends CtlBase { ...@@ -320,9 +293,10 @@ class UserCtl extends CtlBase {
return system.getResult(null, `系统错误 错误信息 ${error}`); return system.getResult(null, `系统错误 错误信息 ${error}`);
} }
} }
async updPassword(params, pobj2, req) { async updPassword(params, pobj2, req) {
params.password = this.trim(params.password); params.password = this.trim(params.password);
if(!params.password) { if (!params.password) {
return system.getResult(null, `请填写密码`); return system.getResult(null, `请填写密码`);
} }
...@@ -335,7 +309,7 @@ class UserCtl extends CtlBase { ...@@ -335,7 +309,7 @@ class UserCtl extends CtlBase {
/** /**
* 根据pid查出子目录 * 根据pid查出子目录
* @param {*} params * @param {*} params
*/ */
async page(params, pobj2, req) { async page(params, pobj2, req) {
try { try {
...@@ -359,4 +333,5 @@ class UserCtl extends CtlBase { ...@@ -359,4 +333,5 @@ class UserCtl extends CtlBase {
} }
} }
} }
module.exports = UserCtl; 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