From a635cc58823865b3b44692ec5d16be52efe889be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Mon, 14 Oct 2024 08:38:20 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=20=E6=96=B0=E5=A2=9E=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=8D=95=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E5=AD=90?= =?UTF-8?q?=E8=A1=A8=E5=B1=95=E7=BC=A9=E6=98=BE=E7=A4=BA=EF=BC=9B=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=A5=E5=BA=93=E5=8D=95controller?= =?UTF-8?q?=E6=8C=89=E5=85=A5=E5=BA=93=E5=8D=95=E5=8F=B7=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=AD=90=E8=A1=A8=E8=AF=A6=E6=83=85=E5=88=97=E8=A1=A8=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=9B=20=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E5=8D=95=20=E6=96=B0=E5=A2=9E=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E5=8D=95=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E5=AD=90?= =?UTF-8?q?=E8=A1=A8=E5=B1=95=E7=BC=A9=E6=98=BE=E7=A4=BA=EF=BC=9B=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=87=BA=E5=BA=93=E5=8D=95controller?= =?UTF-8?q?=E6=8C=89=E5=87=BA=E5=BA=93=E5=8D=95=E5=8F=B7=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=AD=90=E8=A1=A8=E8=AF=A6=E6=83=85=E5=88=97=E8=A1=A8=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WarehouseOutOrderController.java | 13 +++ .../WarehouseStorageOrderController.java | 13 +++ .../warehouse/storageOrder/storageOrder.html | 85 +++++++++++++++++- .../warehouseOutOrder/warehouseOutOrder.html | 89 ++++++++++++++++++- 4 files changed, 196 insertions(+), 4 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java index 567f38b4..58fc6565 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java @@ -446,4 +446,17 @@ public class WarehouseOutOrderController extends BaseController Map> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseOutOrderDetail::getSupplierCode)); return groupedDetails; } + + /** + * 查询入库单详情 + */ + @GetMapping("/sublist") + @ResponseBody + public TableDataInfo subList(@RequestParam("outOrderCode") String outOrderCode, ModelMap mmap) + { + WarehouseOutOrder tempOrder = new WarehouseOutOrder(); + tempOrder.setOutOrderCode(outOrderCode); + List list = outOrderDetailService.selectOutOrderDetailListByCode(tempOrder); + return getDataTable(list); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java index 8c1b6a7a..4a4191ba 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java @@ -5,6 +5,8 @@ import java.util.Map; import java.util.stream.Collectors; import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.system.domain.OutsourcePlan; +import com.ruoyi.system.domain.OutsourcePlanDetail; import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail; import com.ruoyi.warehouse.service.IWarehouseStorageOrderDetailService; import org.apache.shiro.authz.annotation.RequiresPermissions; @@ -666,4 +668,15 @@ public class WarehouseStorageOrderController extends BaseController Map> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); return groupedDetails; } + + /** + * 查询入库单详情 + */ + @GetMapping("/sublist") + @ResponseBody + public TableDataInfo subList(@RequestParam("warehouseStorageCode") String warehouseStorageCode, ModelMap mmap) + { + List list = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode); + return getDataTable(list); + } } diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html index bd0f2c61..72299ab3 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html @@ -65,7 +65,7 @@
-
+
@@ -99,6 +99,10 @@ var warehouseStorageTypeDatas = [[${@dict.getType('warehouse_storage_type')}]]; var warehouseOrderTypeDatas = [[${@dict.getType('storage_order_type')}]]; var warehouseDeptTypeDatas = [[${@dict.getType('warehouse_dept_type')}]]; + + var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; + var processMethodDatas = [[${@dict.getType('processMethod')}]]; + var prefix = ctx + "warehouse/storageOrder"; $(function() { @@ -110,6 +114,10 @@ fixedColumns:true, fixedRightNumber:1, modalName: "仓库入库单", + detailView: true, + onExpandRow : function(index, row, $detail) { + initChildTable(index, row, $detail); + }, columns: [{ checkbox: true }, @@ -171,12 +179,13 @@ field: 'actualArrivedNum', }, { - title: '暂收合格数', + title: '暂收数量', field: 'temporaryQualifiedNum', }, { title: '暂收不合格数', field: 'temporaryUnqualifiedNum', + visible: false, }, { title: '品质合格数', @@ -339,7 +348,77 @@ }; $.table.init(options); }); - + initChildTable = function(index, row, $detail) { + var childTable = $detail.html('
').find('table'); + $(childTable).bootstrapTable({ + url: prefix + "/sublist?warehouseStorageCode="+row.warehouseStorageCode, + method: 'get', + sidePagination: "server", + contentType: "application/x-www-form-urlencoded", + queryParams : { + // userName: '测试8' + }, + columns: [ + { + field : 'materialNo', + title : '料号', + align: 'center', + }, + { + field : 'materialPhotourl', + title : '图片', + align: 'center', + }, + { + field : 'materialName', + title : '物料名称' + }, + { + field : 'materialType', + title : '物料类型', + formatter: function (value, row, index) { + return $.table.selectCategoryLabel(materialTypeDatas, value); + } + }, + { + field : 'materialDescribe', + title : '描述' + }, + { + field : 'materialBrand', + title : '品牌' + }, + { + field : 'materialProcessMethod', + title : '加工方式', + formatter: function (value, row, index) { + return $.table.selectDictLabel(processMethodDatas, value); + } + }, + { + field : 'materialUnit', + title : '单位' + }, + { + field : 'notifyArriveNum', + title : '通知到货数量', + visible: false, + }, + { + field : 'actualArriveNum', + title : '实际到货数量' + }, + { + field : 'temporaryHasQualifiedNum', + title : '暂收数量' + }, + { + field : 'storageNum', + title : '入库数量' + }, + ] + }); + }; /*暂收-采购单(仓库入库)*/ function temporaryPurchaseWarehouse(warehouseStorageId){ var url = ctx + 'warehouse/storageOrder/temporaryPurchaseWarehouse/' + warehouseStorageId; diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html index fc3a1428..2e67e78b 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html @@ -84,6 +84,9 @@ var refundsExchangesOutWarehouseDetailFlag = [[${@permission.hasPermi('warehouse:warehouseOutOrder:refundsExchangesOutWarehouseDetail')}]]; var developModifyOutWarehouseDetailFlag = [[${@permission.hasPermi('warehouse:warehouseOutOrder:developModifyOutWarehouseDetail')}]]; + var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; + var processMethodDatas = [[${@dict.getType('processMethod')}]]; + var warehouseOutStatusDatas = [[${@dict.getType('warehouse_out_status')}]]; var warehouseOrderTypeDatas = [[${@dict.getType('warehouse_order_type')}]]; var warehouseOutTypeDatas = [[${@dict.getType('warehouse_out_type')}]]; @@ -99,6 +102,10 @@ restoreUrl: prefix + "/restore/{id}", exportUrl: prefix + "/export", modalName: "仓库出库单", + detailView: true, + onExpandRow : function(index, row, $detail) { + initChildTable(index, row, $detail); + }, columns: [{ checkbox: true }, @@ -254,7 +261,87 @@ }; $.table.init(options); }); - + initChildTable = function(index, row, $detail) { + var childTable = $detail.html('
').find('table'); + $(childTable).bootstrapTable({ + url: prefix + "/sublist?outOrderCode="+row.outOrderCode, + method: 'get', + sidePagination: "server", + contentType: "application/x-www-form-urlencoded", + queryParams : { + // userName: '测试8' + }, + columns: [ + { + field : 'materialNo', + title : '料号', + align: 'center', + }, + { + field : 'materialPhotourl', + title : '图片', + align: 'center', + }, + { + field : 'materialName', + title : '物料名称' + }, + { + field : 'materialType', + title : '物料类型', + formatter: function (value, row, index) { + return $.table.selectCategoryLabel(materialTypeDatas, value); + } + }, + { + field : 'materialDescribe', + title : '描述' + }, + { + field : 'materialBrand', + title : '品牌' + }, + { + field : 'materialProcessMethod', + title : '加工方式', + formatter: function (value, row, index) { + return $.table.selectDictLabel(processMethodDatas, value); + } + }, + { + field : 'materialUnit', + title : '单位' + }, + { + field : 'warehouseOutType', + title : '出库类型', + formatter: function(value, row, index) { + return $.table.selectDictLabel(warehouseOutTypeDatas, value); + } + }, + { + field : 'makeNum', + title : '订单数' + }, + { + field : 'applyOutOrderSum', + title : '申请出库数', + }, + { + field : 'outOrderSum', + title : '出库数' + }, + { + field : 'warehouseOutStatus', + title : '出库状态', + visible: false, + formatter: function(value, row, index) { + return $.table.selectDictLabel(warehouseOutStatusDatas, value); + } + }, + ] + }); + }; /*销售单-准备物料*/ function prepareMaterial(outOrderId){ var url = ctx + 'warehouse/warehouseOutOrder/prepareMaterial/' + outOrderId;