You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
183 lines
7.2 KiB
PHP
183 lines
7.2 KiB
PHP
<?php
|
|
$rt = str_replace('ruby/', '', trim(CommonTool::escapeParams($_GET, ['route'])['route'], '/'));
|
|
$menuMap = array (
|
|
array(
|
|
'groupName' => '采购发货',
|
|
'icon' => 'fa fa-shopping-cart',
|
|
'url' => Zc::url(RubyRouteConst::orderStockUpIndex),
|
|
'open' => false,
|
|
'childs' => array(
|
|
array(
|
|
'name' => '一键下单',
|
|
'url' => Zc::url(RubyRouteConst::orderStockUpIndex, array('purchaseOrderTab' => 'wait_purchase')),
|
|
'icon' => 'fa fa-shopping-cart',
|
|
'selectedRoute' => array(
|
|
RubyRouteConst::orderStockUpIndex,
|
|
),
|
|
'extKey' => 'purchaseOrderTab',
|
|
'extValue' => 'wait_purchase',
|
|
),
|
|
array(
|
|
'name' => '一键发货',
|
|
'url' => Zc::url(RubyRouteConst::orderStockUpIndex, array('purchaseOrderTab' => 'wait_send')),
|
|
'icon' => 'fa fa-shopping-cart',
|
|
'selectedRoute' => array(
|
|
RubyRouteConst::orderStockUpIndex,
|
|
),
|
|
'extKey' => 'purchaseOrderTab',
|
|
'extValue' => 'wait_send',
|
|
),
|
|
array(
|
|
'name' => '商品货源管理',
|
|
'url' => Zc::url(RubyRouteConst::orderGoodsSourceIndex),
|
|
'icon' => 'fa fa-shopping-cart',
|
|
'selectedRoute' => array(
|
|
RubyRouteConst::orderGoodsSourceIndex,
|
|
),
|
|
),
|
|
)
|
|
),
|
|
array(
|
|
'groupName' => '店铺管理',
|
|
'icon' => 'fa fa-users',
|
|
'url' => Zc::url(RubyRouteConst::userUserMallIndex),
|
|
'open' => false,
|
|
'childs' => array(
|
|
array(
|
|
'name' => '授权店铺',
|
|
'url' => Zc::url(RubyRouteConst::userUserMallIndex),
|
|
'icon' => 'fa fa-users',
|
|
'selectedRoute' => array(
|
|
RubyRouteConst::userUserMallIndex,
|
|
),
|
|
),
|
|
)
|
|
),
|
|
array(
|
|
'groupName' => '采购账号',
|
|
'icon' => 'fa fa-archive',
|
|
'url' => Zc::url(RubyRouteConst::userPurchaseAccountIndex),
|
|
'open' => false,
|
|
'childs' => array(
|
|
array(
|
|
'name' => '采购账号管理',
|
|
'url' => Zc::url(RubyRouteConst::userPurchaseAccountIndex),
|
|
'icon' => 'fa fa-archive',
|
|
'selectedRoute' => array(
|
|
RubyRouteConst::userPurchaseAccountIndex
|
|
),
|
|
),
|
|
)
|
|
),
|
|
array(
|
|
'groupName' => '第三方包裹',
|
|
'icon' => 'fa fa-shopping-bag',
|
|
'url' => Zc::url(RubyRouteConst::userThirdPackageIndex),
|
|
'open' => false,
|
|
'childs' => array(
|
|
array(
|
|
'name' => '空包网',
|
|
'url' => Zc::url(RubyRouteConst::userThirdPackageIndex),
|
|
'icon' => 'fa fa-shopping-bag',
|
|
'selectedRoute' => array(
|
|
RubyRouteConst::userThirdPackageIndex,
|
|
),
|
|
),
|
|
)
|
|
),
|
|
);
|
|
|
|
if (AppConst::isRubyWeb()) {
|
|
$menuMap = array (
|
|
array(
|
|
'groupName' => '订单处理',
|
|
'icon' => 'fa fa-shopping-cart menu-icon',
|
|
'url' => Zc::url(RubyRouteConst::orderStockUpIndex),
|
|
'selectedRoute' => array(
|
|
RubyRouteConst::orderStockUpIndex,
|
|
),
|
|
),
|
|
array(
|
|
'groupName' => '批量发货',
|
|
'url' => Zc::url(RubyRouteConst::orderOrderBatchLogisticsSend),
|
|
'icon' => 'fa fa-paper-plane-o menu-icon',
|
|
'selectedRoute' => array(
|
|
RubyRouteConst::orderOrderBatchLogisticsSend,
|
|
),
|
|
),
|
|
array(
|
|
'groupName' => '售后订单',
|
|
'url' => Zc::url(RubyRouteConst::orderAfterSalesIndex),
|
|
'icon' => 'fa fa-exclamation-triangle menu-icon',
|
|
'selectedRoute' => array(
|
|
RubyRouteConst::orderAfterSalesIndex,
|
|
),
|
|
),
|
|
array(
|
|
'groupName' => '账单统计',
|
|
'url' => Zc::url(RubyRouteConst::billOrderIndex),
|
|
'icon' => 'fa fa-check menu-icon',
|
|
'selectedRoute' => array(
|
|
RubyRouteConst::billOrderIndex,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
?>
|
|
<div class="sidebar-menu-box pos-a">
|
|
<ul class="nav sidebar-menu sidebar-lg">
|
|
<?php foreach ($menuMap as $menuGroup){?>
|
|
<?php
|
|
$active = false;
|
|
foreach ($menuGroup['childs'] as $m){
|
|
if(in_array($rt, $m['selectedRoute'])){
|
|
$active = true;
|
|
break;
|
|
}
|
|
}
|
|
|
|
$active = $active || in_array($rt, $menuGroup['selectedRoute']) || $menuGroup['open'];
|
|
?>
|
|
<?php if($menuGroup['childs']){?>
|
|
<li class="<?php echo $active ? 'open' : '';?>" <?php echo $menuGroup['id'] ? ' id="' . $menuGroup['id'] . '"' : '';?>>
|
|
<a href="#" class="menu-dropdown"><i class="fa <?php echo $menuGroup['icon']?> menu-icon"></i><span class="menu-text"><?php echo $menuGroup['groupName']?> </span><i class="menu-expand hidden"></i></a>
|
|
<ul class="submenu">
|
|
<?php foreach ($menuGroup['childs'] as $menu){?>
|
|
<?php $ext = empty($menu['extKey']) || ($_GET[$menu['extKey']] === $menu['extValue']);?>
|
|
<li class="<?php echo (in_array($rt, $menu['selectedRoute']) && $ext) ? 'active' : '';?>"><a href="<?php echo $menu['url'];?>"><span class="menu-text"><?php echo $menu['name']?></span></a>
|
|
<?php if($menu['hot']){?>
|
|
<span style="position:absolute;right:10px; top:5px;"><img src="<?php echo HtmlTool::getStaticFile('hot.gif');?>" style="width:28px;"></span>
|
|
<?php }?>
|
|
|
|
<?php if ($menu['sideTabs']) {?>
|
|
<?php
|
|
$sideTabsTitle = $menu['sideTabs']['title'];
|
|
$sideTabsItems = $menu['sideTabs']['items'];
|
|
?>
|
|
<div class="side-tabs">
|
|
<div class="widget-body" style="height: 100%;background-color: whitesmoke;">
|
|
<div class="side-tabs-title"><?php echo $sideTabsTitle;?></div>
|
|
<?php foreach ($sideTabsItems as $sideTabsItem) {?>
|
|
<div><a class="side-tabs-item" href="<?php echo $sideTabsItem['url'];?>"><?php echo $sideTabsItem['name'];?></a></div>
|
|
<?php }?>
|
|
</div>
|
|
</div>
|
|
<?php }?>
|
|
</li>
|
|
<?php }?>
|
|
</ul>
|
|
</li>
|
|
<?php } else {?>
|
|
<li class="<?php echo $active ? 'active' : '';?>" <?php echo $menuGroup['id'] ? ' id="' . $menuGroup['id'] . '"' : '';?>>
|
|
<a href="<?php echo $menuGroup['url'];?>"><i class="fa <?php echo $menuGroup['icon']?> menu-icon"></i><span class="menu-text"><?php echo $menuGroup['groupName']?> </span>
|
|
<?php if ($menuGroup['hot']) { ?>
|
|
<img src="<?php echo HtmlTool::getStaticFile('hot.gif'); ?>" />
|
|
<?php } ?>
|
|
</a>
|
|
</li>
|
|
<?php }?>
|
|
<?php }?>
|
|
</ul>
|
|
</div>
|
|
|