| | |
| | | }); |
| | | </script> |
| | | </head> |
| | | <body> |
| | | <body id="body"> |
| | | <div class="layui-fluid" style="padding-bottom: 0;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC"> |
| | | <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC" id="top"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">类别名称</label> |
| | | <label class="layui-form-label" style="width: 60px;">库区名称</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="CategoryName" name="CategoryName" placeholder="请输入类别名称" autocomplete="off" class="layui-input"> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="center"></div> |
| | | |
| | | <div class="layui-card-body"> |
| | | <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table> |
| | | |
| | |
| | | laypage = layui.laypage, |
| | | layer = layui.layer; |
| | | |
| | | var h1 = GetTableHeight(); |
| | | var tableIns; |
| | | |
| | | //获取区域信息 |
| | |
| | | curr: 1 |
| | | } |
| | | tableIns = table.render(infoOptions); |
| | | sendData(IP + "/basis/GetRoleRightList", {}, 'get', function(res) { |
| | | $(function() { |
| | | $("#approvalBtn").hide(); |
| | | }); |
| | | $(function() { |
| | | $(".approvalBtnupt").hide(); |
| | | }); |
| | | $(function() { |
| | | $(".approvalBtndel").hide(); |
| | | }); |
| | | if (res.code == 0) { //成功 |
| | | for (var k = 0; k < res.data.length; k++) { |
| | | if (res.data[k].MenuName == "新增库区") { |
| | | $(function() { |
| | | $("#approvalBtn").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "删除库区") { |
| | | $(function() { |
| | | $(".approvalBtndel").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "编辑库区") { |
| | | console.log(1) |
| | | $(function() { |
| | | $(".approvalBtnupt").show(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { //不成功 |
| | | layer.msg('获取信息失败', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | //回调 |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | else //不成功 |
| | | { |
| | |
| | | } |
| | | }); |
| | | } |
| | | sendData(IP + "/basis/GetRoleRightList", {}, 'get', function(res) { |
| | | $(function() { |
| | | $("#approvalBtn").hide(); |
| | | }); |
| | | $(function() { |
| | | $(".approvalBtnupt").hide(); |
| | | }); |
| | | $(function() { |
| | | $(".approvalBtndel").hide(); |
| | | }); |
| | | if (res.code == 0) { //成功 |
| | | for (var k = 0; k < res.data.length; k++) { |
| | | if (res.data[k].MenuName == "新增类别") { |
| | | $(function() { |
| | | $("#approvalBtn").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "删除类别") { |
| | | $(function() { |
| | | $(".approvalBtndel").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "编辑类别") { |
| | | console.log(1) |
| | | $(function() { |
| | | $(".approvalBtnupt").show(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { //不成功 |
| | | layer.msg('获取信息失败', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | //回调 |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | |
| | | var infoOptions = { |
| | | elem: "#LAY-app-content-list", |
| | | height: "full-95", |
| | | height: h1, |
| | | id: "LAY-app-content-list", |
| | | page: true, |
| | | limit: pageCnt, |
| | |
| | | title: '序号', type: 'numbers', fixed: 'left', width:65 |
| | | }, |
| | | { |
| | | field: 'CategoryNo', title: '类别编码', align: 'center', fixed: 'left',width:100 |
| | | field: 'CategoryNo', title: '库区编码', align: 'center', fixed: 'left',width:100 |
| | | }, |
| | | { |
| | | field: 'CategoryName', title: '类别名称', align: 'center',width:100 |
| | | field: 'CategoryName', title: '库区名称', align: 'center',width:100 |
| | | }, |
| | | { |
| | | field: 'AreaName', title: '绑定区域', align: 'center' |
| | |
| | | add: function() { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '添加类别信息', |
| | | title: '添加库区信息', |
| | | content: 'CategoryForm.html', |
| | | maxmin: true, |
| | | area: ['530px', '530px'], |
| | |
| | | //删除 |
| | | if (obj.event === 'del') |
| | | { |
| | | layer.confirm('确定删除选中的类别?', function(index) { |
| | | layer.confirm('确定删除选中的库区?', function(index) { |
| | | |
| | | cusid = data.Id; |
| | | console.log(cusid); |
| | |
| | | cusId = data.Id; |
| | | layer.open({ |
| | | type: 2, |
| | | title: '编辑类别信息', |
| | | title: '编辑库区信息', |
| | | content: 'CategoryForm.html?id=' + cusId, |
| | | maxmin: true, |
| | | area: ['530px', '530px'], |