WarehouseDetail.cshtml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. @{
  2. ViewBag.Title = "Detail";
  3. Layout = "~/Views/Shared/_Layout.cshtml";
  4. }
  5. @using MES.Production.Service;
  6. @using Central.Control.Domain;
  7. @using Ant.Service.Common;
  8. @using Ant.Service.Common.Enums;
  9. @using CommonToolHelper;
  10. @model SYS_USER
  11. <style>
  12. body {
  13. background-color: white;
  14. }
  15. .changeicon {
  16. float: right;
  17. margin-right: -15px;
  18. position: absolute;
  19. right: -7px;
  20. top: 0px;
  21. border: none;
  22. background-color: #18a689;
  23. color: #FFFFFF;
  24. line-height: 33px;
  25. height: 33px;
  26. }
  27. </style>
  28. @using (Ajax.BeginForm("UserSave", null, new AjaxOptions()
  29. {
  30. HttpMethod = "Post",
  31. OnBegin = "SubAjax.Loading",
  32. OnComplete = "SubAjax.Complate",
  33. OnFailure = "SubAjax.Failure",
  34. OnSuccess = "SubAjax.Success"
  35. },
  36. new { @class = "form-horizontal dig-from", @role = "form" }))
  37. {
  38. <div class="wrapper-content">
  39. <div class="panel-body" style="padding-top:0px;">
  40. <div class="tab-content">
  41. <div id="tab-1" class="tab-pane active">
  42. <div class="form-group">
  43. <label class="col-lg-3 control-label">选择角色:</label>
  44. <div class="col-lg-8">
  45. <select id="postid" name="postid" class="input-sm form-control input-s-sm inline">
  46. <option value="" @(ViewData["postid"] == null ? "selected=\"selected\"" : "")>--请选择--</option>
  47. @{ var post = ViewData["postType"] as List<SYS_CODE>;
  48. foreach (var item in post)
  49. {
  50. <option value="@item.CODEVALUE" @(Model.USERTYPE != null && Model.USERTYPE == Convert.ToInt32(item.CODEVALUE) ? "selected" : "")>@item.NAMETEXT</option>
  51. }
  52. }
  53. </select>
  54. </div>
  55. </div>
  56. @*<div class="form-group">
  57. <label class="col-lg-3 control-label">所属经销商:</label>
  58. <div class="col-lg-8">
  59. <select id="DPTID" name="DPTID" class="form-control select2">
  60. <option value="" @(string.IsNullOrEmpty(Model.DPTID) ? "selected" : "")>--请选择--</option>
  61. @{
  62. foreach (var item in ViewBag.dpt)
  63. {
  64. <option value="@item.id" @(Model.DPTID == @item.id ? "selected" : "")>@CommonHtmlHelper.RtfTextToHtml(item.name)</option>
  65. }
  66. }
  67. </select>
  68. </div>
  69. </div>*@
  70. <div class="clearfix f-hafl">
  71. <div class="col-hafl">
  72. @*<div class="form-group">
  73. <label class="col-lg-3 control-label">登录账号:</label>
  74. <div class="col-lg-8">
  75. @Html.HiddenFor(p => p.ID)
  76. @Html.TextBoxFor(p => p.ACCOUNT, new { @class = "form-control", @id = "account", @placeholder = "请输入登录账号", @datatype = "*", @nullmsg = "请输入登录账号!", @errormsg = "请输入登录账号!" })
  77. </div>
  78. </div>*@
  79. <div class="form-group">
  80. <label class="col-lg-3 control-label">手机号:</label>
  81. <div class="col-lg-8">
  82. @Html.HiddenFor(p => p.ID)
  83. @Html.TextBoxFor(p => p.PHONE, new
  84. {
  85. @class = "form-control",
  86. @datatype = "n11-11",
  87. @nullmsg = "请输入手机号",
  88. @placeholder = "请输入手机号",
  89. @errormsg = "手机号只能输入数字"
  90. })
  91. </div>
  92. </div>
  93. </div>
  94. <div class="col-hafl">
  95. <div class="form-group">
  96. <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">用户姓名:</label>
  97. <div class="col-lg-8">
  98. @Html.TextBoxFor(p => p.NAME, new { @class = "form-control", @placeholder = "请输入用户姓名", @datatype = "*1-10", @nullmsg = "请输入用户姓名" })
  99. </div>
  100. </div>
  101. @*<div class="form-group">
  102. <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">属性:</label>
  103. <div class="col-lg-8" style="text-align:left;">
  104. <label class="checkbox-inline">
  105. <input type="checkbox" class="i-check" id="iscanlogin" name="iscanlogin" @(Model.ISCANLOGIN != false ? "checked" : "") />是否锁定
  106. </label>
  107. </div>
  108. </div>*@
  109. @*<div class="form-group">
  110. <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">密码:</label>
  111. <div class="col-lg-8">
  112. @Html.TextBoxFor(p => p.WORKNUMBER, new
  113. {
  114. @class = "form-control",
  115. @datatype = "*",
  116. @type = "password",
  117. @nullmsg = "请输入用户密码",
  118. @placeholder = "请输入用户密码",
  119. @errormsg = "请输入有效的用户密码"
  120. })
  121. </div>
  122. </div>*@
  123. @*<div class="form-group">
  124. <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">员工级别:</label>
  125. <div class="col-lg-8">
  126. <select name="LEVELS" id="LEVELS" class="form-control" datatype="*" nullmsg="请选择员工级别">
  127. <option value="">请选择</option>
  128. @{
  129. var level = ViewData["levels"] as List<SYS_CODE>;
  130. if (level != null && level.Count > 0)
  131. {
  132. foreach (var item in level)
  133. {
  134. <option value="@item.CODEVALUE" @(!string.IsNullOrEmpty(Model.LEVELS) && Model.LEVELS == item.CODEVALUE ? "selected" : "")>@item.NAMETEXT</option>
  135. }
  136. }
  137. }
  138. </select>
  139. </div>
  140. </div>*@
  141. </div>
  142. </div>
  143. @*<div class="form-group">
  144. <label class="col-lg-3 control-label">兼职经销商:</label>
  145. <div class="col-lg-8">
  146. @{ var dptlist = ViewData["dptlist"] as List<SYS_DISTRIBUTORS>;
  147. var dptname = string.Empty;
  148. var dptid = string.Empty;
  149. if (dptlist != null && dptlist.Count > 0)
  150. {
  151. dptname = dptlist.Aggregate(string.Empty, (current, t) => current + t.NAME + ",").TrimEnd(',');
  152. dptid = dptlist.Aggregate(string.Empty, (current, t) => current + t.ID + ",").TrimEnd(',');
  153. }
  154. }
  155. <span id="dpt" class="form-control" style="padding:8px 5px; font-size:14px;overflow:hidden;">
  156. @dptname
  157. </span>
  158. @Html.Hidden("hiddpt", dptid)
  159. <button class="changeicon" id="changeDpt" type="button">
  160. 选择
  161. </button>
  162. </div>
  163. </div>*@
  164. <div class="hr-line-dashed" style="margin:0;">
  165. <div class="form-group m20">
  166. <div class="col-sm-2 col-sm-offset-2">
  167. <button class="btn btn-primary btn-save" type="submit"><i class="fa fa-check"></i> <span>确定保存</span></button>
  168. <button class="btn btn-warning" id="btn-dig-close" type="button"><i class="im-undo2"></i> 取消返回</button>
  169. </div>
  170. </div>
  171. </div>
  172. </div>
  173. </div>
  174. </div>
  175. </div>
  176. }
  177. @section scripts{
  178. <script type="text/javascript">
  179. $(function () {
  180. $('.form-horizontal').initValidform();
  181. $('.select2').select2();
  182. //分配部门
  183. $('#changeDpt').click(function () {
  184. var vals = $('#hiddpt').val();
  185. top.dialog({
  186. url: '/Sys/Department/GetSelectDpt',
  187. title: '选择经销商',
  188. width: 450,
  189. height: 500,
  190. data: vals, // 给 iframe 的数据
  191. onclose: function () {
  192. if (this.returnValue != 'no') {
  193. $('#hiddpt').val(this.returnValue.split('|')[0]);
  194. $('#dpt').html(this.returnValue.split('|')[1]);
  195. //清理岗位
  196. $('#hidpost').val('');
  197. $('#post').html('');
  198. }
  199. },
  200. oniframeload: function () {
  201. }
  202. }).showModal();
  203. return false;
  204. });
  205. //分配岗位
  206. $('#changePost').click(function () {
  207. var dptid = $('#DPTID').val() + ',' + $('#hiddpt').val();
  208. if ($('#DPTID').val() == '' && $('#hiddpt').val() == '') {
  209. dig.alertError('提示', '请选择部门后再选择岗位');
  210. return;
  211. }
  212. var vals = $('#hidpost').val();
  213. top.dialog({
  214. url: '/Sys/Post/PostUser?dptid=' + dptid,
  215. title: '分配岗位',
  216. width: 500,
  217. height: 500,
  218. data: vals, // 给 iframe 的数据
  219. onclose: function () {
  220. if (this.returnValue != 'no') {
  221. $('#hidpost').val(this.returnValue.split('|')[0]);
  222. $('#post').html(this.returnValue.split('|')[1]);
  223. }
  224. },
  225. oniframeload: function () {
  226. }
  227. }).showModal();
  228. return false;
  229. });
  230. });
  231. </script>
  232. }