<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<input type="hidden" name="oid" value="${userdetail.oid }">
<input type="hidden" name="company.oid" value="${userdetail.company.oid }">
<p class="">
	<label>子公司名称</label>
	<input type="text" class="form-control" id="fullName" name="company.fullName" onblur="baseCheckInput(this,'')"  value="${userdetail.company.fullName }"/>
	<span class="glyphicon form-control-feedback t-icon-m" aria-hidden="true"></span>
</p>
<p class="">
	<label>账号</label>
	<input type="text" class="form-control" placeholder="" id="userName" name="userName" onblur="baseCheckInput(this,'')" value="${userdetail.userName}" readonly="readonly"/>
	<span class="glyphicon form-control-feedback t-icon-m" aria-hidden="true"></span>
</p>
<p class="">
	<label>密码</label>
	<input type="password" class="form-control" placeholder="" id="pwd" name="password" onblur="baseCheckInput(this,'')" value="${userdetail.password }" />
	<span class="glyphicon form-control-feedback t-icon-m" aria-hidden="true"></span>
</p>
<p>
	<label>地区</label>
	<div class="row">
		<input type="hidden" name="company.provinceName" id="provinceName_editCompany" value="${userdetail.company.provinceName }">
		<input type="hidden" name="company.cityName" id="cityName_editCompany" value="${userdetail.company.cityName }">
		<input type="hidden" name="company.countyName" id="countyName_editCompany" value="${userdetail.company.countyName }">
		<div class="col-sm-4 col-xs-4">
			<select name="company.provinceCode" id="provinceID_editCompany" class="form-control"
				style="background:url(<c:url value='/resources/versions-2.0/images/public/select-btn.jpg'/>) 97% no-repeat  #fafafc;"
				onchange="javascript:$('#provinceName_editCompany').val($('#provinceID_editCompany option:selected').text());changeDistrict('cityID_editCompany', '', '2', this,'${userdetail.company.cityCode }');">
				<option value="">请选择省</option>
				<c:forEach items="${provinceList }" var="list">
					<option value="${list.codes }"
						${list.codes eq userdetail.company.provinceCode ?"selected='selected'":"" }>${list.named }</option>
				</c:forEach>
			</select>
		</div>
		<div class="col-sm-4 col-xs-4">
			<select name="company.cityCode" id="cityID_editCompany"
				onchange="javascript:$('#cityName_editCompany').val($('#cityID_editCompany option:selected').text());changeDistrict('countyID_editCompany', '', '3', this,'${userdetail.company.countyCode }');"
				class="form-control"
				style="background:url(<c:url value='/resources/versions-2.0/images/public/select-btn.jpg'/>) 97% no-repeat  #fafafc;">
				<option value="">请选择市</option>
			</select>
		</div>
		<div class="col-sm-4 col-xs-4">
			<select name="company.countyCode" id="countyID_editCompany" 
			onchange="javascript:$('#countyName_editCompany').val($('#countyID_editCompany option:selected').text());" class="form-control" style="background:url(<c:url value='/resources/versions-2.0/images/public/select-btn.jpg'/>) 97% no-repeat  #fafafc;">
				<option value="">请选择区县</option>
			</select> 
		</div> 
	</div>
</p>
<c:if test="${userdetail.company.accountType eq 'SUBSIDIARY' }">
<p>
	<label>区域代码</label>
	<div class="row">
		<div class="col-sm-12 col-xs-12">
			<select name="company.areaCode" id="areaCode_editCompany" class="form-control" style="background:url(<c:url value='/resources/versions-2.0/images/public/select-btn.jpg'/>) 97% no-repeat  #fafafc;">
				<option value="">请选择区域代码</option>
                   <c:forEach items="${areaList }" var="area">
                   <option value="${area.codes }" ${area.codes eq userdetail.company.areaCode ?"selected='selected'":"" }>${area.named }</option>
                   </c:forEach>
			</select> 
		</div>
	</div>
	</p>
</c:if>
<script>

	$(function(){
		$("#provinceID_editCompany").trigger("change");
		$("#cityID_editCompany").trigger("change");
	});

</script>
