@using System.Web.Optimization;
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>九平米管理软件</title>

    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <link rel="stylesheet" href="~/Content/tlebootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="~/Content/tledist/css/font-awesome.min.css">
    <link rel="stylesheet" href="~/Content/tledist/css/ionicons.min.css">
    <link rel="stylesheet" href="~/Content/tleplugins/select2/select2.min.css" />
    <link rel="stylesheet" href="~/Content/tledist/css/AdminLTE.min.css">
    <link rel="stylesheet" href="~/Content/tledist/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="~/Content/tleplugins/morris/morris.css">
    <link rel="stylesheet" href="~/Content/tleplugins/jvectormap/jquery-jvectormap-1.2.2.css">
    <link rel="stylesheet" href="~/Content/tleplugins/datepicker/datepicker3.css">
    <link rel="stylesheet" href="~/Content/tleplugins/daterangepicker/daterangepicker.css">
    <link rel="stylesheet" href="~/Content/tleplugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
    <link rel="stylesheet" href="/Content/jquery-ui.icon-font.css">

    @Styles.Render("~/Content/themes/base/css")
    @Styles.Render("~/Content/css")
    <link rel="stylesheet" href="~/Content/Site.css?vn=20180813" />
    <script src="~/Scripts/jquery-2.2.4.min.js"></script>
    <script src="~/Scripts/jquery-ui-1.11.4.min.js" type="text/javascript"></script>

    @*@Scripts.Render("~/bundles/jQuery.BlockUI")*@
    <script src="~/Scripts/jquery.blockUI.js"></script>
    @Scripts.Render("~/bundles/jqueryform")
    @Scripts.Render("~/bundles/inputmask")
    @Scripts.Render("~/bundles/ajaxfileupload")

    <script src="~/Scripts/common.js?vn=20180813" type="text/javascript"></script>
    <script src="../../Scripts/highcharts.js"></script>

</head>
<body class="hold-transition skin-blue-light fixed sidebar-mini">
    <div class="wrapper">
        @{
            Com._9pm2.ClientWeb.Models.LoginUser user = Session["LoginUser"] as Com._9pm2.ClientWeb.Models.LoginUser;
            if (user == null)
            {
                user = new Com._9pm2.ClientWeb.Models.LoginUser();
            }
            var UnProcessedOrder = ViewData["UnProcessedOrder"] == null ? 0 : int.Parse(ViewData["UnProcessedOrder"].ToString());
            var UnProcessedToDo = ViewData["UnProcessedToDo"] == null ? 0 : int.Parse(ViewData["UnProcessedToDo"].ToString());

            UnProcessedOrder = UnProcessedOrder > 99 ? 99 : UnProcessedOrder;
            UnProcessedToDo = UnProcessedToDo > 99 ? 99 : UnProcessedToDo;
        }

        <header class="main-header">
            <!-- Logo -->
            <a target="_blank" href="http://www.jiupingmi.cn" class="logo">
                <!-- mini logo for sidebar mini 50x50 pixels -->
                <span class="logo-mini">@user.CompanyName</span>
                <!-- logo for regular state and mobile devices -->
                <span class="logo-lg">@user.CompanyName</span>
            </a>
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-static-top">
                <!-- Sidebar toggle button-->
                <a href="javascript:void(0);" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">Toggle navigation</span>
                </a>
                <div class="sys-message"></div>
                <div class="navbar-custom-menu">
                    <ul class="nav navbar-nav">


                        <li class="user user-menu">
                            <a href="javascript:void(0);">
                                <span>
                                    Hello，@(user == null ? "" : user.UserName) !
                                </span>
                            </a>
                        </li>

                        <li class="with-badge">
                            <a href='/MySpace/Index'>
                                仪表盘

                                @if (UnProcessedOrder > 0)
                                {
                                    <span data-toggle="tooltip" title="@UnProcessedOrder 个待处理订单" class="badge bg-red" style="">@UnProcessedOrder</span>
                                }

                            </a>
                        </li>

                        @*<li class="with-badge">
                            <a href="/MySpace/ToDo">
                                日程

                                @if (UnProcessedToDo > 0)
                                {
                                    <span data-toggle="tooltip" title="@UnProcessedToDo 个代办事项" class="badge bg-red">@UnProcessedToDo</span>
                                }
                            </a>
                        </li>*@

                        @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P1_客户订单_订单创建))
                        {
                            if (user.EnableStandarOrder && user.EnableSimpleOrder)
                            {
                                <li class="menu-li-group">
                                    <a href='javascript:void(0)'>客户开单</a>
                                    <ul>
                                        <li><a href='/Order/Create'>标准开单</a></li>
                                        <li><a href='/Order/SimpleCreate'>极速开单</a></li>
                                    </ul>
                                </li>
                            }
                            else
                            {
                                if (user.EnableStandarOrder)
                                {
                                    <li><a href='/Order/Create'>客户开单</a></li>
                                }
                                if (user.EnableSimpleOrder)
                                {
                                    <li><a href='/Order/SimpleCreate'>客户开单</a></li>
                                }
                            }

                        }
                        @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P2_外协订单_订单创建))
                        {
                            if (user.EnableStandarFactoryOrder && user.EnableSimpleFactoryOrder)
                            {
                                <li class="menu-li-group">
                                    <a href='javascript:void(0)'>外协开单</a>
                                    <ul>
                                        <li><a href='/FactoryOrder/Create'>标准开单</a></li>
                                        <li><a href='/FactoryOrder/SimpleCreate'>极速开单</a></li>
                                    </ul>
                                </li>
                            }
                            else
                            {
                                if (user.EnableStandarFactoryOrder)
                                {
                                    <li><a href='/FactoryOrder/Create'>外协开单</a></li>
                                }
                                if (user.EnableSimpleFactoryOrder)
                                {
                                    <li><a href='/FactoryOrder/SimpleCreate'>外协开单</a></li>
                                }
                            }
                        }
                        <li><a target="_blank" href='~/VersionList/Doc.html'>操作手册</a></li>
                        <li><a href='#' onclick="logout()">退出</a></li>
                        @if (!user.SoftwareIsAuthorized)
                        {
                            if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P7_软件授权))
                            {
                                <li><a class="soft-unauthorized" href='/System/License'>购买正版</a></li>
                            }
                            else
                            {
                                <li><a class="soft-unauthorized" href='http://www.jiupingmi.cn'>购买正版</a></li>
                            }
                        }


                    </ul>
                </div>
            </nav>
        </header>

        <aside class="main-sidebar">
            <!-- sidebar: style can be found in sidebar.less -->
            <section class="sidebar">
                <!-- Sidebar user panel -->
                <!-- /.search form -->
                <!-- sidebar menu: : style can be found in sidebar.less -->
                <ul class="sidebar-menu">

                    @if (user != null)
                    {
                        if (user.PermissionList.Where(m => m.StartsWith(Com._9pm2.ClientWeb.Common.PT_PermissionType.PG_客户订单)).Count() > 0)
                        {
                            <li class="treeview">
                                <a class="text-black" href="javascript:void(0);">
                                    <i class="fa fa-file-text-o"></i> <span>客户订单</span>
                                    <span class="pull-right-container">
                                        <i class="fa fa-angle-left pull-right"></i>
                                    </span>
                                </a>
                                <ul class="treeview-menu">

                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P1_客户订单_订单查询))
                                    {
                                        <li class=""><a href="/Order"><i class="fa fa-circle-o"></i> 订单查询</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P1_客户订单_订单创建))
                                    {
                                        if (user.EnableStandarOrder)
                                        {
                                            <li class=""><a href="/Order/Create"><i class="fa fa-circle-o"></i> 标准开单</a></li>
                                        }
                                        if (user.EnableSimpleOrder)
                                        {
                                            <li class=""><a href="/Order/SimpleCreate"><i class="fa fa-circle-o"></i> 极速开单</a></li>
                                        }
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P1_客户订单_价格查询))
                                    {
                                        <li class=""><a href="/Order/QueryPrice"><i class="fa fa-circle-o"></i> 价格查询</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P1_客户订单_报价单管理))
                                    {
                                        <li class=""><a href="/Order/QuotationList"><i class="fa fa-circle-o"></i> 客户报价单</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P1_客户订单_订单回收站))
                                    {
                                        <li class=""><a href="/Order/Recycle"><i class="fa fa-circle-o"></i> 订单回收站</a></li>
                                    }

                                </ul>
                            </li>
                        }

                        if (user.PermissionList.Where(m => m.StartsWith(Com._9pm2.ClientWeb.Common.PT_PermissionType.PG_外协订单)).Count() > 0)
                        {

                            <li class="treeview">
                                <a class="text-black" href="javascript:void(0);">
                                    <i class="fa fa-chain"></i> <span>外协订单</span>
                                    <span class="pull-right-container">
                                        <i class="fa fa-angle-left pull-right"></i>
                                    </span>
                                </a>
                                <ul class="treeview-menu">

                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P2_外协订单_订单查询))
                                    {
                                        <li class=""><a href="/FactoryOrder"><i class="fa fa-circle-o"></i> 订单查询</a></li>
                                    }


                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P2_外协订单_订单创建))
                                    {
                                        if (user.EnableStandarOrder)
                                        {
                                            <li class=""><a href="/FactoryOrder/Create"><i class="fa fa-circle-o"></i> 标准开单</a></li>
                                        }
                                        if (user.EnableSimpleOrder)
                                        {
                                            <li class=""><a href="/FactoryOrder/SimpleCreate"><i class="fa fa-circle-o"></i> 极速开单</a></li>
                                        }
                                    }

                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P2_外协订单_价格查询))
                                    {
                                        <li class=""><a href="/FactoryOrder/QueryPrice"><i class="fa fa-circle-o"></i> 价格查询</a></li>
                                    }

                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P2_外协订单_订单回收站))
                                    {
                                        <li class=""><a href="/FactoryOrder/Recycle"><i class="fa fa-circle-o"></i> 订单回收站</a></li>
                                    }

                                </ul>
                            </li>
                        }

                        if (user.PermissionList.Where(m => m.StartsWith(Com._9pm2.ClientWeb.Common.PT_PermissionType.PG_客户外协)).Count() > 0)
                        {
                            <li class="treeview">
                                <a class="text-black" href="javascript:void(0);">
                                    <i class="fa fa-user"></i> <span>客户管理</span>
                                    <span class="pull-right-container">
                                        <i class="fa fa-angle-left pull-right"></i>
                                    </span>
                                </a>
                                <ul class="treeview-menu">

                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P3_客户管理))
                                    {
                                        <li><a href="/Customer"><i class="fa fa-circle-o"></i> 客户管理</a></li>
                                        <li><a href="/Customer/Category"><i class="fa fa-circle-o"></i> 客户分类</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P3_外协管理))
                                    {
                                        <li class=""><a href="/Customer/Factory"><i class="fa fa-circle-o"></i> 外协管理</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P3_联系人查询))
                                    {
                                        <li class=""><a href="/Contact"><i class="fa fa-circle-o"></i> 联系人查询</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P3_客户报价))
                                    {
                                        <li class=""><a href="/Warehouse/CustomerPrice"><i class="fa fa-circle-o"></i> 客户报价</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P3_外协报价))
                                    {
                                        <li class=""><a href="/Warehouse/FactoryPrice"><i class="fa fa-circle-o"></i> 外协报价</a></li>
                                    }
                                </ul>
                            </li>
                        }

                        if (user.PermissionList.Where(m => m.StartsWith(Com._9pm2.ClientWeb.Common.PT_PermissionType.PG_库存管理)).Count() > 0)
                        {
                            <li class="treeview">
                                <a class="text-black" href="javascript:void(0);">
                                    <i class="fa fa-archive"></i> <span>库存管理</span>
                                    <span class="pull-right-container">
                                        <i class="fa fa-angle-left pull-right"></i>
                                    </span>
                                </a>
                                <ul class="treeview-menu">

                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P8_材料管理))
                                    {
                                        <li><a href="/Warehouse/Category"><i class="fa fa-circle-o"></i> 材料类别</a></li>
                                        <li class=""><a href="/Warehouse/Technic"><i class="fa fa-circle-o"></i> 材料工艺</a></li>
                                        <li class=""><a href="/Warehouse/Material"><i class="fa fa-circle-o"></i> 材料管理</a></li>
                                    }                                   
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P8_供应商管理))
                                    {
                                        <li class=""><a href="/Warehouse/Supplier"><i class="fa fa-circle-o"></i> 供应商管理</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P8_进货管理))
                                    {
                                        <li class=""><a href="/Warehouse/StockIn"><i class="fa fa-circle-o"></i> 进货单管理</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P8_出库管理))
                                    {
                                        <li class=""><a href="/Warehouse/StockOut"><i class="fa fa-circle-o"></i> 出库单管理</a></li>
                                    }

                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P8_库存查询))
                                    {
                                        <li class=""><a href="/Warehouse/StockQuery"><i class="fa fa-circle-o"></i> 库存查询</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P8_库存查询))
                                    {
                                        <li class=""><a href="/Warehouse/StockWarning"><i class="fa fa-circle-o"></i> 库存预警</a></li>
                                    }

                                </ul>
                            </li>
                        }

                        if (user.PermissionList.Where(m => m.StartsWith(Com._9pm2.ClientWeb.Common.PT_PermissionType.PG_财务收支)).Count() > 0)
                        {
                            <li class="treeview">
                                <a class="text-black" href="javascript:void(0);">
                                    <i class="fa fa-cny"></i> <span>财务管理</span>
                                    <span class="pull-right-container">
                                        <i class="fa fa-angle-left pull-right"></i>
                                    </span>
                                </a>
                                <ul class="treeview-menu">


                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P4_科目管理))
                                    {
                                        <li class=""><a href="/Finance/AccountTitle"><i class="fa fa-circle-o"></i> 科目管理</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P4_收支明细查询))
                                    {
                                        <li class=""><a href="/Finance/InAndOut"><i class="fa  fa-circle-o"></i> 收支明细</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P4_收支报表))
                                    {
                                        <li class=""><a href="/Finance/Report"><i class="fa fa-circle-o"></i> 收支报表</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P4_客户对账))
                                    {
                                        <li class=""><a href="/Order/CustomerStatement"><i class="fa fa-circle-o"></i> 客户对账</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P4_外协对账))
                                    {
                                        <li class=""><a href="/FactoryOrder/FactoryStatement"><i class="fa fa-circle-o"></i> 外协对账</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P4_供应商对账))
                                    {
                                        <li class=""><a href="/Warehouse/SupplierStatement"><i class="fa fa-circle-o"></i> 供应商对账</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P4_订单成本核算))
                                    {
                                        <li class=""><a href="/Order/OrderCost"><i class="fa fa-circle-o"></i> 订单成本核算</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P4_订单账龄统计))
                                    {
                                        <li class=""><a href="/Order/OrderAging"><i class="fa fa-circle-o"></i> 订单账龄统计</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P4_订单收款明细))
                                    {
                                        <li class=""><a href="/Order/OrderReceipts"><i class="fa fa-circle-o"></i> 订单收款流水</a></li>
                                    }  
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P4_客户欠款统计))
                                    {
                                        <li class=""><a href="/Order/OrderArrears"><i class="fa fa-circle-o"></i> 客户欠款统计</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P4_绩效分配))
                                    {
                                        <li class=""><a href="/Finance/Performance"><i class="fa fa-circle-o"></i> 员工绩效分配</a></li>
                                    }  
                                </ul>
                            </li>
                        }

                        if (user.PermissionList.Where(m => m.StartsWith(Com._9pm2.ClientWeb.Common.PT_PermissionType.PG_人力资源)).Count() > 0)
                        {
                            <li class="treeview">
                                <a class="text-black" href="javascript:void(0);">
                                    <i class="fa fa-user-plus"></i> <span>人力资源</span>
                                    <span class="pull-right-container">
                                        <i class="fa fa-angle-left pull-right"></i>
                                    </span>
                                </a>
                                <ul class="treeview-menu">


                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P5_部门管理))
                                    {
                                        <li class=""><a href="/HR/Department"><i class="fa fa-circle-o"></i> 部门管理</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P5_员工管理))
                                    {
                                        <li class=""><a href="/HR/Employee"><i class="fa  fa-circle-o"></i> 员工管理</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P5_薪酬配置))
                                    {
                                        <li class=""><a href="/HR/SalarySetting"><i class="fa fa-circle-o"></i> 社保配置</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P5_工资管理))
                                    {
                                        <li class=""><a href="/HR/Payroll"><i class="fa fa-circle-o"></i> 工资管理</a></li>

                                    }
                                </ul>
                            </li>
                        }

                        if (user.PermissionList.Where(m => m.StartsWith(Com._9pm2.ClientWeb.Common.PT_PermissionType.PG_统计报表)).Count() > 0)
                        {
                            <li class="treeview">
                                <a class="text-black" href="javascript:void(0);">
                                    <i class="fa fa-file-pdf-o"></i> <span>统计报表</span>
                                    <span class="pull-right-container">
                                        <i class="fa fa-angle-left pull-right"></i>
                                    </span>
                                </a>
                                <ul class="treeview-menu">

                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P6_分类统计))
                                    {
                                        <li class=""><a href="/Chart/Order"><i class="fa fa-circle-o"></i> 分类统计</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P6_客户排名))
                                    {
                                        <li class=""><a href="/Chart/Customer"><i class="fa fa-circle-o"></i> 客户排名</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P6_客户趋势))
                                    {
                                        <li class=""><a href="/Chart/CustomerPerformance"><i class="fa fa-circle-o"></i> 客户趋势</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P6_逐月业绩))
                                    {
                                        <li class=""><a href="/Chart/Performance"><i class="fa fa-circle-o"></i> 逐月业绩</a></li>
                                    }                                   
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P6_订单成本分析))
                                    {
                                        <li class=""><a href="/Chart/ChartOrderCost"><i class="fa fa-circle-o"></i> 订单成本</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P4_订单账龄统计))
                                    {
                                        <li class=""><a href="/Chart/ChartOrderAging"><i class="fa fa-circle-o"></i> 订单账龄</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P6_员工绩效))
                                    {
                                        <li class=""><a href="/Chart/UserOrderPerformance"><i class="fa fa-circle-o"></i> 员工绩效</a></li>
                                        <li class=""><a href="/Chart/UserPerformance"><i class="fa fa-circle-o"></i> 员工工作量</a></li>
                                    }

                                </ul>
                            </li>
                        }

                        if (user.PermissionList.Where(m => m.StartsWith(Com._9pm2.ClientWeb.Common.PT_PermissionType.PG_系统配置)).Count() > 0)
                        {
                            <li class="treeview">
                                <a class="text-black" href="javascript:void(0);">
                                    <i class="fa fa-gear"></i> <span>系统配置</span>
                                    <span class="pull-right-container">
                                        <i class="fa fa-angle-left pull-right"></i>
                                    </span>
                                </a>
                                <ul class="treeview-menu">
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P7_参数设置))
                                    {
                                        <li class=""><a href="/System/Settings"><i class="fa fa-circle-o"></i> 系统参数</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P7_软件授权))
                                    {
                                        <li class=""><a href="/System/License"><i class="fa fa-circle-o"></i> 软件授权</a></li>
                                    }

                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P7_流程配置))
                                    {
                                        <li class=""><a href="/System/WorkFlow"><i class="fa fa-circle-o"></i> 流程配置</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P7_支付方式))
                                    {
                                        <li class=""><a href="/System/PaymentTypeList"><i class="fa fa-circle-o"></i> 支付方式</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P7_计价单位))
                                    {
                                        <li class=""><a href="/System/PriceUnit"><i class="fa fa-circle-o"></i> 计价单位</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P7_客户订单状态))
                                    {
                                        <li class=""><a href="/System/OrderStatusList"><i class="fa fa-circle-o"></i> 客户订单状态</a></li>
                                    }
                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P7_模板配置))
                                    {
                                        <li class=""><a href="/System/OrderTemplate?type=1"><i class="fa fa-circle-o"></i> 订单模板配置</a></li>                                        
                                    }

                                    @if (user.PermissionList.Contains(Com._9pm2.ClientWeb.Common.PT_PermissionType.P7_数据库备份))
                                    {
                                        <li class=""><a href="/System/BackupDB"><i class="fa fa-circle-o"></i> 数据库备份</a></li>
                                    }

                                </ul>
                            </li>
                        }


                        <li class="treeview">
                            <a class="text-black" href="javascript:void(0);">
                                <i class="fa fa-calendar-check-o"></i> <span>个人中心</span>

                                <span class="pull-right-container">
                                    <i class="fa fa-angle-left pull-right"></i>
                                </span>
                            </a>
                            <ul class="treeview-menu">
                                <li class=""><a href="/MySpace/ChangePassword"><i class="fa fa-circle-o"></i> 更改密码</a></li>
                                @*<li class="">
                                    <a href="/MySpace/ToDo">
                                        <i class="fa fa-circle-o"></i> 日程管理
                                    </a>
                                </li>*@
                                <li class="">
                                    <a href="/MySpace/UnProcessedOrder">
                                        <i class="fa fa-circle-o"></i> 待处理订单

                                    </a>

                                </li>
                                <li class="">
                                    <a href="/MySpace/ProcessedOrder">
                                        <i class="fa fa-circle-o"></i> 已处理订单

                                    </a>
                                </li>



                            </ul>
                        </li>

                    }

                </ul>
            </section>
            <!-- /.sidebar -->
        </aside>


        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">

                <h1>
                    @ViewBag.Title
                    <small></small>
                </h1>

            </section>
            <!-- Main content -->
            <section class="content">
                @RenderBody()
            </section>
        </div>

        <div id="iframeDiv" style="display: none">
            <iframe src="/Home/State" height="0" width="0"></iframe>
        </div>

    </div>

    <script>
        $.widget.bridge('uibutton', $.ui.button);
    </script>

    <script src="~/Content/tledist/js/raphael-min.js"></script>
    <script src="~/Content/tleplugins/morris/morris.min.js"></script>
    <script src="~/Content/tleplugins/sparkline/jquery.sparkline.min.js"></script>
    <script src="~/Content/tleplugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
    <script src="~/Content/tleplugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
    <script src="~/Content/tleplugins/knob/jquery.knob.js"></script>
    <script src="~/Content/tleplugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
    <script src="~/Content/tleplugins/slimScroll/jquery.slimscroll.min.js"></script>
    <script src="~/Content/tleplugins/fastclick/fastclick.js"></script>
    <script src="~/Content/tleplugins/select2/select2.full.js"></script>
    <script src="~/Content/tledist/js/app.min.js"></script>

    <script>
        var url = location.href.toLowerCase();

        var lis = $(".sidebar-menu").find("li");

        var links = $(".treeview-menu").find("a");

        $(links).removeClass("active");

        $(links).each(function (i, v) {
            var u = v.href.toLowerCase();

            if (u != "#" && url.indexOf(u) >= 0) {
                $(lis).removeClass("active");
                $(v).parent().addClass("active");
                $($(v).parent().parent().parent()).addClass("active");
                return;
            }
        });
    </script>
</body>
</html>
