Browse Source

[fix]

仓库管理 入库单
新增入库单列表页面子表展缩显示;
新增入库单controller按入库单号查询子表详情列表方法;
仓库管理 出库单
新增出库单列表页面子表展缩显示;
新增出库单controller按出库单号查询子表详情列表方法;
dev
王晓迪 1 month ago
parent
commit
a635cc5882
  1. 13
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java
  2. 13
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java
  3. 85
      ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html
  4. 89
      ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html

13
ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java

@ -446,4 +446,17 @@ public class WarehouseOutOrderController extends BaseController
Map<String, List<WarehouseOutOrderDetail>> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseOutOrderDetail::getSupplierCode)); Map<String, List<WarehouseOutOrderDetail>> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseOutOrderDetail::getSupplierCode));
return groupedDetails; return groupedDetails;
} }
/**
* 查询入库单详情
*/
@GetMapping("/sublist")
@ResponseBody
public TableDataInfo subList(@RequestParam("outOrderCode") String outOrderCode, ModelMap mmap)
{
WarehouseOutOrder tempOrder = new WarehouseOutOrder();
tempOrder.setOutOrderCode(outOrderCode);
List<WarehouseOutOrderDetail> list = outOrderDetailService.selectOutOrderDetailListByCode(tempOrder);
return getDataTable(list);
}
} }

13
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 java.util.stream.Collectors;
import com.ruoyi.common.utils.StringUtils; 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.domain.WarehouseStorageOrderDetail;
import com.ruoyi.warehouse.service.IWarehouseStorageOrderDetailService; import com.ruoyi.warehouse.service.IWarehouseStorageOrderDetailService;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -666,4 +668,15 @@ public class WarehouseStorageOrderController extends BaseController
Map<String, List<WarehouseStorageOrderDetail>> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); Map<String, List<WarehouseStorageOrderDetail>> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode));
return groupedDetails; return groupedDetails;
} }
/**
* 查询入库单详情
*/
@GetMapping("/sublist")
@ResponseBody
public TableDataInfo subList(@RequestParam("warehouseStorageCode") String warehouseStorageCode, ModelMap mmap)
{
List<WarehouseStorageOrderDetail> list = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode);
return getDataTable(list);
}
} }

85
ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html

@ -65,7 +65,7 @@
</a> </a>
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space:nowrap"></table> <table id="bootstrap-table"></table>
</div> </div>
</div> </div>
</div> </div>
@ -99,6 +99,10 @@
var warehouseStorageTypeDatas = [[${@dict.getType('warehouse_storage_type')}]]; var warehouseStorageTypeDatas = [[${@dict.getType('warehouse_storage_type')}]];
var warehouseOrderTypeDatas = [[${@dict.getType('storage_order_type')}]]; var warehouseOrderTypeDatas = [[${@dict.getType('storage_order_type')}]];
var warehouseDeptTypeDatas = [[${@dict.getType('warehouse_dept_type')}]]; var warehouseDeptTypeDatas = [[${@dict.getType('warehouse_dept_type')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var prefix = ctx + "warehouse/storageOrder"; var prefix = ctx + "warehouse/storageOrder";
$(function() { $(function() {
@ -110,6 +114,10 @@
fixedColumns:true, fixedColumns:true,
fixedRightNumber:1, fixedRightNumber:1,
modalName: "仓库入库单", modalName: "仓库入库单",
detailView: true,
onExpandRow : function(index, row, $detail) {
initChildTable(index, row, $detail);
},
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
@ -171,12 +179,13 @@
field: 'actualArrivedNum', field: 'actualArrivedNum',
}, },
{ {
title: '暂收合格数', title: '暂收数',
field: 'temporaryQualifiedNum', field: 'temporaryQualifiedNum',
}, },
{ {
title: '暂收不合格数', title: '暂收不合格数',
field: 'temporaryUnqualifiedNum', field: 'temporaryUnqualifiedNum',
visible: false,
}, },
{ {
title: '品质合格数', title: '品质合格数',
@ -339,7 +348,77 @@
}; };
$.table.init(options); $.table.init(options);
}); });
initChildTable = function(index, row, $detail) {
var childTable = $detail.html('<table style="table-layout:fixed"></table>').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){ function temporaryPurchaseWarehouse(warehouseStorageId){
var url = ctx + 'warehouse/storageOrder/temporaryPurchaseWarehouse/' + warehouseStorageId; var url = ctx + 'warehouse/storageOrder/temporaryPurchaseWarehouse/' + warehouseStorageId;

89
ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html

@ -84,6 +84,9 @@
var refundsExchangesOutWarehouseDetailFlag = [[${@permission.hasPermi('warehouse:warehouseOutOrder:refundsExchangesOutWarehouseDetail')}]]; var refundsExchangesOutWarehouseDetailFlag = [[${@permission.hasPermi('warehouse:warehouseOutOrder:refundsExchangesOutWarehouseDetail')}]];
var developModifyOutWarehouseDetailFlag = [[${@permission.hasPermi('warehouse:warehouseOutOrder:developModifyOutWarehouseDetail')}]]; 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 warehouseOutStatusDatas = [[${@dict.getType('warehouse_out_status')}]];
var warehouseOrderTypeDatas = [[${@dict.getType('warehouse_order_type')}]]; var warehouseOrderTypeDatas = [[${@dict.getType('warehouse_order_type')}]];
var warehouseOutTypeDatas = [[${@dict.getType('warehouse_out_type')}]]; var warehouseOutTypeDatas = [[${@dict.getType('warehouse_out_type')}]];
@ -99,6 +102,10 @@
restoreUrl: prefix + "/restore/{id}", restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
modalName: "仓库出库单", modalName: "仓库出库单",
detailView: true,
onExpandRow : function(index, row, $detail) {
initChildTable(index, row, $detail);
},
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
@ -254,7 +261,87 @@
}; };
$.table.init(options); $.table.init(options);
}); });
initChildTable = function(index, row, $detail) {
var childTable = $detail.html('<table style="table-layout:fixed"></table>').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){ function prepareMaterial(outOrderId){
var url = ctx + 'warehouse/warehouseOutOrder/prepareMaterial/' + outOrderId; var url = ctx + 'warehouse/warehouseOutOrder/prepareMaterial/' + outOrderId;

Loading…
Cancel
Save