@using FHT.Agency.CommonTypes @using FHT.Utilities @using FHT.Agency.Web.Extensions @using FHT.Agency.UI.ViewModels @model FHT.Agency.UI.InputModels.Agent.AgentOrganizationInputModel @{ ViewBag.Title = "创建代理商"; var firstLevelRegions = (IEnumerable)ViewBag.FirstLevelRegions; var organizationId = Request.QueryString["organizationId"]; var channelManagerOptions = (List)ViewBag.ChannelManagers; var cUsers = channelManagerOptions.Select(c=>new SelectListItem { Value = c.Value.ToString(), Text = c.Text, Selected = c.Value == Model.ChannelManagerId }); } @using (Html.BeginForm("CreateAgentOrganization", "ManageAgent", FormMethod.Post, new { @class = "form-horizontal", autocomplete = "off" })) { @Html.HiddenFor(m => m.Id) @Html.AntiForgeryToken()
@Html.RequiredLabelFor(m => m.AgentName, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.AgentName, new { maxlength = 45, @class = "form-control" }) @Html.ValidationMessageFor(m => m.AgentName)
@Html.RequiredLabelFor(m => m.RegisteredDate, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.RegisteredDate, new { @class = "date-picker form-control",data_min_date="",data_max_date="" }) @Html.ValidationMessageFor(m => m.RegisteredDate)
@Html.RequiredLabelFor(m => m.LegalEntityName, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.LegalEntityName, new { placeholder = "法人名称必须是2到4位", @class = "form-control", maxlength = 4 }) @Html.ValidationMessageFor(m => m.LegalEntityName)
@Html.RequiredLabelFor(m => m.Contact.Name, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.Contact.Name, new { placeholder = "业务联系人必须是2到4位", @class = "form-control", maxlength = 4 }) @Html.ValidationMessageFor(m => m.Contact.Name)
@Html.RequiredLabelFor(m => m.Contact.Mobile, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.Contact.Mobile, new { maxlength = 11, @class = "form-control" }) @Html.ValidationMessageFor(m => m.Contact.Mobile)
@Html.RequiredLabelFor(m => m.Contact.Telephone, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.Contact.Telephone, new { maxlength = 20, @class = "form-control" }) @Html.ValidationMessageFor(m => m.Contact.Telephone)
@Html.RequiredLabelFor(m => m.Contact.Email, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.Contact.Email, new { @class = "form-control" }) @Html.ValidationMessageFor(m => m.Contact.Email)
@Html.RequiredLabelFor(m => m.AgentSource, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.AgentSource) @Html.ValidationMessageFor(m => m.AgentSource)
@Html.RequiredLabelFor(m => m.AgentType, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.AgentType) @Html.ValidationMessageFor(m => m.AgentType)
@Html.RequiredLabelFor(m => m.LevelType, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.LevelType) @Html.ValidationMessageFor(m => m.LevelType)
@Html.RequiredLabelFor(m => m.ChannelManagerId, new { @class = "col-md-2 control-label" })
@if (User.HasClaim(FhtUserClaimType.CreateChannelUser)) { 对应的渠道经理还未创建? @Html.ActionLink("创建渠道用户", "CreateChannelUser", "Authorization", new { role = FhtUserRoleType.ChannelManager }, new { @class = "fht-control-label", style = "float: left;" }) }
@Html.RequiredLabelFor(m => m.Region, new { @class = "col-md-2 control-label" })
@{ var firstLevelIdOptions = ((IEnumerable )firstLevelRegions).ToList(); firstLevelIdOptions.Insert(0, new SelectListItem { Text = "省份", Disabled = true, }); }
@Html.DropDownListFor(m => m.Region.FirstLevelId, firstLevelIdOptions, new { @class = "form-control" })
@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" }) @Html.ValidationMessageFor(e => e.Region.SecondLevelId)
@Html.RequiredLabelFor(m => m.Address.Detail, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.Address.Detail, new { maxlength = 45, @class = "form-control" }) @Html.ValidationMessageFor(m => m.Address.Detail)
@Html.RequiredLabelFor(m => m.Address.PostalCode, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.Address.PostalCode, new { maxlength = 6, @class = "form-control" }) @Html.ValidationMessageFor(m => m.Address.PostalCode)
@Html.RequiredLabelFor(m => m.Description, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.Description, new { @class = "form-control" }) @Html.ValidationMessageFor(m => m.Description)
} @section scripts { @Scripts.Render("~/bundles/views/createAgentOrganization") @Scripts.Render("~/bundles/UIStandard") }