<LINK href="/static/css/css2.css" type=text/css rel=stylesheet>
<script src="/static/bookTicket/js/jquery-1.4.2.min.js" type="text/javascript"> </script>
<script type="text/javascript">
var url = "<%=request.getContextPath()%>/ponitManager!queryUpdateBeforePonitqnar.action";
$(document).ready(function(){
$.ajax({
type: ‘POST‘,
url: url,
success: result
});
})
function result(data){
var list = data.split(‘;‘);
$(‘#oldpoint‘).val(list[0]);
$(‘#oldcontrol‘).val(list[1]);
var hidde=list[2];
if(hidde==1){
$("#show").html("<font color=‘red‘>当前政策控点值为:<strong> "+list[1]+"</strong></font>");
$("#liudian").hide();
}
if(hidde==2){
$("#show").html("<font color=‘red‘>当前政策留点值为:<strong> "+list[0]+"</strong></font>");
$("#kongdian").hide();
}
var onorclose=list[3];
if(onorclose==0){
$("input[name=‘onorclose‘][value=‘0‘]").attr("checked",true);
if(hidde==1){
$("#show").html("<font color=‘grey‘>当前政策控点值为:<strong> "+list[1]+"</strong></font>");
$("#liudian").hide();
}
if(hidde==2){
$("#show").html("<font color=‘grey‘>当前政策留点值为:<strong> "+list[0]+"</strong></font>");
$("#kongdian").hide();
}
document.getElementById(‘openorclose‘).disabled=true;
document.getElementById(‘kongdian‘).disabled=true;
document.getElementById(‘liudian‘).disabled=true;
}
if(onorclose==1){
$("input[name=‘onorclose‘][value=‘1‘]").attr("checked",true);
}
var sta=document.getElementById("status");
for(i = 0;i<sta.length;i++){
if(hidde==sta.options[i].value){
sta.options[i].selected=true;
}
}
}
function update(){
var status1=document.getElementById(‘status‘).value;
if(status1==1){
var newcontrol = $(‘#newcontrol‘).val();
var oldpoint = $(‘#oldpoint‘).val();
$(‘#hiddens‘).val(oldpoint);
if(newcontrol==‘‘){
alert(‘变更值不能为空!‘);
return false;
}
var reg= /^[0-9]{0,}(([.]*\d{1,2})|[0-9]{0,})$/;
if(!reg.test(newcontrol)){
alert("请输入数字或不能是负数!");
$(‘#newcontrol‘).val(‘‘);
return false;
}
var form1=document.getElementById("form1");
form1.action="<%=request.getContextPath()%>/ponitManager!updatePonitQnar.action?oldpoint="+oldpoint;
form1.submit();
}
if(status1==2){
var newpoint = $(‘#newpoint‘).val();
var oldcontrol = $(‘#oldcontrol‘).val();
$(‘#hiddens‘).val(oldcontrol);
if(newpoint==‘‘){
alert(‘变更值不能为空!‘);
return false;
}
var reg= /^(-[1-9]|[1-9]|(0[.])|(-(0[.])))[0-9]{0,}(([.]*\d{1,2})|[0-9]{0,})$/;
if(!reg.test(newpoint)){
alert("请输入数字!");
$(‘#newcontrol‘).val(‘‘);
return false;
}
var form1=document.getElementById("form1");
form1.action="<%=request.getContextPath()%>/ponitManager!updatePonitQnar.action";
form1.submit();
}
}
function getStatus(){
var status= $("#status");
for(i = 0;i<status.length;i++){
if(status[i].value==1){
$("#kongdian").show();
$("#liudian").hide();
}if(status[i].value==2){
$("#liudian").show();
$("#kongdian").hide();
}
}
}
function update1(parments){
var status2=document.getElementById(‘status‘).value;
document.getElementById(‘openorclose‘).disabled=false
document.getElementById(‘kongdian‘).disabled=false;
document.getElementById(‘liudian‘).disabled=false;
if(status2==1){
var oldcontrol=$(‘#oldcontrol‘).val();
$(‘#newcontrol‘).val(oldcontrol);
var oldpoint = $(‘#oldpoint‘).val();
$(‘#hiddens‘).val(oldpoint);
}if(status2==2){
var oldpoint = $(‘#oldpoint‘).val();
$(‘#newpoint‘).val(oldpoint);
var oldcontrol = $(‘#oldcontrol‘).val();
$(‘#hiddens‘).val(oldcontrol);
}
var form1=document.getElementById("form1");
form1.action="<%=request.getContextPath()%>/ponitManager!updatePonitQnar.action";
form1.submit();
}
</script>