add.jsp 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <!doctype html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <%@ include file="../../common/head.jsp"%>
  8. <link rel="stylesheet" type="text/css" href="../res/js//plugins/webuploader/webuploader.css">
  9. <link rel="stylesheet" type="text/css" href="../res/css/demo/webuploader-demo.css">
  10. <script type="text/javascript" src="../res/js/plugins/webuploader/webuploader.js"></script>
  11. <script type="text/javascript" src="../res/js/plugins/webuploader/uploader.js"></script>
  12. <cs:initFile/>
  13. <script type="text/javascript">
  14. $(function () {
  15. $("#airportDiv").hide();
  16. $("#airwaysDiv").hide();
  17. });
  18. function dotype(type){
  19. if(type == 0){
  20. $("#airportDiv").hide();
  21. $("#airwaysDiv").hide();
  22. }else if(type == 1){
  23. $("#airportDiv").show();
  24. $("#airwaysDiv").hide();
  25. }else if(type ==2){
  26. $("#airportDiv").show();
  27. $("#airwaysDiv").show();
  28. }
  29. }
  30. function doItem(id) {
  31. $('#airwaysId').empty();
  32. $('#airwaysId').html('<option value="">--无--</option>');
  33. $.getJSON('../machine/getAirways.cs', {
  34. 'airportId': $('#airportId').val()
  35. }, function (data) {
  36. $.each(data, function (i, obj) {
  37. $("#airwaysId").append('<option value="' + obj.id+'">' + obj.name + '</option>');
  38. });
  39. });
  40. }
  41. </script>
  42. </head>
  43. <body>
  44. <div class="wrapper wrapper-content">
  45. <div class="row">
  46. <div class="col-sm-12">
  47. <cs:form_validate formId="addUserForm"/>
  48. <form class="form-horizontal" action="add.cs" id="addUserForm" method="POST">
  49. <!-- <div class="form-group"> -->
  50. <!-- <label class="col-sm-3 control-label">类型:</label> -->
  51. <!-- <div class="col-sm-6"> -->
  52. <!-- <input id="type" name="type" class="form-control" validate="{required:true}" validateMessage="{required:'请输入类型'}" > -->
  53. <!-- </div> -->
  54. <!-- </div>
  55. <div class="form-group">
  56. <label class="col-sm-3 control-label">代码:</label>
  57. <div class="col-sm-6">
  58. <input id="code" name="code" class="form-control" validate="{required:true}" validateMessage="{required:'请输入code,不能重复'}" >
  59. </div>
  60. </div>
  61. -->
  62. <div class="form-group">
  63. <label class="col-sm-3 control-label">姓名:</label>
  64. <div class="col-sm-6">
  65. <input id="name" name="name" class="form-control" validate="{required:true}" validateMessage="{required:'请输入名称'}" >
  66. </div>
  67. </div>
  68. <div class="form-group">
  69. <label class="col-sm-3 control-label">账号:</label>
  70. <div class="col-sm-6">
  71. <input id="account" name="account" class="form-control" validate="{required:true}" validateMessage="{required:'请输入账号'}" >
  72. </div>
  73. </div>
  74. <div class="form-group">
  75. <label class="col-sm-3 control-label">密码:</label>
  76. <div class="col-sm-6">
  77. <input id="pwd" name="pwd" type="password" class="form-control" validate="{required:true}" validateMessage="{required:'请输入密码'}" >
  78. </div>
  79. </div>
  80. <div class="form-group">
  81. <label class="col-sm-3 control-label">用户类型:</label>
  82. <div class="col-sm-6">
  83. <select class="form-control" name="type" onchange="dotype(this.value)">
  84. <option value="0">平台管理员</option>
  85. </select>
  86. </div>
  87. </div>
  88. <div class="form-group" id="airportDiv">
  89. <label class="col-sm-3 control-label">所在机场:</label>
  90. <div class="col-sm-6">
  91. <select class="form-control" name="airportId" id="airportId" onchange="doItem(this.value)" validate="{required:true}" validateMessage="{required:'请选择所在机场'}">
  92. <%--<option value="0">--请选择--</option>--%>
  93. <c:forEach items="${airportList}" var="airport">
  94. <option value="${airport.id}">${airport.name}</option>
  95. </c:forEach>
  96. </select>
  97. </div>
  98. </div>
  99. <div class="form-group" id="airwaysDiv">
  100. <label class="col-sm-3 control-label">所在航空公司:</label>
  101. <div class="col-sm-6">
  102. <select class="form-control" name="airwaysId" id="airwaysId" validate="{required:true}" validateMessage="{required:'请选择所在航空公司'}">
  103. <option value="0">--无--</option>
  104. </select>
  105. </div>
  106. </div>
  107. <%-- <div class="form-group">
  108. <label class="col-sm-3 control-label">性别:</label>
  109. <div class="col-sm-6">
  110. <select class="form-control" name="sex">
  111. <option value="1">男</option>
  112. <option value="2">女</option>
  113. </select>
  114. </div>
  115. </div>
  116. <div class="form-group">
  117. <label class="col-sm-3 control-label">头像:</label>
  118. <div class="col-sm-6">
  119. <cs:file name="licessePic" type="100"></cs:file>
  120. </div>
  121. </div>
  122. --%>
  123. <div class="form-group">
  124. <label class="col-sm-3 control-label">描述:</label>
  125. <div class="col-sm-6">
  126. <input id="remark" name="remark" class="form-control" >
  127. </div>
  128. </div>
  129. <!-- <div class="form-group"> -->
  130. <!-- <label class="col-sm-3 control-label">:</label> -->
  131. <!-- <div class="col-sm-6"> -->
  132. <!-- <input id="weight" name="weight" class="form-control" > -->
  133. <!-- </div> -->
  134. <!-- </div> -->
  135. <div class="form-group">
  136. <div class="col-sm-4 col-sm-offset-3 pull-left">
  137. <button class="btn btn-default btn-dlg-close">取消</button>
  138. <button class="btn btn-primary" type="submit">提交</button>
  139. </div>
  140. </div>
  141. </form>
  142. </div>
  143. </div>
  144. </div>
  145. </body>
  146. </html>