{js:artTemplate}
{js:areaSelect}
<article class="col-lg-12">
	<div class="card forms">
		<div class="card-header">
			<h3>自提点编辑</h3>
		</div>
		<div class="card-body">
			<form action='{url:/seller/takeself_update}' class="form-horizontal" method='post' name='takeself'
				enctype='multipart/form-data'>
				<input type='hidden' name='id' value="" />
				<div class="module_content">
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">自提点名称</label>
						<div class="col-sm-10">
							<input name="name" class="form-control" value='' pattern='required' alt="填写名称" />
						</div>
					</div>
					
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">LOGO图片</label>
						<div class="col-sm-10">
							<input name="logo" type="file" class="form-control-file" />
							<div class="box">
								{if:isset($this->takeselfRow['logo']) && $this->takeselfRow['logo']}
								<img src="{url:$this->takeselfRow['logo']}" style='width:220px;border:1px solid #ccc' />
								{/if}
							</div>
						</div>
					</div>
					
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">地区选择</label>
						<div class="col-sm-10">
							<div class="d-flex align-items-center">
								<select name="province" child="city,area" class="form-control mr-2"></select>
								<select name="city" child="area" class="form-control mr-2"></select>
								<select name="area" class="form-control mr-2"></select>
							</div>
						</div>
					</div>
					
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">详细地址</label>
						<div class="col-sm-10">
							<input class="form-control" name='address' value='' pattern='required' />
						</div>
					</div>
					
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">固定电话</label>
						<div class="col-sm-10">
							<input class="form-control" name='phone' value='' pattern='phone' />
						</div>
					</div>
					
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">手机号码</label>
						<div class="col-sm-10">
							<input class="form-control" name='mobile' value='' pattern='mobi' />
						</div>
					</div>
					
					<div class="form-group row">
						<label class="col-sm-2 col-form-label">排序</label>
						<div class="col-sm-10">
							<input class="form-control" name='sort' value='' pattern='int' />
							<small class="help-block-none">* 数据排序,数字越小越靠前</small>
						</div>
					</div>
					
					<div class="form-group row">
						<div class="col-sm-4 offset-sm-2">
							<input type="submit" class="btn btn-primary" value="确 定" />
							<input type="reset" class="btn btn-secondary" value="重 置" />
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>		
</article>

<script type='text/javascript'>
//DOM加载完毕
$(function(){
	//修改模式
	var formObj = new Form('takeself');
	formObj.init({echo:JSON::encode($this->takeselfRow)});

	//地区联动插件
	var areaInstance = new areaSelect('province');
	areaInstance.init({echo:JSON::encode($this->takeselfRow)});
});
</script>
