home *** CD-ROM | disk | FTP | other *** search
/ 61.19.244.139 / 61.19.244.139.zip / 61.19.244.139 / 2015-02-19 / views / coverage-add.jsp < prev    next >
Text File  |  2015-02-19  |  4KB  |  104 lines

  1.  
  2. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  3. <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
  4. <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
  5. <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
  6.  
  7.  
  8.     <form:form class="form-horizontal well" action="saveCovBean" method="POST" name="frmCoverage" id="frmCoverage" modelAttribute="covBean">
  9.         <fieldset>
  10.             <div class="row-fluid">
  11.                 <div class="span12">
  12.                     <div class="nonboxy-widget">
  13.  
  14.                         <div class="widget-head">
  15.                             <h5>α╕üα╕│α╕½α╕Öα╕öα╕úα╕▓α╕óα╕Ñα╕░α╣Çα╕¡α╕╡α╕óα╕öα╕äα╕ºα╕▓α╕íα╕äα╕╕α╣ëα╕íα╕äα╕úα╕¡α╕ç</h5>
  16.                         </div>
  17.  
  18.                         <div class="widget-content">
  19.                             <div class="widget-box">
  20.  
  21.                                 <fieldset>
  22.  
  23.                                     <div class="control-group">
  24.                                         <label class="control-label" for="input01">α╕äα╕ºα╕▓α╕íα╕äα╕╕α╣ëα╕íα╕äα╕úα╕¡α╕ç</label>
  25.                                         <div class="controls">
  26.                                             <form:input class="input-small" type="text" placeholder="α╕úα╕½α╕▒α╕¬ " name="covCode" id="covCode" path="covCode"/> <form:input class="input-xlarge" type="text" name="covName" id="covName"
  27.                                                 placeholder="α╕äα╕ºα╕▓α╕íα╕äα╕╕α╣ëα╕íα╕äα╕úα╕¡α╕ç" path="covName"  />
  28.                                         </div>
  29.                                     </div>
  30.  
  31.                                     <div class="control-group">
  32.                                         <label class="control-label" for="input01">α╕ùα╕╕α╕Öα╕¢α╕úα╕░α╕üα╕▒α╕Öα╕áα╕▒α╕ó</label>
  33.                                         <div class="controls">
  34.                                             <label class="checkbox inline"> <form:checkbox  value="Y" name="sumOfPol" id="sumOfPol" path="sumOfPol"/> α╕ùα╕▒α╣ëα╕çα╕üα╕úα╕íα╕ÿα╕úα╕úα╕íα╣î
  35.                                             </label> <label class="checkbox inline"> <form:checkbox    value="Y" name="sumOfPerson" id="sumOfPerson" path="sumOfPerson"  /> α╕òα╣êα╕¡α╕äα╕Ö
  36.                                             </label> <label class="checkbox inline"> <form:checkbox   value="Y" name="sumOfTime" id="sumOfTime"  path="sumOfTime"/> α╕òα╣êα╕¡α╕äα╕úα╕▒α╣ëα╕ç
  37.                                             </label> <label class="checkbox inline"> <form:checkbox   value="Y" name="deduct" id="deduct"  path="deduct"/> α╕äα╣êα╕▓α╣Çα╕¬α╕╡α╕óα╕½α╕▓α╕óα╕¬α╣êα╕ºα╕Öα╣üα╕úα╕ü
  38.                                             </label>
  39.  
  40.                                         </div>
  41.                                     </div>
  42.  
  43.  
  44.  
  45.                                 <%
  46.                                     if (request.getParameter("covCode") == null) {
  47.                                 %>
  48.                                 <button class="btn btn-success" name="saveBtn" id="saveBtn">α╕Üα╕▒α╕Öα╕ùα╕╢α╕ü</button>
  49.                                 <%
  50.                                     } else {
  51.                                 %>
  52.                                 <button class="btn btn-primary" name="editBtn" id="editBtn">α╣üα╕üα╣ëα╣äα╕é</button>
  53.                                 <%
  54.                                     }
  55.                                 %>
  56.  
  57.  
  58.  
  59.                                 <a class="btn" id="cancelBtn" onClick="$('#tableFrm').dialog('close');">α╕óα╕üα╣Çα╕Ñα╕┤α╕ü/α╕¢α╕┤α╕ö</a>
  60.                                 </fieldset>
  61.                             </div> 
  62.                         </div>
  63.  
  64.                     </div>
  65.                 </div>
  66.             </div>
  67.  
  68.         </fieldset>
  69.     </form:form>
  70.     
  71.     
  72.  
  73.  
  74.  
  75. <script>
  76. $(function() {
  77.  
  78.     if($("#covCode").val() ){
  79.         $('#covCode').attr('readonly', true);
  80.         };
  81.     
  82.     $("#frmCoverage").submit(function() {
  83.         var url = "saveCovBean";  
  84.         $.ajax({
  85.                type: "POST",
  86.                url: url,
  87.                data: $("#frmCoverage").serialize(),  
  88.                success: function(data)
  89.                {
  90.                     
  91.                    $('#grid').trigger("reloadGrid", [{ page: 1 }]);
  92.                    //$("#frmCoverage").reset();
  93.                    $('#tableFrm').dialog('close');
  94.                },
  95.                error: function (xhr, ajaxOptions, thrownError) {
  96.                    var obj = JSON.parse( xhr.responseText);
  97.                    alert(obj.errorMessages ) ;      
  98.                  }
  99.              });
  100.  
  101.         return false;
  102.     });});
  103.  
  104. </script>