From 2d180d7717c02623546707ccb80ac110c66532ef Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 15 十月 2024 16:55:18 +0800
Subject: [PATCH] 出站单列设置

---
 WebTM/WebTM.csproj.user                                |    2 
 WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBillList.html |    2 
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillList.html    |  235 ++++++++++++++++++++++++++++++++++++++++++----------------
 3 files changed, 170 insertions(+), 69 deletions(-)

diff --git a/WebTM/WebTM.csproj.user b/WebTM/WebTM.csproj.user
index ee77abe..67044c2 100644
--- a/WebTM/WebTM.csproj.user
+++ b/WebTM/WebTM.csproj.user
@@ -3,7 +3,7 @@
   <PropertyGroup>
     <NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-LayUI\WebTM\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
     <ProjectView>ProjectFiles</ProjectView>
-    <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
+    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
     <UseIISExpress>true</UseIISExpress>
     <Use64BitIISExpress />
     <IISExpressSSLPort />
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_StationOutBillList.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_StationOutBillList.html"
index 370eed7..43d7f6f 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_StationOutBillList.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_StationOutBillList.html"
@@ -818,7 +818,7 @@
             function get_HideColumn() {
                 var colName = "";
                 for (var i = 1; i < option.cols[0].length; i++) {
-                    colName += option.cols[0][i]["title"] + ",";
+                    colName += option.cols[0][i]["field"] + ",";
                 }
 
                 colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
@@ -830,7 +830,7 @@
                     , shift: 2 //寮瑰嚭鍔ㄧ敾
                     , area: ["50%", "90%"] //绐椾綋澶у皬
                     , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
-                    , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+                    , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName, "yes"]
                     , btn: ["纭畾", "鍙栨秷"]
                     , btn1: function (index, laero) {
                         //鍒锋柊琛ㄦ牸鏁版嵁
@@ -842,93 +842,194 @@
             }
 
             //鏄剧ず鍒楁暟鎹� 涓昏〃
+            //function DisPlay_HideColumn() {
+            //    $.ajax({
+            //        url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+            //        type: "GET",
+            //        data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+            //        success: function (data1) {
+            //            if (data1.data.length != 0) {
+
+
+            //                var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+            //                /*var titleData = ["HMaterID", "HUnitID", "HSourceID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
+
+            //                dataCol = data1.data[0].HGridString.split(',');
+
+            //                for (var i = 0; i < option.cols[0].length - 1; 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;
+            //                        }
+            //                        option.cols[0][i + 1]["fixed"] = "left";
+            //                    }
+            //                }
+            //                table.render(option);
+            //            } else {
+            //                table.render(option);
+            //            }
+
+            //            var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+            //            Display_HideButton(btns, "3791", HModName, sessionStorage["HUserName"]);
+
+            //        }, error: function () {
+            //            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+            //        }
+            //    })
+            //}
+
+            //#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 = ["HMaterID", "HUnitID", "HSourceID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
-
+                            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 - 1; 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");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
                         Display_HideButton(btns, "3791", HModName, sessionStorage["HUserName"]);
-
                     }, error: function () {
                         layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                     }
                 })
             }
+            //#endregion
+
+
 
              //闅愯棌鍒楄缃� 宸ヨ壓鍙傛暟
             function get_HideColumn_TechParam() {
@@ -2307,7 +2408,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\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html"
index 4009dcb..c0a7150 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html"
@@ -3308,7 +3308,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();

--
Gitblit v1.9.1