-
-
-
+
@@ -101,17 +117,21 @@
}
+ function updateFlow(){
+
+ }
+
let socket = null;
let newIndexShade;
- layui.use(['form', 'table', 'upload', 'flow'], function () {
+ layui.use(['form', 'upload', 'flow', 'element'], function () {
var $ = layui.jquery,
form = layui.form,
upload = layui.upload,
flow = layui.flow,
- table = layui.table;
+ element = layui.element;
let takingPre = 0;
let size = 8;
@@ -131,9 +151,10 @@
lis.push('
');
lis.push('
'
- +'
' + result[i].code + '
'
- +'
' + result[i].version + '
'
- + '
' + "品牌:"+result[i].brand + '
'
+ + '
' + result[i].code + '
'
+ + '
' + result[i].version + '
'
+ + '
' + "品牌:" + result[i].brand + '
'
+ + '
' + result[i].typeName + '
'
+ '
');
}
lis.push('
');
@@ -166,8 +187,26 @@
});
});
-
-
+ $('#openSonByMateralType').on('click', function () {
+ layer.open({
+ type: 2,
+ title: '弹窗内容',
+ skin: 'layui-layer-rim',
+ maxmin: true,
+ shadeClose: true, //点击遮罩关闭层
+ area: ['70%', '70%'],
+ move: '.layui-layer-title',
+ fixed: false,
+ content: '/selectType',
+ success: function (layero, index) {
+ var children = layero.children();
+ var content = $(children[1]);
+ var iframeChildren = $(content.children());
+ content.css('height', '100%');
+ iframeChildren.css('height', '100%');
+ }
+ });
+ });
// 用于进行渲染库位编码
@@ -197,10 +236,59 @@
if (data.version !== '') {
req.version = data.version.trim();
}
+ if (data.materialTypeId !== '') {
+ req.materialTypeId = data.materialTypeId;
+ }
+ if(Object.keys(req).length === 0){
+ updateFlow({"data":[]})
+ }else{
+ $.ajax({
+ url: "/material/findInventory",
+ type: "get",
+ data: req,
+ dataType: "json",
+ contentType: "application/json;charset=utf-8",
+ success:function (res) {
+ takingPre = 0;
+ $("#LAY_Inventory").empty();
+ updateFlow(res);
+ }
+ });
+ }
+
+
+
//执行搜索重载
return false;
});
+ updateFlow = function(res){
+ flow.load({
+ elem: '#LAY_Inventory' //流加载容器
+ , done: function (page, next) { //执行下一页的回调
+ let lis = [];
+ let result = res.data;
+ lis.push("
");
+ for (let i = 0; i < result.length; i++) {
+ lis.push('
');
+ lis.push('
'
+ + '
' + result[i].code + '
'
+ + '
' + result[i].version + '
'
+ + '
' + "品牌:" + result[i].brand + '
'
+ + '
' + result[i].typeName + '
'
+ + '
');
+ }
+ lis.push('
');
+
+ takingPre += result.length;
+ //执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页
+ //pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多
+ next(lis.join(''), takingPre < res.count);
+ }
+ })
+ };
+
closeShowDataMessage = function () {
$("#layui-layer-shade-x" + newIndexShade).remove();