edit.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
  3. <head>
  4. <th:block th:include="include :: header('修改字典数据')" />
  5. </head>
  6. <body class="white-bg">
  7. <div class="wrapper wrapper-content animated fadeInRight ibox-content">
  8. <form class="form-horizontal m" id="form-dict-edit" th:object="${dict}">
  9. <input name="dictCode" type="hidden" th:field="*{dictCode}" />
  10. <div class="form-group">
  11. <label class="col-sm-3 control-label is-required">字典标签:</label>
  12. <div class="col-sm-8">
  13. <input class="form-control" type="text" name="dictLabel" id="dictLabel" th:field="*{dictLabel}" required>
  14. </div>
  15. </div>
  16. <div class="form-group">
  17. <label class="col-sm-3 control-label is-required">字典键值:</label>
  18. <div class="col-sm-8">
  19. <input class="form-control" type="text" name="dictValue" id="dictValue" th:field="*{dictValue}" required>
  20. </div>
  21. </div>
  22. <div class="form-group">
  23. <label class="col-sm-3 control-label">字典类型:</label>
  24. <div class="col-sm-8">
  25. <input class="form-control" type="text" readonly="true" th:field="*{dictType}">
  26. </div>
  27. </div>
  28. <div class="form-group">
  29. <label class="col-sm-3 control-label">样式属性:</label>
  30. <div class="col-sm-8">
  31. <input class="form-control" type="text" id="cssClass" name="cssClass" th:field="*{cssClass}">
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. <label class="col-sm-3 control-label is-required">字典排序:</label>
  36. <div class="col-sm-8">
  37. <input class="form-control" type="text" name="dictSort" th:field="*{dictSort}" required>
  38. </div>
  39. </div>
  40. <div class="form-group">
  41. <label class="col-sm-3 control-label">回显样式:</label>
  42. <div class="col-sm-8">
  43. <select name="listClass" class="form-control m-b">
  44. <option value="" th:field="*{listClass}">---请选择---</option>
  45. <option value="default" th:field="*{listClass}">默认</option>
  46. <option value="primary" th:field="*{listClass}">主要</option>
  47. <option value="success" th:field="*{listClass}">成功</option>
  48. <option value="info" th:field="*{listClass}">信息</option>
  49. <option value="warning" th:field="*{listClass}">警告</option>
  50. <option value="danger" th:field="*{listClass}">危险</option>
  51. </select>
  52. <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> table表格字典列显示样式属性</span>
  53. </div>
  54. </div>
  55. <div class="form-group">
  56. <label class="col-sm-3 control-label">系统默认:</label>
  57. <div class="col-sm-8">
  58. <div class="radio-box" th:each="dict : ${@dict.getType('sys_yes_no')}">
  59. <input type="radio" th:id="${dict.dictCode}" name="isDefault" th:value="${dict.dictValue}" th:field="*{isDefault}">
  60. <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="form-group">
  65. <label class="col-sm-3 control-label">状态:</label>
  66. <div class="col-sm-8">
  67. <div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
  68. <input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
  69. <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="form-group">
  74. <label class="col-sm-3 control-label">备注:</label>
  75. <div class="col-sm-8">
  76. <textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
  77. </div>
  78. </div>
  79. </form>
  80. </div>
  81. <th:block th:include="include :: footer" />
  82. <script type="text/javascript">
  83. var prefix = ctx + "system/dict/data";
  84. $("#form-dict-edit").validate({
  85. rules:{
  86. dictSort:{
  87. digits:true
  88. },
  89. },
  90. focusCleanup: true
  91. });
  92. function submitHandler() {
  93. if ($.validate.form()) {
  94. $.operate.save(prefix + "/edit", $('#form-dict-edit').serialize());
  95. }
  96. }
  97. </script>
  98. </body>
  99. </html>