17 changed files with 1106 additions and 144 deletions
@ -0,0 +1,22 @@ |
|||
package com.dreamchaser.depository_manage.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 简单仓库入库信息,为了前端展示需要,尽量减少字段的传输以提高效率 |
|||
* @author Dreamchaser |
|||
*/ |
|||
@Data |
|||
public class SimpleApplicationInRecord { |
|||
/** 记录id */ |
|||
private Integer id; |
|||
|
|||
/** 申请人id */ |
|||
private Integer applicantId; |
|||
|
|||
/** 申请备注 */ |
|||
private String applyRemark; |
|||
|
|||
/** 申请时间 */ |
|||
private Long applicantTime; |
|||
} |
|||
@ -0,0 +1,188 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>组合</title> |
|||
<meta name="renderer" content="webkit"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
|||
<link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all"> |
|||
<link rel="stylesheet" href="/static/css/public.css" media="all"> |
|||
<link rel="stylesheet" href="/static/js/lay-module/step-lay/step.css" media="all"> |
|||
<style> |
|||
.inputdiv { |
|||
display: flex; |
|||
background-color: #fff; |
|||
height: 38px; |
|||
line-height: 38px; |
|||
border: 1px solid rgb(238, 238, 238); |
|||
} |
|||
|
|||
.layui-form-label { |
|||
padding: 9px 0px; |
|||
text-align: left; |
|||
} |
|||
|
|||
.layui-input-block { |
|||
margin-left: 80px; |
|||
} |
|||
|
|||
.layui-form-select { |
|||
width: 100%; |
|||
border-style: none; |
|||
} |
|||
|
|||
</style> |
|||
</head> |
|||
<body> |
|||
<div class="layuimini-container"> |
|||
<div class="layuimini-main"> |
|||
<div> |
|||
<fieldset class="table-search-fieldset"> |
|||
<legend>组合入库</legend> |
|||
<div class="layui-fluid"> |
|||
<div class="layui-card"> |
|||
<form class="layui-form" |
|||
style="margin: 0 auto;max-width: 700px;" |
|||
lay-filter="form1" id="form1"> |
|||
<div class="layui-card-body" id="takingHeader" style="padding-right: 0px"> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">组合名称:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="gname" class="layui-input" id="gname" |
|||
th:value="${group.getGname()}" readonly |
|||
lay-verify="required"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">组合编码:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" id="gcode" name="gcode" |
|||
th:value="${group.getCode()}" readonly |
|||
class="layui-input" lay-verify="required"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">仓库名称:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" id="depositoryName" name="depositoryName" readonly |
|||
th:value="${record.getDepositoryName()}" |
|||
class="layui-input" lay-verify="required"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">库位编码:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" id="placeCode" name="placeCode" readonly |
|||
th:value="${placeCode}" |
|||
class="layui-input" lay-verify="required"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">入库数量:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" id="quantity" name="quantity" readonly |
|||
th:value="${record.getQuantity()}" |
|||
class="layui-input" lay-verify="required"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">备注:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" id="remark" name="remark" readonly |
|||
th:value="${record.getApplyRemark()}" |
|||
class="layui-input" lay-verify="required"/> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<fieldset class="table-search-fieldset"> |
|||
<legend>组合明细</legend> |
|||
<div class="layui-card-body" id="InventoryDetails" style="padding-right: 0px"> |
|||
<hr> |
|||
|
|||
<div class="layui-collapse" lay-accordion> |
|||
<div class="layui-colla-item" |
|||
th:each="groupInfo,iterStar:${groupInfoList}"> |
|||
<h2 class="layui-colla-title" |
|||
th:text="${groupInfo.getMname()}"></h2> |
|||
<div class="layui-colla-content"> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">物料编码:</label> |
|||
<div class="layui-input-block" style="margin: 0px;"> |
|||
<div class="inputdiv"> |
|||
<input type="text" placeholder="请填写入物料编码" |
|||
th:value="${groupInfo.getMcode()}" |
|||
class="layui-input" lay-verify="required" readonly |
|||
style="border-style: none"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">物料类型:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" placeholder="请选择物料类型" |
|||
class="layui-input" |
|||
th:value="${groupInfo.getTname()}" |
|||
readonly |
|||
lay-verify="required"/> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">物料数量:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" |
|||
class="layui-input" |
|||
th:value="${groupInfo.getQuantity()}" |
|||
readonly |
|||
lay-verify="required"/> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">材质:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" placeholder="请填写材质名称" readonly |
|||
class="layui-input" |
|||
th:value="${groupInfo.getTexture()}" |
|||
/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">规格型号:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" placeholder="请填写规格型号" |
|||
class="layui-input" readonly |
|||
th:value="${groupInfo.getVersion()}" |
|||
/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">计量单位:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" placeholder="请填写计量单位" |
|||
class="layui-input" readonly |
|||
th:value="${groupInfo.getShowUnit()}" |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</fieldset> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</fieldset> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script> |
|||
|
|||
</body> |
|||
|
|||
</html> |
|||
@ -0,0 +1,182 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>分步表单</title> |
|||
<meta name="renderer" content="webkit"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
|||
<link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all"> |
|||
<link rel="stylesheet" href="/static/css/public.css" media="all"> |
|||
<link rel="stylesheet" href="/static/js/lay-module/step-lay/step.css" media="all"> |
|||
</head> |
|||
<body> |
|||
<div class="layuimini-container"> |
|||
<div class="layuimini-main"> |
|||
<div class="layui-fluid"> |
|||
<div class="layui-card"> |
|||
<div class="layui-card-body" style="padding-top: 40px;"> |
|||
<input type="text" id="id" th:value="${record.getId()}" style="display:none;"> |
|||
<div id="stepForm" lay-filter="stepForm" style="margin: 0 auto;"> |
|||
<div style="margin-top: 30px"> |
|||
<table id="demo" class="layui-table" |
|||
style="margin: 0 auto;max-width: 800px;padding-top: 40px;"> |
|||
<colgroup> |
|||
<col width="150"> |
|||
<col width="200"> |
|||
</colgroup> |
|||
|
|||
<tbody> |
|||
<tr> |
|||
<td>申请编号</td> |
|||
<td id="applicationId" th:text="${record.getAircode()}">123456</td> |
|||
</tr> |
|||
<tr> |
|||
<td>物料名称</td> |
|||
<td id="materialName" th:text="${record.getMname()}">骁龙888芯片</td> |
|||
</tr> |
|||
<tr> |
|||
<td>存货编码</td> |
|||
<td id="mcode" th:text="${record.getMcode()}">外芯仓库</td> |
|||
</tr> |
|||
<tr> |
|||
<td>计量单位</td> |
|||
<td id="airunit" th:text="${record.getAirUnit()}">外芯仓库</td> |
|||
</tr> |
|||
<tr> |
|||
<td>数量</td> |
|||
<td id="quantity" th:text="${record.getQuantity()}">409</td> |
|||
</tr> |
|||
<tr> |
|||
<td>金额</td> |
|||
<td id="price" th:text="${record.getPrice()}">2016-11-28</td> |
|||
</tr> |
|||
<tr> |
|||
<td>仓库名称</td> |
|||
<td id="depositoryName" th:text="${record.getDepositoryName()}">外芯仓库</td> |
|||
</tr> |
|||
<tr> |
|||
<td>库位编码</td> |
|||
<td id="placeCode" th:text="${placeCode}">默认库位</td> |
|||
</tr> |
|||
<tr> |
|||
<td>提交人</td> |
|||
<td id="applicantName" th:text="${record.getApplicantName()}">2016-11-28</td> |
|||
</tr> |
|||
<tr> |
|||
<td>提交时间</td> |
|||
<td id="applyTime" th:text="${record.getApplicantTime()}">2016-11-28</td> |
|||
</tr> |
|||
|
|||
<tr> |
|||
<td>申请备注</td> |
|||
<td id="applyRemarks" th:text="${record.getApplyRemark()}">2016-11-28</td> |
|||
</tr> |
|||
<tr> |
|||
<td>状态</td> |
|||
<td id="state" th:text="${record.getAirstate()}">2016-11-28</td> |
|||
<td style="display: none" id="approverpass" th:text="${record.getAirapproverPass()}">2016-11-28</td> |
|||
</tr> |
|||
<tr id="approverNameT"> |
|||
<td>审批人</td> |
|||
<td id="approverName" th:text="${record.getAirapproverName()}">2016-11-28</td> |
|||
</tr> |
|||
|
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<hr> |
|||
<div id="review"> |
|||
<div class="layui-form" style="margin: 0 auto;max-width: 900px;padding-top: 40px;"> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">审核备注:</label> |
|||
<div class="layui-input-block"> |
|||
<input id="approverMessage" name="approverMessage" |
|||
placeholder="请填写相关原因及申请原因" value="" class="layui-input"/> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="layui-row layui-col-space15"> |
|||
<div class="layui-input-block"> |
|||
<div class="layui-col-xs12 layui-col-md3" style="padding: 7.5px"> |
|||
<button type="button" class="layui-btn" onclick="review(1)"> |
|||
 同意  |
|||
</button> |
|||
</div> |
|||
<div class="layui-col-xs12 layui-col-md3" style="padding: 7.5px"> |
|||
<button type="button" class="layui-btn layui-btn-danger" |
|||
onclick="review(2)"> |
|||
 驳回  |
|||
</button> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script> |
|||
<script> |
|||
function review() { |
|||
} |
|||
layui.use(['form', 'table', 'laydate'], function () { |
|||
var $ = layui.jquery; |
|||
review = function (pass) { |
|||
let data = {}; |
|||
data.id = $("#id").val(); |
|||
if (pass === 1) { |
|||
data.approverPass = 1; |
|||
} else { |
|||
data.approverPass = 2; |
|||
} |
|||
data.approverMessage = $("#approverMessage").val(); |
|||
send(data); |
|||
}; |
|||
|
|||
function send(req) { |
|||
$.ajax({ |
|||
url: "/depositoryRecord/reviewIn", |
|||
type: 'put', |
|||
dataType: 'json', |
|||
contentType: "application/json;charset=utf-8", |
|||
data: JSON.stringify(req), |
|||
beforeSend: function () { |
|||
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
|||
}, |
|||
success: function (data) { |
|||
layer.close(this.layerIndex); |
|||
if (data.status >= 300) { |
|||
layer.msg(data.statusInfo.detail, |
|||
{ |
|||
icon: 2, |
|||
time: 300 |
|||
}, |
|||
function () { |
|||
window.location = '/form_step_look?id=' + req.id; |
|||
});//失败的表情 |
|||
|
|||
return; |
|||
} else { |
|||
layer.msg("提交成功", { |
|||
icon: 6,//成功的表情 |
|||
time: 500 //1秒关闭(如果不配置,默认是3秒) |
|||
}, function () { |
|||
window.location = '/form_step_look?id=' + req.id; |
|||
}); |
|||
} |
|||
}, |
|||
}) |
|||
} |
|||
}) |
|||
</script> |
|||
</body> |
|||
</html> |
|||
Loading…
Reference in new issue