home *** CD-ROM | disk | FTP | other *** search
/ 61.19.244.139 / 61.19.244.139.zip / 61.19.244.139 / 2015-03-03 / views / carsizetable.jsp < prev    next >
Text File  |  2015-03-03  |  14KB  |  296 lines

  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2.          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.  
  8.  
  9. <div class="nonboxy-widget span6">
  10.     <div class="widget-head">
  11.         <h5 class="pull-left"><i class="black-icons list_images"></i> α╕Ñα╕▒α╕üα╕⌐α╕ôα╕░α╕úα╕û <%= request.getParameter("vehCode")%> </h5>
  12.  
  13.     </div>
  14.     <a id="plus_carsize" class="list-add btn btn-info" href="#">
  15.         <i class="icon-plus"></i>
  16.         α╕éα╕Öα╕▓α╕öα╕úα╕û
  17.     </a>
  18.     <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper" role="grid"><div class="table_top clearfix"> 
  19.  
  20.             <div class="table_content"><table class="data-tbl-striped table table-striped table-bordered dataTable" id="DataTables_Table_0">
  21.                     <thead>
  22.                         <tr role="row">
  23.                             <th class="center sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 60px;"  >α╕úα╕½α╕▒α╕¬α╕úα╕û </th>
  24.                             <th class="sorting_disabled" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width:60px;"  > α╕éα╕Öα╕▓α╕ö </th>
  25.                             <th class="center sorting_disabled" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 60px;" > α╕éα╕▒α╣ëα╕Öα╕òα╣êα╕│ </th>
  26.                             <th class="center sorting_disabled" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 60px;"  > α╕éα╕▒α╣ëα╕Öα╕¬α╕╣α╕ç </th>
  27.                             <th class="center sorting_disabled" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 250px;"  > α╕äα╕│α╕¡α╕ÿα╕┤α╕Üα╕▓α╕ó </th>
  28.                             <th class="center sorting_disabled" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 40px;"  > α╕Ñα╕Ü/α╣üα╕üα╣ëα╣äα╕é </th>
  29.                     </thead>
  30.  
  31.                     <tfoot>
  32.                     </tfoot>
  33.                     <tbody role="alert" aria-live="polite" aria-relevant="all">
  34.  
  35.                         <c:if test="${not empty vehSizeBeanList}">
  36.                             <c:forEach var="listValue" items="${vehSizeBeanList}">
  37.                                 <tr class="even">    
  38.                                     <td class="  sorting_1">  ${listValue.vehCode}  </td>
  39.                                     <td class=" ">  ${listValue.vehSize}   </td>
  40.                                     <td class="center "> ${listValue.sizeMin} </td>
  41.                                     <td class="center "> ${listValue.sizeMax} </td>
  42.                                     <td class="center "> ${listValue.vehSizeDesc} </td>
  43.                                     <td class="center "> <div class="btn-group pull-right">
  44.                                             <button data-toggle="dropdown" class="btn dropdown-toggle"><i class="icon-cog"></i><span class="caret"></span></button>
  45.                                             <ul class="dropdown-menu">
  46.                                                 <li><a href="#" class="editVsize"  vehCode='${listValue.vehCode}' vehSize='${listValue.vehSize}' sizeMin='${listValue.sizeMin}' sizeMax='${listValue.sizeMax}' vehSizeDesc='${listValue.vehSizeDesc}'><i class="icon-edit"></i> α╣üα╕üα╣ëα╣äα╕éα╕úα╕▓α╕óα╕üα╕▓α╕úα╕Öα╕╡α╣ë</a></li>
  47.                                                 <li><a href="#" class="deleteVsize" vehCode='${listValue.vehCode}' vehSize='${listValue.vehSize}' ><i class="icon-trash"></i>α╕Ñα╕Üα╕úα╕▓α╕óα╕üα╕▓α╕ú</a></li> 
  48.                                             </ul>
  49.                                         </div>  </td>
  50.                                 </tr> 
  51.  
  52.                             </c:forEach>
  53.                         </c:if>     
  54.                     </tbody></table></div>
  55.  
  56.  
  57.         </div>
  58.     </div>
  59.  
  60.  
  61.  
  62.  
  63.  
  64.     <!--Begin-->
  65.     <div class="widget-head">
  66.         <h5 class="pull-left"><i class="black-icons list_images"></i> α╣üα╕Üα╕Üα╕òα╕▒α╕ºα╕ûα╕▒α╕çα╕úα╕û <%= request.getParameter("vehCode")%> </h5>
  67.  
  68.     </div>
  69.     <a id="plus_carModel" class="list-add btn btn-info" href="#">
  70.         <i class="icon-plus"></i>
  71.         α╣üα╕Üα╕Üα╕òα╕▒α╕ºα╕ûα╕▒α╕ç
  72.     </a>
  73.  
  74.     <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper" role="grid"><div class="table_top clearfix"> 
  75.  
  76.             <div class="table_content"><table class="data-tbl-striped table table-striped table-bordered dataTable" id="DataTables_Table_1">
  77.                     <thead>
  78.                         <tr role="row">
  79.                             <th class="center sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 40px;"  >α╕úα╕½α╕▒α╕¬α╕úα╕û </th>
  80.                             <th class="center sorting_disabled" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width:40px;"  > α╕¢α╕úα╕░α╣Çα╕áα╕ùα╕òα╕▒α╕ºα╕ûα╕▒α╕ç </th>
  81.                             <th class="center sorting_disabled" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 200px;" > α╣üα╕Üα╕Üα╕òα╕▒α╕ºα╕ûα╕▒α╕ç </th>
  82.                             <th class="center sorting_disabled" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 20px;"  > α╕Ñα╕Ü/α╣üα╕üα╣ëα╣äα╕é </th>
  83.                     </thead>
  84.  
  85.                     <tfoot>
  86.                     </tfoot>
  87.                     <tbody role="alert" aria-live="polite" aria-relevant="all">
  88.  
  89.                         <c:if test="${not empty moVehModelList}">
  90.                             <c:forEach var="listValue" items="${moVehModelList}">
  91.                                 <tr class="even">    
  92.                                     <td class="sorting_1">  ${listValue.vehmCode}  </td>
  93.                                     <td class="center ">  ${listValue.vehmType}   </td>
  94.                                     <td class=" "> ${listValue.vehmDesc} </td>
  95.                                     <td class="center "> 
  96.                                         <div class="btn-group pull-right">
  97.                                             <button data-toggle="dropdown" class="btn dropdown-toggle"><i class="icon-cog"></i><span class="caret"></span></button>
  98.                                             <ul class="dropdown-menu">
  99.                                                 <li><a href="#" class="editModel"  vehmCode='${listValue.vehmCode}' vehmType='${listValue.vehmType}' vehmDesc='${listValue.vehmDesc}'><i class="icon-edit"></i> α╣üα╕üα╣ëα╣äα╕éα╕úα╕▓α╕óα╕üα╕▓α╕ú</a></li>
  100.                                                 <li><a href="#" class="deleteModel"  vehmCode='${listValue.vehmCode}' vehmType='${listValue.vehmType}' ><i class="icon-trash"></i>α╕Ñα╕Üα╕úα╕▓α╕óα╕üα╕▓α╕ú</a></li> 
  101.                                             </ul>
  102.                                         </div>  
  103.                                     </td>
  104.                                 </tr> 
  105.  
  106.                             </c:forEach>
  107.                         </c:if>     
  108.                     </tbody></table></div>
  109.  
  110.  
  111.         </div>
  112.     </div>
  113.  
  114.  
  115.  
  116.     <!--END-->
  117.  
  118. </div>
  119.  
  120. <form id="frmUpdateVsize" name="frmUpdateVsize">
  121.     <div   style="display: none" class="edit-Size" id="edit-Size">
  122.         <div class="control-group">
  123.             <label class="control-label" for="input02">α╕éα╕Öα╕▓α╕öα╕úα╕û</label>
  124.             <div class="controls">
  125.                 <input type="hidden" name="vehCode" id="edit_vehCode">
  126.                 <input class="input-small" type="text" id="edit_vehSize"  name="vehSize" placeholder="α╕éα╕Öα╕▓α╕öα╕úα╕û" maxlength="1" /> 
  127.                 α╕éα╕▒α╣ëα╕Öα╕òα╣êα╕│:<input class="input-small" type="text" id="edit_sizeMin"  name="sizeMin" placeholder="α╕éα╕▒α╣ëα╕Öα╕òα╣êα╕│"/>
  128.                 α╕éα╕▒α╣ëα╕Öα╕¬α╕╣α╕ç:<input class="input-small" type="text" id="edit_sizeMax"name="sizeMax" placeholder="α╕éα╕▒α╣ëα╕Öα╕¬α╕╣α╕ç"/>
  129.             </div>
  130.         </div>
  131.         <div class="control-group">
  132.             <label class="control-label" for="input02">α╕äα╕│α╕¡α╕ÿα╕┤α╕Üα╕▓α╕ó</label>
  133.             <div class="controls">
  134.                 <input class="input-xlarge" type="text" id="edit_vehSizeDesc" name="vehSizeDesc" placeholder="α╕äα╕│α╕¡α╕ÿα╕┤α╕Üα╕▓α╕ó"/>  
  135.             </div>
  136.         </div>
  137.         <button class="btn btn-success" name="saveBtnVsize" id="saveBtnVsize">α╕òα╕üα╕Ñα╕ç</button>
  138.         <a class="btn" id="cancelBtn" onClick="$('#edit-Size').hide();">α╕óα╕üα╣Çα╕Ñα╕┤α╕ü/α╕¢α╕┤α╕ö</a>
  139.         <hr />
  140.  
  141.     </div>
  142. </form>
  143.  
  144.  
  145.  
  146. <form id="frmUpdateModel" name="frmUpdateModel">
  147.     <div   style="display: none" class="edit-Model" id="edit-Model">
  148.         <div class="control-group">
  149.             <label class="control-label" for="input02">α╣üα╕Üα╕Üα╕òα╕▒α╕ºα╕ûα╕▒α╕ç</label>
  150.             <div class="controls">
  151.                 <input type="hidden" name="vehmCode" id="edit_vehmCode">
  152.                 α╕¢α╕úα╕░α╣Çα╕áα╕ùα╕òα╕▒α╕ºα╕ûα╕▒α╕ç : <input class="input-small" type="text" id="edit_vehmType"  name="vehmType" placeholder="α╕¢α╕úα╕░α╣Çα╕áα╕ùα╕òα╕▒α╕ºα╕ûα╕▒α╕ç" maxlength="2" /> 
  153.             </div>
  154.         </div>
  155.         <div class="control-group">
  156.             <label class="control-label" for="input02">α╣üα╕Üα╕Üα╕òα╕▒α╕ºα╕ûα╕▒α╕ç</label>
  157.             <div class="controls">
  158.                 <input class="input-xxlarge" type="text" id="edit_vehmDesc" name="vehmDesc" placeholder="α╣üα╕Üα╕Üα╕òα╕▒α╕ºα╕ûα╕▒α╕ç"/>  
  159.             </div>
  160.         </div>
  161.         <button class="btn btn-success" name="saveBtnModel" id="saveBtnModel">α╕òα╕üα╕Ñα╕ç</button>
  162.         <a class="btn" id="cancelBtn" onClick="$('#edit-Model').hide();">α╕óα╕üα╣Çα╕Ñα╕┤α╕ü/α╕¢α╕┤α╕ö</a>
  163.         <hr />
  164.  
  165.     </div>
  166. </form>
  167.  
  168. <script>
  169.     $(function () {
  170.  
  171.         $('#plus_carsize').click(function () {
  172.             $('#edit_vehSize').prop('readonly', false);
  173.             $('#edit_vehCode').val($("#grid").jqGrid('getGridParam', 'selrow'));
  174.             $('#edit_vehSize').val('');
  175.             $('#edit_sizeMin').val('');
  176.             $('#edit_sizeMax').val('');
  177.             $('#edit_vehSizeDesc').val('');
  178.  
  179.             $('#edit-Size').show('slow');
  180.             return false;
  181.         });
  182.  
  183.         $('#plus_carModel').click(function () {
  184.             $('#edit_vehmCode').val($("#grid").jqGrid('getGridParam', 'selrow'));
  185.             $('#edit_vehmType').prop('readonly', false);
  186.             $('#edit_vehmType').val('');
  187.             $('#edit_vehmDesc').val('');
  188.             $('#edit-Model').show('slow');
  189.             return false;
  190.         });
  191.  
  192.         $('.editModel').click(function () {
  193.  
  194.             $('#edit_vehmCode').val($(this).attr('vehmCode'));
  195.             $('#edit_vehmType').prop('readonly', true);
  196.             $('#edit_vehmType').val($(this).attr('vehmType'));
  197.             $('#edit_vehmDesc').val($(this).attr('vehmDesc'));
  198.             $('#edit-Model').show('slow');
  199.             return false;
  200.         });
  201.         
  202.            $('.deleteModel').click(function () {
  203.  
  204.             var vehmCode = $(this).attr('vehmCode');
  205.             var vehmType = $(this).attr('vehmType');
  206.             if (confirm('α╕óα╕╖α╕Öα╕óα╕▒α╕Öα╕üα╕▓α╕úα╕Ñα╕Üα╕éα╣ëα╕¡α╕íα╕╣α╕Ñ')) {
  207.                 $.get("delete-car-model?vehCode=" + vehmCode + "&vehtype=" + vehmType, function (data1) {
  208.                     $('#tableDetail').html(data1);
  209.                 });
  210.             }
  211.         });
  212.         
  213.         $("#frmUpdateModel").submit(function () {
  214.  
  215.             var form = $(this);
  216.             var url = "updateVehModel";
  217.             $.ajax({
  218.                 type: "POST",
  219.                 url: url,
  220.                 data: $("#frmUpdateModel").serialize(),
  221.                 success: function (data)
  222.                 {
  223.                     $('#tableDetail').html(data);
  224.  
  225.                 },
  226.                 error: function (xhr, ajaxOptions, thrownError) {
  227.                     var obj = JSON.parse(xhr.responseText);
  228.                     alert(obj.errorMessages);
  229.                 }
  230.             });
  231.  
  232.             return false;
  233.  
  234.         });
  235.         
  236.         
  237.  
  238.  
  239.         $('.deleteVsize').click(function () {
  240.  
  241.             var vehCode = $(this).attr('vehCode');
  242.             var vehSize = $(this).attr('vehSize');
  243.             if (confirm('α╕óα╕╖α╕Öα╕óα╕▒α╕Öα╕üα╕▓α╕úα╕Ñα╕Üα╕éα╣ëα╕¡α╕íα╕╣α╕Ñ')) {
  244.                 $.get("delete-car-size?vehCode=" + vehCode + "&vehSize=" + vehSize, function (data1) {
  245.                     $('#tableDetail').html(data1);
  246.                 });
  247.             }
  248.  
  249.         });
  250.  
  251.         $('.editVsize').click(function () {
  252.  
  253.          
  254.  
  255.             //$('#edit_vehSize').attr('vehCode')
  256.             $('#edit_vehSize').prop('readonly', true);
  257.             $('#edit_vehCode').val($(this).attr('vehCode'));
  258.             $('#edit_vehSize').val($(this).attr('vehSize'));
  259.             $('#edit_sizeMin').val($(this).attr('sizeMin'));
  260.             $('#edit_sizeMax').val($(this).attr('sizeMax'));
  261.             $('#edit_vehSizeDesc').val($(this).attr('vehSizeDesc'));
  262.             $('#edit-Size').show('slow');
  263.             return false;
  264.         });
  265.  
  266.         $("#frmUpdateVsize").submit(function () {
  267.  
  268.             var form = $(this);
  269.             var url = "updateVehSize";
  270.             $.ajax({
  271.                 type: "POST",
  272.                 url: url,
  273.                 data: $("#frmUpdateVsize").serialize(),
  274.                 success: function (data)
  275.                 {
  276.                     $('#tableDetail').html(data);
  277.  
  278.                 },
  279.                 error: function (xhr, ajaxOptions, thrownError) {
  280.                     var obj = JSON.parse(xhr.responseText);
  281.                     alert(obj.errorMessages);
  282.                 }
  283.             });
  284.  
  285.             return false;
  286.  
  287.         });
  288.  
  289.     }
  290.  
  291.     );
  292. </script>
  293.  
  294.  
  295.  
  296.