Sfoglia il codice sorgente

git-svn-id: https://192.168.57.71/svn/hbghj@50 201dd7a2-ec1b-f84b-8b06-88221118ff88

ld_liufl 9 anni fa
parent
commit
27678f8865

+ 44 - 2
gkaq/yjpt-flex/trunk/html-template/index.template.html

@@ -15,8 +15,8 @@
         <meta name="google" value="notranslate" />         
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
         <meta http-equiv="pragma" content="no-cache"/>
-  		<meta http-equiv="Cache-Control" content="no-cache, must-revalidate"/>
-  		<meta http-equiv="expires" content="0"/>
+        <meta http-equiv="Cache-Control" content="no-cache, must-revalidate"/>
+     	<meta http-equiv="expires" content="0"/>
         <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and 
              the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as 
              the percentage of the height of its parent container, which has to be set explicitly.  Fix for
@@ -133,5 +133,47 @@
                 <!--<![endif]-->
             </object>
         </noscript>     
+		
+		  <!--------------------------- iSignature begin: ----------------------------------->
+        <form name="mainForm" style="display:none">  
+			<div id="obj" ></div> 
+		</form>
+		
+        <script type="text/javascript"> 
+        	window.onload=function(){ 
+				var ServiceUrl =  window.location.protocol+"//"+ window.location.hostname +":"+window.location.port+ window.location.pathname+ "Service.jsp";
+				var objHtml= '<OBJECT id="SignatureControl" classid="clsid:D85C89BE-263C-472D-9B6B-5264CD85B36E" codebase="iSignatureHTML.cab#version=8,2,2,56" width="0" height="0" >'+
+		 			'<param name="ServiceUrl"  value="'+
+					ServiceUrl+'"  > '+
+					'</OBJECT>';
+				document.getElementById('obj').innerHTML = objHtml;
+			}
+        	
+			//作用:进行批量签章
+			function RunBatchSignature(documentID,userName,ExtParam){ 
+				ExtParam = encodeURI(ExtParam,"utf-8");
+				//userName = encodeURI(userName,"utf-8"); 
+  				mainForm.SignatureControl.FieldsList="BH=编号;ZYDW=作业单位;ZYWTR=作业委托人;CM=船名;XCGLFZR=现场管理负责人;WXHWMCBH=危险品名称;WPBH=物品编号;JSPM=技术品名;BZ=包装;WXPLB=类别和项别;BYZD4=包装类别;INOROUT=进出港;ZYSL=作业数量(吨);SG=上港;XG=下港;MAO=内外贸;HZWXX=火灾危险性;DXDJ=毒性等级;WRLB=污染类别;JZXSL=集装箱数量;HC=航次;HWZL=货物种类;HWXS=货物形式;LHXZ=理化性质;ZYDD=作业地点;ZYSJQ=作业时间起;ZYSJZ=作业时间止;AQFFCS=安全防范措施;BGR=报告人;LXFS=联系方式;BGSJ=报告时间;BYZD2=申报员证书编号;SHYJ=审核意见;SHR=审核人;SHSJ=审核时间";       //所保护字段
+  				mainForm.SignatureControl.Position(0,0);                        //签章位置
+  				mainForm.SignatureControl.DocumentList=documentID;                        //签章页面ID
+  				mainForm.SignatureControl.WebSetFontOther("True","同意通过","0","宋体","11","000128","True");  //默认签章附加信息及字体,具体参数信息参阅技术白皮书
+  				mainForm.SignatureControl.SaveHistory="True";                    //是否自动保存历史记录,true保存  false不保存  默认值false
+  				mainForm.SignatureControl.UserName="wjd";                          //文件版签章用户
+  				mainForm.SignatureControl.WebCancelOrder=0;			                 //签章撤消原则设置, 0无顺序 1先进后出  2先进先出  默认值0
+  				mainForm.SignatureControl.DivId = "yfdiv";                    //签章所在层
+  				mainForm.SignatureControl.EnableMove = "false";
+  				mainForm.SignatureControl.AutoCloseBatchWindow=true;		//为true当批量签章完成后,系统自动关闭进度窗口,否则不自动关闭,系统默认为false。
+  				mainForm.SignatureControl.ExtParam = ExtParam;						//输入的附加信息
+  				return mainForm.SignatureControl.RunBatchSignature();                //执行批量签章 
+			}
+			
+			//打开危险品审批的打印页面
+			function ZysqbpPrintSignature(documentID){
+				var url = "/yjpt/ZysqbpPrintSignature.jsp?Template=1468222709986&UserName=&FileType=.doc&documentID="+documentID;
+				window.open (url,"_blank");
+			}
+		</script>
+		<!------------------------------ iSignature end ----------------------------------->
+		
    </body>
 </html>

+ 1 - 1
gkaq/yjpt-flex/trunk/src/Main.mxml

@@ -161,7 +161,7 @@
 					Global.deploySzd = bc.getAttribute("szd") as CodeVo;
 					Global.deployMode = bc.getAttribute("deployMode") as String;
 					Global.upload_file_size=bc.getAttribute("uploadFileSize") as Number;
-					Global.verison=bc.getAttribute("version") as String;
+					Global.version=bc.getAttribute("version") as String;
 					var defaultUser:UserVo = bc.getAttribute("user") as UserVo;
 					login.NeedCheckCode=true;
 					if(defaultUser !=null){

+ 4 - 2
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/common/Global.as

@@ -71,6 +71,9 @@ package com.jtgh.yjpt.common
 			return map;
 		}
 		
+		/** 危险品审批是否启用签章,默认不启用*/
+		public static var iSignature:String = YesNoSelect.NO;
+		
 		/** 超级管理员 */
 		public static var adminId:Number = 1;
 		/** 同步用户 */
@@ -115,9 +118,8 @@ package com.jtgh.yjpt.common
 		public static var menuCache=new Dictionary();
 		/**	是否有选中 */
 		public static var menuFlag:Boolean=true;
-		
 		/** 版本*/
-		public static var verison:String="";
+		public static var version:String="";
 	}
 }
 

+ 3 - 0
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/common/component/ui/DateTime.mxml

@@ -349,12 +349,14 @@
 			private function minuteChangeHandler(evt:NumericStepperEvent):void{
 				nowTime.setHours(nowTime.hours,evt.value,nowTime.seconds,nowTime.milliseconds);
 				newTime.setFullYear(nowTime.fullYear,nowTime.month,nowTime.date);
+				newTime.setHours(nowTime.hours,nowTime.minutes,nowTime.seconds,nowTime.milliseconds);
 				returnTime.text = dateToStr(newTime);
 			}
 			
 			private function hourChangeHandler(evt:NumericStepperEvent):void{
 				nowTime.setHours(evt.value,nowTime.minutes,nowTime.seconds,nowTime.milliseconds);
 				newTime.setFullYear(nowTime.fullYear,nowTime.month,nowTime.date);
+				newTime.setHours(nowTime.hours,nowTime.minutes,nowTime.seconds,nowTime.milliseconds);
 				returnTime.text = dateToStr(newTime);
 			}
 			
@@ -379,6 +381,7 @@
 						newTime=new Date;
 					} 
 					nowTime.setFullYear(newTime.fullYear,newTime.month,newTime.date);
+					nowTime.setHours(newTime.hours,newTime.minutes,newTime.seconds,newTime.milliseconds);
 					pop = PopUpManager.createPopUp(this, mx.containers.TitleWindow, false);
 					this.addEventListener(Event.REMOVED_FROM_STAGE,function(e:Event):void{
 						PopUpManager.removePopUp(pop as IFlexDisplayObject);

+ 15 - 8
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/model/SystemModel.as

@@ -8,19 +8,24 @@ package com.jtgh.yjpt.model
 	import com.jtgh.yjpt.select.MenuTypeSelect;
 	import com.jtgh.yjpt.select.YesNoSelect;
 	import com.jtgh.yjpt.view.Workspace;
+	import com.jtgh.yjpt.view.core.ChangePwd;
 	import com.jtgh.yjpt.view.core.LoginPanel;
 	import com.jtgh.yjpt.vo.access.UserVo;
 	import com.jtgh.yjpt.vo.common.CodeVo;
 	import com.jtgh.yjpt.vo.sys.ButtonVo;
 	import com.jtgh.yjpt.vo.sys.MenuVo;
 	
+	import flash.display.DisplayObject;
 	import flash.events.Event;
 	import flash.utils.Dictionary;
 	import flash.utils.getDefinitionByName;
 	
+	import mx.controls.Alert;
 	import mx.core.UIComponent;
 	import mx.core.mx_internal;
+	import mx.events.CloseEvent;
 	import mx.events.FlexEvent;
+	import mx.resources.ResourceManager;
 	
 	import spark.components.Group;
 
@@ -104,19 +109,19 @@ package com.jtgh.yjpt.model
 		{
 			var swfUrl:String="";
 			if(modId.indexOf("002")==0)
-				swfUrl="module/YjglModule.swf" + "?version=" + Global.verison;
+				swfUrl="module/YjglModule.swf" + "?version=" + Global.version;
 			if(modId.indexOf("003")==0)
-				swfUrl="module/JyrxxModule.swf"  + "?version=" + Global.verison;
+				swfUrl="module/JyrxxModule.swf"  + "?version=" + Global.version;
 			if(modId.indexOf("004")==0)
-				swfUrl="module/WxhwspModule.swf"  + "?version=" + Global.verison;
+				swfUrl="module/WxhwspModule.swf"  + "?version=" + Global.version;
 			if(modId.indexOf("005")==0)
-				swfUrl="module/BaglModule.swf"  + "?version=" + Global.verison;
+				swfUrl="module/BaglModule.swf"  + "?version=" + Global.version;
 			if(modId.indexOf("006")==0)
-				swfUrl="module/ZcdcModule.swf"  + "?version=" + Global.verison;
+				swfUrl="module/ZcdcModule.swf"  + "?version=" + Global.version;
 			if(modId.indexOf("008")==0)
-				swfUrl="module/TaskModule.swf"  + "?version=" + Global.verison;//任务管理
+				swfUrl="module/TaskModule.swf"  + "?version=" + Global.version;//任务管理
 			if(modId.indexOf("010")==0)
-				swfUrl="module/QlygModule.swf"  + "?version=" + Global.verison;
+				swfUrl="module/QlygModule.swf"  + "?version=" + Global.version;
 			return swfUrl;
 		}
 		//----------------------------------------------------------------------
@@ -163,7 +168,9 @@ package com.jtgh.yjpt.model
 //				Global.MAP_URL=bc.getAttribute("mapUrl") as String;
 				Global.OPEN_MAP=bc.getAttribute("openMap") as String;
 				Global.upload_file_size=bc.getAttribute("uploadFileSize") as Number;
-				Global.verison=bc.getAttribute("version") as String;
+				Global.version=bc.getAttribute("version") as String;
+				//设置是否在危险品审批中使用签章功能的参数
+				Global.iSignature=bc.getAttribute("iSignature") as String;
 			}
 			//界面,登陆界面换成主框架
 			thisModel.mainPane.removeAllElements();

+ 1 - 1
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/Check/DcEdit.mxml

@@ -693,7 +693,7 @@
 			<cus:QLabel text="{resourceManager.getString('check','jdjcgl.szd')}" textAlign="right" width="135" notNull="true"/>
 			<cus:QComboBox id="szd" width="200"  selectedVO="{dcModel.dcVo.szd==null?Global.user.szd:dcModel.dcVo.szd}" comboxClass="SzdEditSelect"  enabled="{!isJyr}" parentId="{Global.szd.id}" hasBlank="true" change="getSzgq(event)"  />
 			<cus:QLabel text="{resourceManager.getString('check','jdjcgl.szgq')}" textAlign="right" width="120" notNull="true"/>
-			<cus:QComboBox id="szgq" width="200"   selectedVO="{dcModel.dcVo.szgq}" comboxClass="GqBySzdSelect" hasBlank="true" parentId="{dcModel.dcVo.szd}" enabled="{!isJyr}"/>
+			<cus:QComboBox id="szgq" width="200"   selectedVO="{dcModel.dcVo.szgq}" comboxClass="GqBySzdSelect" hasBlank="true" parentId="{dcModel.dcVo.szd==null?Global.user.szd:dcModel.dcVo.szd}" enabled="{!isJyr}"/>
 		</s:HGroup>
 		<s:HGroup width="100%" horizontalAlign="left" verticalAlign="middle">
 			<s:HGroup width="341" horizontalAlign="left" verticalAlign="middle">

+ 1 - 1
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/gq/Gq.mxml

@@ -29,7 +29,7 @@
 		<s:HGroup width="100%">
 			<cus:QLabel text="{resourceManager.getString('gq','gq.ssgk')}" textAlign="right" width="128"/>
 			<cus:QComboBox id="ssgk" width="300" comboxClass="SzdEditSelect" parentId="{Global.szd.id}" 
-						   selectedVO="{thisModel.gq.szd==null?Global.user.szd:thisModel.gq.szd}" />
+						   selectedVO="{thisModel.gq==null?Global.user.szd:thisModel.gq.szd}" />
 			<s:Spacer width="100%"/>
 			<cus:QLabel text="{resourceManager.getString('gq','gq.gqmc')}"  textAlign="right" width="128"/>
 			<cus:QTextInput id="gqmc" width="300" />

+ 74 - 16
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/ZysqbpAudit.mxml

@@ -10,6 +10,7 @@
 		 horizontalAlign="center">
 	<fx:Script>
 		<![CDATA[
+			import com.jtgh.yjpt.select.YesNoSelect;
 			import com.jtgh.yjpt.common.Global;
 			import com.jtgh.yjpt.common.util.Constants;
 			import com.jtgh.yjpt.common.util.Utils;
@@ -73,24 +74,81 @@
 				if(shjy==""){
 					Utils.showInfoMessage("shyj.empty",null,"zysqbp");
 					return;
+				} 
+				if(Global.iSignature== YesNoSelect.YES){
+					var view_self:ZysqbpAudit = this; 
+					var confirmView:zysqbpConfirm = new zysqbpConfirm(); 
+					confirmView.v = view_self;
+					Utils.popupWindow("确认信息",confirmView as DisplayObject,FlexGlobals.topLevelApplication as DisplayObject,null, 300, 150);  
+				}
+				else{
+					Utils.doOtherConfirm(function():void{
+						var shDate:Date=shsj.selectedDate;
+						Utils.callRemote("zysqbpController","aduit",function():void{ 				
+							if(taskModel!=null){
+								taskModel.thisView.doQuery();
+							}else{
+								model.doQuery(null);
+							}
+							view.dispatchEvent(new CloseEvent(Event.CLOSE));
+						},shjy,shDate,true,zysqbp);
+					});
+				} 
+			}
+			
+			/**
+			 * 确认操作页面"同意"按钮回调的函数
+			 */
+			public function ConfirmBackPass():void{
+				//Alert.show("pass");
+				PassCallRemoteFun();
+			}
+			
+			/**
+			 * 确认操作页面"同意且盖章"按钮回调的函数
+			 */
+			public function ConfirmBackPassAndSignature():void{
+				//Alert.show("pass signature");
+				if(CallSignatue()){//调用签章代码,签章成功,再审批通过
+					PassCallRemoteFun();
 				}
-				Utils.doOtherConfirm(function():void{
-//					var shjy:String=StringUtil.trim(shyj.text);
-//					if(shjy==""){
-//					Utils.showInfoMessage("shyj.empty",null,"zysqbp");
-//					return;
-//					}
-					var shDate:Date=shsj.selectedDate;
-					Utils.callRemote("zysqbpController","aduit",function():void{
-						if(taskModel!=null){
-							taskModel.thisView.doQuery();
-						}else{
-							model.doQuery(null);
-						}
-						view.dispatchEvent(new CloseEvent(Event.CLOSE));
-					},shjy,shDate,true,zysqbp);
-				});
 			}
+			
+			public function CallSignatue():Boolean{
+				var shjy:String=StringUtil.trim(shyj.text);
+				var shDate:String=shsj.selectedDate.fullYear+"-"+ (shsj.selectedDate.month+1)+"-"+ shsj.selectedDate.date;  
+				var shr_txt:String=StringUtil.trim(shr.text);  
+				var ExtParam:String = "SHYJ=" +shjy + "\r\n"+
+					"SHR=" +shr_txt+ "\r\n"+
+					"SHSJ=" + shDate + "\r\n";
+				//签章
+				var SignatureResult:Boolean =ExternalInterface.call("RunBatchSignature",zysqbp.id,Global.user.name,ExtParam);
+				return SignatureResult;
+			}
+			
+			/**
+			 * 点击通过按钮调用后台代码
+			 */
+			public function PassCallRemoteFun():void{
+				var shjy:String=StringUtil.trim(shyj.text);
+				if(shjy==""){
+					Utils.showInfoMessage("shyj.empty",null,"zysqbp");
+					return;
+				}
+				
+				var shDate:Date=shsj.selectedDate;
+				Utils.callRemote("zysqbpController","aduit",function():void{
+					
+					if(taskModel!=null){
+						taskModel.thisView.doQuery();
+					}else{
+						model.doQuery(null);
+					}
+					view.dispatchEvent(new CloseEvent(Event.CLOSE));
+				},shjy,shDate,true,zysqbp);
+				
+			}
+			
 			/**
 			 * 不通过
 			 */

+ 10 - 2
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/ZysqbpView.mxml

@@ -10,6 +10,7 @@
 		 horizontalAlign="center">
 	<fx:Script>
 		<![CDATA[
+			import com.jtgh.yjpt.select.YesNoSelect;
 			import com.jtgh.yjpt.common.Global;
 			import com.jtgh.yjpt.common.PrintParam;
 			import com.jtgh.yjpt.common.PrintTypes;
@@ -99,6 +100,12 @@
 				param.setParameter("type",PrintUtil.REPORT_EXPORT_TYPE_HTML);
 				PrintUtil.doPrint1(param,"_blank");
 			}
+			
+			protected function print2(event:MouseEvent):void{
+				ExternalInterface.call("ZysqbpPrintSignature",zysqbp.id);
+			}
+			
+			
 			protected function download(event:MouseEvent):void{
 				var param:PrintParam=new PrintParam("zysqbp");
 				param.setParameter("id",zysqbp.id.toString());
@@ -548,9 +555,10 @@
 			</s:VGroup>
 		</s:BorderContainer>
 		<s:HGroup width="100%" height="40" gap="0" horizontalAlign="center" verticalAlign="middle">
+			<s:Button label="{resourceManager.getString('common','btn.print')}" click="print2(event)" skinClass="skins.cus.ButtonSkin" visible="{Global.iSignature==YesNoSelect.YES}" />
 			<s:Button label="{resourceManager.getString('common','btn.close')}" click="this.dispatchEvent(new CloseEvent(CloseEvent.CLOSE))" skinClass="skins.cus.ButtonSkin"/>
-			<s:Button label="{resourceManager.getString('common','btn.print')}" click="print(event)" skinClass="skins.cus.ButtonSkin"/>
-			<s:Button label="{resourceManager.getString('common','btn.download')}" click="download(event)" skinClass="skins.cus.ButtonSkin"/>
+			<s:Button label="{resourceManager.getString('common','btn.print')}" click="print(event)" skinClass="skins.cus.ButtonSkin" visible="{Global.iSignature!=YesNoSelect.YES}"/>
+			<s:Button label="{resourceManager.getString('common','btn.download')}" click="download(event)" skinClass="skins.cus.ButtonSkin" visible="{Global.iSignature!=YesNoSelect.YES}"/>
 		</s:HGroup>
 	</s:VGroup>
 </s:VGroup>

+ 38 - 0
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/zysqbpConfirm.mxml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		  xmlns:eshangrao="com.systex.fp.jobschedule.util.*"
+		  xmlns:s="library://ns.adobe.com/flex/spark" 
+		  xmlns:mx="library://ns.adobe.com/flex/mx"  
+		  horizontalAlign="center"
+		  verticalAlign="middle"
+		  width="300" height="88">
+	  
+	<fx:Script>
+		<![CDATA[
+			import mx.events.CloseEvent;
+			[Bindable]
+			public var v:ZysqbpAudit;
+			
+		    public function doPass(e:Event):void{
+				this.dispatchEvent(new CloseEvent(CloseEvent.CLOSE));
+				//关闭自身 调用审批通过方法 
+				v.ConfirmBackPass();
+			}
+			
+			public function doPassAndSignature(e:Event):void{
+				this.dispatchEvent(new CloseEvent(CloseEvent.CLOSE));
+				//关闭自身 调用签章和审批通过方法
+				v.ConfirmBackPassAndSignature();
+			}
+		]]>
+	</fx:Script>
+	
+	<s:HGroup  width="100%" height="30"  horizontalAlign="center" verticalAlign="middle">
+		<s:Label id="tip" fontSize="15" fontWeight="bold" text="确认操作?"/>
+	</s:HGroup>
+	<s:HGroup y="67" width="100%" height="52" horizontalAlign="center" verticalAlign="middle"> 
+		<s:Button id="pass" label="同意" click="doPass(event)"  skinClass="skins.cus.ButtonSkin" />
+		<s:Button id="passAddSignature" label="同意且盖章" click="doPassAndSignature(event)"  skinClass="skins.cus.ButtonSkin"  width="100"/>
+		<s:Button id="close" label="{resourceManager.getString('common','btn.cancel')}" click="this.dispatchEvent(new CloseEvent(CloseEvent.CLOSE))" skinClass="skins.cus.ButtonSkin"/>
+	</s:HGroup> 
+</s:VGroup>