finacial_project_out_recordedit.jsp

来自「java开发的办公系统 1.系统管理 (地区管理,部门管理,菜单管理,用户管理」· JSP 代码 · 共 209 行

JSP
209
字号
<%@ include file="../../include/configuration.jsp"%>
<%@ include file="../../include/authorizemanager.jsp"%>
<%@ page import="com.vere.finacial.bean.*"%>
<%@ page import="com.vere.finacial.item.*"%>
<%@ page contentType="text/html; charset=gb2312" %>
<%
	SessionFactory sessionFactory=(SessionFactory)session.getAttribute("sessionFactory");
	String message="";
	ParameterUtils.setCharacterEncoding(request);
	String status=ParameterUtils.getString(request,"status");
	//修改
	if(status.equals("edit"))
	{
		String id=ParameterUtils.getString(request,"id");//
		String finacial_project_id=ParameterUtils.getString(request,"finacial_project_id");//项目财务编号
		String crm_project_info_id=ParameterUtils.getString(request,"crm_project_info_id");//
		String crm_project_name=ParameterUtils.getString(request,"crm_project_name");//项目名称
		String crm_customer_id=ParameterUtils.getString(request,"crm_customer_id");//
		String crm_customer_name=ParameterUtils.getString(request,"crm_customer_name");//客户名称
		String crm_customer_contact_id=ParameterUtils.getString(request,"crm_customer_contact_id");//
		String crm_customer_contact_name=ParameterUtils.getString(request,"crm_customer_contact_name");//客户联系人姓名
		String out_price=ParameterUtils.getString(request,"out_price");//付款金额
		String remain_price=ParameterUtils.getString(request,"remain_price");//付款后余额
		String checkout_method=ParameterUtils.getString(request,"checkout_method");//付款方式
		String checkout_caurse=ParameterUtils.getString(request,"checkout_caurse");//付款原因
		String in_date=ParameterUtils.getString(request,"in_date");//付款日期
		String register_date=DateUtils.getDateTime();//登记日期
		String register_username=sessionFactory.getManager_usersItem().getUsername();//登记用户
		String register_name=sessionFactory.getManager_usersItem().getName();//登记人
		String register_department_id=sessionFactory.getManager_usersItem().getDepartment_id();//登记部门编号
		String register_department_nodepath=sessionFactory.getManager_usersItem().getDepartment_nodepath();//登记部门路径
		String register_department=sessionFactory.getManager_usersItem().getManager_departmentItem().getName();//登记部门
		String register_area_id=sessionFactory.getManager_usersItem().getArea_id();//登记地区编号
		String register_area_nodepath=sessionFactory.getManager_usersItem().getArea_nodepath();//登记地区路径
		String register_area=sessionFactory.getManager_usersItem().getManager_areaItem().getName();//登记地区
		if(out_price==null||!Check.isFloat(out_price)){
			out.print("out_price 付款金额必须为浮点数字");
			return;
		}
		if(remain_price==null||!Check.isFloat(remain_price)){
			out.print("remain_price 付款后余额必须为浮点数字");
			return;
		}
		if(in_date==null||!Check.isDateTime(in_date)){
			out.print("in_date 付款日期只能是短日期,形如 (2003-12-05)");
			return;
		}
		Finacial_project_out_recordItem item=new Finacial_project_out_recordItem();
		item.setId(id);
		item.setFinacial_project_id(finacial_project_id);
		item.setCrm_project_info_id(crm_project_info_id);
		item.setCrm_project_name(crm_project_name);
		item.setCrm_customer_id(crm_customer_id);
		item.setCrm_customer_name(crm_customer_name);
		item.setCrm_customer_contact_id(crm_customer_contact_id);
		item.setCrm_customer_contact_name(crm_customer_contact_name);
		item.setOut_price(out_price);
		item.setRemain_price(remain_price);
		item.setCheckout_method(checkout_method);
		item.setCheckout_caurse(checkout_caurse);
		item.setIn_date(in_date);
		item.setRegister_date(register_date);
		item.setRegister_username(register_username);
		item.setRegister_name(register_name);
		item.setRegister_department_id(register_department_id);
		item.setRegister_department_nodepath(register_department_nodepath);
		item.setRegister_department(register_department);
		item.setRegister_area_id(register_area_id);
		item.setRegister_area_nodepath(register_area_nodepath);
		item.setRegister_area(register_area);
		Finacial_project_out_recordBean bean=new Finacial_project_out_recordBean();
		boolean b=bean.updateItem(item);
        if(b){
          message="1";
        }
	}
		String id=ParameterUtils.getString(request,"id");
		Finacial_project_out_recordBean bean=new Finacial_project_out_recordBean();
		Finacial_project_out_recordItem item=bean.find(id);
		Oa_dictionaryXmlBean oa_dictionaryXmlBean=new Oa_dictionaryXmlBean();
		List oa_dictionaryXmlList=oa_dictionaryXmlBean.findXmlByArray("28");
%>
<html>
<head>
<title><%=titleName%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/css.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../../js/check.js"></script>
<link href="../../css/date.css" rel="stylesheet" type="text/css">
<script src="../../js/ShowDate.js"></script>
<script language="javascript">
    init();
</script>
</head>
<script language="javascript">
	function back()
	{
		location="finacial_project_out_record.jsp";
	}

	function Check()
	{
		var form=form1;
		if(!isFloat(form.out_price.value))
		{
			alert("付款金额必须为浮点数字!");
			form.out_price.focus();
			return;
		}
		if(!isFloat(form.remain_price.value))
		{
			alert("付款后余额必须为浮点数字!");
			form.remain_price.focus();
			return;
		}
		if(!isDateTime(form.in_date.value))
		{
			alert("付款日期只能是短日期,形如 (2003-12-05)!");
			form.in_date.focus();
			return;
		}
		form.status.value="edit";
		form.submit();
	}
</script>
<body>
<form action=""  method="post"  name="form1">
	<table class="firsttable">
		<tr>
			<td align="center" valign="top">
				<table class="centertable">
					<tr>
						<td></td>
					</tr>
					<tr>
						<td align="center" class="addborder">
							<table  class="addTable">
								<tr align="center" >
									<td colspan="2">
                  					<font  class="message">
										<%
											if(message.equals("1"))
											{
												out.println("修改成功:继续");
											}
										%>
										</font>									</td>
								</tr>
								<tr >
									<td >付款金额:</td>
									<td ><input name="out_price" type="text" id="out_price" value="<%=item.getOut_price()%>"></td>
								</tr>
								<tr >
									<td >付款后余额:</td>
									<td ><input name="remain_price" type="text" id="remain_price" value="<%=item.getRemain_price()%>"></td>
								</tr>
								<tr >
									<td >付款方式:</td>
									<td >
									<select name="checkout_method" id="checkout_method">
									<%
										for(int i=0;i<oa_dictionaryXmlList.size();i++){
											Oa_dictionaryItem oa_dictionaryItem=(Oa_dictionaryItem)oa_dictionaryXmlList.get(i);
											if(oa_dictionaryItem.getNum().equals("28"))
											{
												if(item.getCheckout_method().equals(oa_dictionaryItem.getCode()))
													out.println("<option value='"+oa_dictionaryItem.getCode()+"' selected>"+oa_dictionaryItem.getCode_name()+"</option>");
												else
													out.println("<option value='"+oa_dictionaryItem.getCode()+"' >"+oa_dictionaryItem.getCode_name()+"</option>");
											}
										}
									%>
									</select>									</td>
								</tr>
								<tr >
									<td >付款原因:</td>
									<td ><input name="checkout_caurse" type="text" id="checkout_caurse" value="<%=item.getCheckout_caurse()%>"></td>
								</tr>
								<tr >
									<td >付款日期:</td>
									<td >
									<input name="in_date" type="text"  size="10" value="<%=DateUtils.formatString(item.getIn_date())%>"><a href="javascript:" onClick="show_cele_date(in_date,'','',in_date)"><img src='../../icon/cal.gif' border=0></a>									</td>
								</tr>
								<tr >
									<td >登记地区:</td>
									<td ><input name="register_area" type="text" id="register_area" value="<%=item.getRegister_area()%>"></td>
								</tr>
								<tr >
									<td colspan="2" align="center">
										<input type="button" class="button" onClick="Check()" value="确定">
										&nbsp;&nbsp;&nbsp;&nbsp;
										<input  type="button" class="button" onClick="back()" value="返回">									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
<input type="hidden" name="status" >
<input type="hidden" name="id" value=<%=id%>>
</form>
</body>
</html>

⌨️ 快捷键说明

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