From b4a8d50e3d97fc9e893b554a60134e4eceb012eb Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期一, 05 一月 2026 08:58:08 +0800
Subject: [PATCH] #
---
src/main/webapp/views/pda/locNormalMove.html | 66 +++++++++++++++++++++++++++-----
1 files changed, 55 insertions(+), 11 deletions(-)
diff --git a/src/main/webapp/views/pda/locNormalMove.html b/src/main/webapp/views/pda/locNormalMove.html
index 0f7d878..a2a57cd 100644
--- a/src/main/webapp/views/pda/locNormalMove.html
+++ b/src/main/webapp/views/pda/locNormalMove.html
@@ -13,7 +13,7 @@
</head>
<body>
<!-- 澶撮儴 -->
-<header>
+<header class="layui-form">
<div>
<div class="layui-input-inline">
<label class="layui-form-label">鐗╂枡缂栫爜</label>
@@ -24,15 +24,25 @@
<div>
<div class="layui-input-inline">
<label class="layui-form-label" style="margin-left: 16px">婧愬簱鍖�</label>
- <input class="layui-input" type="number" id="warehouse1" onkeyup="find()" placeholder="鎵爜 / 杈撳叆"
- autocomplete="off" style="width: 60%">
+ <!--<input class="layui-input" id="warehouse1" onkeyup="find(true)" placeholder="鎵爜 / 杈撳叆"-->
+ <!--autocomplete="off" style="width: 60%">-->
+ <div class="layui-input-inline" style="width: 180px">
+ <select id="warehouse1" lay-filter="warehouse1">
+ <option value="">璇烽�夋嫨</option>
+ </select>
+ </div>
</div>
</div>
<div>
<div class="layui-input-inline">
<label class="layui-form-label">鐩爣搴撳尯</label>
- <input class="layui-input" type="number" id="warehouse2" placeholder="鎵爜 / 杈撳叆"
- autocomplete="off" style="width: 60%">
+ <!--<input class="layui-input" id="warehouse2" placeholder="鎵爜 / 杈撳叆"-->
+ <!--autocomplete="off" style="width: 60%" onkeyup="exist('uuid', 'locArea', 'warehouse2')">-->
+ <div class="layui-input-inline" style="width: 180px">
+ <select id="warehouse2">
+ <option value="">璇烽�夋嫨</option>
+ </select>
+ </div>
</div>
</div>
</header>
@@ -72,12 +82,41 @@
limit: 500,
cellMinWidth: 50,
cols: [[
- {type: 'checkbox', fixed: 'left', width: 30},
{field: 'matnr', align: 'center', title: '缂栫爜', event: 'detail', width: 80},
{field: 'maktx', align: 'center', title: '鍚嶇О', event: 'detail'},
- {field: 'warehouse', align: 'center', title: '搴撳尯', event: 'detail', width: 50}
+ {field: 'warehouse', align: 'center', title: '搴撳尯', event: 'detail', width: 50},
+ {type: 'checkbox', fixed: 'right', width: 30},
]],
done: function (res, curr, count) {
+ }
+ });
+
+ form.on('select(warehouse1)', function (data) {
+ var val = data.value;
+ find(true);
+ });
+
+ // 鑾峰彇浠撳簱涓嬫媺
+ $.ajax({
+ url: baseUrl + "/locArea/queryAll/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200) {
+ var html = "";
+ if (res.data && res.data.length > 0) {
+ html += res.data.map(function (item) {
+ return "<Option value=" + item.uuid + ">" + item.name + "</Option>";
+ });
+ }
+ $('#warehouse1').append(html);
+ $('#warehouse2').append(html);
+ layui.form.render('select');
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/pda";
+ } else {
+ layer.msg(res.msg)
+ }
}
});
});
@@ -92,7 +131,7 @@
return;
}
if (warehouse1 == warehouse2) {
- layer.msg("鐩爣搴撳尯鍜屾簮搴撳尯涓�鑷�");
+ layer.msg("鐩爣搴撳尯鍜屾簮搴撳尯涓嶈兘涓�鑷�");
return;
}
// 鍒ゆ柇鍕鹃�夋暟鎹槸鍚︿负绌�
@@ -131,7 +170,10 @@
}
/* 鏍规嵁搴撳尯鍙锋绱㈢墿鏂欎俊鎭� */
- find = () => {
+ find = (flag) => {
+ if (flag) {
+ exist('uuid', 'locArea', 'warehouse1');
+ }
var warehouse = $("#warehouse1").val();
var matnr = $("#matnr").val();
// 鏌ヨ鎺ュ彛
@@ -144,7 +186,7 @@
if (res.code === 200) {
tableIns.reload({
data: res.data,
- })
+ });
} else if (res.code === 403) {
top.location.href = baseUrl + "/pda";
} else {
@@ -168,14 +210,16 @@
* @param warn true锛氱孩鑹插瓧浣�
*/
function tips(msg, warn) {
- layer.msg(msg, {icon: warn?2:1})
+ layer.msg(msg, {icon: warn ? 2 : 1})
}
function reset() {
$('#warehouse1').val("");
$('#warehouse2').val("");
$('#matnr').val("");
+ layui.form.render('select');
tableIns.reload({data: []});
+ layer.closeAll();
}
</script>
</html>
\ No newline at end of file
--
Gitblit v1.9.1