📄 invoiceupdate.jsp
字号:
<jsp:useBean id="invoice" class="src.wuyang.Invoice" scope="page"/>
<jsp:useBean id="dept" class="src.wuyang.Department" scope="page"/>
<jsp:useBean id="employee" class="src.wuyang.Employee" 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>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<%! String mode;%>
<%
String type[] = {"销售开票","","采购开票","易耗品开票"};
String flag[] = {"付","收"};
String state[] = {"未收付","在收付","已收付"};
String invoiceId = request.getParameter("invoiceId");
mode = request.getParameter("mode");
if (request.getParameter("update")!=null && mode.equals("update") ){
%>
<jsp:setProperty name="invoice" property="*" />
<%
invoice.setInvoiceDate( invoice.stringToDate(request.getParameter("year"),request.getParameter("month"),request.getParameter("day") ) );
int rtcode = invoice.update();
if(rtcode >= 0) {
%>
<jsp:forward page="InvoiceUpdate.jsp">
<jsp:param name="invoiceId" value="<%=invoiceId%>" />
<jsp:param name="mode" value="ok" />
</jsp:forward>
<%
}else {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="<%= rtcode %>" />
</jsp:forward>
<%
}
}
int count = invoice.load(invoiceId);
if (count <= 0) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="-103" />
</jsp:forward>
<%
}
%>
<body bgcolor=#949b93><table width="100%" border="1" height="90%" bordercolorlight="#616860" bordercolordark="#CCCCCC" bgcolor="#4c7171" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<blockquote><br>
<br><form method="post" action="InvoiceUpdate.jsp">
<input type="hidden" name="mode" value="update" />
<input type="hidden" name="invoiceId" value="<%=invoiceId%>" />
<table width="60%" border="0" class="textb">
<tr>
<td> <b>
发票编号: </b></td>
<td>
<%=invoice.getInvoiceId()%>
</td>
</tr>
<tr>
<td><b>发票金额:</b></td>
<td>
<input type="text" name="invoiceMoney" value="<%=invoice.doubleFormat(invoice.getInvoiceMoney(),2)%>"/>
</td>
</tr>
<tr>
<td><b>凭证编号:</b></td>
<td>
<%=invoice.getReceiptId()%>
</td>
</tr>
<tr>
<td><b>凭证类型:</b></td>
<td>
<%=type[invoice.getReceiptType()]%>
</td>
</tr>
<tr>
<td><b>客户编号:</b></td>
<td>
<%=invoice.getCustomerId()%>
</td>
</tr>
<tr>
<td><b>开票日期: </b></td>
<td>
<input type="text" name="year" size="4" value="<%=invoice.getStringDate(invoice.getInvoiceDate(),1)%>">
年
<input type="text" name="month" size="2" value="<%=invoice.getStringDate(invoice.getInvoiceDate(),2)%>">
月
<input type="text" name="day" size="2" value="<%=invoice.getStringDate(invoice.getInvoiceDate(),3)%>">
日 </td>
</tr>
<tr>
<td><b>发票状态:</b></td>
<td>
<%=state[invoice.getInvoiceState()]%>
</td>
</tr>
<tr>
<td><b>收付标记: </b></td>
<td>
<%=flag[invoice.getInvoiceFlag()]%>
</td>
</tr>
<tr>
<td><b>所属业务员:</b></td>
<td>
<%employee.load(invoice.getEmployeeId());%><%=employee.getEmpName()%>
</td>
</tr>
<tr>
<td><b>所属部门:</b></td>
<td>
<%dept.load(invoice.getDeptId());%><%=dept.getDeptName()%>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center"> <br>
<input type="submit" name="update" value="修改" />
</div>
</td>
</tr>
</table>
</form>
</blockquote>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -