contractConfigInfo.jsp 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <%@ page contentType="text/html;charset=GBK"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <HEAD>
  5. <TITLE>合作公司信息</TITLE>
  6. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  7. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  8. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  9. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  10. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  11. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"
  12. type="text/javascript"></script>
  13. <script type="text/javascript" src="/shares/js/constant.js"></script>
  14. <script type="text/javascript" src="/shares/js/common.js"></script>
  15. <script type="text/javascript">
  16. $(document).ready(function(){
  17. var warn_way_value=$("#warn_way_value").val();
  18. var warn_target_value=$("#warn_target_value").val();
  19. var warn_target=warn_target_value.split(",");
  20. var warn_ways=warn_way_value.split(",");
  21. $("input[name='warn_target']").each(function(){
  22. var vl=$(this).val();
  23. for(var i=0;i<warn_target.length;i++){
  24. if(vl==warn_target[i]){
  25. $(this).attr("checked",true);
  26. }
  27. }
  28. });
  29. $("input[name='warn_ways']").each(function(){
  30. var vl=$(this).val();
  31. for(var i=0;i<warn_ways.length;i++){
  32. if(vl==warn_ways[i]){
  33. $(this).attr("checked",true);
  34. }
  35. }
  36. });
  37. });
  38. function editContractConfig(){
  39. var rs= $.validate({name:"warn_days",model:[{type:"require",msg:"预警天数不能为空!"},
  40. {type:"isNumber",msg:"预警天数只能为数字!"},
  41. {type:"size",min:1,msg:"预警天数不能小于1!"}]});
  42. if(!rs)return;
  43. var warn_target_value="";
  44. $("input[name='warn_target']:checked").each(function(){
  45. if(warn_target_value==""){
  46. warn_target_value+=$(this).val();
  47. }else{
  48. warn_target_value+=","+$(this).val();
  49. }
  50. });
  51. $("#warn_target_value").val(warn_target_value);
  52. var warn_ways_value="";
  53. $("input[name='warn_ways']:checked").each(function(){
  54. if(warn_ways_value==""){
  55. warn_ways_value+=$(this).val();
  56. }else{
  57. warn_ways_value+=","+$(this).val();
  58. }
  59. });
  60. $("#warn_way_value").val(warn_ways_value);
  61. $("#addContractConfigForm").submit();
  62. }
  63. </script>
  64. <style type="text/css">
  65. body {
  66. padding: 5px;
  67. margin: 0;
  68. }
  69. #layout1 {
  70. width: 100%;
  71. margin: 0;
  72. padding: 0;
  73. }
  74. .l-button {
  75. margin-left: 1px;
  76. }
  77. #deptBtn {
  78. width: 100%;
  79. background: #e5ecf9;
  80. text-align: center;
  81. height: 25px;
  82. padding-top: 3px
  83. }
  84. #leftBtn{
  85. width: 100%;
  86. background: #e5ecf9;
  87. height: 25px;
  88. padding-top: 3px
  89. }
  90. .l-layout-left {
  91. overflow-y: auto;
  92. }
  93. </style>
  94. </HEAD>
  95. <BODY>
  96. <%@ include file="/include/button.jsp"%>
  97. <%@ include file="/include/message.jsp"%>
  98. <div class="l-content">
  99. <form id="addContractConfigForm" name="addContractConfigForm" method="post" action="contractConfig.do?task=editContractConfig">
  100. <div id="layout1">
  101. <div position="center" id="center" title="新增转移" class="forum-container">
  102. <input id="tabid" name="tabid" value="${param.tabid }" type="hidden"/>
  103. <input id="serverDate" name="serverDate" value="${serverDate }" type="hidden"/>
  104. <input type="hidden" id="warn_target_value" name="warn_target_value" value="${configInfo.warn_target }"/>
  105. <input type="hidden" id="warn_way_value" name="warn_way_value" value="${configInfo.warn_ways }"/>
  106. <div id="leftBtn">
  107. <input type="button" value="保存" class="l-button" onclick="editContractConfig()" id="editContractConfigBtn" />
  108. </div>
  109. <table border="0" cellspacing="1" cellpadding="0" class="l-table-edit line">
  110. <tr>
  111. <td class="l-table-edit-text">预警对象:</td>
  112. <td class="l-table-edit-td">
  113. <c:forEach items="${targetList }" var="item">
  114. <input type="checkbox" id="warn_target" name="warn_target" value="${item.warn_target_value }"/>&nbsp; ${item.warn_target_name }&nbsp;&nbsp;&nbsp;
  115. </c:forEach>
  116. </td>
  117. </tr>
  118. <tr>
  119. <td class="l-table-edit-text">预警方式:</td>
  120. <td class="l-table-edit-td">
  121. <c:forEach items="${waysList }" var="item">
  122. <input type="checkbox" id="warn_ways" name="warn_ways" value="${item.warn_way_value }"/>&nbsp; ${item.warn_way_name }&nbsp;&nbsp;&nbsp;
  123. </c:forEach>
  124. </td>
  125. </tr>
  126. <tr>
  127. <td class="l-table-edit-text">预警天数:</td>
  128. <td class="l-table-edit-td" colspan="3">
  129. <input id="warn_days" name="warn_days" type='text' value="${configInfo.warn_days }" style="width:50px;"/>&nbsp;天
  130. </td>
  131. </tr>
  132. <tr>
  133. <td class="l-table-edit-text">预警时间:</td>
  134. <td class="l-table-edit-td" colspan="3">
  135. <select id="warn_time_hour" name="warn_time_hour" style="width:50px;">
  136. <option value="${configInfo.warn_time_hour }" selected="selected">${configInfo.warn_time_hour }</option>
  137. <c:forEach items="${hourList }" var="item">
  138. <c:if test="${configInfo.warn_time_hour!=item }">
  139. <option value="${item}" >${item}</option>
  140. </c:if>
  141. </c:forEach>
  142. </select>&nbsp;时
  143. <select id="warn_time_minute" name="warn_time_minute" style="width:50px;">
  144. <option value="${configInfo.warn_time_minute }" selected="selected">${configInfo.warn_time_minute }</option>
  145. <c:forEach items="${timeList }" var="item">
  146. <c:if test="${configInfo.warn_time_minute!=item }">
  147. <option value="${item}" >${item}</option>
  148. </c:if>
  149. </c:forEach>
  150. </select>&nbsp;分
  151. <%-- <select id="warn_time_second" name="warn_time_second" style="width:50px;">
  152. <option value="${configInfo.warn_time_second }" selected="selected">${configInfo.warn_time_second }</option>
  153. <c:forEach items="${timeList }" var="item">
  154. <option value="${item}" >${item}</option>
  155. </c:forEach>
  156. </select>&nbsp;秒 --%>
  157. </td>
  158. </tr>
  159. <tr>
  160. <td class="l-table-edit-text">是否预警:</td>
  161. <td class="l-table-edit-td" colspan="3">
  162. <select id="warn_isneed" name="warn_isneed" style="width:50px;">
  163. <c:choose>
  164. <c:when test="${configInfo.warn_isneed=='1' }">
  165. <option value="1" selected="selected">是</option>
  166. </c:when>
  167. <c:otherwise>
  168. <option value="0" selected="selected">否</option>
  169. </c:otherwise>
  170. </c:choose>
  171. <c:if test="${configInfo.warn_isneed=='0' }">
  172. <option value="1" >是</option>
  173. </c:if>
  174. <c:if test="${configInfo.warn_isneed=='1' }">
  175. <option value="0" >否</option>
  176. </c:if>
  177. </select>
  178. </td>
  179. </tr>
  180. </table>
  181. </div>
  182. </div>
  183. </form>
  184. </div>
  185. </BODY>
  186. </HTML>