|
@@ -278,7 +278,11 @@
|
|
|
<style media="print">
|
|
|
.Noprint {
|
|
|
display: none;
|
|
|
-}
|
|
|
+}
|
|
|
+</style>
|
|
|
+<style type="text/css">
|
|
|
+ .inputOut{border: none; width: 58px; height: 30px; background: url(resource/images/download_a.png) no-repeat center;}
|
|
|
+ .inputOver{border: none; width: 58px; height: 30px; background: url(resource/images/download_b.png) no-repeat center;}
|
|
|
</style>
|
|
|
<script type="text/javascript">
|
|
|
|
|
@@ -550,49 +554,55 @@ function SetCharacterEncoding()
|
|
|
//HTML签章转换为OFFICE签章
|
|
|
function ConvertSignature(){
|
|
|
//alert("222");
|
|
|
+ //解决章上的乱码问题
|
|
|
SetCharacterEncoding();
|
|
|
- var mResult = true;
|
|
|
- var BmkName = "test1";
|
|
|
- var vItem = document.getElementsByName("iHtmlSignature");
|
|
|
- if(vItem.length<=0){
|
|
|
+ var mResult = true;
|
|
|
+ var BmkName = "test1";
|
|
|
+ var vItem = document.getElementsByName("iHtmlSignature");
|
|
|
+ if(vItem.length<=0){
|
|
|
//alert("请先点击上面的‘HTML签章’,至少盖一个HTML签章!");
|
|
|
return;
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- SetActiveDocument();
|
|
|
+ SetActiveDocument();
|
|
|
|
|
|
- webform.WebOffice.SignatureAPI.BeginLoadSignature();
|
|
|
- try{
|
|
|
+ webform.WebOffice.SignatureAPI.BeginLoadSignature();
|
|
|
+ try{
|
|
|
// webform.WebOffice.SignatureAPI.LockDocument(1); //锁定文档
|
|
|
var mLength = vItem.length;
|
|
|
var books= webform.WebOffice.WebObject.Bookmarks;
|
|
|
- if(books.Exists(BmkName)) {
|
|
|
-
|
|
|
- webform.WebOffice.WebObject.Bookmarks.Item(BmkName).Range.Select();
|
|
|
- // webform.WebOffice.SignatureAPI.UnLockDocument();
|
|
|
- //alert("签章高度和宽度:"+vItem[0].clientHeight+"||"+vItem[0].clientWidth);
|
|
|
-
|
|
|
- if(vItem[0].Check){
|
|
|
- //webform.WebOffice.SignatureAPI.ConvertHTML2Office(vItem[0].SignatureValueStr);
|
|
|
- zhuanzhang(vItem[0].SignatureValueStr);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ if(books.Exists(BmkName)) {
|
|
|
+ webform.WebOffice.WebObject.Bookmarks.Item(BmkName).Range.Select();
|
|
|
+ //webform.WebOffice.SignatureAPI.UnLockDocument();
|
|
|
+ //alert("签章高度和宽度:"+vItem[0].clientHeight+"||"+vItem[0].clientWidth);
|
|
|
+
|
|
|
+ if( vItem[0].Check){//如果章验证失败,验证结果被篡改的章是不转的
|
|
|
+ //webform.WebOffice.SignatureAPI.ConvertHTML2Office(vItem[0].SignatureValueStr);
|
|
|
+ var vItem2=document.getElementsByName("iHtmlSignature")[0];
|
|
|
+ var signatureData = vItem2.SignatureValueStr;
|
|
|
+ //alert('test');
|
|
|
+ vItem2.SignatureOrder=0;
|
|
|
+ zhuanzhang(signatureData);
|
|
|
+ //zhuanzhang(vItem[0].SignatureValueStr);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- // webform.WebOffice.SignatureAPI.LockDocument(1); //锁定文档
|
|
|
- webform.WebOffice.SignatureAPI.EndLoadSignature();
|
|
|
- webform.WebOffice.SignatureAPI.ReleaseActiveDocument();
|
|
|
+ //webform.WebOffice.SignatureAPI.LockDocument(1); //锁定文档
|
|
|
+ webform.WebOffice.SignatureAPI.EndLoadSignature();
|
|
|
+ webform.WebOffice.SignatureAPI.ReleaseActiveDocument();
|
|
|
|
|
|
}catch(e){
|
|
|
alert(e.discription);
|
|
|
mResult= false;
|
|
|
}
|
|
|
- // webform.WebOffice.WebObject.NormalTemplate.Saved = true;
|
|
|
+
|
|
|
+ //webform.WebOffice.WebObject.NormalTemplate.Saved = true;
|
|
|
|
|
|
- return mResult;
|
|
|
+ return mResult;
|
|
|
}
|
|
|
|
|
|
function zhuanzhang(htmlsigndata){
|
|
|
+ //alert(htmlsigndata);
|
|
|
//webform.WebOffice.SignatureAPI.ConvertHTML2Office("1212121");
|
|
|
//webform.SignatureAPI.ConvertHTML2Office(htmlsigndata);
|
|
|
webform.WebOffice.SignatureAPI.ConvertHTML2Office(htmlsigndata);
|
|
@@ -735,14 +745,8 @@ try{
|
|
|
</script>
|
|
|
</head>
|
|
|
<body id="documentPrintID" class="Noprint" onLoad="Load();"
|
|
|
- onUnload="UnLoad();">
|
|
|
-
|
|
|
- <input type="button" value="转章" onclick="zhuanzhang('111');" />
|
|
|
-
|
|
|
- <input type="button" value="download" onclick="WebSaveLocal();" />
|
|
|
- <input type=button class=SideButton value="测试" onclick='test();'>
|
|
|
- <input type=button class=SideButton value="无对话框签章"
|
|
|
- onclick='CreateNoneSignature();'>
|
|
|
+ onUnload="UnLoad();">
|
|
|
+ <input type="button" onclick="WebSaveLocal();" class="inputOut" onMouseOver="this.className='inputOver'" onMouseOut="this.className='inputOut'" />
|
|
|
<form name="DocForm">
|
|
|
<input type="hidden" name="DocumentID" value="<%=DocumentID%>">
|
|
|
<OBJECT id="SignatureControl"
|
|
@@ -1354,7 +1358,7 @@ try{
|
|
|
</table>
|
|
|
</div>
|
|
|
</form>
|
|
|
- <form name="webform">
|
|
|
+ <form name="webform" style="display:'none';">
|
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" width="100%"
|
|
|
height="100%">
|