?? 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 + -