{js:artTemplate}
{js:areaSelect}
{set:$ship=$this->data}
<div class="headbar clearfix">
	<div class="position">订单<span>></span><span>快递单管理</span><span>></span><span>{if:isset($ship['id'])}修改{else:}添加{/if}发货信息</span></div>
</div>

<form name="ModelForm" action="{url:/order/ship_info_update}" method="post">
<input type="hidden" name="sid" value="{$ship['id']}"/>
<div class="content_box">
	<div class="content form_content">
		<table id="tab-1" class="form_table" name="table">
			<col width="150px" />
			<col />
			<tr>
				<th>发货点名称：</th>
				<td><input class="normal" name="ship_name" type="text" pattern="required" value="{$ship['ship_name']}" alt="发货点名称"//><label>*发货地点名称</label></td>
			</tr>
			<tr>
				<th>发货人姓名：</th>
				<td><input class="normal" name="ship_user_name" type="text" pattern="required" value="{$ship['ship_user_name']}"  alt="发货人姓名"/><label>*发货人名称</label></td>
			</tr>
			<tr>
				<th>性别：</th>
				<td><label class='attr'><input type="radio" name="sex" value="1" checked/>先生</label><label class='attr'><input type="radio" name="sex" value="0" {if:$ship['sex']==0}checked='checked'{/if}/>女士</label><label>*</label></td>
			</tr>
			<tr>
				<th>地区：</th>
				<td>
					<select name="province" child="city,area"></select>
					<select name="city" child="area"></select>
					<select name="area" pattern="required" alt="请选择完整地区"></select>
				</td>
			</tr>
			<tr>
				<th>地址：</th>
				<td><input class="normal" name="address" type="text" pattern="required" value="{$ship['address']}"  alt="具体地址错误"/><label>*具体地址</label></td>
			</tr>
			<tr>
				<th>邮编：</th>
				<td><input class="normal" name="postcode" type="text" pattern="zip" value="{$ship['postcode']}" empty alt="邮编错误"/><label>邮政编码</label></td>
			</tr>
			<tr>
				<th>手机：</th>
				<td><input class="normal" name="mobile" type="text" pattern='mobi' value="{$ship['mobile']}"/><label>*手机号码</label></td>
			</tr>
			<tr>
				<th>电话：</th>
				<td><input class="normal" name="telphone" type="text" pattern="phone" empty alt="电话号码错误" value="{$ship['telphone']}" /></td>
			</tr>
			<tr>
				<th></th>
				<td><label><input type="checkbox" name="is_default" value="1" {if:$ship['is_default']==1}checked='checked'{/if}/>&nbsp;设置为默认地址</label></td>
			</tr>
			<tr>
				<th></th>
				<td><button class="submit" type="submit"><span>保 存</span></button></td>
			</tr>
		</table>
	</div>
</div>
</form>

<script type='text/javascript'>
var areaInstance = new areaSelect('province');
{if:isset($ship) && $ship}
	areaInstance.init({echo:JSON::encode($ship)});
{else:}
	areaInstance.init();
{/if}
</script>