/**
 * 清单编辑器页面权限管理和session校验
 * Created by Zhong on 2017/8/2.
 */
import baseController from "../../common/base/base_controller";
import {List as BillsFixedFlagList} from "../../common/const/bills_fixed.js";
let config = require("../../../config/config.js");
class viewsPermContr extends baseController{
    redirectStdBillsMain(req, res){
        res.render("maintain/bills_lib/html/main.html",
            {
                userAccount: req.session.managerData.username,
                userID: req.session.managerData.userID
            });
    }
    redirectStdBills(req, res){
        res.render("maintain/bills_lib/html/qingdan.html",
            {
                userAccount: req.session.managerData.username,
                LicenseKey:config.getLicenseKey(process.env.NODE_ENV),
                BillsFixedFlagList: JSON.stringify(BillsFixedFlagList)
            });
    }
    redirectStdJobs(req, res){
        res.render('maintain/bills_lib/html/neirong.html',
            {userAccount: req.session.managerData.username, LicenseKey:config.getLicenseKey(process.env.NODE_ENV)});
    }
    redirectStdItems(req, res){
        res.render('maintain/bills_lib/html/tezheng.html',
            {userAccount: req.session.managerData.username, LicenseKey:config.getLicenseKey(process.env.NODE_ENV)});
    }
}

export default viewsPermContr;
