You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
2.1 KiB
53 lines
2.1 KiB
<!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/lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
|
|
<link rel="stylesheet" href="/static/css/public.css" media="all">
|
|
</head>
|
|
<body>
|
|
<input th:value="${mcode}" style="display:none;" id="mcode">
|
|
<div class="layui-btn-container">
|
|
<button class="layui-btn layui-btn-primary select_this" th:each="material,iterStar:${materialList}" th:value="${material.getCode()}"
|
|
th:text="${material.getMname()+','+(material.getVersion() == null ? '' :material.getVersion())}">
|
|
<i class="layui-icon layui-icon-down layui-font-12"></i>
|
|
</button>
|
|
</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>
|
|
layui.use(['layer'], function () {
|
|
var $ = layui.jquery,
|
|
layer = layui.layer;
|
|
|
|
let mcode = $("#mcode").val();
|
|
|
|
// 给每个按钮添加点击事件
|
|
$(".select_this").on("click",function () {
|
|
// 获取当前点击物料编码
|
|
var code = this.value;
|
|
// 获取当前点击物料名称
|
|
if(code !== mcode){
|
|
// 如果点击的不是要出库的物料
|
|
layer.msg("请选择正确物料",{
|
|
icon:0,
|
|
time:500
|
|
},function () {
|
|
$("#flagForSelect",window.parent.document).val(false);
|
|
})
|
|
}else{
|
|
$("#flagForSelect",window.parent.document).val(true);
|
|
var index = parent.layer.getFrameIndex(window.name);
|
|
parent.layer.close(index);
|
|
}
|
|
})
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|