From 42b24af07f1ec2d1a375232d754128ba41d56f0a Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期四, 29 一月 2026 15:35:55 +0800
Subject: [PATCH] pda匹配单号
---
src/main/webapp/views/pda/materialReceiveOut.html | 130 +++++++++++++++++++++++++++----------------
1 files changed, 82 insertions(+), 48 deletions(-)
diff --git a/src/main/webapp/views/pda/materialReceiveOut.html b/src/main/webapp/views/pda/materialReceiveOut.html
index 70f98ab..bb21722 100644
--- a/src/main/webapp/views/pda/materialReceiveOut.html
+++ b/src/main/webapp/views/pda/materialReceiveOut.html
@@ -61,17 +61,11 @@
<header class="layui-form">
<div class="layui-input-inline">
- <label class="layui-form-label" >鐢熶骇鍗曞彿</label>
+ <label class="layui-form-label">鐢熶骇鍗曞彿/浠诲姟鍗曞彿</label>
<div class="layui-input-inline">
- <input id="soCode" class="layui-input" autocomplete="off" oninput="findCode(this, 'soCode')"
- placeholder="鎵爜 / 杈撳叆" style="width: 175px">
+ <input id="soCodeOrFbillno" class="layui-input" autocomplete="off" oninput="findCode(this, 'soCodeOrFbillno')"
+ placeholder="鎵爜/杈撳叆锛屽涓敤|鍒嗛殧" style="width: 200px">
</div>
- </div>
- <div class="layui-input-inline">
- <label class="layui-form-label">浠诲姟鍗曞彿</label>
- <input class="layui-input" id="fbillno" onkeyup="findCode(this, 'fbillno')" placeholder="鎵爜 / 杈撳叆"
- style="width: 175px"
- autocomplete="off">
</div>
<div class="layui-input-inline">
<label class="layui-form-label">鐗╂枡缂栫爜</label>
@@ -79,6 +73,14 @@
style="width: 175px"
autocomplete="off">
</div>
+<!-- <div class="layui-input-inline">-->
+<!-- <label class="layui-form-label">寮�宸ユ棩鏈�</label>-->
+<!-- <input class="layui-input" id="fplancommitdate" placeholder="閫夋嫨鎴栬緭鍏ユ棩鏈�"-->
+<!-- style="width: 175px"-->
+<!-- autocomplete="off"-->
+<!-- onkeyup="findCode(this, 'fplancommitdate')"-->
+<!-- onchange="findCode(this, 'fplancommitdate')">-->
+<!-- </div>-->
</header>
<main>
@@ -148,7 +150,7 @@
// 琛ㄦ牸鏁版嵁
var materialReceiveList = [];
window.onload = function () {
- document.getElementById("soCode").focus();
+ document.getElementById("soCodeOrFbillno").focus();
}
/**
@@ -165,11 +167,23 @@
}
var tableIns;
- layui.use(['table', 'form'], function () {
+ layui.use(['table', 'form', 'laydate'], function () {
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
var form = layui.form;
+ var laydate = layui.laydate;
+
+ // 鍒濆鍖栨棩鏈熼�夋嫨鍣紙鏀寔閫夋嫨鏃ユ湡鍜屾墜鍔ㄨ緭鍏ワ級
+ laydate.render({
+ elem: '#fplancommitdate',
+ type: 'date',
+ format: 'yyyy-MM-dd',
+ done: function(value, date, endDate) {
+ // 鏃ユ湡閫夋嫨鍚庤Е鍙戞煡璇�
+ findCode(null, 'fplancommitdate');
+ }
+ });
tableIns = table.render({
id: 'materialReceiveOut',
@@ -178,16 +192,14 @@
limit: 500,
cellMinWidth: 50,
cols: [[
- {field: 'invCode', align: 'center', title: '缂栫爜', event: 'detail', width: 80},
+ {field: 'soCode', align: 'center', title: '鐢熸垚鍗曞彿', event: 'detail', width: 100},
{field: 'fbillno', align: 'center', title: '浠诲姟鍗曞彿', event: 'detail', width: 100},
- {field: 'invName', align: 'center', title: '鍚嶇О', event: 'detail'},
+ {field: 'invCode', align: 'center', title: '鐗╂枡缂栫爜', event: 'detail', width: 80},
{field: 'whName', align: 'center', title: '搴撳尯', event: 'detail', width: 50},
{
field: 'remainQty',
align: 'center',
title: '鏁伴噺',
- event: 'detail',
- style: 'color: blue',
event: 'modify',
style: 'cursor: pointer;color: blue',
width: 50,
@@ -200,6 +212,24 @@
return d.remainQty || 0;
}
},
+ // {
+ // field: 'fplancommitdate',
+ // align: 'center',
+ // title: '寮�宸ユ棩鏈�',
+ // event: 'detail',
+ // width: 100,
+ // templet: function(d) {
+ // if (d.fplancommitdate) {
+ // // 鏍煎紡鍖栨棩鏈熸樉绀猴紙濡傛灉鍚庣杩斿洖鐨勬槸瀹屾暣鏃ユ湡鏃堕棿锛屽彧鏄剧ず鏃ユ湡閮ㄥ垎锛�
+ // var dateStr = d.fplancommitdate;
+ // if (dateStr.indexOf(' ') > 0) {
+ // return dateStr.split(' ')[0];
+ // }
+ // return dateStr;
+ // }
+ // return '';
+ // }
+ // },
{type: 'checkbox', fixed: 'right', width: 30},
]],
done: function (res, curr, count) {
@@ -233,58 +263,62 @@
});
});
- var soCodeBar;
- var fbillnoBar;
+ var soCodeOrFbillnoBar;
var invCodeBar;
+ var fplancommitdateBar;
- /* 鎵爜銆佽緭鍏ョ敓浜у崟鍙枫�佷换鍔″崟鍙峰拰鐗╂枡缂栫爜 */
+ /* 鎵爜銆佽緭鍏ョ敓浜у崟鍙�/浠诲姟鍗曞彿锛堟敮鎸佸涓紝鐢▅鍒嗛殧锛夈�佺墿鏂欑紪鐮佸拰寮�宸ユ棩鏈� */
function findCode(el, type) {
- soCodeBar = $('#soCode').val();
- fbillnoBar = $("#fbillno").val();
+ soCodeOrFbillnoBar = $('#soCodeOrFbillno').val();
invCodeBar = $("#invCode").val();
+ fplancommitdateBar = $("#fplancommitdate").val();
// 鍘婚櫎绌烘牸
- if (soCodeBar) {
- soCodeBar = soCodeBar.trim();
- }
- if (fbillnoBar) {
- fbillnoBar = fbillnoBar.trim();
+ if (soCodeOrFbillnoBar) {
+ soCodeOrFbillnoBar = soCodeOrFbillnoBar.trim();
}
if (invCodeBar) {
invCodeBar = invCodeBar.trim();
}
+ if (fplancommitdateBar) {
+ fplancommitdateBar = fplancommitdateBar.trim();
+ }
switch (type) {
- case 'soCode':
- break;
- case 'fbillno':
+ case 'soCodeOrFbillno':
break;
case 'invCode':
+ break;
+ case 'fplancommitdate':
break;
default:
break;
}
- // 鏋勫缓鏌ヨ鍙傛暟
- var params = {};
- if (soCodeBar) {
- params.soCode = soCodeBar;
- }
- if (fbillnoBar) {
- params.fbillno = fbillnoBar;
- }
- if (invCodeBar) {
- params.invCode = invCodeBar;
- }
-
- // 濡傛灉鎵�鏈夋煡璇㈡潯浠堕兘涓虹┖锛屼笉鎵ц鏌ヨ
- if (!soCodeBar && !fbillnoBar && !invCodeBar) {
+ // 濡傛灉鐢熶骇鍗曞彿/浠诲姟鍗曞彿鍜岀墿鏂欑紪鐮侀兘涓虹┖锛屼笉鎵ц鏌ヨ
+ if (!soCodeOrFbillnoBar && !invCodeBar) {
// 娓呯┖琛ㄦ牸鏁版嵁
tableIns.reload({
data: [],
});
materialReceiveList = [];
return;
+ }
+
+ // 鏋勫缓鏌ヨ鍙傛暟
+ var params = {};
+
+ // 澶勭悊鐢熶骇鍗曞彿/浠诲姟鍗曞彿锛堟敮鎸佸涓紝鐢▅鍒嗛殧锛�
+ if (soCodeOrFbillnoBar) {
+ // 鐩存帴浼犻�掑師濮嬪�硷紝鍚庣浼氬鐞嗗涓�肩殑OR鏌ヨ
+ params.soCodeOrFbillno = soCodeOrFbillnoBar;
+ }
+
+ if (invCodeBar) {
+ params.invCode = invCodeBar;
+ }
+ if (fplancommitdateBar) {
+ params.fplancommitdate = fplancommitdateBar;
}
// PDA鍑哄簱鏌ヨ锛屾坊鍔爌daQuery鍙傛暟锛屽悗绔細杩囨护鎺夊凡鍏ㄩ儴鍑哄簱鐨勭墿鏂�
@@ -461,12 +495,12 @@
if (successCount > 0) {
tips("鎴愬姛鍑哄簱 " + successCount + " 鏉¤褰�");
// 娓呯┖杈撳叆妗嗗苟鍒锋柊鍒楄〃
- $("#soCode").val("");
- $("#fbillno").val("");
+ $("#soCodeOrFbillno").val("");
$("#invCode").val("");
+ $("#fplancommitdate").val("");
materialReceiveList = [];
tableIns.reload({data: materialReceiveList});
- document.getElementById("soCode").focus();
+ document.getElementById("soCodeOrFbillno").focus();
}
if (failCount > 0) {
tips("鍑哄簱澶辫触 " + failCount + " 鏉¤褰�", true);
@@ -477,13 +511,13 @@
}
function reset() {
- $("#soCode").val(null);
- $("#fbillno").val(null);
+ $("#soCodeOrFbillno").val(null);
$("#invCode").val(null);
+ $("#fplancommitdate").val(null);
materialReceiveList = [];
tableIns.reload({data: materialReceiveList});
layer.closeAll();
- document.getElementById("soCode").focus();
+ document.getElementById("soCodeOrFbillno").focus();
}
</script>
</html>
--
Gitblit v1.9.1