why.xingtongworld.com项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

183 lines
10 KiB

{layout name="layout" /}
<style>
.user-detail .error{padding-left:5px;color:red;}
.user-detail input[type=file]{
position: absolute;
top: 1px;
left: 1px;
margin: 0;
height:100%;
width: 90%;
opacity: 0;
filter: alpha(opacity=0);
z-index:1;
cursor: pointer
}
.user-detail input[type=text],.user-detail textarea,.user-detail select{
width:200px;
height:2em;
line-height:2em;
vertical-align: top;
padding: 0 6px;
margin-bottom: 10px;
font-size: 1em;
font-weight: normal;
color: #505050;
background: #FFF;
border: 1px solid #C3C9D0;
border-radius: 2px;
-webkit-tap-highlight-color: transparent;
}
.user-detail input[type=checkbox]{vertical-align:middle}
.user-detail textarea{height:4em;overflow:auto;width:220px;}
.user-detail span.special{vertical-align: middle}
</style>
<div class="sec-user clearfix">
<div class="content">
<div class="user-detail">
<form method="post" id="postForm" action="{:url('institutional')}">
<div class="head clearfix">
<div class="left lowercase">
<p><span>联 系人</span><span><input type="text" id="contact_name" name="contact_name" value="{$detail.contact_name}" /></span></p>
<p><span>联系手机号</span><span><input type="text" id="contact_phone" name="contact_phone" value="{$detail.contact_phone}" /></span></p>
<p><span>任职机构</span><span><input type="text" id="company" name="company" value="{$detail.company}" /></span></p>
<p><span>用户姓名</span><span><input type="text" id="name" name="name" value="{$detail.name}" /></span></p>
<p><span>地区</span><span>&nbsp;&nbsp;
<input type="hidden" id="region_id" name="region_id" value="{$detail.region_id}" />
<select id="province" name="province" style="width:98px;">
<option value="">请选择省份</option>
{foreach name="regions" id="vo"}
<option value="{$vo.id}" {if condition="$vo['id'] eq $detail['province']"}selected='selected'{/if}>{$vo.name}</option>
{/foreach}
</select>
<select id="city" name="city" style="width:98px;">
<option value="">请选择城市</option>
</select>
</span></p>
<p><span>机构总部</span><span><input type="text" id="address" name="address" value="{$detail.address}" /></span></p>
<p><span>注册日期</span><span><input type="text" id="establish_date" data-widget='dateTime' name="establish_date" value="{$detail.establish_date}" /></span></p>
<p><span>注册资本</span><span><input type="text" id="registration_capital" name="registration_capital" value="{$detail.registration_capital}" placeholder="单位万元" /></span></p>
<p><span>管理规模</span><span><input type="text" id="company_size" name="company_size" value="{$detail.company_size}" placeholder="单位万元" /></span></p>
<p><span>公司网站</span><span><input type="text" id="company_website" name="company_website" value="{$detail.company_websitel}" /></span></p>
</div>
<div class="right lowercase">
<p><span>法人代表</span><span><input type="text" id="legal_representative" name="legal_representative" value="{$detail.legal_representative}" /></span></p>
<p><span>投资阶段</span><span style="overflow:visiable auto;height:auto;vertical-align:top;" class="special">&nbsp;&nbsp;
{foreach name="stages" id="vo" key="key"}<input type="checkbox" id="investment_stage_id{$key}" {if condition="is_array($detail['investment_stage_id']) and in_array($vo['id'],$detail['investment_stage_id']) "}checked='checked'{/if} name="investment_stage_id[]" value="{$vo.id}" />{$vo.name}&nbsp;&nbsp;{/foreach}
</span></p>
<p style="height:auto;"><span>关注行业</span><span style="overflow:visiable auto;height:auto;" class="special">
{foreach name="industries" id="vo" key="key"}<input type="checkbox" id="interested_industry_ids{$key}" name="interested_industry_ids[]" {if condition="is_array($detail['interested_industry_ids']) and in_array($vo['id'],$detail['interested_industry_ids']) "}checked='checked'{/if} value="{$vo.id}" />{$vo.name}&nbsp;&nbsp;{/foreach}</span></p>
<p style="height:auto;"><span>投资关注:</span><span style="overflow:visiable auto;height:auto;" class="special"><textarea id="investment_concerns" name="investment_concerns">{$detail.investment_concerns}</textarea></span></p>
<p style="height:auto;"><span>已投项目:</span><span style="overflow:visiable auto;height:auto;" class="special"><textarea id="invested_projects" name="invested_projects">{$detail.invested_projects}</textarea></span></p>
<p style="height:auto;"><span>投资重点 :</span><span style="overflow:visiable auto;height:auto;" class="special"><textarea id="investment_point" name="investment_point">{$detail.investment_point}</textarea></span></p>
</div>
</div>
<div class="foot">
<a href="javascript:void(0);" onclick="$('#postForm').submit()" class="btn-xiugai">保存</a>
</div>
</form>
</div>
<div class="user-caidan">
{include file="public:userinfo" /}
</div>
</div>
</div>
<script src="{$yf_theme_path}/public/js/jquery.form.js"></script>
<script src="{$yf_theme_path}/public/js/jquery.validate.min.js"></script>
<script src="{$yf_theme_path}/public/js/common.js"></script>
<script src="{$yf_theme_path}/public/js/base.js"></script>
<script>
$(function(){
// 手机号码验证
jQuery.validator.addMethod("isMobile", function(value, element) {
var length = value.length;
return this.optional(element) || (length == 11 && /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/.test(value));
}, "请正确填写您的手机号码。");
// 身份证号码验证
jQuery.validator.addMethod("isIdCardNo", function(value, element) {
//var idCard = /^(\d{6})()?(\d{4})(\d{2})(\d{2})(\d{3})(\w)$/;
return this.optional(element) || isIdCardNo(value);
}, "请输入正确的身份证号码。");
var regions={$regions|json_encode};
var city="{$detail.city}";
if(city!="")city=parseInt(city);
$("#province").change(function(){
$("#region_id").val("");
var html='<option value="">请选择城市</option>';
$("#city").html(html);
var val=$("#province").val();
var index=$("#province").get(0).selectedIndex;
if(index>0){
index=index-1;
if(typeof regions[index]!='undefined'){
var current=regions[index];
console.log(current);
var subregions=current['subregions'];
console.log(subregions);
var html='<option value="">请选择城市</option>';
if(subregions.length){
subregions.forEach(function(item){
if(city!=""&&item['id']==city){
html+='<option value="'+item['id']+'" selected="selected">'+item['name']+'</option>';
}else{
html+='<option value="'+item['id']+'">'+item['name']+'</option>';
}
});
$("#city").html(html);
}
}
}
});
$("#city").change(function(){
var val=$("#city").val();
$("#region_id").val(val);
});
{if condition="$detail['province'] and $detail['city']"}
$("#province").trigger("change");
$("#region_id").val("{$detail.city}");
{/if}
var rules={
"contact_name":"required",
"contact_phone":{
"required":true,
"isMobile":true
},
"company":"required",
"name":"required",
"city":"required",
"address":"required",
"establish_date":"required",
"registration_capital":"required",
"company_size":"required",
"company_website":"required",
"legal_representative":"required",
"registration_capital":"required",
"industry_id":"required",
"investment_stage_id":"required",
"interested_industry_ids":"required",
};
var messages={
"contact_name":"联系人必填",
"contact_phone":{
"required":"手机号码必填",
"isMobile":"请正确填写手机"
},
"company":"任职机构必填",
"name":"用户姓名必填",
"province":"省份必选",
"city":"城市必选",
"address":"机构总部必填",
"establish_date":"注册日期必填",
"registration_capital":"注册资本必填",
"company_size":"公司人数必填",
"company_website":"公司网站必填",
"legal_representative":"法人代表必填",
"industry_id":"行业必选",
"investment_stage_id":"投资阶段必选",
"interested_industry_ids":"关注行业必选",
};
tool.commonForm("#postForm",rules,messages);
});
</script>