|
|
|
@ -20,14 +20,21 @@ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.myEchart { |
|
|
|
min-width: 500px; |
|
|
|
min-height: 500px; |
|
|
|
margin: 0 2px; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
</head> |
|
|
|
|
|
|
|
<body> |
|
|
|
<input type="text" id="id" th:value="${record.getId()}" name="id" style="display: none"> |
|
|
|
<div class="layui-row layui-col-space1"> |
|
|
|
<div class="layui-col-xs12 layui-col-md8"> |
|
|
|
<div class="grid-demo grid-demo-bg1"> |
|
|
|
<div class="layui-fluid"> |
|
|
|
<div class="layui-row layui-col-space1"> |
|
|
|
<div class="layui-row layui-col-xs12 layui-col-md8"> |
|
|
|
<div> |
|
|
|
<div class="panel panel-info"> |
|
|
|
<div class="panel-heading">物料基本信息 |
|
|
|
<button type="button" th:attr="mid=${record.getMid()}" lay-on="editMaterialInfo" |
|
|
|
@ -64,9 +71,42 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div class="panel panel-primary"> |
|
|
|
<div class="panel-heading">数据图标 |
|
|
|
</div> |
|
|
|
<div class="panel-body"> |
|
|
|
<div class="layui-col-xs4 myEchart"> |
|
|
|
<div class="panel panel-warning"> |
|
|
|
<div class="panel-heading">物料入库明细</div> |
|
|
|
<div class="panel-body"> |
|
|
|
<div id="echarts-line-in" style="height:500px;width: 500px;"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="layui-col-xs4 myEchart"> |
|
|
|
<div class="panel panel-warning"> |
|
|
|
<div class="panel-heading">物料出库明细</div> |
|
|
|
<div class="panel-body"> |
|
|
|
<div id="echarts-line-out" style="height: 500px;width: 500px"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="layui-col-xs4 myEchart"> |
|
|
|
<div class="panel panel-warning"> |
|
|
|
<div class="panel-heading">物料库存明细</div> |
|
|
|
<div class="panel-body"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="layui-col-xs6 layui-col-md4"> |
|
|
|
<div class="grid-demo"> |
|
|
|
<div class=""> |
|
|
|
<div class="panel panel-success"> |
|
|
|
<div class="panel-heading">库存基本信息</div> |
|
|
|
<div class="panel-body"> |
|
|
|
@ -98,7 +138,8 @@ |
|
|
|
th:attr="id='materialUnit'+${materialAndPlace.getId()}"> |
|
|
|
<option th:text="${record.getUnit()}" value="-1" |
|
|
|
class="myOption"></option> |
|
|
|
<option class="myOption" th:each="splitInfo,iterStar:${record.getSplitInfoList()}" |
|
|
|
<option class="myOption" |
|
|
|
th:each="splitInfo,iterStar:${record.getSplitInfoList()}" |
|
|
|
th:value="${splitInfo.getNewUnit()}" |
|
|
|
th:text="${splitInfo.getNewUnit()}"></option> |
|
|
|
</select> |
|
|
|
@ -127,35 +168,8 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="layui-col-xs6 layui-col-md12"> |
|
|
|
<div class="panel panel-primary"> |
|
|
|
<div class="layui-col-xs4"> |
|
|
|
<div class="panel panel-warning"> |
|
|
|
<div class="panel-heading">物料入库明细</div> |
|
|
|
<div class="panel-body"> |
|
|
|
<div id="echarts-line"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="layui-col-xs4"> |
|
|
|
<div class="panel panel-warning"> |
|
|
|
<div class="panel-heading">物料出库明细</div> |
|
|
|
<div class="panel-body"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="layui-col-xs4"> |
|
|
|
<div class="panel panel-warning"> |
|
|
|
<div class="panel-heading">物料库存明细</div> |
|
|
|
<div class="panel-body"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<script src="/static/lib/layui-v2.8.6/layui.js" 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> |
|
|
|
@ -349,8 +363,24 @@ |
|
|
|
|
|
|
|
|
|
|
|
// 柱状图 |
|
|
|
var echartLineChart = echarts.init(document.getElementById('echarts-line')); |
|
|
|
var optionLineChart = { |
|
|
|
var echartLineChartIn = echarts.init(document.getElementById('echarts-line-in')); |
|
|
|
var echartLineChartOut = echarts.init(document.getElementById('echarts-line-out')); |
|
|
|
var optionLineChartIn = { |
|
|
|
xAxis: { |
|
|
|
type: 'category', |
|
|
|
boundaryGap: false, |
|
|
|
data: [] |
|
|
|
}, |
|
|
|
yAxis: { |
|
|
|
type: 'value' |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
trigger: "axis", |
|
|
|
}, |
|
|
|
series: [] |
|
|
|
|
|
|
|
}; |
|
|
|
var optionLineChartOut = { |
|
|
|
xAxis: { |
|
|
|
type: 'category', |
|
|
|
boundaryGap: false, |
|
|
|
@ -359,8 +389,8 @@ |
|
|
|
yAxis: { |
|
|
|
type: 'value' |
|
|
|
}, |
|
|
|
tooltip:{ |
|
|
|
trigger:"axis", |
|
|
|
tooltip: { |
|
|
|
trigger: "axis", |
|
|
|
}, |
|
|
|
series: [] |
|
|
|
|
|
|
|
@ -371,7 +401,7 @@ |
|
|
|
type: 'post', |
|
|
|
async: true, |
|
|
|
dataType: "json", |
|
|
|
data:JSON.stringify({"id":id}), |
|
|
|
data: JSON.stringify({"id": id}), |
|
|
|
contentType: "application/json;charset=utf-8", |
|
|
|
complete: function (XHR, TS) { |
|
|
|
layer.close(this.layerIndex); |
|
|
|
@ -383,13 +413,32 @@ |
|
|
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
|
|
|
}, |
|
|
|
success: function (result) { |
|
|
|
console.log(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 legendItem = data["legend"]; |
|
|
|
let seriesInItem = []; |
|
|
|
let seriesOutItem = []; |
|
|
|
seriesInItem.push(amountItemForIn); |
|
|
|
seriesInItem.push(countItemForIn); |
|
|
|
seriesOutItem.push(amountItemForOut); |
|
|
|
seriesOutItem.push(countItemForOut); |
|
|
|
optionLineChartIn.series = seriesInItem; |
|
|
|
optionLineChartOut.series = seriesOutItem; |
|
|
|
|
|
|
|
optionLineChartIn.xAxis.data = dayNames; |
|
|
|
optionLineChartIn.legend = legendItem; |
|
|
|
optionLineChartOut.legend = legendItem; |
|
|
|
optionLineChartOut.xAxis.data = dayNames; |
|
|
|
echartLineChartIn.setOption(optionLineChartIn); |
|
|
|
echartLineChartOut.setOption(optionLineChartOut); |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
</script> |
|
|
|
|
|
|
|
|