From c64260886f18ad8e6d89d834537eefed4929bcad Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期一, 29 十二月 2025 17:12:23 +0800
Subject: [PATCH] 添康小车转移操作功能调整

---
 WebTM/views/WMS扫码模块/库存转移/kf_InventoryTransfer.html |  179 +++++++++++---------------------------------
 WebTM/layuiadmin/Scripts/webConfig.js              |    4 
 2 files changed, 47 insertions(+), 136 deletions(-)

diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index cc6fe6e..abae271 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -2,12 +2,12 @@
 function GetWEBURL() {
     //var WEBURL = "http://192.168.16.80:8011/";        //鍔炲叕瀹ゆ湇鍔″櫒
     //var WEBURL = "http://61.164.86.218:8099/ABAPI/";
-    var WEBURL = "http://localhost/API/";             //棰滄檽鍐涙湰鍦伴厤缃�
+    //var WEBURL = "http://localhost/API/";             //棰滄檽鍐涙湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8082/API/";        //鏉滆春鏈湴閰嶇疆
     //var WEBURL = "http://localhost:81/API/"           //缈佹稕娑涙湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8082/API/";        //寮犵憺骞挎湰鍦伴厤缃�
     //var WEBURL = "http://localhost:81/API/";          //闄堥晲鍝叉湰鍦伴厤缃�
-    //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //鏉庢灄淇婃湰鍦伴厤缃�
+    var WEBURL = "http://localhost:8082/LuBaoAPI/";   //鏉庢灄淇婃湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8080/API/";        //鐜嬩华鏈湴閰嶇疆
     //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //浣欐�濇澃鏈湴閰嶇疆
     //var WEBURL = "http://localhost:8088/ARAPI/";      //浣欐�濇澃鏈湴閰嶇疆(瀹夌憺)
diff --git "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\272\223\345\255\230\350\275\254\347\247\273/kf_InventoryTransfer.html" "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\272\223\345\255\230\350\275\254\347\247\273/kf_InventoryTransfer.html"
index 7e13a3d..6ba0856 100644
--- "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\272\223\345\255\230\350\275\254\347\247\273/kf_InventoryTransfer.html"
+++ "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\272\223\345\255\230\350\275\254\347\247\273/kf_InventoryTransfer.html"
@@ -299,19 +299,20 @@
                         // 鍚敤灏忚溅淇℃伅1鍜�2
                         $('#HCarBarCode').removeAttr('disabled');
                         $('#HCarBarCode_2').removeAttr('disabled');
-
+                        $('#HBarCode').removeAttr('disabled');
                         // 绂佺敤鍏朵粬瀛楁
                         $('#HWHName').attr('disabled', 'disabled');
                         $('#HStockPlaceName').attr('disabled', 'disabled');
                         $('#HWHName_2').attr('disabled', 'disabled');
                         $('#HStockPlaceName_2').attr('disabled', 'disabled');
-                        $('#HBarCode').attr('disabled', 'disabled');
+                        //$('#HBarCode').attr('disabled', 'disabled');
                         $('#HWHID-BT').addClass('layui-btn-disabled').attr('disabled', true);
                         $('#HSpID-BT').addClass('layui-btn-disabled').attr('disabled', true);
                         $('#HWHID-BT_2').addClass('layui-btn-disabled').attr('disabled', true);
                         $('#HSpID-BT_2').addClass('layui-btn-disabled').attr('disabled', true);
 
                         layer.msg("宸插惎鐢ㄥ皬杞﹁浆绉绘ā寮忥細灏忚溅淇℃伅1鍜�2鍙互杈撳叆/鎵弿", { icon: 1 });
+                        clearTableData();
                         break;
 
                     case 'warehouse': // 浠撳簱杞Щ
@@ -325,12 +326,14 @@
                         $('#HSpID-BT').removeClass('layui-btn-disabled').attr('disabled', false);
                         $('#HWHID-BT_2').removeClass('layui-btn-disabled').attr('disabled', false);
                         $('#HSpID-BT_2').removeClass('layui-btn-disabled').attr('disabled', false);
+                        $('#HCarBarCode').removeAttr('disabled');
 
                         // 绂佺敤灏忚溅淇℃伅
-                        $('#HCarBarCode').attr('disabled', 'disabled');
+                       // $('#HCarBarCode').attr('disabled', 'disabled');
                         $('#HCarBarCode_2').attr('disabled', 'disabled');
 
                         layer.msg("宸插惎鐢ㄤ粨搴撹浆绉绘ā寮忥細浠撳簱浠撲綅1銆�2鍜岀墿鏂欐潯鐮佸彲浠ヨ緭鍏�/鎵弿", { icon: 1 });
+                        clearTableData();
                         break;
 
                     case 'car_warehouse': // 灏忚溅-浠撳簱杞Щ
@@ -350,6 +353,7 @@
                         $('#HSpID-BT_2').addClass('layui-btn-disabled').attr('disabled', true);
 
                         layer.msg("宸插惎鐢ㄥ皬杞�-浠撳簱杞Щ妯″紡锛氬皬杞︿俊鎭�1銆佷粨搴撲粨浣�1鍜岀墿鏂欐潯鐮佸彲浠ヨ緭鍏�/鎵弿", { icon: 1 });
+                        clearTableData();
                         break;
                 }
 
@@ -387,6 +391,16 @@
             //鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
             CheckModRight();
 
+
+            function clearTableData() {
+                // 娓呯┖琛ㄦ牸鏁版嵁
+                listOption.data = [];
+                currentTableData = [];
+                table.reload('wl-table', {
+                    data: []
+                });
+                // table.render(listOption);
+            }
             function CheckModRight() {
                 layer.load(3);
                 $.ajax({
@@ -484,9 +498,11 @@
                     , { field: '鐗╂枡鏉$爜', title: '鐗╂枡鏉$爜', width: 100 }
                     , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 100 }
                     , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 100 }
-                    , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100 }
-                    , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 100 }
-                    , { field: '鏉$爜涓暟', title: '鏉$爜涓暟', width: 100 }
+                    , { field: '浠撳簱浠g爜', title: '浠撳簱浠g爜', width: 100 }
+                    , { field: '浠撳簱鍚嶇О', title: '浠撳簱鍚嶇О', width: 100 }
+                    , { field: '浠撲綅浠g爜', title: '浠撲綅浠g爜', width: 100 }
+                    , { field: '浠撲綅鍚嶇О', title: '浠撲綅鍚嶇О', width: 100 }
+                    , { field: '灏忚溅鏉$爜', title: '灏忚溅鏉$爜', width: 100 }
                 ]];
                 listOption.data = data;
                 table.render(listOption);
@@ -560,7 +576,7 @@
                 //$("#HBarCode").select();
                 //$("#HBarCode").focus();
                 //鏄剧ず琛ㄤ綋鏄庣粏
-                DisBillEntryList();
+                DisBillEntryList_CarMaterial();
                 HSourceFlag = true;
                 element.tabChange('tab-Kf_MaterialUpperBill_PDA', '2');
             }
@@ -802,49 +818,11 @@
                             $("#HCarBarCode").focus();
                         });
                         return;
-                    }
+                }
+                element.tabChange('tab-Kf_MaterialUpperBill_PDA', '2');
+                //鏄剧ず琛ㄤ綋鏄庣粏
+                DisBillEntryList_CarMaterial();
                     layer.load(3)
-                    $.ajax({
-                        type: "GET",
-                        url: GetWEBURL() + "/WEBSController/Get_BarCode_WorkShop_Json",
-                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
-                        data: { "HBarCode": sBarCode, "HInterID": HInterID, "HBillType": HBillType, "HBillNo": HBillNo, "HMaker": HMaker, "HWhID": sHWHID, "HSPID": sHSPID, "HQty": sHQty, "SourceFlag": HSourceFlag, "HSourceBillType": sSourceBillType, "HCarBarCode": sCarBarCode, "HStockOrgID": HStockOrgID },
-                        success: function (result) {
-                            if (result.count == 1) {
-                                playSound_OK();
-                                if (sBarCode.startsWith("GXLX")) {
-                                    $("#HMainSourceBillNo").val(sBarCode);
-                                    $("#HSourceBillNo").val(sBarCode);
-                                }
-
-                                if (HSourceFlag != true) {
-                                    HSourceFlag = true;
-                                }
-                                element.tabChange('tab-Kf_MaterialUpperBill_PDA', '2');
-                                //鏄剧ず琛ㄤ綋鏄庣粏
-                                DisBillEntryList();
-                            }
-                            else {
-                                playSound();
-                                layer.msg(result.Message, {
-                                    icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
-                                }, function () {
-                                    $("#HBarCode").select();
-                                    $("#HBarCode").focus();
-                                });
-                            }
-                        },
-                        complete: function (XHR, TS) { XHR = null },//鍥炴敹璧勬簮
-                        error: function (err) {
-                            playSound();
-                            layer.msg("閿欒锛�" + err, {
-                                icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
-                            }, function () {
-                                $("#HBarCode").select();
-                                $("#HBarCode").focus();
-                            });
-                        }
-                    });
                     layer.closeAll("loading");
                 
             }
@@ -1065,6 +1043,7 @@
                         if (result.count == 1) {
                             playSound_OK();
                             layer.alert("搴撳瓨杞Щ鎴愬姛");
+                            clearTableData();
                         }
                         else {
                             playSound();
@@ -1167,13 +1146,14 @@
                 $("#HBarCode").focus();     //鑾峰彇鍏夋爣
             });
 
-            //鎵弿灏忚溅鏉$爜
-            $('#HCarBarCode').on('keydown', function (event) {
-                if (event.keyCode == 13) {
-                    //$("#HBarCode").select();
-                    //$("#HBarCode").focus();     //鑾峰彇鍏夋爣
-                }
-            });
+            ////鎵弿灏忚溅鏉$爜
+            //$('#HCarBarCode').on('keydown', function (event) {
+            //    if (event.keyCode == 13) {
+            //        GetMeesageByCarBarCode();
+            //        //$("#HBarCode").select();
+            //        //$("#HBarCode").focus();     //鑾峰彇鍏夋爣
+            //    }
+            //});
 
             //缁戝畾
             function BindBetweenCarHw(obj) {
@@ -1249,89 +1229,17 @@
                 $("#HBarCode").val("");
 
             }
-            //#region 鏄剧ず鐗╂枡鍒楄〃淇℃伅
 
-            function DisBillList() {
-                $.ajax({
-                    type: "GET",
-                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
-                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
-                    data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBillType": HBillType, "HStockOrgID": HStockOrgID },
-                    success: function (result) {
-                        var data = [];
-                        var col = [];
-                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            //缁欑┖鐨勬暟缁勮祴鍊�
-                            for (var key in result.list) {
-                                //鍔ㄦ�佽幏鍙栧垪琛ㄦ墍鏈夊垪鍚�
-                                data.push({ "id": result.list[key].ColmCols, "name": result.list[key].ColmCols, "Type": result.list[key].ColmType });
-                                //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛�
-                                var patrn = new RegExp(/^h/i);
-                                if (patrn.test(result.list[key].ColmCols)) {
-                                    titleData[key] = result.list[key].ColmCols;
-                                }
-                            }
 
-                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
-                            col.push({ type: 'radio', totalRowText: '鍚堣' });
-                            for (var i = 0; i < data.length; i++) {
-                                if ($.inArray(data[i].name, titleData) > -1) {
-                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
-                                }
-                                else {
-                                    switch (data[i].Type) {
-                                        //int
-                                        case 'DateTime':
-                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
-                                            break;
-                                        default:
-
-                                        if (data[i].name == '鏁伴噺' || data[i].name == '婧愬崟鏁伴噺' || data[i].name == '鏉$爜涓暟') {
-                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', totalRow: true });
-                                        } else if (data[i].name == '鐗╂枡浠g爜') {
-                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 120 });
-                                        } else if (data[i].name == '鐗╂枡鍚嶇О' || data[i].name == '瑙勬牸鍨嬪彿') {
-                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 180 });
-                                        } else {
-                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 150 });
-                                        }
-                                    }
-                                }
-                            }
-                            columns = col;
-                            listOption.cols = [columns];
-                            listOption.data = result.data.Materlist;
-                            listOption.totalRow = true;
-                            table.cache['wl-table'] = null;         //娓呯┖琛ㄦ牸缂撳瓨鏁版嵁
-                            table.render(listOption);
-                        }
-                        else {
-                            listOption.cols = [[
-                                { field: '鏁伴噺', title: '鏁伴噺', width: 100 }
-                                , { field: '鐗╂枡鏉$爜', title: '鐗╂枡鏉$爜', width: 100 }
-                                , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 100 }
-                                , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 100 }
-                                , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100 }
-                                , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 100 }
-                                , { field: '鏉$爜涓暟', title: '鏉$爜涓暟', width: 100 }
-                            ]];
-                            listOption.data = data;
-                            table.render(listOption);
-                        }
-                    },
-                    complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
-                });
-            }
-
-            //#endregion
             //#region 鏄剧ず鐗╂枡鍒楄〃淇℃伅
 
             function DisBillEntryList_CarMaterial() {
+                var HCarBarCode = $("#HCarBarCode").val();
                 $.ajax({
                     type: "GET",
-                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
+                    url: GetWEBURL() + '/WEBSController/GetMaterIDByCarBarCode',
                     async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
-                    data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBillType": HBillType, "HStockOrgID": HStockOrgID },
+                    data: { "CarBarCode": HCarBarCode},
                     success: function (result) {
                         var data = [];
                         var col = [];
@@ -1383,11 +1291,14 @@
                         else {
                             listOption.cols = [[
                                 { field: '鏁伴噺', title: '鏁伴噺', width: 100 }
+                                , { field: '鐗╂枡鏉$爜', title: '鐗╂枡鏉$爜', width: 100 }
                                 , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 100 }
                                 , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 100 }
-                                , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100 }
-                                , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 100 }
-                                , { field: '鏉$爜涓暟', title: '鏉$爜涓暟', width: 100 }
+                                , { field: '浠撳簱浠g爜', title: '浠撳簱浠g爜', width: 100 }
+                                , { field: '浠撳簱鍚嶇О', title: '浠撳簱鍚嶇О', width: 100 }
+                                , { field: '浠撲綅浠g爜', title: '浠撲綅浠g爜', width: 100 }
+                                , { field: '浠撲綅鍚嶇О', title: '浠撲綅鍚嶇О', width: 100 }
+                                , { field: '灏忚溅鏉$爜', title: '灏忚溅鏉$爜', width: 100 }
                             ]];
                             listOption.data = data;
                             table.render(listOption);

--
Gitblit v1.9.1