{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/seller_add}" method="post" name="sellerForm" enctype='multipart/form-data'>

				<div class="form-group row">
					<label class="col-sm-2 col-form-label">登陆用户名</label>
					<div class="col-sm-10">
						<input class="form-control" name="seller_name" type="text" value="" pattern="required" alt="用户名不能为空" disabled="disabled" />
						<small class="help-block-none">* 用户名称（必填）</small>
					</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="password" type="password" bind='repassword' empty />
						<small class="help-block-none">* 登录密码</small>
					</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="repassword" type="password" bind='password' empty />
						<small class="help-block-none">* 重复确认密码</small>
					</div>
				</div>

				<div class="form-group row">
					<label class="col-sm-2">商户LOGO图</label>
					<div class="col-sm-10">
						<input name="logo" type="file" class="form-control-file" />

						{if:isset($this->sellerRow['logo']) && $this->sellerRow['logo']}
						<img src="{url:$this->sellerRow['logo']}" class="img-thumbnail" style='max-width:220px;' />
						{/if}
					</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="true_name" type="text" value="" pattern="required" alt="用户名不能为空" disabled="disabled" />
					</div>
				</div>

				<div class="form-group row">
					<label class="col-sm-2">商户资质材料</label>
					<div class="col-sm-10">
						{if:isset($this->sellerRow['paper_img']) && $this->sellerRow['paper_img']}
						<a target="_blank" href="{url:$this->sellerRow['paper_img']}"><img src='{url:$this->sellerRow['paper_img']}' style='max-width:320px;' class='img-thumbnail' /></a>
						{else:}
						暂无商户资质材料
						{/if}
					</div>
				</div>

				<div class="form-group row">
					<label class="col-sm-2 col-form-label">保证金数额</label>
					<div class="col-sm-10">
					    <div class="input-group w-25">
                            <input class="form-control" name="cash" pattern="float" empty disabled="disabled" />
                            <div class="input-group-append"><span class="input-group-text">元</span></div>
					    </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="account" empty />
						<small class="help-block-none">收款人的实际姓名,如微信余额收款必须要实名</small>
					</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" pattern="phone" empty />
					</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" 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="email" pattern="email" />
					</div>
				</div>

				<div class="form-group row">
					<label class="col-sm-2 col-form-label">地区</label>
					<div class="col-sm-10 d-flex">
						<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"></select>
					</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" empty value="" />
					</div>
				</div>

				<div class="form-group row">
					<label class="col-sm-2 col-form-label">QQ号码</label>
					<div class="col-sm-10">
						<input class="form-control" name="server_num" empty value="" />
					</div>
				</div>

				<div class="form-group row">
					<label class="col-sm-2 col-form-label">发票税率(百分制)</label>
					<div class="col-sm-10">
						<input name="tax" class="form-control" type="text" empty value="" pattern="float" />
						<small class="help-block-none">当买家需要发票的时候就要增加<商品金额>*<税率>的费用</small>
					</div>
				</div>

				<div class="form-group row">
					<label class="col-sm-2 col-form-label">企业官网</label>
					<div class="col-sm-10">
						<input name="home_url" class="form-control" type="text" pattern="url" empty value="" alt="请填写完整的URL地址，比如：http://www.aircheng.com" />
						<small class="help-block-none">官网的URL网址，如：http://www.aircheng.com</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>
			</form>
		</div>
</article>

<script language="javascript">
var formObj = new Form('sellerForm');
formObj.init({echo:JSON::encode($this->sellerRow)});

var areaInstance = new areaSelect('province');
areaInstance.init({echo:JSON::encode($this->sellerRow)});
</script>