<!DOCTYPE html>
|
<html>
|
<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.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
|
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
|
</head>
|
<body>
|
|
<div class="layui-fluid" style="padding-bottom: 0;">
|
<div class="layui-card">
|
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
|
<div class="layui-form-item">
|
<label class="layui-form-label">所属仓库</label>
|
<div class="layui-input-inline">
|
<select name="SlotWarehouseId" id="WarehouseId" lay-filter="getHouseId" lay-search>
|
<option value=""></option>
|
</select>
|
</div>
|
<label class="layui-form-label" style="margin-left: 12px;">所属区域</label>
|
<div class="layui-input-inline">
|
<select name="LanewayId" id="LanewayId" lay-filter="getLanwayId" lay-search>
|
<option value=""></option>
|
</select>
|
</div>
|
<label class="layui-form-label" style="margin-left: 44px;">储位属性</label>
|
<div class="layui-input-inline">
|
<select name="PropertyCode" id="PropertyCode" lay-verify="" lay-search>
|
<option value=""></option>
|
</select>
|
</div>
|
<label class="layui-form-label" style="margin-left: 17px;">储位环境</label>
|
<div class="layui-input-inline">
|
<select name="EnvironmentCode" id="EnvironmentCode" lay-verify="" lay-search>
|
<option value=""></option>
|
</select>
|
</div>
|
<br>
|
<div class="layui-inline">
|
<label class="layui-form-label">  储列</label>
|
<div class="layui-input-inline">
|
<input type="number" id="SlotColumn" onkeyup="this.value=this.value.replace(/[, ]/g,'')" name="SlotColumn" placeholder="列···"
|
autocomplete="off" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-inline" style="width: 20%;">
|
<label class="layui-form-label" style="float:left">  储层</label>
|
<div class="layui-input-inline">
|
<input type="number" id="SlotLayer" onkeyup="this.value=this.value.replace(/[, ]/g,'')" name="SlotLayer" placeholder="层···"
|
autocomplete="off" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label">  储排</label>
|
<div class="layui-input-inline">
|
<input type="number" id="SlotRow" onkeyup="this.value=this.value.replace(/[, ]/g,'')" name="SlotRow" placeholder="排···" autocomplete="off"
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-inline" >
|
<label class="layui-form-label" style="margin-left: 3px;">储位编码</label>
|
<div class="layui-input-inline">
|
<input type="text" id="Msg" name="Msg" placeholder="储位编码···" autocomplete="off"
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit
|
lay-filter="LAY-app-contlist-search">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索
|
</button>
|
</div>
|
</div>
|
</div>
|
<div class="layui-card-body">
|
<div style="padding-bottom: 5px;display: flex; flex-direction: row-reverse;">
|
<!-- <button class="layui-btn layuiadmin-btn-list" data-type="add">货位初始化</button> -->
|
<button class="inlock layui-btn layui-btn-sm layuiadmin-btn-list"data-type="edit0" style="margin-left: 10px;">入库锁定</button>
|
<button class="inlock layui-btn layui-btn-sm layuiadmin-btn-list"data-type="edit1">入库解锁</button>
|
<button class="tolock layui-btn layui-btn-sm layuiadmin-btn-list"data-type="edit2">出库锁定</button>
|
<button class="tolock layui-btn layui-btn-sm layuiadmin-btn-list" data-type="edit3">出库解锁</button>
|
<button class="shield layui-btn layui-btn-sm layuiadmin-btn-list" data-type="edit4">屏蔽</button>
|
<button class="shield layui-btn layui-btn-sm layuiadmin-btn-list"data-type="edit5" >解除屏蔽</button>
|
</div>
|
<table id="LAY-app-content-list" lay-filter="LAY-app-content-list" style="width: 100%;"></table>
|
<script type="text/html" id="buttonTpl">
|
{{# if(d.SlotCloseFlag=='1'){ }}
|
<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">屏蔽</button>
|
{{# } else { }}
|
<button class="layui-btn layui-btn-radius layui-btn-primary layui-btn-xs">正常</button>
|
{{# } }}
|
</script>
|
<script type="text/html" id="buttonImp">
|
{{# if(d.SlotImlockFlag=='1'){ }}
|
<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">锁定</button>
|
{{# } else { }}
|
<button class="layui-btn layui-btn-radius layui-btn-primary layui-btn-xs">正常</button>
|
{{# } }}
|
</script>
|
<script type="text/html" id="buttonExp">
|
{{# if(d.SlotExlockFlag=='1'){ }}
|
<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">锁定</button>
|
{{# } else { }}
|
<button class="layui-btn layui-btn-radius layui-btn-primary layui-btn-xs">正常</button>
|
{{# } }}
|
</script>
|
<script type="text/html" id="type">
|
{{# if(d.SlotStatus=='0'){ }}
|
<p>空储位</p>
|
{{# } else if(d.SlotStatus=='1'){ }}
|
<p>有物品</p>
|
{{# } else if(d.SlotStatus=='2'){ }}
|
<p>正在入库</p>
|
{{# } else if(d.SlotStatus=='3'){ }}
|
<p>正在出库</p>
|
{{# } else if(d.SlotStatus=='4'){ }}
|
<p>正在移入</p>
|
{{# } else if(d.SlotStatus=='5'){ }}
|
<p>正在移出</p>
|
{{# } else if(d.SlotStatus=='6'){ }}
|
<p>空托盘</p>
|
{{# }else { }}
|
<p>屏蔽</p>{{# } }}
|
</script>
|
<script type="text/html" id="table-content-list">
|
<a class="editBtn layui-btn layui-btn-normal layui-btn-xs" style="display: none;" lay-event="update"><i
|
class="layui-icon layui-icon-edit"></i>编辑</a>
|
</script>
|
</div>
|
</div>
|
</div>
|
<script src="../../../layuiadmin/layui/layui.js"></script>
|
<script src="../../../js/public.js"></script>
|
<script src="../../../js/jquery-3.5.1.min.js"></script>
|
<script src="../../../js/jquery.cookie.js"></script>
|
<script>
|
var uid = $.cookie('userId');
|
if (uid == null) {
|
alert('请登录后操作');
|
window.parent.location.href = '../../Login.html'
|
}
|
layui.config({
|
base: '../../../layuiadmin/' //静态资源所在路径
|
}).extend({
|
index: 'lib/index' //主入口模块
|
}).use(['index', 'table', 'laypage', 'layer'], function() {
|
var table = layui.table,
|
form = layui.form,
|
laypage = layui.laypage,
|
layer = layui.layer,
|
$ = layui.$;
|
var houseid = 0;
|
// 表单需要的变量
|
|
var url = IP + "/Equipment/GetSlotCodeViewList"
|
var where = {
|
WarehouseId: $("#WarehouseId").val(),
|
LanewayId: $("#LanewayId").val(),
|
Property: $("#PropertyCode").val(),
|
EnvironmentCode: $("#EnvironmentCode").val(),
|
Msg: $("#Msg").val(),
|
Type: $("#SlotRow").val() + '-' + $("#SlotColumn").val() + '-' + $("#SlotLayer").val()
|
};
|
console.log($("#PropertyCode").val())
|
var tableIns = table.render({
|
elem: '#LAY-app-content-list',
|
height: 'full-173',
|
id: 'LAY-app-content-list',
|
url: url,
|
method: 'post',
|
where: where,
|
contentType: 'application/json',
|
page: true,
|
even: true,
|
limit: pageCnt, //默认多少页
|
limits: pageLimits, //默认数组[10,20,30,40,50]
|
cellMinWidth: 80,
|
done: function() {
|
var param = {
|
id: $.cookie('userId'),
|
};
|
sendData(IP + "/Menu/GetPermission", param, 'post', function(res) {
|
|
if (res.code == 1) { //成功
|
|
for (var k = 0; k < res.data.length; k++) {
|
if (res.data[k].ModuleId == "5923B5B7C15D4B74B71383BF7E530394") {
|
$(function() {
|
|
$(".editBtn").show();
|
});
|
}
|
|
|
}
|
} else { //不成功
|
console.log(3);
|
layer.msg('获取信息失败', {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
//回调
|
});
|
}
|
});
|
},
|
cols: [
|
[{
|
field: 'Id',
|
title: 'Id',
|
type: 'checkbox',
|
width: 50,
|
sort: true,
|
fixed: 'left'
|
},
|
{
|
field: 'WarehouseName',
|
title: '所属仓库',
|
align: 'center',
|
width: 150,
|
fixed: 'left'
|
}, {
|
field: 'LanewayName',
|
title: '所属区域',
|
align: 'center',
|
width: 150,
|
}, {
|
field: 'SlotRow',
|
title: '排',
|
align: 'center',
|
width: 100,
|
}, {
|
field: 'SlotColumn',
|
title: '列',
|
align: 'center',
|
width: 100,
|
}, {
|
field: 'SlotLayer',
|
title: '层',
|
align: 'center',
|
width: 100,
|
}, {
|
field: 'SlotInout',
|
title: '储位深度',
|
align: 'center',
|
width: 100,
|
}, {
|
field: 'SlotCode',
|
title: '储位编码',
|
align: 'center',
|
width: 150,
|
},
|
{
|
field: 'SlotStatus',
|
title: '储位状态',
|
align: 'center',
|
width: 100,
|
templet: '#type',
|
},
|
{
|
field: 'Makes',
|
title: '储位使用',
|
align: 'center',
|
width: 100,
|
},
|
{
|
field: 'Propertys',
|
title: '储位属性',
|
align: 'center',
|
width: 100,
|
}, {
|
field: 'Handles',
|
title: '储位处理',
|
align: 'center',
|
width: 100,
|
}, {
|
field: 'Environments',
|
title: '储位环境 ',
|
align: 'center',
|
width: 100,
|
}, {
|
field: 'SlotImlockFlag',
|
templet: '#buttonImp',
|
title: '入库锁定',
|
fixed: 'right',
|
align: 'center',
|
width: 100,
|
}, {
|
field: 'SlotExlockFlag',
|
templet: '#buttonExp',
|
title: '出库锁定',
|
align: 'center',
|
fixed: 'right',
|
width: 100,
|
}, {
|
field: 'SlotCloseFlag',
|
templet: '#buttonTpl',
|
title: '货位屏蔽',
|
fixed: 'right',
|
align: 'center',
|
width: 100,
|
}, {
|
title: '操作',
|
fixed: 'right',
|
width: 100,
|
align: 'center',
|
toolbar: '#table-content-list'
|
}
|
]
|
],
|
})
|
//监听搜索
|
form.on('submit(LAY-app-contlist-search)', function(data) {
|
// var code = data.field.ComCode;//计量编码
|
// var name = data.field.ComName;//计量名称
|
// refreshTable();
|
tableIns.reload({
|
where: { //设定异步数据接口的额外参数,任意设
|
Property: $("#PropertyCode").val(),
|
WarehouseId: $("#WarehouseId").val(),
|
LanewayId: $("#LanewayId").val(),
|
Environment: $("#EnvironmentCode").val(),
|
Msg: $("#Msg").val(),
|
Type: $("#SlotRow").val() + '-' + $("#SlotColumn").val() + '-' + $(
|
"#SlotLayer").val()
|
},
|
page: {
|
curr: 1 //重新从第 1 页开始
|
}
|
});
|
});
|
var id = 0;
|
table.on('tool(LAY-app-content-list)', function(obj) {
|
var data = obj.data;
|
if (obj.event === 'update') {
|
id = data.Id;
|
layer.open({
|
type: 2,
|
title: '储位信息管理',
|
content: 'slotInitForm.html?id=' + id,
|
maxmin: true,
|
area: ['40%', '70%'],
|
btn: ['确定', '取消'],
|
yes: function(index, layero) {
|
var iframeWindow = window['layui-layer-iframe' + index],
|
submitID = 'layuiadmin-app-form-edit',
|
submit = layero.find('iframe').contents().find('#' + submitID);
|
//监听提交
|
iframeWindow.layui.form.on('submit(' + submitID + ')', function(
|
data) {
|
|
var field = data.field; //获取提交的字段
|
console.log(data)
|
//提交 Ajax 成功后,静态更新表格中的数据
|
var param = {
|
Id: id,
|
SlotCloseFlag: field.SlotCloseFlag,
|
SlotCode: field.SlotCode,
|
SlotCodeIndex: field.SlotCodeIndex,
|
SlotColumn: field.SlotColumn,
|
SlotExlockFlag: field.SlotExlockFlag,
|
SlotImlockFlag: field.SlotImlockFlag,
|
SlotInout: field.SlotInout,
|
LanewayName: field.LanewayName,
|
SlotLayer: field.SlotLayer,
|
SlotRemark: field.SlotRemark,
|
SlotRow: field.SlotRow,
|
SlotStatus: field.SlotStatus,
|
SlotType: field.SlotType,
|
WarehouseName: field.WarehouseName,
|
Environment: field.EnvironmentCode,
|
Handle: field.HandleCode,
|
Make: field.MakeCode,
|
Property: field.PropertyCode,
|
SlotLanewayId: data.field.LanewayId,
|
SlotWarehouseId: data.field.houseId,
|
};
|
sendData(IP + "/Equipment/EditWmsBaseSlot", param,
|
'post',
|
function(res) {
|
console.log(res);
|
if (res.code == 1) { //成功
|
layer.msg("修改成功", {
|
icon: 1,
|
time: 1000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
tableIns.reload({
|
page: {
|
curr: 1
|
}
|
});
|
layer.close(index); //关闭弹层
|
});
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
//$.ajax({});
|
});
|
submit.trigger('click');
|
}
|
});
|
}
|
});
|
var param = {
|
id: $.cookie('userId'),
|
};
|
//环境下拉框
|
sendData(IP + "/Equipment/GetEnvironmentList", param, 'post', function(res) {
|
if (res.code == 1) { //成功
|
// $("#EnvironmentCode").append('<option value =""></option>');
|
for (var i = 0; i < res.data.length; i++) {
|
$("#EnvironmentCode").append('<option value =' + res.data[i].Code + '>' + res.data[i]
|
.TypeName +
|
'</option>');
|
}
|
form.render('select');
|
} else { //不成功
|
layer.msg('获取环境信息失败', {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
//回调
|
form.render('select');
|
});
|
}
|
});
|
|
var param = {
|
id: $.cookie('userId'),
|
};
|
//属性下拉框
|
sendData(IP + "/Equipment/GetPropertyList", param, 'post', function(res) {
|
if (res.code == 1) { //成功
|
$("#PropertyCode").append('<option value =""></option>');
|
for (var i = 0; i < res.data.length; i++) {
|
var name = res.data[i].TypeName;
|
var id = res.data[i].Code;
|
$("#PropertyCode").append('<option value =' + id + '>' + name +
|
'</option>');
|
|
}
|
form.render('select');
|
} else { //不成功
|
layer.msg('获取属性信息失败', {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
//回调
|
form.render('select');
|
});
|
}
|
});
|
var active = {
|
edit0: function() {
|
var checkStatus = table.checkStatus('LAY-app-content-list'),
|
checkData = checkStatus.data; //得到选中的数据
|
if (checkData.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
layer.confirm('确定要将选择的储位入库锁定吗?', function(index) {
|
console.log(checkData);
|
var ids = new Array();
|
for (var i = 0; i < checkData.length; i++) {
|
ids[i] = checkData[i].Id;
|
}
|
var param = {
|
idsist: ids,
|
Type: '1',
|
Flag: 1,
|
};
|
sendData(IP + "/Equipment/UpdateSLot", param, 'post', function(res) {
|
console.log(res);
|
if (res.code == 1) { //成功
|
layer.msg(res.msg, {
|
icon: 1,
|
time: 1000 //1秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
tableIns.reload({
|
page: {
|
curr: 1
|
}
|
});
|
});
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
});
|
},
|
edit1: function() {
|
var checkStatus = table.checkStatus('LAY-app-content-list'),
|
checkData = checkStatus.data; //得到选中的数据
|
if (checkData.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
layer.confirm('确定要将选择的储位解除入库锁定吗?', function(index) {
|
console.log(checkData);
|
var ids = new Array();
|
for (var i = 0; i < checkData.length; i++) {
|
ids[i] = checkData[i].Id;
|
}
|
var param = {
|
idsist: ids,
|
Type: '1',
|
Flag: 0,
|
};
|
sendData(IP + "/Equipment/UpdateSLot", param, 'post', function(res) {
|
console.log(res);
|
if (res.code == 1) { //成功
|
layer.msg(res.msg, {
|
icon: 1,
|
time: 1000 //1秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
tableIns.reload({
|
page: {
|
curr: 1
|
}
|
});
|
});
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
});
|
},
|
edit2: function() {
|
var checkStatus = table.checkStatus('LAY-app-content-list'),
|
checkData = checkStatus.data; //得到选中的数据
|
if (checkData.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
layer.confirm('确定要将选择的储位出库锁定吗?', function(index) {
|
console.log(checkData);
|
var ids = new Array();
|
for (var i = 0; i < checkData.length; i++) {
|
ids[i] = checkData[i].Id;
|
}
|
var param = {
|
idsist: ids,
|
Type: '2',
|
Flag: 1,
|
};
|
sendData(IP + "/Equipment/UpdateSLot", param, 'post', function(res) {
|
console.log(res);
|
if (res.code == 1) { //成功
|
layer.msg(res.msg, {
|
icon: 1,
|
time: 1000 //1秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
tableIns.reload({
|
page: {
|
curr: 1
|
}
|
});
|
});
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
});
|
},
|
edit3: function() {
|
var checkStatus = table.checkStatus('LAY-app-content-list'),
|
checkData = checkStatus.data; //得到选中的数据
|
if (checkData.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
layer.confirm('确定要将选择的储位解除出库锁定吗?', function(index) {
|
console.log(checkData);
|
var ids = new Array();
|
for (var i = 0; i < checkData.length; i++) {
|
ids[i] = checkData[i].Id;
|
}
|
var param = {
|
idsist: ids,
|
Type: '2',
|
Flag: 0,
|
};
|
sendData(IP + "/Equipment/UpdateSLot", param, 'post', function(res) {
|
console.log(res);
|
if (res.code == 1) { //成功
|
layer.msg(res.msg, {
|
icon: 1,
|
time: 1000 //1秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
tableIns.reload({
|
page: {
|
curr: 1
|
}
|
});
|
});
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
});
|
},
|
edit4: function() {
|
var checkStatus = table.checkStatus('LAY-app-content-list'),
|
checkData = checkStatus.data; //得到选中的数据
|
if (checkData.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
layer.confirm('确定要将选择的储位屏蔽吗?', function(index) {
|
console.log(checkData);
|
var ids = new Array();
|
for (var i = 0; i < checkData.length; i++) {
|
ids[i] = checkData[i].Id;
|
}
|
var param = {
|
idsist: ids,
|
Type: '3',
|
Flag: 1,
|
};
|
sendData(IP + "/Equipment/UpdateSLot", param, 'post', function(res) {
|
console.log(res);
|
if (res.code == 1) { //成功
|
layer.msg(res.msg, {
|
icon: 1,
|
time: 1000 //1秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
tableIns.reload({
|
page: {
|
curr: 1
|
}
|
});
|
});
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
});
|
},
|
edit5: function() {
|
var checkStatus = table.checkStatus('LAY-app-content-list'),
|
checkData = checkStatus.data; //得到选中的数据
|
if (checkData.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
layer.confirm('确定要将选择的储位解除屏蔽吗?', function(index) {
|
console.log(checkData);
|
var ids = new Array();
|
for (var i = 0; i < checkData.length; i++) {
|
ids[i] = checkData[i].Id;
|
}
|
var param = {
|
idsist: ids,
|
Type: '3',
|
Flag: 0,
|
};
|
sendData(IP + "/Equipment/UpdateSLot", param, 'post', function(res) {
|
console.log(res);
|
if (res.code == 1) { //成功
|
layer.msg(res.msg, {
|
icon: 1,
|
time: 1000 //1秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
tableIns.reload({
|
page: {
|
curr: 1
|
}
|
});
|
});
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
});
|
}
|
};
|
var param = {
|
id: $.cookie('userId'),
|
};
|
//获取仓库下拉框
|
sendData(IP + "/Interface/GetWareHouseList", param, 'post', function(res) {
|
if (res.code == 1) { //成功
|
// console.log(res.data);
|
for (var i = 0; i < res.data.length; i++) {
|
$("#WarehouseId").append('<option value =' + res.data[i].WarehouseId + '>' + res
|
.data[i].WarehouseName +
|
'</option>');
|
}
|
form.render('select');
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
form.on('select(getHouseId)', function(data) {
|
getHouseId(data.value);
|
});
|
function getHouseId(selectedvalue) {
|
if (selectedvalue) {
|
houseid=selectedvalue;
|
var param = {
|
id: $.cookie('userId'),
|
WarehouseId:houseid
|
};
|
//获取 区域下拉框
|
sendData(IP + "/Equipment/GetLanewayList", param, 'post', function(res) {
|
$("#LanewayId").empty();
|
if (res.code == 1) { //成功
|
$("#LanewayId").append('<option value =""></option>');
|
for (var i = 0; i < res.data.length; i++) {
|
var name = res.data[i].LanewayName;
|
var id = res.data[i].Id;
|
$("#LanewayId").append('<option value =' + id + '>' + name +
|
'</option>');
|
}
|
form.render('select');
|
} else { //不成功
|
layer.msg('获取巷道信息失败', {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
//回调
|
form.render('select');
|
});
|
}
|
});
|
}else{
|
houseid = 0;
|
|
$("#LanewayId").empty();
|
|
form.render('select');
|
}
|
};
|
$('.layui-btn.layuiadmin-btn-list').on('click', function() {
|
var type = $(this).data('type');
|
active[type] ? active[type].call(this) : '';
|
});
|
// refreshTable();
|
$(function() {
|
$(".inlock").hide();
|
});
|
$(function() {
|
$(".tolock").hide();
|
});
|
$(function() {
|
$(".shield").hide();
|
});
|
sendData(IP + "/Menu/GetPermission", param, 'post', function(res) {
|
|
if (res.code == 1) { //成功
|
|
for (var k = 0; k < res.data.length; k++) {
|
if (res.data[k].ModuleId == "2D3F1E3D26A84DDCA7199608EDB4B1B2") {
|
$(function() {
|
|
$(".inlock").show();
|
});
|
}
|
if (res.data[k].ModuleId == "CB1324D8DB2F47B8A3D82375DC655EA1") {
|
$(function() {
|
$(".tolock").show();
|
|
});
|
}
|
if (res.data[k].ModuleId == "CFE9F0EEFF524A368B31A0A15ADD6150") {
|
$(function() {
|
$(".shield").show();
|
|
});
|
}
|
}
|
} else { //不成功
|
layer.msg('获取信息失败', {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
//回调
|
});
|
}
|
|
});
|
});
|
</script>
|
</body>
|
</html>
|