|
|
|
@ -113,12 +113,12 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item layui-inline">
|
|
|
|
|
<label class="layui-form-label" style="width: auto;">分类:</label>
|
|
|
|
|
<div class="layui-input-inline" id="fenlei" style="width: 241px;">
|
|
|
|
|
<div class="layui-input-inline" id="fenlei" style="width: 245px;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item layui-inline">
|
|
|
|
|
<label class="layui-form-label" style="width: auto;">数量:</label>
|
|
|
|
|
<div class="layui-input-inline" id="fenlei" style="width: 100px;">
|
|
|
|
|
<div class="layui-input-inline" id="fenlei" style="width: 125px;">
|
|
|
|
|
<select id="sl" lay-filter="sl">
|
|
|
|
|
<option value="-1">全部</option>
|
|
|
|
|
<option value="0">等于0</option>
|
|
|
|
@ -126,6 +126,23 @@
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item layui-inline">
|
|
|
|
|
<label class="layui-form-label" style="width: auto;">配备主要:</label>
|
|
|
|
|
<div class="layui-input-inline" style="width:125px">
|
|
|
|
|
<select id="pbyqId" lay-filter="pbyq">
|
|
|
|
|
<option value="0">全部</option>
|
|
|
|
|
<option value="1">必配</option>
|
|
|
|
|
<option value="2">选配</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item" style="margin-top: 10px;">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item layui-inline">
|
|
|
|
|
<label class="layui-form-label" style="width: auto;">学校名称:</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
@ -150,6 +167,9 @@
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -167,7 +187,7 @@
|
|
|
|
|
|
|
|
|
|
var xmSelectData = [];
|
|
|
|
|
|
|
|
|
|
var fenleiSelect;
|
|
|
|
|
var xmSelectArr = [];
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
@ -232,7 +252,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getXmSelect() {
|
|
|
|
|
fenleiSelect = xmSelect.render({
|
|
|
|
|
var fenleiSelect = xmSelect.render({
|
|
|
|
|
el: '#fenlei',
|
|
|
|
|
clickClose: true,
|
|
|
|
|
radio: true,
|
|
|
|
@ -257,15 +277,8 @@
|
|
|
|
|
name: "level_name"
|
|
|
|
|
},
|
|
|
|
|
on: function (data) {
|
|
|
|
|
var selectArr = data.arr;
|
|
|
|
|
if (selectArr.length > 0) {
|
|
|
|
|
const levelName = selectArr[0].level_name;
|
|
|
|
|
const result = findNodeAndParents(levelName);
|
|
|
|
|
tableRender(result.join(','));
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
tableRender();
|
|
|
|
|
}
|
|
|
|
|
xmSelectArr = data.arr;
|
|
|
|
|
tableRender();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$.ajax({
|
|
|
|
@ -298,6 +311,8 @@
|
|
|
|
|
form.on('select(km)', function (data) {
|
|
|
|
|
getXmSelect();
|
|
|
|
|
tableRender();
|
|
|
|
|
// 阻止表单的默认提交行为
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
form.on('select(sl)', function () {
|
|
|
|
@ -306,6 +321,12 @@
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
form.on('select(pbyq)', function (data) {
|
|
|
|
|
tableRender();
|
|
|
|
|
// 阻止表单的默认提交行为
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function findNodeAndParents(levelName) {
|
|
|
|
|
function search(node, path) {
|
|
|
|
|
const newPath = [...path, node.level_name];
|
|
|
|
@ -344,10 +365,10 @@
|
|
|
|
|
function tableRender() {
|
|
|
|
|
|
|
|
|
|
var fenlei_name = "";
|
|
|
|
|
var selectArr = fenleiSelect.getValue();
|
|
|
|
|
if (selectArr.length > 0) {
|
|
|
|
|
const levelName = selectArr[0].level_name;
|
|
|
|
|
const result = findNodeAndParents(levelName);
|
|
|
|
|
|
|
|
|
|
if (xmSelectArr.length > 0) {
|
|
|
|
|
const levelName = xmSelectArr[0].level_name;
|
|
|
|
|
const result = findNodeAndParents(levelName);
|
|
|
|
|
fenlei_name = result.join(',');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|