From 68ad4cf704c0a7c575936455d07e3e2f53fefbc4 Mon Sep 17 00:00:00 2001
From: 王佳豪 <g675230687@126.com>
Date: 星期五, 26 三月 2021 14:29:26 +0800
Subject: [PATCH] 1.0.5 1.小太阳需求改动
---
src/main/webapp/views/pda/combPro.html | 64 ++++++++++++++++++++++----------
1 files changed, 44 insertions(+), 20 deletions(-)
diff --git a/src/main/webapp/views/pda/combPro.html b/src/main/webapp/views/pda/combPro.html
index 5952267..268cd00 100644
--- a/src/main/webapp/views/pda/combPro.html
+++ b/src/main/webapp/views/pda/combPro.html
@@ -55,13 +55,13 @@
<body>
<!-- 澶撮儴 -->
<header>
- <div class="layui-input-inline">
- <label class="layui-form-label">鏉$爜</label>
- <input class="layui-input" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="鎵爜 / 杈撳叆" autocomplete="off">
- </div>
<div class="layui-input-inline" style="margin-top: 5px">
- <label class="layui-form-label">鍗曞彿</label>
- <input class="layui-input" id="billNo" onkeyup="find(this)" placeholder="鎵爜 / 杈撳叆" autocomplete="off" style="width: 75%; height: 40px; margin-right: 0;">
+ <label class="layui-form-label" style="margin-left: 16px">鍗曞彿</label>
+ <input class="layui-input" id="billNo" oninput="find(this)" placeholder="鎵爜 / 杈撳叆" autocomplete="off" style="width: 175px; height: 40px; margin-right: 0;">
+ </div>
+ <div class="layui-input-inline">
+ <label class="layui-form-label">鎵樼洏鐮�</label>
+ <input class="layui-input" style="width: 175px;" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="鎵爜 / 杈撳叆" autocomplete="off">
</div>
</header>
@@ -74,6 +74,7 @@
<div class="layui-btn-container">
<button type="button" id="reset-btn" class="layui-btn layui-btn-primary" onclick="reset()">閲嶇疆</button>
<button type="button" id="comb-btn" class="layui-btn layui-btn-normal " onclick="comb()" style="margin-left: 20px">缁勬墭</button>
+ <button type="button" id="retrun-btn" class="layui-btn layui-btn-primary " onclick="back()" style="margin-left: 20px">杩斿洖</button>
<span id="tips"></span>
</div>
</footer>
@@ -88,6 +89,10 @@
<span>鍚嶇О</span>
<input id="matName" type="text" disabled="disabled" style="width: 70%">
</div>
+ <div class="form-item">
+ <span>鐢熶骇鍗曞彿</span>
+ <input id="warehouse" type="text" disabled="disabled" style="width: 60%;height: 24.8px; color: blue">
+ </div>
<div class="form-item" style="margin-top: 5px">
<span style="vertical-align: middle">鏁伴噺</span>
<div class="number-tool" style="vertical-align: middle">
@@ -97,9 +102,10 @@
<button id="remove" onclick="remove()">绉婚櫎</button>
<button id="confirm" onclick="confirm()">淇濆瓨</button>
</div>
+
</body>
<script>
- window.onload = function(){document.getElementById("code").focus();}
+ window.onload = function(){document.getElementById("billNo").focus();}
var tableIns;
var countLayer;
layui.use(['table','laydate', 'form'], function() {
@@ -114,9 +120,10 @@
limit: 500,
cellMinWidth: 50,
cols: [[
- {fixed: 'left', align: 'center', field: 'count', title: '鏁伴噺', event: 'modify', style:'cursor: pointer;color: blue', width:50},
{field: 'matNo', align: 'center', title: '鐗╂枡缂栫爜'},
- {field: 'matName', align: 'center', title: '鐗╂枡鍚嶇О'}
+ {field: 'mnemonic', align: 'center', title: '鐢熶骇鍗曞彿'},
+ {fixed: 'right', align: 'center', field: 'count', title: '鏁伴噺', event: 'modify', style:'cursor: pointer;color: blue', width:50},
+// {field: 'matName', align: 'center', title: '鐗╂枡鍚嶇О'}
]],
done: function (res, curr, count) {
}
@@ -132,12 +139,13 @@
offset: '20px',
title: '淇敼鏁伴噺',
shadeClose: true,
- area: ['80%', '200px'],
+ area: ['80%', '220px'],
content: $("#modify"),
success: function (layero, index) {
$('#matNo').val(data.matNo);
$('#matName').val(data.matName);
$('#count').val(data.count);
+ $('#warehouse').val(data.warehouse);
maxCount = data.count;
}
});
@@ -148,9 +156,9 @@
});
function findCode(el) {
- if (el.value.length === 7) {
- $('#billNo').focus();
- }
+// if (el.value.length === 7) {
+// $('#code').focus();
+// }
}
// 娣诲姞琛ㄦ牸鏁版嵁
@@ -159,7 +167,7 @@
for (var i=0;i<data.length;i++) {
var toPush = true;
for (var j=0;j<matData.length;j++){
- if (data[i].matNo === matData[j].matNo) {
+ if (data[i].matNo === matData[j].matNo && data[i].warehouse === matData[j].warehouse) {
matData[j].count = Number(matData[j].count) + Number(data[i].count);
toPush = false;
}
@@ -169,7 +177,7 @@
}
}
tableIns.reload({data: matData});
- $("#comb-btn").focus();
+// $("#comb-btn").focus();
}
@@ -180,7 +188,15 @@
if (isEmpty(el.value)) {
return;
}
- var billNo = el.value.split(",")[0].split("=")[1];
+// var billNo = el.value.split(",")[0].split("=")[1];
+ var billNo = el.value;
+ if (isEmpty(billNo)) {
+ return;
+ }
+ // 璧嬪�煎墠娓呯┖琛ㄦ牸
+ matData = [];
+ tableIns.reload({data: matData});
+
$.ajax({
url: baseUrl + "/mobile/bill/query/auth",
headers: {'token': localStorage.getItem('token')},
@@ -199,7 +215,7 @@
tips(res.msg, true)
}
}
- })
+ });
}
/************************************* 鏁伴噺 ****************************************/
@@ -223,8 +239,9 @@
function confirm(){
var matNo = $('#matNo').val();
var count = $('#count').val();
+ var warehouse = $("#warehouse").val() === '' ? null : $("#warehouse").val();
for (var j=0;j<matData.length;j++){
- if (matNo === matData[j].matNo) {
+ if (matNo === matData[j].matNo && warehouse === matData[j].warehouse) {
if (count > maxCount || count < minCount) {
tips("鏁伴噺涓嶈兘瓒呰繃鑼冨洿", true);
return;
@@ -240,8 +257,9 @@
// 绉婚櫎鐗╂枡
function remove() {
var matNo = $('#matNo').val();
+ var warehouse = $("#warehouse").val() === '' ? null : $("#warehouse").val();
for (var j=0;j<matData.length;j++){
- if (matNo === matData[j].matNo) {
+ if (matNo === matData[j].matNo && warehouse === matData[j].warehouse) {
matData.splice(j, 1);
}
}
@@ -293,13 +311,15 @@
return;
}
var billNo = $('#billNo').val();
+ var warehouse = $('#warehouse').val();
$.ajax({
url: baseUrl+"/mobile/comb/auth",
headers: {'token': localStorage.getItem('token')},
data: JSON.stringify({
barcode: barcode,
combMats: matData,
- billNo: billNo
+ billNo: billNo,
+ warehouse: warehouse,
}),
contentType:'application/json;charset=UTF-8',
method: 'POST',
@@ -338,5 +358,9 @@
$("#code").focus();
}
}
+
+ function back() {
+ parent.backIndex();
+ }
</script>
</html>
\ No newline at end of file
--
Gitblit v1.9.1