<!DOCTYPE html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<title>layuiAdmin 控制台主页一</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">
|
<style type="text/css">
|
html,body{
|
height: 100%;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="layui-fluid" style="padding: 10px;height: 97%;">
|
<div class="layui-row layui-col-space15" style="height: 100%;">
|
<div class="layui-col-md8" style="height: 100%;">
|
<div class="layui-card" style="height: 30%;">
|
<div class="layui-card-header">快捷方式</div>
|
<div class="layui-card-body">
|
|
<div class="layui-carousel layadmin-carousel layadmin-shortcut">
|
<div id="">
|
<ul>
|
<li id="approvalBtn">
|
<div style="float: left;margin-left: 5%;">
|
<a lay-href="InfoSearchManage/ReportDayList.html">
|
<i style="font-size: 30px;"
|
class="layui-icon layui-icon-console"></i>
|
<cite style="font-size: 20px;">出入库日报</cite>
|
</a>
|
</div>
|
|
<li id="approvalBtnmonth">
|
<div style="float: left;margin-left: 10%;">
|
<a lay-href="InfoSearchManage/ReportMonthList.html">
|
<i style="font-size: 30px;"
|
class="layui-icon layui-icon-console"></i>
|
<cite style="font-size: 20px;">出入库月报</cite>
|
</a>
|
</div>
|
|
<li id="approvalBtnyear">
|
<div style="float: left;margin-left: 10%;">
|
<a lay-href="InfoSearchManage/ReportYearList.html">
|
<i style="font-size: 30px;"
|
class="layui-icon layui-icon-console"></i>
|
<cite style="font-size: 20px;">出入库年报</cite>
|
</a>
|
</div>
|
|
<li id="approvalBtnlow">
|
<div style="float: left;margin-left: 10%;">
|
<a lay-href="StockManage/LowStockSlotList.html">
|
<i style="font-size: 30px;"
|
class="layui-icon layui-icon-engine"></i>
|
<cite style="font-size: 20px;">低库存预警</cite>
|
</a>
|
</div>
|
|
<li id="approvalBtnhight">
|
<div style="float: left;margin-left: 10%;">
|
<a lay-href="StockManage/ExpireStockSlotList.html">
|
<i style="font-size: 30px;"
|
class="layui-icon layui-icon-engine"></i>
|
<cite style="font-size: 20px;">超期预警</cite>
|
</a>
|
</div>
|
|
</ul>
|
<br><br><br><br>
|
|
<ul>
|
<li id="approvalBtnImportB">
|
<div style="float: left;margin-left: 5%;">
|
<a lay-href="ImportManage/ImportBillList.html">
|
<i style="font-size: 30px;"
|
class="layui-icon layui-icon-template-1"></i>
|
<cite style="font-size: 20px;">入库单管理</cite>
|
</a>
|
</div>
|
|
<li id="approvalBtnImportO">
|
<div style="float: left;margin-left: 10%;">
|
<a lay-href="ImportManage/ImportOrderList.html">
|
<i style="font-size: 30px;"
|
class="layui-icon layui-icon-cols"></i>
|
<cite style="font-size: 20px;">入流水管理</cite>
|
</a>
|
</div>
|
|
<li id="approvalBtnExportB">
|
<div style="float: left;margin-left: 10%;">
|
<a lay-href="ExportManage/ExportBillList.html">
|
<i style="font-size: 30px;"
|
class="layui-icon layui-icon-template-1"></i>
|
<cite style="font-size: 20px;">出库单管理</cite>
|
</a>
|
</div>
|
|
<li id="approvalBtnExportO">
|
<div style="float: left;margin-left: 10%;">
|
<a lay-href="ExportManage/ExportOrderList.html">
|
<i style="font-size: 30px;"
|
class="layui-icon layui-icon-cols"></i>
|
<cite style="font-size: 20px;">出流水管理</cite>
|
</a>
|
</div>
|
|
<li id="approvalBtnSearch">
|
<div style="float: left;margin-left: 10%; ">
|
<a lay-href="StockManage/StockSlotList.html">
|
<i style="font-size: 30px;"
|
class="layui-icon layui-icon-log"></i>
|
<cite style="font-size: 20px;">库存查询</cite>
|
</a>
|
</div>
|
|
</ul>
|
</div>
|
|
|
</div>
|
|
</div>
|
</div>
|
<!-- <div class="layui-col-md20" style="height: 30%;margin-bottom: 15px;padding: 2px;">
|
|
</div> -->
|
|
<!-- <div class="layui-col-md12" style="height: 70%;padding: 2px;">
|
|
</div> -->
|
<div class="layui-card" style="height: 70%;">
|
<div class="layui-card-header">数据概览</div>
|
<div class="layui-card-body">
|
<br><br><br>
|
<div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade"
|
lay-filter="LAY-index-dataview">
|
<div carousel-item id="LAY-index-dataview">
|
<div><i class="layui-icon layui-icon-loading1 layadmin-loading"></i></div>
|
<div></div>
|
<div></div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
|
<div class="layui-col-md4" style="height: 100%;">
|
|
<div class="layui-card" style="height: 30%;">
|
<div class="layui-card-header">待办事项</div>
|
<div class="layui-card-body">
|
<div class="layui-carousel layadmin-carousel layadmin-backlog">
|
<div carousel-item>
|
<ul class="layui-row layui-col-space10">
|
<li class="layui-col-xs6">
|
<a lay-href="InfoSearchManage/HomeTasks.html?flag=import"
|
class="layadmin-backlog-body">
|
<h3>入库任务</h3>
|
<p><cite id="importTask"></cite></p>
|
</a>
|
</li>
|
<li class="layui-col-xs6">
|
<a lay-href="InfoSearchManage/HomeTasks.html?flag=export"
|
class="layadmin-backlog-body">
|
<h3>出库任务</h3>
|
<p><cite id="exportTask"></cite></p>
|
</a>
|
</li>
|
<li class="layui-col-xs6">
|
<a lay-href="InfoSearchManage/HomeTasks.html?flag=move" class="layadmin-backlog-body">
|
<h3>移库任务</h3>
|
<p><cite id="moveTask"></cite></p>
|
</a>
|
</li>
|
<li class="layui-col-xs6">
|
<a lay-href="InfoSearchManage/HomeTasks.html?flag=check" class="layadmin-backlog-body">
|
<h3>盘点任务</h3>
|
<p><cite id="checkTask"></cite></p>
|
</a>
|
</li>
|
</ul>
|
</div>
|
</div>
|
</div>
|
</div>
|
|
|
<div class="layui-card" style="height: 70%;">
|
<div class="layui-card-header">货物占比</div>
|
<br><br><br>
|
<div class="layui-carousel layadmin-carousel layadmin-dataview">
|
<div id="echar" style="width: 100%; height: 100%; margin: 0; ">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
|
<script src="../../../layuiadmin/layui/layui.js?t=1"></script>
|
<script src="../../../layuiadmin/layui/layui.js?t=1"></script>
|
<script src="../../../js/jquery-3.5.1.min.js"></script>
|
<script src="../../../js/jquery.cookie.js"></script>
|
<script src="../../../js/public.js"></script>
|
<script>
|
|
layui.config({
|
base: '../../../layuiadmin/' //静态资源所在路径
|
}).extend({
|
index: 'lib/index' //主入口模块
|
}).use(['index', 'console', 'table', 'laypage', 'layer', 'echarts'], function() {
|
var table = layui.table,
|
form = layui.form,
|
laypage = layui.laypage,
|
layer = layui.layer,
|
echarts = layui.echarts;
|
|
sendData(IP + "/IndexEchar/ImportTaskDayList", param, 'post', function(res) {
|
if (res.code == 0) { //成功
|
var list=res.data;
|
initEchars(list);
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
|
sendData(IP + "/IndexEchar/ExportTaskDayList", param, 'post', function(res) {
|
if (res.code == 0) { //成功
|
var Exlist=res.data;
|
var exkey = []
|
var exvalue = []
|
for (var j in Exlist) {
|
exkey.push(j)
|
exvalue.push(Exlist[j])
|
}
|
$.cookie('exvalue', exvalue);
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
|
sendData(IP + "/IndexEchar/GetCheckTask", param, 'post', function(res) {
|
if (res.code == 0) { //成功
|
$("#checkTask").append(res.data);
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
sendData(IP + "/IndexEchar/GetImportTask", param, 'post', function(res) {
|
if (res.code == 0) { //成功
|
$("#importTask").append(res.data);
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
sendData(IP + "/IndexEchar/GetExportTask", param, 'post', function(res) {
|
if (res.code == 0) { //成功
|
$("#exportTask").append(res.data);
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
sendData(IP + "/IndexEchar/GetMoveTask", param, 'post', function(res) {
|
if (res.code == 0) { //成功
|
$("#moveTask").append(res.data);
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
});
|
|
var key = []
|
var value = []
|
sendData(IP + "/IndexEchar/GoodListEchar", param, 'post', function(res) {
|
if (res.code == 0) { //成功
|
var goodList = res.data;
|
|
for (var i in goodList) {
|
key.push(i)
|
value.push(goodList[i])
|
}
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {});
|
}
|
this.echars = echarts.init(document.getElementById("echar"));
|
var option2 = {
|
title: {
|
text: '物品类型占比',
|
x: 'center',
|
textStyle: {
|
fontSize: 20,
|
}
|
},
|
tooltip: {
|
trigger: 'item',
|
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
},
|
legend: {
|
orient: 'vertical',
|
x: 'left',
|
top:100,
|
itemWidth:70,
|
|
formatter: '{name}',
|
data: ['成品', '辅料', '化学品', '废料'],
|
calculble:true,
|
},
|
|
series: [{
|
name: '物品占比',
|
type: 'pie',
|
radius: '70%', //饼图的半径大小
|
center: ['60%', '60%'], //饼图的位置
|
label: { //饼图图形上的文本标签
|
normal: {
|
show: true,
|
position: 'inner', //标签的位置
|
textStyle: {
|
fontWeight: 300,
|
fontSize: 16 //文字的字体大小
|
},
|
formatter: '{d}%'
|
|
|
}
|
},
|
data: [{
|
value: value[0],
|
name: key[0]
|
},
|
{
|
value: value[1],
|
name: key[1]
|
},
|
{
|
value: value[2],
|
name: key[2]
|
},
|
{
|
value: value[3],
|
name: key[3]
|
}
|
]
|
}]
|
};
|
this.echars.setOption(option2);
|
});
|
|
$(window).resize(function(){
|
//alert(1);
|
this.echars.resize();
|
});
|
|
$(function() {
|
$("#approvalBtn").hide();
|
});
|
$(function() {
|
$("#approvalBtnmonth").hide();
|
});
|
$(function() {
|
$("#approvalBtnyear").hide();
|
});
|
$(function() {
|
$("#approvalBtnlow").hide();
|
});
|
$(function() {
|
$("#approvalBtnhight").hide();
|
});
|
$(function() {
|
$("#approvalBtnImportB").hide();
|
});
|
$(function() {
|
$("#approvalBtnImportO").hide();
|
});
|
$(function() {
|
$("#approvalBtnExportB").hide();
|
});
|
$(function() {
|
$("#approvalBtnExportO").hide();
|
});
|
$(function() {
|
$("#approvalBtnSearch").hide();
|
});
|
|
var element = layui.element;
|
var houseId = 0;
|
var param = {
|
Id: $.cookie('userId')
|
}
|
var xml = '';
|
|
function getchiled(data, mainId) {
|
if (data) {
|
var list = data.filter(item => item.ParentId == mainId);
|
if (list) {
|
for (var i = 0; i < list.length; i++) {
|
var id = list[i].Id;
|
//查询有无子菜单
|
var count = data.filter(item => item.ParentId == id).length;
|
if (count > 0) {
|
xml = xml +
|
'<dd>' +
|
'<a href="javascript:;">' + list[i].Name + '</a>' +
|
'<dl class="layui-nav-child">';
|
getchiled(data, id);
|
xml = xml +
|
'</dl></dd>';
|
} else {
|
xml = xml +
|
'<dd>' +
|
'<a lay-href="' + list[i].Url + '">' + list[i].Name + '</a>' +
|
'</dd>';
|
}
|
}
|
}
|
}
|
}
|
var menuList;
|
sendData(IP + "/Menu/GetPermission", param, 'post', function(res) {
|
|
if (res.code == 1) { //成功
|
var list = res.data.filter(item => item.Layer == 0);
|
if (list) {
|
for (var i = 0; i < list.length; i++) {
|
xml = xml +
|
'<li class="layui-nav-item">' +
|
'<a href="javascript:;" lay-tips=' + list[i].Icon +
|
' lay-direction="2">' +
|
// '<i class="layui-icon ' + list[i].Icon + '"></i>' +
|
'<span class="iconfont ' + list[i].Icon + '"></span>' +
|
'<cite>' + list[i].Name + '</cite>' +
|
'</a>';
|
var id = list[i].Id;
|
//查询有无子菜单
|
var count = res.data.filter(item => item.ParentId == id).length;
|
if (count > 0) {
|
xml = xml +
|
'<dl class="layui-nav-child">';
|
getchiled(res.data, id);
|
xml = xml +
|
'</dl>';
|
}
|
xml = xml +
|
'</li>'
|
}
|
}
|
|
|
$("#LAY-system-side-menu").append(xml);
|
element.render("#leftmenu");
|
for (var k = 0; k < res.data.length; k++) {
|
if (res.data[k].ModuleId == "f1dc303849b0421a94a8d4a80d770480") {
|
$(function() {
|
//document.getElementById("orgList1").style.display="none";
|
//document.getElementById("orgLists").style.display="none";
|
$("#approvalBtn").show();
|
});
|
}
|
if (res.data[k].ModuleId == "f1dc303849b0421a94a8d4a80d770439") {
|
$(function() {
|
//document.getElementById("orgList1").style.display="none";
|
//document.getElementById("orgLists").style.display="none";
|
$("#approvalBtnmonth").show();
|
});
|
}
|
if (res.data[k].ModuleId == "f1dc303849b0421a94a8d4a80d770435") {
|
$(function() {
|
//document.getElementById("orgList1").style.display="none";
|
//document.getElementById("orgLists").style.display="none";
|
$("#approvalBtnyear").show();
|
});
|
}
|
if (res.data[k].ModuleId == "f1dc303849b0421a94a8d4a80d770432") {
|
$(function() {
|
//document.getElementById("orgList1").style.display="none";
|
//document.getElementById("orgLists").style.display="none";
|
$("#approvalBtnlow").show();
|
});
|
}
|
if (res.data[k].ModuleId == "2a6685601f464907b67be1131e5be2d8") {
|
$(function() {
|
//document.getElementById("orgList1").style.display="none";
|
//document.getElementById("orgLists").style.display="none";
|
$("#approvalBtnhight").show();
|
});
|
}
|
if (res.data[k].ModuleId == "a69a67e8a03543a4acc2f67f9f99f8f7") {
|
$(function() {
|
//document.getElementById("orgList1").style.display="none";
|
//document.getElementById("orgLists").style.display="none";
|
$("#approvalBtnImportB").show();
|
});
|
}
|
if (res.data[k].ModuleId == "ffc1a121f9e84696bf62fce353037f8e") {
|
$(function() {
|
//document.getElementById("orgList1").style.display="none";
|
//document.getElementById("orgLists").style.display="none";
|
$("#approvalBtnImportO").show();
|
});
|
}
|
if (res.data[k].ModuleId == "eadf832e2d2f48edb97100401e588bce") {
|
$(function() {
|
//document.getElementById("orgList1").style.display="none";
|
//document.getElementById("orgLists").style.display="none";
|
$("#approvalBtnExportB").show();
|
});
|
}
|
if (res.data[k].ModuleId == "bc24bc958bc14a4c8e1dd5c2d8c4f851") {
|
$(function() {
|
//document.getElementById("orgList1").style.display="none";
|
//document.getElementById("orgLists").style.display="none";
|
$("#approvalBtnExportO").show();
|
});
|
}
|
if (res.data[k].ModuleId == "b51312ec97724a0198e7cb9e1c1efeca") {
|
$(function() {
|
//document.getElementById("orgList1").style.display="none";
|
//document.getElementById("orgLists").style.display="none";
|
$("#approvalBtnSearch").show();
|
});
|
}
|
// else{
|
// $("#approvalBtn").css({"display": "none"});
|
// }
|
}
|
} else { //不成功
|
layer.msg('获取信息失败', {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function() {
|
//回调
|
});
|
}
|
});
|
|
})
|
</script>
|
</body>
|
</html>
|