dueConfigInfo.jsp 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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. <html>
  5. <head>
  6. <title>到期提起配置</title>
  7. <link href="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  8. <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
  9. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  10. <script type="text/javascript" src="/shares/js/file.js"></script>
  11. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  12. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
  13. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
  14. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
  15. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerTree.js" type="text/javascript"></script>
  16. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  17. <script type="text/javascript" src="/shares/js/common.js"></script>
  18. <script type="text/javascript" src="/shares/js/constant.js"></script>
  19. <script type="text/javascript" src="/shares/js/yw/master1/page.js"></script>
  20. <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
  21. <script type="text/javascript" src="/shares/js/yw/master1/searchBox.js"></script>
  22. <script type="text/javascript">
  23. $(function (){
  24. $("#due_isneed").ligerComboBox();
  25. //$("#due_time_hour").ligerComboBox();
  26. //$("#due_time_minute").ligerComboBox();
  27. });
  28. function closeWindows(){
  29. initDialog.close();
  30. }
  31. var initDialog;
  32. var isInit = "${requestScope.init }";
  33. $(function() {
  34. if(isInit == "false"){
  35. initDialog = $.ligerDialog({content:"还未启动定时功能,是否启动?", title:"系统提示",type:"question",width:300,height:70,allowClose : false,
  36. buttons:[ { text:"是",onclick:function(){initDataDictionary();} } ,
  37. {text:"否",onclick:function(btn){closeWindows();} }
  38. ]
  39. });
  40. }
  41. });
  42. function initDataDictionary(){
  43. initDialog.close();
  44. $.ligerDialog.waitting('正在启动中,请稍候...');
  45. $.ajax({
  46. type : "POST",
  47. url : "carDueConfigAction.do?task=initTiming&time=" + new Date().getTime(),
  48. timeout : 10000,
  49. cache : false,
  50. dataType : "json",
  51. success : function(data) {
  52. var success = data.success;
  53. if (success != undefined) {
  54. $.ligerDialog.success(success);
  55. $.ligerDialog.closeWaitting();
  56. //submitType();
  57. }else{
  58. $.ligerDialog.closeWaitting();
  59. showAjaxError(null, data.error);
  60. }
  61. },
  62. error : showAjaxError
  63. });
  64. }
  65. $(function() {
  66. loadTypeTree("selectbutton", {type : "deptuser",backId : "due_target_name",backName : "due_target",tab : 1});
  67. });
  68. $(document).ready(function(){
  69. var due_way_value=$("#due_way_value").val();
  70. var due_ways=due_way_value.split(",");
  71. $("input[name='due_ways']").each(function(){
  72. var vl=$(this).val();
  73. for(var i=0;i<due_ways.length;i++){
  74. if(vl==due_ways[i]){
  75. $(this).attr("checked",true);
  76. }
  77. }
  78. });
  79. });
  80. function editDueConfig(){
  81. var rs= $.validate({
  82. name:"due_days",
  83. model:[{type:"require",msg:"到期提醒天数不能为空!"},
  84. {type:"isNumber",msg:"到期提醒天数只能为数字!"},
  85. {type:"size",min:1,msg:"到期提醒天数不能小于1!"}]});
  86. rs = $.validate({
  87. name : "due_target",
  88. model : [{type : "require",
  89. msg : "到期提醒对象不能为空!"}]})&&rs;
  90. rs = $.validate({
  91. name : "due_time_hour",
  92. model : [{type : "require",
  93. msg : "到期提醒时间不能为空!"}]})&&rs;
  94. rs = $.validate({
  95. name : "due_time_minute",
  96. model : [{type : "require",
  97. msg : "到期提醒时间不能为空!"}]})&&rs;
  98. rs = $.validate({
  99. name : "due_isneed",
  100. model : [{type : "require",
  101. msg : "是否提醒不能为空!"}]})&&rs;
  102. if(!rs)return;
  103. var due_ways_value="";
  104. $("input[name='due_ways']:checked").each(function(){
  105. if(due_ways_value==""){
  106. due_ways_value+=$(this).val();
  107. }else{
  108. due_ways_value+=","+$(this).val();
  109. }
  110. });
  111. $("#due_way_value").val(due_ways_value);
  112. $("#addDueConfigForm").submit();
  113. }
  114. </script>
  115. <style type="text/css">
  116. body {
  117. padding: 5px;
  118. margin: 0;
  119. }
  120. #layout1 {
  121. width: 100%;
  122. margin: 0;
  123. padding: 0;
  124. }
  125. .l-button {
  126. margin-left: 1px;
  127. }
  128. #deptBtn {
  129. width: 100%;
  130. background: #e5ecf9;
  131. text-align: center;
  132. height: 25px;
  133. padding-top: 3px
  134. }
  135. #leftBtn{
  136. width: 100%;
  137. background: #e5ecf9;
  138. height: 25px;
  139. padding-top: 3px
  140. }
  141. .l-layout-left {
  142. overflow-y: auto;
  143. }
  144. </style>
  145. </head>
  146. <body>
  147. <%@ include file="/include/button.jsp"%>
  148. <%@ include file="/include/message.jsp"%>
  149. <form id="addDueConfigForm" name="addDueConfigForm" method="post" action="carDueConfigAction.do?task=editDueConfig">
  150. <div class="container">
  151. <div id="title" class="form-button">
  152. <input type="button" value="保存" class="l-button" onclick="editDueConfig()" id="editDueConfigBtn" />
  153. <input type="button" value="关闭" class="l-button" onclick="closeWindow();" />
  154. </div>
  155. <div class="container-layout">
  156. <div class="forum-container">
  157. <center>
  158. <table class="l-table-edit line">
  159. <tr>
  160. <th colspan="4">到期提醒配置</th>
  161. </tr>
  162. <tr>
  163. <td class="l-table-edit-text">到期提醒对象:</td>
  164. <td class="l-table-edit-td">
  165. <input type="text" id="due_target" name="due_target" style="width: 200px;" value="${requestScope.due_target }">
  166. <input type="hidden" id="due_target_name" name="due_target_name" value="${configInfo.due_target}">
  167. <input type="button" class="l-button" id="selectbutton" value="选择" />
  168. </td>
  169. </tr>
  170. <tr>
  171. <td class="l-table-edit-text">到期提醒方式:</td>
  172. <td class="l-table-edit-td">
  173. <input type="checkbox" id="due_ways" name="due_ways" value="1"/>&nbsp; 邮件&nbsp;&nbsp;&nbsp;
  174. <input type="checkbox" id="due_ways" name="due_ways" value="2"/>&nbsp; 短信&nbsp;&nbsp;&nbsp;
  175. </td>
  176. </tr>
  177. <tr>
  178. <td class="l-table-edit-text">到期提醒天数:</td>
  179. <td class="l-table-edit-td" colspan="3">
  180. <input id="due_days" name="due_days" type='text' value="${configInfo.due_days }" style="width:50px;"/>&nbsp;天
  181. </td>
  182. </tr>
  183. <tr>
  184. <td class="l-table-edit-text">到期提醒时间:</td>
  185. <td class="l-table-edit-td" colspan="3">
  186. <select id="due_time_hour" name="due_time_hour" style="width:54px;height: 22px;">
  187. <option value="${configInfo.due_time_hour }" selected="selected">${configInfo.due_time_hour }</option>
  188. <c:forEach items="${hourList }" var="item">
  189. <c:if test="${configInfo.due_time_hour!=item }">
  190. <option value="${item}" >${item}</option>
  191. </c:if>
  192. </c:forEach>
  193. </select>&nbsp;时
  194. <select id="due_time_minute" name="due_time_minute" style="width:54px;height: 22px;">
  195. <option value="${configInfo.due_time_minute }" selected="selected">${configInfo.due_time_minute }</option>
  196. <c:forEach items="${timeList }" var="item">
  197. <c:if test="${configInfo.due_time_minute!=item }">
  198. <option value="${item}" >${item}</option>
  199. </c:if>
  200. </c:forEach>
  201. </select>&nbsp;分
  202. </td>
  203. </tr>
  204. <tr>
  205. <td class="l-table-edit-text">是否提醒:</td>
  206. <td class="l-table-edit-td" colspan="3">
  207. <select id="due_isneed" name="due_isneed" style="width:80px;">
  208. <c:if test="${configInfo.due_isneed == '1'}">
  209. <option value="1">是</option>
  210. <option value="0">否</option>
  211. </c:if>
  212. <c:if test="${configInfo.due_isneed == '0'}">
  213. <option value="0">否</option>
  214. <option value="1">是</option>
  215. </c:if>
  216. <c:if test="${configInfo.due_isneed == null}">
  217. <option value="">-选择-</option>
  218. <option value="1">是</option>
  219. <option value="0">否</option>
  220. </c:if>
  221. </select>
  222. </td>
  223. </tr>
  224. </table>
  225. <input id="tabid" name="tabid" value="${param.tabid }" type="hidden"/>
  226. <input id="serverDate" name="serverDate" value="${serverDate }" type="hidden"/>
  227. <input type="hidden" id="due_way_value" name="due_way_value" value="${configInfo.due_ways }"/>
  228. </center>
  229. </div>
  230. </div>
  231. </div>
  232. </form>
  233. </body>
  234. </html>