<!DOCTYPE html>
<html>
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>收货地址 - 个人中心</title>
    <meta content="app-id=518966501" name="apple-itunes-app" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no, maximum-scale=1.0" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <link href="{G_TEMPLATES_CSS}/mobile/comm.css" rel="stylesheet" type="text/css" />
	<link href="{G_TEMPLATES_CSS}/mobile/login.css" rel="stylesheet" type="text/css" />
	<script src="{G_TEMPLATES_JS}/mobile/jquery190.js" language="javascript" type="text/javascript"></script>
	<script id="pageJS" data="{G_TEMPLATES_JS}/mobile/Login.js" language="javascript" type="text/javascript"></script>
	
	<script type="text/javascript" src="/statics/plugin/style/global/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/statics/templates/yunwei/js/jquery.cookie.js"></script>
	
	
</head>
<body>



<!-- 内页顶部 -->
<header class="g-header">
        <div class="head-l">
	        <a href="javascript:;" onClick="history.go(-1)" class="h-count white"><s></s><b></b></a>
        </div>
        <h2>设置收货地址</h2>
        <div class="head-r">
	        <a href="{WEB_PATH}/mobile/mobile" class="z-Home"></a>
        </div>
    </header>




<style>
.box-style {
	background:#FFF;
	text-align:left;
	border-radius:5px;
	border:1px solid #CCC;
	margin:13px;
	padding:8px 7px;
	box-shadow:2px 2px 4px #ededed;
	-moz-box-shadow:2px 2px 2px #ededed;
	-webkit-box-shadow:2px 2px 4px #ededed
}
.box-style h2 {
	color:#333;
	font-size:16px;
	padding:0 5px 6px
}
.icon-fonts {
	font-family:Test;
	margin-right:.4em;
	text-align:center;
	opacity:.7;
	line-height:1em;
	font-size:19px
}
.box-style>div {
	padding:8px 0px;
	border-top:solid 1px #F2F2F2;
}
.search-submit, .formbutton {
	width:60px;
	background:#fff;
	border: 1px solid #C3C2C0;
	border-radius:2px;
	height:37px;
	-webkit-appearance: none;
	cursor:pointer;
}
.formbutton {
	width: 100%;
	margin:0px 0px;
	border:1px solid #2DB8AD;
	background:#2DB8AD;
	color: white;
	font-size: 18px;
	height: 40px;
}
.formbutton:hover {
	background:#009689;
}
h2 {
display: block;
font-size: 1.5em;

-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
font-weight: bold;
}
.com_adr {
	overflow: hidden;
	padding: 0px 10px;
}
.com_adr .price {
	color: #2DB8AD;
	font: bold 14px/21px '微软雅黑';
	width: 80px;
}
.com_adr li {
	border-top: solid 1px #F2F2F2;
	vertical-align: top;
	font: 14px/38px '宋体';
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
	color:#000;
	padding:5px 0;
}
.com_adr .money {
	display: inline-block;
	cursor: pointer;
	float:right;
}
.inputsearch {
width: 100%;
border: 1px solid #C3C2C0;
background: #fff;
height: 40px;
padding: 2px 10px;
display: inline-block;
outline: none;
-webkit-appearance: none;
border-radius: 5px;
-webkit-box-shadow: 2px 2px 4px #DBDADA inset;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}

select, button, input, textarea {
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-style: normal;
}
select {
width: 32%;
height: 30px;
}
.com_adr {
overflow: hidden;
padding: 0px 10px;
}
.com_adr li {
border-top: solid 1px #F2F2F2;
vertical-align: top;
font: 14px/38px '宋体';
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: #000;
padding: 5px 0;
}
margin: 0;
padding: 0;
element.style {
}
.com_adr li {
border-top: solid 1px #F2F2F2;
vertical-align: top;
font: 14px/38px '宋体';
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: #000;
padding: 5px 0;
}
* {
margin: 0;
padding: 0;
}
user agent stylesheetli {
display: list-item;
text-align: -webkit-match-parent;
}
Inherited from ul.com_adr
ul, ol {
list-style: none;
}
</style>


{wc:loop $member_dizhi $v}
<div class="box-style">
  <h2><span class="icon-fonts">V</span>配送信息</h2>
  <ul class="com_adr">
    <li>收件人：{wc:$v['shouhuoren']}</li>
    <li>电　话：{wc:$v['mobile']}</li>
    <li>地　区：{wc:$v['sheng']},{wc:$v['shi']},{wc:$v['xian']}</li>
    <li>街　道：{wc:$v['jiedao']}</li>
    <li>邮　编：{wc:$v['youbian']}</li>
	
	{wc:if $v['default']=='Y'}
	
    <li style="padding: 10px 10px 0px 10px;">
	<a href="javascript:;"  onclick="update({wc:$v['id']})"id="update{wc:$v['id']}"><input type="button" class="search-submit formbutton" style="width:47%;float:left;" value="编辑配送地址"> </a>
	<input type="button" class="search-submit formbutton" style="width:47%;float:right;" value="此为默认地址">
</li>
	  {wc:else}
	
	   <li style="padding: 10px 10px 0px 10px;">
	<a  href="javascript:;"   onclick="update({wc:$v['id']})"><input type="button" class="search-submit formbutton" style="width:47%;float:left;" value="编辑配送地址"> </a>
	<a onClick="dell({wc:$v['id']})"  href="javascript:;" ><input type="button" class="search-submit formbutton" style="width:47%;float:right;" value="删除"></a>
</li>
	
	{wc:if:end}	
	  
	  
  </ul>
</div>

{wc:loop:end}






<div id="div_consignee2" class="box-style" style="display:none;">
<script>var s3=["province3","city3","county3"];</script>	
<form id="registerform3" class="registerform" method="post" >

  <h2><span class="icon-fonts">V</span>配送信息</h2>
  <ul class="com_adr">
    <li><span ><div style="float: left;">收件人：</div><div style="margin-left: 56px;"><input placeholder="填写收件人姓名" id="shr2" name="shouhuoren" type="text" class="inputsearch"></div></span></li>
    <li><span ><div style="float: left;">手  机：</div><div style="margin-left: 56px;"><input placeholder="填写收件人电话" id="mob2" name="mobile" type="text" class="inputsearch"></div></span></li>
    <li><span ><div style="float: left;">地　区：</div><div style="margin-left: 56px;">
    <select id="province3" name="sheng" style=" border: 1px #ccc solid;" class="validate[required]"><option value="">请选择</option></select>
    <select  id="city3" name="shi" style=" border: 1px #ccc solid;" class="validate[required]"><option value="">请选择</option></select>
    <select id="county3" name="xian" style=" border: 1px #ccc solid;" class=""><option value="">请选择</option></select></div></span></li>

    <li><span ><div style="float: left;">街　道：</div><div style="margin-left: 56px;"><input placeholder="填写收件人具体位置" id="dizh2" name="jiedao" type="text" class="inputsearch"></div></span></li>
    <li><span><div style="float: left;">邮　编：</div><div style="margin-left: 56px;"><input placeholder="填写所在地6位数邮编" id="yb2" name="youbian" type="text" class="inputsearch"></div></span></li>
	 <li><span><div style="float: left;">Q   Q：</div><div style="margin-left: 56px;"><input placeholder="填写您的QQ号" id="qq2" name="qq" type="text" class="inputsearch"></div></span></li>
	 <li style="padding: 10px 10px 0px 10px;"><input id="address_submit_button" style="width:47%;float:left;" id="btn_consignee_save"  class="search-submit formbutton" type="submit" name="submit" value=" 保存 ">
	<input style="width:47%;float:right;" onClick="document.getElementById('address_new').style.display='none'"  class="search-submit formbutton" type="button" value=" 取消 ">
	</li>
    <font id="address_submit_result"></font>
  </ul>
</form>
</div>












	




<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_STYLE}/css/layout-setUp.css"/>
<script type="text/javascript" src="{G_TEMPLATES_STYLE}/js/area.js"></script>
<script type="text/javascript">
$(function(){		
	var demo=$(".registerform").Validform({
		tiptype:2,
		datatype:{
			"tel":/^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/,
		},
	});	
	demo.tipmsg.w["tel"]="请正确输入电话号码(区号、号码必填，用“-”隔开)";
	demo.addRule([
	{
		ele:"#txt_ship_tel",
		datatype:"tel",
	}]);
});
$(function(){
	$("#btnAddnewAddr").click(function(){
		$("#div_consignee").show();
		$("#btnAddnewAddr").hide();
	});
	$("#btn_consignee_cancle").click(function(){
		$("#div_consignee").hide();
		$("#btnAddnewAddr").show();
	});
});
$(function(){
	$(".xiugai").click(function(){
		$("#btnAddnewAddr").hide();
		$("#div_consignee").hide();
	});
	$("#btn_consignee_cancle2").click(function(){
		$("#div_consignee2").hide();
		$("#btnAddnewAddr").show();
	});
});
function update(id){	
	$("#div_consignee2").show;
	setup3();
	$("#registerform3").attr("action","{WEB_PATH}/mobile/home/updateddress/"+id);
	var str=$("#dizh_"+id).html();
	var spl=str.split(",");
	$("#province3").append('<option selected value="'+spl[0]+'">'+spl[0]+'</option>');
	$("#city3").append('<option selected value="'+spl[1]+'">'+spl[1]+'</option>');
	$("#county3").append('<option selected value="'+spl[1]+'">'+spl[1]+'</option>');
	$("#dizh2").val(spl[3]);
	$("#mob2").val($("#mob_"+id).html());
	$("#qq2").val($("#listqq_"+id).html());
	$("#yb2").val($("#yb_"+id).html());
	$("#shr2").val($("#shr_"+id).html());
	$("#div_consignee2").show();	
};
function dell(id){
	if (confirm("您确认要删除该条信息吗？")){
		window.location.href="{WEB_PATH}/mobile/home/deladdress/"+id;
	}
}


</script>  
<!-- 栏目页面顶部 -->




<div class="add"><input id="btnAddnewAddr" type="button" class="nextBtn orgBtn1" value="新增收货地址" style="display: block; background-color: cadetblue;"></div>







{wc:if $count<=5}
<div id="div_consignee" class="box-style" style="display:none;">
<script>var s2=["province2","city2","county2"];</script>
<form class="registerform" method="post" action="{WEB_PATH}/mobile/home/useraddress">

  <h2><span class="icon-fonts">V</span>配送信息</h2>
  <ul class="com_adr">
    <li><span ><div style="float: left;">收件人：</div><div style="margin-left: 56px;"><input placeholder="填写收件人姓名"  name="shouhuoren" type="text" class="inputsearch"></div></span></li>
    <li><span ><div style="float: left;">手  机：</div><div style="margin-left: 56px;"><input placeholder="填写收件人电话"  name="mobile" type="text" class="inputsearch"></div></span></li>
    <li><span ><div style="float: left;">地　区：</div><div style="margin-left: 56px;">
    <select id="province2" name="sheng" style=" border: 1px #ccc solid;" class="validate[required]"><option value="">请选择</option></select>
    <select  id="city2" name="shi" style=" border: 1px #ccc solid;" class="validate[required]"><option value="">请选择</option></select>
    <select id="county2" name="xian" style=" border: 1px #ccc solid;" class=""><option value="">请选择</option></select></div></span></li>
	<script type="text/javascript">setup2()</script>
    <li><span ><div style="float: left;">街　道：</div><div style="margin-left: 56px;"><input placeholder="填写收件人具体位置" name="jiedao" type="text" class="inputsearch"></div></span></li>
    <li><span><div style="float: left;">邮　编：</div><div style="margin-left: 56px;"><input placeholder="填写所在地6位数邮编"  name="youbian" type="text" class="inputsearch"></div></span></li>
	 <li><span><div style="float: left;">Q   Q：</div><div style="margin-left: 56px;"><input placeholder="填写您的QQ号"  name="qq" type="text" class="inputsearch"></div></span></li>
	
	
    <li style="padding: 10px 10px 0px 10px;"><input id="address_submit_button" style="width:47%;float:left;" id="btn_consignee_save"  class="search-submit formbutton" type="submit" name="submit" value=" 保存 ">
	<input style="width:47%;float:right;" onClick="document.getElementById('address_new').style.display='none'"  class="search-submit formbutton" type="button" value=" 取消 ">
	</li>
    <font id="address_submit_result"></font>
  </ul>
</form>
</div>

	{wc:if:end}

{wc:if $count==0}
	
	<div class="box-style" >

<form class="registerform" method="post" action="{wc:WEB_PATH}/mobile/home/useraddress">
<script>var s=["province","city","county"];</script>
  <h2><span class="icon-fonts">V</span>配送信息</h2>
  <ul class="com_adr">
    <li><span ><div style="float: left;">收件人：</div><div style="margin-left: 56px;"><input placeholder="填写收件人姓名"  name="shouhuoren" type="text" class="inputsearch"></div></span></li>
    <li><span ><div style="float: left;">手  机：</div><div style="margin-left: 56px;"><input placeholder="填写收件人电话"  name="mobile" type="text" class="inputsearch"></div></span></li>
    <li><span ><div style="float: left;">地　区：</div><div style="margin-left: 56px;">
    <select id="province" name="sheng" style=" border: 1px #ccc solid;" class="validate[required]"><option value="">请选择</option></select>
    <select  id="city" name="shi" style=" border: 1px #ccc solid;" class="validate[required]"><option value="">请选择</option></select>
    <select id="county" name="xian" style=" border: 1px #ccc solid;" class=""><option value="">请选择</option></select></div></span></li>
	<script type="text/javascript">setup()</script>
	
    <li><span ><div style="float: left;">街　道：</div><div style="margin-left: 56px;"><input placeholder="填写收件人具体位置" name="jiedao" type="text" class="inputsearch"></div></span></li>
    <li><span><div style="float: left;">邮　编：</div><div style="margin-left: 56px;"><input placeholder="填写所在地6位数邮编"  name="youbian" type="text" class="inputsearch"></div></span></li>
	 <li><span><div style="float: left;">Q   Q：</div><div style="margin-left: 56px;"><input placeholder="填写您的QQ号"  name="qq" type="text" class="inputsearch"></div></span></li>
	
	
    <li style="padding: 10px 10px 0px 10px;"><input id="address_submit_button" style="width:47%;float:left;"  id="btn_consignee_save"  class="search-submit formbutton" type="submit" name="submit" value=" 保存 ">
	<input style="width:47%;float:right;" onClick="document.getElementById('address_new').style.display='none'"  class="search-submit formbutton" type="button" value=" 取消 ">
	</li>
    <font id="address_submit_result"></font>
  </ul>
</form>
</div>
	
	{wc:if:end}


	
	
	
	{wc:if $count>0}
	<div id="addressListDiv" class="list-tab detailAddress gray01"  style="display:none;">
					{wc:templates "member","shezhi"}
		{wc:loop $member_dizhi $v}
		<ul class="liBg">
			<li id="dizh_{wc:$v['id']}" class="pad">{wc:$v['sheng']},{wc:$v['shi']},{wc:$v['xian']},{wc:$v['jiedao']}</li>
			<li id="yb_{wc:$v['id']}" class="wid55">{wc:$v['youbian']}</li>
			<li id="shr_{wc:$v['id']}" class="wid70">{wc:$v['shouhuoren']}</li>
			<li id="mob_{wc:$v['id']}" class="wid110">{wc:$v['mobile']}</li>
			<li class="wid70" id="listqq_{wc:$v['id']}">{wc:$v['qq']}</li>
		</ul>
		{wc:loop:end}
	</div>

	{wc:if:end}
	
</div>
</body>
</html>

{wc:templates "mobile/index","footer"}