From 39e97266be7d33aa230ede2647e2f030c8e7d0ab Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期六, 13 九月 2025 10:48:18 +0800
Subject: [PATCH] 根据群里问题已经修改的部分

---
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialBarCodeBill.html |   41 +++++++++++---------
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialHandingEdit.html |   22 ++++++++---
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialHanding.html     |    5 +-
 3 files changed, 42 insertions(+), 26 deletions(-)

diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialBarCodeBill.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialBarCodeBill.html
index d1233e6..9736ad5 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialBarCodeBill.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialBarCodeBill.html
@@ -166,6 +166,7 @@
                 , element = layui.element; //Tab鐨勫垏鎹㈠姛鑳斤紝鍒囨崲浜嬩欢鐩戝惉绛夛紝闇�瑕佷緷璧杄lement妯″潡
 
             var option;
+            FetchSupInfo();
             option = {
                 elem: '#mainTable'
                 , toolbar: '#toolbarDemo'
@@ -176,24 +177,25 @@
                 , cols: [[
                     { type: 'checkbox', fixed: 'left' }
                     , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+                    , { field: 'HItemID', title: 'ID', width: 100, hide: true }
                     , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜', width: 120 }
-/*                    , { field: 'HOldMaterNumber', title: '鏃х墿鏂欑紪鐮�', width: 120, hide: true }*/
+/*                   , { field: 'HOldMaterNumber', title: '鏃х墿鏂欑紪鐮�', width: 120, hide: true }*/
                     , { field: 'HMaterShortNumber', title: '鐗╂枡浠g爜', width: 120, hide: true }
-                   /* , { field: 'HSubjoin', title: '鐗╂枡浠g爜', width: 120, hide: true }*/
+                  , { field: 'HSubjoin', title: '鐗╂枡绠�绉�', width: 120, }
                     , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 }
                     , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 120 }
                     , { field: 'HQty', title: '鏈鐢熸垚鏉$爜鏁伴噺', width: 135, edit: 'text', event: "inputHQty" }
-                    , { field: 'HMinQty', title: '鏍囧噯鍖呰鏁帮紙鍐呯瑁呯鏁帮級', width: 100, edit: 'text', event: "inputHMinQty" }
+                    , { field: 'HMinQty', title: '鏍囧噯鍖呰鏁帮紙鍐呯瑁呯鏁帮級', width: 100, event: "inputHMinQty" }
                     , { field: 'HBQty', title: '鏈�灏忓寘瑁呮暟锛堝唴绠辨暟锛�', width: 100 } 
                     , { field: 'biaoqianzhangshu', title: '鏍囩寮犳暟', width: 100 }
-                    , { field: 'HBatchNo', title: '鎵瑰彿', width: 100, edit: 'text' }
+                    , { field: 'HBatchNo', title: '鎵瑰彿', width: 100, edit: 'text', hide: true }
                     , { field: 'HBatchManager', title: '鍚敤鎵瑰彿', width: 100, hide: true }
                     , { field: 'HISKFPERIOD', title: '鏄惁鍚敤淇濊川鏈�', width: 100, edit: 'text', hide: true }
                     , { field: 'HEXPUNIT', title: '淇濊川鏈熷崟浣�', width: 100, edit: 'text', hide: true }
                     , { field: 'HSourceBillType', title: '鏉$爜绫诲瀷', width: 100, templet: '#barCodeTypeTpl' }  
                     , { field: 'HKFDate', title: '鐢熶骇鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate" }//, event: "chooseHKFDate"
-                    , { field: 'HKFPeriod', title: '淇濊川鏈�', width: 100,event:"inputHKFPeriod" }//
-                    , { field: 'HKFDQDate', title: '鍒版湡鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDQDate' }//, event: "chooseHKFDQDate"
+                    , { field: 'HKFPeriod', title: '淇濊川鏈�', width: 100, event: "inputHKFPeriod", hide: true }//
+                    , { field: 'HKFDQDate', title: '鍒版湡鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDQDate', hide: true }//, event: "chooseHKFDQDate"
                     , { field: 'HSupID', title: '渚涘簲鍟咺D', width: 150, hide: true }
                     , { field: 'HSupName', title: '渚涘簲鍟嗗悕绉�', width: 150, hide: true }
                 ]]
@@ -234,17 +236,17 @@
                         , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 }
                         , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 120 }
                         , { field: 'HQty', title: '鏈鐢熸垚鏉$爜鏁伴噺', width: 135, edit: 'text', event: "inputHQty" }
-                        , { field: 'HMinQty', title: '鏍囧噯鍖呰鏁帮紙鍐呯瑁呯鏁帮級', width: 100, edit: 'text', event: "inputHMinQty" }
+                        , { field: 'HMinQty', title: '鏍囧噯鍖呰鏁帮紙鍐呯瑁呯鏁帮級', width: 100, event: "inputHMinQty" }
                         , { field: 'HBQty', title: '鏈�灏忓寘瑁呮暟锛堝唴绠辨暟锛�', width: 100 }
                         , { field: 'biaoqianzhangshu', title: '鏍囩寮犳暟', width: 100 }
-                        , { field: 'HBatchNo', title: '鎵瑰彿', width: 100, edit: 'text' }
+                        , { field: 'HBatchNo', title: '鎵瑰彿', width: 100, edit: 'text', hide: true }
                         , { field: 'HBatchManager', title: '鍚敤鎵瑰彿', width: 100, hide: true }
                         , { field: 'HISKFPERIOD', title: '鏄惁鍚敤淇濊川鏈�', width: 100, edit: 'text', hide: true }
                         , { field: 'HEXPUNIT', title: '淇濊川鏈熷崟浣�', width: 100, edit: 'text', hide: true }
                         , { field: 'HSourceBillType', title: '鏉$爜绫诲瀷', width: 100 }
-                        , { field: 'HKFDate', title: '鐢熶骇鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate" }//, event: "chooseHKFDate"
-                        , { field: 'HKFPeriod', title: '淇濊川鏈�', width: 100 }//
-                        , { field: 'HKFDQDate', title: '鍒版湡鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDQDate' }//, event: "chooseHKFDQDate"
+                        , { field: 'HKFDate', title: '鐢熶骇鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate", hide: true }//, event: "chooseHKFDate"
+                        , { field: 'HKFPeriod', title: '淇濊川鏈�', width: 100, hide: true }//
+                        , { field: 'HKFDQDate', title: '鍒版湡鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDQDate', hide: true}//, event: "chooseHKFDQDate"
                         , { field: 'HSupID', title: '渚涘簲鍟咺D', width: 150, hide: true }
                         , { field: 'HSupName', title: '渚涘簲鍟嗗悕绉�', width: 150, hide: true }
 
@@ -257,7 +259,6 @@
             else {
                 //鍚堝苟鏁伴噺鐢熸垚鏉$爜
                 layer.load(3);
-                FetchSupInfo();
                 $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
                 $.ajax({
                     type: "GET",
@@ -272,11 +273,12 @@
 
                             for (var i = 0; i < data.length; i++) {
                                 rowdata.push({
-                                    "HMaterID": data[i].HItemID,
+                                    "HMaterID": data[i].MaterID,
+                                    "HItemID": data[i].HItemID,
                                     "HMaterNumber": data[i].鐗╂枡浠g爜,
 /*                                    "HOldMaterNumber": "",*/
                                     "HMaterShortNumber": "",
-                                    /*"HSubjoin": "",*/
+                                    "HSubjoin": data[i].鐗╂枡绠�绉�,
                                     "HMaterName": data[i].鐗╂枡鍚嶇О,
                                     "HMaterModel": data[i].瑙勬牸鍨嬪彿,
                                     "HMinQty": data[i].鏍囧噯鍖呰鏁�,
@@ -596,10 +598,11 @@
                                         , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
                                         , { field: 'HBarItemID', title: '鏉$爜ID', width: 100, hide: true }
                                         , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜', width: 120 }
+/*                                        , { field: 'LSH', title: '娴佹按鍙�', width: 120 }*/
                                         /*                    , { field: 'HOldMaterNumber', title: '鏃х墿鏂欑紪鐮�', width: 120, hide: true }*/
-                                        , { field: 'HMaterShortNumber', title: '鐗╂枡浠g爜', width: 120, hide: true }
-                                        /* , { field: 'HSubjoin', title: '鐗╂枡浠g爜', width: 120, hide: true }*/
-                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 }
+                                        , { field: 'HMaterShortNumber', title: '鐗╂枡浠g爜', width: 120 }
+                                        , { field: 'HSubjoin', title: '鐗╂枡绠�绉�', width: 120, hide: true }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120, hide: true }
                                         , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 120 }
                                         , { field: 'HQty', title: '鏈鐢熸垚鏉$爜鏁伴噺', width: 135 }
                                         , { field: 'HMinQty', title: '鏍囧噯鍖呰鏁帮紙鍐呯瑁呯鏁帮級', width: 100 }
@@ -636,11 +639,13 @@
                                             for (var i = 0; i < data.length; i++) {
                                                 
                                                     rowdata_1.push({
-                                                        "HMaterID": data[i].HItemID,
+                                                        "HMaterID": data[i].HMaterID,
                                                         "HBarItemID": data[i].HBarItemID,
+/*                                                        "LSH": data[i].HBarItemID,*/
                                                         "HBarCode": data[i].HBarCode,
                                                         "HMaterNumber": data[i].鐗╂枡浠g爜,
                                                         "HMaterShortNumber": "",
+                                                        "HSubjoin": data[i].鐗╂枡绠�绉�,
                                                         "HMaterName": data[i].鐗╂枡鍚嶇О,
                                                         "HMaterModel": data[i].瑙勬牸鍨嬪彿,
                                                         "HMinQty": data[i].鏍囧噯鍖呰鏁�,
diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialHanding.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialHanding.html
index 4fa98d6..ca3d11f 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialHanding.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialHanding.html
@@ -619,11 +619,12 @@
                 , data = checkStatus.data;
             if (checkStatus.data.length === 1) {
                 var InterID = data[0].HItemID.toString();
+                var HMaterID = data[0].鐗╂枡ID.toString();
                 //閫昏緫瀹℃牳鏂规硶
                 $.ajax({
                     type: "GET",
                     url: GetWEBURL() + "/MaterialHandingController/OpenMaterial", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                    data: { "HInterID": InterID, "IsUse": num, "CurUserName": sessionStorage["HUserName"] },
+                    data: { "HInterID": InterID, "IsUse": num, "CurUserName": sessionStorage["HUserName"], "HMaterID": HMaterID},
                     success: function (result) {
                         if (result.count == 1) {
                             layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -636,7 +637,7 @@
                             });
 
                         } else {
-                            layer.alert(result.code + result.Message, { icon: 5 });
+                            layer.alert("宸茬粡鍚敤锛屼笉鍑嗗啀娆″惎鐢紒", { icon: 5 });
                         }
                     }, error: function () {
                         layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialHandingEdit.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialHandingEdit.html
index 03c91e1..cd18ea0 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialHandingEdit.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_MaterialHandingEdit.html
@@ -524,8 +524,10 @@
         function set_ClearBill() {
             $("#HMaker").val(sessionStorage["HUserName"]);
             $("#HMakeTime").val(Format(new Date(), "yyyy-MM-dd"));
-
             //$("#HSupID").val(sessionStorage["HUserName"]);
+            $("#HUseFlag").val('true');
+            $("#checkboxHUseFlag").prop("checked", true);
+            form.render('checkbox'); 
             FetchSupInfo();
             //$("#HCheckEmp").val(sessionStorage["HUserName"]);
             //$("#HCheckTime").val(Format(new Date(), "yyyy-MM-dd"));
@@ -558,12 +560,19 @@
         }
         //闈炵┖楠岃瘉
         function AllowLoadData(data) {
-            if ($("#HInBoxPackQty").val() < $("#HMinPackQty").val()) {
+            var checkValue = parseFloat($("#HInBoxPackQty").val()); 
+            var checkValue_1 = parseFloat($("#HMinPackQty").val()); 
+
+            if (isNaN(checkValue) || isNaN(checkValue_1)) {
+                layer.alert("鍖呰鏁板繀椤讳负鏁板瓧");
+                return false;
+            }
+
+            if (checkValue < checkValue_1) {
                 layer.alert("鏍囧噯鍖呰鏁颁笉鍏佽灏忎簬鏈�灏忓寘瑁呮暟");
                 return false;
             }
-            else
-                return true;
+            return true;
         }
 
         //淇濆瓨HMaker
@@ -752,6 +761,7 @@
         // 鐗╂枡鏍¢獙
         function get_MaterialCheck(param = 0) {
             var HMaterNumber = $("#HMaterNumber").val();
+            var HMaterID = $("#HMaterID").val();
             var user = sessionStorage["HUserName"];
             var OrganizationID = sessionStorage["OrganizationID"];
 
@@ -785,7 +795,7 @@
                         return;
                     }
                     if (responseData === 1) {
-                        layer.confirm('璇ョ墿鏂欏凡缁忚鏈緵搴斿晢鑾峰彇锛屾槸鍚︾户缁紵', {
+                        layer.confirm('璇ョ墿鏂欏凡缁忚鏈緵搴斿晢鑾峰彇锛屾槸鍚︾‘璁ゅ惎鐢ㄥ苟灏嗗巻鍙茬殑鍚敤缁欏彇娑堬紵', {
                             icon: 3,
                             title: '鎻愮ず'
                         }, function (index) {
@@ -794,7 +804,7 @@
                         });
                     } else if (responseData.code === "1") {
 
-                        $("#HMaterName").val(responseData.data[0]["HName"]);
+                        $("#HMaterName").val(responseData.data[0]["HSubjoin"] == null ? responseData.data[0]["HName"] : responseData.data[0]["HSubjoin"]);
                         $("#HModel").val(responseData.data[0]["HModel"]);
                         form.render('select');
                     } else {

--
Gitblit v1.9.1