From e83ca1c5a76aa58679badd38a5106adcbf10939b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Sun, 27 Dec 2020 15:10:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8A=A5=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E4=BD=BF=E5=85=B6=E6=98=BE=E7=A4=BA=E6=89=A9=E5=B1=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp_web/js/pages/bill/add_temp.js | 4 +- erp_web/js/pages/bill/bill_detail.js | 2 +- erp_web/pages/materials/materialProperty.html | 16 ++++---- .../pages/reports/stock_warning_report.html | 8 +++- .../erp/controller/DepotItemController.java | 26 +++++++++++- .../vo/DepotItemStockWarningCount.java | 40 +++++++++++++++++++ .../mapper_xml/DepotItemMapperEx.xml | 19 ++++----- 7 files changed, 91 insertions(+), 24 deletions(-) diff --git a/erp_web/js/pages/bill/add_temp.js b/erp_web/js/pages/bill/add_temp.js index 78402957..15693136 100644 --- a/erp_web/js/pages/bill/add_temp.js +++ b/erp_web/js/pages/bill/add_temp.js @@ -186,7 +186,7 @@ function bindSupplierEvent() { success: function(res) { if (res) { $('#supplierDlg').dialog('close'); - initSupplier(); //刷新供应商 + inOutService.initSupplier(); //刷新供应商 } } }); @@ -319,7 +319,7 @@ function bindAccountEvent() { success: function(res) { if(res && res.code === 200) { $('#accountDlg').dialog('close'); - initSystemData_account(); //刷新账户 + inOutService.initSystemData_account(); //刷新账户 } }, //此处添加错误处理 diff --git a/erp_web/js/pages/bill/bill_detail.js b/erp_web/js/pages/bill/bill_detail.js index a791c13e..de92aa41 100644 --- a/erp_web/js/pages/bill/bill_detail.js +++ b/erp_web/js/pages/bill/bill_detail.js @@ -52,7 +52,7 @@ var thisRows = res.data.page.rows; for (var i = 0; i < thisRows.length; i++) { if (thisRows[i].enabled) { - mPropertyList += thisRows[i].nativename + ","; + mPropertyList += thisRows[i].nativeName + ","; } } if (mPropertyList) { diff --git a/erp_web/pages/materials/materialProperty.html b/erp_web/pages/materials/materialProperty.html index 9766a232..db93d592 100644 --- a/erp_web/pages/materials/materialProperty.html +++ b/erp_web/pages/materials/materialProperty.html @@ -111,6 +111,13 @@ //loadFilter: pagerFilter, columns: [[ {field: 'id', width: 10, align: "center", hidden: true}, + { + title: '操作', field: 'op', align: "center", width: 80, formatter: function (value, rec, index) { + var str = ''; + str += ''; + return str; + } + }, {title: '名称', field: 'nativeName', width: 100}, { title: '是否启用', field: 'enabled', width: 100, formatter: function (value, rec) { @@ -123,14 +130,7 @@ } }, {title: '排序', field: 'sort', width: 100}, - {title: '别名', field: 'anotherName', width: 100}, - { - title: '操作', field: 'op', align: "center", width: 80, formatter: function (value, rec, index) { - var str = ''; - str += ' 编辑  '; - return str; - } - } + {title: '别名', field: 'anotherName', width: 100} ]], onLoadError: function () { $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error'); diff --git a/erp_web/pages/reports/stock_warning_report.html b/erp_web/pages/reports/stock_warning_report.html index 88c01f23..a1442d4c 100644 --- a/erp_web/pages/reports/stock_warning_report.html +++ b/erp_web/pages/reports/stock_warning_report.html @@ -293,12 +293,16 @@ data: ({ currentPage: pageNo, pageSize: pageSize, - projectId : $.trim($("#searchProjectId").val()) + projectId : $.trim($("#searchProjectId").val()), + mpList: mPropertyList }), success: function (res) { if(res && res.code === 200 && res.data) { if (pageSize === 3000) { - window.location.href = "/depotItem/exportWarningExcel?browserType=" + getOs() + "¤tPage=" + pageNo + "&pageSize=" + pageSize + "&projectId=" + $.trim($("#searchProjectId").val()) ; + window.location.href = "/depotItem/exportWarningExcel?browserType=" + getOs() + + "¤tPage=" + pageNo + "&pageSize=" + pageSize + + "&projectId=" + $.trim($("#searchProjectId").val()) + + "&mpList=" + mPropertyList; } else { //获取排序后的产品ID diff --git a/src/main/java/com/jsh/erp/controller/DepotItemController.java b/src/main/java/com/jsh/erp/controller/DepotItemController.java index c3a381f5..23b33441 100644 --- a/src/main/java/com/jsh/erp/controller/DepotItemController.java +++ b/src/main/java/com/jsh/erp/controller/DepotItemController.java @@ -574,11 +574,25 @@ public class DepotItemController { */ @GetMapping(value = "/findStockWarningCount") public BaseResponseInfo findStockWarningCount(@RequestParam("currentPage") Integer currentPage, - @RequestParam("pageSize") Integer pageSize, @RequestParam("projectId") Integer pid )throws Exception { + @RequestParam("pageSize") Integer pageSize, + @RequestParam("projectId") Integer pid, + @RequestParam("mpList") String mpList)throws Exception { BaseResponseInfo res = new BaseResponseInfo(); Map map = new HashMap(); try { + String[] mpArr = mpList.split(","); List list = depotItemService.findStockWarningCount((currentPage-1)*pageSize, pageSize,pid); + //存放数据json数组 + if (null != list) { + for (DepotItemStockWarningCount disw : list) { + DepotItemVo4WithInfoEx diEx = new DepotItemVo4WithInfoEx(); + diEx.setMMfrs(disw.getMMfrs()); + diEx.setMOtherField1(disw.getMOtherField1()); + diEx.setMOtherField2(disw.getMOtherField2()); + diEx.setMOtherField3(disw.getMOtherField3()); + disw.setMaterialOther(getOtherInfo(mpArr, diEx)); + } + } int total = depotItemService.findStockWarningCountTotal(pid); map.put("total", total); map.put("rows", list); @@ -604,11 +618,13 @@ public class DepotItemController { public BaseResponseInfo exportWarningExcel(@RequestParam("currentPage") Integer currentPage, @RequestParam("pageSize") Integer pageSize, @RequestParam("projectId") Integer projectId, + @RequestParam("mpList") String mpList, HttpServletRequest request, HttpServletResponse response)throws Exception { BaseResponseInfo res = new BaseResponseInfo(); Map map = new HashMap(); String message = "成功"; try { + String[] mpArr = mpList.split(","); List dataList = depotItemService.findStockWarningCount((currentPage - 1) * pageSize, pageSize, projectId); //存放数据json数组 Integer pid = projectId; @@ -617,11 +633,17 @@ public class DepotItemController { List objects = new ArrayList(); if (null != dataList) { for (DepotItemStockWarningCount diEx : dataList) { + DepotItemVo4WithInfoEx diVI = new DepotItemVo4WithInfoEx(); + diVI.setMMfrs(diEx.getMMfrs()); + diVI.setMOtherField1(diEx.getMOtherField1()); + diVI.setMOtherField2(diEx.getMOtherField2()); + diVI.setMOtherField3(diEx.getMOtherField3()); + String materialOther = getOtherInfo(mpArr, diVI); String[] objs = new String[10]; objs[0] = diEx.getMaterialName(); objs[1] = diEx.getMaterialStandard(); objs[2] = diEx.getMaterialModel(); - objs[3] = diEx.getMaterialOther(); + objs[3] = materialOther; objs[4] = diEx.getMaterialUnit(); objs[5] = diEx.getBasicInNumber().toString(); objs[6] = diEx.getBasicOutNumber() == null ? "0" : diEx.getBasicOutNumber().toString(); diff --git a/src/main/java/com/jsh/erp/datasource/vo/DepotItemStockWarningCount.java b/src/main/java/com/jsh/erp/datasource/vo/DepotItemStockWarningCount.java index 2ef4ec01..1ccddd28 100644 --- a/src/main/java/com/jsh/erp/datasource/vo/DepotItemStockWarningCount.java +++ b/src/main/java/com/jsh/erp/datasource/vo/DepotItemStockWarningCount.java @@ -11,10 +11,18 @@ public class DepotItemStockWarningCount { private String MaterialStandard; + private String MMfrs; + private String categoryName; private String MaterialOther; + private String MOtherField1; + + private String MOtherField2; + + private String MOtherField3; + private String MaterialUnit; private BigDecimal safetystock;//安全库存量 @@ -52,6 +60,14 @@ public class DepotItemStockWarningCount { MaterialStandard = materialStandard; } + public String getMMfrs() { + return MMfrs; + } + + public void setMMfrs(String MMfrs) { + this.MMfrs = MMfrs; + } + public String getCategoryName() { return categoryName; } @@ -68,6 +84,30 @@ public class DepotItemStockWarningCount { MaterialOther = materialOther; } + public String getMOtherField1() { + return MOtherField1; + } + + public void setMOtherField1(String MOtherField1) { + this.MOtherField1 = MOtherField1; + } + + public String getMOtherField2() { + return MOtherField2; + } + + public void setMOtherField2(String MOtherField2) { + this.MOtherField2 = MOtherField2; + } + + public String getMOtherField3() { + return MOtherField3; + } + + public void setMOtherField3(String MOtherField3) { + this.MOtherField3 = MOtherField3; + } + public String getMaterialUnit() { return MaterialUnit; } diff --git a/src/main/resources/mapper_xml/DepotItemMapperEx.xml b/src/main/resources/mapper_xml/DepotItemMapperEx.xml index fe4aa2c8..d9d764d8 100644 --- a/src/main/resources/mapper_xml/DepotItemMapperEx.xml +++ b/src/main/resources/mapper_xml/DepotItemMapperEx.xml @@ -41,6 +41,9 @@ + + + @@ -50,9 +53,12 @@ + - + + + @@ -158,6 +164,7 @@