<{import file="header.html" title="快递编辑"}> 
<style type="text/css">
.expbox{ width:100%; float:left; }
.expname{ width:100%; float:left; }

.addr_table{ border:1px solid #efefef; border-collapse:collapse; border-spacing:0; }
.addr_table thead tr th{ border:1px solid #efefef; padding:7px 0; font-weight:bold; }
.addr_table tbody tr td{ border:1px solid #efefef; text-align:center; } 
.addr_table tbody tr td input{ width:28px; float:none; padding:5px 10px; text-align:center; }
.addr_table tbody tr td:nth-child(2){ text-align:center; }

.adrbox{ width:180px; text-align:left; color:#666; padding:0 5px 7px; float:left; }
.adredit{ width:50px; text-align:center; padding:0 0 7px 0; float:right; }
.adredit a{ margin:0 0 0 10px; color:#00f; }
.adradd{ width:100%; padding:5px 0; float:left; }

.expdft{ width:600px; background:#E4EFFD; padding:12px 0 10px; float:left; }
.expdft .span{ float:left; }
.expdft .span i{ font-size:14px; padding:5px 5px 0 5px; float:left; }
.expdft .span em{ font-style:inherit; padding:7px 0 5px; color:#f00; float:left; }
.expdft .span input{ width:28px; padding:7px 10px; margin:0 5px; border:1px solid #ddd; text-align:center; float:left; }

table thead tr th em{ font-style:inherit; }
</style>
<div class="tab2"><a class="back" href="<{$__SELLER__}>express/index">运费管理</a></div>
<div class="lbox"> 
	<{uqcms m="express" v="data" c="tpl_one:id=smarty.get.id"}>
	<form action="<{$__SELLER__}>express/save" method="post" id="form">
		<{if $data.row.id}><input type="hidden" name="id" value="<{$data.row.id}>"/><{/if}>
		<table class="etable">
			<tr>
				<td width="100">快递名称：</td>
				<td><input type="text" name="name" value="<{$data.row.name}>" size="30"></td>
			</tr>
			<tr>
				<td>是否包邮：</td>
				<td>
					<label><input type="radio" name="price_type" value="1" <{if $data.row.type == '1' || $data.row.type == ''}>checked="checked"<{/if}>/>自定义运费</label> 
					<label><input type="radio" name="price_type" value="0" <{if $data.row.type == '0'}>checked="checked"<{/if}>/>卖家承担邮费</label> 
				</td>
			</tr>
			<tr class="exp_type"<{if $data.row.type == '0'}> style="display:none;"<{/if}>>
				<td>计价方式：</td>
				<td>
					<div class="expname">
						<label><input type="radio" name="vtype" value="1"<{if $data.row.vtype == '1'}> checked="checked"<{/if}>/>数量</label>
						<label><input type="radio" name="vtype" value="2"<{if $data.row.vtype == '2'}> checked="checked"<{/if}>/>重量</label>
					</div>
				</td>
			</tr>
			<tr class="exp_type"<{if $data.row.type == '0'}> style="display:none;"<{/if}>>
				<td valign="top" style="padding-top:12px;">费用设置：</td>
				<td> 
					<div class="expbox">
						<div class="expdft">
							<div class="span">
								<i>默认运费</i>
								<input type="text" name="default_one_num" value="<{$data.row.one_num}>"/>
								<em>件</em>
								<i>内</i>
							</div>
							<div class="span">
								<input type="text" name="default_one_price" value="<{$data.row.one_price}>"/>
								<i>元</i>
							</div>
							<div class="span">
								<i>每增加</i>
								<input type="text" name="default_other_num" value="<{$data.row.other_num}>"/>
								<em>件</em>
							</div>
							<div class="span">
								<i>增加运费</i>
								<input type="text" name="default_other_price" value="<{$data.row.other_price}>"/>
								<i>元</i>
							</div>
						</div>
						<table style="width:600px;" class="addr_table">
							<thead>
								<tr>
									<th width="220">运送到</th>
									<th width="60">首<em>件</em>数(<em>件</em>)</th>
									<th width="60">首费(元)</th>
									<th width="60">续<em>件</em>(<em>件</em>)</th>
									<th width="60">续费(元)</th>
									<th width="60">操作</th>
								</tr>
							</thead>
							<tbody>
							<{foreach key=k item=i from=$data.row.plist}>
								<tr id="addrtr_<{$i.id}>">
									<td>
										<div class="adrbox"><{$i.addr_cn}></div>
										<div class="adredit"><a href="javascript:;" class="openaddr addrtr_e_<{$i.id}>" data-aid="<{$i.id}>">编辑</a></div>
										<input type="hidden" name="addr_id[]" class="addpot_id addpot_id_<{$i.id}>" value="<{$i.addr_id}>">
									</td>
									<td><input type="text" name="one_num[]" value="<{$i.one_num}>" size="5"></td>
									<td><input type="text" name="one_price[]" value="<{$i.one_price}>" size="5"></td>
									<td><input type="text" name="other_num[]" value="<{$i.other_num}>" size="5"></td>
									<td><input type="text" name="other_price[]" value="<{$i.other_price}>" size="5"></td>
									<td><a href="javascript:;" class="addrdel" data-aid="<{$i.id}>">删除</a></td>
								</tr>
							<{/foreach}>	
							</tbody>
						</table> 
						<div class="adradd"><a href="javascript:;">为指定地区城市设置运费</a></div>
					</div>
				 
				</td>
			</tr>
			
			<tr>
				<td>状态：</td>
				<td>
					<label><input type="radio" name="status" value="1" <{if $data.row.status == '1' || $data.row.status == ''}>checked="checked"<{/if}>/>开启</label> 
					<label><input type="radio" name="status" value="0" <{if $data.row.status == '0'}>checked="checked"<{/if}>/>关闭</label> 
				</td>
			</tr>
			<tr>
				<td></td>
				<td><input type="submit" value="保存" class="submit"/></td>
			</tr>
		</table>
	</form> 
</div>
<style type="text/css">
.areaboxbg{ display:none; background: rgba(0,0,0,0.12); width:100%; height:100%; position:absolute; left:0; top:0; float:left;  }
.areabox{ display:none; width:600px; position:absolute; left:200px; top:100px; background:#fff; padding:0; border:1px solid #efefef; }
.areabox .name{ width:100%; border-bottom:1px solid #efefef; margin:0 0 10px 0; padding:10px 0; float:left; }
.areabox .name span{ margin:6px 0 0 10px; float:left; }
.areabox .name a{ margin:0 10px 0 0; padding:5px; float:right; }
.areabox .con{ width:100%; padding:10px; box-sizing: border-box; float: left; }
.areabox .con a{ padding:3px 10px; border:1px solid #efefef; border-radius:2px; background:#fff; margin:0 15px 8px 0; float:left; }
.areabox .con a.ck{ background:#888; color:#fff; border:1px solid #666;  } 
.areabox .con a.jzact{ background:#ddd; color:#333; border:1px solid #efefef; cursor: not-allowed; }
.areabox .act{ width:100%; border-top:1px solid #efefef; padding:10px 0; float:left;  }
.areabox .act a{ background:#39f; padding:5px 10px; margin:0 10px 0 0; color:#fff; float:right; }
</style>
<div class="areaboxbg"></div>
<div class="areabox">
	<div class="name"><span>选择地址</span><a href="javascript:;" class="close">关闭</a></div> 
	<div class="con">
		<{foreach item=i from=$data.area}>
			<a href="javascript:;" data-id="<{$i.id}>" <{if $i.eid}>class="ck ck_<{$i.eid}>" data-ck-id="<{$i.eid}>"<{/if}>><{$i.name}></a>
		<{/foreach}>
	</div>
	<div class="act"><a href="javascript:;" data-tid="0">确定</a></div>
</div>
<{import 
	file="footer.html"
	js="express"
}> 