123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- @{
- ViewBag.Title = "Detail";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- @using MES.Production.Service;
- @using Central.Control.Domain;
- @using Ant.Service.Common;
- @using Ant.Service.Common.Enums;
- @using CommonToolHelper;
- @model SYS_USER
- <style>
- body {
- background-color: white;
- }
- .changeicon {
- float: right;
- margin-right: -15px;
- position: absolute;
- right: -7px;
- top: 0px;
- border: none;
- background-color: #18a689;
- color: #FFFFFF;
- line-height: 33px;
- height: 33px;
- }
- </style>
- @using (Ajax.BeginForm("Save", null, new AjaxOptions()
- {
- HttpMethod = "Post",
- OnBegin = "SubAjax.Loading",
- OnComplete = "SubAjax.Complate",
- OnFailure = "SubAjax.Failure",
- OnSuccess = "SubAjax.Success"
- },
- new { @class = "form-horizontal dig-from", @role = "form" }))
- {
- <div class="wrapper-content">
- <div class="panel-body" style="padding-top:0px;">
- <div class="tab-content">
- <div id="tab-1" class="tab-pane active">
- <div class="form-group">
- <label class="col-lg-3 control-label">选择角色:</label>
- <div class="col-lg-8">
- <select id="postid" name="postid" class="input-sm form-control input-s-sm inline">
- <option value="" @(ViewData["postid"] == null ? "selected=\"selected\"" : "")>--请选择--</option>
- @{ var post = ViewData["postType"] as List<SYS_ROLE>;
- foreach (var item in post)
- {
- <option value="@item.ID" @(Model.USERTYPE != null && Model.USERTYPE == Convert.ToInt32(item.ID) ? "selected" : "")>@item.ROLENAME</option>
- }
- }
- </select>
- </div>
- </div>
- @*<div class="form-group">
- <label class="col-lg-3 control-label">所属经销商:</label>
- <div class="col-lg-8">
- <select id="DPTID" name="DPTID" class="form-control select2">
- <option value="" @(string.IsNullOrEmpty(Model.DPTID) ? "selected" : "")>--请选择--</option>
- @{
- foreach (var item in ViewBag.dpt)
- {
- <option value="@item.id" @(Model.DPTID == @item.id ? "selected" : "")>@CommonHtmlHelper.RtfTextToHtml(item.name)</option>
- }
- }
- </select>
- </div>
- </div>*@
- <div class="clearfix f-hafl">
- <div class="col-hafl">
- <div class="form-group">
- <label class="col-lg-3 control-label">登录账号:</label>
- <div class="col-lg-8">
- @Html.HiddenFor(p => p.ID)
- @Html.TextBoxFor(p => p.ACCOUNT, new { @class = "form-control", @id = "account", @placeholder = "请输入登录账号", @datatype = "*", @nullmsg = "请输入登录账号!", @errormsg = "请输入登录账号!" })
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">手机号:</label>
- <div class="col-lg-8">
- @Html.TextBoxFor(p => p.PHONE, new
- {
- @class = "form-control",
- @datatype = "n",
- @nullmsg = "请输入手机号",
- @placeholder = "请输入手机号",
- @errormsg = "手机号格式无效"
- })
- </div>
- </div>
- </div>
- <div class="col-hafl">
- <div class="form-group">
- <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">用户姓名:</label>
- <div class="col-lg-8">
- @Html.TextBoxFor(p => p.NAME, new { @class = "form-control", @placeholder = "请输入用户姓名", @datatype = "*1-10", @nullmsg = "请输入用户姓名" })
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">属性:</label>
- <div class="col-lg-8" style="text-align:left;">
- <label class="checkbox-inline">
- <input type="checkbox" class="i-check" id="iscanlogin" name="iscanlogin" @(Model.ISCANLOGIN != false ? "checked" : "") />是否锁定
- </label>
- </div>
- </div>
- @*<div class="form-group">
- <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">密码:</label>
- <div class="col-lg-8">
- @Html.TextBoxFor(p => p.WORKNUMBER, new
- {
- @class = "form-control",
- @datatype = "*",
- @type = "password",
- @nullmsg = "请输入用户密码",
- @placeholder = "请输入用户密码",
- @errormsg = "请输入有效的用户密码"
- })
- </div>
- </div>*@
- @*<div class="form-group">
- <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">员工级别:</label>
- <div class="col-lg-8">
- <select name="LEVELS" id="LEVELS" class="form-control" datatype="*" nullmsg="请选择员工级别">
- <option value="">请选择</option>
- @{
- var level = ViewData["levels"] as List<SYS_CODE>;
- if (level != null && level.Count > 0)
- {
- foreach (var item in level)
- {
- <option value="@item.CODEVALUE" @(!string.IsNullOrEmpty(Model.LEVELS) && Model.LEVELS == item.CODEVALUE ? "selected" : "")>@item.NAMETEXT</option>
- }
- }
- }
- </select>
- </div>
- </div>*@
- </div>
- </div>
- @*<div class="form-group">
- <label class="col-lg-3 control-label">兼职经销商:</label>
- <div class="col-lg-8">
- @{ var dptlist = ViewData["dptlist"] as List<SYS_DISTRIBUTORS>;
- var dptname = string.Empty;
- var dptid = string.Empty;
- if (dptlist != null && dptlist.Count > 0)
- {
- dptname = dptlist.Aggregate(string.Empty, (current, t) => current + t.NAME + ",").TrimEnd(',');
- dptid = dptlist.Aggregate(string.Empty, (current, t) => current + t.ID + ",").TrimEnd(',');
- }
- }
- <span id="dpt" class="form-control" style="padding:8px 5px; font-size:14px;overflow:hidden;">
- @dptname
- </span>
- @Html.Hidden("hiddpt", dptid)
- <button class="changeicon" id="changeDpt" type="button">
- 选择
- </button>
- </div>
- </div>*@
- <div class="hr-line-dashed" style="margin:0;">
- <div class="form-group m20">
- <div class="col-sm-2 col-sm-offset-2">
- <button class="btn btn-primary btn-save" type="submit"><i class="fa fa-check"></i> <span>确定保存</span></button>
- <button class="btn btn-warning" id="btn-dig-close" type="button"><i class="im-undo2"></i> 取消返回</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- }
- @section scripts{
- <script type="text/javascript">
- $(function () {
- $('.form-horizontal').initValidform();
- $('.select2').select2();
- //分配部门
- $('#changeDpt').click(function () {
- var vals = $('#hiddpt').val();
- top.dialog({
- url: '/Sys/Department/GetSelectDpt',
- title: '选择经销商',
- width: 450,
- height: 500,
- data: vals, // 给 iframe 的数据
- onclose: function () {
- if (this.returnValue != 'no') {
- $('#hiddpt').val(this.returnValue.split('|')[0]);
- $('#dpt').html(this.returnValue.split('|')[1]);
- //清理岗位
- $('#hidpost').val('');
- $('#post').html('');
- }
- },
- oniframeload: function () {
- }
- }).showModal();
- return false;
- });
- //分配岗位
- $('#changePost').click(function () {
- var dptid = $('#DPTID').val() + ',' + $('#hiddpt').val();
- if ($('#DPTID').val() == '' && $('#hiddpt').val() == '') {
- dig.alertError('提示', '请选择部门后再选择岗位');
- return;
- }
- var vals = $('#hidpost').val();
- top.dialog({
- url: '/Sys/Post/PostUser?dptid=' + dptid,
- title: '分配岗位',
- width: 500,
- height: 500,
- data: vals, // 给 iframe 的数据
- onclose: function () {
- if (this.returnValue != 'no') {
- $('#hidpost').val(this.returnValue.split('|')[0]);
- $('#post').html(this.returnValue.split('|')[1]);
- }
- },
- oniframeload: function () {
- }
- }).showModal();
- return false;
- });
- });
- </script>
- }
|