From 349cff97dd584a3a6b991bd2f33a437bab772a80 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期六, 14 九月 2024 15:55:55 +0800
Subject: [PATCH] 添康问题解决

---
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBill.html |   13 ++
 WebTM/views/生产管理/生产投料单/Sc_PPBomBillList.html    |   13 ++
 WebTM/views/grf/流转卡TK.grf                       |   46 +++++++++--
 WebTM/views/仓存管理/条码生成/Gy_BarCodeBill.html       |    2 
 WebTM/views/生产管理/生产任务单/Sc_ICMOBillList.html     |  165 +++++++++++++++++++++--------------------
 5 files changed, 143 insertions(+), 96 deletions(-)

diff --git "a/WebTM/views/grf/\346\265\201\350\275\254\345\215\241TK.grf" "b/WebTM/views/grf/\346\265\201\350\275\254\345\215\241TK.grf"
index a00f322..f57963a 100644
--- "a/WebTM/views/grf/\346\265\201\350\275\254\345\215\241TK.grf"
+++ "b/WebTM/views/grf/\346\265\201\350\275\254\345\215\241TK.grf"
@@ -74,6 +74,9 @@
 				Item
 					Name='鐝彿'
 				End
+				Item
+					Name='宸ユ鍚嶇О'
+				End
 					End
 	End
 	Items Column
@@ -87,7 +90,11 @@
 		End
 		Item
 			Name='Column2'
-			Width=2.77813
+			Width=2.01083
+		End
+		Item
+			Name='Column16'
+			Width=2.01083
 		End
 		Item
 			Name='Column3'
@@ -95,15 +102,15 @@
 		End
 		Item
 			Name='Column8'
-			Width=2.80458
+			Width=2.16958
 		End
 		Item
 			Name='Column9'
-			Width=2.01083
+			Width=1.79917
 		End
 		Item
 			Name='Column12'
-			Width=3.38667
+			Width=2.98979
 		End
 		Item
 			Name='Column15'
@@ -158,6 +165,16 @@
 		CanShrink=T
 		ShrinkFontToFit=T
 		DataField='宸ュ簭鍚嶇О'
+	End
+	Item
+		Column='Column16'
+		Object Font
+			Name='瀹嬩綋'
+			Size=90000,0
+			Weight=400
+			Charset=134
+		End
+		DataField='宸ユ鍚嶇О'
 	End
 	Item
 		Column='Column3'
@@ -247,6 +264,12 @@
 			End
 			TextAlign=MiddleCenter
 			Text='宸ュ簭鍚嶇О'
+		End
+		Item
+			GroupTitle=F
+			Column='Column16'
+			TextAlign=MiddleCenter
+			Text='宸ユ鍚嶇О'
 		End
 		Item
 			GroupTitle=F
@@ -683,7 +706,7 @@
 				Object Border
 					Styles=[DrawLeft|DrawRight|DrawBottom]
 				End
-				ColumnCount=7
+				ColumnCount=8
 				RowCount=2
 				Items FreeGridColumn
 					Item[1]
@@ -693,19 +716,22 @@
 						Width=1.8785
 					End
 					Item[3]
-						Width=2.7781
+						Width=2.0108
 					End
 					Item[4]
-						Width=1.614
+						Width=2.0108
 					End
 					Item[5]
-						Width=2.8046
+						Width=1.614
 					End
 					Item[6]
-						Width=2.01083
+						Width=2.1696
 					End
 					Item[7]
-						Width=5.18583
+						Width=1.7992
+					End
+					Item[8]
+						Width=4.789
 					End
 							End
 			Items FreeGridRow
diff --git "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Gy_BarCodeBill.html" "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Gy_BarCodeBill.html"
index 83c8048..46acd12 100644
--- "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Gy_BarCodeBill.html"
+++ "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Gy_BarCodeBill.html"
@@ -673,7 +673,7 @@
                         if (checkStatus.data.length === 0) {
                             return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
-                        var arr = [{ HBillNo: '', HMaterNumber: checkStatus.data[0].鐗╂枡浠g爜, HMaterName: checkStatus.data[0].鐗╂枡鍚嶇О, HMaterModel: '', HAuxPropNumber: '', HAuxPropName: '', HUnitNumber: checkStatus.data[0].璁¢噺鍗曚綅浠g爜, HUnitName: checkStatus.data[0].璁¢噺鍗曚綅, HBatchNo: '', HGiveAwayFlag: '0', HQty: checkStatus.data[0].鏁伴噺.toString("#0.00"), HMinQty: checkStatus.data[0].鏈�灏忓寘瑁呮暟, HPackQty: '0', HBQty: '0', HDate: '', HCusNumber: '', HCusName: '', HSeOrderBillNo: '', HRemark: '', HEmpID: 0, HEmpNumber: '', HEmpName: '', HGroupID: 0, HGroupNumber: '', HGroupName: '', HMTONo: '', "HCusModel": "", "HCusMaterName": "", "HCheckEmpName": "" }]
+                        var arr = [{ HBillNo: '', HMaterNumber: checkStatus.data[0].鐗╂枡浠g爜, HMaterName: checkStatus.data[0].鐗╂枡鍚嶇О, HMaterModel: '', HAuxPropNumber: '', HAuxPropName: '', HUnitNumber: checkStatus.data[0].璁¢噺鍗曚綅浠g爜, HUnitName: checkStatus.data[0].璁¢噺鍗曚綅, HBatchNo: '', HGiveAwayFlag: '0', HQty: checkStatus.data[0].鏁伴噺.toFixed(2), HMinQty: checkStatus.data[0].鏈�灏忓寘瑁呮暟, HPackQty: '0', HBQty: '0', HDate: '', HCusNumber: '', HCusName: '', HSeOrderBillNo: '', HRemark: '', HEmpID: 0, HEmpNumber: '', HEmpName: '', HGroupID: 0, HGroupNumber: '', HGroupName: '', HMTONo: '', "HCusModel": "", "HCusMaterName": "", "HCheckEmpName": "" }]
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         table.reload('mainTable', {
                             data: arr // 璋冪敤table.reload 閲嶆柊娓叉煋鏄剧ず鍔犺浇杩藉姞浜嗘暟鎹殑琛ㄦ牸
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html"
index eb7d5dc..70fd14d 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html"
@@ -366,7 +366,7 @@
             //#endregion
 
             //鍒濆鍖栬〃鏍�
-            DisPlay_HideColumn();
+            /*DisPlay_HideColumn();*/
 
             //鑾峰彇缁勭粐
             Organ();
@@ -2125,22 +2125,14 @@
 
 
 
-            //闅愯棌鍒楄缃�
+            //#region 闅愯棌鍒楄缃�
             function get_HideColumn() {
                 var colName = "";
-                var contentUrl = "";
-                for (var i = 1; i < option.cols[0].length - 1; i++) {
-                    colName += option.cols[0][i]["title"] + ",";
+                for (var i = 1; i < option.cols[0].length; i++) {
+                    colName += option.cols[0][i]["field"] + ",";
                 }
-                var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
-                var urlLen = urlStr.split('/');
-                for (var i = 0; i < urlLen.length - 4; i++) {
-                    contentUrl += "../";
-                }
+
                 colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
-
-                contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
-
                 layer.open({
                     type: 2
                     , skin: "layui-layer-rim" //鍔犱笂杈规
@@ -2149,7 +2141,7 @@
                     , shift: 2 //寮瑰嚭鍔ㄧ敾
                     , area: ["50%", "90%"] //绐椾綋澶у皬
                     , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
-                    , content: [contentUrl, "yes"]
+                    , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName, "yes"]
                     , btn: ["纭畾", "鍙栨秷"]
                     , btn1: function (index, laero) {
                         //鍒锋柊琛ㄦ牸鏁版嵁
@@ -2159,97 +2151,108 @@
                     }
                 })
             }
+            //#endregion
 
-            //鏄剧ず鍒楁暟鎹�
+            //#region 鏄剧ず鍒楁暟鎹�
             function DisPlay_HideColumn() {
                 $.ajax({
                     url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                     type: "GET",
+                    async: false,
                     data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                     success: function (data1) {
                         if (data1.data.length != 0) {
-
-
-                            var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["hmainid", "HEntryID", "浣滃簾浜�", "浣滃簾鏃ユ湡", "閿�鍞鍗曟棩鏈�", "璁㈠崟璺熻釜鍙�", "HDeptID", "HMaterID", "hunitid", "hempid", "涓氬姟鍛樹唬鐮�", "涓氬姟鍛�", "hcusid", "瀹㈡埛浠g爜", "瀹㈡埛", "HCenterID", "宸ヤ綔涓績浠g爜", "宸ヤ綔涓績", "hbomid", "BOM鍗曠紪鐮�", "HRoutingInterID", "宸ヨ壓璺嚎浠g爜", "宸ヨ壓璺嚎", "璁㈠崟鍖呰澶囨敞", "hsubid", "婧愬崟鍗曞彿", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�", "琛屽叧闂汉", "鍏抽棴绫诲瀷", "鍗曟嵁绫诲瀷", "璁″垝璺熻釜鍙�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
                             titleData = [];
-
+                            var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+                            var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+                            newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
                             dataCol = data1.data[0].HGridString.split(',');
-
-                            for (var i = 0; i < option.cols[0].length - 2; i++) {
-                                if (dataCol[i]) {
-                                    var dataCols = dataCol[i].split('|');
-                                }
-                                //闅愯棌鍒�
-                                if (dataCols[1] == 1) {
-                                    option.cols[0][i + 1]["hide"] = true;
-                                }
-                                //璁剧疆鍒楀
-                                if (dataCols[3] > 0) {
-                                    option.cols[0][i + 1]["width"] = dataCols[3];
-                                }
-                                //璁剧疆鍐呭瀛椾綋澶у皬
-                                if (data1.data[0].HFontSize != 0) {
-                                    option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
-                                } else {
-                                    option.cols[0][i + 1]["style"] = "font-size:100%";
-                                }
-                                //璁剧疆鍒楀
-                                //if (data1.data[0].HColumnWidth != 0) {
-                                //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
-                                //} else {
-                                //    option.cols[0][i + 1]["width"] = "";
-                                //}
-                                //鏄剧ず鍒�
-                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
-                                    option.cols[0][i + 1]["hide"] = false;
-                                }
-                                //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
-                                switch (dataCols[2]) {
-                                    case "L":
-                                        option.cols[0][i + 1]["align"] = "left";
-                                        break;
-                                    case "M":
-                                        option.cols[0][i + 1]["align"] = "center";
-                                        break;
-                                    case "R":
-                                        option.cols[0][i + 1]["align"] = "right";
-                                        break;
-                                }
-                            }
-
-                            //鍙栨秷鍐荤粨鍒�
-                            for (var i = 1; i < option.cols[0].length - 1; i++) {
-                                if (option.cols[0][i]["fixed"] != null) {
-                                    option.cols[0][i]["fixed"] = null;
-                                }
-                                else {
-                                    break;
-                                }
-                            }
-                            //鍐荤粨鍒�
-                            if (data1.data[0].HFixCols != 0) {
-                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
-                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
-                                        data1.data[0].HFixCols += 1;
+                            //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+                            if (dataCol.length == option.cols[0].length - 1) {
+                                //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+                                for (var j = 0; j < option.cols[0].length - 1; j++) {
+                                    for (var i = 0; i < option.cols[0].length - 1; i++) {
+                                        var dataCols = dataCol[j].split('|');
+                                        //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+                                        if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+                                            //闅愯棌鍒�
+                                            if (dataCols[1] == 1) {
+                                                option.cols[0][i + 1]["hide"] = true;
+                                            }
+                                            //璁剧疆鍒楀
+                                            if (dataCols[3] > 0) {
+                                                option.cols[0][i + 1]["width"] = dataCols[3];
+                                            }
+                                            //璁剧疆鍐呭瀛椾綋澶у皬
+                                            if (data1.data[0].HFontSize != 0) {
+                                                option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+                                            } else {
+                                                option.cols[0][i + 1]["style"] = "font-size:100%";
+                                            }
+                                            //鏄剧ず鍒�
+                                            if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+                                                option.cols[0][i + 1]["hide"] = false;
+                                            }
+                                            //缁熻鍒�
+                                            if (dataCols[6] == 1) {
+                                                option.cols[0][i + 1]["totalRow"] = true;
+                                            }
+                                            //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                                            switch (dataCols[2]) {
+                                                case "L":
+                                                    option.cols[0][i + 1]["align"] = "left";
+                                                    break;
+                                                case "M":
+                                                    option.cols[0][i + 1]["align"] = "center";
+                                                    break;
+                                                case "R":
+                                                    option.cols[0][i + 1]["align"] = "right";
+                                                    break;
+                                            }
+                                            //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+                                            if (dataCols[4] != null && dataCols[4] != "") {
+                                                option.cols[0][i + 1]["title"] = dataCols[4];
+                                            }
+                                            newCols[0].push(option.cols[0][i + 1]);
+                                        }
                                     }
-                                    option.cols[0][i + 1]["fixed"] = "left";
+                                }
+                                //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+                                if (dataCol.length == newCols[0].length - 1) {
+                                    option.cols = newCols;
+                                    //鍙栨秷鍐荤粨鍒�
+                                    for (var i = 1; i < option.cols[0].length - 1; i++) {
+                                        if (option.cols[0][i]["fixed"] != null) {
+                                            option.cols[0][i]["fixed"] = null;
+                                        }
+                                        else {
+                                            break;
+                                        }
+                                    }
+                                    //鍐荤粨鍒�
+                                    if (data1.data[0].HFixCols != 0) {
+                                        for (var i = 0; i < data1.data[0].HFixCols; i++) {
+                                            if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+                                                data1.data[0].HFixCols += 1;
+                                            }
+                                            option.cols[0][i + 1]["fixed"] = "left";
+                                        }
+                                    }
                                 }
                             }
                             table.render(option);
                         } else {
                             table.render(option);
                         }
-
                         var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
                         var HBillType = "3710";
                         Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
-
                     }, error: function () {
                         layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                     }
                 })
             }
+            //#endregion
 
             //瀹℃牳
             function set_CheckBill() {
@@ -2388,7 +2391,7 @@
                 var Organization = '<option  value="0" selected="selected" ></option>';
                 for (var i = 1; i < option.cols[0].length; i++) {
                     if (option.cols[0][i].hide != true) {
-                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
                     }
                 }
                 $("#ColName").empty();
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\212\225\346\226\231\345\215\225/Sc_PPBomBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\212\225\346\226\231\345\215\225/Sc_PPBomBillList.html"
index 3c1bc09..8955797 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\212\225\346\226\231\345\215\225/Sc_PPBomBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\212\225\346\226\231\345\215\225/Sc_PPBomBillList.html"
@@ -883,7 +883,7 @@
                 var colName = "";
                 var contentUrl = "";
                 for (var i = 1; i < option.cols[0].length - 1; i++) {
-                    colName += option.cols[0][i]["title"] + ",";
+                    colName += option.cols[0][i]["field"] + ",";
                 }
                 var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
                 var urlLen = urlStr.split('/');
@@ -918,6 +918,7 @@
                 $.ajax({
                     url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                     type: "GET",
+                    async:"false",
                     data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                     success: function (data1) {
                         if (data1.data.length != 0) {
@@ -965,6 +966,14 @@
                                     case "R":
                                         option.cols[0][i + 1]["align"] = "right";
                                         break;
+                                }
+                                //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+                                if (dataCols[4] != null && dataCols[4] != "") {
+                                    option.cols[0][i + 1]["title"] = dataCols[4];
+                                }
+                                //缁熻鍒�
+                                if (dataCols[6] == 1) {
+                                    option.cols[0][i + 1]["totalRow"] = true;
                                 }
                             }
 
@@ -1022,7 +1031,7 @@
                 var Organization = '<option  value="0" selected="selected" ></option>';
                 for (var i = 1; i < option.cols[0].length; i++) {
                     if (option.cols[0][i].hide != true) {
-                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
                     }
                 }
                 $("#ColName").empty();
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
index 5e4bbd6..f5dbab8 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
@@ -1483,12 +1483,21 @@
 
             //鎻愪氦
             form.on('submit(Saver)', function (data) {//鎻愪氦
-                $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);//淇濆瓨鍚庝繚瀛樻寜閽鐢�
-
+                
+                if ($("#HEmpID").val() == 0) {
+                    layer.msg("鎿嶄綔鍛樻病鏈夐�夋嫨锛佽閫夋嫨鎿嶄綔鍛橈紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
+                if ($("#HGroupID").val() == 0) {
+                    layer.msg("鐝粍娌℃湁閫夋嫨锛佽閫夋嫨鐝粍锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
                 if ($("#lngBillSubKey").val() == 0) {
                     layer.msg("娴佹按鍙锋病鏈夐�夋嫨锛佽杈撳叆娴佹按鍙峰悗鍥炶溅锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     return;
                 }
+                
+                $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);//淇濆瓨鍚庝繚瀛樻寜閽鐢�
                 var tableData = data.field;
                 var oMain = JSON.stringify(data.field) + ";" + sessionStorage["HUserName"] + ";" + OperationType;
                 var index = layer.load();

--
Gitblit v1.9.1