@using FHT.Utilities @using FHT.Agency.CommonTypes @model FHT.Agency.UI.InputModels.Agent.CreateUserAndCompanyInputModel @{ ViewBag.Title = "代理商创建客户"; Layout = "~/Views/Shared/_Layout.cshtml"; } @using (Html.BeginForm("CreateClient", "Agent", null, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) {
@Html.AntiForgeryToken()

客户信息

@Html.RequiredLabelFor(l => l.Mobile, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.Mobile, "string", new { placeholder = "用手机号码注册", maxlength = 11 }) @Html.ValidationMessageFor(m => m.Mobile)
@Html.RequiredLabelFor(l => l.Password, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.Password, "password", new { placeholder = "密码必须是6-20位", maxlength = 20 }) @Html.ValidationMessageFor(m => m.Password)
@Html.RequiredLabelFor(l => l.RealName, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.RealName, "string", new { placeholder = "联系人必须是2至4个汉字", maxlength = 4 }) @Html.ValidationMessageFor(m => m.RealName)
@Html.RequiredLabelFor(l => l.Gender, new { @class = "col-md-2 control-label" })
@{ var genderOptions = EnumHelpers.Enum2Dictionary ().Select(g => new SelectListItem { Text = g.Value, Value = g.Key.ToString(), }).ToList(); genderOptions.Insert(0, new SelectListItem { Text = "请选择性别", Disabled = true, }); }
@Html.DropDownListFor(m => m.Gender, genderOptions, new { @class = "form-control select2 " })
@Html.RequiredLabelFor(l => l.Profession, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.Profession, "string", new { placeholder = "输入2到8个汉字", maxlength = 8 }) @Html.ValidationMessageFor(m => m.Profession)
@Html.RequiredLabelFor(l => l.CompanyName, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.CompanyName, new { placeholder = "请输入营业执照全称,支持中国大陆工商局或市场监督管理局登记企业", @class = "form-control", maxlength = 45 }) @Html.ValidationMessageFor(m => m.CompanyName)
@Html.RequiredLabelFor(l => l.Industry.IndustryId, new { @class = "col-md-2 control-label" }) @{ var industryIdOptions = ((IEnumerable )ViewBag.industry).ToList(); industryIdOptions.Insert(0, new SelectListItem { Text = "请选择行业", Disabled = true, }); }
@Html.DropDownListFor(e => e.Industry.IndustryId, industryIdOptions, new { @class = "form-control select2 " })
@Html.RequiredLabelFor(l => l.Region, new { @class = "col-md-2 control-label" })
@{ var firstLevelIdOptions = ((IEnumerable )ViewBag.provinces).ToList(); firstLevelIdOptions.Insert(0, new SelectListItem { Text = "省", Disabled = true, }); }
@Html.DropDownListFor(m => m.Region.FirstLevelId, firstLevelIdOptions, new { @class = "form-control select2 " })
@Html.CascadingDropDownListFor( expression: m => m.Region.SecondLevelId, triggeredByProperty: m => m.Region.FirstLevelId, //Parent property that trigers dropdown data loading url: Url.Action("GetChildRegion", "Region"), //Url of action that returns dropdown data parentIdParameterName: "parentRegionId", //Parameter name for the selected parent value that url action receives optionLabel: "市", // Option label disabledWhenParentNotSelected: false, //If true, disables dropdown until parrent dropdown selected htmlAttributes: new { @class = "form-control select2 col-md-2 " }) @Html.ValidationMessageFor(e => e.Region.SecondLevelId)

企业认证

@Html.RequiredLabelFor(l => l.Applicant, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.Applicant, "string", new { placeholder = "请填写实际运营人姓名", maxlength = 4 }) @Html.ValidationMessageFor(m => m.Applicant)
@Html.RequiredLabelFor(l => l.IdCardNumber, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.IdCardNumber, "string", new { placeholder = "请填写运营人身份证,身份证号将用于认证的资料核实,以及后续服务。", maxlength = 18 }) @Html.ValidationMessageFor(m => m.IdCardNumber)
@Html.RequiredLabelFor(m => m.PhotoIdUrl, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.PhotoIdUrl, new { @class = "image-uploader hidden", data_requiredwidth = 50, data_requiredheight = 50 })
@Html.RequiredLabelFor(l => l.LicenseNo, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.LicenseNo, "string", new { placeholder = "请输入15位营业执照注册号或18位统一社会信用代码", maxlength = 18 }) @Html.ValidationMessageFor(m => m.LicenseNo)
@Html.RequiredLabelFor(m => m.LicenseUrl, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.LicenseUrl, new { @class = "image-uploader hidden", data_requiredwidth = 50, data_requiredheight = 50 })
}