home *** CD-ROM | disk | FTP | other *** search
/ 61.19.244.139 / 61.19.244.139.zip / 61.19.244.139 / 2015-02-19 / views / car-type-setup-add.jsp < prev    next >
Text File  |  2015-02-19  |  6KB  |  136 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. <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  7. <form:form  cssClass="form-horizontal well" method="Post" action="saveVehCode" modelAttribute="vehCodeForm" id="frmSaveVehCode" name="frmSaveVehCode" >
  8.                         <fieldset>
  9.                             <div class="control-group">
  10.                                 <label class="control-label" for="input01">α╕¢α╕úα╕░α╣Çα╕áα╕ùα╕úα╕ûα╕óα╕Öα╕òα╣î</label>
  11.                                 <div class="controls">
  12.                                   <form:select cssClass="span3" path="vehType" name="vehType" id="vehType" multiple="false"  itemLabel="vehType" itemValue="vehType">
  13.                                      <form:options items="${vehTypeList}" itemValue="refCode" itemLabel="refDesc1"/>
  14.                                   </form:select> 
  15.                                  </div>
  16.                             </div>
  17.  
  18.                             <div class="control-group">
  19.                                 <label class="control-label" for="input01" >α╕Ñα╕▒α╕üα╕⌐α╕ôα╕░α╕üα╕▓α╕úα╣âα╕èα╣ëα╕úα╕ûα╕úα╕ûα╕óα╕Öα╕òα╣î</label>
  20.                                 <div class="controls">
  21.                                   <form:select cssClass="span3" path="vehUsage"  name="vehUsage" id="vehUsage" multiple="false"  >
  22.                                      <form:options items="${vehUsageList}" itemValue="refCode" itemLabel="refDesc1"/>
  23.                                   </form:select> 
  24.                 
  25.                                 </div>
  26.                             </div>
  27.  
  28.                             <div class="control-group">
  29.                                 <label class="control-label" for="input01">α╕úα╕½α╕▒α╕¬α╕úα╕ûα╕óα╕Öα╕òα╣î</label>
  30.                                 <div class="controls">
  31.                                     <form:input  cssClass="input-small" type="text" placeholder="α╕úα╕½α╕▒α╕¬α╕úα╕ûα╕óα╕Öα╕òα╣î" name="vehCode" id="vehCode" path="vehCode"/>
  32.                                  
  33.  
  34.                                 </div>
  35.                             </div>
  36.                             
  37.                                 <div class="control-group">
  38.                                 <label class="control-label" for="input01">α╕éα╕Öα╕▓α╕öα╕úα╕ûα╕óα╕Öα╕òα╣î:</label>
  39.                                 <div class="controls">
  40.  
  41.                                     <form:radiobutton  path="vehSizeFlag"  name="vehSizeFlag" value="C" /> CC <form:radiobutton    path="vehSizeFlag"    name="vehSizeFlag" value="S" /> Seat <form:radiobutton  path="vehSizeFlag"  name="vehSizeFlag" value="W" /> Weight
  42.  
  43.                                 </div>
  44.                             </div>
  45.                             
  46.                             <div class="control-group">
  47.                                 <label class="control-label" for="input02">α╕éα╣ëα╕¡α╕äα╕ºα╕▓α╕íα╕½α╕Öα╣ëα╕▓α╕òα╕▓α╕úα╕▓α╕çα╕üα╕úα╕íα╕ÿα╕úα╕úα╕íα╣î</label>
  48.                                 <div class="controls">
  49.                                     <form:input cssClass="input-xlarge" type="text" id="vehPrintPol" name="vehPrintPol" path="vehPrintPol"
  50.                                         placeholder="α╕éα╣ëα╕¡α╕äα╕ºα╕▓α╕íα╕½α╕Öα╣ëα╕▓α╕òα╕▓α╕úα╕▓α╕çα╕üα╕úα╕íα╕ÿα╕úα╕úα╕íα╣î"/>
  51.                                 </div>
  52.                             </div> 
  53.                              <hr/> 
  54.                             <div id="carSizeForm">
  55.                             
  56.                             <div class="list-item">
  57.                             <div class="control-group">
  58.                                 <label class="control-label" for="input02">α╕éα╕Öα╕▓α╕öα╕úα╕û</label>
  59.                                 <div class="controls">
  60.                                     <input class="input-small" type="text" id="vehSizeBeans[0].vehSize" name="vehSizeBeans[0].vehSize"
  61.                                         placeholder="α╕éα╕Öα╕▓α╕öα╕úα╕û" maxlength="1"> 
  62.                                         
  63.                         <!--      <select class="span1" name="vehSizeBeans[0].vehSizeFlag" id="vehSizeBeans[0].vehSizeFlag">
  64.                                                 <option value="C">CC</option>
  65.                                                 <option value="S">Seat</option>
  66.                                                 <option value="W">Weight</option>
  67.                                  </select> -->
  68.                                         α╕éα╕▒α╣ëα╕Öα╕òα╣êα╕│:<input class="input-small" type="text" id="vehSizeBeans[0].sizeMin" name="vehSizeBeans[0].sizeMin"
  69.                                         placeholder="α╕éα╕▒α╣ëα╕Öα╕òα╣êα╕│"> 
  70.                                         α╕éα╕▒α╣ëα╕Öα╕¬α╕╣α╕ç:<input class="input-small" type="text" id="vehSizeBeans[0].sizeMax" name="vehSizeBeans[0].sizeMax"
  71.                                         placeholder="α╕éα╕▒α╣ëα╕Öα╕¬α╕╣α╕ç">
  72.                                 </div>
  73.                             </div>  
  74.                             <div class="control-group">
  75.                                 <label class="control-label" for="input02">α╕äα╕│α╕¡α╕ÿα╕┤α╕Üα╕▓α╕ó</label>
  76.                                 <div class="controls">
  77.                                     <input class="input-xlarge" type="text" id="vehSizeBeans[0].vehSizeDesc" name="vehSizeBeans[0].vehSizeDesc"
  78.                                         placeholder="α╕äα╕│α╕¡α╕ÿα╕┤α╕Üα╕▓α╕ó">
  79.                                <a href="#" class="list-remove btn btn-dange" id="minus2"><i class="icon-minus"></i>α╕éα╕Öα╕▓α╕öα╕úα╕û</a>
  80.                                 </div>
  81.                             </div> <hr/>  
  82.                             
  83.                                  </div>      
  84.                                  <a href="#" class="list-add btn btn-info" id="plus2"><i class="icon-plus"></i>α╕éα╕Öα╕▓α╕öα╕úα╕û</a>
  85.                                 
  86.                              </div>
  87.                              <br/>
  88.                               <br/>
  89.                              
  90.                             <%
  91.                                     if (request.getParameter("vehCode") == null) {
  92.                                 %>
  93.                                 <button class="btn btn-success" name="saveBtn" id="saveBtn">α╕Üα╕▒α╕Öα╕ùα╕╢α╕ü</button>
  94.                                 <%
  95.                                     } else {
  96.                                 %>
  97.                                 <button class="btn btn-primary" name="editBtn" id="editBtn">α╣üα╕üα╣ëα╣äα╕é</button>
  98.                                 <%
  99.                                     }
  100.                                 %>
  101.                                     <a class="btn" id="cancelBtn" onClick="$('#tableFrm').dialog('close');">α╕óα╕üα╣Çα╕Ñα╕┤α╕ü/α╕¢α╕┤α╕ö</a>
  102.                         </fieldset>
  103.                     </form:form>
  104.                     
  105.                     <script> 
  106.                     $(function() {
  107.  
  108.                         $("#vehType").select2({ width: 'resolve' });
  109.                         $("#vehUsage").select2({ width: 'resolve' });
  110.                         
  111.                     $(document).ready(function() {
  112.                         $("#carSizeForm").dynamiclist();
  113.                     });
  114.  
  115.                     $("#frmSaveVehCode").submit(function() {
  116.                         var url = "saveVehCode";  
  117.                         $.ajax({
  118.                                type: "POST",
  119.                                url: url,
  120.                                data: $("#frmSaveVehCode").serialize(),  
  121.                                success: function(data)
  122.                                {
  123.                              
  124.                                    $('#grid').trigger("reloadGrid", [{ page: 1 }]);
  125.                                    $('#tableFrm').dialog('close');
  126.                                },
  127.                                error: function (xhr, ajaxOptions, thrownError) {
  128.                                    var obj = JSON.parse( xhr.responseText);
  129.                                    alert(obj.errorMessages ) ; 
  130.                                  }
  131.                              });
  132.  
  133.                         return false;
  134.                     }); 
  135.                     });
  136.                     </script>