downbutton.js

来自「医院信息系统(Hospital Information System」· JavaScript 代码 · 共 67 行

JS
67
字号
function command(instruction){
	var contentframeDocument=parent.document.frames["contentframe"].document;
	if(instruction=="用户角色分配"){
		dispatchRole(contentframeDocument);
	}
	
	else if(instruction=="打印挂号单"){
		alert("很抱歉,本功能还没有实现!");
		//printRegisterList(contentframeDocument);
	}
	
	else if(instruction=="建立号表"){
		alert("很抱歉,本功能还没有实现!");
	}
	
	else if(instruction=="门诊病人统计"){
		alert("很抱歉,本功能还没有实现!");
	}
	
	else if(instruction=="历次就诊比较"){
		alert("很抱歉,本功能还没有实现!");
	}
}

function printRegisterList(contentframeDocument){
	var saveStatus;
	//含有saveStatus说明是在录入页面,否则是在查询页面
	if(contentframeDocument.getElementById("saveStatus")!=null){
		saveStatus=contentframeDocument.getElementById("saveStatus").value;
		if(saveStatus=="0"||saveStatus=="2"){
			alert("请您先成功保存挂号信息,再打印挂号单!");	
		}else{
			//var keyName=contentframeDocument.getElementById("keyNames").value;
			//var userID=contentframeDocument.getElementById(keyName).value;
			//window.showModalDialog("/pages/dispatchroleframe.html",userID,'dialogWidth=500px;dialogHeight=280px');
		}
	}else{
		var keyValues=contentframeDocument.getElementById("keyValues").value;
		if(keyValues==""){
			alert("请您先选中一条挂号信息,再打印挂号单!");	
		}else{
			//window.showModalDialog("/pages/dispatchroleframe.html",keyValues,'dialogWidth=500px;dialogHeight=280px');
		}
	}
}

function dispatchRole(contentframeDocument){
	var saveStatus;
	//含有saveStatus说明是在录入页面,否则是在查询页面
	if(contentframeDocument.getElementById("saveStatus")!=null){
		saveStatus=contentframeDocument.getElementById("saveStatus").value;
		if(saveStatus=="0"||saveStatus=="2"){
			alert("请您先成功保存用户信息,再进行权限分配操作!");	
		}else{
			var keyName=contentframeDocument.getElementById("keyNames").value;
			var userID=contentframeDocument.getElementById(keyName).value;
			window.showModalDialog("/pages/userrole/dispatchroleframe.html",userID,'dialogWidth=500px;dialogHeight=280px');
		}
	}else{
		var keyValues=contentframeDocument.getElementById("keyValues").value;
		if(keyValues==""){
			alert("请您先选中一条用户信息,再进行权限分配操作!");	
		}else{
			window.showModalDialog("/pages/userrole/dispatchroleframe.html",keyValues,'dialogWidth=500px;dialogHeight=280px');
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?