//界面按钮的显示隐藏 界面input的锁定
function change(){
document.getElementById(‘first1‘).style.display="inline";
document.getElementById(‘first2‘).style.display="inline";
document.getElementById(‘first3‘).style.display="inline";
document.getElementById(‘second2‘).style.display="none";
document.getElementById(‘second1‘).style.display="none";
var memberLevelId = $(‘#memberLevelId‘).val();
var roleId = $(‘#roleId‘).val();//disabled会是数据失效 要把数据取出来
var branchtId = $(‘#branchtId‘).val();
var productId = $(‘#productId‘).val();
var payment = $(‘#payment‘).val();
var memberLevelId = $(‘#memberLevelId‘).val();
var sex = $(‘input:checked‘).val();
$(‘#roleId1‘).val(roleId);//把取出来的数据重新传到action中
$(‘#branchtId1‘).val(branchtId);
$(‘#productId1‘).val(productId);
$(‘#payment1‘).val(payment);
$(‘#memberLevelId1‘).val(memberLevelId);
$(‘#sex1‘).val(sex);
$(‘input:radio‘).attr(‘disabled‘,true);//把界面变成只读
$(‘select‘).attr(‘disabled‘,true);//把界面变成只读
$(‘input:text‘).attr(‘readonly‘,true);//把界面变成只读
}
function restore(){
document.getElementById(‘first1‘).style.display="none";
document.getElementById(‘first2‘).style.display="none";
document.getElementById(‘first3‘).style.display="none";
document.getElementById(‘second2‘).style.display="inline";
document.getElementById(‘second1‘).style.display="inline";
$(‘input:radio‘).attr(‘disabled‘,false);
$(‘select‘).attr(‘disabled‘,false);
$(‘input:text‘).attr(‘readonly‘,false);
}
//把本页的数据通过url传递到action然后传递到下一个jsp
function print(){
var name = $(‘#name‘).val();//真实姓名
var loginName = $(‘#loginName‘).val();//上级代理登陆账号
var cardId = $(‘#cardId‘).val();//身份证号
var mobile = $(‘#mobile‘).val();//手机号
var tel = $(‘#tel‘).val();//固定电话
var address = $(‘#address‘).val();//地址
var quantity = $(‘#quantity‘).val();//购买量
var bankName = $(‘#bankName‘).val();//开户银行
var bankAccount = $(‘#bankAccount‘).val();//银行账号
var productId = $(‘#productId‘).val();//产品id
var branchtId = $(‘#branchtId‘).val();//所属的公司id
window.location.href = "print?productId="+productId+"&loginName="+loginName+
"&branchtId="+branchtId+"&quantity="+quantity+"&name="+name+"&cardId="+cardId+
"&mobile="+mobile+"&tel="+tel+"&address="+address+"&bankName="+bankName+
"&bankAccount="+bankAccount;
}