From 4e03e74ea1081fb88052395668381fa9bf7b2c97 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期二, 27 九月 2022 20:38:41 +0800
Subject: [PATCH] 优

---
 WebTM/views/验收入库/委外入库/Kf_EntrustInBill_Fast.html |   48 +++++---
 WebTM/views/验收入库/产品入库/Kf_ProductInBill_Fast.html |  145 +++++++++++++++-------------
 WebTM/views/仓存管理/仓库调拨/Cc_LookingForBill.html     |   48 ++++++--
 3 files changed, 142 insertions(+), 99 deletions(-)

diff --git "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Cc_LookingForBill.html" "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Cc_LookingForBill.html"
index c9c7797..749e6ea 100644
--- "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Cc_LookingForBill.html"
+++ "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Cc_LookingForBill.html"
@@ -205,23 +205,15 @@
             $("#HSource").val(sessionStorage["HSource"]);
             $("#HMakerID").val(sessionStorage["Czybm"]);
             $("#HMaker").val(sessionStorage["HUserName"]);
-
-            $("#HGroupID").val(sessionStorage["HGroupID"])
-            $("#HGroup").val(sessionStorage["HGroup"] == 'undefined' ? '' : sessionStorage["HGroup"]);
-
-            $("#HEmpID1").val(sessionStorage["HBillerID"])
-            $("#HEmpName1").val(sessionStorage["HUserName"])
-
-            $("#HJiaYe").val($("#HEmpID1").val() + ',' + $("#HEmpID2").val());
-
-
+            $("#HGroupID").val(sessionStorage["HGroupID"]);
             //鍒ゆ柇鐢ㄦ埛鏄惁缁戝畾鐝粍鍜岀敓浜ц祫婧�
             if ($("#HGroupID").val() == 0 || $("#HSourceID").val() == 0) {
                 layer.confirm("璇ョ敤鎴锋湭缁戝畾鐝粍鎴栫敓浜ц祫婧愶紒涓嶅厑璁告壘璐э紒", {
                     icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['纭閫�鍑�']
                 }, function () { window.location.href = "../../index.html"; });
             }
-
+            //鏍规嵁鐧婚檰浜哄憳甯﹀嚭鐝粍鍜岃亴鍛�
+            getGroupEmp(sessionStorage["HUserName"]);
             //鑾峰彇鏈�澶у崟鎹彿 new
             $("#HInterID").val("");
             $("#HBillNo").val("");
@@ -576,7 +568,7 @@
                 //    }
                 //}
                 var sSubStr = JSON.stringify(tableData);
-                sSubStr = "{\"oSub\": " + sSubStr + "}" ;
+                sSubStr = "{\"oSub\": " + sSubStr + "}";
                 //sSubStr = JSON.stringify(sSubStr);
                 //var json = "{\"oMain\":" + sMainStr + "},{\"oMain\":" + sSubStr + "}";
                 if (AllowLoadData(sSubStr, 'Saver') != false)//闈炵┖楠岃瘉
@@ -673,7 +665,24 @@
             });
 
         });
-
+        function getGroupEmp(HUserName) {
+            $.ajax({
+                url: GetWEBURL() + "/Web/getGroupEmp",
+                type: "GET",
+                data: { "HUserName": HUserName },
+                success: function (result) {
+                    if (result.data.length > 0) {
+                        $("#HGroupID").val(result.data[0].HGroupID);
+                        $("#HGroup").val(result.data[0].HGroupName);
+                        $("#HEmpID1").val(result.data[0].HEmpID1);
+                        $("#HEmpName1").val(result.data[0].HEmpName1);
+                        $("#HEmpID2").val(result.data[0].HEmpID2);
+                        $("#HEmpName2").val(result.data[0].HEmpName2);
+                        $("#HJiaYe").val(result.data[0].HJiaYe);
+                    }
+                }
+            })
+        }
         //杩斿洖浠撳簱
         function GetHWHValue(obj)  //杩斿洖浠撳簱
         {
@@ -725,9 +734,16 @@
         }
 
         function AllowLoadData(sSubStr, bnt) {  //闈炵┖楠岃瘉
-            return true;
             if ($("#HSourceBillNo").val() == '') {
                 layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
+                return false;
+            }
+            if ($("#HGroup").val() == '') {
+                layer.msg("璇烽�夋嫨鐝粍!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return false;
+            }
+            if ($("#HEmpName1").val() == '' || $("#HEmpName2").val() == '') {
+                layer.msg("璇烽�夋嫨鑱屽憳!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return false;
             }
             if ($("#HWHNAME").val() == '') {
@@ -738,6 +754,10 @@
                 layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return false;
             }
+            if (JSON.parse(sSubStr).oSub.length == 0) {
+                layer.msg("璇锋壂鎻忔潯鐮�!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return false;
+            }
             if (bnt == 'Saver1') {
                 if (!typeof (sSubStr) == "undefined") {
                     for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
index fc3bd3c..72adf25 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
@@ -306,20 +306,9 @@
             $("#HMakerID").hide();
             $("#HBillerID").val(sessionStorage["HBillerID"]);
             $("#HBillerID").hide();
-
-            $("#HGroupID").val(sessionStorage["HGroupID"])
-            $("#HGroupName").val(sessionStorage["HGroup"] == 'undefined' ? '' : sessionStorage["HGroup"]);
-
-            $("#HEmpID1").val(sessionStorage["HBillerID"])
-            $("#HEmpName1").val(sessionStorage["HUserName"])
-
-            $("#HJiaYe").val($("#HEmpID1").val() + ',' + $("#HEmpID2").val());
-
             var HSourceFlag = sessionStorage["SourceFlag"];
             //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
-
             $("#HBarCode").focus();
-
             //鑾峰彇鍙傛暟
             function getUrlVars() {
                 var vars = [], hash;
@@ -343,53 +332,9 @@
             var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
             var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
 
-            function RoadBillMain(linterid)//鍔犺浇琛ㄥご
-            {
-                $.ajax({
-                    url: GetWEBURL() + "/Web/GetPonderationBill",
-                    type: "GET",
-                    data: { "HInterID": linterid },
-                    success: function (d) {
-                        // console.log(d.data);
-                        $("#HInterID").val(d.data[0].HInterID);
-                        $("#HBillNo").val(d.data[0].HBillNo);
-                        //$("#HBillType").val(d.data[0].HSourceBillType);
-                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
-                        //$("#HWHID").val(d.data[0].HWhID);
-                        //$("#HKeeperID").val(d.data[0].HKeeperID);
-                        //$("#HSecManagerID").val(d.data[0].HSecManagerID);
-                        //$("#HDeptID").val(d.data[0].HDeptID);
-                        //$("#HBarCode").val(d.data[0].HBarCode);
-                        //$("#HQty").val(d.data[0].HQty);
-                    }
-                })
-            }
-            function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
-            {
-                table.render({
-                    elem: '#wl-table'
-                    , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
-                    , cellMinWidth: 80
-                    , toolbar: '#toolbarDemo'
-                    , where: { HBillID: linterid, HBillType: '1202', sWhere: '' }
-                    , cols: [[
-                        { type: 'radio' }
-                        , { field: 'HQty', title: '鏁伴噺', width: 80 }
-                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
-                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
-                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
-                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
-                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
-                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
-                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                        , { field: 'HBatchNo', title: '鎵规', width: 100 }
-                        , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
-                        , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
-                        , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
-                    ]]
-                    , height: 500
-                })
-            }
+            //鏍规嵁鐧婚檰浜哄憳甯﹀嚭鐝粍鍜岃亴鍛�
+            getGroupEmp(sessionStorage["HUserName"]);
+           
             //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
             //鍒ゆ柇鏄惁鏂板
             if (linterid == null || linterid == 0) {
@@ -411,8 +356,6 @@
                 RoadBillMain(linterid);
                 RoadBillSub(linterid);
             }
-
-
             //杩涘叆鐗╂枡鏄庣粏椤电銆佹潯鐮佹 鍏夋爣鐒︾偣   new
             //if (1 == 2)
             //{
@@ -430,7 +373,6 @@
             //}
             //
             //
-
             //閫夋嫨浠撳簱
             form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
                 layer.open({
@@ -447,7 +389,6 @@
                     }
                 })
             });
-
             //閫夋嫨浠撲綅
             form.on('submit(HSpID-BT)', function () {//閫夋嫨浠撲綅
                 layer.open({
@@ -464,7 +405,6 @@
                     }
                 })
             });
-
             //閫夋嫨淇濈
             form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
                 layer.open({
@@ -1001,6 +941,71 @@
                 }
             });
         });
+        function getGroupEmp(HUserName) {
+            $.ajax({
+                url: GetWEBURL() + "/Web/getGroupEmp",
+                type: "GET",
+                data: { "HUserName": HUserName },
+                success: function (result) {
+                    if (result.data.length > 0) {
+                        $("#HGroupID").val(result.data[0].HGroupID);
+                        $("#HGroupName").val(result.data[0].HGroupName);
+                        $("#HEmpID1").val(result.data[0].HEmpID1);
+                        $("#HEmpName1").val(result.data[0].HEmpName1);
+                        $("#HEmpID2").val(result.data[0].HEmpID2);
+                        $("#HEmpName2").val(result.data[0].HEmpName2);
+                        $("#HJiaYe").val(result.data[0].HJiaYe);
+                    }
+                }
+            })
+        }
+        function RoadBillMain(linterid)//鍔犺浇琛ㄥご
+        {
+            $.ajax({
+                url: GetWEBURL() + "/Web/GetPonderationBill",
+                type: "GET",
+                data: { "HInterID": linterid },
+                success: function (d) {
+                    // console.log(d.data);
+                    $("#HInterID").val(d.data[0].HInterID);
+                    $("#HBillNo").val(d.data[0].HBillNo);
+                    //$("#HBillType").val(d.data[0].HSourceBillType);
+                    $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
+                    //$("#HWHID").val(d.data[0].HWhID);
+                    //$("#HKeeperID").val(d.data[0].HKeeperID);
+                    //$("#HSecManagerID").val(d.data[0].HSecManagerID);
+                    //$("#HDeptID").val(d.data[0].HDeptID);
+                    //$("#HBarCode").val(d.data[0].HBarCode);
+                    //$("#HQty").val(d.data[0].HQty);
+                }
+            })
+        }
+        function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
+        {
+            table.render({
+                elem: '#wl-table'
+                , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
+                , cellMinWidth: 80
+                , toolbar: '#toolbarDemo'
+                , where: { HBillID: linterid, HBillType: '1202', sWhere: '' }
+                , cols: [[
+                    { type: 'radio' }
+                    , { field: 'HQty', title: '鏁伴噺', width: 80 }
+                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
+                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
+                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
+                    , { field: 'HBatchNo', title: '鎵规', width: 100 }
+                    , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
+                    , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
+                    , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
+                ]]
+                , height: 500
+            })
+        }
         function GetHWHValue(obj)  //杩斿洖璋冨叆浠撳簱
         {
             $("#HWHNAME").val(obj[0].HName);
@@ -1042,16 +1047,24 @@
             //    layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
             //    return false;
             //}
+            if ($("#HGroupName").val() == '') {
+                layer.msg("璇烽�夋嫨鐝粍!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return false;
+            }
+            if ($("#HEmpName1").val() == '' || $("#HEmpName2").val() == '') {
+                layer.msg("璇烽�夋嫨鑱屽憳!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return false;
+            }
             if ($("#HDeptName").val() == '') {
-                layer.msg("閮ㄩ棬娌℃湁閫夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                layer.msg("璇烽�夋嫨閮ㄩ棬", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return false;
             }
             if ($("#HSecManager").val() == '') {
-                layer.msg("楠屾敹浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                layer.msg("璇烽�夋嫨楠屾敹浜�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return false;
             }
             if ($("#HKeeper").val() == '') {
-                layer.msg("淇濈浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                layer.msg("璇烽�夋嫨淇濈浜�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return false;
             }
             //if ($("#HWHNAME").val() == '') {
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBill_Fast.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBill_Fast.html"
index 1afea92..5fa2aa5 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBill_Fast.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBill_Fast.html"
@@ -323,14 +323,6 @@
             $("#HMakerID").hide();
             $("#HBillerID").val(sessionStorage["HBillerID"]);
             $("#HBillerID").hide();
-
-            $("#HGroupID").val(sessionStorage["HGroupID"])
-            $("#HGroupName").val(sessionStorage["HGroup"] == 'undefined' ? '' : sessionStorage["HGroup"] );
-
-            $("#HEmpID1").val(sessionStorage["HBillerID"])
-            $("#HEmpName1").val(sessionStorage["HUserName"])
-
-            $("#HJiaYe").val($("#HEmpID1").val() + ',' + $("#HEmpID2").val());
             //sessionStorage["HGroupID"]
             //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
             //鑾峰彇鍙傛暟
@@ -347,7 +339,9 @@
             var params = getUrlVars();
             var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
             var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
-        
+
+            //鏍规嵁鐧婚檰浜哄憳甯﹀嚭鐝粍鍜岃亴鍛�
+            getGroupEmp(sessionStorage["HUserName"]);
             //鍔犺浇琛ㄥご
             function  RoadBillMain(linterid)
             {
@@ -370,7 +364,6 @@
                     }
                 })
             }
-
             //鍔犺浇琛ㄤ綋
             function RoadBillSub(linterid)
             {
@@ -397,15 +390,6 @@
                     }
                 });
             }
-             
-            //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
-
-            
-
-            
-
-            
-
             //鍒ゆ柇鏄惁鏂板
             if (linterid == null || linterid == 0) {
                 //鑾峰彇鏈�澶у崟鎹彿 new
@@ -990,6 +974,24 @@
 
         //浠ヤ笂涓簂ayui妯″潡
         });
+        function getGroupEmp(HUserName) {
+            $.ajax({
+                url: GetWEBURL() + "/Web/getGroupEmp",
+                type: "GET",
+                data: { "HUserName": HUserName },
+                success: function (result) {
+                    if (result.data.length > 0) {
+                        $("#HGroupID").val(result.data[0].HGroupID);
+                        $("#HGroupName").val(result.data[0].HGroupName);
+                        $("#HEmpID1").val(result.data[0].HEmpID1);
+                        $("#HEmpName1").val(result.data[0].HEmpName1);
+                        $("#HEmpID2").val(result.data[0].HEmpID2);
+                        $("#HEmpName2").val(result.data[0].HEmpName2);
+                        $("#HJiaYe").val(result.data[0].HJiaYe);
+                    }
+                }
+            })
+        }
         //娓呯┖琛ㄥご
         //function f_ClearTitle() {
 
@@ -1098,6 +1100,14 @@
             //    layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
             //    return false;
             //}
+            if ($("#HGroupName").val() == '') {
+                layer.msg("璇烽�夋嫨鐝粍!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return false;
+            }
+            if ($("#HEmpName1").val() == '' || $("#HEmpName2").val() == '') {
+                layer.msg("璇烽�夋嫨鑱屽憳!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return false;
+            }
             if ($("#HBillNo").val() == '') {
                 layer.msg("閿欒鐨勫崟鎹彿!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return false;

--
Gitblit v1.9.1