@@ -283,27 +283,8 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
|
|||||||
}
|
}
|
||||||
//品名/型号/扩展信息/包装
|
//品名/型号/扩展信息/包装
|
||||||
String MaterialName = depotItem.getMaterialId().getName() + ((depotItem.getMaterialId().getModel() == null || depotItem.getMaterialId().getModel().equals(""))?"":"("+depotItem.getMaterialId().getModel() + ")");
|
String MaterialName = depotItem.getMaterialId().getName() + ((depotItem.getMaterialId().getModel() == null || depotItem.getMaterialId().getModel().equals(""))?"":"("+depotItem.getMaterialId().getModel() + ")");
|
||||||
for(int i=0; i< mpArr.length; i++) {
|
String materialOther = getOtherInfo(mpArr, depotItem);
|
||||||
if(mpArr[i].equals("颜色")) {
|
MaterialName = MaterialName + materialOther + ratio;
|
||||||
MaterialName = MaterialName + ((depotItem.getMaterialId().getColor() == null || depotItem.getMaterialId().getColor().equals(""))?"":"("+depotItem.getMaterialId().getColor() + ")");
|
|
||||||
}
|
|
||||||
if(mpArr[i].equals("规格")) {
|
|
||||||
MaterialName = MaterialName + ((depotItem.getMaterialId().getStandard() == null || depotItem.getMaterialId().getStandard().equals(""))?"":"("+depotItem.getMaterialId().getStandard() + ")");
|
|
||||||
}
|
|
||||||
if(mpArr[i].equals("制造商")) {
|
|
||||||
MaterialName = MaterialName + ((depotItem.getMaterialId().getMfrs() == null || depotItem.getMaterialId().getMfrs().equals(""))?"":"("+depotItem.getMaterialId().getMfrs() + ")");
|
|
||||||
}
|
|
||||||
if(mpArr[i].equals("自定义1")) {
|
|
||||||
MaterialName = MaterialName + ((depotItem.getMaterialId().getOtherField1() == null || depotItem.getMaterialId().getOtherField1().equals(""))?"":"("+depotItem.getMaterialId().getOtherField1() + ")");
|
|
||||||
}
|
|
||||||
if(mpArr[i].equals("自定义2")) {
|
|
||||||
MaterialName = MaterialName + ((depotItem.getMaterialId().getOtherField2() == null || depotItem.getMaterialId().getOtherField2().equals(""))?"":"("+depotItem.getMaterialId().getOtherField2() + ")");
|
|
||||||
}
|
|
||||||
if(mpArr[i].equals("自定义3")) {
|
|
||||||
MaterialName = MaterialName + ((depotItem.getMaterialId().getOtherField3() == null || depotItem.getMaterialId().getOtherField3().equals(""))?"":"("+depotItem.getMaterialId().getOtherField3() + ")");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MaterialName = MaterialName + ratio;
|
|
||||||
item.put("MaterialName", MaterialName);
|
item.put("MaterialName", MaterialName);
|
||||||
item.put("Unit", depotItem.getMUnit());
|
item.put("Unit", depotItem.getMUnit());
|
||||||
item.put("OperNumber", depotItem.getOperNumber());
|
item.put("OperNumber", depotItem.getOperNumber());
|
||||||
@@ -354,7 +335,8 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
|
|||||||
pageUtil.setAdvSearch(getConditionALL());
|
pageUtil.setAdvSearch(getConditionALL());
|
||||||
depotItemService.find(pageUtil);
|
depotItemService.find(pageUtil);
|
||||||
List<DepotItem> dataList = pageUtil.getPageList();
|
List<DepotItem> dataList = pageUtil.getPageList();
|
||||||
|
String mpList = model.getMpList(); //商品属性
|
||||||
|
String[] mpArr = mpList.split(",");
|
||||||
JSONObject outer = new JSONObject();
|
JSONObject outer = new JSONObject();
|
||||||
outer.put("total", pageUtil.getTotalCount());
|
outer.put("total", pageUtil.getTotalCount());
|
||||||
//存放数据json数组
|
//存放数据json数组
|
||||||
@@ -373,7 +355,9 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
|
|||||||
item.put("MaterialId", depotItem.getMaterialId()==null?"":depotItem.getMaterialId().getId());
|
item.put("MaterialId", depotItem.getMaterialId()==null?"":depotItem.getMaterialId().getId());
|
||||||
item.put("MaterialName", depotItem.getMaterialId().getName());
|
item.put("MaterialName", depotItem.getMaterialId().getName());
|
||||||
item.put("MaterialModel", depotItem.getMaterialId().getModel());
|
item.put("MaterialModel", depotItem.getMaterialId().getModel());
|
||||||
item.put("MaterialStandard", depotItem.getMaterialId().getStandard());
|
//扩展信息
|
||||||
|
String materialOther = getOtherInfo(mpArr, depotItem);
|
||||||
|
item.put("MaterialOther", materialOther);
|
||||||
item.put("MaterialColor", depotItem.getMaterialId().getColor());
|
item.put("MaterialColor", depotItem.getMaterialId().getColor());
|
||||||
item.put("MaterialUnit", depotItem.getMaterialId().getUnit());
|
item.put("MaterialUnit", depotItem.getMaterialId().getUnit());
|
||||||
Double unitPrice = 0.0;
|
Double unitPrice = 0.0;
|
||||||
@@ -459,7 +443,8 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
|
|||||||
pageUtil.setAdvSearch(getConditionALL());
|
pageUtil.setAdvSearch(getConditionALL());
|
||||||
depotItemService.find(pageUtil);
|
depotItemService.find(pageUtil);
|
||||||
List<DepotItem> dataList = pageUtil.getPageList();
|
List<DepotItem> dataList = pageUtil.getPageList();
|
||||||
|
String mpList = model.getMpList(); //商品属性
|
||||||
|
String[] mpArr = mpList.split(",");
|
||||||
JSONObject outer = new JSONObject();
|
JSONObject outer = new JSONObject();
|
||||||
outer.put("total", pageUtil.getTotalCount());
|
outer.put("total", pageUtil.getTotalCount());
|
||||||
//存放数据json数组
|
//存放数据json数组
|
||||||
@@ -474,7 +459,9 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
|
|||||||
item.put("MaterialId", depotItem.getMaterialId()==null?"":depotItem.getMaterialId().getId());
|
item.put("MaterialId", depotItem.getMaterialId()==null?"":depotItem.getMaterialId().getId());
|
||||||
item.put("MaterialName", depotItem.getMaterialId().getName());
|
item.put("MaterialName", depotItem.getMaterialId().getName());
|
||||||
item.put("MaterialModel", depotItem.getMaterialId().getModel());
|
item.put("MaterialModel", depotItem.getMaterialId().getModel());
|
||||||
item.put("MaterialStandard", depotItem.getMaterialId().getStandard());
|
//扩展信息
|
||||||
|
String materialOther = getOtherInfo(mpArr, depotItem);
|
||||||
|
item.put("MaterialOther", materialOther);
|
||||||
item.put("MaterialColor", depotItem.getMaterialId().getColor());
|
item.put("MaterialColor", depotItem.getMaterialId().getColor());
|
||||||
item.put("MaterialUnit", depotItem.getMaterialId().getUnit());
|
item.put("MaterialUnit", depotItem.getMaterialId().getUnit());
|
||||||
item.put("thisSum", InSum - OutSum);
|
item.put("thisSum", InSum - OutSum);
|
||||||
@@ -507,7 +494,8 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
|
|||||||
pageUtil.setAdvSearch(getConditionALL());
|
pageUtil.setAdvSearch(getConditionALL());
|
||||||
depotItemService.find(pageUtil);
|
depotItemService.find(pageUtil);
|
||||||
List<DepotItem> dataList = pageUtil.getPageList();
|
List<DepotItem> dataList = pageUtil.getPageList();
|
||||||
|
String mpList = model.getMpList(); //商品属性
|
||||||
|
String[] mpArr = mpList.split(",");
|
||||||
JSONObject outer = new JSONObject();
|
JSONObject outer = new JSONObject();
|
||||||
outer.put("total", pageUtil.getTotalCount());
|
outer.put("total", pageUtil.getTotalCount());
|
||||||
//存放数据json数组
|
//存放数据json数组
|
||||||
@@ -525,7 +513,9 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
|
|||||||
item.put("MaterialId", depotItem.getMaterialId()==null?"":depotItem.getMaterialId().getId());
|
item.put("MaterialId", depotItem.getMaterialId()==null?"":depotItem.getMaterialId().getId());
|
||||||
item.put("MaterialName", depotItem.getMaterialId().getName());
|
item.put("MaterialName", depotItem.getMaterialId().getName());
|
||||||
item.put("MaterialModel", depotItem.getMaterialId().getModel());
|
item.put("MaterialModel", depotItem.getMaterialId().getModel());
|
||||||
item.put("MaterialStandard", depotItem.getMaterialId().getStandard());
|
//扩展信息
|
||||||
|
String materialOther = getOtherInfo(mpArr, depotItem);
|
||||||
|
item.put("MaterialOther", materialOther);
|
||||||
item.put("MaterialColor", depotItem.getMaterialId().getColor());
|
item.put("MaterialColor", depotItem.getMaterialId().getColor());
|
||||||
item.put("MaterialUnit", depotItem.getMaterialId().getUnit());
|
item.put("MaterialUnit", depotItem.getMaterialId().getUnit());
|
||||||
item.put("InSum", InSum);
|
item.put("InSum", InSum);
|
||||||
@@ -562,7 +552,8 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
|
|||||||
pageUtil.setAdvSearch(getConditionALL());
|
pageUtil.setAdvSearch(getConditionALL());
|
||||||
depotItemService.find(pageUtil);
|
depotItemService.find(pageUtil);
|
||||||
List<DepotItem> dataList = pageUtil.getPageList();
|
List<DepotItem> dataList = pageUtil.getPageList();
|
||||||
|
String mpList = model.getMpList(); //商品属性
|
||||||
|
String[] mpArr = mpList.split(",");
|
||||||
JSONObject outer = new JSONObject();
|
JSONObject outer = new JSONObject();
|
||||||
outer.put("total", pageUtil.getTotalCount());
|
outer.put("total", pageUtil.getTotalCount());
|
||||||
//存放数据json数组
|
//存放数据json数组
|
||||||
@@ -584,7 +575,9 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
|
|||||||
item.put("MaterialId", depotItem.getMaterialId()==null?"":depotItem.getMaterialId().getId());
|
item.put("MaterialId", depotItem.getMaterialId()==null?"":depotItem.getMaterialId().getId());
|
||||||
item.put("MaterialName", depotItem.getMaterialId().getName());
|
item.put("MaterialName", depotItem.getMaterialId().getName());
|
||||||
item.put("MaterialModel", depotItem.getMaterialId().getModel());
|
item.put("MaterialModel", depotItem.getMaterialId().getModel());
|
||||||
item.put("MaterialStandard", depotItem.getMaterialId().getStandard());
|
//扩展信息
|
||||||
|
String materialOther = getOtherInfo(mpArr, depotItem);
|
||||||
|
item.put("MaterialOther", materialOther);
|
||||||
item.put("MaterialColor", depotItem.getMaterialId().getColor());
|
item.put("MaterialColor", depotItem.getMaterialId().getColor());
|
||||||
item.put("MaterialUnit", depotItem.getMaterialId().getUnit());
|
item.put("MaterialUnit", depotItem.getMaterialId().getUnit());
|
||||||
item.put("OutSum", OutSumRetail + OutSum);
|
item.put("OutSum", OutSumRetail + OutSum);
|
||||||
@@ -843,6 +836,35 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
|
|||||||
sumPrice = Double.parseDouble(allPrice);
|
sumPrice = Double.parseDouble(allPrice);
|
||||||
return sumPrice;
|
return sumPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取扩展信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getOtherInfo(String[] mpArr, DepotItem depotItem){
|
||||||
|
String materialOther = "";
|
||||||
|
for(int i=0; i< mpArr.length; i++) {
|
||||||
|
if(mpArr[i].equals("颜色")) {
|
||||||
|
materialOther = materialOther + ((depotItem.getMaterialId().getColor() == null || depotItem.getMaterialId().getColor().equals(""))?"":"("+depotItem.getMaterialId().getColor() + ")");
|
||||||
|
}
|
||||||
|
if(mpArr[i].equals("规格")) {
|
||||||
|
materialOther = materialOther + ((depotItem.getMaterialId().getStandard() == null || depotItem.getMaterialId().getStandard().equals(""))?"":"("+depotItem.getMaterialId().getStandard() + ")");
|
||||||
|
}
|
||||||
|
if(mpArr[i].equals("制造商")) {
|
||||||
|
materialOther = materialOther + ((depotItem.getMaterialId().getMfrs() == null || depotItem.getMaterialId().getMfrs().equals(""))?"":"("+depotItem.getMaterialId().getMfrs() + ")");
|
||||||
|
}
|
||||||
|
if(mpArr[i].equals("自定义1")) {
|
||||||
|
materialOther = materialOther + ((depotItem.getMaterialId().getOtherField1() == null || depotItem.getMaterialId().getOtherField1().equals(""))?"":"("+depotItem.getMaterialId().getOtherField1() + ")");
|
||||||
|
}
|
||||||
|
if(mpArr[i].equals("自定义2")) {
|
||||||
|
materialOther = materialOther + ((depotItem.getMaterialId().getOtherField2() == null || depotItem.getMaterialId().getOtherField2().equals(""))?"":"("+depotItem.getMaterialId().getOtherField2() + ")");
|
||||||
|
}
|
||||||
|
if(mpArr[i].equals("自定义3")) {
|
||||||
|
materialOther = materialOther + ((depotItem.getMaterialId().getOtherField3() == null || depotItem.getMaterialId().getOtherField3().equals(""))?"":"("+depotItem.getMaterialId().getOtherField3() + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return materialOther;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 拼接搜索条件
|
* 拼接搜索条件
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
@@ -303,7 +303,8 @@ public class MaterialAction extends BaseAction<MaterialModel>
|
|||||||
materialService.find(pageUtil);
|
materialService.find(pageUtil);
|
||||||
getSession().put("pageUtilMaterial", pageUtil);
|
getSession().put("pageUtilMaterial", pageUtil);
|
||||||
List<Material> dataList = pageUtil.getPageList();
|
List<Material> dataList = pageUtil.getPageList();
|
||||||
|
String mpList = model.getMpList(); //商品属性
|
||||||
|
String[] mpArr = mpList.split(",");
|
||||||
JSONObject outer = new JSONObject();
|
JSONObject outer = new JSONObject();
|
||||||
outer.put("total", pageUtil.getTotalCount());
|
outer.put("total", pageUtil.getTotalCount());
|
||||||
//存放数据json数组
|
//存放数据json数组
|
||||||
@@ -317,12 +318,32 @@ public class MaterialAction extends BaseAction<MaterialModel>
|
|||||||
item.put("Name", material.getName());
|
item.put("Name", material.getName());
|
||||||
item.put("CategoryId", material.getMaterialCategory().getId()); //类型Id
|
item.put("CategoryId", material.getMaterialCategory().getId()); //类型Id
|
||||||
item.put("CategoryName", material.getMaterialCategory().getName()); //类型名称
|
item.put("CategoryName", material.getMaterialCategory().getName()); //类型名称
|
||||||
item.put("Mfrs", material.getMfrs()==null?"" : material.getMfrs());
|
|
||||||
item.put("Packing", material.getPacking()==null?"" : material.getPacking());
|
item.put("Packing", material.getPacking()==null?"" : material.getPacking());
|
||||||
item.put("SafetyStock", material.getSafetyStock()==null?"" : material.getSafetyStock());
|
item.put("SafetyStock", material.getSafetyStock()==null?"" : material.getSafetyStock());
|
||||||
item.put("Model", material.getModel()==null?"" : material.getModel());
|
item.put("Model", material.getModel()==null?"" : material.getModel());
|
||||||
item.put("Standard", material.getStandard()==null?"": material.getStandard());
|
//扩展信息
|
||||||
item.put("Color", material.getColor()==null?"": material.getColor());
|
String materialOther = "";
|
||||||
|
for(int i=0; i< mpArr.length; i++) {
|
||||||
|
if(mpArr[i].equals("颜色")) {
|
||||||
|
materialOther = materialOther + ((material.getColor() == null || material.getColor().equals(""))?"":"("+material.getColor() + ")");
|
||||||
|
}
|
||||||
|
if(mpArr[i].equals("规格")) {
|
||||||
|
materialOther = materialOther + ((material.getStandard() == null || material.getStandard().equals(""))?"":"("+material.getStandard() + ")");
|
||||||
|
}
|
||||||
|
if(mpArr[i].equals("制造商")) {
|
||||||
|
materialOther = materialOther + ((material.getMfrs() == null || material.getMfrs().equals(""))?"":"("+material.getMfrs() + ")");
|
||||||
|
}
|
||||||
|
if(mpArr[i].equals("自定义1")) {
|
||||||
|
materialOther = materialOther + ((material.getOtherField1() == null || material.getOtherField1().equals(""))?"":"("+material.getOtherField1() + ")");
|
||||||
|
}
|
||||||
|
if(mpArr[i].equals("自定义2")) {
|
||||||
|
materialOther = materialOther + ((material.getOtherField2() == null || material.getOtherField2().equals(""))?"":"("+material.getOtherField2() + ")");
|
||||||
|
}
|
||||||
|
if(mpArr[i].equals("自定义3")) {
|
||||||
|
materialOther = materialOther + ((material.getOtherField3() == null || material.getOtherField3().equals(""))?"":"("+material.getOtherField3() + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.put("MaterialOther", materialOther);
|
||||||
item.put("Unit", material.getUnit()==null?"": material.getUnit());
|
item.put("Unit", material.getUnit()==null?"": material.getUnit());
|
||||||
item.put("RetailPrice", material.getRetailPrice());
|
item.put("RetailPrice", material.getRetailPrice());
|
||||||
item.put("LowPrice", material.getLowPrice());
|
item.put("LowPrice", material.getLowPrice());
|
||||||
@@ -335,9 +356,12 @@ public class MaterialAction extends BaseAction<MaterialModel>
|
|||||||
item.put("PriceStrategy", material.getPriceStrategy());
|
item.put("PriceStrategy", material.getPriceStrategy());
|
||||||
item.put("Enabled", material.getEnabled());
|
item.put("Enabled", material.getEnabled());
|
||||||
item.put("Remark", material.getRemark());
|
item.put("Remark", material.getRemark());
|
||||||
item.put("OtherField1", material.getOtherField1());
|
item.put("Color", material.getColor()==null?"" : material.getColor());
|
||||||
item.put("OtherField2", material.getOtherField2());
|
item.put("Standard", material.getStandard()==null?"" : material.getStandard());
|
||||||
item.put("OtherField3", material.getOtherField3());
|
item.put("Mfrs", material.getMfrs()==null?"" : material.getMfrs());
|
||||||
|
item.put("OtherField1", material.getOtherField1()==null?"" : material.getOtherField1());
|
||||||
|
item.put("OtherField2", material.getOtherField2()==null?"" : material.getOtherField2());
|
||||||
|
item.put("OtherField3", material.getOtherField3()==null?"" : material.getOtherField3());
|
||||||
item.put("op", 1);
|
item.put("op", 1);
|
||||||
dataArray.add(item);
|
dataArray.add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
|
|||||||
workbook = Workbook.createWorkbook(os);
|
workbook = Workbook.createWorkbook(os);
|
||||||
WritableSheet sheet = workbook.createSheet("信息报表", 0);
|
WritableSheet sheet = workbook.createSheet("信息报表", 0);
|
||||||
//增加列头
|
//增加列头
|
||||||
String[] colunmName = {"品名","类型","型号","颜色","规格","安全存量","单位","零售价","最低售价","预计采购价","批发价","备注","状态"};
|
String[] colunmName = {"品名","类型","型号","安全存量","单位","零售价","最低售价","预计采购价","批发价","备注","状态"};
|
||||||
for(int i = 0 ;i < colunmName.length;i ++) {
|
for(int i = 0 ;i < colunmName.length;i ++) {
|
||||||
sheet.setColumnView(i, 10);
|
sheet.setColumnView(i, 10);
|
||||||
sheet.addCell(new Label(i, 0, colunmName[i]));
|
sheet.addCell(new Label(i, 0, colunmName[i]));
|
||||||
@@ -102,8 +102,6 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
|
|||||||
sheet.addCell(new Label(j++,i, material.getName()));
|
sheet.addCell(new Label(j++,i, material.getName()));
|
||||||
sheet.addCell(new Label(j++,i, material.getMaterialCategory().getName()));
|
sheet.addCell(new Label(j++,i, material.getMaterialCategory().getName()));
|
||||||
sheet.addCell(new Label(j++,i, material.getModel() == null ?"": material.getModel()));
|
sheet.addCell(new Label(j++,i, material.getModel() == null ?"": material.getModel()));
|
||||||
sheet.addCell(new Label(j++,i, material.getColor() == null ?"": material.getColor()));
|
|
||||||
sheet.addCell(new Label(j++,i, material.getStandard() == null ?"": material.getStandard()));
|
|
||||||
sheet.addCell(getLabelInfo(cellInfo,j++,i, material.getSafetyStock() == null ?"": material.getSafetyStock().toString(),material));
|
sheet.addCell(getLabelInfo(cellInfo,j++,i, material.getSafetyStock() == null ?"": material.getSafetyStock().toString(),material));
|
||||||
sheet.addCell(new Label(j++,i, material.getUnit() == null ?"": material.getUnit()));
|
sheet.addCell(new Label(j++,i, material.getUnit() == null ?"": material.getUnit()));
|
||||||
sheet.addCell(new Label(j++,i, material.getRetailPrice() == null ?"": material.getRetailPrice().toString()));
|
sheet.addCell(new Label(j++,i, material.getRetailPrice() == null ?"": material.getRetailPrice().toString()));
|
||||||
@@ -206,8 +204,6 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
|
|||||||
while(itsheet.hasNext()) {
|
while(itsheet.hasNext()) {
|
||||||
//获取当前行数据
|
//获取当前行数据
|
||||||
Row row = itsheet.next();
|
Row row = itsheet.next();
|
||||||
//获取一行有多少单元格
|
|
||||||
// System.out.println(row.getLastCellNum());
|
|
||||||
|
|
||||||
//excel表格第几行数据 从1开始 0 是表头
|
//excel表格第几行数据 从1开始 0 是表头
|
||||||
int rowNum = row.getRowNum();
|
int rowNum = row.getRowNum();
|
||||||
@@ -242,7 +238,7 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
|
|||||||
|
|
||||||
Log.infoFileSync("==================excel表格中第" + totalRow + "行的第 " + cellIndex + "列的值为" + cell.getStringCellValue());
|
Log.infoFileSync("==================excel表格中第" + totalRow + "行的第 " + cellIndex + "列的值为" + cell.getStringCellValue());
|
||||||
|
|
||||||
//每行中数据顺序 "品名","类型","型号","颜色","规格","安全存量","单位","零售价","最低售价","预计采购价","批发价","备注","状态"
|
//每行中数据顺序 "品名","类型","型号","安全存量","单位","零售价","最低售价","预计采购价","批发价","备注","状态"
|
||||||
switch(cellIndex) {
|
switch(cellIndex) {
|
||||||
case MaterialConstants.BusinessForExcel.EXCEL_NAME :
|
case MaterialConstants.BusinessForExcel.EXCEL_NAME :
|
||||||
String materialName = cell.getStringCellValue();
|
String materialName = cell.getStringCellValue();
|
||||||
@@ -268,22 +264,6 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
|
|||||||
}
|
}
|
||||||
material.setModel(model);
|
material.setModel(model);
|
||||||
break;
|
break;
|
||||||
case MaterialConstants.BusinessForExcel.EXCEL_COLOR :
|
|
||||||
String color = cell.getStringCellValue();
|
|
||||||
if(null == color || "".equals(color)) {
|
|
||||||
Log.errorFileSync(">>>>>>>>>>>>>>>>列表没有填写(颜色)信息");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
material.setColor(color);
|
|
||||||
break;
|
|
||||||
case MaterialConstants.BusinessForExcel.EXCEL_STANDARD :
|
|
||||||
String standard = cell.getStringCellValue();
|
|
||||||
if(null == standard || "".equals(standard)) {
|
|
||||||
Log.errorFileSync(">>>>>>>>>>>>>>>>列表没有填写(规格)信息");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
material.setStandard(standard);
|
|
||||||
break;
|
|
||||||
case MaterialConstants.BusinessForExcel.EXCEL_SAFETY_STOCK :
|
case MaterialConstants.BusinessForExcel.EXCEL_SAFETY_STOCK :
|
||||||
String safetyStock = cell.getStringCellValue();
|
String safetyStock = cell.getStringCellValue();
|
||||||
if(null == safetyStock || "".equals(safetyStock)) {
|
if(null == safetyStock || "".equals(safetyStock)) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
jdbcUrl= jdbc\:mysql\://localhost\:3306/jsh_erp?useUnicode\=true&characterEncoding\=UTF-8
|
jdbcUrl= jdbc\:mysql\://localhost\:3306/jsh_erp_guoku1009?useUnicode\=true&characterEncoding\=UTF-8
|
||||||
driverClass= com.mysql.jdbc.Driver
|
driverClass= com.mysql.jdbc.Driver
|
||||||
user= root
|
user= root
|
||||||
password=1234
|
password=1234
|
||||||
@@ -35,10 +35,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<input name="searchModel" id="searchModel" style="width:80px;"/>
|
<input name="searchModel" id="searchModel" style="width:80px;"/>
|
||||||
</td>
|
</td>
|
||||||
<td>颜色:</td>
|
<td> </td>
|
||||||
<td>
|
|
||||||
<input name="searchColor" id="searchColor" style="width:80px;"/>
|
|
||||||
</td>
|
|
||||||
<td>类别:</td>
|
<td>类别:</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="searchCategoryId_f" id="searchCategoryId_f" style="width:100px;"></select>
|
<select name="searchCategoryId_f" id="searchCategoryId_f" style="width:100px;"></select>
|
||||||
@@ -253,6 +250,7 @@
|
|||||||
var cid=1;
|
var cid=1;
|
||||||
var multiple = 0; //倍数
|
var multiple = 0; //倍数
|
||||||
var mPropertyList = null; //商品属性列表
|
var mPropertyList = null; //商品属性列表
|
||||||
|
var mPropertyListShort = ""; //商品属性列表-传值
|
||||||
//初始化界面
|
//初始化界面
|
||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
@@ -263,6 +261,7 @@
|
|||||||
initSelectInfo("edit_first");
|
initSelectInfo("edit_first");
|
||||||
manyUnitFun();
|
manyUnitFun();
|
||||||
priceKeyUp();//价格触发事件
|
priceKeyUp();//价格触发事件
|
||||||
|
initMPropertyShort(); //初始化商品属性
|
||||||
initTableData();
|
initTableData();
|
||||||
ininPager();
|
ininPager();
|
||||||
initForm();
|
initForm();
|
||||||
@@ -529,6 +528,34 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//初始化商品属性
|
||||||
|
function initMPropertyShort(){
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "<%=path %>/materialProperty/findBy.action",
|
||||||
|
dataType: "json",
|
||||||
|
async: false,
|
||||||
|
success: function (res) {
|
||||||
|
if (res && res.rows) {
|
||||||
|
var thisRows = res.rows;
|
||||||
|
for(var i=0; i < thisRows.length; i++) {
|
||||||
|
if(thisRows[i].enabled){
|
||||||
|
mPropertyListShort += thisRows[i].nativeName +",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(mPropertyListShort){
|
||||||
|
mPropertyListShort = mPropertyListShort.substring(0,mPropertyListShort.length-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//此处添加错误处理
|
||||||
|
error:function() {
|
||||||
|
$.messager.alert('查询提示','查询信息异常,请稍后再试!','error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//初始化表格数据
|
//初始化表格数据
|
||||||
function initTableData() {
|
function initTableData() {
|
||||||
//改变宽度和高度
|
//改变宽度和高度
|
||||||
@@ -550,7 +577,6 @@
|
|||||||
//fitColumns:true,
|
//fitColumns:true,
|
||||||
//单击行是否选中
|
//单击行是否选中
|
||||||
//checkOnSelect : false,
|
//checkOnSelect : false,
|
||||||
url:'<%=path %>/material/findBy.action?pageSize=' + initPageSize+'&CategoryIds='+setCategoryId+'&CategoryId='+cid,
|
|
||||||
pagination: true,
|
pagination: true,
|
||||||
//交替出现背景
|
//交替出现背景
|
||||||
striped : true,
|
striped : true,
|
||||||
@@ -576,8 +602,7 @@
|
|||||||
},
|
},
|
||||||
{ title: '品名',field: 'Name',width:80},
|
{ title: '品名',field: 'Name',width:80},
|
||||||
{ title: '型号',field: 'Model',width:80},
|
{ title: '型号',field: 'Model',width:80},
|
||||||
{ title: '颜色',field: 'Color',width:80},
|
{ title: '扩展信息',field: 'MaterialOther',width:150},
|
||||||
{ title: '规格',field: 'Standard',width:80},
|
|
||||||
{ title: '单位',field: 'Unit',width:60},
|
{ title: '单位',field: 'Unit',width:60},
|
||||||
{ title: '安全存量',field: 'SafetyStock',width:90},
|
{ title: '安全存量',field: 'SafetyStock',width:90},
|
||||||
{ title: '零售价',field: 'RetailPrice',width:60},
|
{ title: '零售价',field: 'RetailPrice',width:60},
|
||||||
@@ -651,6 +676,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
showMaterialDetails(1,initPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
//初始化键盘enter事件
|
//初始化键盘enter事件
|
||||||
@@ -1384,8 +1410,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function showMaterialDetails(pageNo,pageSize)
|
function showMaterialDetails(pageNo,pageSize) {
|
||||||
{
|
|
||||||
if(setCategoryId!="1") {
|
if(setCategoryId!="1") {
|
||||||
cid = 2;
|
cid = 2;
|
||||||
}
|
}
|
||||||
@@ -1402,6 +1427,7 @@
|
|||||||
Color: $.trim($("#searchColor").val()),
|
Color: $.trim($("#searchColor").val()),
|
||||||
CategoryId:cid,
|
CategoryId:cid,
|
||||||
CategoryIds:setCategoryId,
|
CategoryIds:setCategoryId,
|
||||||
|
mpList: mPropertyListShort,
|
||||||
pageNo:pageNo,
|
pageNo:pageNo,
|
||||||
pageSize:pageSize
|
pageSize:pageSize
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -48,24 +48,50 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var mPropertyList = ""; //商品属性列表
|
||||||
//初始化界面
|
//初始化界面
|
||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
var thisDate = getNowFormatMonth(); //当前月份
|
var thisDate = getNowFormatMonth(); //当前月份
|
||||||
$("#searchMonth").val(thisDate);
|
$("#searchMonth").val(thisDate);
|
||||||
|
initMProperty(); //初始化商品属性
|
||||||
initTableData();
|
initTableData();
|
||||||
ininPager();
|
ininPager();
|
||||||
search();
|
search();
|
||||||
print();
|
print();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//初始化商品属性
|
||||||
|
function initMProperty(){
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "<%=path %>/materialProperty/findBy.action",
|
||||||
|
dataType: "json",
|
||||||
|
success: function (res) {
|
||||||
|
if (res && res.rows) {
|
||||||
|
var thisRows = res.rows;
|
||||||
|
for(var i=0; i < thisRows.length; i++) {
|
||||||
|
if(thisRows[i].enabled){
|
||||||
|
mPropertyList += thisRows[i].nativeName +",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(mPropertyList){
|
||||||
|
mPropertyList = mPropertyList.substring(0,mPropertyList.length-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//此处添加错误处理
|
||||||
|
error:function() {
|
||||||
|
$.messager.alert('查询提示','查询信息异常,请稍后再试!','error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//初始化表格数据
|
//初始化表格数据
|
||||||
function initTableData()
|
function initTableData()
|
||||||
{
|
{
|
||||||
$('#tableData').datagrid({
|
$('#tableData').datagrid({
|
||||||
//title:'列表',
|
|
||||||
//iconCls:'icon-save',
|
|
||||||
//width:700,
|
|
||||||
height:heightInfo,
|
height:heightInfo,
|
||||||
nowrap: false,
|
nowrap: false,
|
||||||
rownumbers: true,
|
rownumbers: true,
|
||||||
@@ -82,8 +108,7 @@
|
|||||||
columns:[[
|
columns:[[
|
||||||
{ title: '名称',field: 'MaterialName',width:60},
|
{ title: '名称',field: 'MaterialName',width:60},
|
||||||
{ title: '型号',field: 'MaterialModel',width:80},
|
{ title: '型号',field: 'MaterialModel',width:80},
|
||||||
{ title: '规格',field: 'MaterialStandard',width:80},
|
{ title: '扩展信息',field: 'MaterialOther',width:150},
|
||||||
{ title: '颜色',field: 'MaterialColor',width:80,hidden:true},
|
|
||||||
{ title: '单位',field: 'MaterialUnit',width:80},
|
{ title: '单位',field: 'MaterialUnit',width:80},
|
||||||
{ title: '进货数量',field: 'InSum',width:60},
|
{ title: '进货数量',field: 'InSum',width:60},
|
||||||
{ title: '进货金额',field: 'InSumPrice',width:60},
|
{ title: '进货金额',field: 'InSumPrice',width:60},
|
||||||
@@ -146,11 +171,10 @@
|
|||||||
var pager = $("#tableData").datagrid('getPager');
|
var pager = $("#tableData").datagrid('getPager');
|
||||||
opts.pageNumber = 1;
|
opts.pageNumber = 1;
|
||||||
opts.pageSize = initPageSize;
|
opts.pageSize = initPageSize;
|
||||||
pager.pagination('refresh',
|
pager.pagination('refresh', {
|
||||||
{
|
pageNumber:1,
|
||||||
pageNumber:1,
|
pageSize:initPageSize
|
||||||
pageSize:initPageSize
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
//搜索处理
|
//搜索处理
|
||||||
$("#searchBtn").unbind().bind({
|
$("#searchBtn").unbind().bind({
|
||||||
@@ -182,7 +206,7 @@
|
|||||||
var MIds = resNew.mIds;
|
var MIds = resNew.mIds;
|
||||||
if(MIds) {
|
if(MIds) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"get",
|
type:"post",
|
||||||
url: "<%=path %>/depotItem/buyIn.action",
|
url: "<%=path %>/depotItem/buyIn.action",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data: ({
|
data: ({
|
||||||
@@ -190,7 +214,8 @@
|
|||||||
pageSize:pageSize,
|
pageSize:pageSize,
|
||||||
MonthTime:$("#searchMonth").val(),
|
MonthTime:$("#searchMonth").val(),
|
||||||
HeadIds:HeadIds,
|
HeadIds:HeadIds,
|
||||||
MaterialIds:MIds
|
MaterialIds:MIds,
|
||||||
|
mpList: mPropertyList
|
||||||
}),
|
}),
|
||||||
success: function (data)
|
success: function (data)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,11 +44,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var mPropertyList = ""; //商品属性列表
|
||||||
//初始化界面
|
//初始化界面
|
||||||
$(function(){
|
$(function(){
|
||||||
var userBusinessList=null;
|
var userBusinessList=null;
|
||||||
var userdepot=null;
|
var userdepot=null;
|
||||||
initGift();
|
initGift();
|
||||||
|
initMProperty(); //初始化商品属性
|
||||||
initTableData();
|
initTableData();
|
||||||
ininPager();
|
ininPager();
|
||||||
});
|
});
|
||||||
@@ -73,6 +75,33 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//初始化商品属性
|
||||||
|
function initMProperty(){
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "<%=path %>/materialProperty/findBy.action",
|
||||||
|
dataType: "json",
|
||||||
|
success: function (res) {
|
||||||
|
if (res && res.rows) {
|
||||||
|
var thisRows = res.rows;
|
||||||
|
for(var i=0; i < thisRows.length; i++) {
|
||||||
|
if(thisRows[i].enabled){
|
||||||
|
mPropertyList += thisRows[i].nativeName +",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(mPropertyList){
|
||||||
|
mPropertyList = mPropertyList.substring(0,mPropertyList.length-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//此处添加错误处理
|
||||||
|
error:function() {
|
||||||
|
$.messager.alert('查询提示','查询信息异常,请稍后再试!','error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//初始化表格数据
|
//初始化表格数据
|
||||||
function initTableData(){
|
function initTableData(){
|
||||||
$('#tableData').datagrid({
|
$('#tableData').datagrid({
|
||||||
@@ -91,8 +120,7 @@
|
|||||||
columns:[[
|
columns:[[
|
||||||
{ title: '名称',field: 'MaterialName',width:60},
|
{ title: '名称',field: 'MaterialName',width:60},
|
||||||
{ title: '型号',field: 'MaterialModel',width:80},
|
{ title: '型号',field: 'MaterialModel',width:80},
|
||||||
{ title: '规格',field: 'MaterialStandard',width:80},
|
{ title: '扩展信息',field: 'MaterialOther',width:150},
|
||||||
{ title: '颜色',field: 'MaterialColor',width:80,hidden:true},
|
|
||||||
{ title: '单位',field: 'MaterialUnit',width:80},
|
{ title: '单位',field: 'MaterialUnit',width:80},
|
||||||
{ title: '结存数量',field: 'thisSum',width:80}
|
{ title: '结存数量',field: 'thisSum',width:80}
|
||||||
]],
|
]],
|
||||||
@@ -186,7 +214,7 @@
|
|||||||
var MIds = resNew.mIds;
|
var MIds = resNew.mIds;
|
||||||
if(MIds) {
|
if(MIds) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"get",
|
type:"post",
|
||||||
url: "<%=path %>/depotItem/findGiftByAll.action",
|
url: "<%=path %>/depotItem/findGiftByAll.action",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data: ({
|
data: ({
|
||||||
@@ -194,7 +222,8 @@
|
|||||||
pageSize:pageSize,
|
pageSize:pageSize,
|
||||||
ProjectId: searchGiftId,
|
ProjectId: searchGiftId,
|
||||||
HeadIds: HeadIds,
|
HeadIds: HeadIds,
|
||||||
MaterialIds: MIds
|
MaterialIds: MIds,
|
||||||
|
mpList: mPropertyList
|
||||||
}),
|
}),
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
$("#tableData").datagrid('loadData',data);
|
$("#tableData").datagrid('loadData',data);
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var depotList = null;
|
var depotList = null;
|
||||||
var depotID = null;
|
var depotID = null;
|
||||||
|
var mPropertyList = ""; //商品属性列表
|
||||||
//初始化界面
|
//初始化界面
|
||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
@@ -71,6 +72,7 @@
|
|||||||
initSelectInfo_UB();
|
initSelectInfo_UB();
|
||||||
initSystemData_depot();
|
initSystemData_depot();
|
||||||
initSelectInfo_depot();
|
initSelectInfo_depot();
|
||||||
|
initMProperty(); //初始化商品属性
|
||||||
initTableData();
|
initTableData();
|
||||||
ininPager();
|
ininPager();
|
||||||
search();
|
search();
|
||||||
@@ -180,14 +182,38 @@
|
|||||||
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
|
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//初始化商品属性
|
||||||
|
function initMProperty(){
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "<%=path %>/materialProperty/findBy.action",
|
||||||
|
dataType: "json",
|
||||||
|
success: function (res) {
|
||||||
|
if (res && res.rows) {
|
||||||
|
var thisRows = res.rows;
|
||||||
|
for(var i=0; i < thisRows.length; i++) {
|
||||||
|
if(thisRows[i].enabled){
|
||||||
|
mPropertyList += thisRows[i].nativeName +",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(mPropertyList){
|
||||||
|
mPropertyList = mPropertyList.substring(0,mPropertyList.length-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//此处添加错误处理
|
||||||
|
error:function() {
|
||||||
|
$.messager.alert('查询提示','查询信息异常,请稍后再试!','error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//初始化表格数据
|
//初始化表格数据
|
||||||
function initTableData()
|
function initTableData()
|
||||||
{
|
{
|
||||||
$('#tableData').datagrid({
|
$('#tableData').datagrid({
|
||||||
//title:'列表',
|
|
||||||
//iconCls:'icon-save',
|
|
||||||
//width:700,
|
|
||||||
height:heightInfo,
|
height:heightInfo,
|
||||||
nowrap: false,
|
nowrap: false,
|
||||||
rownumbers: true,
|
rownumbers: true,
|
||||||
@@ -204,8 +230,7 @@
|
|||||||
columns:[[
|
columns:[[
|
||||||
{ title: '名称',field: 'MaterialName',width:60},
|
{ title: '名称',field: 'MaterialName',width:60},
|
||||||
{ title: '型号',field: 'MaterialModel',width:80},
|
{ title: '型号',field: 'MaterialModel',width:80},
|
||||||
{ title: '规格',field: 'MaterialStandard',width:80},
|
{ title: '扩展信息',field: 'MaterialOther',width:150},
|
||||||
{ title: '颜色',field: 'MaterialColor',width:80,hidden:true},
|
|
||||||
{ title: '单位',field: 'MaterialUnit',width:80},
|
{ title: '单位',field: 'MaterialUnit',width:80},
|
||||||
{ title: '单价',field: 'UnitPrice',width:60,formatter: function(value,row,index){
|
{ title: '单价',field: 'UnitPrice',width:60,formatter: function(value,row,index){
|
||||||
return value.toFixed(2);
|
return value.toFixed(2);
|
||||||
@@ -328,7 +353,7 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"get",
|
type:"post",
|
||||||
url: "<%=path %>/depotItem/findByAll.action",
|
url: "<%=path %>/depotItem/findByAll.action",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data: ({
|
data: ({
|
||||||
@@ -337,7 +362,8 @@
|
|||||||
ProjectId: $.trim($("#searchProjectId").val()),
|
ProjectId: $.trim($("#searchProjectId").val()),
|
||||||
MonthTime:$("#searchMonth").val(),
|
MonthTime:$("#searchMonth").val(),
|
||||||
HeadIds:HeadIds,
|
HeadIds:HeadIds,
|
||||||
MaterialIds:MIds
|
MaterialIds:MIds,
|
||||||
|
mpList: mPropertyList
|
||||||
}),
|
}),
|
||||||
success: function (data)
|
success: function (data)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,25 +49,51 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var mPropertyList = ""; //商品属性列表
|
||||||
//初始化界面
|
//初始化界面
|
||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
$("#searchTable .tip").css("padding-left","15px").css("color","red");
|
$("#searchTable .tip").css("padding-left","15px").css("color","red");
|
||||||
var thisDate = getNowFormatMonth(); //当前月份
|
var thisDate = getNowFormatMonth(); //当前月份
|
||||||
$("#searchMonth").val(thisDate);
|
$("#searchMonth").val(thisDate);
|
||||||
|
initMProperty(); //初始化商品属性
|
||||||
initTableData();
|
initTableData();
|
||||||
ininPager();
|
ininPager();
|
||||||
search();
|
search();
|
||||||
print();
|
print();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//初始化商品属性
|
||||||
|
function initMProperty(){
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "<%=path %>/materialProperty/findBy.action",
|
||||||
|
dataType: "json",
|
||||||
|
success: function (res) {
|
||||||
|
if (res && res.rows) {
|
||||||
|
var thisRows = res.rows;
|
||||||
|
for(var i=0; i < thisRows.length; i++) {
|
||||||
|
if(thisRows[i].enabled){
|
||||||
|
mPropertyList += thisRows[i].nativeName +",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(mPropertyList){
|
||||||
|
mPropertyList = mPropertyList.substring(0,mPropertyList.length-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//此处添加错误处理
|
||||||
|
error:function() {
|
||||||
|
$.messager.alert('查询提示','查询信息异常,请稍后再试!','error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//初始化表格数据
|
//初始化表格数据
|
||||||
function initTableData()
|
function initTableData()
|
||||||
{
|
{
|
||||||
$('#tableData').datagrid({
|
$('#tableData').datagrid({
|
||||||
//title:'列表',
|
|
||||||
//iconCls:'icon-save',
|
|
||||||
//width:700,
|
|
||||||
height:heightInfo,
|
height:heightInfo,
|
||||||
nowrap: false,
|
nowrap: false,
|
||||||
rownumbers: true,
|
rownumbers: true,
|
||||||
@@ -84,8 +110,7 @@
|
|||||||
columns:[[
|
columns:[[
|
||||||
{ title: '名称',field: 'MaterialName',width:60},
|
{ title: '名称',field: 'MaterialName',width:60},
|
||||||
{ title: '型号',field: 'MaterialModel',width:80},
|
{ title: '型号',field: 'MaterialModel',width:80},
|
||||||
{ title: '规格',field: 'MaterialStandard',width:80},
|
{ title: '扩展信息',field: 'MaterialOther',width:150},
|
||||||
{ title: '颜色',field: 'MaterialColor',width:80,hidden:true},
|
|
||||||
{ title: '单位',field: 'MaterialUnit',width:80},
|
{ title: '单位',field: 'MaterialUnit',width:80},
|
||||||
{ title: '销售数量',field: 'OutSum',width:60},
|
{ title: '销售数量',field: 'OutSum',width:60},
|
||||||
{ title: '销售金额',field: 'OutSumPrice',width:60},
|
{ title: '销售金额',field: 'OutSumPrice',width:60},
|
||||||
@@ -184,7 +209,7 @@
|
|||||||
var MIds = resNew.mIds;
|
var MIds = resNew.mIds;
|
||||||
if(MIds) {
|
if(MIds) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"get",
|
type:"post",
|
||||||
url: "<%=path %>/depotItem/saleOut.action",
|
url: "<%=path %>/depotItem/saleOut.action",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data: ({
|
data: ({
|
||||||
@@ -192,7 +217,8 @@
|
|||||||
pageSize:pageSize,
|
pageSize:pageSize,
|
||||||
MonthTime:$("#searchMonth").val(),
|
MonthTime:$("#searchMonth").val(),
|
||||||
HeadIds:HeadIds,
|
HeadIds:HeadIds,
|
||||||
MaterialIds:MIds
|
MaterialIds:MIds,
|
||||||
|
mpList: mPropertyList
|
||||||
}),
|
}),
|
||||||
success: function (data)
|
success: function (data)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user