diff --git a/src/main/resources/static/js/stockTaking/stockTakingForMaterial_mobile.js b/src/main/resources/static/js/stockTaking/stockTakingForMaterial_mobile.js
index 219507cc..a8c8d974 100644
--- a/src/main/resources/static/js/stockTaking/stockTakingForMaterial_mobile.js
+++ b/src/main/resources/static/js/stockTaking/stockTakingForMaterial_mobile.js
@@ -80,47 +80,51 @@ layui.use(['form', 'step', 'flow', 'table', 'inputTag'], function () {
$("#LAY_FlowForMaterial").empty();
takingPre = 0;
let req = {};
- req.mid = $("#mid").val();
+ let mid = $("#mid").val();
+ req.mid = mid;
req.size = size;
- flow.load({
- elem: '#LAY_FlowForMaterial' //流加载容器
- , done: function (page, next) { //执行下一页的回调
- let result;
- let lis = [];
- req.page = page;
- $.ajax({
- url: '/material/findMaterialByConditionForStockTaking',
- data: req,
- type: 'get',
- dataType: 'json',
- contentType: "application/json;charset=utf-8",
- success: function (res) {
- result = res.data;
- lis.push("
");
- for (let i = 0; i < result.length; i++) {
- let splitInventory = result[i].splitInventory;
- let keys = Object.keys(splitInventory);
- let InventoryItem = "";
- for (let j = 0; j < keys.length; j++) {
- let key = keys[j];
- let item = '
' + "计量单位:" + key + ";对应库存:" + splitInventory[key] + '
';
- InventoryItem += item;
+ if(mid !== ""){
+ flow.load({
+ elem: '#LAY_FlowForMaterial' //流加载容器
+ , done: function (page, next) { //执行下一页的回调
+ let result;
+ let lis = [];
+ req.page = page;
+ $.ajax({
+ url: '/material/findMaterialByConditionForStockTaking',
+ data: req,
+ type: 'get',
+ dataType: 'json',
+ contentType: "application/json;charset=utf-8",
+ success: function (res) {
+ result = res.data;
+ lis.push("
");
+ for (let i = 0; i < result.length; i++) {
+ let splitInventory = result[i].splitInventory;
+ let keys = Object.keys(splitInventory);
+ let InventoryItem = "";
+ for (let j = 0; j < keys.length; j++) {
+ let key = keys[j];
+ let item = '
' + "计量单位:" + key + ";对应库存:" + splitInventory[key] + '
';
+ InventoryItem += item;
+ }
+ lis.push('
' +
+ '');
+ lis.push('
'
+ + InventoryItem
+ + '
');
}
- lis.push('
' +
- '');
- lis.push('
'
- + InventoryItem
- + '
');
+ lis.push('
');
+ takingPre += result.length;
+ //执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页
+ //pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多
+ next(lis.join(''), takingPre < res.count);
}
- lis.push('
');
- takingPre += result.length;
- //执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页
- //pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多
- next(lis.join(''), takingPre < res.count);
- }
- });
- }
- });
+ });
+ }
+ });
+ }
+
};
@@ -314,8 +318,8 @@ layui.use(['form', 'step', 'flow', 'table', 'inputTag'], function () {
iframeChildren.css('height', '100%');
},
end: function () {
- var mid = $("#mid").val();
- if (mid !== '') {
+ if (mid !== "") {
+ console.log(mid)
let loading2 = layer.open({type: 3, shade: [0.25, '#000'], icon: 2, speed: 0});
$.ajax({
url: "/material/findMatrialById?mid=" + mid + "&type=out",
diff --git a/target/classes/templates/pages/showInventory/showInventoryForMaterial.html b/target/classes/templates/pages/showInventory/showInventoryForMaterial.html
index 4054ba03..2949b697 100644
--- a/target/classes/templates/pages/showInventory/showInventoryForMaterial.html
+++ b/target/classes/templates/pages/showInventory/showInventoryForMaterial.html
@@ -179,7 +179,7 @@
let InventoryItem = "";
for (let j = 0; j < keys.length; j++) {
let key = keys[j];
- let item = '' + "计量单位:" + key + ";库存数量:" + splitInventory[key] + '
';
+ let item = '' + "计量单位:" + key + ";对应库存:" + splitInventory[key] + '
';
InventoryItem += item;
}
lis.push('');