<?php include_once(mvc::$cfg['PATH_TPL'].'public/headBase.php');?>
<script type="text/javascript" src="<?php echo mvc::$cfg['ADMIN_STATIC_URL'];?>js/addr.js?ver=<?php echo mvc::$cfg['VER']['js'];?>"></script>
<link rel="stylesheet" type="text/css" href="<?php echo mvc::$cfg['ADMIN_STATIC_URL'];?>/webuploader/webuploader.css">
<script type="text/javascript" src="<?php echo mvc::$cfg['ADMIN_STATIC_URL'];?>/webuploader/webuploader.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo mvc::$cfg['ADMIN_URL'];?>static/zTree_v3-master/css/zTreeStyle/zTreeStyle.css">
<script type="text/javascript" src="<?php echo mvc::$cfg['ADMIN_URL'];?>static/zTree_v3-master/js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="<?php echo mvc::$cfg['ADMIN_URL'];?>static/zTree_v3-master/js/jquery.ztree.excheck.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo mvc::$cfg['ADMIN_URL'];?>static/css/jquery.autocomplete.css">

<div class="marauto mar10" style="width:1200px;padding-left: 65px">
	<div class="BgMenu"><span>用户基本信息</span></div>
	<table cellspacing="1" cellpadding="3" class="table" id="table-shop-des-detail">
		<tbody>
			<tr>
				<th class="TextRight" width="85px">用户账户：</th>
				<td><?php echo $data['u_name'];?></td>
			</tr>
			<tr>
				<th class="TextRight" width="85px">真实姓名：</th>
				<td><?php echo $data['u_real_name'];?></td>
			</tr>
			<tr>
				<th class="TextRight" width="85px">性别：</th>
				<td><?php if($data['ui_sex']){ echo '男';}else{echo '女';}?></td>
			</tr>
			<tr>
				<th class="TextRight" width="85px">用户昵称：</th>
				<td><?php echo $data['u_nickname'];?></td>
			</tr>
			<tr>
				<th class="TextRight" width="85px">所属公司：</th>
				<td><?php echo $data['ui_company'];?></td>
			</tr>
			<tr>
				<th class="TextRight" width="85px">用户邮箱：</th>
				<td><?php echo $data['u_email'];?></td>
			</tr>
			<tr>
				<th class="TextRight" width="85px">联系电话：</th>
				<td><?php echo $data['u_mobile'];?></td>
			</tr>
			<tr>
				<th class="TextRight"><span helper="010_001"></span>用户地址：</th>
				<td><?php echo $userAddress;?><?php echo $data['ui_address'];?></td>
			</tr>
		</tbody>
	</table>
<div class="BgMenu"><span>店铺相关信息</span></div>
<form id="newShopMsg" action="" method="post" >
<table cellspacing="1" cellpadding="3" class="table" id="table-shop-des-detail">
	<tbody>
		<tr>
			<th class="TextRight" width="85px">店铺名称：</th>
			<td><input type="text" class="form-control" value="<?php echo $data['u_name'];?>" name="data[shopName]"></td>
		</tr>
		<tr>
			<th class="TextRight" width="85px">店铺LOGO：</th>
			<td>
				<img id="tarImg" src="" max-width="92" max-height="92">
				<input type="hidden" id="tarVal" name="data[shopLogo]">
				<span id="uploadLogo">上传</span>
			</td>
		</tr>
		<tr>
			<th class="TextRight" width="85px">营业执照：</th>
			<td>
				<img id="LicenseImg" src="" max-width="92" max-height="92">
				<input type="hidden" id="LicenseVal" name="data[shopLicense]">
				<span id="uploadLicense">上传</span>
			</td>
		</tr>
		<tr>
			<th class="TextRight" width="85px">店铺所在区域：</th>
			<td>
				<span id="province_box"></span>
				<input type="text" class="form-control" id="shopAddress-detail" value="<?php echo $data['ui_address'];?>" name="data[shopAddress]">
			</td>
		</tr>
	</tbody>
</table>
</form>
<button class="btn btn-success submit-new-shop-msg" onclick="submitNewShop();return false;">提交</button>
<script type="text/javascript">
	$(document).ready(function(){
		ADDR.init('province_box', '<?php echo $data['ui_province'];?>','<?php echo $data['ui_city'];?>',0,0);
		var params = {
			pickId: 'uploadLogo',
			tarImg: 'tarImg',
			tarVal: 'tarVal',
			postData: { cate:'shopLogo'}
		};
		UPLOAD.img(params);
		var newparams ={
			pickId: 'uploadLicense',
			tarImg: 'LicenseImg',
			tarVal: 'LicenseVal',
			postData: { cate:'shopLogo'}
		};
		UPLOAD.img(newparams);
	})
	/**
	  * @method 提交新开通店铺信息
	  * @author xu 2017/12/25
	  */
	function submitNewShop(){
		// 地址不能为空
		var address = $("input[name='data[shopAddress]']").val();
        if(!address){MESSAGE.alert('地址不能为空！');return false;}
        MESSAGE.confirm('您确定要为该用户开通店铺吗？','$("#newShopMsg").submit();'); 
	}

</script>
</div>
<div id="mask_layer" style="display: none;"></div>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footBase.php');?>