优化零售界面和报表界面

This commit is contained in:
季圣华
2017-06-21 23:34:48 +08:00
parent 09544415a9
commit 6c9c0bc4a6
6 changed files with 68 additions and 10 deletions

View File

@@ -211,6 +211,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
item.put("MaterialName", depotItem.getMaterialId().getName());
item.put("MaterialModel", depotItem.getMaterialId().getModel());
item.put("MaterialColor", depotItem.getMaterialId().getColor());
item.put("MaterialUnit", depotItem.getMaterialId().getUnit());
item.put("prevSum", prevSum);
item.put("InSum", InSum);
item.put("OutSum", OutSum);
@@ -266,6 +267,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
item.put("MaterialName", depotItem.getMaterialId().getName());
item.put("MaterialModel", depotItem.getMaterialId().getModel());
item.put("MaterialColor", depotItem.getMaterialId().getColor());
item.put("MaterialUnit", depotItem.getMaterialId().getUnit());
item.put("InSum", InSum);
item.put("OutSum", OutSum);
item.put("InSumPrice", InSumPrice);
@@ -323,6 +325,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
item.put("MaterialName", depotItem.getMaterialId().getName());
item.put("MaterialModel", depotItem.getMaterialId().getModel());
item.put("MaterialColor", depotItem.getMaterialId().getColor());
item.put("MaterialUnit", depotItem.getMaterialId().getUnit());
item.put("OutSum", OutSumRetail + OutSum);
item.put("InSum", InSumRetail + InSum);
item.put("OutSumPrice", OutSumRetailPrice + OutSumPrice);
@@ -416,6 +419,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
item.put("MaterialName", depotItem.getMaterialId().getName());
item.put("MaterialModel", depotItem.getMaterialId().getModel());
item.put("MaterialColor", depotItem.getMaterialId().getColor());
item.put("MaterialUnit", depotItem.getMaterialId().getUnit());
item.put("prevSum", prevSum);
item.put("InSum", InSum);
item.put("OutSum", OutSum);

View File

@@ -89,8 +89,8 @@ public class DepotItemService extends BaseService<DepotItem> implements DepotIte
workbook = Workbook.createWorkbook(os);
WritableSheet sheet = workbook.createSheet("进销存报表", 0);
//增加列头
int[] colunmWidth = {10,10,10,10,15,15,15,15,15};
String[] colunmName = {"名称","款号","颜色","单价","上月结存数量","入库数量","出库数量","本月结存数量","结存金额"};
int[] colunmWidth = {10,10,10,10,10,15,15,15,15,15};
String[] colunmName = {"名称","款号","颜色","","","上月结存数量","入库数量","出库数量","本月结存数量","结存金额"};
for(int i = 0 ;i < colunmWidth.length;i ++)
{
sheet.setColumnView(i,colunmWidth[i]);
@@ -103,14 +103,15 @@ public class DepotItemService extends BaseService<DepotItem> implements DepotIte
sheet.addCell(new Label(0, j+1, jo.getString("MaterialName")));
sheet.addCell(new Label(1, j+1, jo.getString("MaterialModel")));
sheet.addCell(new Label(2, j+1, jo.getString("MaterialColor")));
sheet.addCell(new Label(3, j+1, jo.getString("UnitPrice")));
sheet.addCell(new Label(4, j+1, jo.getString("prevSum")));
sheet.addCell(new Label(5, j+1, jo.getString("InSum")));
sheet.addCell(new Label(6, j+1, jo.getString("OutSum")));
sheet.addCell(new Label(7, j+1, jo.getString("thisSum")));
sheet.addCell(new Label(3, j+1, jo.getString("MaterialUnit")));
sheet.addCell(new Label(4, j+1, jo.getString("UnitPrice")));
sheet.addCell(new Label(5, j+1, jo.getString("prevSum")));
sheet.addCell(new Label(6, j+1, jo.getString("InSum")));
sheet.addCell(new Label(7, j+1, jo.getString("OutSum")));
sheet.addCell(new Label(8, j+1, jo.getString("thisSum")));
double d = Double.parseDouble(jo.getString("thisAllPrice").toString());
String s1 = String.format("%.2f", d);
sheet.addCell(new Label(8, j+1, s1));
sheet.addCell(new Label(9, j+1, s1));
}
}
workbook.write();