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 >
Wrap
Text File
|
2015-02-19
|
4KB
|
104 lines
<%@ 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"%>
<form:form class="form-horizontal well" action="saveCovBean" method="POST" name="frmCoverage" id="frmCoverage" modelAttribute="covBean">
<fieldset>
<div class="row-fluid">
<div class="span12">
<div class="nonboxy-widget">
<div class="widget-head">
<h5>กำหนดรายละเอียดความคุ้มครอง</h5>
</div>
<div class="widget-content">
<div class="widget-box">
<fieldset>
<div class="control-group">
<label class="control-label" for="input01">ความคุ้มครอง</label>
<div class="controls">
<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"
placeholder="ความคุ้มครอง" path="covName" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="input01">ทุนประกันภัย</label>
<div class="controls">
<label class="checkbox inline"> <form:checkbox value="Y" name="sumOfPol" id="sumOfPol" path="sumOfPol"/> ทั้งกรมธรรม์
</label> <label class="checkbox inline"> <form:checkbox value="Y" name="sumOfPerson" id="sumOfPerson" path="sumOfPerson" /> ต่อคน
</label> <label class="checkbox inline"> <form:checkbox value="Y" name="sumOfTime" id="sumOfTime" path="sumOfTime"/> ต่อครั้ง
</label> <label class="checkbox inline"> <form:checkbox value="Y" name="deduct" id="deduct" path="deduct"/> ค่าเสียหายส่วนแรก
</label>
</div>
</div>
<%
if (request.getParameter("covCode") == null) {
%>
<button class="btn btn-success" name="saveBtn" id="saveBtn">บันทึก</button>
<%
} else {
%>
<button class="btn btn-primary" name="editBtn" id="editBtn">แก้ไข</button>
<%
}
%>
<a class="btn" id="cancelBtn" onClick="$('#tableFrm').dialog('close');">ยกเลิก/ปิด</a>
</fieldset>
</div>
</div>
</div>
</div>
</div>
</fieldset>
</form:form>
<script>
$(function() {
if($("#covCode").val() ){
$('#covCode').attr('readonly', true);
};
$("#frmCoverage").submit(function() {
var url = "saveCovBean";
$.ajax({
type: "POST",
url: url,
data: $("#frmCoverage").serialize(),
success: function(data)
{
$('#grid').trigger("reloadGrid", [{ page: 1 }]);
//$("#frmCoverage").reset();
$('#tableFrm').dialog('close');
},
error: function (xhr, ajaxOptions, thrownError) {
var obj = JSON.parse( xhr.responseText);
alert(obj.errorMessages ) ;
}
});
return false;
});});
</script>