一个网站的系统主要是jsp的进存销的系统
源代码在线查看: purchase1.jsp
天缘茗茶
function goto(src)
{
window.location = src;
}
.STYLE3 {color: #000000}
-->
request.setCharacterEncoding("gb2312");
String Code = request.getParameter("txtCode");
String AutoCode = request.getParameter("txtAutoCode");
String PurchaseTime = request.getParameter("txtPurchaseTime");
String CarriageCost = request.getParameter("txtCarriageCost");
String OtherCost = request.getParameter("txtOtherCost");
String perater = request.getParameter("txtperater");
String Note = request.getParameter("txtNote");
PurcharDetail pd = (PurcharDetail)session.getAttribute("Purchase"); //获取临时存放在session对象中的数据
//如果临时对象中没有进货信息,则新建一个
if (pd == null)
{
pd = new PurcharDetail();
if (session.getAttribute("UserName") != null)
{
pd.perater = session.getAttribute("UserName").toString();
}
}
//把当前的进行基本信息更新进进货单
if (AutoCode != null)
{
pd.AutoCode = AutoCode;
}
if (Code != null)
{
pd.Code = Code;
}
if (CarriageCost != null)
{
pd.CarriageCost= Float.parseFloat(CarriageCost);
}
if (Note != null)
{
pd.Note = Note;
}
if (OtherCost != null)
{
pd.OtherCost = Float.parseFloat(OtherCost);
}
if (perater != null)
{
pd.perater = perater;
}
if (PurchaseTime != null)
{
pd.PurchaseTime = PurchaseTime;
}
//获取当前进货单上的所有产品的费用
float ProductCost = 0;
for (int i = 0; i {
PurcharItemDetail obj = (PurcharItemDetail)pd.Product.get(i);
ProductCost += obj.Cost;
}
//保存产品成本
pd.ProductCost = ProductCost;
//总成本
pd.Cost = ProductCost + pd.CarriageCost + pd.OtherCost;
//保存最新更新的结果
session.setAttribute("Purchase",pd);
%>
请确认进货信息
单据号
流水号
进货时间
运费
其他费用
产品成本
总成本
经办人
其他说明
产品编号
进货价格
进货数量
成本小计
供应商编号
存放仓库
for (int i = 0;i {
PurcharItemDetail obj = (PurcharItemDetail)pd.Product.get(i);
%>