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 >
Wrap
Text File
|
2015-02-19
|
4KB
|
120 lines
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<form:form class="form-horizontal well" modelAttribute="creditLineBean" action="approveCreditTemp" id="frmApproveCreditTemp" method="post">
<ul class="breadcrumb">
<li><a href="#">α╕½α╕Öα╣ëα╕▓α╕½α╕Ñα╕▒α╕ü</a><span class="divider">»</span></li>
<li class="active">อนุมัติวงเงินชั่วคราว</li>
</ul>
<div class="dashboard-widget">
<div class="row-fluid">
<div class="span12">
<fieldset>
<div class="control-group">
<label class="control-label" for="input01">ตัวแทน</label>
<div class="controls">
<form:input class="input-small" type="text" placeholder="รหัสตัวแทน" path="agentId" readonly="true"/>
<form:input class="input-xlarge" type="text"
placeholder="ชื่อตัวแทน" readonly="true" path="agentName"/>
</div>
</div>
<div class="control-group">
<label class="control-label" for="input01">วงเงินชั่วคราว</label>
<div class="controls">
<form:input class="input-small" type="text"
placeholder="วงเงินชั่วคราว" path="crTempLimit"/>
</div>
</div>
<div class="control-group">
<label class="control-label" for="input01">ใช้ได้ถึง</label>
<div class="controls">
<form:input path="crExpireDate" class="input-small" type="text" placeholder="dd/MM/yyyy"/>
</div>
</div>
<div class="control-group">
<label class="control-label" for="input01">ผู้อนุมัติ</label>
<div class="controls">
<form:select path="crhApproveBy">
<form:options items="${crhApprovers}" itemLabel="refDesc1" itemValue="refCode"/>
</form:select>
</div>
</div>
<button class="btn btn-success">บันทึก</button>
<a class="btn" id="cancelBtn" onClick="$('#tableFrm').dialog('close'); return false;">ยกเลิก/ปิด</a>
</fieldset>
</div>
</div>
</div>
</form:form>
<script>
$(function() {
$('#crTempLimit').autoNumeric('init', {aSep: ',', aDec: '.',vMin:'0.00',vMax:'1000000000.00'});
//$("#crExpireDate").mask("99/99/9999",{placeholder:"dd/mm/yyyy"});
$("#crExpireDate").datepicker({ dateFormat: 'dd/mm/yy',minDate: new Date() });
$("#frmApproveCreditTemp").submit(function() {
var form = $(this);
$('input').each(function(i){
var self = $(this);
try{
var v = self.autoNumeric('get');
self.autoNumeric('destroy');
self.val(v);
}catch(err){
console.log("Not an autonumeric field: " + self.attr("name"));
}
});
var url = "approveCreditTemp";
$.ajax({
type: "POST",
url: url,
data: $("#frmApproveCreditTemp").serialize(),
success: function(data)
{
$('#grid').trigger("reloadGrid", [{ page: 1 }]);
$('#tableFrm').dialog('close');
},
error: function (xhr, ajaxOptions, thrownError) {
var obj = JSON.parse( xhr.responseText);
alert(obj.errorMessages ) ;
}
});
return false;
});});
</script>