From c4a55e708109402835cb00991eacab9e97c32d5e Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 10 七月 2020 13:25:37 +0800
Subject: [PATCH] #
---
src/main/webapp/views/pdaCe/index.html | 87 ++++++++++++++++++++++++++++++++-----------
1 files changed, 64 insertions(+), 23 deletions(-)
diff --git a/src/main/webapp/views/pdaCe/index.html b/src/main/webapp/views/pdaCe/index.html
index 0552383..1cfa243 100644
--- a/src/main/webapp/views/pdaCe/index.html
+++ b/src/main/webapp/views/pdaCe/index.html
@@ -6,9 +6,11 @@
<title>涓壃鐗╂祦</title>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<style>
-
* {
font-size: 12px;
+ }
+ html {
+ background-color: #fff;
}
.mat-msg {
@@ -110,6 +112,7 @@
</style>
</head>
<body>
+<button onclick="help()" style="padding: 0 3px; position: absolute; top: 0%; right: 0%">?</button>
<div>
<span>鏉$爜</span>
<input type="text" id="code">
@@ -117,6 +120,7 @@
<div>
<span>鐗╂枡</span>
<input type="text" id="matNo" onkeyup="find(this)" autocomplete="off">
+ <button onclick="find()">鏌ヨ</button>
</div>
<div class="mat-msg" id="mat-msg-id">
@@ -140,6 +144,10 @@
<!-- 璇︽儏 -->
<div class="form-box" id="mat-detail">
+ <div class="form-item form-count">
+ <span style="margin-right: 10px">鏁伴噺</span>
+ <button onclick="reduce()">-</button><input id="count" type="number" style="text-align: center"><button onclick="add()">+</button>
+ </div>
<div class="form-item">
<span>鍚嶇О</span>
<input id="matName" type="text" disabled="disabled" style="background-color: #ececec;color: #000">
@@ -147,10 +155,6 @@
<div class="form-item">
<span>鍗曚綅</span>
<input id="str1" type="text" disabled="disabled" style="background-color: #ececec;color: #000; text-align: center;">
- </div>
- <div class="form-item form-count">
- <span style="margin-right: 10px">鏁伴噺</span>
- <button onclick="reduce()">-</button><input id="count" type="number" style="text-align: center"><button onclick="add()">+</button>
</div>
<div class="form-item form-btn-con">
<button id="confirm" onclick="confirm()">鎻愬彇</button>
@@ -161,6 +165,7 @@
</body>
<script>
+
var matMsgTableBlankRows = 0; // 绌虹櫧琛屾暟
var matData = []; // 琛ㄦ牸鏁版嵁
var code = document.getElementById("code")
@@ -181,6 +186,7 @@
matDetail.style.display = 'none';
var initMatCount = 1;
+ window.onload = function(){matMsg.focus();}
// 鏌ヨ鐗╂祦
function find(el) {
@@ -189,7 +195,7 @@
type: 'post',
headers: [{token: getCookie('token')}],
data: {
- id: el.value
+ id: matNo.value
},
}, function (res) {
if (res.code === 200) {
@@ -201,8 +207,10 @@
// 濉厖鏁版嵁
matName.value = res.data.matName;
str1.value = res.data.str1;
+
+ // count.focus();
count.value = initMatCount;
- document.getElementById("confirm").focus();
+ confirmBtn.focus();
} else {
matMsg.style.display = 'block';
btnCon.style.display = 'block';
@@ -447,28 +455,61 @@
}
}
+ document.onkeyup = function (e) {
+ if (window.event)//濡傛灉window.event瀵硅薄瀛樺湪锛屽氨浠ユ浜嬩欢瀵硅薄涓哄噯
+ e = window.event;
+ var key = e.charCode || e.keyCode;
+ if (key === 112) {
+ code.focus();
+ } else if (key === 113) {
+ matNo.focus();
+ } else if (key === 114) {
+ combBtn.focus();
+ } else if (key === 13) {
+ confirmBtn.focus();
+ }
+
+ // if (code1 === 13) {
+ // if (window.getComputedStyle(matDetail).display === 'block') {
+ // confirm()
+ // } else if (window.getComputedStyle(btnCon).display === 'block') {
+ // comb()
+ // }
+ // }
+ }
+
document.onkeydown = function (e) {
if (window.event)//濡傛灉window.event瀵硅薄瀛樺湪锛屽氨浠ユ浜嬩欢瀵硅薄涓哄噯
e = window.event;
- var code1 = e.charCode || e.keyCode;
- if (code1 === 13) {
- if (window.getComputedStyle(matDetail).display === 'block') {
- confirm()
- } else if (window.getComputedStyle(btnCon).display === 'block') {
- comb()
- }
+ var key = e.charCode || e.keyCode;
+ if (key === 114) {
+ comb()
}
+
+ // if (code1 === 13) {
+ // if (window.getComputedStyle(matDetail).display === 'block') {
+ // confirm()
+ // } else if (window.getComputedStyle(btnCon).display === 'block') {
+ // comb()
+ // }
+ // }
}
// todo
- setTimeout(function () {
- code.value = "888"
- addTableData({
- matNo: "1902980-11/14",
- matName: "閾濆甫|1100-O|0.33*475|",
- str1: "浠�",
- count: 1
- })
- }, 200)
+ // setTimeout(function () {
+ // code.value = "888"
+ // addTableData({
+ // matNo: "1902980-11/14",
+ // matName: "閾濆甫|1100-O|0.33*475|",
+ // str1: "浠�",
+ // count: 1
+ // })
+ // }, 200)
+ function help() {
+ window.alert("鈶� 鎸塅1杈撳叆鏉$爜\n" +
+ "鈶� 鎸塅2杈撳叆鐗╂枡鍙凤紝鎸塃NTER鏌ヨ锛岄�夋嫨鏁伴噺鍚庢彁鍙朶n" +
+ "鈶� 鎸塅3寮�濮嬬粍鎵榎n" +
+ "鍏跺畠锛氭寜F5鍒锋柊椤甸潰");
+ }
</script>
</html>
\ No newline at end of file
--
Gitblit v1.9.1