⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editdoc.vm

📁 负责公文的传输及一些处理功能
💻 VM
📖 第 1 页 / 共 2 页
字号:
     return false ;
  }
  if (thisForm.subject.value.length>50){
     alert("主题词的长度超过了50个字符!");
     thisForm.subject.focus();
     return false ;
  }
  if(thisForm.docMemo.value.indexOf("\r") != -1){
     alert("发文备注中不能含有回车符!");
     thisForm.docTitle.focus();
     return false ;
  }
  if (trim(thisForm.docNoPre.value)==""){
      alert("文号录入错误!");
      thisForm.docNoPre.focus();
      return false ;
  }
  var temp = thisForm.docNoPre.value;
  if (temp.indexOf("/") != -1 || temp.indexOf("\\") != -1 || temp.indexOf(":") != -1 ||
      temp.indexOf("*") != -1 || temp.indexOf("?") != -1 || temp.indexOf('"') != -1 ||
      temp.indexOf("|") != -1 || temp.indexOf("<") != -1  || temp.indexOf(">") != -1 ||
      temp.indexOf("#") != -1 || temp.indexOf("%") != -1 || temp.indexOf("+") != -1 ){
      alert('文号中不能包含下列任一字符! /\\:*?"|<>#%+');
      thisForm.docNoPre.focus();
      return false ;
  }
  if (temp.indexOf("/") != -1 || temp.indexOf("\\") != -1 || temp.indexOf(":") != -1 ||
      temp.indexOf("*") != -1 || temp.indexOf("?") != -1 || temp.indexOf("'") != -1 ||
      temp.indexOf("|") != -1 || temp.indexOf("<") != -1  || temp.indexOf(">") != -1){
      alert("文号中不能包含下列任一字符! /\\:*?'|<>");
      thisForm.docNoPre.focus();
      return false ;
  }
  if (!isInt(trim(thisForm.yearNo.value)) || trim(thisForm.yearNo.value)==""){
      alert("文号录入错误!");
      thisForm.yearNo.value="";
      thisForm.yearNo.focus();
      return false ;
  }
  if (!isInt(trim(thisForm.waterNo.value)) || trim(thisForm.waterNo.value)==""){
      alert("文号录入错误!");
      thisForm.waterNo.value="";
      thisForm.waterNo.focus();
      return false ;
  }
  return true ;
}

function endcheck(){
  if(check()){
    if(thisForm.zwStatus.value == "0"){
      alert("对不起无法保存,请检查正文是否正确添加!");
      return false;
	}else{
	  if(fileTitleLengthCheck(thisForm.file1.value)){
	    alert("对不起,正文标题过长无法正确上传!");
		return false;
	  }
	  var filesArray = document.getElementsByTagName("input");
	  for(var i=0;i<filesArray.length;i++){
	    if(filesArray[i].type == "file"){
		  if(fileTitleLengthCheck(filesArray[i].value)){
		    alert("对不起,附件文件名过长,无法正确上传!");
			return false;
		  }
		}
	  }
	  return true;
    }
  }else{
    return false;
  }
}

function fileTitleLengthCheck(str){
  if(str.length>50){
    return true;
  }else{
    return false;
  }
}

function selectUnit(){
  window.open("$request.getContextPath()/sendDocAction.do?method=selectUnit",'','toolbar=no,scroll=yes,location=no,status=no,width=565,height='+(screen.height-160)+',top=50,left=200');
}
 
function zdxx(val){
  if(val == "ztc"){
    window.open('$request.getContextPath()/dictionlist.do?method=editDataDictionary&fatherId=107','','status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,width=500,height=350,top=200,left=200');
  }
  if(val == "qfr"){
    window.open('$request.getContextPath()/dictionlist.do?method=editDataDictionary&fatherId=104','','status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,width=500,height=350,top=200,left=200');
  }
  if(val == "hqr"){
    window.open('$request.getContextPath()/dictionlist.do?method=editDataDictionary&fatherId=105','','status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,width=500,height=350,top=200,left=200');
  }
}
 
function viewlog(){
  window.open("$request.getContextPath()/sendDocAction.do?method=viewLog&docId=$!sendDocForm.getDocId()",'','toolbar=no,scroll=yes,location=no,status=no,width=910,height='+(screen.height-130)+',top=20,left=70');
}
</script>
</head>
<br>
#if($!status)

#else
  <table width="520" border="0" align="center" cellpadding="0">
    <tr><td height="1" align=center><b><font color="red" size="6" face="楷体_GB2312">公文登记簿</font></b></td></tr>
  </table>
#end
<body onload="init()" onunload="refreshPage()" scroll="yes">
<form name="thisForm" method="post" ENCTYPE="multipart/form-data">
#if($sendDocForm.getDocId())
<input type=hidden name="docId" value="$!sendDocForm.getDocId()">
#else
<input type=hidden name="docId" value="0">
#end
#if($sendDocForm.getDocKind())
<input type=hidden name="docKind" value="$!sendDocForm.getDocKind()">
#else
<input type=hidden name="docKind" value="$!docKind">	
#end
#if($sendDocForm.getStatus())
<input type=hidden name="status" value="$!sendDocForm.getStatus()">
#else
<input type=hidden name="status" value="0">	
#end
<input type=hidden name="createUnitId" value="$!userinfo.getUnit().getUnitId()">
<input type=hidden name="creatorId" value="$!userinfo.getUserID()">
<input type=hidden name="creator" value="$!userinfo.getUserName()">
<input type=hidden name="zwcount" value="0">
<input type=hidden name="openWin" value="0">
<input type=hidden name="xiugai" value="0">
<input type=hidden name="subjecthide" value="">
<input type=hidden name="combinehide" value="">
<input type=hidden name="allsignhide" value="">
<input type=hidden name="publisherhide" value="">
<input type=hidden name="tempTarget" value="">
<input type=hidden name="method" value="saveDoc">
<input type=hidden name="zwStatus" #if(($!sendDocForm.getStatus().equals("0") && $sendDocForm.getFilePages().intValue()==0) || (!$!sendDocForm.getStatus())) value="0" #else value="1" #end>
<input type=hidden name="deleteFileId" value="">
<input type=hidden name="sourceName" value="">
<input type=hidden name="trueName" value="">
<input type=hidden name="sealName" value="">
<input type=hidden name="sealPerson" value="$!userinfo.getUserName()">
<input type=hidden name="fileSize" value="12345">
<input type=hidden name="fileType" value="">
<input type=hidden name="recvUnitIds" value="">
<input type=hidden name="recvUnitNames" value="">
<input type=hidden name="printNums" value="">
<input type=hidden name="showUnitNames" value="">
<input type=hidden name="caogaoStatus" value="0">
<input type=hidden name="zwUploadStatus" value="0">
<table width="750" border="0" cellspacing="1" cellpadding="3" bgcolor="#000000" align=center>
  <tbody id="tbody">
	<tr >
      <td bgcolor="#ffffff" width=12% height=""><font color="#FF0000">*</font>标&nbsp;&nbsp;&nbsp;&nbsp;题</td>
      <td bgcolor="#ffffff" colspan=3 >
		<textarea rows=1 name="docTitle"  onpropertychange="this.style.posHeight=this.scrollHeight" style="overflow:hidden;width:646;font:9pt" class="$inputStyle" onkeypress="return handleEnter(this, event)" maxlength="200" $readOnly>$!sendDocForm.getDocTitle()</textarea>
	  </td>
    </tr>
    <!--tr>
      <td bgcolor="#ffffff" width=12% height="">&nbsp;联合行文</td>
      <td bgcolor="#ffffff" colspan=3 ><textarea rows=1 name="combineUnit"  onpropertychange="this.style.posHeight=this.scrollHeight" style="overflow:hidden;width:646;font:9pt" class="$inputStyle" onkeypress="return handleEnter(this, event)" maxlength="50" $readOnly></textarea><img  src="$request.getContextPath()/image/checkfile.gif"  onclick="selectUnit()" ></td>
    </tr-->
    <tr>
      <td bgcolor="#ffffff" height=""><font color="#FF0000">*</font>文&nbsp;&nbsp;&nbsp;&nbsp;号</td>
      <td bgcolor="#ffffff" colspan=3>
		#if($sendDocForm.getStatus().equals("3"))
		  <input name="docNoPre" type="text" size="20"   value="$!sendDocForm.getDocNoPre()" class="$inputStyle"  style="width:100" onkeypress="return handleEnter(this, event)" maxlength="20" $readOnly>[<input name="yearNo" type="text" size="20"   value="$!sendDocForm.getYearNo()" class="$inputStyle"  style="width:40" onkeypress="return handleEnter(this, event)" maxlength="4" $readOnly>]<input name="waterNo" type="text" size="20"   value="$!sendDocForm.getWaterNo()" class="$inputStyle"  style="width:80" onkeypress="return handleEnter(this, event)" maxlength="10" $readOnly>号
		#else
		  <input name="docNoPre" type="text" size="20"   value="$!sendDocForm.getDocNoPre()" class="$inputStyle"  style="width:100" onkeypress="return handleEnter(this, event)" maxlength="20" $readOnly>[<input name="yearNo" type="text" size="20"   value="$!sendDocForm.getYearNo()" class="$inputStyle"  style="width:40" onkeypress="return handleEnter(this, event)" maxlength="4" $readOnly>]<input name="waterNo" type="text" size="20"   value="$!sendDocForm.getWaterNo()" class="$inputStyle"  style="width:80" onkeypress="return handleEnter(this, event)" maxlength="10" $readOnly>号	
		#end
	  </td>
    </tr>
    <tr>
      <td bgcolor="#ffffff" height=""><font color="#FF0000">*</font>主&nbsp;题&nbsp;词</div></td>
      <td bgcolor="#ffffff" colspan=3><textarea rows=1 name="subject"  onpropertychange="this.style.posHeight=this.scrollHeight" style="overflow:hidden;width:646;font:9pt" class="$inputStyle" onkeypress="return handleEnter(this, event)" maxlength="50" $readOnly>$!sendDocForm.getSubject()</textarea><img src="$request.getContextPath()/image/checkfile.gif" onclick="zdxx('ztc')"></td>
    </tr>
    <tr>
      <td bgcolor="#ffffff" width=12% height=""><font color="#FF0000">*</font>签&nbsp;发&nbsp;人</td>
      <td bgcolor="#ffffff" width=58%><textarea rows=1 name="publishPerson"  onpropertychange="this.style.posHeight=this.scrollHeight" style="overflow:hidden;width:380;font:9pt" class="$inputStyle" onkeypress="return handleEnter(this, event)" maxlength="200" $readOnly>$!sendDocForm.getPublishPerson()</textarea><img src="$request.getContextPath()/image/checkfile.gif" onclick="zdxx('qfr')"></td>
      <td bgcolor="#ffffff"  width=12% height="">&nbsp;紧急程度</td>
      <td bgcolor="#ffffff"  width=18%>
        <select size="1" name="emergency" style="padding:0; width: 100; height: 65">
          <option value=""></option>
          #foreach($emergency in $emergencyList)
			<option value="$emergency.getId()">$emergency.getContent()</option>
		  #end
        </select>
      </td>
    </tr>
    <tr>
      <td bgcolor="#ffffff">&nbsp;会&nbsp;签&nbsp;人</td>
      <td bgcolor="#ffffff" ><textarea rows=1 name="allSignPerson" onpropertychange="this.style.posHeight=this.scrollHeight" style="overflow:hidden;width:380;font:9pt" class="$inputStyle" onkeypress="return handleEnter(this, event)" maxlength="200" $readOnly>$!sendDocForm.getAllSignPerson()</textarea><img src="$request.getContextPath()/image/checkfile.gif" onclick="zdxx('hqr')"></td>
      <td bgcolor="#ffffff" width=12% height="">&nbsp;秘密等级</td>
      <td bgcolor="#ffffff" width=18%>
        <select size="1" name="secret" style="padding:0; width: 100; height: 51">
          <option value=""></option>
          #foreach($secret in $secretList)
		    <option value="$secret.getId()">$secret.getContent()</option>
		  #end
        </select>
      </td>
    </tr>
    <tr id="zwTr">
      <td bgcolor="#ffffff" height=""><font color="#FF0000">*</font>正&nbsp;&nbsp;&nbsp;&nbsp;文</td>
		#set ($attachments = $sendDocForm.getAttachments())
		#set ($fjNum = 0)
		#foreach($attachment in $attachments)
		  #if($attachment.getStatus().equals("0") || $attachment.getStatus().equals("10"))
			#set ($zw = $attachment)
		  #else
			#set ($fjNum = $fjNum + 1)
		  #end
	    #end
		#if($zw)
		  <td id="zw0" bgcolor="#ffffff" >
			<input type=hidden name="file1" value="$!zw.getTitle()">
			&nbsp;$!zw.getTitle()&nbsp;&nbsp;
			#if($sendDocForm.getStatus().equals("3") || $sendDocForm.getStatus().equals("4"))  
			  <a href="$request.getContextPath()/downLoadFileAction.do?fileId=$zw.getFileId()">下载文件</a>
            #else
			  #if($sendDocForm.getStatus().equals("2") && $sendDocForm.getDocKind().equals("0"))
				
			  #else
			    <a href="javascript:deleteZwUploadFile($zw.getFileId());">删除正文</a>
			  #end
		    #end
		  </td>
		#else
		  <td id="zw0" bgcolor="#ffffff" >
		    <INPUT TYPE=FILE NAME=file1 value="11111" size="35" onkeydown="return false;" onchange="change()">
		  </td>
		#end
	  <td id="zwPages" bgcolor="#ffffff">&nbsp;正文页数</td>
      <td bgcolor="#ffffff">
		    <input name="filePages" type="text" class="$inputStyle" style="width:115" size="8" maxlength="5"   value="$!sendDocForm.getFilePages()" onkeypress="return handleEnter(this, event)" readonly>
	  </td>
    </tr>
	  #set ($num = 1)
	  #if($fjNum > 0)
		#foreach($attachment in $attachments)
		  #if($attachment.getStatus().equals("1") || $attachment.getStatus().equals("11"))
            <tr id="fujian$num">
              <td bgcolor="#ffffff" height="">&nbsp;附&nbsp;&nbsp;&nbsp;&nbsp;件</div></td>
			  <td bgcolor="#ffffff" colspan=3>
			    &nbsp;附件$num:$attachment.getTitle()
				#if($sendDocForm.getStatus().equals("3") || $sendDocForm.getStatus.equals("4"))
			      &nbsp;&nbsp;<a href="$request.getContextPath()/downLoadFileAction.do?fileId=$attachment.getFileId()">下载文件</a>
				#else
				  &nbsp;&nbsp;<a href="javascript:deleteUploadFile($attachment.getFileId(),'fujian'+$num);">删除附件</a>
                  &nbsp;&nbsp;<a href="javascript:addFujian();">增加更多附件</a>
				#end
			  </td>
			</tr>
		    #set ($num = $num+1)
		  #end
		#end
	  #else
	    <tr id="fujian1">
          <td bgcolor="#ffffff" height="">&nbsp;附&nbsp;&nbsp;&nbsp;&nbsp;件</div></td>
		  <td bgcolor="#ffffff" colspan=3>
			#if($sendDocForm.getStatus().equals("3") ||$sendDocForm.getStatus().equals("4"))
			  &nbsp;
		    #else
              <INPUT TYPE=FILE NAME=file2 size="35" onkeydown="return false;">&nbsp;&nbsp;<a href="javascript:addFujian();">增加更多附件</a> 
            #end
		  </td>
	    </tr>
	  #end
	  <input type=hidden name="fjNum" value="$fjNum">
    <tr id="memo">
      <td bgcolor="#ffffff" height="">&nbsp;发文备注</td>
      <td bgcolor="#ffffff" colspan=3><textarea  rows=1 name="docMemo" onpropertychange="this.style.posHeight=this.scrollHeight" style="overflow:hidden;width:646;font:9pt" class="$inputStyle"  onkeypress="handleEnter1(this, event)" maxlength="200" $readOnly>$!sendDocForm.getMemo()</textarea></td>
    </tr>
	#if($!sendDocForm.getStatus().equals("2") || $!sendDocForm.getStatus().equals("3") || $!sendDocForm.getStatus().equals("4") || $!sendDocForm.getStatus().equals("52") || $!sendDocForm.getStatus().equals("13"))
	<tr id="showSendArea">
      <td bgcolor="#ffffff" height="">&nbsp;发送范围</td>
      <td bgcolor="#ffffff" colspan=3><textarea  rows=1 name="showSendArea" onpropertychange="this.style.posHeight=this.scrollHeight" style="overflow:hidden;width:646;font:9pt" class="$inputStyle"  onkeypress="handleEnter1(this, event)" maxlength="200" readonly>$!sendArea</textarea></td>
    </tr>
	#end
    <tr>
      <td bgcolor="#ffffff" height="">&nbsp;登&nbsp;记&nbsp;人</div></td>
      <td bgcolor="#ffffff" ><textarea rows=1 name=""  onpropertychange="this.style.posHeight=this.scrollHeight" style="overflow:hidden;width:380;" class="inputStyle" onkeypress="return handleEnter(this, event)" maxlength="200" readonly>$!sendDocForm.getCreator()</textarea></td>
      <td bgcolor="#ffffff">&nbsp;登记时间</div></td>
      <td bgcolor="#ffffff"><input name="" value="$!sendDocForm.getCreateDate()" type="text" class="inputStyle" style="width:115" size="8" maxlength="5" onkeypress="return handleEnter(this, event)" readonly></td>
    </tr>
	</tbody>
</table>
<table id="operateTable" width="380" border="0" align=center>
  <tr height="20">&nbsp;</tr>
  <tr id="operateTr">
	#if($!sendDocForm.getStatus().equals("0") || $!sendDocForm.getStatus().equals("1") || $!sendDocForm.getStatus().equals("2") || !$!sendDocForm)
	  <td align=center><button onclick="baocun()" class="button-01" accesskey="S">保存(S)</button></td>
	#end
   	#if($!sendDocForm.getStatus().equals("1"))
      <td align=center><button onclick="viewfile()" class="button-01" accesskey="V">浏览(V)</button></td>
	  <td align=center><button onclick="queren()" class="button-01" accesskey="Q">审核通过(Q)</button></td>
    #elseif($!sendDocForm.getStatus().equals("2"))
      <td align=center><button onclick="viewfile()" class="button-01" accesskey="V">浏览(V)</button></td>
	  <!--td align=center><button onclick="">&nbsp;打&nbsp;印&nbsp;</button</td-->
	  <td align=center><button onclick="seladdress()" class="button-01" accesskey="T">选择地址(T)</button></td>
	  <td align=center><button onclick="send()" class="button-01" accesskey="F">发送(F)</button></td>
    #elseif($sendDocForm.getStatus().equals("3") || $sendDocForm.getStatus().equals("4"))
	  <td align=center><button onclick="viewfile()" class="button-01" accesskey="V">浏览(V)</button</td>
	  <td align=center><button onclick="rseladdress()" class="button-01" accesskey="T">选择地址(T)</button></td>
    #elseif($sendDocForm.getStatus().equals("5"))
	  <td align=center><button onclick="viewfile()" class="button-01" accesskey="V">浏览(V)</button</td>	  
	#else
	#end
  </tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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