From 1e07ab637274948e392a37f840c3e6ce9cbe71a1 Mon Sep 17 00:00:00 2001 From: 18516761980 <56479841@qq.com> Date: 星期二, 21 六月 2022 15:30:44 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/luxiaotao1123/zy-asrs into hylyasrs --- src/main/webapp/static/js/order/out.js | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/main/webapp/static/js/order/out.js b/src/main/webapp/static/js/order/out.js index 914e79b..cc84ebe 100644 --- a/src/main/webapp/static/js/order/out.js +++ b/src/main/webapp/static/js/order/out.js @@ -32,7 +32,7 @@ ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl', width: 160} ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜', width: 160} ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', width: 200} - ,{field: 'batch', align: 'center',title: '搴忓垪鐮�'} + ,{field: 'batch', align: 'center',title: '鎵瑰彿'} ,{field: 'specs', align: 'center',title: '瑙勬牸'} // ,{field: 'anfme', align: 'center',title: '鏁伴噺'} // ,{field: 'qty', align: 'center',title: '浣滀笟鏁伴噺', style: 'font-weight: bold'} @@ -154,7 +154,7 @@ // {type: 'checkbox', merge: ['orderNo']}, {field: 'orderNo', title: '鍗曟嵁缂栧彿', merge: true, align: 'center'}, {field: 'title', title: '鍟嗗搧', merge: true, align: 'center', width: 350}, - {field: 'batch', title: '搴忓垪鐮�', align: 'center'}, + {field: 'batch', title: '鎵瑰彿', align: 'center'}, {field: 'anfme', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'}, {field: 'locNo', title: '璐т綅', align: 'center', width: 100, templet: '#locNoTpl'}, {field: 'staNos', align: 'center', title: '鍑哄簱绔�', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, @@ -175,7 +175,6 @@ tableCache[i]['staNo'] = Number(obj.elem.value); } } - // data['staNo'] = Number(obj.elem.value); obj.othis.children().find("input").css("color", "blue"); return false; }); @@ -193,15 +192,22 @@ // 鍑哄簱绔欏彇浜ら泦 let staBatchSelectVal = []; for(let i = 0; i<stoPreTabData.length; i++) { - if (i === 0) { - staBatchSelectVal = stoPreTabData[i].staNos; - } else { - let staNos = stoPreTabData[i].staNos; - staBatchSelectVal = staBatchSelectVal.filter( val => { - return new Set(staNos).has(val) - } - ) + let staNos = stoPreTabData[i].staNos; + if (staNos !== null) { + if (staBatchSelectVal.length === 0) { + staBatchSelectVal = staNos; + } else { + staBatchSelectVal = staBatchSelectVal.filter(val => + { + return new Set(staNos).has(val) + } + ) + } } + } + if (staBatchSelectVal.length === 0) { + layer.msg("鍑哄簱绔欐病鏈変氦闆嗭紝鏃犳硶鎵归噺淇敼", {icon: 2}); + return; } admin.open({ type: 1, @@ -228,11 +234,14 @@ } } } - stoPreTabIdx.reload({data: tableCache}) + stoPreTabIdx.reload({data: tableCache}); arr.forEach(item => { $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .order-sta-select').val(batchSta); - }) + }); layui.form.render('select'); + arr.forEach(item => { + $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .layui-select-title').find("input").css("color", "blue"); + }); layer.close(loadIdx); layer.close(ddIndex); return false; }); -- Gitblit v1.9.1