From 98610c8e9101b11678e6bc06bef2abfc45f5dc4c Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 24 九月 2021 10:36:21 +0800
Subject: [PATCH] 1
---
src/main/webapp/views/pda/locNormalIn.html | 41 ++++++++++++++++++++++++++++++++++++-----
1 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/src/main/webapp/views/pda/locNormalIn.html b/src/main/webapp/views/pda/locNormalIn.html
index e554323..8b1d8c1 100644
--- a/src/main/webapp/views/pda/locNormalIn.html
+++ b/src/main/webapp/views/pda/locNormalIn.html
@@ -170,6 +170,7 @@
<button onclick="add()">+</button>
</div>
</div>
+ <button id="remove" onclick="remove()">绉婚櫎</button>
<button id="confirm" onclick="confirm()">淇濆瓨</button>
</div>
@@ -271,14 +272,24 @@
function confirm() {
var matNo = $('#matNo').val();
var count = $('#count').val();
+ if (count > maxCount) {
+ alert("鏁伴噺涓嶈兘瓒呰繃" + maxCount);
+ return;
+ }
+ if (count < minCount) {
+ alert("鏁伴噺涓嶈兘浣庝簬" + minCount);
+ return;
+ }
var mnemonic = $("#mnemonic").val() === '' ? null : $("#mnemonic").val();
for (var j = 0; j < matData.length; j++) {
- if (matNo === matData[j].matNo && mnemonic === matData[j].mnemonic) {
- if (count > maxCount || count < minCount) {
- tips("鏁伴噺涓嶈兘瓒呰繃鑼冨洿", true);
- return;
+ if (mnemonic) {
+ if (matNo === matData[j].matNo && mnemonic === matData[j].mnemonic) {
+ matData[j].count = Number(count);
}
- matData[j].count = Number(count);
+ } else {
+ if (matNo === matData[j].matNo) {
+ matData[j].count = Number(count);
+ }
}
}
tableIns.reload({data: matData});
@@ -286,6 +297,26 @@
tips("淇敼鎴愬姛");
}
+ function remove() {
+ var matnr = $('#matNo').val();
+ var index = $('#index').val();
+ var mnemonic = $("#mnemonic").val() === '' ? null : $("#mnemonic").val();
+ for (var j = 0; j < matData.length; j++) {
+ if (mnemonic) {
+ if (matnr === matData[j].matNo && mnemonic === matData[j].mnemonic) {
+ matData.splice(j, 1);
+ }
+ } else {
+ if (matnr === matData[j].matNo) {
+ matData.splice(j, 1);
+ }
+ }
+ }
+ tableIns.reload({data: matData});
+ layer.close(countLayer);
+ tips("绉婚櫎鎴愬姛");
+ }
+
window.onload = function () {
document.getElementById("uuid").focus();
}
--
Gitblit v1.9.1