2 changed files with 575 additions and 9 deletions
@ -0,0 +1,350 @@ |
|||||
|
<!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 class="layui-carousel" id="stepForm" lay-filter="stepForm" style="margin: 0 auto; "> |
||||
|
<div carousel-item style="overflow: inherit"> |
||||
|
<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;padding-top: 100px; padding-bottom: 200px" |
||||
|
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="mainId" id="mainId" th:value="${mainRecord.getId()}" style="display:none;"> |
||||
|
<input type="text" class="layui-input" |
||||
|
th:value="${mainRecord.getDepositoryName()}" |
||||
|
style="border-style: none" |
||||
|
id="openSonByDepository" readonly |
||||
|
lay-verify="required"/> |
||||
|
<input type="text" name="depositoryId" class="layui-input" |
||||
|
id="depositoryId" th:value="${mainRecord.getDepositoryId()}" |
||||
|
style="display: none" lay-verify="required"/> |
||||
|
<input type="text" name="placeId" class="layui-input" id="placeId" |
||||
|
th:value="${mainRecord.getPlaceId()}" |
||||
|
style="display: none" 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="请选择负责人" class="layui-input" |
||||
|
id="departmentManager" readonly |
||||
|
th:value="${mainRecord.getDepartmentManagerName()}" |
||||
|
lay-verify="required"/> |
||||
|
<input type="text" id="departmentManagerId" name="departmentManagerId" |
||||
|
th:value="${mainRecord.getDepartmentManager()}" |
||||
|
class="layui-input" style="display: none" 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="请选择负责人" class="layui-input" |
||||
|
id="originatorName" readonly |
||||
|
th:value="${mainRecord.getOriginatorName()}" |
||||
|
lay-verify="required"/> |
||||
|
<input type="text" id="originator" name="departmentManagerId" |
||||
|
th:value="${mainRecord.getOriginator()}" |
||||
|
class="layui-input" style="display: none" 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="recordMin,iterStar:${recordChild}"> |
||||
|
<h2 class="layui-colla-title" |
||||
|
th:text="${recordMin.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 th:attr="name='code' +${recordMin.getId()},id='code'+${recordMin.getId()}" |
||||
|
type="text" placeholder="请填写入物料编码" |
||||
|
th:value="${recordMin.getMcode()}" |
||||
|
class="layui-input" lay-verify="required" |
||||
|
style="border-style: none"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-form-item"> |
||||
|
<label class="layui-form-label">条形编码:</label> |
||||
|
<div class="layui-input-block" style="margin: 0px;"> |
||||
|
<div class="inputdiv"> |
||||
|
<select |
||||
|
th:attr="id='barCode'+${recordMin.getId()},name='barCode'+${recordMin.getId()}" |
||||
|
style="border-style: none"> |
||||
|
|
||||
|
</select> |
||||
|
</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="${recordMin.getTname()}" |
||||
|
th:attr="id='openSonByMateralType'+${recordMin.getId()}" |
||||
|
readonly |
||||
|
lay-verify="required"/> |
||||
|
<input type="text" |
||||
|
th:value="${recordMin.getMtId()}" |
||||
|
th:attr="id='materialTypeId'+${recordMin.getId()},name='typeId'+${recordMin.getId()}" |
||||
|
placeholder="请选择物料类型" class="layui-input" |
||||
|
style="display: none" 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="请填写材质名称" |
||||
|
class="layui-input" |
||||
|
th:value="${recordMin.getMtexture()}" |
||||
|
th:attr="id='texture'+${recordMin.getId()},name='texture'+${recordMin.getId()}" |
||||
|
/> |
||||
|
</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="${recordMin.getMversion()}" |
||||
|
th:attr="id='version'+${recordMin.getId()},name='version'+${recordMin.getId()}" |
||||
|
/> |
||||
|
</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="${recordMin.getMunit()}" |
||||
|
th:attr="id='unit'+${recordMin.getId()},name='unit'+${recordMin.getId()}" |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-form-item"> |
||||
|
<label class="layui-form-label">库存数量:</label> |
||||
|
<div class="layui-input-block"> |
||||
|
<input type="number" class="layui-input" readonly |
||||
|
th:value="${recordMin.getOldInventory()}" |
||||
|
th:attr="id='oldInventory'+${recordMin.getId()},name='oldInventory'+${recordMin.getId()}" |
||||
|
lay-verify="required"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-form-item"> |
||||
|
<label class="layui-form-label">盘点数量:</label> |
||||
|
<div class="layui-input-block"> |
||||
|
<input type="number" class="layui-input" |
||||
|
th:value="${recordMin.getNewInventory()}" |
||||
|
th:attr="id='newInventory'+${recordMin.getId()},name='newInventory'+${recordMin.getId()}" |
||||
|
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" id="takingResult" |
||||
|
th:value="${recordMin.getTakingResultShow()}" |
||||
|
th:attr="id='takingResult'+${recordMin.getId()},name='takingResult'+${recordMin.getId()}" |
||||
|
lay-verify="required"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-form-item"> |
||||
|
<label class="layui-form-label">盈亏数量:</label> |
||||
|
<div class="layui-input-block"> |
||||
|
<input type="number" class="layui-input" readonly |
||||
|
|
||||
|
th:value="${recordMin.getInventory()}" |
||||
|
th:attr="id='inventory'+${recordMin.getId()},name='inventory'+${recordMin.getId()}" |
||||
|
lay-verify="required"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</fieldset> |
||||
|
|
||||
|
<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"> |
||||
|
<textarea id="auditOpinion" name="auditOpinion" placeholder="请填写相关原因及申请原因" value="" class="layui-textarea"></textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-input-block"> |
||||
|
<button type="button" class="layui-btn" onclick="review(1)"> |
||||
|
 审核通过  |
||||
|
</button> |
||||
|
<button type="button" class="layui-btn layui-btn-danger" onclick="review(2)"> |
||||
|
 审核不通过  |
||||
|
</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</fieldset> |
||||
|
</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(data){} |
||||
|
layui.use(['form','step','element'], function () { |
||||
|
var $ = layui.$, |
||||
|
step = layui.step, |
||||
|
element = layui.element, |
||||
|
form = layui.form; |
||||
|
|
||||
|
var position=0,states={},number = 2; |
||||
|
states = [ {title: "待审核"}]; |
||||
|
// 用于分步表单加载 |
||||
|
step.render({ |
||||
|
elem: '#stepForm', |
||||
|
filter: 'stepForm', |
||||
|
width: '100%', //设置容器宽度 |
||||
|
stepWidth: '750px', |
||||
|
height: '1495px', |
||||
|
position: position, |
||||
|
number:number, |
||||
|
stepItems: states |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
|
||||
|
// 用于获取审核结果与审核的单号 |
||||
|
review=function (pass) { |
||||
|
let data = {}; |
||||
|
data.mainId = $("#mainId").val(); |
||||
|
data.auditOpinion = $("#auditOpinion").val(); |
||||
|
data.departmentManagerState = pass; |
||||
|
|
||||
|
$.ajax({ |
||||
|
url:"/stockTaking/review", |
||||
|
type:'post', |
||||
|
dataType:'json', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
data:JSON.stringify(data), |
||||
|
beforeSend:function () { |
||||
|
this.layerIndex = layer.load(0, { shade: [0.5, '#393D49'] }); |
||||
|
}, |
||||
|
success:function(d){ |
||||
|
layer.close(this.layerIndex); |
||||
|
if(d.status >= 300){ |
||||
|
var errMsg = d.data.errMsg; |
||||
|
// 获取出错的子订单 |
||||
|
layer.confirm("当前盘点数量中有溢出情况,需要进行转移", { |
||||
|
btn:["确定"] |
||||
|
},function () { // 继续 |
||||
|
layer.open({ |
||||
|
type: 2, |
||||
|
title: '转移物料', |
||||
|
skin: 'layui-layer-rim', |
||||
|
maxmin: true, |
||||
|
shadeClose: true, //点击遮罩关闭层 |
||||
|
area: ['70%', '70%'], |
||||
|
move: '.layui-layer-title', |
||||
|
fixed: false, |
||||
|
content: '/stockTakingTransfer?minIds='+errMsg.errIds, |
||||
|
end: function (res) { |
||||
|
if(res.status >= 300){ |
||||
|
layer.msg("提交失败,联系开发人员解决", { |
||||
|
icon: 5,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
}, function(){ |
||||
|
window.location = '/StockTakingView?id='+data.mainId; |
||||
|
}); |
||||
|
}else{ |
||||
|
layer.msg("提交成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
}, function(){ |
||||
|
window.location = '/StockTakingView?id='+data.mainId; |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
else{ |
||||
|
layer.msg("提交成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
}, function(){ |
||||
|
window.location = '/StockTakingView?id='+data.mainId; |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
}) |
||||
|
|
||||
|
}; |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
Loading…
Reference in new issue