From 7de00c5824ecfd39fec748386298ba0cedd4504e Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期二, 16 一月 2024 16:06:10 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI

---
 WebTM/views/质量管理/出厂检验单/QC_OutCompCheckBillList.html |  195 +++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 156 insertions(+), 39 deletions(-)

diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\207\272\345\216\202\346\243\200\351\252\214\345\215\225/QC_OutCompCheckBillList.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\207\272\345\216\202\346\243\200\351\252\214\345\215\225/QC_OutCompCheckBillList.html"
index d142354..e64aa77 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\207\272\345\216\202\346\243\200\351\252\214\345\215\225/QC_OutCompCheckBillList.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\207\272\345\216\202\346\243\200\351\252\214\345\215\225/QC_OutCompCheckBillList.html"
@@ -15,6 +15,8 @@
     <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
     <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../layuiadmin/soulTable.slim.js"></script>
+
 
 </head>
 <body>
@@ -60,6 +62,7 @@
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
                                 <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>-->
                                 <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>-->
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
                             </div>
                         </script>
@@ -73,7 +76,7 @@
             base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
         }).extend({
             index: 'lib/index', //涓诲叆鍙fā鍧�
-        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
             var $ = layui.$
                 , admin = layui.admin
                 , layer = layui.layer
@@ -82,14 +85,16 @@
                 , element = layui.element
                 , laypage = layui.laypage
                 , laydate = layui.laydate
+                , soulTable = layui.soulTable
+
             var option = [];
             var sWhere = "";
-
+            var HModName = "QC_OutCompCheckBillList";
             //#region 杩涘叆椤甸潰鍗冲姞杞�
 
             //鍒濆鍖栫晫闈�
             set_ClearBill();
-
+            DisPlay_HideColumn();
             //#endregion
 
             //#region 澶村伐鍏锋爮浜嬩欢
@@ -116,6 +121,9 @@
                     ////棰勮鎸夐挳
                     //case 'get_PrintReport': get_PrintReport();
                     //    break;
+                    //鍒楄缃�
+                    case 'set_HideColumn': get_HideColumn();
+                        break;
                     //閫�鍑烘寜閽�
                     case 'get_Exit': Pub_Close(2);
                         break;
@@ -155,32 +163,37 @@
                     , height: 'full-50'
                     , page: true
                     , cellMinWidth: 90
+                    , limit: 50
+                    , limits: [50, 500, 5000, 20000]
+                    , done: function (res, curr, count) {
+                        soulTable.render(this);
+                    }
                     , cols: [[
                         { type: 'checkbox', fixed: 'left' }
                         , { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
                         , { field: 'hsubid', title: 'hsubid', hide: true }
                         , { field: '鏃ユ湡', title: '鏃ユ湡', sort: true, width: 170 }
                         , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', sort: true, width: 170 }
-                        , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 105 }
-                        , { field: '瀹㈡埛鍚嶇О', title: '瀹㈡埛鍚嶇О', width: 105}
-                        , { field: '瀹㈡埛浠g爜', title: '瀹㈡埛浠g爜', width: 105}
-                        , { field: '浜у搧鍐呯爜', title: '浜у搧鍐呯爜' }
-                        , { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О' }
-                        , { field: '浜у搧鍨嬪彿', title: '浜у搧鍨嬪彿', width: 115 }
-                        , { field: 'HProcCheckEmpID', title: 'HProcCheckEmpID', width: 200, hide: true }
-                        , { field: '妫�楠屽憳浠g爜', title: '妫�楠屽憳浠g爜', width: 125 }
-                        , { field: '妫�楠屽憳鍚嶇О', title: '妫�楠屽憳鍚嶇О', width: 125 }
-                        , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 160 }
-                        , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                        , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 125 }
-                        , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                        , { field: '淇敼浜�', title: '淇敼浜�', width: 125 }
-                        , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                        , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 125 }
-                        , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                        , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 125 }
-                        , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                        , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷 ', width: 115 }
+                        , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 105, sort: true }
+                        , { field: '瀹㈡埛鍚嶇О', title: '瀹㈡埛鍚嶇О', width: 105, sort: true }
+                        , { field: '瀹㈡埛浠g爜', title: '瀹㈡埛浠g爜', width: 105, sort: true }
+                        , { field: '浜у搧鍐呯爜', title: '浜у搧鍐呯爜', sort: true }
+                        , { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О', sort: true }
+                        , { field: '浜у搧鍨嬪彿', title: '浜у搧鍨嬪彿', width: 115, sort: true }
+                        , { field: 'HProcCheckEmpID', title: 'HProcCheckEmpID', width: 200, hide: true, sort: true }
+                        , { field: '妫�楠屽憳浠g爜', title: '妫�楠屽憳浠g爜', width: 125, sort: true }
+                        , { field: '妫�楠屽憳鍚嶇О', title: '妫�楠屽憳鍚嶇О', width: 125, sort: true }
+                        , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 160, sort: true }
+                        , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+                        , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 125, sort: true }
+                        , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+                        , { field: '淇敼浜�', title: '淇敼浜�', width: 125, sort: true }
+                        , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+                        , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 125, sort: true }
+                        , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+                        , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 125, sort: true }
+                        , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+                        , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷 ', width: 115, sort: true }
                     ]]
                 };
             }
@@ -193,7 +206,7 @@
                 $.ajax({
                     url: GetWEBURL() + '/QC_OutCompCheckBill/GetOutCompCheckBillList',
                     type: "GET",
-                    data: { "sWhere": sWhere },
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
                     success: function (data1) {
                         if (data1.count == 1) {
                             option.data = data1.data;
@@ -262,7 +275,7 @@
                         $.ajax({
                             url: GetWEBURL() + 'QC_OutCompCheckBill/DeltetOutCompCheckBill',
                             type: "GET",
-                            data: { "HItemID": HItemID },
+                            data: { "HItemID": HItemID, "user": sessionStorage["HUserName"]},
                             success: function (result) {
                                 console.log('gouba' + result);
                                 if (result.count == 1) {
@@ -350,6 +363,124 @@
             }
             //#endregion
 
+            //闅愯棌鍒楄缃�
+            function get_HideColumn() {
+                var colName = "";
+                var contentUrl = "";
+                for (var i = 1; i < option.cols[0].length - 1; i++) {
+                    colName += option.cols[0][i]["title"] + ",";
+                }
+                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" //鍔犱笂杈规
+                    , title: "闅愯棌鍒楄缃�"  //鏍囬
+                    , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                    , shift: 2 //寮瑰嚭鍔ㄧ敾
+                    , area: ["50%", "90%"] //绐椾綋澶у皬
+                    , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                    , content: [contentUrl, "yes"]
+                    , btn: ["纭畾", "鍙栨秷"]
+                    , btn1: function (index, laero) {
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                        layer.close(index);//鍏抽棴寮圭獥
+                    }
+                })
+            }
+
+            //鏄剧ず鍒楁暟鎹�
+            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 = ["hmainid", "hsubid", "HProcCheckEmpID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+                            dataCol = data1.data[0].HGridString.split(',');
+
+                            for (var i = 0; i < option.cols[0].length - 2; 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);
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                })
+            }
+
             ////#region 娓呯┖杩囨护鏉′欢
             //function set_ClearQuery() {
             //    $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
@@ -363,21 +494,7 @@
 
                     //#endregion
 
-
-                    //laydate.render({
-                    //    elem: '#HDate'
-                    //    , type: 'datetime'
-                    //    , trigger: 'click'
-                    //    , format:'yyyy-MM-dd HH:mm'
-                    //});
-
-
                     //浠ヤ笂鏄痩ayui妯″潡
-
-
-
-
-
     </script>
 
 </body>

--
Gitblit v1.9.1