From a45b751080a50d94d3ed2d9f1d801e14a7046b6d Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期三, 28 一月 2026 10:48:42 +0800
Subject: [PATCH] 生成领料单-pda+后台2

---
 src/main/webapp/views/pda/materialReceiveOut.html |   78 +++++++++++++++++++++++++++++++-------
 1 files changed, 63 insertions(+), 15 deletions(-)

diff --git a/src/main/webapp/views/pda/materialReceiveOut.html b/src/main/webapp/views/pda/materialReceiveOut.html
index 70f98ab..ec172b2 100644
--- a/src/main/webapp/views/pda/materialReceiveOut.html
+++ b/src/main/webapp/views/pda/materialReceiveOut.html
@@ -79,6 +79,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>
@@ -165,11 +173,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 +198,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 +218,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) {
@@ -236,12 +272,14 @@
     var soCodeBar;
     var fbillnoBar;
     var invCodeBar;
+    var fplancommitdateBar;
 
-    /* 鎵爜銆佽緭鍏ョ敓浜у崟鍙枫�佷换鍔″崟鍙峰拰鐗╂枡缂栫爜 */
+    /* 鎵爜銆佽緭鍏ョ敓浜у崟鍙枫�佷换鍔″崟鍙枫�佺墿鏂欑紪鐮佸拰寮�宸ユ棩鏈� */
     function findCode(el, type) {
         soCodeBar = $('#soCode').val();
         fbillnoBar = $("#fbillno").val();
         invCodeBar = $("#invCode").val();
+        fplancommitdateBar = $("#fplancommitdate").val();
         
         // 鍘婚櫎绌烘牸
         if (soCodeBar) {
@@ -253,6 +291,9 @@
         if (invCodeBar) {
             invCodeBar = invCodeBar.trim();
         }
+        if (fplancommitdateBar) {
+            fplancommitdateBar = fplancommitdateBar.trim();
+        }
         
         switch (type) {
             case 'soCode':
@@ -261,8 +302,20 @@
                 break;
             case 'invCode':
                 break;
+            case 'fplancommitdate':
+                break;
             default:
                 break;
+        }
+
+        // 濡傛灉鐢熶骇鍗曞彿鍜屼换鍔″崟鍙烽兘涓虹┖锛屼笉鎵ц鏌ヨ
+        if (!soCodeBar && !fbillnoBar) {
+            // 娓呯┖琛ㄦ牸鏁版嵁
+            tableIns.reload({
+                data: [],
+            });
+            materialReceiveList = [];
+            return;
         }
 
         // 鏋勫缓鏌ヨ鍙傛暟
@@ -276,15 +329,8 @@
         if (invCodeBar) {
             params.invCode = invCodeBar;
         }
-
-        // 濡傛灉鎵�鏈夋煡璇㈡潯浠堕兘涓虹┖锛屼笉鎵ц鏌ヨ
-        if (!soCodeBar && !fbillnoBar && !invCodeBar) {
-            // 娓呯┖琛ㄦ牸鏁版嵁
-            tableIns.reload({
-                data: [],
-            });
-            materialReceiveList = [];
-            return;
+        if (fplancommitdateBar) {
+            params.fplancommitdate = fplancommitdateBar;
         }
 
         // PDA鍑哄簱鏌ヨ锛屾坊鍔爌daQuery鍙傛暟锛屽悗绔細杩囨护鎺夊凡鍏ㄩ儴鍑哄簱鐨勭墿鏂�
@@ -464,6 +510,7 @@
                 $("#soCode").val("");
                 $("#fbillno").val("");
                 $("#invCode").val("");
+                $("#fplancommitdate").val("");
                 materialReceiveList = [];
                 tableIns.reload({data: materialReceiveList});
                 document.getElementById("soCode").focus();
@@ -480,6 +527,7 @@
         $("#soCode").val(null);
         $("#fbillno").val(null);
         $("#invCode").val(null);
+        $("#fplancommitdate").val(null);
         materialReceiveList = [];
         tableIns.reload({data: materialReceiveList});
         layer.closeAll();

--
Gitblit v1.9.1