地铁二期项目正式开始

UserEdit.cshtml 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. @using YTSoft.BaseCallCenter.MVCWeb.Models;
  2. @using YTSoft.BaseCallCenter.Model;
  3. <link href="/Content/layui/css/layui.css" rel="stylesheet" />
  4. <script src="/Content/js/jquery-1.8.3.min.js"></script>
  5. <script src="/Content/layui/layui.js"></script>
  6. <link href="/Content/css/workflow/workflow.css" rel="stylesheet" />
  7. <link href="/Content/layui/zTree/v3/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" />
  8. <script src="/Content/layui/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
  9. <script src="~/Content/js/ytsoft.http.js"></script>
  10. <style>
  11. .aaaaaa {
  12. position: absolute;
  13. }
  14. .ztree {
  15. height: 360px;
  16. overflow-y: auto;
  17. position: absolute;
  18. width: 198px;
  19. left: 0px;
  20. top: 30px;
  21. z-index: 11;
  22. background: #ffffff;
  23. border: 1px solid #cccccc;
  24. display: none;
  25. }
  26. .xl {
  27. background: url(../../Content/images/downSelect.png);
  28. background-position: center center;
  29. width: 20px;
  30. height: 30px;
  31. position: absolute;
  32. right: 0;
  33. top: 1px;
  34. background-color: #1ab394;
  35. cursor: pointer;
  36. }
  37. .xl:hover {
  38. background-color: #e6d523;
  39. }
  40. .passIcon {
  41. display: none;
  42. }
  43. .posiDiv {
  44. position: absolute;
  45. top: -87px;
  46. /* height: 160px; */
  47. width: 240px;
  48. border: 1px solid #000001;
  49. right: -250px;
  50. background: #CCCCFE;
  51. z-index: 11;
  52. line-height: 30px;
  53. padding-left: 15px;
  54. display: none;
  55. }
  56. </style>
  57. <form class="layui-form">
  58. <div>
  59. <div class="rightSide">
  60. <input name="F_UserId" value="@Model.F_UserId" type="hidden" class="layui-input" />
  61. <input name="F_DeptId" class="add_did" value="@Model.F_DeptId" type="hidden" class="layui-input" />
  62. <div>
  63. <div class="divTittle">编辑用户
  64. </div>
  65. <ul>
  66. <li class="layui-row">
  67. <div class="layui-col-xs6">
  68. <label class="layui-form-label" style="width:100px">姓名</label>
  69. <div class="layui-input-block">
  70. <input name="F_UserName" value="@Model.F_UserName" lay-verify="required"
  71. autocomplete="off" placeholder="" class="layui-input" type="text"
  72. style="width:210px" />
  73. </div>
  74. </div>
  75. <div class="layui-col-xs6">
  76. <label class="layui-form-label" style="width:100px">工号</label>
  77. <div class="layui-input-block">
  78. <input name="F_UserCode" value="@Model.F_UserCode" lay-verify="required"
  79. autocomplete="off" placeholder="" class="layui-input" type="text"
  80. style="width:210px" />
  81. </div>
  82. </div>
  83. </li>
  84. <li class="layui-row">
  85. <div class="layui-col-xs6">
  86. <label class="layui-form-label" style="width:100px">分机号</label>
  87. <div class="layui-input-block">
  88. <input name="F_ExtensionNumber" value="@Model.F_ExtensionNumber" autocomplete="off"
  89. placeholder="" class="layui-input" type="text" style="width:210px" />
  90. </div>
  91. </div>
  92. </li>
  93. <li class="layui-row">
  94. <div class="layui-col-xs6">
  95. <label class="layui-form-label" style="width:100px">所属部门</label>
  96. <div class="layui-input-inline">
  97. <div class="form-group" style="position: relative; float:left;">
  98. @* value="@dicModel.F_DeptName" *@
  99. <input autocomplete="off" value="@Model.F_DeptName" style="width: 210px;"
  100. id="searchRegionName" placeholder="请选择" class="layui-input inps" type="text" />
  101. <i class="xl"></i>
  102. <!-- <b class="delect-icon">X</b> -->
  103. <ul id="ztree" class="ztree addTree"></ul>
  104. </div>
  105. </div>
  106. </div>
  107. <div class="layui-col-xs6">
  108. <label class="layui-form-label" style="width:100px">角色</label>
  109. <div class="layui-input-inline">
  110. <select name="F_RoleId" lay-verify="required" lay-search="">
  111. <option value=""></option>
  112. @if (Model.RoleInfoList != null && Model.RoleInfoList.Count > 0)
  113. {
  114. foreach (T_Sys_RoleInfo dicModel in Model.RoleInfoList)
  115. {
  116. if (Model.F_RoleId > 0)
  117. {
  118. if (Model.F_RoleId == dicModel.F_RoleId)
  119. {
  120. <option value="@dicModel.F_RoleId" selected>@dicModel.F_RoleName</option>
  121. }
  122. else
  123. {
  124. <option value="@dicModel.F_RoleId">@dicModel.F_RoleName</option>
  125. }
  126. }
  127. else
  128. {
  129. <option value="@dicModel.F_RoleId">@dicModel.F_RoleName</option>
  130. }
  131. }
  132. }
  133. </select>
  134. </div>
  135. </div>
  136. </li>
  137. <li class="layui-row">
  138. <div class="layui-col-xs6" style="position: relative;">
  139. <label class="layui-form-label" style="width:100px">密码</label>
  140. <div class="layui-input-block" style="display: flex;">
  141. <input id="pwd1" name="F_Password" value="@Model.F_Password" lay-verify="required"
  142. autocomplete="off" placeholder="" class="layui-input" type="password"
  143. style="width:210px" />
  144. <i class="layui-icon passIcon"
  145. style=" font-size: 25px !important; color:red; margin-left:8px">&#xe63a;</i>
  146. </div>
  147. <div class="posiDiv">
  148. <p>*口令长度必须至少为 8 个字符。</p>
  149. <p>*口令必须至少包含 1 个特殊字符。</p>
  150. <p>*口令必须至少包含 1 个大写字母。</p>
  151. <p>*口令必须至少包含 1 个数字</p>
  152. <p>*口令不能匹配或包含用户 ID</p>
  153. </div>
  154. </div>
  155. <div class="layui-col-xs6">
  156. <label class="layui-form-label" style="width:100px">确认密码</label>
  157. <div class="layui-input-block">
  158. <input id="pwd2" name="F_Password" value="@Model.F_Password" lay-verify="required"
  159. autocomplete="off" placeholder="" class="layui-input" type="password"
  160. style="width:210px" />
  161. </div>
  162. </div>
  163. </li>
  164. <li class="layui-row">
  165. <div class="layui-col-xs6">
  166. <label class="layui-form-label" style="width:100px">性别</label>
  167. <div class="layui-input-block">
  168. @if (!string.IsNullOrEmpty(Model.F_SexFlag))
  169. {
  170. if (Model.F_SexFlag == "男")
  171. {
  172. <input type="radio" name="F_SexFlag" value="男" title="男" checked="">
  173. <input type="radio" name="F_SexFlag" value="女" title="女">
  174. }
  175. else
  176. {
  177. <input type="radio" name="F_SexFlag" value="男" title="男">
  178. <input type="radio" name="F_SexFlag" value="女" title="女" checked="">
  179. }
  180. }
  181. else
  182. {
  183. <input type="radio" name="F_SexFlag" value="男" title="男">
  184. <input type="radio" name="F_SexFlag" value="女" title="女" checked="">
  185. }
  186. </div>
  187. </div>
  188. <div class="layui-col-xs6">
  189. <label class="layui-form-label" style="width:100px">电话号码</label>
  190. <div class="layui-input-block">
  191. <input name="F_Telephone" value="@Model.F_Telephone" autocomplete="off" placeholder=""
  192. class="layui-input" type="text" style="width:210px" />
  193. </div>
  194. </div>
  195. </li>
  196. <li class="layui-row">
  197. <div class="layui-col-xs6">
  198. <label class="layui-form-label" style="width:100px">话务标志</label>
  199. <div class="layui-input-block">
  200. @if (Model.F_SeatFlag != null && Model.F_SeatFlag)
  201. {
  202. <input name="F_SeatFlag" title="使用" checked="" type="checkbox">
  203. }
  204. else
  205. {
  206. <input name="F_SeatFlag" title="使用" type="checkbox">
  207. }
  208. </div>
  209. </div>
  210. <div class="layui-col-xs6">
  211. <label class="layui-form-label" style="width:100px">坐席等级</label>
  212. <div class="layui-input-block">
  213. @if (!string.IsNullOrEmpty(Model.F_SeatRight))
  214. {
  215. if (Model.F_SeatRight == "1")
  216. {
  217. <input type="radio" name="F_SeatRight" value="0" title="普通坐席">
  218. <input type="radio" name="F_SeatRight" value="1" title="班长坐席" checked="">
  219. }
  220. else
  221. {
  222. <input type="radio" name="F_SeatRight" value="0" title="普通坐席" checked="">
  223. <input type="radio" name="F_SeatRight" value="1" title="班长坐席">
  224. }
  225. }
  226. else
  227. {
  228. <input type="radio" name="F_SeatRight" value="0" title="普通坐席" checked="">
  229. <input type="radio" name="F_SeatRight" value="1" title="班长坐席">
  230. }
  231. </div>
  232. </div>
  233. </li>
  234. <li class="layui-row ">
  235. <div class="layui-col-md12">
  236. <label class="layui-form-label" style="width:100px">备注</label>
  237. <div class="layui-input-block">
  238. <textarea style="width:600px" name="F_Remark" placeholder=""
  239. class="layui-textarea">@Model.F_Remark</textarea>
  240. </div>
  241. </div>
  242. </li>
  243. </ul>
  244. </div>
  245. <div>
  246. <ul>
  247. <li class="layui-row">
  248. <div class="layui-col-md12 btndiv">
  249. <button class="layui-btn" lay-submit="" lay-filter="SubmitData">保存</button>
  250. </div>
  251. </li>
  252. </ul>
  253. </div>
  254. </div>
  255. </div>
  256. </form>
  257. <script src="~/Content/js/sysmanage/useredit.js?v=0.3"></script>
  258. <script>
  259. $(".passIcon").hover(function () {
  260. $(".posiDiv").show()
  261. }, function () {
  262. $(".posiDiv").hide()
  263. })
  264. if(helper.cookies.get('newDeptname')){
  265. $("#searchRegionName").val(helper.cookies.get('newDeptname'))
  266. }
  267. console.log($(".add_did").val())
  268. //单击左侧数列表时
  269. $('.inps').focus(function () {
  270. $(this).siblings('.addTree').css('display', 'block');
  271. })
  272. $('.xl').click(function () {
  273. var xl = $(this).siblings('.addTree');
  274. if (xl.css('display') == 'block') {
  275. xl.css('display', 'none')
  276. } else {
  277. xl.css('display', 'block')
  278. }
  279. })
  280. $('.addTree').mouseleave(function () {
  281. $(this).css('display', 'none')
  282. })
  283. var zTreeObj;
  284. var selectNode;
  285. // zTree 的参数配置,深入使用请参考 API 文档(setting 配置详解)
  286. var setting = {
  287. data: {
  288. key: {
  289. name: "name"
  290. },
  291. simpleData: {
  292. enable: true,
  293. idKey: "id",
  294. rootPId: 0
  295. }
  296. },
  297. view: {
  298. dblClickExpand: true
  299. },
  300. callback: {
  301. onClick: ztreeDep
  302. },
  303. };
  304. function ztreeDep(event, treeId, treeNode) {
  305. console.log(treeNode.name)
  306. $('.inps').val(treeNode.name);
  307. $('.add_did').val(treeNode.id);
  308. };
  309. var treeNodes;
  310. $(document).ready(function () {
  311. $.ajax({
  312. url: "/SystemManage/GetDepartmentJsonModel",
  313. type: "get",
  314. contentType: "application/json",
  315. dataType: "text",
  316. cache: false,
  317. async: false,
  318. data: { "parentId": 0 },
  319. success: function (result, status) {
  320. treeNodes = eval('(' + result + ')');
  321. }
  322. });
  323. zTreeObj = $.fn.zTree.init($("#ztree"), setting, treeNodes);
  324. zTreeObj.expandAll(false);
  325. });
  326. </script>