查询手术房:
/**
* 查询手术房
*/
function queryRoom(x){
$.post('/hospital1/ssgl/ssglAction.jsp',
{
'mode':'queryRoom'
},
function(result){
var room = eval("("+result+")");
$('#room').append($('<option/>').attr('value', 'null').text('==请选择=='));
$.each(room, function(i,rm) {
if(i==0){
$('#room').append($('<optgroup/>').attr('label',rm[2]));
} else if(i>0 && (room[i-1][2]!=room[i][2])){
$('#room').append($('<optgroup/>').attr('label',rm[2]));
}
$('#room').append($('<option/>').attr('value', rm[0]).html(' '+rm[1]));
});
$('#room').val(x);
});
}