📄 purchupdate.jsp
字号:
<jsp:useBean id="Purch" class="src.wuyang.Purch" scope="page"/>
<jsp:useBean id="customer" class="src.wuyang.Customer" scope="page"/>
<jsp:useBean id="operation" class="src.wuyang.OperationInfoTra" scope="page"/>
<jsp:useBean id="employee" class="src.wuyang.Employee" scope="page"/>
<jsp:useBean id="account" class="src.wuyang.Account" scope="page"/>
<jsp:useBean id="global" class="src.com.MyGlobal" scope="session"/>
<% if (global.isLogined == false) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="-4" />
</jsp:forward>
<% }
%>
<html>
<head>
<title>产品信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<%
String state[] = {"要求部门经理审核","部门经理通过","供应部登记","高层审核通过","审核不通过","出入库","发票","完成","完成"};
String jsfs[] = {"现金","汇票","转帐"};
String purchId = request.getParameter("purchId");
if (request.getParameter("update")!=null){
Purch.setGlobal(global);
Purch.setNeedDate( Purch.stringToDate(request.getParameter("needDaten"),request.getParameter("needDatey"),request.getParameter("needDater")) );
Purch.setPerdictDate( Purch.stringToDate(request.getParameter("perdictDaten"),request.getParameter("perdictDatey"),request.getParameter("perdictDater")) );
%>
<jsp:setProperty name="Purch" property="*" />
<%
int rtcode = Purch.update();
if(rtcode < 0) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="<%= rtcode %>" />
</jsp:forward>
<%
} else {
operation.setReceiptId(Purch.getPurchId());
operation.setReceiptType(2);
operation.setProposer(Purch.getProposer());
employee.load(Purch.getProposer());
operation.setDeptId(employee.getDeptId());
operation.update();
%>
<jsp:forward page="PurchProductInsert.jsp" >
<jsp:param name="pageName" value="UpdatePurch.jsp" />
</jsp:forward>
<%
}
}
int rtcode = Purch.load(purchId);
if(rtcode < 0) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="<%= rtcode %>" />
</jsp:forward>
<%
}
customer.load(Purch.getCustomerId());
account.load(global.loginName);
if(((account.getEmployeeId()).equals(Purch.getProposer()) == false)||(Purch.getPurchState()==3)){
%>
<jsp:forward page="UpdatePurch.jsp" >
</jsp:forward>
<%
}
%>
<body bgcolor="#949B93" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="1" height="90%" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#616860" bordercolordark="#CCCCCC" bgcolor="#4c7171" >
<tr>
<td valign="top" >
<blockquote>
<form method="post" action="PurchUpdate.jsp">
<input type="hidden" name="purchId" value="<%=Purch.getPurchId()%>">
<br>
<table width="88%" border="1" bordercolorlight="#000000" bordercolordark="#CCCCCC" cellpadding="0" cellspacing="0">
<tr>
<td width="15%" height="25" class="text" bgcolor="#949b93">
<div align="right"><b>采购单编号:</b></div>
</td>
<td width="33%" height="25" class="textb">
<div align="left"><b> <%=Purch.getPurchId()%> </b></div>
</td>
<td width="15%" height="25" class="text" bgcolor="#949b93">
<div align="right"><b>采购单状态:</b></div>
</td>
<td width="37%" height="25" class="textb">
<div align="left"><b> <% for(int j=0;j<9;j++) { if(Purch.getPurchState()==j){%>
<%=state[j]%> <%}}%> </b></div>
</td>
</tr>
<tr>
<td width="15%" height="25" class="text" bgcolor="#949b93">
<div align="right"><b>用途:</b></div>
</td>
<td width="33%" height="25" class="textb">
<div align="left"><b>
<input type="text" name="useFor" value="<%=Purch.getUseFor()%>"/>
</b></div>
</td>
<td width="15%" height="25" class="text" bgcolor="#949b93">
<div align="right"><b>申请金额:</b></div>
</td>
<td width="37%" height="25" class="textb">
<div align="left"><b>
<input type="text" name="appMoney" value="<%=Purch.doubleFormat(Purch.getAppMoney(),2)%>" />
</b></div>
</td>
</tr>
<tr>
<td width="15%" height="33" class="text" bgcolor="#949b93">
<div align="right"><b>合同编号:</b></div>
</td>
<td width="33%" height="33" class="textb">
<div align="left"><b class="textb">
<input type="hidden" name="contractId" value="<%=Purch.getContractId()%>" class="textb"/>
<a href="ContractDetail.jsp?contractId=<%=Purch.getContractId()%>" class="textb"><%=Purch.getContractId()%>
</a></b></div>
</td>
<td width="15%" height="33" class="text" bgcolor="#949b93">
<div align="right"><b>用款方式:</b></div>
</td>
<td width="37%" height="33" class="textb">
<div align="left"> <b>
<select name="useWay">
<% for(int i=0;i<3;i++) { %>
<option value="<%=i%>" <% if(Purch.getUseWay()==i){%> selected <%}%>><%=jsfs[i]%></option>
<%}%>
</select>
</b></div>
</td>
</tr>
<tr>
<td width="15%" height="33" class="text" bgcolor="#949b93">
<div align="right"><b>客户名称:</b></div>
</td>
<td colspan="3" height="33" class="textb"><b>
<input type="hidden" name="customerId" value="<%=Purch.getCustomerId()%>"/>
<%=customer.getCustomerName()%> </b></td>
</tr>
<tr>
<td width="15%" height="33" class="text" bgcolor="#949b93">
<div align="right"><b>帐号:</b></div>
</td>
<td width="33%" height="33" class="textb"><b><%=customer.getBankAccount()%></b></td>
<td width="15%" height="33" class="text" bgcolor="#949b93">
<div align="right"><b>用款时间:</b></div>
</td>
<td width="37%" height="33" class="textb">
<input type="text" name="needDaten" value="<%=Purch.getStringDate(Purch.getNeedDate(),1)%>"/ size="4" maxlength="4">
年
<input type="text" name="needDatey" value="<%=Purch.getStringDate(Purch.getNeedDate(),2)%>"/ size="2" maxlength="2">
月
<input type="text" name="needDater" value="<%=Purch.getStringDate(Purch.getNeedDate(),3)%>"/ size="2" maxlength="2">
日 </td>
</tr>
<tr>
<td width="15%" height="33" class="text" bgcolor="#949b93">
<div align="right"><b>开户银行:</b></div>
</td>
<td colspan="3" height="33" class="textb"><b><%=customer.getBank()%></b>
</td>
</tr>
<tr>
<td width="15%" height="33" class="text" bgcolor="#949b93">
<div align="right"><b>预计发货期:</b></div>
</td>
<td width="33%" height="33" class="textb">
<input type="text" name="perdictDaten" value="<%=Purch.getStringDate(Purch.getPerdictDate(),1)%>"/ size="4" maxlength="4">
年
<input type="text" name="perdictDatey" value="<%=Purch.getStringDate(Purch.getPerdictDate(),2)%>"/ size="2" maxlength="2">
月
<input type="text" name="perdictDater" value="<%=Purch.getStringDate(Purch.getPerdictDate(),3)%>"/ size="2" maxlength="2">
日 </td>
<td width="15%" height="33" class="text" bgcolor="#949b93">
<div align="right"><b>申请人:</b></div>
</td>
<td width="37%" height="33" class="textb">
<input type="text" name="proposer" value="<%=Purch.getProposer()%>"/>
</td>
</tr>
<tr>
<td width="15%" height="33" class="text" bgcolor="#949b93" valign="top">
<div align="right"><b>备注:</b></div>
</td>
<td colspan="3" height="33" class="textb">
<textarea name="comment" /="/" rows=2 cols=60 ><%=Purch.getComment()%></textarea>
</td>
</tr>
</table>
<div align="left">
<table width="88%" border="0">
<tr>
<td>
<div align="center"><br>
<input type="submit" name="update" value="修改" />
<input type="reset" value="重置" name="reset" />
</div>
</td>
</tr>
</table>
</div>
</form>
</blockquote>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -