text: ﻿var ISDEBUG = false;
  /************参数配置区***************/
  var sys_pattern_file_path="../pattern/";//pattern目录相对html文件的路径
  
  /************参数配置完毕************/
  
  function msg_prompt(msgArray){//弹出提示信息,msgArray,提示信息数组
  	parent.constantFrame.msg_prompt(msgArray);
  }
  function msg_debug(msgArray){//弹出提示信息,msgArray,提示信息数组
  	parent.constantFrame.msg_debug(msgArray);
  }
  function msg_string(msgArray){//返回提示信息,msgArray,提示信息数组
  	parent.constantFrame.msg_string(msgArray);
  }
  function setTableDataString()
  	{
  		
  		//setTableData(tableList);
  		setRepeatDataString();
  	}
  function setRepeatDataString()
  	{
  		
  		setRepeatData();
  	}
  	
  	function pop_signature(signname,signtype,signvalue){
  		getXMLHtmlData(signname,signtype,signvalue);
  		window.open("./signApplet_pop.jsp?signname="+signname,null,"height=400,width=700,status=yes,toolbar=no,menubar=no,location=no");
  	}
  	
  
  		function getDateString(DataFormat,DateText)
  		{
  			var datastring;
  			if(DataFormat.substring(0,4)=="yyyy")
  				datastring=DateText.substring(0,4)+DateText.substring(5,7)+DateText.substring(8,10);
  			else if(DataFormat.substring(DataFormat.length-4,DataFormat.length)=="yyyy")
  				datastring=DateText.substring(6,10)+DateText.substring(0,2)+DateText.substring(3,5);
  			else if((DataFormat.substring(0,2)=="yy")&&(DataFormat.length<=9))
  				datastring=DateText.substring(0,2)+DateText.substring(3,5)+DateText.substring(6,8);
  			else if((DataFormat.substring(DataFormat.length-2,DataFormat.length)=="yy")&&(DataFormat.length==8))
  				datastring=DateText.substring(6,8)+DateText.substring(0,2)+DateText.substring(3,5);
  			return datastring;
  		}
  	
  		function CompareEdit(Edit1,Edit2,Oper,DataType)
  		{
  			
  			var firEdit= new FPEdit(Edit1);
  			var secEdit = new FPEdit(Edit2);
  			var firEditText =firEdit.text;
  			var secEditText=secEdit.text;
  			var result =false;				
  			
  			if ((firEditText=="")||( secEditText==""))
  				result =true;	
  			else
  			{			
  				switch(Oper)
  				{
  					case '大于': 
  								
  								if(parseInt(firEditText) >parseInt(secEditText))
  									result=true;
  								break;
  					case '小于':
  								if(parseInt(firEditText) <parseInt(secEditText))
  									result=true;
  								break;
  					case '大于等于':
  								if(parseInt(firEditText) >=parseInt(secEditText))
  									result=true;
  								break;						
  					case '小于等于':
  								if(parseInt(firEditText) <=parseInt(secEditText))
  									result=true;
  								break;
  					case '不等于':
  								if(parseInt(firEditText)!=parseInt(secEditText))
  									result=true;
  								break;
  					case '等于':
  								if(parseInt(firEditText)==parseInt(secEditText))
  									result=true;
  								break;
  					default : break;
  				}		
  			}	
  			return result;	
  		} 
  		
  		
  
  			<!--加入打印代码开始-->
  			
  			function pagePrint(innerPrint){
  				//outPrintPage=window.open("../print/outPrintContent.htm?innerPrint="+innerPrint,"outPrint","height=100,width=100,top=2048,left=1048;");        		
  				parent.constantFrame.PrintInit(innerPrint)
  			}
  			//打印当前页
  
  			function pagePrint_currpage(innerPrint){
  				//outPrintPage=window.open("../print/outPrintContent.htm?innerPrint="+innerPrint,"outPrint","height=100,width=100,top=2048,left=1048;");        		
  				//alert("begin pagePrint_currpage");
  				parent.constantFrame.PrintInit_currpage(innerPrint)
  				//alert("end pagePrint_currpage");
  			}
  			//打印指定页
  
  			function pagePrint_page(innerPrint,pageid){
  				//outPrintPage=window.open("../print/outPrintContent.htm?innerPrint="+innerPrint,"outPrint","height=100,width=100,top=2048,left=1048;");        		
  				parent.constantFrame.PrintInit_page(innerPrint,pageid);
  			}
  						
  			<!--加入打印代码结束-->
  				<!--提交按钮-->
  	function System__Submit(action)
  	{
  		
  		if (form_onSubmit())
  			{
  				
  				if(sysActionObjArr.filtBL("5")!=""){
  					showLoading();//显示Loading页面
  					sys_deal_list_item();//保存List的item项
  
  					document.uform.sys_formpro_action.value="submit_action";
  					parent.constantFrame.requestMode=5;//submit请求
  					if(typeof(action)=="undefined"||action==""){
  						uform.action="../../formpro.do";
  					}else{
  						uform.action=action;
  					}
  					
  					//alert(uform.action);
  					//uform.action='submitForm.jsp';
  					setTableDataString();
  					uform.submit();					
  				}
  			}
  		else {
  			//alert("表单中存在不符合标准的数据，请检查一下！");
  			msg_prompt(new Array("$0101"));
  		}
  	}
  	//执行在onload事件中需要执行的缺省操作
  	function defaultOp_onLoad(){
  		//alert("default");
  	}
  	<!--校验按钮-->
  	function System__Check()
  	{
  		if (form_onSubmit())
  		{
  
  			msg_prompt(new Array("$0102"));
  		}
  		else {
  
  			msg_prompt(new Array("$0101"));
  		}
  	}
  ////////////////////////////////用于针对请求方式进行业务逻辑筛选进行处理////////////
  var IS_DEFAULT_EXE_LOGIC=true;//缺省请求是否进行执行
  var sysActionObjArr=new Sys_Action_Arr();
  
  function Sys_Action_Arr(){
  	this.actionArr=new Array();
  	this.addAction=function(actionName,isDefaultExecute){
  		this.actionArr[this.actionArr.length]=new Sys_Action_Object(actionName,isDefaultExecute);
  		return this.actionArr[this.actionArr.length-1];
  	}
  	this.getActionByName=function(actionName){//根据名称获取repeat值
  
  		var actionNo=seekArray(this.actionArr,actionName);
  		if(actionNo!=-1){
  			return this.actionArr[actionNo];
  		}else{
  			return null;
  		}
  		///return this.actionArr[seekArray(this.actionArr,actionName)];
  	}
  	
  	this.filtBL=function(BLnumber){
  		
  		var ret="";
  		var blNos=BLnumber.split(";");
  		var action=this.getActionByName(parent.curActionName);
  		if(action!=null){
  			//update by simon 2004/12/09
  			if(action.isDefaultExecute)return BLnumber;
  			//update end;
  			for(var i=0;i<blNos.length;i++){
  				if(action.hasLogic(blNos[i])){
  					ret+=blNos[i]+";";
  				}
  			}
  		}else{
  			if(IS_DEFAULT_EXE_LOGIC){
  				ret=BLnumber;
  			}else{
  				ret="";
  			}
  		}
  		if(ret.length!=0){
  			//update by simon 2004/12/09
  			//ret=ret.slice(0,ret.length-1);
  			ret = ret.slice(0,ret.length);
  			//update end;
  		}
  		//alert(ret);
  		return ret;
  	}
  }
  function Sys_Action_Object(actionName,isDefaultExecute){//定义请求对象
  	this.isDefaultExecute=isDefaultExecute;//缺省的时候是否执行业务逻辑
  	this.actionName=actionName;//action 名称
  	this.logicArr=new Array();
  	this.addLogic=function(logicNo){
  		this.logicArr[this.logicArr.length]=logicNo;
  	}
  	this.hasLogic=function(logicNo){
  		if(seekArray(this.logicArr,logicNo)==-1){
  			return false;
  		}else{
  			return true;
  		}
  	}
  	this.toString=function(){
  		return this.actionName;
  	}
  }
  //定义业务逻辑
  /*var sys_load_action=sysActionObjArr.addAction("load_action",true);
  //sys_load_action.addLogic("1082016976533");
  //sys_load_action.addLogic("1082017857439");
  sys_load_action.addLogic("5");
  sys_load_action.addLogic("15");
  sys_load_action.addLogic("16");
  sys_load_action.addLogic("18");
  */
  ////////////////////////////////处理完毕 唐承业 2004/12/7///////////////////////////////////////////
  ///////////////////////////用于保存dropList和List中的选项情况//////////////////////
  function sys_deal_list_item(){
  	var xmlInst = new ActiveXObject("Msxml2.DOMDocument");//Instance对象
  	xmlInst.async = false;
  	xmlInst.resolveExternals = false;
  	xmlInst.loadXML(ufmModel.innerHTML);
  	var xmlList = new ActiveXObject("Msxml2.DOMDocument");//dropList对象
  	xmlList.async = false;
  	xmlList.resolveExternals = false;
  	var listItems = xmlList.createElement("listItems");
  	
  	//////////////////////////////////
  	var controls=xmlInst.documentElement.selectNodes("//model//instance").item(0).childNodes;
  	for(var i=0;i<controls.length;i++){
  		var ctrName=controls.item(i).baseName;//控件名称
  		var ctrItems=xmlList.createElement(ctrName);
  		ctrItems.setAttribute("type",controls.item(i).getAttribute("type"));
  		if(controls.item(i).getAttribute("type")=="dropList"||controls.item(i).getAttribute("type")=="list"){//droplist
  			var ctrObj=eval("document.all."+ctrName);
  			
  			for(var j=0;j<ctrObj.options.length;j++){
  				var item=xmlList.createElement("item");
  				item.setAttribute("text",ctrObj.options[j].text);
  				item.setAttribute("value",ctrObj.options[j].value);
  				ctrItems.appendChild(item);
  			}
  			listItems.appendChild(ctrItems);
  			//alert(eval("document.all."+ctrName+".value"))
  		}else if(controls.item(i).getAttribute("type")=="table"||controls.item(i).getAttribute("type")=="repeatUnit"){
  			var maxRowID=uformRepeatArray.getRepeatByName(ctrName).getMaxRowID();
  			for(var j=1;j<maxRowID+1;j++){
  				var row=xmlList.createElement("row");
  				row.setAttribute("id",j);
  				var repeatCtrs=controls.item(i).childNodes;
  				for(var k=0;k<repeatCtrs.length;k++){
  					if(repeatCtrs.item(k).getAttribute("type")=="dropList"||repeatCtrs.item(k).getAttribute("type")=="list"){//droplist
  						var funName="document.all.table_"+ctrName+"_row_"+j+"_col_"+repeatCtrs.item(k).baseName;
  						var ctrObj=eval(funName);
  						//alert(ctrObj.options.length);
  						var repesatCtrItems=xmlList.createElement(repeatCtrs.item(k).baseName);
  						repesatCtrItems.setAttribute("type",repeatCtrs.item(k).getAttribute("type"));
  						for(var l=0;l<ctrObj.options.length;l++){
  							var repeatItem=xmlList.createElement("item");
  							repeatItem.setAttribute("text",ctrObj.options[l].text);
  							repeatItem.setAttribute("value",ctrObj.options[l].value);
  							repesatCtrItems.appendChild(repeatItem);
  						}
  						row.appendChild(repesatCtrItems);
  						//alert(eval("document.all."+ctrName+".value"))
  					}
  				}
  				//alert(repeatCtrs.item(0).xml);
  				ctrItems.appendChild(row);
  			}
  			listItems.appendChild(ctrItems);
  			//alert(maxRowID);
  		}
  	}
  	//alert(listItems.xml);
  	document.all.SYS_LIST_ITEM_LIST.value=listItems.xml;
  	//alert(controls.length);
  }
  
  function sys_refresh_list_item(ctrName,isRepeat){
  	if(document.all.SYS_LIST_ITEM_LIST.value!=""){
  		var xmlList = new ActiveXObject("Msxml2.DOMDocument");//dropList对象
  		xmlList.async = false;
  		xmlList.resolveExternals = false;
  		xmlList.loadXML(document.all.SYS_LIST_ITEM_LIST.value);
  		
  		
  		if(isRepeat){//是table控件
  		
  			//var tableControl=ctrName.split(xpath_separator);
  			//var tableCtrName="table_"+tableControl[0]+"_row_"+tableControl[2]+"_col_"+tableControl[1];	
  			//alert();	
  			var controlName="";
  			var repeat=xmlList.documentElement.selectSingleNode("//listItems//"+ctrName);
  			//alert(repeat);
  			if(repeat!=null){
  				var rows=repeat.selectNodes("row");
  				//alert(rows.length);
  				for(var i=0;i<rows.length;i++){
  					var rowid=rows.item(i).getAttribute("id");
  					var controls=rows.item(i).childNodes;
  					for(var j=0;j<controls.length;j++){
  						var control=controls.item(j);
  						var controlFullName="document.all.table_"+ctrName+"_row_"+rowid+"_col_"+control.baseName;
  						//alert(controlFullName);
  						eval(controlFullName).options.length=0;
  						var items=control.selectNodes("item");
  						//clearOptions(ctrName+"/"+control.baseName+"/"+rowid);
  						//alert();
  						for(var k=0;k<items.length;k++){
  							setListOption(ctrName+"/"+control.baseName+"/"+rowid,items.item(k).getAttribute("text"),items.item(k).getAttribute("value"));
  						}
  					}
  					//alert(rowid);
  				}
  			}
  			//alert(rows.item(0).xml);
  			/*var items=xmlList.documentElement.selectNodes("//listItems//"+ctrName+"//item");
  			clearOptions(ctrName);
  			//alert();
  			for(var i=0;i<items.length;i++){
  				setListOption(ctrName,items.item(i).getAttribute("text"),items.item(i).getAttribute("value"));
  			}*/
  		}else{
  			var items=xmlList.documentElement.selectNodes("//listItems//"+ctrName+"//item");
  			if(items.length>0){
  				clearOptions(ctrName);
  				//alert(ctrName);
  				for(var i=0;i<items.length;i++){
  					setListOption(ctrName,items.item(i).getAttribute("text"),items.item(i).getAttribute("value"));
  				}
  			}
  			//alert(items.length);
  		}
  	}
  }
  ///////////////////////////用于保存dropList和List中的选项情况结束/////////////////
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  