www.gusucode.com > 2028网博士成品网站管理系统 PHP网站源码程序 > 2028/hospital/admin/js/expertset.js

    
//专家门诊信息设置
$(document).ready(function(){

	$("td.eset2").click(function(){
		
		var tdid=this.id;
		var str_id=tdid.split('_');
		var catid=str_id[0];
		var week=str_id[1];
		var amorpm=str_id[2];

		$.ajax({
			type: "POST",
			url:"post.php",
			data: "act=expertset&catid="+catid+"&week="+week+"&amorpm="+amorpm,
			success: function(msg){
				
					$('div#esetDialog').remove();
					$('html').append(msg);
					$.blockUI({message: $('div#esetDialog'),css:{width:'600px'}}); 
					$('.pwClose').click(function() { 
						$.unblockUI(); 
						$('div#msnDialog').remove();
					}); 

					$('#esetForm').submit(function(){ 

						$('#esetForm').ajaxSubmit({
							target: 'div#esetnotice',
							url: 'post.php',
							success: function(msg) {
								var str_msg=msg.split("_");
								
								if(str_msg[0]=="OK"){
									$('#'+tdid)[0].innerHTML=str_msg[1];
									$().alertwindow("添加成功","");
								}else{
									$('div#esetnotice').show();
								}
								
							}
						}); 
						return false; 
					});
				
			}
		});
	});
		
});



//专家门诊信息初始化
$(document).ready(function(){

	$("input#reset").click(function(){
		var ifreset = confirm("初始化之后,表内所有的专家坐诊信息将被清除。确认要进行此操作吗?");
		if(!ifreset){
			return false;
		}else{
			$.ajax({
				type:"POST",
				url:"post.php",
				data:"act=expertsetreset",
				success:function(msg){
					if(msg=="OK"){
						$().alertwindow("初始化成功","hospital_set.php");
					}else{
						$().alertwindow(msg);
					}
				}
			});
		}
	});
});