From 99184ad9016af212f3ae81fd60ac23edcdca34fc Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 28 七月 2020 09:12:56 +0800
Subject: [PATCH] #当前本版十分完美、冻结
---
src/main/webapp/views/pda/comb.html | 18 +++++++++++++-----
src/main/webapp/views/pda/login.html | 2 +-
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/main/webapp/views/pda/comb.html b/src/main/webapp/views/pda/comb.html
index 4f06e8f..24b01a3 100644
--- a/src/main/webapp/views/pda/comb.html
+++ b/src/main/webapp/views/pda/comb.html
@@ -20,7 +20,7 @@
<header>
<div class="layui-input-inline">
<label class="layui-form-label">鏉$爜</label>
- <input class="layui-input" type="text" id="code" placeholder="鎵爜 / 杈撳叆" autocomplete="off">
+ <input class="layui-input" type="number" id="code" onkeyup="findCode(this)" placeholder="鎵爜 / 杈撳叆" autocomplete="off">
</div>
<div style="margin: 5px 5px">
<button id="mat-btn" type="button" class="layui-btn layui-btn-normal" onclick="getMat()"><i class="layui-icon">+</i>鎻愬彇</button>
@@ -66,6 +66,13 @@
window.onload = function(){document.getElementById("code").focus();}
+ function findCode(el) {
+ if (el.value.length === 8) {
+ $('#mat-btn').focus();
+ getMat();
+ }
+ }
+
var matCodeLayerIdx;
function getMat() {
matCodeLayerIdx = layer.open({
@@ -109,7 +116,6 @@
$('#code').val("");
matData = [];
tableIns.reload({data: matData});
- tips("");
}
// 缁勬墭
@@ -157,9 +163,10 @@
* @param warn true锛氱孩鑹插瓧浣�
*/
function tips(msg, warn) {
- let tips = $('#tips');
- tips.html(msg);
- tips.css("color", warn?"red":'#666');
+ // var tips = $('#tips');
+ // tips.html(msg);
+ // tips.css("color", warn?"red":'#666');
+ layer.msg(msg, {icon: warn?2:1})
}
document.onkeyup = function (e) {
@@ -170,6 +177,7 @@
$("#comb-btn").focus();
comb();
} else if (key === 113) {
+ $("#code").val("");
$("#code").focus();
}
}
diff --git a/src/main/webapp/views/pda/login.html b/src/main/webapp/views/pda/login.html
index 678f030..f13bc38 100644
--- a/src/main/webapp/views/pda/login.html
+++ b/src/main/webapp/views/pda/login.html
@@ -105,7 +105,7 @@
form.on('submit(login)', function (data) {
var mobile = $("#mobile").val();
if (mobile === "") {
- alert("璇疯緭鍏ユ墜鏈哄彿");
+ alert("璇疯緭鍏ヨ处鍙�");
return;
}
var password = $("#password").val();
--
Gitblit v1.9.1