From c1ca8a9ce9514d13a621e75115cb4fb936a2dbd5 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期三, 19 三月 2025 14:47:28 +0800
Subject: [PATCH] 生产汇报单、产量汇报单、生产质量汇报单 增加:三个自定义过滤;日期间隔;审核,反审核, 基本信息页签 和 制单信息页签, 选基础资料时,应该是已审核未禁用的资料(包括 单据型基础资料

---
 WebTM/layuiadmin/SetColumn.js |  120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 119 insertions(+), 1 deletions(-)

diff --git a/WebTM/layuiadmin/SetColumn.js b/WebTM/layuiadmin/SetColumn.js
index 7d211ce..fed287b 100644
--- a/WebTM/layuiadmin/SetColumn.js
+++ b/WebTM/layuiadmin/SetColumn.js
@@ -5,6 +5,17 @@
         colName += option.cols[0][i]["field"] + ",";
     }
 
+
+    var contentUrl = "";
+ 
+    var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+    var urlLen = urlStr.split('/');
+    for (var i = 0; i < urlLen.length - 4; i++) {
+        contentUrl += "../";
+    }
+
+    contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName;
+
     colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
     layer.open({
         type: 2
@@ -14,7 +25,7 @@
         , shift: 2 //寮瑰嚭鍔ㄧ敾
         , area: ["50%", "90%"] //绐椾綋澶у皬
         , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
-        , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+        , content: [contentUrl, "yes"]
         , btn: ["纭畾", "鍙栨秷"]
         , btn1: function (index, laero) {
             //鍒锋柊琛ㄦ牸鏁版嵁
@@ -185,6 +196,113 @@
 }
 //#endregion
 
+//#region 鏄剧ず鍒楁暟鎹�
+function DisPlay_HideColumn(HModName, user, option, titleData) {
+    $.ajax({
+        url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+        type: "GET",
+        async: false,
+        data: { "HModName": HModName, "user": user },
+        success: function (data1) {
+            if (data1.data.length != 0) {
+                var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+            /*    var titleData = [];*/
+                var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+                newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
+                dataCol = data1.data[0].HGridString.split(',');
+                //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+                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]);
+                                break;
+                            }
+                        }
+                    }
+                    //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+                    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";
+                            }
+                        }
+                        //璁剧疆鍒楁帓搴�
+                        for (var i = 1; i < option.cols[0].length; i++) {
+                            if (data1.data[0].HSortFlag == "鏄�") {
+                                option.cols[0][i]["sort"] = true;
+                            }
+                            else {
+                                option.cols[0][i]["sort"] = false;
+                            }
+                        }
+                    }
+                }
+            } else {
+            }
+        }, error: function () {
+            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+        }
+    })
+}
+//#endregion
+
+
 //#region 闅愯棌鍒楄缃紪杈戦〉闈�
 function get_HideColumnEdit(HModName,user,option,table) {
     var colName = "";

--
Gitblit v1.9.1