|
|
|
|
<!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">
|
|
|
|
|
<link rel="stylesheet" href="/static/lib/font-awesome-4.7.0/css/font-awesome.min.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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.inputdiv .layui-unselect {
|
|
|
|
|
border-style: none;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
<form class="layui-form layui-form-pane" action="">
|
|
|
|
|
<a id="refresh" href="javascript:" data-refresh="刷新"><i class="fa fa-refresh"></i></a>
|
|
|
|
|
|
|
|
|
|
<input type="text" id="id" th:value="${record.getId()}" name="id" style="display: none">
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">存货编码</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" th:value="${record.getCode()}" name="code" id="code" readonly
|
|
|
|
|
autocomplete="off" class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">物料名称</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" th:value="${record.getMname()}" name="mname" readonly
|
|
|
|
|
autocomplete="off" class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">规格型号</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" th:value="${record.getVersion()}" name="version" autocomplete="off" readonly
|
|
|
|
|
class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">品牌:</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" class="layui-input" th:value="${record.getBrand()}" readonly
|
|
|
|
|
name="brand"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">物料类型</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" class="layui-input" id="openSonByMateralType" readonly
|
|
|
|
|
th:value="${record.getTypeName()}"
|
|
|
|
|
lay-verify="required"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">材质</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" th:value="${record.getTexture()}" name="texture" autocomplete="off" readonly
|
|
|
|
|
class="layui-input">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">计量单位</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<select id="unit">
|
|
|
|
|
<option value="-1" th:text="${record.getUnit()}"></option>
|
|
|
|
|
<option th:each="splitInfo,iterStar:${record.getSplitInfoList()}"
|
|
|
|
|
th:value="${splitInfo?.getNewUnit()}"
|
|
|
|
|
th:text="${splitInfo?.getNewUnit()}"></option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">所处仓库</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" th:value="${record.getDepositoryName()}" name="depositoryName" required
|
|
|
|
|
autocomplete="off" readonly
|
|
|
|
|
class="layui-input">
|
|
|
|
|
<input type="text" id="depositoryId" th:value="${record.getDepositoryId()}" style="display: none">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">所处库位</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<button th:each="placeP,iterStar:${record.getPlacePList()}"
|
|
|
|
|
th:attr="id=${record.getMid()}" class="layui-btn layui-btn-customize"
|
|
|
|
|
onclick="changePlaceCode(this)" th:value="${record.getDepositoryId()}"
|
|
|
|
|
th:text="${placeP.getKingdeecode()}">
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">数量</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" th:value="${record.getQuantity()}" name="quantity" required autocomplete="off"
|
|
|
|
|
id="quantity" readonly
|
|
|
|
|
class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">单价</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" th:value="${record.getPrice()}" name="price" required autocomplete="off" id="price"
|
|
|
|
|
readonly
|
|
|
|
|
class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">总额</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" th:value="${record.getAmounts()}" name="amounts" required autocomplete="off" id="amounts"
|
|
|
|
|
readonly
|
|
|
|
|
class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<button class="layui-btn layui-btn-customize" type="button" onclick="applicationIn()">入库申请</button>
|
|
|
|
|
|
|
|
|
|
<button class="layui-btn layui-btn-customize" type="button" onclick="applicationOut()">出库申请</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<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 applicationIn() {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function applicationOut() {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 用于标志是否为第一次提交
|
|
|
|
|
let flagForForm = false;
|
|
|
|
|
var barCode = [];
|
|
|
|
|
var flag = false;
|
|
|
|
|
layui.use(['form', 'laydate', 'miniTab'], function () {
|
|
|
|
|
var form = layui.form,
|
|
|
|
|
laydate = layui.laydate,
|
|
|
|
|
$ = layui.$,
|
|
|
|
|
miniTab = layui.miniTab;
|
|
|
|
|
|
|
|
|
|
miniTab.listen();
|
|
|
|
|
|
|
|
|
|
form.on('select()', function (data) {
|
|
|
|
|
var id = data.elem.id; //得到select原始DOM对象id
|
|
|
|
|
var req = {};
|
|
|
|
|
req.id = $("#id").val();
|
|
|
|
|
req.unit = data.value;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "/material/findSplitInventoryByUnit",
|
|
|
|
|
type: "post",
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
data: JSON.stringify(req),
|
|
|
|
|
contentType: "application/json;charset=utf-8",
|
|
|
|
|
success: function (d) {
|
|
|
|
|
$("#quantity").val(d.data)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
applicationOut = function () {
|
|
|
|
|
var index = layer.open({
|
|
|
|
|
title: '出库申请',
|
|
|
|
|
type: 2,
|
|
|
|
|
shade: 0.2,
|
|
|
|
|
maxmin: true,
|
|
|
|
|
shadeClose: true,
|
|
|
|
|
area: ['100%', '100%'],
|
|
|
|
|
content: '/application_out_back?code=' + $("#code").val() + "&depositoryId=" + $("#depositoryId").val()
|
|
|
|
|
});
|
|
|
|
|
$(window).on("resize", function () {
|
|
|
|
|
layer.full(index);
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
applicationIn = function () {
|
|
|
|
|
var index = layer.open({
|
|
|
|
|
title: '入库申请',
|
|
|
|
|
type: 2,
|
|
|
|
|
shade: 0.2,
|
|
|
|
|
maxmin: true,
|
|
|
|
|
shadeClose: true,
|
|
|
|
|
area: ['100%', '100%'],
|
|
|
|
|
content: '/application_in_back?mid=' + $("#id").val() + "&depositoryId=" + $("#depositoryId").val()
|
|
|
|
|
});
|
|
|
|
|
$(window).on("resize", function () {
|
|
|
|
|
layer.full(index);
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('body').on('click', '[data-refresh]', function () {
|
|
|
|
|
location.reload();
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|