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

📄 incomemodify.jsp

📁 tomcat最新安装程序
💻 JSP
字号:
<%@ page contentType="text/html;charset=GB2312" %> 
<%@ page import="cn.com.aheadsoft.recordset.DetailRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.FinTaskIncomeRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.FinIncomePastRecordSet" %>
<%@ page import="cn.com.aheadsoft.util.StringFormat" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.text.DecimalFormat"%>

<jsp:useBean id="userinfo" scope="session" class="cn.com.aheadsoft.util.UserInfo"/>
<jsp:useBean id="upm" scope="session" class="cn.com.aheadsoft.manage.UserPurviewManage"/>
<html>
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css.css">
<title>approvalkind</title>
<%

	/*int q3 = upm.getUserPopInt(userinfo,"9","3","q");
	int i3 = upm.getUserPopInt(userinfo,"9","3","i");
	int u3 = upm.getUserPopInt(userinfo,"9","3","u");
	int d3 = upm.getUserPopInt(userinfo,"9","3","d");*/ //replace by zenghongli 2004.9.7 在本页面中没有使用 
	int u1 = upm.getUserPopInt(userinfo,"9","1","u");
	int d1 = upm.getUserPopInt(userinfo,"9","1","d");
	int i1 = upm.getUserPopInt(userinfo,"9","1","i");
    DetailRecordSet detailRecordSet = (DetailRecordSet)request.getAttribute("Detail");
    FinTaskIncomeRecordSet taskIncomeRs=(FinTaskIncomeRecordSet) request.getAttribute("TaskIncome");
	    FinIncomePastRecordSet taskPastRs=(FinIncomePastRecordSet)request.getAttribute("TaskPast");
	String taskID=request.getParameter("taskID");
	if (taskID==null) taskID="";
%>
<script src="/krm/jsp/jscript/Calendar.js"></script>
<script>
<!--
    function atSubmit(obj){
	  if(document.IncomeForm.Money.value!="")
	  {
		if(isNaN(document.IncomeForm.Money.value)) 
		{ 
			alert("请输入正确的收入金额!金额数只能是数字!");
			return false;
		}
		else if( document.IncomeForm.Money.value <=0 )
			{
				alert("请输入正确的收入金额!收入金额应该大于0!");
				return false;
			}
		}
	  if(document.IncomeForm.PastMoney.value!="")
	  {
		if(isNaN(document.IncomeForm.PastMoney.value)) 
		{ 
			alert("请输入正确的支出金额!金额数只能是数字!");
			return false;
		}
		else if( document.IncomeForm.PastMoney.value <=0 )
			{
				alert("请输入正确的支出金额!支出金额应该大于0!");
				return false;
			}
		}

	  local=document.IncomeForm.TaskID.selectedIndex;
	  itemName=document.IncomeForm.TaskID.options[local].text;
	  document.IncomeForm.TaskName.value=itemName;			
	  return true;	
    }
    function selectTask(){
       document.IncomeForm.Money.value="";
	   document.IncomeForm.PastMoney.value="";
	   document.IncomeForm.submit();
    }
	function checkTask() {
	  var checkVal="";
 	  if(document.IncomeForm.CheckCon[0].checked) {
	     checkVal=document.IncomeForm.ItemNo.value;
	  }
 	  if(document.IncomeForm.CheckCon[1].checked) {
	     checkVal=document.IncomeForm.ItemName.value;
	  }
     var len=document.IncomeForm.TaskID.options.length;
     for(i=0;i<len;i++)
	 {  
	   var name=document.IncomeForm.TaskID.options[i].text ;
	   if(name.indexOf(checkVal)!=-1){ document.IncomeForm.TaskID.options[i].selected=true;
	   selectTask();
	   return true;
	   }
     }
	}
	
	function update(id,key,Remark,money) {
        document.IncomeForm.IP_ID.value = id;
        document.IncomeForm.Past_Date.value = key;		
		document.IncomeForm.PastRemark.value = Remark;			
		document.IncomeForm.PastMoney.value = money;
        document.IncomeForm.status.value = "u";
    }
	function updateIncome(id,key,Remark,money) {
        document.IncomeForm.TI_ID.value = id;
        document.IncomeForm.Insert_Date.value = key;		
		document.IncomeForm.Remark.value = Remark;			
		document.IncomeForm.Money.value = money;
		document.IncomeForm.preMoney.value = money;
        document.IncomeForm.status.value = "u";
    }	
	function atDelete() {
		return confirm("您确定要删除吗?");
	}	
-->
</script>
</head>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" >
<table width="100%"  align="center" border="0" cellpadding="0" cellspacing="0" >
 <tr height="8">
	<td class="trA">&nbsp;您的位置:财务管理 >> 财务收支 >> <font class="fontcolor">任务收支登记</font> 
    </td>
 </tr>
 <tr height="8">
	<td></td>
 </tr>  
  <tr>
    <td align="center"   valign="top">
	  <table border="0" cellpadding="0" cellspacing="0" width="98%" align="center" >
        <form action="/krm/servlet/FinIncomeServlet" method="post" name="IncomeForm" onsubmit="return atSubmit(this)">
          <tr > 
            <td class="tdA" colspan="9"> 
              任务收入登记</td>
          </tr>
          <tr > 
            <td colspan="2" class="common">&nbsp;任务名称: 
              <select style="font-size:9pt;font-color:#FFFFFF;width:120" name="TaskID" alt"所属任务" onChange="selectTask()">
                <option value="-1">选择任务</option>
                <%
	            if(detailRecordSet != null && detailRecordSet.size() > 0) {
	                while(detailRecordSet.next()) {
        	%>
                <option value="<%= detailRecordSet.getD_Serial() %>" <%if(detailRecordSet.getD_Serial().equals(taskID)){%> selected<%}%>><%= StringFormat.Source2GB(detailRecordSet.getD_Num()) %>-<%= StringFormat.Source2GB(detailRecordSet.getD_Topic()) %></option>
                <%
					}
				}
			%>
              </select> <input type="hidden" name="TaskName">
              <input type="radio" name="CheckCon" value="1">
              编号
<input class="short" type="text" name="ItemNo" alt="任务编号" style="width:50">
              <input type="radio" name="CheckCon" value="2" >
              名称
<input class="short" type="text" name="ItemName" alt="任务名称">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <input type="button" name="Submit" value="查询" onClick="checkTask()" class="button"></td>
          </tr>
          <%
                   SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
                   java.util.Date date=new java.util.Date();
				   String nowDate=formatter.format(date);
				%>
          <tr> 
            <td width="50%" class="common" nowrap>&nbsp;收&nbsp;&nbsp;&nbsp;&nbsp;入: 
              <input class="short" type="text" name="Money" alt="任务收入">
              (万元)</td>
            <td class="common" width="50%">&nbsp;支&nbsp;&nbsp;&nbsp;&nbsp;出:
              <input class="short" type="text" name="PastMoney" alt="任务收入">(万元) </td>
          </tr>
          <tr> 
            <td class="common" nowrap>&nbsp;收入日期: 
              <input type="text" class="short" name="Insert_Date" readonly="true" alt="登记日期" value="<%=nowDate%>"> 
              <a href="javascript:show_calendar('IncomeForm.Insert_Date');"><image src="/krm/jsp/image/selectdate.gif" border="0"></a></td>
            <td class="common">&nbsp;支出日期:
              <input type="text" class="short" name="Past_Date" readonly="true" alt="登记日期" value="<%=nowDate%>">
			  <a href="javascript:show_calendar('IncomeForm.Past_Date');"><image src="/krm/jsp/image/selectdate.gif" border="0"></a></td>
          </tr>
          <tr> 
            <td class="common">&nbsp;备&nbsp;&nbsp;&nbsp;&nbsp;注: 
              <textarea name="Remark" rows="3" class="textarea" style="width:160;overflow:auto"></textarea></td>
            <td class="common">&nbsp;备&nbsp;&nbsp;&nbsp;&nbsp;注:
              <textarea name="PastRemark" rows="3" class="textarea" style="width:160;overflow:auto"></textarea></td>
          </tr>
          <input type="Hidden" name="status" value="i">
		  <input type="Hidden" name="IP_ID" value="">
		  <input type="Hidden" name="TI_ID" value="">
          <input type="Hidden" name="preMoney" value="">
		  <tr> 
            <td class="tdC" align="center" colspan="2"> 
              <%
	        if(i1 > 0 ) {
	  %>
               <input type="submit" value="提 交"  onmouseover="this.className='button2'" onmouseout="this.className='button1'" class="button1" >
              <%
	  	}
	  %>
            </td>
          </tr>
        </form>
      </table>
      <br> 
	  <table width="98%" align="center" cellspacing="2">
        <tr>
		<td width="50%" valign="top">      <table border="0" width="100%" align="center" cellpadding="0" cellspacing="0">
              <tr > 
                <!--<td width="5%" class="common" align="center">序号</td> -->
                <td width="22%" class="tdB" align="center">任务名称</td>
                <td width="15%" class="tdB" align="center" >任务收入(万元)</td>
                <td width="14%" class="tdB" align="center">收入日期</td>
                <td width="29%" class="tdB" align="center">备注</td>
                <td width="15%" class="tdB" align="center">操作</td>
              </tr>
              <%DecimalFormat df11 = new DecimalFormat("#####0.0");
		float sum=0;
            if(taskIncomeRs != null ) {
                int num = 1;
                while(taskIncomeRs.next()) {
        %>
              <tr> 
                <!--<td  class="common" align="center"><%= num %></td>-->
                <td  class="common" align="center"><%= StringFormat.Source2GB(taskIncomeRs.getTI_TaskName()) %></td>
                <%
		    // add by zenghongli 2004.5.31 把元转化为万元
		    float money=0;
			if(null!=taskIncomeRs.getTI_Money())
   		      money=Float.parseFloat(taskIncomeRs.getTI_Money())/10000;
			  sum=sum+money;
		  %>
                <td class="common" align="center"><%= StringFormat.Source2GB(df11.format(money)) %></td>
                <td class="common" align="center"><%= StringFormat.Source2GB(taskIncomeRs.getTI_Date().substring(0,10)) %></td>
                <td class="common" >&nbsp;<%= StringFormat.Source2GB(taskIncomeRs.getTI_Remark()) %></td>
                <td class="common" align="center"> 
                  <%
			if(u1 > 0 ) {
		%>
                  <a href="javascript:updateIncome(&quot;<%= StringFormat.Source2GB(taskIncomeRs.getTI_ID()) %>&quot;,&quot;<%= StringFormat.Source2GB(taskIncomeRs.getTI_Date().substring(0,10)) %>&quot;,&quot;<%= StringFormat.Source2GB(taskIncomeRs.getTI_Remark()) %>&quot;,&quot;<%= money%>&quot;);">修改</a> 
                  <%
					}else {
						out.print("修改");
					}
				%>
                  <%	 			
				 if(d1 > 0 ) {
		  %>
                  <a href="/krm/servlet/FinIncomeServlet?status=d&TI_ID=<%= taskIncomeRs.getTI_ID() %>&TaskID=<%= taskIncomeRs.getTI_TaskID() %>&Money=<%= df11.format(money) %> " onclick="return atDelete()">删除</a> 
                  <%	
					}else {
						out.print("删除");
					}
		  %>
                </td>
              </tr>
              <%
					num++;
				}
			}
		%>
              <tr> 
                <td align="center" class="tdC">合计:</td>
                <td colspan="4" class="tdC">&nbsp;<%= StringFormat.Source2GB(df11.format(sum)) %></td>
              </tr>
            </table></td>
		<td width="50%" valign="top">      <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
              <tr > 
                <!--<td width="5%" class="common" align="center">序号</td>-->
                <td width="22%" class="tdB" align="center">任务名称</td>
                <td width="15%" class="tdB" align="center" >任务支出(万元)</td>
                <td width="14%" class="tdB" align="center">支出日期</td>
                <td width="29%" class="tdB" align="center">备注</td>
                <td width="15%" class="tdB" align="center">操作</td>
              </tr>
              <%
		float sumPast=0;
            if(taskPastRs != null ) {
                int num = 1;
                while(taskPastRs.next()) {
        %>
              <tr> 
                <!--<td class="common" align="center"><%= num %></td>-->
                <td class="common" align="center"><%= StringFormat.Source2GB(taskPastRs.getIP_TaskName()) %></td>
                <%
		    // add by zenghongli 2004.5.31 把元转化为万元
		    float money=0;
			if(null!=taskPastRs.getIP_Money())
   		      money=Float.parseFloat(taskPastRs.getIP_Money())/10000;
			  sumPast=sumPast+money;
		  %>
                <td  class="common" align="center"><%= StringFormat.Source2GB(df11.format(money)) %></td>
                <td class="common" align="center" ><%= StringFormat.Source2GB(taskPastRs.getIP_Date().substring(0,10)) %></td>
                <td  class="common" >&nbsp;<%= StringFormat.Source2GB(taskPastRs.getIP_Remark()) %></td>
                <td class="common" align="center"> 
                  <%
			if(u1 > 0 ) {
		%>
                  <a href="javascript:update(&quot;<%= StringFormat.Source2GB(taskPastRs.getIP_ID()) %>&quot;,&quot;<%= StringFormat.Source2GB(taskPastRs.getIP_Date().substring(0,10)) %>&quot;,&quot;<%= StringFormat.Source2GB(taskPastRs.getIP_Remark()) %>&quot;,&quot;<%= money%>&quot;);">修改</a> 
                  <%
					}else {
						out.print("修改");
					}
				%>
                  <%				
				 if(d1 > 0 ) {
		  %>
                  <a href="/krm/servlet/FinIncomeServlet?status=d&IP_ID=<%= taskPastRs.getIP_ID() %>&TaskID=<%= taskPastRs.getIP_TaskID() %> " onclick="return atDelete()">删除</a> 
                  <%	
					}else {
						out.print("删除");
					}
		  %>
                </td>
              </tr>
              <%
					num++;
				}
			}
		%>
              <tr> 
                <td align="center" class="tdC">合计:</td>
                <td colspan="4" class="tdC">&nbsp;<%= StringFormat.Source2GB(df11.format(sumPast)) %></td>
              </tr>
            </table></td>
		</tr>
		</table>
   </td>
</tr>	
</table>
 
</body>
</html>

⌨️ 快捷键说明

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