From e1749547c76a5d8bae94e47d38d4d75b481610c1 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期四, 09 九月 2021 10:51:15 +0800 Subject: [PATCH] # --- src/main/webapp/views/pda/stockCheck.html | 38 ++++++++++++++++++++++++++++++-------- 1 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/views/pda/stockCheck.html b/src/main/webapp/views/pda/stockCheck.html index 525e933..81462bd 100644 --- a/src/main/webapp/views/pda/stockCheck.html +++ b/src/main/webapp/views/pda/stockCheck.html @@ -50,6 +50,17 @@ padding: 5px 20px; color: darkred; } + + /**缁胯壊鍕�*/ + #node-ok { + float: left; + width: 15px; + height: 15px; + border-radius: 50%; + margin-top: 13px; + background-color: #2ac845; + display: none; + } </style> </head> <body> @@ -57,7 +68,8 @@ <header> <div class="layui-input-inline" style="margin-top: 0px"> <label class="layui-form-label">璐т綅</label> - <input class="layui-input" id="locNo" onkeyup="find(this)" placeholder="鎵爜 / 杈撳叆" autocomplete="off" style="width: 75%; height: 40px; margin-right: 0;"> + <input class="layui-input" id="locNo" onkeyup="find(this)" placeholder="鎵爜 / 杈撳叆" autocomplete="off" style="width: 65%; height: 40px; margin-right: 0;float: left"> + <span id="node-ok"></span> </div> <div style="margin: 5px 5px"> <button id="replenish-btn" type="button" class="layui-btn layui-btn-normal" onclick="replenish()"><i class="layui-icon">+</i>琛ュ厖</button> @@ -114,7 +126,7 @@ cellMinWidth: 50, cols: [[ {fixed: 'left', align: 'center', field: 'count', title: '鏁伴噺', event: 'modify', style:'font-weight: bold;', width:50}, - {field: 'matnr', align: 'center', title: '鍟嗗搧缂栧彿', event: 'modify'}, + // {field: 'matnr', align: 'center', title: '鍟嗗搧缂栧彿', event: 'modify'}, {field: 'maktx', align: 'center', title: '鍟嗗搧鍚嶇О', event: 'modify'} ]], done: function (res, curr, count) { @@ -150,6 +162,7 @@ */ function find(el){ if (isEmpty(el.value)) { + $('#node-ok').hide(); return; } $.ajax({ @@ -161,9 +174,12 @@ method: 'GET', success: function (res) { if (res.code === 200) { - if (res.data != null) { - locDetlData = []; - initTableData(res.data); + locDetlData = []; + initTableData(res.data); + if (res.data != null && res.data.length > 0) { + $('#node-ok').show(); + } else { + $('#node-ok').hide(); } } else if (res.code === 403) { top.location.href = baseUrl + "/pda"; @@ -264,6 +280,7 @@ content: 'matQuery.html', success: function(layero, index){ $('.layui-layer-title').css('font-size', '16px'); + $('.layui-layer.layui-layer-iframe').css('border-radius', '8px'); }, end: function () { // $('#mat-btn').focus(); @@ -288,6 +305,7 @@ // 閲嶇疆 function reset() { $('#locNo').val(""); + $('#node-ok').hide(); locDetlData = []; tableIns.reload({data: locDetlData}); } @@ -299,9 +317,13 @@ tips("璐т綅涓嶈兘涓虹┖", true); return; } - if (locDetlData.length === 0) { - tips("璇锋彁鍙栫墿鏂�", true); - return; + if (locDetlData.length > 0) { + for (var i = 0; i<locDetlData.length; i++) { + if (locDetlData[i].count === null || locDetlData[i].count === 0) { + tips(locDetlData[i].matnr + "鍟嗗搧鏁伴噺閿欒", true); + return; + } + } } $.ajax({ url: baseUrl+"/work/stock/check", -- Gitblit v1.9.1