| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- <%@ page contentType="text/html;charset=GBK"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html>
- <head>
- <title>到期提起配置</title>
- <link href="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/file.js"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerTree.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/page.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/searchBox.js"></script>
- <script type="text/javascript">
- $(function (){
- $("#due_isneed").ligerComboBox();
- //$("#due_time_hour").ligerComboBox();
- //$("#due_time_minute").ligerComboBox();
- });
- function closeWindows(){
- initDialog.close();
- }
- var initDialog;
- var isInit = "${requestScope.init }";
- $(function() {
- if(isInit == "false"){
- initDialog = $.ligerDialog({content:"还未启动定时功能,是否启动?", title:"系统提示",type:"question",width:300,height:70,allowClose : false,
- buttons:[ { text:"是",onclick:function(){initDataDictionary();} } ,
- {text:"否",onclick:function(btn){closeWindows();} }
- ]
- });
- }
- });
- function initDataDictionary(){
- initDialog.close();
- $.ligerDialog.waitting('正在启动中,请稍候...');
- $.ajax({
- type : "POST",
- url : "carDueConfigAction.do?task=initTiming&time=" + new Date().getTime(),
- timeout : 10000,
- cache : false,
- dataType : "json",
- success : function(data) {
- var success = data.success;
- if (success != undefined) {
- $.ligerDialog.success(success);
- $.ligerDialog.closeWaitting();
- //submitType();
- }else{
- $.ligerDialog.closeWaitting();
- showAjaxError(null, data.error);
- }
- },
- error : showAjaxError
- });
- }
- $(function() {
- loadTypeTree("selectbutton", {type : "deptuser",backId : "due_target_name",backName : "due_target",tab : 1});
- });
- $(document).ready(function(){
- var due_way_value=$("#due_way_value").val();
- var due_ways=due_way_value.split(",");
- $("input[name='due_ways']").each(function(){
- var vl=$(this).val();
- for(var i=0;i<due_ways.length;i++){
- if(vl==due_ways[i]){
- $(this).attr("checked",true);
- }
- }
- });
- });
- function editDueConfig(){
- var rs= $.validate({
- name:"due_days",
- model:[{type:"require",msg:"到期提醒天数不能为空!"},
- {type:"isNumber",msg:"到期提醒天数只能为数字!"},
- {type:"size",min:1,msg:"到期提醒天数不能小于1!"}]});
- rs = $.validate({
- name : "due_target",
- model : [{type : "require",
- msg : "到期提醒对象不能为空!"}]})&&rs;
- rs = $.validate({
- name : "due_time_hour",
- model : [{type : "require",
- msg : "到期提醒时间不能为空!"}]})&&rs;
- rs = $.validate({
- name : "due_time_minute",
- model : [{type : "require",
- msg : "到期提醒时间不能为空!"}]})&&rs;
- rs = $.validate({
- name : "due_isneed",
- model : [{type : "require",
- msg : "是否提醒不能为空!"}]})&&rs;
- if(!rs)return;
- var due_ways_value="";
- $("input[name='due_ways']:checked").each(function(){
- if(due_ways_value==""){
- due_ways_value+=$(this).val();
- }else{
- due_ways_value+=","+$(this).val();
- }
- });
- $("#due_way_value").val(due_ways_value);
- $("#addDueConfigForm").submit();
- }
- </script>
- <style type="text/css">
- body {
- padding: 5px;
- margin: 0;
- }
- #layout1 {
- width: 100%;
- margin: 0;
- padding: 0;
- }
- .l-button {
- margin-left: 1px;
- }
- #deptBtn {
- width: 100%;
- background: #e5ecf9;
- text-align: center;
- height: 25px;
- padding-top: 3px
- }
- #leftBtn{
- width: 100%;
- background: #e5ecf9;
- height: 25px;
- padding-top: 3px
- }
- .l-layout-left {
- overflow-y: auto;
- }
- </style>
- </head>
- <body>
- <%@ include file="/include/button.jsp"%>
- <%@ include file="/include/message.jsp"%>
- <form id="addDueConfigForm" name="addDueConfigForm" method="post" action="carDueConfigAction.do?task=editDueConfig">
- <div class="container">
- <div id="title" class="form-button">
- <input type="button" value="保存" class="l-button" onclick="editDueConfig()" id="editDueConfigBtn" />
- <input type="button" value="关闭" class="l-button" onclick="closeWindow();" />
- </div>
- <div class="container-layout">
- <div class="forum-container">
- <center>
- <table class="l-table-edit line">
- <tr>
- <th colspan="4">到期提醒配置</th>
- </tr>
- <tr>
- <td class="l-table-edit-text">到期提醒对象:</td>
- <td class="l-table-edit-td">
- <input type="text" id="due_target" name="due_target" style="width: 200px;" value="${requestScope.due_target }">
- <input type="hidden" id="due_target_name" name="due_target_name" value="${configInfo.due_target}">
- <input type="button" class="l-button" id="selectbutton" value="选择" />
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">到期提醒方式:</td>
- <td class="l-table-edit-td">
- <input type="checkbox" id="due_ways" name="due_ways" value="1"/> 邮件
- <input type="checkbox" id="due_ways" name="due_ways" value="2"/> 短信
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">到期提醒天数:</td>
- <td class="l-table-edit-td" colspan="3">
- <input id="due_days" name="due_days" type='text' value="${configInfo.due_days }" style="width:50px;"/> 天
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">到期提醒时间:</td>
- <td class="l-table-edit-td" colspan="3">
- <select id="due_time_hour" name="due_time_hour" style="width:54px;height: 22px;">
- <option value="${configInfo.due_time_hour }" selected="selected">${configInfo.due_time_hour }</option>
- <c:forEach items="${hourList }" var="item">
- <c:if test="${configInfo.due_time_hour!=item }">
- <option value="${item}" >${item}</option>
- </c:if>
- </c:forEach>
- </select> 时
- <select id="due_time_minute" name="due_time_minute" style="width:54px;height: 22px;">
- <option value="${configInfo.due_time_minute }" selected="selected">${configInfo.due_time_minute }</option>
- <c:forEach items="${timeList }" var="item">
- <c:if test="${configInfo.due_time_minute!=item }">
- <option value="${item}" >${item}</option>
- </c:if>
- </c:forEach>
- </select> 分
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">是否提醒:</td>
- <td class="l-table-edit-td" colspan="3">
- <select id="due_isneed" name="due_isneed" style="width:80px;">
- <c:if test="${configInfo.due_isneed == '1'}">
- <option value="1">是</option>
- <option value="0">否</option>
- </c:if>
- <c:if test="${configInfo.due_isneed == '0'}">
- <option value="0">否</option>
- <option value="1">是</option>
- </c:if>
- <c:if test="${configInfo.due_isneed == null}">
- <option value="">-选择-</option>
- <option value="1">是</option>
- <option value="0">否</option>
- </c:if>
- </select>
- </td>
- </tr>
- </table>
- <input id="tabid" name="tabid" value="${param.tabid }" type="hidden"/>
- <input id="serverDate" name="serverDate" value="${serverDate }" type="hidden"/>
- <input type="hidden" id="due_way_value" name="due_way_value" value="${configInfo.due_ways }"/>
- </center>
- </div>
- </div>
- </div>
- </form>
- </body>
- </html>
|