|
|
|
@ -10,6 +10,7 @@ |
|
|
|
<link rel="stylesheet" href="/static/css/public.css" media="all"> |
|
|
|
</head> |
|
|
|
<body> |
|
|
|
<input id="type" th:value="${type}" style="display: none"> |
|
|
|
<div id="test2" class="demo-tree"></div> |
|
|
|
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|
|
|
<script> |
|
|
|
@ -26,16 +27,13 @@ |
|
|
|
if (data.children !== undefined) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
var idForMaterial = $("#departmentManagerIdForMaterial", window.parent.document).val(); |
|
|
|
$("#departmentManagerForMaterial", window.parent.document).val(data.title); |
|
|
|
$("#departmentManagerForLocation", window.parent.document).val(data.title); |
|
|
|
if (idForMaterial === undefined || idForMaterial === null || idForMaterial === "") { |
|
|
|
$("#departmentManagerIdForMaterial", window.parent.document).val(data.id + ","); |
|
|
|
$("#departmentManagerIdForLocation", window.parent.document).val(data.id + ","); |
|
|
|
let type = $("#type").val(); |
|
|
|
var id = $("#departmentManagerIdFor"+type, window.parent.document).val(); |
|
|
|
$("#departmentManagerFor"+type, window.parent.document).val(data.title); |
|
|
|
if (id === undefined || id === null || id === "") { |
|
|
|
$("#departmentManagerIdFor"+type, window.parent.document).val(data.id + ","); |
|
|
|
} else { |
|
|
|
$("#departmentManagerIdForMaterial", window.parent.document).val(idForMaterial + data.id + ","); |
|
|
|
$("#departmentManagerIdForLocation", window.parent.document).val(idForMaterial + data.id + ","); |
|
|
|
$("#departmentManagerIdFor"+type, window.parent.document).val(id + data.id + ","); |
|
|
|
} |
|
|
|
var index = parent.layer.getFrameIndex(window.name); |
|
|
|
parent.layer.close(index); |
|
|
|
|