edit.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
  3. <head>
  4. <th:block th:include="include :: header('修改网格人员管理')" />
  5. <th:block th:include="include :: datetimepicker-css" />
  6. </head>
  7. <body class="white-bg">
  8. <div class="wrapper wrapper-content animated fadeInRight ibox-content">
  9. <form class="form-horizontal m" id="form-gridPerson-edit" th:object="${busGridPersonInfo}">
  10. <input name="gridPersonId" th:field="*{gridPersonId}" type="hidden">
  11. <input name="deptId" th:field="*{deptId}" class="form-control" type="hidden" id="treeId">
  12. <div class="form-group">
  13. <label class="col-sm-3 control-label">归属部门:</label>
  14. <div class="col-sm-8">
  15. <input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" id="treeName" th:field="*{deptName}" required>
  16. </div>
  17. </div>
  18. <div class="form-group">
  19. <label class="col-sm-3 control-label">网格人员姓名:</label>
  20. <div class="col-sm-8">
  21. <input name="personName" th:field="*{personName}" class="form-control" type="text">
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label class="col-sm-3 control-label">性别:</label>
  26. <div class="col-sm-8">
  27. <select name="personSex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
  28. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{personSex}"></option>
  29. </select>
  30. </div>
  31. </div>
  32. <div class="form-group">
  33. <label class="col-sm-3 control-label">手机号:</label>
  34. <div class="col-sm-8">
  35. <input name="personPhone" th:field="*{personPhone}" class="form-control" type="text">
  36. </div>
  37. </div>
  38. <div class="form-group">
  39. <label class="col-sm-3 control-label">身份证号:</label>
  40. <div class="col-sm-8">
  41. <input name="personIdcard" th:field="*{personIdcard}" class="form-control" type="text">
  42. </div>
  43. </div>
  44. <div class="form-group">
  45. <label class="col-sm-3 control-label">所属岗位:</label>
  46. <div class="col-sm-8">
  47. <select name="postId" class="form-control m-b" th:with="type=${@dict.getType('grid_person_type')}">
  48. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{postId}"></option>
  49. </select>
  50. </div>
  51. </div>
  52. <div class="form-group">
  53. <label class="col-sm-3 control-label">入职时间:</label>
  54. <div class="col-sm-8">
  55. <div class="input-group date">
  56. <input name="wordTime" th:value="${#dates.format(busGridPersonInfo.wordTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
  57. <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
  58. </div>
  59. </div>
  60. </div>
  61. </form>
  62. </div>
  63. <th:block th:include="include :: footer" />
  64. <th:block th:include="include :: datetimepicker-js" />
  65. <script th:inline="javascript">
  66. var prefix = ctx + "grid/gridPerson";
  67. $("#form-gridPerson-edit").validate({
  68. focusCleanup: true
  69. });
  70. function submitHandler() {
  71. if ($.validate.form()) {
  72. $.operate.save(prefix + "/edit", $('#form-gridPerson-edit').serialize());
  73. }
  74. }
  75. $("input[name='wordTime']").datetimepicker({
  76. format: "yyyy-mm-dd",
  77. minView: "month",
  78. autoclose: true
  79. });
  80. /*网格人员管理-修改-选择部门树*/
  81. function selectDeptTree() {
  82. var deptId = $.common.isEmpty($("#treeId").val()) ? "100" : $("#treeId").val();
  83. var url = ctx + "system/dept/selectDeptTree/" + deptId;
  84. var options = {
  85. title: '选择部门',
  86. width: "380",
  87. url: url,
  88. callBack: doSubmit
  89. };
  90. $.modal.openOptions(options);
  91. }
  92. function doSubmit(index, layero){
  93. var tree = layero.find("iframe")[0].contentWindow.$._tree;
  94. if ($.tree.notAllowParents(tree)) {
  95. var body = layer.getChildFrame('body', index);
  96. $("#treeId").val(body.find('#treeId').val());
  97. $("#treeName").val(body.find('#treeName').val());
  98. layer.close(index);
  99. }
  100. }
  101. </script>
  102. </body>
  103. </html>