<!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 content="zh-cn" http-equiv="Content-Language" />
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
		<meta name="renderer" content="webkit"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,  user-scalable=no"/>
		<title>{%$lngpack.sitename%}</title>
		<meta name="keywords" content="{%$lngpack.keyword%}" />
		<meta name="description" content="{%$lngpack.description%}" />
		<link rel="icon" type="image/png" href="{%$icon_16%}" sizes="16x16"/>
		<link rel="icon" type="image/png" href="{%$icon_32%}" sizes="32x32"/>
		<link rel="icon" type="image/png" href="{%$icon_64%}" sizes="64x64"/>
		<link href="{%$rootpath%}css/bootstrap.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/espcmsp8_font.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/swiper.min.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/espcmsp8_all.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/espcms_p8_public.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/jquery.min.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/bootstrap.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/swiper.min.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_base.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_formvalidation.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_dialog.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/citydb.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/cityselect.js"></script>
	</head>

	<body>
		{%link file="public/head.html"%}
		<section class="bann_container">
			<div class="container page_bann_title">
				<h2>在线询盘</h2>
			</div>
		</section>

		<section class="container espcms_page_book">
			{%if $out=='enquiry_edit'%}
				<script type="text/javascript">
					$(function () {
						{%if $member_con.MEMBER_CITY_VERIFY==1%}
						$("#city_select").citySelect({
							prov: "{%if $member.province%}{%$member.province%}{%else%}北京{%/if%}",
							city: "{%$member.city%}",
							dist: "{%$member.district%}",
							nodata: "none"
						});
						{%/if%}
						$("#enquiry_list").espcms_formvalidation({display_icon_err: false});
						load_tabclick('.tab_click');
						enquiry_del();
						enquiry_amount_select();
					});
				</script>
				<form name="enquiry_list" method="post" id="enquiry_list" class="form-horizontal admin-form" action="{%$enquiry_link.save%}">
					<input type="hidden" name="tokenname" value="{%$tokenkey.token_name%}"/>
					<input type="hidden" name="tokenkey" value="{%$tokenkey.token_key%}"/>
					<input type="hidden" name="userid" id="userid" value="{%$member.userid%}"/>
					<input type="hidden" name="enquiry_del_url" id="enquiry_del_url" value="{%$enquiry_link.del%}"/>
					<div class="section-divider mb40"><span>需求信息</span></div>
					<div class="form-group">
						<div class="col-sm-12">
							<table class="table table-striped table-bordered tc">
								<thead class="contrast_th">
									<tr class="info">
										<th class="tc">删除</th>
										<th class="tc">需求产品</th>
										<th class="tc">编号</th>
										<th class="tc">数量</th>
									</tr>
								</thead>
								<tbody class="contrast_td">
									{%forlist from=$array key=i%}
									<tr>
										<td class="tc order_button"><i class="glyphicons glyphicons-bin delete_item" data-id="{%$array[i].did%}"></i></td>
										<td class="tc">
											<input type="hidden" name="products_id[]" class="products_id" data-tid="{%$array[i].tid%}" value="{%$array[i].did%}"/>
											<input type="hidden" name="products_tid[]" class="products_tid" value="{%$array[i].tid%}"/>
											<input type="hidden" name="products_name[]" value="{%$array[i].title%}"/>
											<input type="hidden" name="products_tsn[]" value="{%$array[i].tsn%}"/>
											{%$array[i].title%}
										</td>
										<td class="tc">{%$array[i].tsn%}</td>
										<td class="tc">
											<div class="order_amount_select">
												<div class="espcms_amount_add" data-id="{%$array[i].did%}"><i class="glyphicon glyphicon-plus-sign"></i></div>
												<div class="espcms_amount_input">
													<span id="amount_str_{%$array[i].did%}">{%$array[i].amount%}</span>
													<input type="hidden" name="product_item_qty[]" id="amount{%$array[i].did%}" value="{%$array[i].amount%}">
												</div>
												<div class="espcms_amount_reduce" data-id="{%$array[i].did%}"><i class="glyphicon glyphicon-minus-sign"></i></div>
											</div>
										</td>
									</tr>
									{%/forlist%}
								</tbody>
							</table>
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-2 control-label">收货人姓名</label>
						<div class="col-sm-9"><input type="text" name="linkman" value="{%$member.alias%}" class="form-control" data-validation-minlength="4" data-validation-maxlength="50" placeholder="请填写联系人真实姓名" title="请填写联系人真实姓名" data-validation-msg="抱歉：收货人真实姓名输入错误，请返回重新输入！"/></div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">性别</label>
						<div class="col-sm-9 pt6">
							<input type="radio" value="1" name="sex" {%if $member.sex==1%}checked{%/if%}> 男&nbsp;
							<input type="radio" value="2" name="sex" {%if $member.sex==2%}checked{%/if%}> 女
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">E-mail</label>
						<div class="col-sm-9"><input type="text" name="email" value="{%$member.email%}" class="form-control" data-validation="^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$"  placeholder="请输入E-mail" title="请输入E-mail" data-validation-msg="抱歉：E-mail输入错误，请重新输入！"/></div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">手机</label>
						<div class="col-sm-9"><input type="text" name="mobile" value="{%$member.mobile%}" class="form-control" data-validation="^1[\d]{10}$" placeholder="请输入11位手机号" title="请输入11位手机号" data-validation-msg="抱歉：手机号输入错误，请重新输入！"/> </div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">固定电话</label>
						<div class="col-sm-9"><input type="text" name="tel" value="{%$member.tel%}" class="form-control" data-validation="((\d{11})|^[\d]*[-]?((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)" placeholder="请输入固定电话" title="请输入固定电话" data-validation-msg="抱歉：固定电话输入错误，请重新输入！"/> </div>
					</div>
					{%if $member_con.MEMBER_CITY_VERIFY==1%}
					<div class="form-group">
						<label class="col-sm-2 control-label">地区</label>
						<div class="col-sm-9">
							<div id="city_select">
								<div class="col-sm-3 p0">
									<select class="form-control prov" name="province"></select>
								</div>
								<div class="col-sm-3 p0 pl5">
									<select class="form-control city" name="city" disabled="disabled"></select>
								</div>
								<div class="col-sm-3 pl5">
									<select class="form-control dist" name="district" disabled="disabled"></select>
								</div>
							</div>
						</div>
					</div>
					{%/if%}
					<div class="form-group">
						<label class="col-sm-2 control-label">详细地址</label>
						<div class="col-sm-9"><input type="text" name="address" value="{%$member.address%}" class="form-control" data-validation-minlength="4" data-validation-maxlength="200" placeholder="请填写订单详细地址" title="请填写订单详细地址" data-validation-msg="抱歉：订单详细地址输入错误，请返回重新输入！"/></div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">备注</label>
						<div class="col-sm-9">
							<textarea class="form-control" style="width:100%;height:120px" name="content" id="content" maxlength="800" data-isvalidation="true" data-validation-minlength="4" data-validation-maxlength="200" placeholder="请输入订单备注，长度不超过500个以内任意字符" title="请输入订单备注，长度不超过500个以内任意字符" data-validation-msg="抱歉，订单备注输入错误，请输入长度不超过500个以内的任意字符！"></textarea>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label"></label>
						<div class="col-sm-9">
							<button class="btn btn-orange" type="submit" formmethod="POST"/>提交询盘</button>
						</div>
					</div>
				</form>
			{%elseif $out=='enquiry_ok'%}
				<div class="section-divider mb40"><span>询盘提交成功</span></div>
				<div class="tc">
					<h3>恭喜，您的询盘已提交成功，请记住您的询盘号：<span class="colorgreg b">{%$read.enquirysn%}</span></h3>
				</div>
				{%if $member_app.isetup && $member_app.isopen && $member.userid%}
				<div class="tc mt30 mb30">
					<a class="btn btn-success btn-shadow" href="{%$mlink.center%}">会员中心</a>  <a class="btn btn-success btn-shadow ml5" href="{%$enquiry_member_link%}">查看询盘</a>
				</div>
				{%/if%}
			{%/if%}
		</section>

		{%link file="public/footer.html"%}
	</body>
</html>