remindConfigInfo.jsp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  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="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  8. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  9. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  10. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  11. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  12. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" 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. var initDialog;
  17. var isInit = "${requestScope.init }";
  18. $(function() {
  19. if(isInit == "false"){
  20. initDialog = $.ligerDialog({content:"还未启动定时功能,是否启动?", title:"系统提示",type:"question",width:300,height:70,allowClose : false,
  21. buttons:[ { text:"是",onclick:function(){initDataDictionary();} } ,
  22. {text:"否",onclick:function(btn){closeWindow();} }
  23. ]
  24. });
  25. }
  26. });
  27. function initDataDictionary(){
  28. initDialog.close();
  29. $.ligerDialog.waitting('正在启动中,请稍候...');
  30. $.ajax({
  31. type : "POST",
  32. url : "amsDueConfigAction.do?task=initTiming&time=" + new Date().getTime(),
  33. timeout : 10000,
  34. cache : false,
  35. dataType : "json",
  36. success : function(data) {
  37. var success = data.success;
  38. if (success != undefined) {
  39. $.ligerDialog.success(success);
  40. $.ligerDialog.closeWaitting();
  41. //submitType();
  42. }else{
  43. $.ligerDialog.closeWaitting();
  44. showAjaxError(null, data.error);
  45. }
  46. },
  47. error : showAjaxError
  48. });
  49. }
  50. $(function() {
  51. loadTypeTree("selectbutton1", {type : "deptuser",backId : "configInfo1.due_target",backName : "due_target_name1",tab : 1});
  52. loadTypeTree("selectbutton2", {type : "deptuser",backId : "configInfo2.due_target",backName : "due_target_name2",tab : 1});
  53. });
  54. $(document).ready(function(){
  55. var due_way_value_p = $("#due_ways1").val();
  56. var due_ways_p = due_way_value_p.split(",");
  57. $("input[name='due_ways_p']").each(function(){
  58. var vl=$(this).val();
  59. for(var i=0;i<due_ways_p.length;i++){
  60. if(vl == due_ways_p[i]){
  61. $(this).attr("checked",true);
  62. }
  63. }
  64. });
  65. var due_way_value_d = $("#due_ways2").val();
  66. var due_ways_d = due_way_value_d.split(",");
  67. $("input[name='due_ways_d']").each(function(){
  68. var vl=$(this).val();
  69. for(var i=0;i<due_ways_d.length;i++){
  70. if(vl == due_ways_d[i]){
  71. $(this).attr("checked",true);
  72. }
  73. }
  74. });
  75. });
  76. function editDueConfig(){
  77. var rs= $.validate({
  78. name:"configInfo1.due_days",
  79. model:[
  80. //{type:"require",msg:"到期提醒天数不能为空!"},
  81. {type:"isNumber",msg:"到期提醒天数只能为数字!"},
  82. {type:"size",min:1,msg:"到期提醒天数不能小于1!"}]});
  83. var rs= $.validate({
  84. name:"configInfo2.due_days",
  85. model:[
  86. //{type:"require",msg:"到期提醒天数不能为空!"},
  87. {type:"isNumber",msg:"到期提醒天数只能为数字!"},
  88. {type:"size",min:1,msg:"到期提醒天数不能小于1!"}]});
  89. //rs = $.validate({
  90. // name : "due_target",
  91. // model : [{type : "require",
  92. // msg : "到期提醒对象不能为空!"}]})&&rs;
  93. //rs = $.validate({
  94. // name : "due_time_hour",
  95. // model : [{type : "require",
  96. // msg : "到期提醒时间不能为空!"}]})&&rs;
  97. //rs = $.validate({
  98. // name : "due_time_minute",
  99. // model : [{type : "require",
  100. // msg : "到期提醒时间不能为空!"}]})&&rs;
  101. //rs = $.validate({
  102. // name : "due_isneed",
  103. // model : [{type : "require",
  104. // msg : "是否提醒不能为空!"}]})&&rs;
  105. if(!rs)return;
  106. var due_ways_value_p="";
  107. var due_ways_value_d="";
  108. $("input[name='due_ways_p']:checked").each(function(){
  109. if(due_ways_value_p==""){
  110. due_ways_value_p+=$(this).val();
  111. }else{
  112. due_ways_value_p+=","+$(this).val();
  113. }
  114. });
  115. $("input[name='due_ways_d']:checked").each(function(){
  116. if(due_ways_value_d==""){
  117. due_ways_value_d+=$(this).val();
  118. }else{
  119. due_ways_value_d+=","+$(this).val();
  120. }
  121. });
  122. $("#due_ways1").val(due_ways_value_p);
  123. $("#due_ways2").val(due_ways_value_d);
  124. $("#addDueConfigForm").submit();
  125. }
  126. </script>
  127. <style type="text/css">
  128. body {padding: 5px;margin: 0;}
  129. #layout1 {width: 100%;margin: 0;padding: 0;}
  130. .l-button {margin-left: 1px;}
  131. #deptBtn {width: 100%;background: #e5ecf9;text-align: center;height: 25px;padding-top: 3px}
  132. #leftBtn{width: 100%;background: #e5ecf9;height: 25px;padding-top: 3px}
  133. .l-layout-left {overflow-y: auto;}
  134. </style>
  135. </head>
  136. <body>
  137. <%@ include file="/include/button.jsp"%>
  138. <%@ include file="/include/message.jsp"%>
  139. <form id="addDueConfigForm" name="addDueConfigForm" method="post" action="amsRemindConfigAction.do?task=editRemindConfig">
  140. <div class="container">
  141. <div id="title" class="form-button">
  142. <input type="button" value="保存" class="l-button" onclick="editDueConfig()" id="editDueConfigBtn" />
  143. <input type="button" value="关闭" class="l-button" onclick="closeWindow();" />
  144. </div>
  145. <div class="container-layout">
  146. <div class="forum-container">
  147. <center>
  148. <table class="l-table-edit line">
  149. <tr>
  150. <th colspan="4">档案到期提醒配置:</th>
  151. </tr>
  152. <tr>
  153. <td class="l-table-edit-text">预警提醒方式:</td>
  154. <td class="l-table-edit-td">
  155. <input type="checkbox" id="due_ways_p" name="due_ways_p" value="1"/>&nbsp; 系统消息&nbsp;&nbsp;&nbsp;
  156. <input type="checkbox" id="due_ways_p" name="due_ways_p" value="2"/>&nbsp; 邮件&nbsp;&nbsp;&nbsp;
  157. <input type="checkbox" id="due_ways_p" name="due_ways_p" value="3"/>&nbsp; 短信&nbsp;&nbsp;&nbsp;
  158. </td>
  159. </tr>
  160. <tr>
  161. <td class="l-table-edit-text">预警提前天数:</td>
  162. <td class="l-table-edit-td" colspan="3">
  163. <input id="due_days" name="configInfo1.due_days" type='text' value="${configInfoPaper.due_days }" style="width:60px;"/>&nbsp;天
  164. </td>
  165. </tr>
  166. <tr>
  167. <td class="l-table-edit-text">预警时间:</td>
  168. <td class="l-table-edit-td" colspan="3">
  169. <select id="due_time_hour" name="configInfo1.due_time_hour" style="width:60px;">
  170. <c:choose>
  171. <c:when test="${due_time_hour_paper != null}">
  172. <option value="${due_time_hour_paper }" selected="selected">${due_time_hour_paper }</option>
  173. </c:when>
  174. <c:otherwise>
  175. <option value="" selected="selected">-选择-</option>
  176. </c:otherwise>
  177. </c:choose>
  178. <c:forEach items="${hourList }" var="item">
  179. <c:if test="${due_time_hour_paper!=item }">
  180. <option value="${item}">${item}</option>
  181. </c:if>
  182. </c:forEach>
  183. </select>&nbsp;时
  184. <select id="due_time_minute" name="configInfo1.due_time_minute" style="width:60px;">
  185. <c:choose>
  186. <c:when test="${due_time_minute_paper != null}">
  187. <option value="${due_time_minute_paper }" selected="selected">${due_time_minute_paper }</option>
  188. </c:when>
  189. <c:otherwise>
  190. <option value="" selected="selected">-选择-</option>
  191. </c:otherwise>
  192. </c:choose>
  193. <c:forEach items="${timeList}" var="item">
  194. <c:if test="${due_time_minute_paper!=item }">
  195. <option value="${item}" >${item}</option>
  196. </c:if>
  197. </c:forEach>
  198. </select>&nbsp;分
  199. </td>
  200. </tr>
  201. <tr>
  202. <td class="l-table-edit-text">是否提醒:</td>
  203. <td class="l-table-edit-td" colspan="3">
  204. <select id="due_isneed" name="configInfo1.due_isneed" style="width:80px;">
  205. <c:choose>
  206. <c:when test="${configInfoPaper.due_isneed == '1'}">
  207. <option value="1">是</option>
  208. <option value="0">否</option>
  209. </c:when>
  210. <c:when test="${configInfoPaper.due_isneed == '0'}">
  211. <option value="0">否</option>
  212. <option value="1">是</option>
  213. </c:when>
  214. <c:otherwise>
  215. <option value="">-选择-</option>
  216. <option value="1">是</option>
  217. <option value="0">否</option>
  218. </c:otherwise>
  219. </c:choose>
  220. </select>
  221. <div style="display: inline; color: red;">(关闭后所有档案将不进行到期提醒)</div>
  222. </td>
  223. </tr>
  224. <tr>
  225. <td class="l-table-edit-text">默认提醒对象:</td>
  226. <td class="l-table-edit-td">
  227. <input type="text" id="due_target_name" name="due_target_name1" style="width: 200px;" value="${due_target_paper}">
  228. <input type="hidden" id="due_target" name="configInfo1.due_target" value="${configInfoPaper.due_target}">
  229. <input type="button" class="l-button" id="selectbutton1" value="选择" />
  230. </td>
  231. </tr>
  232. <tr>
  233. <td class="l-table-edit-text"></td>
  234. <td class="l-table-edit-td" ></td>
  235. </tr>
  236. <tr>
  237. <th colspan="4">纸质借阅到期提醒配置:</th>
  238. </tr>
  239. <tr>
  240. <td class="l-table-edit-text">预警提醒方式:</td>
  241. <td class="l-table-edit-td">
  242. <input type="checkbox" id="due_ways_d" name="due_ways_d" value="1"/>&nbsp; 系统消息&nbsp;&nbsp;&nbsp;
  243. <input type="checkbox" id="due_ways_d" name="due_ways_d" value="2"/>&nbsp; 邮件&nbsp;&nbsp;&nbsp;
  244. <input type="checkbox" id="due_ways_d" name="due_ways_d" value="3"/>&nbsp; 短信&nbsp;&nbsp;&nbsp;
  245. </td>
  246. </tr>
  247. <tr>
  248. <td class="l-table-edit-text">预警提前天数:</td>
  249. <td class="l-table-edit-td" colspan="3">
  250. <input id="due_days" name="configInfo2.due_days" type='text' value="${configInfoDZD.due_days }" style="width:60px;"/>&nbsp;天
  251. </td>
  252. </tr>
  253. <tr>
  254. <td class="l-table-edit-text">预警时间:</td>
  255. <td class="l-table-edit-td" colspan="3">
  256. <select id="due_time_hour" name="configInfo2.due_time_hour" style="width:60px;">
  257. <c:choose>
  258. <c:when test="${due_time_hour_dzd != null}">
  259. <option value="${due_time_hour_dzd }" selected="selected">${due_time_hour_dzd }</option>
  260. </c:when>
  261. <c:otherwise>
  262. <option value="" selected="selected">-选择-</option>
  263. </c:otherwise>
  264. </c:choose>
  265. <c:forEach items="${hourList }" var="item">
  266. <c:if test="${due_time_hour_dzd!=item }">
  267. <option value="${item}">${item}</option>
  268. </c:if>
  269. </c:forEach>
  270. </select>&nbsp;时
  271. <select id="due_time_minute" name="configInfo2.due_time_minute" style="width:60px;">
  272. <c:choose>
  273. <c:when test="${due_time_minute_dzd != null}">
  274. <option value="${due_time_minute_dzd }" selected="selected">${due_time_minute_dzd }</option>
  275. </c:when>
  276. <c:otherwise>
  277. <option value="" selected="selected">-选择-</option>
  278. </c:otherwise>
  279. </c:choose>
  280. <c:forEach items="${timeList}" var="item">
  281. <c:if test="${due_time_minute_dzd!=item }">
  282. <option value="${item}" >${item}</option>
  283. </c:if>
  284. </c:forEach>
  285. </select>&nbsp;分
  286. </td>
  287. </tr>
  288. <tr>
  289. <td class="l-table-edit-text">是否提醒:</td>
  290. <td class="l-table-edit-td" colspan="3">
  291. <select id="due_isneed" name="configInfo2.due_isneed" style="width:80px;">
  292. <c:choose>
  293. <c:when test="${configInfoDZD.due_isneed == '1'}">
  294. <option value="1">是</option>
  295. <option value="0">否</option>
  296. </c:when>
  297. <c:when test="${configInfoDZD.due_isneed == '0'}">
  298. <option value="0">否</option>
  299. <option value="1">是</option>
  300. </c:when>
  301. <c:otherwise>
  302. <option value="">-选择-</option>
  303. <option value="1">是</option>
  304. <option value="0">否</option>
  305. </c:otherwise>
  306. </c:choose>
  307. </select>
  308. <div style="display: inline; color: red;">(关闭后所有借阅将不进行到期提醒)</div>
  309. </td>
  310. </tr>
  311. <tr>
  312. <td class="l-table-edit-text">默认提醒对象:</td>
  313. <td class="l-table-edit-td">
  314. <input type="text" id="due_target_name" name="due_target_name2" style="width: 200px;" value="${due_target_dzd}">
  315. <input type="hidden" id="due_target" name="configInfo2.due_target" value="${configInfoDZD.due_target}">
  316. <input type="button" class="l-button" id="selectbutton2" value="选择" />
  317. </td>
  318. </tr>
  319. <tr>
  320. <td class="l-table-edit-text"></td>
  321. <td class="l-table-edit-td"></td>
  322. </tr>
  323. </table>
  324. <input id="tabid" name="tabid" value="${param.tabid }" type="hidden"/>
  325. <input id="serverDate" name="serverDate" value="${serverDate }" type="hidden"/>
  326. <input type="hidden" id="due_ways1" name="configInfo1.due_ways" value="${configInfoPaper.due_ways }"/>
  327. <input type="hidden" id="universalid" name="configInfo1.universalid" value="${configInfoPaper.universalid }"/>
  328. <input type="hidden" id="due_ways2" name="configInfo2.due_ways" value="${configInfoDZD.due_ways }"/>
  329. <input type="hidden" id="universalid" name="configInfo2.universalid" value="${configInfoDZD.universalid }"/>
  330. </center>
  331. </div>
  332. </div>
  333. </div>
  334. </form>
  335. </body>
  336. </html>