Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
王晓迪 3 months ago
parent
commit
0ac10cc04d
  1. 12
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryInquiryController.java
  2. 4
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryService.java
  3. 10
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryServiceImpl.java
  4. 45
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryHistory.html
  5. 30
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html

12
ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryInquiryController.java

@ -126,18 +126,18 @@ public class WarehouseInventoryInquiryController extends BaseController
} }
/** /**
* 修改仓库库存历 * 修改仓库库存
*/ */
@GetMapping("/inventoryHistory/{materialNo}") @GetMapping("/inventoryHistory/{inventoryInquiryId}")
public String inventoryHistory(@PathVariable("materialNo") String materialNo, ModelMap mmap) public String inventoryHistory(@PathVariable("inventoryInquiryId") Long inventoryInquiryId, ModelMap mmap)
{ {
WarehouseInventoryInquiry warehouseInventoryInquiry = warehouseInventoryInquiryService.selectWarehouseInventoryInquiryByMaterialNo(materialNo); WarehouseInventoryInquiry warehouseInventoryInquiry = warehouseInventoryInquiryService.selectWarehouseInventoryInquiryById(inventoryInquiryId);
mmap.put("warehouseInventoryInquiry", warehouseInventoryInquiry); mmap.put("warehouseInventoryInquiry", warehouseInventoryInquiry);
return prefix + "/inventoryHistory"; return prefix + "/inventoryHistory";
} }
/** /**
* 修改保存仓库库存历 * 修改保存仓库库存
*/ */
@RequiresPermissions("warehouse:inventoryInquiry:inventoryHistory") @RequiresPermissions("warehouse:inventoryInquiry:inventoryHistory")
@Log(title = "仓库库存查询", businessType = BusinessType.UPDATE) @Log(title = "仓库库存查询", businessType = BusinessType.UPDATE)
@ -145,7 +145,7 @@ public class WarehouseInventoryInquiryController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult inventoryHistorySave(WarehouseInventoryInquiry warehouseInventoryInquiry) public AjaxResult inventoryHistorySave(WarehouseInventoryInquiry warehouseInventoryInquiry)
{ {
return toAjax(warehouseInventoryInquiryService.updateWarehouseInventoryInquiry(warehouseInventoryInquiry)); return toAjax(warehouseInventoryInquiryService.updateWarehouseInventoryHistory(warehouseInventoryInquiry));
} }
/** /**

4
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryService.java

@ -108,4 +108,8 @@ public interface IWarehouseInventoryInquiryService {
Integer calculateFixedAvailableStockNum(String materialNo); Integer calculateFixedAvailableStockNum(String materialNo);
/**
* 修改保存库存履历
* */
int updateWarehouseInventoryHistory(WarehouseInventoryInquiry warehouseInventoryInquiry);
} }

10
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryServiceImpl.java

@ -295,4 +295,14 @@ public class WarehouseInventoryInquiryServiceImpl implements IWarehouseInventory
//【可用库存数】-【共享可用库存数】 //【可用库存数】-【共享可用库存数】
return null; return null;
} }
/**
* 修改保存库存履历
* */
@Override
public int updateWarehouseInventoryHistory(WarehouseInventoryInquiry warehouseInventoryInquiry) {
return 1;
}
} }

45
ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryHistory.html

@ -5,7 +5,7 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-inventoryHistory-edit" th:object="${warehouseInventoryInquiry}"> <form class="form-horizontal m" id="form-inventoryHistory-inventoryHistory" th:object="${warehouseInventoryInquiry}">
<input name="inventoryInquiryId" th:field="*{inventoryInquiryId}" type="hidden"> <input name="inventoryInquiryId" th:field="*{inventoryInquiryId}" type="hidden">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">料号:</label> <label class="col-sm-3 control-label">料号:</label>
@ -58,16 +58,19 @@
var prefix = ctx + "warehouse/inventoryInquiry"; var prefix = ctx + "warehouse/inventoryInquiry";
var warehouseInventoryInquiry = [[${warehouseInventoryInquiry}]]; var warehouseInventoryInquiry = [[${warehouseInventoryInquiry}]];
var inventoryHistoricalType = [[${@dict.getType('inventory_historical_type')}]];
var inventoryIncreaseDecrease = [[${@dict.getType('inventory_increase_decrease')}]]; var inventoryIncreaseDecrease = [[${@dict.getType('inventory_increase_decrease')}]];
var inquiryBusinessType = [[${@dict.getType('inquiry_business_type')}]];
var inquiryOrderType = [[${@dict.getType('inquiry_order_type')}]];
var inquiryWarehouseType = [[${@dict.getType('inquiry_warehouse_type')}]]
$("#form-inventoryHistory-edit").validate({ $("#form-inventoryHistory-inventoryHistory").validate({
focusCleanup: true focusCleanup: true
}); });
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-inventoryHistory-edit').serialize()); $.operate.save(prefix + "/inventoryHistory", $('#form-inventoryHistory-inventoryHistory').serialize());
} }
} }
@ -76,7 +79,7 @@
$(function() { $(function() {
var options = { var options = {
modalName: "选择物料", modalName: "选择物料",
url: ctx + "warehouse/inventoryInquiry/getMaterialInventoryHistoricalList", url: prefix + "/getMaterialInventoryHistoricalList",
queryParams: queryParams, queryParams: queryParams,
showSearch: false, showSearch: false,
showRefresh: false, showRefresh: false,
@ -88,25 +91,31 @@
{title: '库存查询详情id', field: 'inventoryInquiryDetailId', visible: false}, {title: '库存查询详情id', field: 'inventoryInquiryDetailId', visible: false},
{title: '物料号', field: 'materialNo', visible: false}, {title: '物料号', field: 'materialNo', visible: false},
{title: '时间', field: 'inventoryHistoricalTime',}, {title: '时间', field: 'inventoryHistoricalTime',},
{title: '类型', field: 'inventoryHistoricalType', {title: '库存增减', field: 'inventoryIncreaseDecrease',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(inventoryHistoricalType, value); return $.table.selectDictLabel(inventoryIncreaseDecrease, value);
} }
}, },
{title: '库存增减', field: 'inventoryIncreaseDecrease', {title: '单号', field: 'correlationCode'},
{title: '出货设备ID', field: 'shippingDeviceId'},
{title: '数量', field: 'increaseDecreaseNum'},
{title: '业务类型', field: 'inquiryBusinessType',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(inventoryIncreaseDecrease, value); return $.table.selectDictLabel(inquiryBusinessType, value);
} }
}, },
{title: '数量', field: 'availableStockNum'}, {title: '订单类型', field: 'inquiryOrderType',
{title: '库存历史数量', field: 'inventoryHistoricalNum',visible: false}, formatter: function(value, row, index) {
{title: '不含税采购总价', field: 'purchasePriceExcludingTax',}, return $.table.selectDictLabel(inquiryOrderType, value);
{title: '含税总价', field: 'purchasePriceIncludesTax',}, }
{title: '采购单号', field: 'purchaseOrderCode',}, },
{title: '供应商ID', field: 'supplierCode',}, {title: '出入库类型', field: 'inquiryWarehouseType',
{title: '供应商名称', field: 'supplierName',}, formatter: function(value, row, index) {
{title: '库存归属单号', field: 'inventoryAttributionCode',}, return $.table.selectDictLabel(inquiryWarehouseType, value);
{title: '库存使用单号', field: 'inventoryUseCode',}, }
},
] ]
}; };
$.table.init(options); $.table.init(options);

30
ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html

@ -34,10 +34,7 @@
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group"> <div class="btn-group-sm" id="toolbar" role="group">
<a id="addRefundsButton" class="btn btn-success" onclick="add()" shiro:hasPermission="quality:refundsExchanges:add"> <a class="btn btn-success" onclick="exportExcel()" shiro:hasPermission="warehouse:inventoryInquiry:export">
<i class="fa fa-plus"></i> 库存历史
</a>
<a class="btn btn-warning" onclick="exportExcel()" shiro:hasPermission="warehouse:inventoryInquiry:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>
</div> </div>
@ -49,8 +46,8 @@
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('warehouse:inventoryInquiry:edit')}]]; var editFlag = [[${@permission.hasPermi('warehouse:inventoryInquiry:edit')}]];
var editAvailableStockFlag = [[${@permission.hasPermi('warehouse:inventoryInquiry:editAvailableStock')}]];
var editAvailableStockFlag = [[${@permission.hasPermi('warehouse:inventoryInquiry:editAvailableStockFlag')}]]; var inventoryHistoryFlag = [[${@permission.hasPermi('warehouse:inventoryInquiry:inventoryHistory')}]];
var materialUseStatusDatas = [[${@dict.getType('useStatus')}]]; var materialUseStatusDatas = [[${@dict.getType('useStatus')}]];
@ -136,6 +133,8 @@
//生产加工和生产装配的不支持转化 //生产加工和生产装配的不支持转化
actions.push('<a class=" ' + editAvailableStockFlag + '" href="javascript:void(0)" onclick="editAvailableStock(\'' + row.inventoryInquiryId + '\')"><i class="fa fa-edit"></i>修改可用库存</a> '); actions.push('<a class=" ' + editAvailableStockFlag + '" href="javascript:void(0)" onclick="editAvailableStock(\'' + row.inventoryInquiryId + '\')"><i class="fa fa-edit"></i>修改可用库存</a> ');
} }
actions.push('<a class=" ' + inventoryHistoryFlag + '" href="javascript:void(0)" onclick="inventoryHistory(\'' + row.inventoryInquiryId + '\')"><i class="fa fa-edit"></i>库存履历</a> ');
var actionLinks = actions.join(''); var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks); return $.table.dropdownToggle(actionLinks);
} }
@ -145,18 +144,6 @@
$.table.init(options); $.table.init(options);
}); });
/*查看库存历史*/
function add() {
var rows = $("#bootstrap-table").bootstrapTable('getSelections');
console.log("rows" + rows);
if (rows.length == 1){
var url = ctx + 'warehouse/inventoryInquiry/inventoryHistory/' +rows[0].materialNo;
$.modal.open("库存历史",url);
}else{
$.modal.msgWarning("只能查看一种物料的库存历史!")
}
};
// 导出 // 导出
function exportExcel() { function exportExcel() {
var ids = $.table.selectColumns("materialNo"); var ids = $.table.selectColumns("materialNo");
@ -186,6 +173,13 @@
var url = prefix + "/editAvailableStock/" + inventoryInquiryId; var url = prefix + "/editAvailableStock/" + inventoryInquiryId;
$.modal.open("修改可用库存", url); $.modal.open("修改可用库存", url);
} }
//库存履历
function inventoryHistory(inventoryInquiryId) {
var url = prefix + "/inventoryHistory/" + inventoryInquiryId;
$.modal.open("库存履历", url);
}
</script> </script>
</body> </body>
</html> </html>
Loading…
Cancel
Save