From cbba347579496d0bb198acef6f898cdc2ec2481b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Thu, 9 Jul 2020 23:45:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BA=93=E5=AD=98=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp_web/css/bill_detail.css | 3 ++ erp_web/js/pages/materials/bill_detail.js | 21 +++++++++- erp_web/pages/materials/bill_detail.html | 35 +++++++++++++++++ .../erp/controller/DepotItemController.java | 8 +++- .../DepotItemVo4DetailByTypeAndMId.java | 20 +++++++--- .../datasource/mappers/DepotItemMapperEx.java | 6 +++ .../service/depotItem/DepotItemService.java | 4 +- .../mapper_xml/DepotItemMapperEx.xml | 38 ++++++++++++++++--- 8 files changed, 121 insertions(+), 14 deletions(-) diff --git a/erp_web/css/bill_detail.css b/erp_web/css/bill_detail.css index e15da165..daf5c8b4 100644 --- a/erp_web/css/bill_detail.css +++ b/erp_web/css/bill_detail.css @@ -28,6 +28,9 @@ #bill .allocation_out{ display: none; } +#bill .stock_check_replay{ + display: none; +} #bill .gift_recharge{ display: none; } diff --git a/erp_web/js/pages/materials/bill_detail.js b/erp_web/js/pages/materials/bill_detail.js index 04343320..25732511 100644 --- a/erp_web/js/pages/materials/bill_detail.js +++ b/erp_web/js/pages/materials/bill_detail.js @@ -140,6 +140,21 @@ $("#bill .allocation_out").show(); tableString = $(".allocation_out").html(); } + else if(listSubType == "组装单") { + billType = "material"; + $("#bill .allocation_out").show(); + tableString = $(".allocation_out").html(); + } + else if(listSubType == "拆卸单") { + billType = "material"; + $("#bill .allocation_out").show(); + tableString = $(".allocation_out").html(); + } + else if(listSubType == "盘点复盘") { + billType = "material"; + $("#bill .stock_check_replay").show(); + tableString = $(".stock_check_replay").html(); + } else if(listSubType == "收入") { billType = "account"; payTypeTitle = "收入项目"; @@ -373,6 +388,9 @@ else if(listSubType == "调拨出库") { tableString = $(".allocation_out").html(); } + else if(listSubType == "盘点复盘") { + tableString = $(".stock_check_replay").html(); + } else if(listSubType == "收入") { tableString = $(".item_in").html(); } @@ -408,7 +426,8 @@ depotHeadName = "仓库名称"; } var isShowTaxColumn = false; //是否显示税率相关的列,true为隐藏,false为显示 - if(listSubType == "调拨出库" || listSubType == "其它出库" || listSubType == "其它入库" || listSubType == "零售出库" || listSubType == "零售退货入库"){ + if(listSubType == "调拨出库" || listSubType == "其它出库" || listSubType == "其它入库" || + listSubType == "零售出库" || listSubType == "零售退货入库" || listSubType == "盘点复盘"){ isShowTaxColumn = true; //隐藏 } var isShowMaterialTypeColumn = true; //是否显示商品类型相关的列,true为隐藏,false为显示 diff --git a/erp_web/pages/materials/bill_detail.html b/erp_web/pages/materials/bill_detail.html index 53f2bb21..1f367fc5 100644 --- a/erp_web/pages/materials/bill_detail.html +++ b/erp_web/pages/materials/bill_detail.html @@ -559,6 +559,41 @@ + +
+ + + + + + + + + + + + + + + + + + + +
单据日期: + + 单据编号: + + 关联订单: + +
+ +
+
单据备注: + +
+
diff --git a/src/main/java/com/jsh/erp/controller/DepotItemController.java b/src/main/java/com/jsh/erp/controller/DepotItemController.java index 116dc513..c814fd5a 100644 --- a/src/main/java/com/jsh/erp/controller/DepotItemController.java +++ b/src/main/java/com/jsh/erp/controller/DepotItemController.java @@ -73,7 +73,13 @@ public class DepotItemController { for (DepotItemVo4DetailByTypeAndMId d: list) { JSONObject item = new JSONObject(); item.put("Number", d.getNumber()); //商品编号 - item.put("Type", d.getNewtype()); //进出类型 + String type = d.getType(); + String subType = d.getSubType(); + if(("其它").equals(type)) { + item.put("Type", subType); //进出类型 + } else { + item.put("Type", subType + type); //进出类型 + } item.put("BasicNumber", d.getBnum()); //数量 item.put("OperTime", d.getOtime().getTime()); //时间 dataArray.add(item); diff --git a/src/main/java/com/jsh/erp/datasource/entities/DepotItemVo4DetailByTypeAndMId.java b/src/main/java/com/jsh/erp/datasource/entities/DepotItemVo4DetailByTypeAndMId.java index b05c3752..ec835eb4 100644 --- a/src/main/java/com/jsh/erp/datasource/entities/DepotItemVo4DetailByTypeAndMId.java +++ b/src/main/java/com/jsh/erp/datasource/entities/DepotItemVo4DetailByTypeAndMId.java @@ -7,7 +7,9 @@ public class DepotItemVo4DetailByTypeAndMId { private String number; - private String newtype; + private String type; + + private String subType; private BigDecimal bnum; @@ -21,12 +23,20 @@ public class DepotItemVo4DetailByTypeAndMId { this.number = number; } - public String getNewtype() { - return newtype; + public String getType() { + return type; } - public void setNewtype(String newtype) { - this.newtype = newtype; + public void setType(String type) { + this.type = type; + } + + public String getSubType() { + return subType; + } + + public void setSubType(String subType) { + this.subType = subType; } public BigDecimal getBnum() { diff --git a/src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java b/src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java index b7c11ae2..68a19f85 100644 --- a/src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java +++ b/src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java @@ -70,6 +70,12 @@ public interface DepotItemMapperEx { @Param("subType") String subType, @Param("MonthTime") String MonthTime); + BigDecimal getStockCheckSum( + @Param("depotId") Long depotId, + @Param("mId") Long mId, + @Param("beginTime") String beginTime, + @Param("endTime") String endTime); + DepotItemVo4Stock getStockByParam( @Param("depotId") Long depotId, @Param("mId") Long mId, diff --git a/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java b/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java index 64f0691c..e9bb6558 100644 --- a/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java +++ b/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java @@ -647,10 +647,12 @@ public class DepotItemService { public BigDecimal getStockByParam(Long depotId, Long mId, String beginTime, String endTime, Long tenantId){ //初始库存 BigDecimal initStock = materialService.getInitStockByMid(depotId, mId); + //盘点复盘后数量的变动 + BigDecimal stockCheckSum = depotItemMapperEx.getStockCheckSum(depotId, mId, beginTime, endTime); DepotItemVo4Stock stockObj = depotItemMapperEx.getStockByParam(depotId, mId, beginTime, endTime, tenantId); BigDecimal intNum = stockObj.getInNum(); BigDecimal outNum = stockObj.getOutNum(); - return initStock.add(intNum).subtract(outNum); + return initStock.add(intNum).subtract(outNum).add(stockCheckSum); } /** diff --git a/src/main/resources/mapper_xml/DepotItemMapperEx.xml b/src/main/resources/mapper_xml/DepotItemMapperEx.xml index b4c6a98c..f02e6d3f 100644 --- a/src/main/resources/mapper_xml/DepotItemMapperEx.xml +++ b/src/main/resources/mapper_xml/DepotItemMapperEx.xml @@ -4,8 +4,9 @@ - - + + + @@ -96,7 +97,7 @@ @@ -223,6 +228,27 @@ and ifnull(dh.delete_Flag,'0') !='1' + +