根据商品id查询单据列表接口-完善

This commit is contained in:
季圣华
2018-12-24 21:03:07 +08:00
parent b163bc1d4a
commit c0e43886a8
2 changed files with 3 additions and 3 deletions

View File

@@ -800,7 +800,7 @@
function getMaterialInOutList(mId, pageNo, pageSize) { function getMaterialInOutList(mId, pageNo, pageSize) {
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/depotItem/findDetailByTypeAndMaterialId.action", url: "/depotItem/findDetailByTypeAndMaterialId",
dataType: "json", dataType: "json",
data: ({ data: ({
materialId: mId, materialId: mId,

View File

@@ -100,13 +100,13 @@ public class DepotItemController {
dataArray.add(item); dataArray.add(item);
} }
} }
objectMap.put("page", dataArray); objectMap.put("page", queryInfo);
if (list == null) { if (list == null) {
queryInfo.setRows(new ArrayList<Object>()); queryInfo.setRows(new ArrayList<Object>());
queryInfo.setTotal(0); queryInfo.setTotal(0);
return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code); return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
} }
queryInfo.setRows(list); queryInfo.setRows(dataArray);
queryInfo.setTotal(depotItemService.findDetailByTypeAndMaterialIdCounts(parameterMap)); queryInfo.setTotal(depotItemService.findDetailByTypeAndMaterialIdCounts(parameterMap));
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
} }