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

  1.  
  2. <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
  3. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  4. <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
  5. <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
  6. <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
  7. <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  8.  
  9.      
  10.     
  11.     <form:form class="form-horizontal well" modelAttribute="creditLineBean" action="approveCreditTemp" id="frmApproveCreditTemp" method="post">
  12.         <ul class="breadcrumb">
  13.             <li><a href="#">α╕½α╕Öα╣ëα╕▓α╕½α╕Ñα╕▒α╕ü</a><span class="divider">»</span></li>
  14.             <li class="active">α╕¡α╕Öα╕╕α╕íα╕▒α╕òα╕┤α╕ºα╕çα╣Çα╕çα╕┤α╕Öα╕èα╕▒α╣êα╕ºα╕äα╕úα╕▓α╕º</li>
  15.         </ul>
  16.  
  17.  
  18.         <div class="dashboard-widget">
  19.             <div class="row-fluid">
  20.  
  21.                 <div class="span12">
  22.                      
  23.                         <fieldset>
  24.                             <div class="control-group">
  25.                                 <label class="control-label" for="input01">α╕òα╕▒α╕ºα╣üα╕ùα╕Ö</label>
  26.                                 <div class="controls">
  27.                                     <form:input class="input-small" type="text" placeholder="α╕úα╕½α╕▒α╕¬α╕òα╕▒α╕ºα╣üα╕ùα╕Ö" path="agentId" readonly="true"/>
  28.                                      
  29.                                     <form:input  class="input-xlarge" type="text"
  30.                                         placeholder="α╕èα╕╖α╣êα╕¡α╕òα╕▒α╕ºα╣üα╕ùα╕Ö" readonly="true" path="agentName"/>
  31.                                 </div>
  32.                             </div>
  33.  
  34.                             <div class="control-group">
  35.                                 <label class="control-label" for="input01">α╕ºα╕çα╣Çα╕çα╕┤α╕Öα╕èα╕▒α╣êα╕ºα╕äα╕úα╕▓α╕º</label>
  36.                                 <div class="controls">
  37.                                     <form:input class="input-small" type="text"
  38.                                         placeholder="α╕ºα╕çα╣Çα╕çα╕┤α╕Öα╕èα╕▒α╣êα╕ºα╕äα╕úα╕▓α╕º"  path="crTempLimit"/>
  39.  
  40.                                 </div>
  41.                             </div>
  42.  
  43.                             <div class="control-group">
  44.                                 <label class="control-label" for="input01">α╣âα╕èα╣ëα╣äα╕öα╣ëα╕ûα╕╢α╕ç</label>
  45.                                 <div class="controls">
  46.                                 
  47.                                     <form:input path="crExpireDate" class="input-small" type="text" placeholder="dd/MM/yyyy"/>
  48.  
  49.                                 </div>
  50.                             </div>
  51.                             <div class="control-group">
  52.                                 <label class="control-label" for="input01">α╕£α╕╣α╣ëα╕¡α╕Öα╕╕α╕íα╕▒α╕òα╕┤</label>
  53.                                 <div class="controls">
  54.                                  
  55.                                  <form:select path="crhApproveBy">
  56.                                  <form:options items="${crhApprovers}" itemLabel="refDesc1" itemValue="refCode"/>
  57.                                  </form:select>
  58.  
  59.                                 </div>
  60.                             </div>
  61.  
  62.  
  63.                             <button class="btn btn-success">α╕Üα╕▒α╕Öα╕ùα╕╢α╕ü</button>
  64.                             <a class="btn" id="cancelBtn" onClick="$('#tableFrm').dialog('close'); return false;">α╕óα╕üα╣Çα╕Ñα╕┤α╕ü/α╕¢α╕┤α╕ö</a>
  65.  
  66.                         </fieldset>
  67.                  
  68.                 </div>
  69.             </div>
  70.  
  71.         </div>
  72.         </form:form>
  73.         <script>
  74.  
  75.         $(function() {
  76.             
  77.         $('#crTempLimit').autoNumeric('init', {aSep: ',', aDec: '.',vMin:'0.00',vMax:'1000000000.00'});
  78.         //$("#crExpireDate").mask("99/99/9999",{placeholder:"dd/mm/yyyy"});
  79. $("#crExpireDate").datepicker({ dateFormat: 'dd/mm/yy',minDate: new Date() });
  80.  
  81.         $("#frmApproveCreditTemp").submit(function() {
  82.  
  83.  
  84.             var form = $(this);
  85.             $('input').each(function(i){
  86.                 var self = $(this);
  87.                 try{
  88.                     var v = self.autoNumeric('get');
  89.                     self.autoNumeric('destroy');
  90.                     self.val(v);
  91.                 }catch(err){
  92.                     console.log("Not an autonumeric field: " + self.attr("name"));
  93.                 }
  94.             });
  95.             
  96.             var url = "approveCreditTemp";  
  97.  
  98.             $.ajax({
  99.                    type: "POST",
  100.                    url: url,
  101.                    data: $("#frmApproveCreditTemp").serialize(),  
  102.                    success: function(data)
  103.                    {
  104.  
  105.                        $('#grid').trigger("reloadGrid", [{ page: 1 }]);
  106.                        $('#tableFrm').dialog('close');
  107.                    },
  108.                    error: function (xhr, ajaxOptions, thrownError) {
  109.                        var obj = JSON.parse( xhr.responseText);
  110.                        alert(obj.errorMessages ) ;      
  111.                      }
  112.                  });
  113.  
  114.             return false;
  115.  
  116.             
  117.         });});
  118.         
  119.         </script>
  120.