leave1Form.jsp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/webpage/include/taglib.jsp"%>
  3. <html>
  4. <head>
  5. <title>请假表单管理</title>
  6. <meta name="decorator" content="ani"/>
  7. <script type="text/javascript">
  8. $(document).ready(function() {
  9. $('#beginDate').datetimepicker({
  10. format: "YYYY-MM-DD HH:mm:ss"
  11. });
  12. $('#endDate').datetimepicker({
  13. format: "YYYY-MM-DD HH:mm:ss"
  14. });
  15. });
  16. function save() {
  17. var isValidate = jp.validateForm('#inputForm');//校验表单
  18. if(!isValidate){
  19. return false;
  20. }else{
  21. jp.loading();
  22. jp.post("${ctx}/test/one/dialog/leave1/save",$('#inputForm').serialize(),function(data){
  23. if(data.success){
  24. jp.getParent().refresh();
  25. var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
  26. parent.layer.close(dialogIndex);
  27. jp.success(data.msg)
  28. }else{
  29. jp.error(data.msg);
  30. }
  31. })
  32. }
  33. }
  34. </script>
  35. </head>
  36. <body class="bg-white">
  37. <form:form id="inputForm" modelAttribute="leave1" class="form-horizontal">
  38. <form:hidden path="id"/>
  39. <table class="table table-bordered">
  40. <tbody>
  41. <tr>
  42. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>归属部门:</label></td>
  43. <td class="width-35">
  44. <sys:treeselect id="office" name="office.id" value="${leave1.office.id}" labelName="office.name" labelValue="${leave1.office.name}"
  45. title="部门" url="/sys/office/treeData?type=2" cssClass="form-control required" allowClear="true" notAllowSelectParent="true"/>
  46. </td>
  47. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>员工:</label></td>
  48. <td class="width-35">
  49. <sys:userselect id="tuser" name="tuser.id" value="${leave1.tuser.id}" labelName="tuser.name" labelValue="${leave1.tuser.name}"
  50. cssClass="form-control required"/>
  51. </td>
  52. </tr>
  53. <tr>
  54. <td class="width-15 active"><label class="pull-right">归属区域:</label></td>
  55. <td class="width-35">
  56. <div class=" input-group" style=" width: 100%;">
  57. <form:input path="area" htmlEscape="false" class="" data-toggle="city-picker" style="height: 34px;"/>
  58. </div>
  59. </td>
  60. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>请假开始日期:</label></td>
  61. <td class="width-35">
  62. <div class='input-group form_datetime' id='beginDate'>
  63. <input type='text' name="beginDate" class="form-control required" value="<fmt:formatDate value="${leave1.beginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
  64. <span class="input-group-addon">
  65. <span class="glyphicon glyphicon-calendar"></span>
  66. </span>
  67. </div>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>请假结束日期:</label></td>
  72. <td class="width-35">
  73. <div class='input-group form_datetime' id='endDate'>
  74. <input type='text' name="endDate" class="form-control required" value="<fmt:formatDate value="${leave1.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
  75. <span class="input-group-addon">
  76. <span class="glyphicon glyphicon-calendar"></span>
  77. </span>
  78. </div>
  79. </td>
  80. <td class="width-15 active"><label class="pull-right">备注信息:</label></td>
  81. <td class="width-35">
  82. <form:textarea path="remarks" htmlEscape="false" rows="4" class="form-control "/>
  83. </td>
  84. </tr>
  85. </tbody>
  86. </table>
  87. </form:form>
  88. </body>
  89. </html>