From 6a18a33ee778515edc55bf3cf91137ca0d57e520 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Thu, 21 Nov 2024 11:27:58 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E9=87=87=E8=B4=AD=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B7=BB=E5=8A=A0=E9=87=87=E8=B4=AD=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=8D=95=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E7=89=A9=E6=96=99=E7=B1=BB=E5=9E=8B=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=80=BC=E7=9A=84=E9=97=AE=E9=A2=98=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93=E5=8D=95=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=96=B0=E5=A2=9E=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=92=8C=E6=96=B9=E6=B3=95=20=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E5=85=A5=E5=BA=93=E5=8D=95=E5=AD=90=E8=A1=A8=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20=E9=80=9A=E8=BF=87=E9=87=87=E8=B4=AD=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=8D=95=E5=8F=B7=E6=9F=A5=E8=AF=A2=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E5=AD=90=E8=A1=A8=E6=96=B9=E6=B3=95?= =?UTF-8?q?=20=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93=E5=8D=95=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20=E4=BF=9D=E5=AD=98=E9=87=87=E8=B4=AD=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=8D=95=E8=AF=A6=E6=83=85=E6=96=B9=E6=B3=95=20?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93=E5=8D=95=E5=AD=90=E8=A1=A8?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E6=A0=B9=E6=8D=AE=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E5=8F=B7=E6=9F=A5=E8=AF=A2=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E5=85=A5=E5=BA=93=E5=8D=95=E5=AD=90=E8=A1=A8=E6=96=B9?= =?UTF-8?q?=E6=B3=95=20=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93=E5=8D=95Contro?= =?UTF-8?q?ller1=E6=96=B0=E5=A2=9E=20=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E5=8D=95=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3=E3=80=82=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E4=BF=AE=E6=94=B9=E4=BF=9D=E5=AD=98=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E8=AF=A6=E6=83=85=E7=89=A9=E6=96=99?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PurchaseStorageController.java | 47 +++ .../mapper/PurchaseStorageChildMapper.java | 5 + .../service/IPurchaseStorageChildService.java | 5 + .../service/IPurchaseStorageService.java | 6 + .../impl/PurchaseStorageChildServiceImpl.java | 11 + .../impl/PurchaseStorageServiceImpl.java | 12 + .../purchase/PurchaseStorageChildMapper.xml | 7 +- .../purchaseOrder/addPurchaseStorage.html | 2 +- .../purchase/purchaseStorage/detail.html | 302 ++++++------------ .../purchaseStorage/purchaseStorage.html | 8 +- 10 files changed, 189 insertions(+), 216 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java index d4a20160..7f4de215 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java @@ -1,6 +1,9 @@ package com.ruoyi.purchase.controller; import java.util.List; + +import com.ruoyi.purchase.domain.PurchaseStorageChild; +import com.ruoyi.purchase.service.IPurchaseStorageChildService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -34,6 +37,10 @@ public class PurchaseStorageController extends BaseController @Autowired private IPurchaseStorageService purchaseStorageService; + @Autowired + private IPurchaseStorageChildService purchaseStorageChildService; + + @RequiresPermissions("purchase:purchaseStorage:view") @GetMapping() public String purchaseStorage() @@ -112,6 +119,46 @@ public class PurchaseStorageController extends BaseController return toAjax(purchaseStorageService.updatePurchaseStorage(purchaseStorage)); } + + /** + * 采购入库单详情 + * + * */ + @GetMapping("/detail/{purchaseStorageId}") + public String detail(@PathVariable("purchaseStorageId") Long purchaseStorageId, ModelMap mmap) + { + PurchaseStorage purchaseStorage = purchaseStorageService.selectPurchaseStorageById(purchaseStorageId); + mmap.put("purchaseStorage", purchaseStorage); + return prefix + "/detail"; + } + + /** + * 修改保存采购入库单详情 + */ + @Log(title = "采购入库单", businessType = BusinessType.UPDATE) + @PostMapping("/detail") + @ResponseBody + public AjaxResult detailSave(PurchaseStorage purchaseStorage) + { + return toAjax(purchaseStorageService.detailPurchaseStorage(purchaseStorage)); + } + + + /** + * 查询采购入库单详情物料信息 + */ + @PostMapping("/selectStorageChildMaterialList") + @ResponseBody + public TableDataInfo selectStorageChildMaterialList(PurchaseStorage purchaseStorage) + { + startPage(); + + String warehouseStorageCode = purchaseStorage.getWarehouseStorageCode(); + List list = purchaseStorageChildService.selectPurchaseStorageChildListByCode(warehouseStorageCode); + return getDataTable(list); + } + + /** * 删除采购入库单 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseStorageChildMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseStorageChildMapper.java index 346edf6b..f0163dc3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseStorageChildMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseStorageChildMapper.java @@ -79,4 +79,9 @@ public interface PurchaseStorageChildMapper * 批量新增采购入库单子表 * */ int insertBatchPurchaseStorageChild(List purchaseStorageChildren); + + /** + * 根据采购入库单号查询采购入库单子表 + * */ + List selectPurchaseStorageChildListByCode(String warehouseStorageCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageChildService.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageChildService.java index 8bd07eac..f8e61e34 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageChildService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageChildService.java @@ -72,4 +72,9 @@ public interface IPurchaseStorageChildService * @return */ int restorePurchaseStorageChildById(Long purchaseStorageChildId); + + /** + * 通过采购入库单号查询采购入库单子表 + * */ + List selectPurchaseStorageChildListByCode(String warehouseStorageCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageService.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageService.java index 22dc2dd7..0ecd03b7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageService.java @@ -72,4 +72,10 @@ public interface IPurchaseStorageService * @return */ int restorePurchaseStorageById(Long purchaseStorageId); + + /** + * 保存采购入库单详情 + * + * */ + int detailPurchaseStorage(PurchaseStorage purchaseStorage); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageChildServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageChildServiceImpl.java index 330f3673..b00d5d7f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageChildServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageChildServiceImpl.java @@ -46,6 +46,17 @@ public class PurchaseStorageChildServiceImpl implements IPurchaseStorageChildSer return purchaseStorageChildMapper.selectPurchaseStorageChildList(purchaseStorageChild); } + /** + * 根据采购入库单号查询采购入库单子表列表 + * + * @param warehouseStorageCode 采购入库单号 + * @return 采购入库单子表 + */ + @Override + public List selectPurchaseStorageChildListByCode(String warehouseStorageCode) { + return purchaseStorageChildMapper.selectPurchaseStorageChildListByCode(warehouseStorageCode); + } + /** * 新增采购入库单子表 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java index e20cbef3..edb384cd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java @@ -76,6 +76,18 @@ public class PurchaseStorageServiceImpl implements IPurchaseStorageService return purchaseStorageMapper.updatePurchaseStorage(purchaseStorage); } + + /** + * 详情采购入库单 + * + * @param purchaseStorage 采购入库单 + * @return 结果 + */ + @Override + public int detailPurchaseStorage(PurchaseStorage purchaseStorage) { + return 1; + } + /** * 删除采购入库单对象 * diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageChildMapper.xml index b300c968..d767ecce 100644 --- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageChildMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageChildMapper.xml @@ -59,7 +59,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where purchase_storage_child_id = #{purchaseStorageChildId} - + + + insert into purchase_storage_child diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html index 73e092f4..bddec91a 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html @@ -176,7 +176,7 @@ title: '物料类型', field: 'materialType', formatter: function (value,row, index) { - $.table.selectCategoryLabel(materialTypeDatas, value) + return $.table.selectCategoryLabel(materialTypeDatas, value) } }, { diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/detail.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/detail.html index 8ecfe64a..b07de413 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/detail.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/detail.html @@ -3,194 +3,115 @@ -
-
- + + +
+ +
+ +
+
- +
- +
- +
- +
+ +
- +
- +
-
- -
-
- -
+ + + + + +
+
+
+
- +
+
- diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html index f7a34c29..1131ddcd 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html @@ -263,7 +263,7 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); + actions.push('详情 '); var actionLinks = actions.join(''); return $.table.dropdownToggle(actionLinks); } @@ -271,6 +271,12 @@ }; $.table.init(options); }); + + //详情 + function detail(purchaseStorageId) { + var url = prefix + "/detail/" + purchaseStorageId; + $.modal.open("详情", url); + } \ No newline at end of file