From 8aef28e39575b910aa08c0c102c868d60fb306ea Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 11 七月 2020 16:10:42 +0800
Subject: [PATCH] Merge branch 'dev' of https://gitee.com/luxiaotao1123/zy-asrs
---
src/main/webapp/views/pda/matQuery.html | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 175 insertions(+), 0 deletions(-)
diff --git a/src/main/webapp/views/pda/matQuery.html b/src/main/webapp/views/pda/matQuery.html
new file mode 100644
index 0000000..942ec78
--- /dev/null
+++ b/src/main/webapp/views/pda/matQuery.html
@@ -0,0 +1,175 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/>
+ <title>鐗╂枡鎻愬彇</title>
+ <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
+ <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
+ <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
+ <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
+ <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
+ <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
+ <style>
+
+ .form-box {
+ padding: 15px 5px 5px 5px;
+ font-size: 12px;
+ text-align: center;
+ }
+
+ .form-item {
+ margin-bottom: 10px;
+ }
+
+ .form-box span {
+ font-size: 12px;
+ display: inline-block;
+ text-align: right;
+ width: 50px;
+ }
+ .form-box input {
+ width: 120px;
+ margin-left: 10px;
+ padding-left: 5px;
+ height: 20px;
+ border: 1px solid #777777;
+ overflow:hidden;
+ white-space:nowrap;
+ text-overflow:ellipsis;
+ }
+ #confirm {
+ margin-top: 10px;
+ padding: 5px 20px;
+ }
+
+ .number-tool {
+ margin-left: 10px;
+ padding: 1px 0 1px 5px;
+ display: inline-block;
+ width: 120px;
+ }
+ .number-tool:after {
+ clear: both;
+ content: "";
+ display: table;
+ }
+ .number-tool button {
+ background-color: #fff;
+ margin-top: 2px;
+ font-size: 13px;
+ height: 18px;
+ float: left;
+ width: 20px;
+ border: 1px solid #777777;
+ }
+ .number-tool input {
+ text-align: center;
+ height: 20px;
+ float: left;
+ margin: 0 5px;
+ width: 30px;
+ padding: 0;
+ }
+ </style>
+</head>
+<body>
+
+<div class="form-box">
+ <div class="form-item">
+ <span>鐗╂枡缂栫爜</span>
+ <input id="matNo" type="text" placeholder="鎵爜 / 杈撳叆" onkeyup="find(this)" autocomplete="off">
+ </div>
+ <div class="form-item">
+ <span>鐗╂枡鍚嶇О</span>
+ <input id="matName" type="text" disabled="disabled">
+ </div>
+ <div class="form-item">
+ <span>鐗╂枡瑙勬牸</span>
+ <input id="str2" type="text" disabled="disabled">
+ </div>
+ <div class="form-item">
+ <span>鍗曚綅</span>
+ <input id="str1" type="text" disabled="disabled">
+ </div>
+ <div class="form-item">
+ <span style="vertical-align: middle">鏁伴噺</span>
+ <div class="number-tool" style="vertical-align: middle">
+ <button onclick="reduce()">-</button><input id="count" type="number"><button onclick="add()">+</button>
+ </div>
+ </div>
+ <button id="confirm" onclick="confirm()">鎻愬彇</button>
+</div>
+
+</body>
+<script>
+ var countDom = $('#count');
+ var initMatCount = 1;
+ var pageCurr;
+
+ /**
+ * 鏍规嵁鐗╂枡缂栫爜鏌ヨ鐗╂枡璇︽儏
+ */
+ function find(el){
+ if (isEmpty(el.value)) {
+ return;
+ }
+ $.ajax({
+ url: baseUrl + "/matCode/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ id: el.value
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200) {
+ if (res.data != null) {
+ $('#matName').val(res.data.matName);
+ $('#str1').val(res.data.str1);
+ $('#str2').val(res.data.str2);
+ countDom.focus().val(initMatCount)
+ }
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/pda";
+ } else {
+ alert(res.msg)
+ }
+ }
+ })
+ }
+
+ /**
+ * 鎻愬彇
+ */
+ function confirm(){
+ var data = {
+ matNo: $('#matNo').val(),
+ matName: $('#matName').val(),
+ count: countDom.val()
+ };
+ parent.addTableData(data);
+ parent.layer.close(parent.matCodeLayerIdx);
+ }
+
+ window.onload = function(){document.getElementById("matNo").focus();}
+ $(document).on('click','#confirm', function () {
+ })
+
+ $('body').keydown(function () {
+ if (event.keyCode === 13) {
+ $("#confirm").click();
+ }
+ });
+
+ function add() {
+ countDom.val(Number(countDom.val()) + 1);
+ }
+ function reduce() {
+ if (countDom.val() <= initMatCount) {
+ return;
+ }
+ countDom.val(countDom.val() - 1);
+ }
+
+</script>
+</html>
\ No newline at end of file
--
Gitblit v1.9.1