refactor(inventory): 重构库存管理功能
- 移除生成出库单页面,改为查看出库单详情页面 - 优化订单执行跟踪页面展示 - 新增出库单详情接口和页面 - 修改入库单删除逻辑,增加关联检查 - 优化发货管理页面展示dev_1.0.0
parent
258ee495b1
commit
12f24d97e7
|
|
@ -15,7 +15,20 @@
|
||||||
font-family: "微软雅黑", Arial, sans-serif; /* 统一字体 */
|
font-family: "微软雅黑", Arial, sans-serif; /* 统一字体 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: "微软雅黑", Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.required-delivery-time {
|
.required-delivery-time {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
|
@ -32,57 +45,32 @@
|
||||||
</div>
|
</div>
|
||||||
<form class="form-horizontal m" id="form-delivery-edit" th:object="${inventoryDelivery}">
|
<form class="form-horizontal m" id="form-delivery-edit" th:object="${inventoryDelivery}">
|
||||||
<input name="id" th:field="*{id}" type="hidden">
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
<div class="col-xs-4">
|
<table>
|
||||||
<div class="form-group">
|
<tr>
|
||||||
<label class="col-sm-4 control-label">物流单号:</label>
|
<td>物流单号:</td>
|
||||||
<div class="col-sm-8">
|
<td> <input name="logisticsCode" th:field="*{logisticsCode}" class="form-control" type="text" readonly></td>
|
||||||
<input name="logisticsCode" th:field="*{logisticsCode}" class="form-control" type="text" readonly>
|
<td>发货方式:</td>
|
||||||
</div>
|
<td> <select name="deliveryType" id="deliveryType" class="form-control" disabled
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-4">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-4 control-label">发货方式:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<select name="deliveryType" id="deliveryType" class="form-control" disabled
|
|
||||||
th:with="type=${@dict.getType('delivery_type')}"
|
th:with="type=${@dict.getType('delivery_type')}"
|
||||||
required>
|
required>
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
th:value="${dict.dictValue}" th:field="*{deliveryType}"></option>
|
th:value="${dict.dictValue}" th:field="*{deliveryType}"></option>
|
||||||
</select>
|
</select></td>
|
||||||
</div>
|
<td>物流公司:</td>
|
||||||
</div>
|
<td> <select name="logisticsCompany" id="logisticsCompany" class="form-control" disabled
|
||||||
</div>
|
|
||||||
<div class="col-xs-4">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-4 control-label">物流公司:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<select name="logisticsCompany" id="logisticsCompany" class="form-control" disabled
|
|
||||||
th:with="type=${@dict.getType('logistics_company')}">
|
th:with="type=${@dict.getType('logistics_company')}">
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:field="*{logisticsCompany}"
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:field="*{logisticsCompany}"
|
||||||
th:value="${dict.dictValue}"></option>
|
th:value="${dict.dictValue}"></option>
|
||||||
</select>
|
</select></td>
|
||||||
</div>
|
</tr>
|
||||||
</div>
|
<tr>
|
||||||
</div>
|
<td>发货人:</td>
|
||||||
<div class="col-xs-4">
|
<td> <input name="createByName" th:field="*{createByName}" class="form-control" type="text" readonly></td>
|
||||||
<div class="form-group">
|
<td>发货时间:</td>
|
||||||
<label class="col-sm-4 control-label ">发货人:</label>
|
<td colspan="3"> <input name="deliveryTime" disabled th:value="${#dates.format(inventoryDelivery.deliveryTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"></td>
|
||||||
<div class="col-sm-8">
|
</tr>
|
||||||
<input name="createByName" th:field="*{createByName}" class="form-control" type="text" readonly>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-8">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-4 control-label">发货时间:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<div class="input-group">
|
|
||||||
<input name="deliveryTime" disabled th:value="${#dates.format(inventoryDelivery.deliveryTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
<form id="query-product-sn">
|
<form id="query-product-sn">
|
||||||
<input type="hidden" name="inventoryStatus" value="1">
|
<input type="hidden" name="inventoryStatus" value="1">
|
||||||
|
|
|
||||||
|
|
@ -359,6 +359,7 @@
|
||||||
</div>
|
</div>
|
||||||
<form class="form-horizontal m" id="generateOuterForm">
|
<form class="form-horizontal m" id="generateOuterForm">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
<input type="hidden" name="orderCode" th:value="${projectOrderInfo.orderCode}">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>出库单号:</td>
|
<td>出库单号:</td>
|
||||||
|
|
@ -765,7 +766,8 @@ function initWarehouseTable(data) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
actions.push('<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="viewOuter(' + row.id + ')">查看详情</a>');
|
// actions.push('<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="viewOuter(' + row.id + ')">查看详情</a>');
|
||||||
|
actions.push(`<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="$.modal.popupRight( '订单执行跟踪详情', outerPrefix+'/view/${row.id}');">查看详情</a>`);
|
||||||
}
|
}
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}
|
}
|
||||||
|
|
@ -844,6 +846,7 @@ function initWarehouseTable(data) {
|
||||||
$.modal.msgError(res.msg)
|
$.modal.msgError(res.msg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
parent.$('.layui-layer-setwin').css('display', 'none')
|
||||||
//设置对应值
|
//设置对应值
|
||||||
$('#outerCode').val(res.data.outerCode)
|
$('#outerCode').val(res.data.outerCode)
|
||||||
$('#outerTime').val(res.data.createTime)
|
$('#outerTime').val(res.data.createTime)
|
||||||
|
|
@ -877,7 +880,7 @@ function initWarehouseTable(data) {
|
||||||
btn: ['关闭'],
|
btn: ['关闭'],
|
||||||
end: function () {
|
end: function () {
|
||||||
parent.$('.layui-layer-btn').css('display', '')
|
parent.$('.layui-layer-btn').css('display', '')
|
||||||
|
parent.$('.layui-layer-setwin').css('display', '')
|
||||||
// layer.msg('关闭后的回调', {icon:6});
|
// layer.msg('关闭后的回调', {icon:6});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,101 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
|
||||||
<head>
|
|
||||||
<th:block th:include="include :: header('生成出库单')" />
|
|
||||||
<th:block th:include="include :: datetimepicker-css" />
|
|
||||||
</head>
|
|
||||||
<body class="white-bg">
|
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
|
||||||
<form class="form-horizontal m" id="form-outer-edit" th:object="${inventoryOuter}">
|
|
||||||
<input name="id" th:field="*{id}" type="hidden">
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">出库单号:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input name="outerCode" th:field="*{outerCode}" class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">产品BOM编码:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input name="productCode" th:field="*{productCode}" class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">数量:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input name="quantity" th:field="*{quantity}" class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">订单编码:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input name="orderCode" th:field="*{orderCode}" class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">联系人:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input name="contactPerson" th:field="*{contactPerson}" class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">联系电话:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input name="contactPhone" th:field="*{contactPhone}" class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">联系地址:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input name="contactAddress" th:field="*{contactAddress}" class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">发货时间:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<div class="input-group date">
|
|
||||||
<input name="deliveryTime" th:value="${#dates.format(inventoryOuter.deliveryTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<th:block th:include="include :: footer" />
|
|
||||||
<th:block th:include="include :: datetimepicker-js" />
|
|
||||||
<script th:inline="javascript">
|
|
||||||
var prefix = ctx + "inventory/outer";
|
|
||||||
$("#form-outer-edit").validate({
|
|
||||||
focusCleanup: true
|
|
||||||
});
|
|
||||||
|
|
||||||
function submitHandler() {
|
|
||||||
if ($.validate.form()) {
|
|
||||||
$.operate.save(prefix + "/edit", $('#form-outer-edit').serialize());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$("input[name='deliveryTime']").datetimepicker({
|
|
||||||
format: "yyyy-mm-dd",
|
|
||||||
minView: "month",
|
|
||||||
autoclose: true
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -225,7 +225,7 @@
|
||||||
updateUrl: executionPrefix + "/edit/{id}",
|
updateUrl: executionPrefix + "/edit/{id}",
|
||||||
removeUrl: prefix + "/remove",
|
removeUrl: prefix + "/remove",
|
||||||
exportUrl: prefix + "/export",
|
exportUrl: prefix + "/export",
|
||||||
modalName: "订单管理",
|
modalName: "订单执行跟踪",
|
||||||
sortName:'outerStatus',
|
sortName:'outerStatus',
|
||||||
sortOrder: 'asc',
|
sortOrder: 'asc',
|
||||||
fixedColumns: true,
|
fixedColumns: true,
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="viewFull(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="viewFull(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
|
||||||
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
updateUrl: prefix + "/edit/{id}",
|
updateUrl: prefix + "/edit/{id}",
|
||||||
removeUrl: prefix + "/remove",
|
removeUrl: prefix + "/remove",
|
||||||
exportUrl: prefix + "/export",
|
exportUrl: prefix + "/export",
|
||||||
modalName: "出库单",
|
modalName: "发货管理",
|
||||||
columns: [{
|
columns: [{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,167 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('生成出库单')"/>
|
||||||
|
<th:block th:include="include :: datetimepicker-css"/>
|
||||||
|
</head>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: "微软雅黑", Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 30px;
|
||||||
|
padding: 10px 0;
|
||||||
|
color: black;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline; /* 垂直居中 */
|
||||||
|
font-family: "微软雅黑", Arial, sans-serif; /* 统一字体 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-left {
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#generateOuter label {
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<div class="col-xs-12 section-title" style="display: flex;justify-content: center">
|
||||||
|
<span>出库详情</span>
|
||||||
|
</div>
|
||||||
|
<form class="form-horizontal m" id="generateOuterForm" th:object="${inventoryOuter}">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>出库单号:</td>
|
||||||
|
<td><input placeholder="自动生成" id="outerCode" th:field="*{outerCode}" class="form-control"
|
||||||
|
type="text" readonly></td>
|
||||||
|
<td>出库时间:</td>
|
||||||
|
<td colspan="3"><input placeholder="自动生成" id="outerTime"
|
||||||
|
th:value="*{#dates.format(createTime, 'yyyy-MM-dd')}" class="form-control"
|
||||||
|
type="text"
|
||||||
|
readonly></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>产品编码</td>
|
||||||
|
<td><input id="outer-productCode" name="productCode" th:field="*{productCode}" class="form-control"
|
||||||
|
type="text" readonly></td>
|
||||||
|
<td>产品型号:</td>
|
||||||
|
<td><input id="outer-model" th:field="*{model}" class="form-control" type="text" readonly></td>
|
||||||
|
<td>制造商:</td>
|
||||||
|
<td><input id="outer-vendorName" th:field="*{vendorName}" class="form-control" type="text" readonly>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 section-title">
|
||||||
|
<span>仓库信息</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<table id="warehouse-table"></table>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12" id="out-quantity-column">
|
||||||
|
<label class="col-sm-3 control-label text-left">应出库(台):</label>
|
||||||
|
<label class="col-sm-9 control-label text-left " id="out-quantity"
|
||||||
|
th:text="${allQuantity}"
|
||||||
|
>80</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12" id="generated-quantity-column">
|
||||||
|
<label class="col-sm-3 control-label text-left">已提交出库(台):</label>
|
||||||
|
<label class="col-sm-9 control-label text-left" id="out-generatedQuantity"
|
||||||
|
th:text="${commitQuantity}"
|
||||||
|
>80</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label class="col-sm-3 control-label text-left" style="font-weight: bold;">本次提交出库(台):</label>
|
||||||
|
<label class="col-sm-9 control-label text-left" style="font-weight: bold;"
|
||||||
|
id="out-current-quantity" th:text="*{quantity}">80</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label class="col-sm-3 control-label text-left">收货地址:</label>
|
||||||
|
<label class="col-sm-9 control-label text-left"
|
||||||
|
th:text="*{contactAddress}"></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label class="col-sm-3 control-label text-left">联系人:</label>
|
||||||
|
<label class="col-sm-9 control-label text-left"
|
||||||
|
th:text="*{contactPerson}"></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label class="col-sm-3 control-label text-left">联系电话:</label>
|
||||||
|
<label class="col-sm-9 control-label text-left"
|
||||||
|
th:text="*{contactPhone}"></label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label class="col-sm-3 control-label text-left">要求发货时间:</label>
|
||||||
|
<label class="col-sm-9 control-label text-left"
|
||||||
|
th:text="${(inventoryOuter.deliveryTimeType=='0'?'(立即发货)':'(自定义)')+(#dates.format(inventoryOuter.deliveryTime, 'yyyy-MM-dd'))}"></label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer"/>
|
||||||
|
<th:block th:include="include :: datetimepicker-js"/>
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "inventory/outer";
|
||||||
|
$("#form-outer-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
initWarehouseTable()
|
||||||
|
})
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-outer-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='deliveryTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function initWarehouseTable(data) {
|
||||||
|
var options = {
|
||||||
|
id: 'warehouse-table',
|
||||||
|
data: data || [[${inventoryOuter.detailList}]],
|
||||||
|
pagination: false,
|
||||||
|
showSearch: false,
|
||||||
|
showRefresh: false,
|
||||||
|
showToggle: false,
|
||||||
|
showColumns: false,
|
||||||
|
columns: [
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'warehouseName',
|
||||||
|
title: '仓库'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'quantity',
|
||||||
|
title: '本次提交出库'
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -15,7 +15,9 @@ import com.ruoyi.sip.domain.ProjectOrderFileLog;
|
||||||
import com.ruoyi.sip.dto.inventory.InventoryInfoExcelDto;
|
import com.ruoyi.sip.dto.inventory.InventoryInfoExcelDto;
|
||||||
import com.ruoyi.sip.service.IInventoryAuthService;
|
import com.ruoyi.sip.service.IInventoryAuthService;
|
||||||
import com.ruoyi.sip.service.IOmsInventoryInnerService;
|
import com.ruoyi.sip.service.IOmsInventoryInnerService;
|
||||||
|
import com.ruoyi.sip.vo.ExecutionOrderVo;
|
||||||
import com.ruoyi.sip.vo.OuterDeliveryVo;
|
import com.ruoyi.sip.vo.OuterDeliveryVo;
|
||||||
|
import com.ruoyi.sip.vo.OuterViewVo;
|
||||||
import liquibase.pro.packaged.A;
|
import liquibase.pro.packaged.A;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -129,7 +131,19 @@ public class InventoryOuterController extends BaseController
|
||||||
mmap.put("deliveryList", vo.getDeliveryList());
|
mmap.put("deliveryList", vo.getDeliveryList());
|
||||||
return prefix + "/edit";
|
return prefix + "/edit";
|
||||||
}
|
}
|
||||||
|
@GetMapping("/view/{id}")
|
||||||
|
public String view(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
|
||||||
|
OuterViewVo outerViewVo = inventoryOuterService.viewVo(id);
|
||||||
|
mmap.put("inventoryOuter", outerViewVo.getInventoryOuter());
|
||||||
|
mmap.put("allQuantity", outerViewVo.getAllQuantity());
|
||||||
|
mmap.put("commitQuantity", outerViewVo.getCommitQuantity());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return prefix + "/viewOuter";
|
||||||
|
}
|
||||||
@GetMapping("/queryInfo/{id}")
|
@GetMapping("/queryInfo/{id}")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult queryInfo(@PathVariable("id") Long id)
|
public AjaxResult queryInfo(@PathVariable("id") Long id)
|
||||||
|
|
|
||||||
|
|
@ -68,4 +68,6 @@ public interface InventoryInfoMapper
|
||||||
void clearOutInfo(List<Long> idList);
|
void clearOutInfo(List<Long> idList);
|
||||||
|
|
||||||
List<InventoryInfo> countBySn(List<String> productSnList);
|
List<InventoryInfo> countBySn(List<String> productSnList);
|
||||||
|
|
||||||
|
void deleteInventoryInfoByInnerIds(String[] idArray);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,4 +60,6 @@ public interface OmsInventoryInnerMapper
|
||||||
public int deleteOmsInventoryInnerByIds(String[] ids);
|
public int deleteOmsInventoryInnerByIds(String[] ids);
|
||||||
|
|
||||||
int selectMaxOrderCode(String code);
|
int selectMaxOrderCode(String code);
|
||||||
|
|
||||||
|
List<String> checkDelete(String[] ids);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -78,4 +78,6 @@ public interface IInventoryInfoService
|
||||||
void clearOutInfo(List<Long> collect);
|
void clearOutInfo(List<Long> collect);
|
||||||
|
|
||||||
List<String> checkUnq(List<String> productSnList);
|
List<String> checkUnq(List<String> productSnList);
|
||||||
|
|
||||||
|
void deleteInventoryInfoByInnerIds(String[] idArray);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.ruoyi.sip.service;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.sip.domain.InventoryOuter;
|
import com.ruoyi.sip.domain.InventoryOuter;
|
||||||
import com.ruoyi.sip.vo.OuterDeliveryVo;
|
import com.ruoyi.sip.vo.OuterDeliveryVo;
|
||||||
|
import com.ruoyi.sip.vo.OuterViewVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出库单Service接口
|
* 出库单Service接口
|
||||||
|
|
@ -63,4 +64,6 @@ public interface IInventoryOuterService
|
||||||
int statusUpdate(InventoryOuter inventoryOuter);
|
int statusUpdate(InventoryOuter inventoryOuter);
|
||||||
|
|
||||||
OuterDeliveryVo selectBaseInfoById(Long id);
|
OuterDeliveryVo selectBaseInfoById(Long id);
|
||||||
|
|
||||||
|
OuterViewVo viewVo(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -182,5 +182,10 @@ public class InventoryInfoServiceImpl implements IInventoryInfoService {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteInventoryInfoByInnerIds(String[] idArray) {
|
||||||
|
inventoryInfoMapper.deleteInventoryInfoByInnerIds(idArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import com.ruoyi.sip.service.*;
|
||||||
import com.ruoyi.sip.utils.TemplateMailUtil;
|
import com.ruoyi.sip.utils.TemplateMailUtil;
|
||||||
import com.ruoyi.sip.vo.OuterDeliveryProductVo;
|
import com.ruoyi.sip.vo.OuterDeliveryProductVo;
|
||||||
import com.ruoyi.sip.vo.OuterDeliveryVo;
|
import com.ruoyi.sip.vo.OuterDeliveryVo;
|
||||||
|
import com.ruoyi.sip.vo.OuterViewVo;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -289,4 +290,25 @@ public class InventoryOuterServiceImpl implements IInventoryOuterService
|
||||||
|
|
||||||
return outerDeliveryVo;
|
return outerDeliveryVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OuterViewVo viewVo(Long id) {
|
||||||
|
OuterViewVo outerViewVo = new OuterViewVo();
|
||||||
|
//查询基础信息
|
||||||
|
InventoryOuter inventoryOuter = this.selectInventoryOuterById(id);
|
||||||
|
outerViewVo.setInventoryOuter(inventoryOuter);
|
||||||
|
//查询应出库和已提交数量
|
||||||
|
List<ProjectProductInfo> projectProductInfos = projectProductInfoService.listDeliveryProductByOrderCode(Collections.singletonList(inventoryOuter.getOrderCode()));
|
||||||
|
long sum = projectProductInfos.stream().filter(item -> item.getProductBomCode().equals(inventoryOuter.getProductCode()))
|
||||||
|
.mapToLong(ProjectProductInfo::getQuantity).sum();
|
||||||
|
outerViewVo.setAllQuantity(sum);
|
||||||
|
InventoryOuter queryDto = new InventoryOuter();
|
||||||
|
queryDto.setOrderCode(inventoryOuter.getOrderCode());
|
||||||
|
List<InventoryOuter> inventoryOuters = inventoryOuterMapper.selectInventoryOuterList(queryDto);
|
||||||
|
long sum2 = inventoryOuters.stream().filter(item -> item.getProductCode().equals(inventoryOuter.getProductCode()))
|
||||||
|
.mapToLong(InventoryOuter::getQuantity).sum();
|
||||||
|
outerViewVo.setCommitQuantity(sum2);
|
||||||
|
return outerViewVo;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,14 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteOmsInventoryInnerByIds(String ids) {
|
public int deleteOmsInventoryInnerByIds(String ids) {
|
||||||
return omsInventoryInnerMapper.deleteOmsInventoryInnerByIds(Convert.toStrArray(ids));
|
//查询已发货的innerCode
|
||||||
|
String[] idArray = Convert.toStrArray(ids);
|
||||||
|
List<String> innerCodeList = omsInventoryInnerMapper.checkDelete(idArray);
|
||||||
|
if (CollUtil.isNotEmpty(innerCodeList)){
|
||||||
|
throw new ServiceException(StrUtil.format("已发货的入库单[{}]不能删除", String.join(",",innerCodeList)));
|
||||||
|
}
|
||||||
|
inventoryInfoService.deleteInventoryInfoByInnerIds(idArray);
|
||||||
|
return omsInventoryInnerMapper.deleteOmsInventoryInnerByIds(idArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.ruoyi.sip.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.sip.domain.InventoryOuter;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : ch
|
||||||
|
* @version : 1.0
|
||||||
|
* @ClassName : OuterViewVo
|
||||||
|
* @Description :
|
||||||
|
* @DATE : Created in 10:02 2025/8/15
|
||||||
|
* <pre> Copyright: Copyright(c) 2025 </pre>
|
||||||
|
* <pre> Company : 紫光汇智信息技术有限公司 </pre>
|
||||||
|
* Modification History:
|
||||||
|
* Date Author Version Discription
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* 2025/08/15 ch 1.0 Why & What is modified: <修改原因描述> *
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OuterViewVo {
|
||||||
|
private InventoryOuter inventoryOuter;
|
||||||
|
private Long allQuantity;
|
||||||
|
private Long commitQuantity;
|
||||||
|
}
|
||||||
|
|
@ -156,5 +156,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
<delete id="deleteInventoryInfoByInnerIds">
|
||||||
|
delete from oms_inventory_info where inner_code in (
|
||||||
|
select inner_code from oms_inventory_inner where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -26,6 +26,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_user t3 on t1.create_by = t3.user_id
|
left join sys_user t3 on t1.create_by = t3.user_id
|
||||||
left join product_info t5 on t1.product_code = t5.product_code
|
left join product_info t5 on t1.product_code = t5.product_code
|
||||||
</sql>
|
</sql>
|
||||||
|
<sql id="selectBaseInnerVo">
|
||||||
|
select t1.id, t1.inner_code, t1.product_code, t1.quantity, t1.warehouse_id, t1.create_by, t1.update_by, t1.create_time, t1.update_time ,t1.vendor_code
|
||||||
|
from oms_inventory_inner t1
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectOmsInventoryInnerList" parameterType="OmsInventoryInner" resultMap="OmsInventoryInnerResult">
|
<select id="selectOmsInventoryInnerList" parameterType="OmsInventoryInner" resultMap="OmsInventoryInnerResult">
|
||||||
<include refid="selectOmsInventoryInnerVo"/>
|
<include refid="selectOmsInventoryInnerVo"/>
|
||||||
|
|
@ -64,6 +69,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from oms_inventory_inner
|
from oms_inventory_inner
|
||||||
where inner_code like concat(#{code}, '%')
|
where inner_code like concat(#{code}, '%')
|
||||||
</select>
|
</select>
|
||||||
|
<select id="checkDelete" resultType="java.lang.String">
|
||||||
|
select distinct inner_code from oms_inventory_info where inner_code in (select inner_code from
|
||||||
|
oms_inventory_inner
|
||||||
|
where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
and inventory_status=1
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertOmsInventoryInner" parameterType="OmsInventoryInner" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertOmsInventoryInner" parameterType="OmsInventoryInner" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into oms_inventory_inner
|
insert into oms_inventory_inner
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue