3 changed files with 257 additions and 39 deletions
@ -0,0 +1,232 @@ |
|||
<!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; |
|||
} |
|||
|
|||
.inputdiv .layui-unselect { |
|||
border-style: none; |
|||
} |
|||
</style> |
|||
</head> |
|||
|
|||
<body> |
|||
|
|||
<form class="layui-form layui-form-pane" action=""> |
|||
|
|||
<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 () { |
|||
$.ajax({ |
|||
url: "/material/temporaryValue", |
|||
type: "post", |
|||
dataType: 'json', |
|||
data: JSON.stringify({"id": $("#id").val(),"type":"Out"}), |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (d) { |
|||
miniTab.openNewTabByIframeNew({ |
|||
href: "/application_Out_temporaryValue", |
|||
title: "出库申请" |
|||
}); |
|||
|
|||
} |
|||
}); |
|||
return false; |
|||
}; |
|||
|
|||
applicationIn = function () { |
|||
$.ajax({ |
|||
url: "/material/temporaryValue", |
|||
type: "post", |
|||
dataType: 'json', |
|||
data: JSON.stringify({"id": $("#id").val(),"type":"In"}), |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (d) { |
|||
miniTab.openNewTabByIframeNew({ |
|||
href: "/application_In_temporaryValue", |
|||
title: "入库申请" |
|||
}); |
|||
|
|||
} |
|||
}); |
|||
return false; |
|||
} |
|||
|
|||
}); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
|||
Loading…
Reference in new issue