<article class="col-lg-12">
	<div class="card forms">
		<div class="card-header d-flex align-items-center justify-content-between">
			<h3>发货地址列表</h3>
			<div>
				<input type="button" class="btn btn-primary" onclick="window.location.href='{url:/seller/ship_info_edit}';" value="添加地址" />
				<input type="button" class="btn btn-primary" onclick="selectAll('id[]')" value="全选" />
				<input type="button" class="btn btn-primary" onclick="delModel();" value="批量删除" />
			</div>
		</div>

		<div class="card-body">
			<form action="{url:/seller/ship_info_del}" method="post" name="ship_list" class="form-horizontal">
				<table class="table">
					<colgroup>
						<col width="40px" />
						<col />
					</colgroup>

					<thead>
						<tr>
							<th></th>
							<th>发货点名称</th>
							<th>地址</th>
							<th>邮编</th>
							<th>电话</th>
							<th>发货人</th>
							<th>默认</th>
							<th>操作</th>
						</tr>
					</thead>

					<tbody>
						{set:$queryObj=Api::run('getShipInfoList',array('is_del'=>0));$resultData=$queryObj->find()}
						{foreach:items=$resultData}
						<tr>
							<td><input name="id[]" type="checkbox" class="checkbox-template" value="{$item['id']}" /></td>
							<td>{$item['ship_name']}</td>
							<td>{$item['address']}</td>
							<td>{$item['postcode']}</td>
							<td>{if:$item['mobile']}{$item['mobile']}{else:}{$item['telphone']}{/if}</td>
							<td>{$item['ship_user_name']}</td>
							<td>
								{if:$item['is_default']==1}
								<a class='text-red' href="{url:/seller/ship_info_default/id/$item['id']/default/0}">取消默认</a>
								{else:}
								<a class="text-blue" href="{url:/seller/ship_info_default/id/$item['id']/default/1}">设为默认</a>
								{/if}
							</td>
							<td>
								<a href="{url:/seller/ship_info_edit/sid/$item['id']}"><i class="fa fa-edit fa-lg" title="编辑"></i></a>
								<a href="javascript:void(0)" onclick="delModel({link:'{url:/seller/ship_info_del/id/$item['id']}'})"><i class="fa fa-close fa-lg" title="删除"></i></a>
							</td>
						</tr>
						{/foreach}
					</tbody>
				</table>
			</form>
			{$queryObj->getPageBar()}
		</div>
	</div>
</article>