|
|
@ -88,33 +88,52 @@ |
|
|
<div class="panel-heading">数据图标 |
|
|
<div class="panel-heading">数据图标 |
|
|
</div> |
|
|
</div> |
|
|
<div class="panel-body"> |
|
|
<div class="panel-body"> |
|
|
<div class="layui-col-xs4 myEchart"> |
|
|
<ul id="myTab" class="nav nav-tabs nav-pills"> |
|
|
<div class="panel panel-warning"> |
|
|
<li class="active"> |
|
|
<div class="panel-heading">物料入库明细</div> |
|
|
<a href="#inventoryEchart" data-toggle="tab"> |
|
|
<div class="panel-body"> |
|
|
库存明细图标 |
|
|
<div id="echarts-line-in" style="height:500px;width: 500px;"> |
|
|
</a> |
|
|
|
|
|
</li> |
|
|
|
|
|
<li><a href="#applicationInEchart" data-toggle="tab">入库明细图表</a></li> |
|
|
|
|
|
<li><a href="#applicationOutEchart" data-toggle="tab">出库明细图表</a></li> |
|
|
|
|
|
|
|
|
|
|
|
</ul> |
|
|
|
|
|
<div id="myTabContent" class="tab-content"> |
|
|
|
|
|
<div class="tab-pane fade in active" id="inventoryEchart"> |
|
|
|
|
|
<div class="layui-col-xs4 myEchart"> |
|
|
|
|
|
<div class="panel panel-warning"> |
|
|
|
|
|
<div class="panel-body"> |
|
|
|
|
|
<div id="echarts-line-inventory" style="height: 500px;width: 500px"> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="tab-pane fade" id="applicationInEchart"> |
|
|
<div class="layui-col-xs4 myEchart"> |
|
|
<div class="layui-col-xs4 myEchart"> |
|
|
<div class="panel panel-warning"> |
|
|
<div class="panel panel-warning"> |
|
|
<div class="panel-heading">物料出库明细</div> |
|
|
<div class="panel-body"> |
|
|
<div class="panel-body"> |
|
|
<div id="echarts-line-in" style="height:500px;width: 500px;"> |
|
|
<div id="echarts-line-out" style="height: 500px;width: 500px"> |
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="tab-pane fade" id="applicationOutEchart"> |
|
|
<div class="layui-col-xs4 myEchart"> |
|
|
<div class="layui-col-xs4 myEchart"> |
|
|
<div class="panel panel-warning"> |
|
|
<div class="panel panel-warning"> |
|
|
<div class="panel-heading">物料库存明细</div> |
|
|
<div class="panel-body"> |
|
|
<div class="panel-body"> |
|
|
<div id="echarts-line-out" style="height: 500px;width: 500px"> |
|
|
<div id="echarts-line-inventory" style="height: 500px;width: 500px"> |
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -156,6 +175,8 @@ |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<script src="/static/lib/layui-v2.8.6/layui.js" charset="utf-8"></script> |
|
|
<script src="/static/lib/layui-v2.8.6/layui.js" charset="utf-8"></script> |
|
|
|
|
|
<script src="/static/lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script> |
|
|
|
|
|
<script src="/static/lib/bootstrap-3.4.1-dist/js/bootstrap.min.js" charset="utf-8"></script> |
|
|
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script> |
|
|
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script> |
|
|
<script src="/static/lib/echarts/echarts.js" charset="utf-8"></script> |
|
|
<script src="/static/lib/echarts/echarts.js" charset="utf-8"></script> |
|
|
<script> |
|
|
<script> |
|
|
@ -293,7 +314,7 @@ |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
// 数据行点击事件 |
|
|
// 数据行点击事件 |
|
|
table.on('row(currentTableId)', function(obj){ |
|
|
table.on('rowDouble(currentTableId)', function (obj) { |
|
|
var data = obj.data; // 获取当前行数据 |
|
|
var data = obj.data; // 获取当前行数据 |
|
|
let id = data.id; |
|
|
let id = data.id; |
|
|
let req = {}; |
|
|
let req = {}; |
|
|
@ -471,7 +492,7 @@ |
|
|
let pid = $(obj).find("option:selected").attr("pid"); |
|
|
let pid = $(obj).find("option:selected").attr("pid"); |
|
|
let id = obj.id.split("placeItem")[1]; |
|
|
let id = obj.id.split("placeItem")[1]; |
|
|
let placeAndMaterialId = obj.value; |
|
|
let placeAndMaterialId = obj.value; |
|
|
$("#applicationIn"+id).attr("placeId",pid); |
|
|
$("#applicationIn" + id).attr("placeId", pid); |
|
|
let unit = $("#unitItem" + id).val(); |
|
|
let unit = $("#unitItem" + id).val(); |
|
|
let req = {}; |
|
|
let req = {}; |
|
|
req.unit = unit; |
|
|
req.unit = unit; |
|
|
@ -493,63 +514,60 @@ |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initEchart = function (req) { |
|
|
|
|
|
|
|
|
initEchart = function(req) { |
|
|
|
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
url: '/depositoryRecord/getApplicationForMaterial', |
|
|
url: '/depositoryRecord/getApplicationForMaterial', |
|
|
type: 'post', |
|
|
type: 'post', |
|
|
async: true, |
|
|
async: true, |
|
|
dataType: "json", |
|
|
dataType: "json", |
|
|
data: JSON.stringify(req), |
|
|
data: JSON.stringify(req), |
|
|
contentType: "application/json;charset=utf-8", |
|
|
contentType: "application/json;charset=utf-8", |
|
|
complete: function (XHR, TS) { |
|
|
complete: function (XHR, TS) { |
|
|
layer.close(this.layerIndex); |
|
|
layer.close(this.layerIndex); |
|
|
if (XHR.status !== 200) { |
|
|
if (XHR.status !== 200) { |
|
|
layer.alert("系统繁忙,稍后重试"); |
|
|
layer.alert("系统繁忙,稍后重试"); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
beforeSend: function () { |
|
|
|
|
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
|
|
|
|
|
}, |
|
|
|
|
|
success: function (result) { |
|
|
|
|
|
let data = result.data; |
|
|
|
|
|
let dayNames = data["dayNames"]; |
|
|
|
|
|
let amountItemForIn = data["amountItemForIn"]; |
|
|
|
|
|
let countItemForIn = data["countItemForIn"]; |
|
|
|
|
|
let amountItemForOut = data["amountItemForOut"]; |
|
|
|
|
|
let countItemForOut = data["countItemForOut"]; |
|
|
|
|
|
let countItemForInventory = data["countItemForInventory"]; |
|
|
|
|
|
let amountItemForInventory = data["amountItemForInventory"]; |
|
|
|
|
|
let legendItem = data["legend"]; |
|
|
|
|
|
let seriesInItem = []; |
|
|
|
|
|
let seriesOutItem = []; |
|
|
|
|
|
let seriesInventoryItem = []; |
|
|
|
|
|
seriesInItem.push(amountItemForIn); |
|
|
|
|
|
seriesInItem.push(countItemForIn); |
|
|
|
|
|
seriesOutItem.push(amountItemForOut); |
|
|
|
|
|
seriesOutItem.push(countItemForOut); |
|
|
|
|
|
seriesInventoryItem.push(countItemForInventory); |
|
|
|
|
|
seriesInventoryItem.push(amountItemForInventory); |
|
|
|
|
|
optionLineChartIn.series = seriesInItem; |
|
|
|
|
|
optionLineChartOut.series = seriesOutItem; |
|
|
|
|
|
optionLineChartInventory.series = seriesInventoryItem; |
|
|
|
|
|
|
|
|
|
|
|
optionLineChartIn.xAxis.data = dayNames; |
|
|
|
|
|
optionLineChartIn.legend = legendItem; |
|
|
|
|
|
optionLineChartOut.legend = legendItem; |
|
|
|
|
|
optionLineChartOut.xAxis.data = dayNames; |
|
|
|
|
|
optionLineChartInventory.legend = legendItem; |
|
|
|
|
|
optionLineChartInventory.xAxis.data = dayNames; |
|
|
|
|
|
echartLineChartIn.setOption(optionLineChartIn); |
|
|
|
|
|
echartLineChartOut.setOption(optionLineChartOut); |
|
|
|
|
|
echartLineChartInventory.setOption(optionLineChartInventory); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}) |
|
|
beforeSend: function () { |
|
|
|
|
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
|
|
|
|
|
}, |
|
|
|
|
|
success: function (result) { |
|
|
|
|
|
let data = result.data; |
|
|
|
|
|
let dayNames = data["dayNames"]; |
|
|
|
|
|
let amountItemForIn = data["amountItemForIn"]; |
|
|
|
|
|
let countItemForIn = data["countItemForIn"]; |
|
|
|
|
|
let amountItemForOut = data["amountItemForOut"]; |
|
|
|
|
|
let countItemForOut = data["countItemForOut"]; |
|
|
|
|
|
let countItemForInventory = data["countItemForInventory"]; |
|
|
|
|
|
let amountItemForInventory = data["amountItemForInventory"]; |
|
|
|
|
|
let legendItem = data["legend"]; |
|
|
|
|
|
let seriesInItem = []; |
|
|
|
|
|
let seriesOutItem = []; |
|
|
|
|
|
let seriesInventoryItem = []; |
|
|
|
|
|
seriesInItem.push(amountItemForIn); |
|
|
|
|
|
seriesInItem.push(countItemForIn); |
|
|
|
|
|
seriesOutItem.push(amountItemForOut); |
|
|
|
|
|
seriesOutItem.push(countItemForOut); |
|
|
|
|
|
seriesInventoryItem.push(countItemForInventory); |
|
|
|
|
|
seriesInventoryItem.push(amountItemForInventory); |
|
|
|
|
|
optionLineChartIn.series = seriesInItem; |
|
|
|
|
|
optionLineChartOut.series = seriesOutItem; |
|
|
|
|
|
optionLineChartInventory.series = seriesInventoryItem; |
|
|
|
|
|
|
|
|
|
|
|
optionLineChartIn.xAxis.data = dayNames; |
|
|
|
|
|
optionLineChartIn.legend = legendItem; |
|
|
|
|
|
optionLineChartOut.legend = legendItem; |
|
|
|
|
|
optionLineChartOut.xAxis.data = dayNames; |
|
|
|
|
|
optionLineChartInventory.legend = legendItem; |
|
|
|
|
|
optionLineChartInventory.xAxis.data = dayNames; |
|
|
|
|
|
echartLineChartIn.setOption(optionLineChartIn); |
|
|
|
|
|
echartLineChartOut.setOption(optionLineChartOut); |
|
|
|
|
|
echartLineChartInventory.setOption(optionLineChartInventory); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
|