Browse Source

为扫码查看库存页面添加查询库存详情功能

lwx_dev
erdanergou 2 years ago
parent
commit
15df965d98
  1. 6
      target/classes/templates/pages/depository/table-out_mobile.html
  2. 3
      target/classes/templates/pages/depository/table-stock_mobile.html
  3. 41
      target/classes/templates/pages/showInventory/showInventoryForLocation.html

6
target/classes/templates/pages/depository/table-out_mobile.html

@ -301,11 +301,7 @@
$(window).on("resize", function () {
layer.full(index);
});
}
$('body').on('click', '[data-refresh]', function () {
location.reload();
})
};
});
</script>

3
target/classes/templates/pages/depository/table-stock_mobile.html

@ -335,9 +335,6 @@
return false;
}
$('body').on('click', '[data-refresh]', function () {
location.reload();
})
});
</script>

41
target/classes/templates/pages/showInventory/showInventoryForLocation.html

@ -104,7 +104,7 @@
let size = 8;
$(function () {
let loading2 = layer.open({ type: 3, shade: [0.25, '#000'], icon: 2, speed: 0});
let loading2 = layer.open({type: 3, shade: [0.25, '#000'], icon: 2, speed: 0});
$.ajax({
url: "/place/findLocationById",
data: JSON.stringify({"id": id, "type": type}),
@ -142,10 +142,6 @@
});
updateFlowShowForLocation = function () {
let req = {};
req.depositoryId = depositoryId;
@ -161,7 +157,7 @@
req.size = size;
req.page = page;
$.ajax({
url:"/material/findInventoryForStockTaking",
url: "/material/findInventoryForStockTaking",
data: req,
type: 'get',
dataType: 'json',
@ -173,21 +169,22 @@
let splitInventory = result[i].splitInventory;
let keys = Object.keys(splitInventory);
let InventoryItem = "";
let brandItem ='<p>' + "物料品牌:"+result[i].mbrand + '</p>';
if(result[i].mbrand === ""){
let brandItem = '<p>' + "物料品牌:" + result[i].mbrand + '</p>';
if (result[i].mbrand === "") {
brandItem = "";
}
for (let j = 0; j < keys.length; j++) {
let key = keys[j];
let item = '<p>' + "计量单位:" + key + ";对应库存:" + splitInventory[key] + '</p>';
let item = '<p>' + "计量单位:" + key + ";对应库存:" + splitInventory[key] + '</p>';
InventoryItem += item;
}
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1"><div class="layui-card-header"><h2>' + "物料名称:" + result[i].mname + '</h2></div>');
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' + result[i].id + ')">' +
'<div class="layui-card-header"><h2>' + "物料名称:" + result[i].mname + '</h2></div>');
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">'
+ '<p>' + "物料编码:"+result[i].mcode + '</p>'
+ '<p>' + "物料型号:"+result[i].version + '</p>'
+ '<p>' + "物料编码:" + result[i].mcode + '</p>'
+ '<p>' + "物料型号:" + result[i].version + '</p>'
+ brandItem
+ '<p>' + "所处位置:"+result[i].dname+"-"+result[i].kingdeecode + '</p>'
+ '<p>' + "所处位置:" + result[i].dname + "-" + result[i].kingdeecode + '</p>'
+ InventoryItem
+ '</div></div></li>');
}
@ -202,9 +199,21 @@
});
};
$('body').on('click', '[data-refresh]', function () {
location.reload();
})
showDetail = function (obj) {
var index = layer.open({
title: '库存信息详情',
type: 2,
shade: 0.2,
maxmin: true,
shadeClose: true,
area: ['100%', '100%'],
content: '/InventoryView?id=' + obj,
});
$(window).on("resize", function () {
layer.full(index);
});
return false;
}
})
</script>

Loading…
Cancel
Save