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

📄 finacial_project_out_recordadd.jsp

📁 java开发的办公系统 1.系统管理 (地区管理,部门管理,菜单管理,用户管理,角色管理,权限) 2.工作流管理 (流程类别,流程) 3.字典管理 (国家,省份,城市,公共数据字典) 4.项目
💻 JSP
字号:
<%@ 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");
	ParameterUtils.setCharacterEncoding(request);
	String status=ParameterUtils.getString(request,"status");
	
	Finacial_projectBean finacial_projectBean=new Finacial_projectBean();
	Finacial_projectItem finacial_projectItem=finacial_projectBean.find(sessionFactory.getFinacial_project_id());
	String message="";
	//添加
	if(status.equals("add"))
	{
		message="1";
		String finacial_project_id=sessionFactory.getFinacial_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");//付款后余额
		remain_price=Float.toString(Float.parseFloat(finacial_projectItem.getProject_price())-Float.parseFloat(finacial_projectItem.getReal_price())+Float.parseFloat(out_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(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.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();
      int keyId=bean.addItemAndMaxId(item);
	}
      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="add";
		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 style="display:none;" >
									<td >:</td>
									<td ><input name="crm_project_info_id" type="text" id="crm_project_info_id"  value="<%=finacial_projectItem.getCrm_project_info_id()%>" ></td>
								</tr>
								<tr >
									<td >客户名称:</td>
									<td ><%=finacial_projectItem.getCrm_customer_name()%><input name="crm_customer_name" type="hidden" id="crm_customer_name"   value="<%=finacial_projectItem.getCrm_customer_name()%>" ></td>
								</tr>
								<tr >
									<td >项目名称:</td>
									<td ><%=finacial_projectItem.getCrm_project_name()%><input name="crm_project_name" type="hidden" id="crm_project_name"  value="<%=finacial_projectItem.getCrm_project_name()%>" ></td>
								</tr>
								<tr  style="display:none;">
									<td >:</td>
									<td ><input name="crm_customer_id" type="text" id="crm_customer_id"  value="<%=finacial_projectItem.getCrm_customer_id()%>" ></td>
								</tr>
								<tr  style="display:none;">
									<td >:</td>
									<td ><input name="crm_customer_contact_id" type="text" id="crm_customer_contact_id"  value="<%=finacial_projectItem.getCrm_customer_contact_id()%>" ></td>
								</tr>
								<tr >
									<td >客户联系人姓名:</td>
									<td ><%=finacial_projectItem.getCrm_customer_contact_name()%><input name="crm_customer_contact_name" type="hidden" id="crm_customer_contact_name"  value="<%=finacial_projectItem.getCrm_customer_contact_name()%>" ></td>
								</tr>
								<tr >
									<td >付款金额:</td>
									<td ><input name="out_price" type="text" id="out_price"  value="0.00" ></td>
								</tr>
								<tr  style="display:none">
									<td >付款后余额:</td>
									<td ><input name="remain_price" type="text" id="remain_price"  value="0.00" ></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(ParameterUtils.getString(request,"checkout_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="" ></td>
								</tr>
								<tr >
									<td >付款日期:</td>
									<td >
									<input name="in_date" type="text"  size="10" ><a href="javascript:" onClick="show_cele_date(in_date,'','',in_date)"><img src='../../icon/cal.gif' border=0></a>									</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="message" >
</form>
</body>
</html>

⌨️ 快捷键说明

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