<?php if (!defined('THINK_PATH')) exit(); $JSARR[]=THEME_PATH."/common/js/open_child_shops.js"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="author" content="HANCHAO"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<?php $csscommon="/Public/bootstrap/css/bootstrap.min.css" ?>
<?php $csscommon.="|/Public/HanChaoUI/css/hanchaoui.css" ?>
<?php $CSSARR[]=THEME_PATH."/common/css/main.css" ?>
<?php $CSSARR[]="/Public/HanChaoUI/css/weebox.css" ?>
<link rel="stylesheet" href="<?php echo min_css($CSSARR,$csscommon);?>" media="all"/>
<?php $jscommon="/Public/script/jquery.min.js" ?>
<?php $jscommon.="|/Public/bootstrap/js/bootstrap.min.js" ?>
<?php $JSARR['min2']=THEME_PATH."/common/js/common.js" ?>
<?php $JSARR['min3']="/Public/HanChaoUI/js/weebox.js" ?>
<script language="javascript">var URL = '/admin.php?s=/shop/';var THEME_COLOR = '';var ROOT_PATH = '/';var APP   =   '/admin.php?s=/';var CONTROLLER_NAME   =   '<?php echo (CONTROLLER_NAME); ?>';var THEME_PATH   =   '<?php echo (TPL_PATH); ?>/';</script>
<script type="text/javascript" src="<?php echo min_js($JSARR,$jscommon);?>"></script><!--[if IE]>
<link href="/Public/bootstrap/css/bootstrap.ie.css" rel="stylesheet" type="text/css"/>
 <script src="/Public/bootstrap/js/html5shiv.js"></script>
<![endif]-->
<script language="javascript">
$(function($){
    $(window.parent.document).find('#loading').hide();
    var topid='<?php echo ($_GET['topid']); ?>';
    var leftid='<?php echo ($_GET['leftid']); ?>';
    changemenu(topid,leftid);
});
function changemenu(topid,leftid){
    if(!topid && !leftid)return false;
    if(topid)parent._OPENleft(topid);
    if(leftid){
        $(window.parent.document).find('#_OPENright'+leftid).parent().prev().click();
        $(window.parent.document).find('#_OPENright'+leftid+' a').click();
    }
}
</script>
<title><?php echo (L("website_manage")); ?>Powered by hanchao</title>
</head>
<body><?php if(!empty($big_menu)): ?><div class="pad-lr-10 col-sm-12">
    <div class="btn-handle mt15">
   <?php if(is_array($big_menu)): foreach($big_menu as $k=>$vo): ?><a class="btn <?php if(!empty($menu_hover)): if(in_array(($k), is_array($menu_hover)?$menu_hover:explode(',',$menu_hover))): ?>btn-primary<?php else: ?>btn-default<?php endif; ?>                
   <?php else: ?>btn-primary<?php endif; ?>" href="<?php echo (isset($vo)?$vo:''); ?>"><?php echo (isset($k)?$k:''); ?></a>&nbsp;&nbsp;<?php endforeach; endif; ?>
    </div>
</div><?php endif; ?>
<script type="text/javascript" src="/Public/script/MyDate/WdatePicker.js"></script><script type="text/javascript" src="/Application/Runtime/statics/98dab2433c1c18e29abb76eebf0a9b55.js"></script>
<div class="pad-lr-10 w_auto col-sm-12">
    <div class="col-lg-12">
        <div class="mt15">
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active">
                    <a href="<?php echo U('Shops/index');?>">仓库列表</a>
                </li>
                <!-- <li role="presentation">
                    <a href="<?php echo U('Shops/option');?>">基础设置</a>
                </li> -->
            </ul>
            <div class="cont_hanchao pd15 tab-content" id="myTabContent">
				<div class="prompt_div bg-info" id="explanation">
					<p class="text-primary" id="checkZoom" ><i class="glyphicon glyphicon-bell mr5"></i>温馨提示<span id="explanationZoom" title="收起提示"></span></p>
					<ul>
						<li><i>·</i>通过仓库管理，可对仓库进行添加、修改、删除等操作。</li>
						<li><i>·</i>仓库编辑功能可对仓库的基本信息，仓库的动态进行修改删除的操作。</li>
						<li><i>·</i>你可以根据条件搜索仓库，然后选择相应的操作。</li>
					</ul>
				</div>
				<form name="searchform" id="searchform" action="/admin.php?s=/shop/index" method="post" >
					<div class="toolbars-hanchao mt15 clearfix">
						<div>
							仓库：
							<input name="keyword" type="text" class="form-control width1" placeholder="<?php echo L('ID');?>/仓库<?php echo L('NAME');?>" size="25" value="<?php echo I('keyword');?>" />
						</div>
						<div><?php echo L('REG_TIME');?> ： 
							<input class="Wdate form-control w180" name="data_from" type="text" id="data_from" size="20" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{ $dp.$D(\'data_to\')}'})" value="<?php echo (isset($data_from)?$data_from:''); ?>" />
							 - 
							<input class="Wdate form-control w180" name="data_to" type="text" id="data_to" size="20" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{ $dp.$D(\'data_from\')}'})" value="<?php echo (isset($data_to)?$data_to:''); ?>" />
						</div>
                     <!--    <div>
							<span class="f_l" style="line-height:34px;">类型：</span>
                            <select id="shop_type" class="form-control" name="shop_type" ><option value="" >请选择</option><?php if(!empty($shop_options)){ $selectdvalue=0;foreach($shop_options as $key=>$val) { if(empty($shop_type) && !is_numeric($shop_type))$shop_type=array();$shop_typearr=remove_empty_array($shop_type);if(in_array($key,$shop_typearr)) { ?><option selected="selected" value="<?php echo $key ?>"><?php echo $val;$selectdvalue=1; ?></option><?php }else { ?><option value="<?php echo $key ?>"><?php echo $val ?></option><?php } } } ?></select>
						</div> -->
						<div>
							<span class="f_l" style="line-height:34px;"><?php echo L('SHOP_ADDRESS');?>：</span>
							<span id="arealinkage_val"><select class="area_linkage form-control f_l cls_province" name="province" id="province" data-first-title="请选择省" datatype="*"></select><select class="area_linkage form-control f_l cls_city_id" name="city_id" id="city_id" data-first-title="请选择市"></select><select class="area_linkage form-control f_l cls_district" name="district" id="district" data-first-title="请选择区县"></select><script type="text/javascript" src="/Public/data/areadata.json"></script></span><script type="text/javascript">$(function(){ $.cxSelect.defaults.url = '/Public/data/areadata.json';$('#arealinkage_val').cxSelect({selects: ['cls_province','cls_city_id','cls_district'],dataValues: [<?php echo (isset($postion)?$postion:''); ?>],valueInput: '',emptyStyle: 'none'});});</script>
						</div>
						<div><button type="submit" class="btn btn-primary">搜索</button></div>
						<!--<div><a href="<?php echo U('add');?>" class="btn btn-primary"><?php echo L('ADD');?>仓库</a></div>-->
                        <!-- <div><a href="<?php echo U('first_index');?>" class="btn btn-primary">首页</a></div>
						<div><a href="<?php echo U('first_add');?>" class="btn btn-primary">首次添加</a></div>
						<div><a href="<?php echo U('binding_num');?>" class="btn btn-primary">绑定公众号</a></div> -->
					</div>
				</form>
				<form id="myform" name="myform" action="<?php echo U('edit_option');?>" method="post">
					<table class="table table-hover table-striped table-hanchao mt15 table-bordered">
						<thead>
						<tr>
							<th width="60"><?php echo orderurl('ID','id');;?></th><!--glyphicon glyphicon-open升序-->
							<th width="120"><?php echo orderurl('仓库名称','name');;?></th>
							<!-- <th width="120"><?php echo orderurl('余额','total_revenues');;?></th>
							<th width="120"><?php echo orderurl('积分','total_point');;?></th> -->
							<th width="120"><?php echo orderurl('LAN_CONTACT_NAME','contacts');;?></th>
							<!-- <th width="120"><?php echo orderurl('登录账号','login_name');;?></th> -->
							<th width="120"><?php echo orderurl('LAN_CONTACT_PHONE','phone');;?></th>
							<th width="260"><?php echo orderurl('LAN_SHOP_ADDRESS','address');;?></th>
							<th width="160"><?php echo orderurl('LAN_UPDATE_TIME','updatetime');;?></th>
							<!-- <th width="60"><?php echo orderurl('LAN_TYPE','shop_type');;?></th> -->
							<th width="60"><?php echo orderurl('LAN_STATUS','status');;?></th>
							<th width="180"><?php echo (L("MANAGE")); ?></th>
						</tr>
						</thead>
						<tbody>
						<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><td><?php echo (isset($val["id"])?$val["id"]:''); ?></td>
							<td><a href="<?php echo U('edit',array('id'=>$val['id']));?>"><?php echo (isset($val["name"])?$val["name"]:''); ?></a></td>
							<!-- <td><a href="<?php echo geturl('ShopbalanceLog/index',array('shop_id'=>$val['id'],'type'=>1));?>"><?php echo (isset($val["total_revenues"])?$val["total_revenues"]:''); ?></a></td>
							<td><a href="<?php echo geturl('ShopbalanceLog/index',array('shop_id'=>$val['id'],'type'=>7));?>"><?php echo (isset($val["total_point"])?$val["total_point"]:''); ?></a></td> -->
							<td><?php echo (isset($val["contacts"])?$val["contacts"]:''); ?></td>
							<!-- <td><?php echo (isset($val["login_name"])?$val["login_name"]:''); ?></td> -->
							<td><?php echo (isset($val["phone"])?$val["phone"]:''); ?></td>
							<td><?php echo (isset($val["address"])?$val["address"]:''); ?></td>
							<td><?php echo (time_format($val["updatetime"])); ?></td>
							<!-- <td><?php echo (isset($shop_options[$val['shop_type']])?$shop_options[$val['shop_type']]:''); ?></td> -->
							<td onclick="status(<?php echo (isset($val["id"])?$val["id"]:''); ?>,'status')" id="status_<?php echo (isset($val["id"])?$val["id"]:''); ?>"><img src="/Public/images/status_<?php echo (isset($val["status"])?$val["status"]:''); ?>.gif" /></td>
							<td>
								<!-- <a href="<?php echo U('ShopbalanceLog/index',array('id'=>$val['id']));?>">营业数据</a>
								<a href="<?php echo U('ShopsGoods/index',array('id'=>$val['id']));?>"><?php echo (L("STOCK")); ?></a>-->
								<!-- <a href="javascript:;" onclick="$.openUrl('<?php echo U('ShopbalanceLog/add',array('shop_id'=>$val['id']));?>','<?php echo L('ACCOUNT_CHANGE');?>');"><?php echo L('ACCOUNT_CHANGE');?></a> -->
								<a href="<?php echo U('edit',array('id'=>$val['id']));?>"><?php echo (L("EDIT")); ?></a>
								<?php if(($val['id']) != "1"): ?><a href="javascript:;" onclick="$.showConfirm('<?php echo (L("SURE_DELETE")); ?>',function(){window.location.href='<?php echo U('delete',array('id'=>$val['id'],'poi_id'=>$val['poi_id']));?>'},'hc')"><?php echo (L("DELETE")); ?></a><?php endif; ?>		
							</td>
							</tr><?php endforeach; endif; else: echo "" ;endif; ?>
						<tr>
						</tbody>
					</table>
					<nav class="pages_hanchao"><?php echo (isset($_page)?$_page:''); ?></nav>
				</form>
			</div>
		</div>
    </div>
</div>
</body>
<script>
	function bus_status(id, type) {
		$.get(APP+"Shops/bus_status.html", {
			id: id,
			type: type
		}, function(jsondata) {
			var return_data = eval("(" + jsondata + ")");
			$("#is_business_" + id + " img").attr('src', THEME_PATH + 'common/images/status_' + return_data + '.gif');
		});
	}
</script>
</html>