project_zhenggai_info_finance.jsp

来自「java jsp教程」· JSP 代码 · 共 421 行 · 第 1/2 页

JSP
421
字号
                        <td height="23" ><div align="right">成果金额:</div></td>
                        <td height="23" align=right><div align="left">
                          <input name="fruitsum" type="text" size="10" 
							value='<fmt:formatNumber pattern=".00"><c:out value="${script.fruitsum}"/></fmt:formatNumber>'>元
                            </div>
						</td>
						<td height="23" width="19%" ><div align="right">成果类别:</div></td>
						<td height="23" ><div align="left">
		              <input name="fruittypename" value='<c:out value="${script.fruittypename}"/>' type="text" readonly size="10">
        		      <img src="<%=request.getContextPath()%>/images/fuction.gif" width="20" height="15" style="cursor:hand;" onClick="showDiv('cglbdiv')"></div>
						</td>						
					</tr>
          </tbody>
      </table>
<div id=cglbdiv style="position:absolute;display:none; left:0px; top:0px; width:280px; z-index:901; height: 100px;"
	 onmouseover="this.style.display='block'"  onMouseOut="this.style.display='none'">
	  <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
		    <tr bgcolor="#EEFFF7">
    		  <td height="150" valign="top">
			  <script>
				var tree = new WebFXLoadTree("成果类别", 
						"/cnpc/servlet/TcodeXmlTreeServlet?code=cglb&codeField=fruittype&nameField=fruittypename&divId=cglbdiv&type=5");
				document.write(tree);
			</script>
			  </td>
		    </tr>
	     </table>
	</div>
</form>
				</TD>
              </TR>
		<tr><td>
  <p align="center"><img src="<%=request.getContextPath()%>/images/confirm.gif" id="confirm" 
  	style="cursor:hand" onClick="_save()"></p>
		</td></tr>
            </TBODY>
          </TABLE>
<%
	}
	else
	{
%>
<TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
            <TBODY>
              <TR>
                <TD align=middle>
					<table cellspacing=1 bordercolordark=#dfdfff  cellpadding=2 id="infotable"
				            width="100%" align=center bgcolor=#b3c4db bordercolorlight=#003366 border=0>
                    <tbody>
                      <tr bgcolor="#a6d0f2">
                        <td align=middle height=26 colspan="4"><div align="center" class="style1">形 成 经 济 成 果</div></td>
                      </tr>
                      <tr onMouseOver="this.bgColor='#EBEBEB';" onMouseOut="this.bgColor='#EEF4FF';" bgcolor=#eef4ff>
                        <td width="11%" height="23" ><div align="right">被审计单位:</div></td>
                        <td width="39%" height="23" id="unit"><c:out value="${script.problemorgname}"/></td>
                        <td width="16%" height="23" align="right">审计事项:</td>
                        <td width="34%" height="23" id="card"><c:out value="${script.scriptname}"/></td>
                      </tr>
                      <tr onMouseOver="this.bgColor='#EBEBEB';" onMouseOut="this.bgColor='#EEF4FF';" bgcolor=#eef4ff>
                        <td height="23" ><div align="right">问题类别:</div></td>
                        <td height="23"  id="qtype"><c:out value="${script.problemtypename}"/></td>
                        <td height="23" ><div align="right">处理方式:</div></td>
                        <td height="23" id="processName"><c:out value="${script.processtypename}"/></td>
                      </tr>
                      <tr onMouseOver="this.bgColor='#EBEBEB';" onMouseOut="this.bgColor='#EEF4FF';" bgcolor=#eef4ff>
                        <td height="23" ><div align="right">问题金额:</div></td>
                        <td height="23" align="left">
							<fmt:formatNumber pattern=".00"><c:out value="${script.problemsum}"/></fmt:formatNumber>元
						</td>
                        <td height="23"><div align="right">纠正金额:</div></td>
                        <td height="23" >
								<fmt:formatNumber pattern=".00"><c:out value="${script.processsum}"/></fmt:formatNumber>元
						</td>
                      </tr>
                      <tr onMouseOver="this.bgColor='#EBEBEB';" onMouseOut="this.bgColor='#EEF4FF';" bgcolor=#eef4ff>
                        <td height="23"><div align="right">成果金额:</div></td>
                        <td height="23">
							<fmt:formatNumber pattern=".00"><c:out value="${script.fruitsum}"/></fmt:formatNumber>元
						</td>
						<td height="23"><div align="right">成果类别:</div></td>
						<td height="23"><c:out value="${script.fruittypename}"/>
						</td>
           </tr>
					 <tr onMouseOver="this.bgColor='#EBEBEB';" onMouseOut="this.bgColor='#EEF4FF';" bgcolor=#eef4ff>
              <td height="23" ><div align="right">记帐凭证:</div></td>
              <td height="23" align=right><div align="left"><c:out value="${script.accountcardno}"/></td>
							<td colspan="2">&nbsp;</td>
					</tr>		           
                    </tbody>
                </table>
				</TD>
              </TR>
<%
		}
	}
%>
</body>
</html>
<script>
function _save(){
	var sForm = document.form1;
	var probSum = <c:out value="${script.problemsum}"/>;
	if(sForm.scriptNo.value == ""){
		alert("没有指定整改的底稿");
		return;
	}
	
	if(sForm.processsum.value == ""){
		alert("请输入纠正金额");
		sForm.processsum.focus();
		return;
	}

	if(!IsFloat(sForm.processsum.value)){
		alert("请输入正确的纠正金额");
		sForm.processsum.focus();
		return;
	}
	//if(parseFloat(sForm.processsum.value) > probSum)
	//{
		//alert("纠正金额应小于问题金额");
		//sForm.processsum.focus();
		//return;
	//}
	if(sForm.fruitsum.value == ""){
		alert("请输入成果金额");
		sForm.fruitsum.focus();
		return;
	}

	if(!IsFloat(sForm.fruitsum.value)){
		alert("请输入正确的成果金额");
		sForm.fruitsum.focus();
		return;
	}
	if(sForm.fruittypename.value == "")
	{
		alert("请选择成果类别");
		return;
	}
	var fruitsum = parseFloat(sForm.fruitsum.value);
	var processsum = parseFloat(sForm.processsum.value);
	var checkStr = sForm.check_processtypename.value;
	//alert(checkStr);
	if(checkStr == "内部收缴" || checkStr == "内部罚款")
	{
		if(fruitsum != processsum)
		{
			alert("处理方式为内部收缴、内部罚款时,成果金额必须等于纠正金额!");
			return;
		}
	}
	else
	{
		if(fruitsum > processsum)
		{
			alert("成果金额不能大于纠正金额");
			return;
		}
	}
	sForm.submit();	
}
if(eval("cglbdiv"))
	drag(cglbdiv);	

var s1 = document.getElementById("s1");
var s2 = document.getElementById("s2");
var infotbl = document.getElementById("infotable");
var itemtbl = document.getElementById("itemtable");
var bconfirm = document.getElementById("confirm");

function _viewItem()
{
	if(infotbl && itemtbl)
	{
		infotbl.style.display = "none";
		bconfirm.style.display = "none";
		itemtbl.style.display = "";
		if(s1 && s2)
		{
			s1.style.backgroundColor="#EEF4FF";
			s2.style.backgroundColor="#a6d0f2"; 
		}
	}
}

function _viewInfo()
{
	if(infotbl && itemtbl)
	{
		infotbl.style.display = "";
		bconfirm.style.display = "";
		itemtbl.style.display = "none";
		if(s1 && s2)
		{
			s1.style.backgroundColor="#a6d0f2"; 
			s2.style.backgroundColor="#EEF4FF";
		}
	}
}	

function showDiv(divId) {
	 var x = 600;
   var y = 80;
   eval("document.all." + divId).style.posLeft=x-20;
   eval("document.all." + divId).style.posTop=y-20;
  	eval("document.all." + divId).style.visibility="visible";
	document.getElementById(divId).style.display="block";
}
</script>

⌨️ 快捷键说明

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