|
Before Width: | Height: | Size: 306 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 701 B |
|
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 701 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 322 KiB |
@ -0,0 +1,282 @@ |
|||
<!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.8.6/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=""> |
|||
|
|||
|
|||
<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" th:style="'display:'+${display}"> |
|||
<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" th:style="'display:'+${display}"> |
|||
<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" > |
|||
<label class="layui-form-label">备注</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getIremark()}" name="iremark" required autocomplete="off" id="iremark" |
|||
onchange="updateInventoryRemark()" |
|||
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.8.6/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() { |
|||
|
|||
} |
|||
|
|||
function updateInventoryRemark(){ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
var barCode = []; |
|||
var flag = false; |
|||
layui.use(['form', 'laydate', 'miniTab'], function () { |
|||
var form = layui.form, |
|||
laydate = layui.laydate, |
|||
$ = layui.$, |
|||
miniTab = layui.miniTab; |
|||
let iremark = $("#iremark").val(); |
|||
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; |
|||
} |
|||
|
|||
|
|||
updateInventoryRemark = function() { |
|||
let id = $("#id").val(); |
|||
let newIremark = $("#iremark").val(); |
|||
let index = layer.confirm('确认更改备注?', { |
|||
btn: ['确定','取消'] //按钮 |
|||
}, function(){ |
|||
let req = {}; |
|||
req.id = id; |
|||
req.remark = newIremark; |
|||
$.ajax({ |
|||
url: "/material/updateInventoryRemark", |
|||
type: "post", |
|||
dataType: 'json', |
|||
data: JSON.stringify(req), |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (data) { |
|||
if (data.status >= 300) { |
|||
layer.msg(data.statusInfo.message,{ |
|||
icon: 5,//失败的表情 |
|||
time: 500 //1秒关闭(如果不配置,默认是3秒) |
|||
}, function () { |
|||
layer.close(index); |
|||
}); |
|||
} else { |
|||
layer.msg("修改成功", { |
|||
icon: 6,//成功的表情 |
|||
time: 500 //1秒关闭(如果不配置,默认是3秒) |
|||
}, function () { |
|||
layer.close(index); |
|||
}) |
|||
} |
|||
} |
|||
}); |
|||
}, function(){ |
|||
$("#iremark").val(iremark); |
|||
}); |
|||
} |
|||
|
|||
}); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
|||