|
|
@ -76,60 +76,6 @@ |
|
|
<div class="panel panel-success"> |
|
|
<div class="panel panel-success"> |
|
|
<div class="panel-heading">库存基本信息</div> |
|
|
<div class="panel-heading">库存基本信息</div> |
|
|
<div class="panel-body"> |
|
|
<div class="panel-body"> |
|
|
|
|
|
|
|
|
<!-- <table class="table"> |
|
|
|
|
|
<caption th:text="${record.getDepositoryName()}">所属仓库:</caption> |
|
|
|
|
|
<caption th:text="'备注:'+${record.getRemark()}">备注:</caption> |
|
|
|
|
|
|
|
|
|
|
|
<thead> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td>所处库位</td> |
|
|
|
|
|
<td>计量单位</td> |
|
|
|
|
|
<td>对应数量</td> |
|
|
|
|
|
<td th:style="'display:'+${display}">金额</td> |
|
|
|
|
|
<td>操作</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</thead> |
|
|
|
|
|
<tbody> |
|
|
|
|
|
<tr type="button" |
|
|
|
|
|
th:each="materialAndPlace,iterStar:${record.getMaterialAndPlaceList()}"> |
|
|
|
|
|
<td> |
|
|
|
|
|
<button onclick="changePlaceCode(this)" |
|
|
|
|
|
th:text="${materialAndPlace.getKingdeecode()}" |
|
|
|
|
|
th:attr="id=${materialAndPlace.getId()}" |
|
|
|
|
|
class="layui-btn layui-btn-primary layui-btn-sm"></button> |
|
|
|
|
|
</td> |
|
|
|
|
|
<td> |
|
|
|
|
|
<select class="mySelect" onchange="changeUnitForQuantity(this)" |
|
|
|
|
|
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()}" |
|
|
|
|
|
th:value="${splitInfo.getNewUnit()}" |
|
|
|
|
|
th:text="${splitInfo.getNewUnit()}"></option> |
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
<td> |
|
|
|
|
|
<span th:attr="id='quantity'+${materialAndPlace.getId()}" |
|
|
|
|
|
th:text="${materialAndPlace.getInventory()}"></span> |
|
|
|
|
|
</td> |
|
|
|
|
|
<td th:style="'display:'+${display}"> |
|
|
|
|
|
<span th:attr="id='amounts'+${materialAndPlace.getId()}" |
|
|
|
|
|
th:text="${materialAndPlace.getAmount()}"></span> |
|
|
|
|
|
</td> |
|
|
|
|
|
<td> |
|
|
|
|
|
<a class="layui-btn layui-btn-xs" |
|
|
|
|
|
th:attr="mid=${materialAndPlace.getIid()},depositoryId=${materialAndPlace.getDepository_id()},placeId=${materialAndPlace.getPid()}" |
|
|
|
|
|
lay-on="applicationIn">入库</a> |
|
|
|
|
|
<a class="layui-btn layui-btn-xs" |
|
|
|
|
|
th:attr="code=${materialAndPlace.getMcode()},depositoryId=${materialAndPlace.getDepository_id()}" |
|
|
|
|
|
lay-on="applicationOut">出库</a> |
|
|
|
|
|
</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</tbody> |
|
|
|
|
|
</table>--> |
|
|
|
|
|
<table class="layui-hide" id="currentTableId"></table> |
|
|
<table class="layui-hide" id="currentTableId"></table> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
@ -229,6 +175,10 @@ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function initEchart() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var barCode = []; |
|
|
var barCode = []; |
|
|
var flag = false; |
|
|
var flag = false; |
|
|
@ -292,6 +242,65 @@ |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 柱状图 |
|
|
|
|
|
var echartLineChartIn = echarts.init(document.getElementById('echarts-line-in')); |
|
|
|
|
|
var echartLineChartOut = echarts.init(document.getElementById('echarts-line-out')); |
|
|
|
|
|
var echartLineChartInventory = echarts.init(document.getElementById('echarts-line-inventory')); |
|
|
|
|
|
var optionLineChartIn = { |
|
|
|
|
|
xAxis: { |
|
|
|
|
|
type: 'category', |
|
|
|
|
|
boundaryGap: false, |
|
|
|
|
|
data: [] |
|
|
|
|
|
}, |
|
|
|
|
|
yAxis: { |
|
|
|
|
|
type: 'value' |
|
|
|
|
|
}, |
|
|
|
|
|
tooltip: { |
|
|
|
|
|
trigger: "axis", |
|
|
|
|
|
}, |
|
|
|
|
|
series: [] |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
var optionLineChartOut = { |
|
|
|
|
|
xAxis: { |
|
|
|
|
|
type: 'category', |
|
|
|
|
|
boundaryGap: false, |
|
|
|
|
|
data: [] |
|
|
|
|
|
}, |
|
|
|
|
|
yAxis: { |
|
|
|
|
|
type: 'value' |
|
|
|
|
|
}, |
|
|
|
|
|
tooltip: { |
|
|
|
|
|
trigger: "axis", |
|
|
|
|
|
}, |
|
|
|
|
|
series: [] |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
var optionLineChartInventory = { |
|
|
|
|
|
xAxis: { |
|
|
|
|
|
type: 'category', |
|
|
|
|
|
boundaryGap: false, |
|
|
|
|
|
data: [] |
|
|
|
|
|
}, |
|
|
|
|
|
yAxis: { |
|
|
|
|
|
type: 'value' |
|
|
|
|
|
}, |
|
|
|
|
|
tooltip: { |
|
|
|
|
|
trigger: "axis", |
|
|
|
|
|
}, |
|
|
|
|
|
series: [] |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// 数据行点击事件 |
|
|
|
|
|
table.on('row(currentTableId)', function(obj){ |
|
|
|
|
|
var data = obj.data; // 获取当前行数据 |
|
|
|
|
|
let id = data.id; |
|
|
|
|
|
let req = {}; |
|
|
|
|
|
req.id = id; |
|
|
|
|
|
initEchart(req); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
form.on('select()', function (data) { |
|
|
form.on('select()', function (data) { |
|
|
var id = data.elem.id; //得到select原始DOM对象id |
|
|
var id = data.elem.id; //得到select原始DOM对象id |
|
|
@ -484,62 +493,15 @@ |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 柱状图 |
|
|
|
|
|
var echartLineChartIn = echarts.init(document.getElementById('echarts-line-in')); |
|
|
|
|
|
var echartLineChartOut = echarts.init(document.getElementById('echarts-line-out')); |
|
|
|
|
|
var echartLineChartInventory = echarts.init(document.getElementById('echarts-line-inventory')); |
|
|
|
|
|
var optionLineChartIn = { |
|
|
|
|
|
xAxis: { |
|
|
|
|
|
type: 'category', |
|
|
|
|
|
boundaryGap: false, |
|
|
|
|
|
data: [] |
|
|
|
|
|
}, |
|
|
|
|
|
yAxis: { |
|
|
|
|
|
type: 'value' |
|
|
|
|
|
}, |
|
|
|
|
|
tooltip: { |
|
|
|
|
|
trigger: "axis", |
|
|
|
|
|
}, |
|
|
|
|
|
series: [] |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
var optionLineChartOut = { |
|
|
|
|
|
xAxis: { |
|
|
|
|
|
type: 'category', |
|
|
|
|
|
boundaryGap: false, |
|
|
|
|
|
data: [] |
|
|
|
|
|
}, |
|
|
|
|
|
yAxis: { |
|
|
|
|
|
type: 'value' |
|
|
|
|
|
}, |
|
|
|
|
|
tooltip: { |
|
|
|
|
|
trigger: "axis", |
|
|
|
|
|
}, |
|
|
|
|
|
series: [] |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
var optionLineChartInventory = { |
|
|
|
|
|
xAxis: { |
|
|
|
|
|
type: 'category', |
|
|
|
|
|
boundaryGap: false, |
|
|
|
|
|
data: [] |
|
|
|
|
|
}, |
|
|
|
|
|
yAxis: { |
|
|
|
|
|
type: 'value' |
|
|
|
|
|
}, |
|
|
|
|
|
tooltip: { |
|
|
|
|
|
trigger: "axis", |
|
|
|
|
|
}, |
|
|
|
|
|
series: [] |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/*$.ajax({ |
|
|
initEchart = function(req) { |
|
|
|
|
|
$.ajax({ |
|
|
url: '/depositoryRecord/getApplicationForMaterial', |
|
|
url: '/depositoryRecord/getApplicationForMaterial', |
|
|
type: 'post', |
|
|
type: 'post', |
|
|
async: true, |
|
|
async: true, |
|
|
dataType: "json", |
|
|
dataType: "json", |
|
|
data: JSON.stringify({"id": id}), |
|
|
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); |
|
|
@ -583,7 +545,9 @@ |
|
|
echartLineChartOut.setOption(optionLineChartOut); |
|
|
echartLineChartOut.setOption(optionLineChartOut); |
|
|
echartLineChartInventory.setOption(optionLineChartInventory); |
|
|
echartLineChartInventory.setOption(optionLineChartInventory); |
|
|
} |
|
|
} |
|
|
})*/ |
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|