add.html 3.7 KB

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