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;