From fe1d21e8d95e069b28d15a4865f6bd7604366d95 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 07 三月 2024 10:51:23 +0800
Subject: [PATCH] 生产订单下查:增加生产订单变更单

---
 WebTM/views/生产管理/生产任务单/Sc_ICMOBillList_LookDown.html |  217 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 WebTM/Properties/PublishProfiles/JFTM.pubxml.user    |    2 
 2 files changed, 212 insertions(+), 7 deletions(-)

diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index 16c1229..1005a4b 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -4065,7 +4065,7 @@
       <publishTime>03/06/2024 13:31:55</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/鐢熶骇浠诲姟鍗�/Sc_ICMOBillList_LookDown.html">
-      <publishTime>01/05/2024 13:27:32</publishTime>
+      <publishTime>03/07/2024 10:26:24</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/鐢熶骇鍋滃伐鍗�/Sc_Add_MESStopWorkBillList - 澶嶅埗.html">
       <publishTime>04/11/2023 16:34:43</publishTime>
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_LookDown.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_LookDown.html"
index 656b142..fe3c19c 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_LookDown.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_LookDown.html"
@@ -29,6 +29,7 @@
                             <li lay-id="2" style="padding: 1px; width: 200px;">鎸囧紩鍗″畬宸ュ崟</li>
                             <li lay-id="2" style="padding: 1px; width: 200px;">宸ュ簭娴佽浆鍗�</li>
                             <li lay-id="2" style="padding: 1px; width: 200px;">鐢熶骇棰嗘枡鍗�</li>
+                            <li lay-id="2" style="padding: 1px; width: 200px;">鐢熶骇璁㈠崟鍙樻洿鍗�</li>
                         </ul>
                         <div class="layui-tab-content">
                             <!--宸ュ簭杩涚珯鎺ユ敹鍗�-->
@@ -85,6 +86,15 @@
                                     </div>
                                 </script>
                             </div>
+                            <!--鐢熶骇璁㈠崟鍙樻洿鍗�-->
+                            <div class="layui-tab-item">
+                                <table class="layui-hide" id="mainTable6" lay-filter="mainTable6"></table>
+                                <script type="text/html" id="toolbarDemo6">
+                                    <div class="layui-btn-container">
+                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn6"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                                    </div>
+                                </script>
+                            </div>
                         </div>
                     </div>
                 </form>
@@ -120,6 +130,7 @@
         var option3 = {};
         var option4 = {};
         var option5 = {};
+        var option6 = {};
 
         //瀛愯〃涓嶉渶瑕佹樉绀虹殑瀛楁
         var titleData0 = ["hmainid", "HProcID", "HMaterID", "HEmpID", "HSourceID", "HGroupID", "HInterID", "HProcExchInterID", "HProcExchEntryID", "HICMOInterID", "HICMOEntryID"];
@@ -128,6 +139,7 @@
         var titleData3 = ["hmainid", "HProcID", "HMaterID", "HEmpID", "HSourceID", "HGroupID", "HInterID", "HProcExchInterID", "HProcExchEntryID", "HICMOInterID", "HICMOEntryID"];
         var titleData4 = ["HEntryID", "HWorkShopID", "HMaterID", "HSupID", "HPRDORGID", "HEquipMentID", "hsubid", "HICMOEntryID", "HDeptID", "hmainid", "hicmointerid", "HICMOInterID", "HMaterID2", "HUnitID", "HBillType", "HRoutingBillID", "HAuxUnit", "鐢熶骇杞﹂棿浠g爜", "鐢熶骇杞﹂棿", "鏉愯川", "鎴愬搧缂栧彿", "鐗堟湰", "鎬昏鍥惧彿", "鍥惧彿鐗堟湰", "瀛愪欢浠g爜", "瀛愪欢鍚嶇О", "瀛愪欢瑙勬牸", "鎵瑰彿", "濮斿鍔犲伐鍗曚綅浠g爜", "濮斿鍔犲伐鍗曚綅", "璁惧鍚嶇О", "璁惧浠g爜", "鍘熸枡鎵规", "琛ユ枡鏍囪", "椤圭洰缂栧彿", "涓昏鏉愭枡", "鍏抽敭鏉愭枡", "浜у搧CODE", "閿�鍞鍗曞彿", "瀹㈡埛绠�绉�", "瀹㈡埛瑕佹眰鏉愭枡鎴愬垎", "浜у搧鍚嶇О2", "瀹㈡埛鍚嶇О", "鐢熶骇澶囨敞", "閲嶈鎻愮ず", "鍘熸潗鏂欑紪鍙稟", "鍘熸潗鏂欑紪鍙稡", "鍘熸潗鏂欑紪鍙稢", "鍘熸潗鏂欑紪鍙稤", "鍘熸潗鏂欏唴鐮丄", "鍘熸潗鏂欏唴鐮丅", "鍘熸潗鏂欏唴鐮丆", "鍘熸潗鏂欏唴鐮丏", "鏃ヨ鍒掑伐鍗曞彿", "瀹㈡埛缂栫爜", "鑺綋瑙勬牸鍨嬪彿", "鑺綋鐗╂枡浠g爜", "婧愬崟瀹㈡埛浠g爜", "HEmpID", "HCusID"];
         var titleData5 = ["鍗曟嵁ID", "hsubid", "HDeptID", "鎵撴祮浜哄唴鐮�", "瀹㈡埛鍐呯爜", "涓讳骇鍝佸唴鐮�", "HMaterID", "HUnitID", "浠诲姟鍗曞唴鐮�", "浠诲姟鍗曞瓙鍐呯爜", "宸ュ簭娴佽浆鍗″唴鐮�", "宸ュ簭娴佽浆鍗″瓙鍐呯爜"];
+        var titleData6 = ["hmainid", "HDeptID", "HEmpID", "HCusID", "HMainSourceInterID", "HMainSourceEntryID", "HMainSourceBillNo", "HMainSourceBillType", "HInnerBillNo", "HOrgID", "HMaterID", "HUnitID", "HSourceInterID", "HSourceEntryID", "HSourceBillNo", "HSourceBillType"];
         
         //#endregion
 
@@ -213,6 +225,17 @@
             }
         });
         //#endregion
+
+        //#region 瀛愯〃6锛氬ご宸ュ叿鏍忎簨浠�
+        table.on('toolbar(mainTable6)', function (obj) {
+            switch (obj.event) {
+                //鍒楄缃�
+                case 'set_HideColumn6':
+                    get_HideColumn6();
+                    break;
+            }
+        });
+        //#endregion
         //#endregion
 
         //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
@@ -244,7 +267,7 @@
                 elem: '#mainTable0'
                 , toolbar: '#toolbarDemo0'
                 , height: 550
-                //, page: true
+                , limit: 500
                 , cellMinWidth: 90
                 //, limit: 50
                 //, limits: [50, 500, 5000, 20000]
@@ -295,7 +318,7 @@
                 , height: 550
                 //, page: true
                 , cellMinWidth: 90
-                //, limit: 50
+                , limit: 500
                 //, limits: [50, 500, 5000, 20000]
                 , cols: [[
                     { type: 'checkbox', fixed: 'left' }
@@ -348,7 +371,7 @@
                 , height: 550
                 //, page: true
                 , cellMinWidth: 90
-                //, limit: 50
+                , limit: 500
                 //, limits: [50, 500, 5000, 20000]
                 , cols: [[
                     { type: 'checkbox', fixed: 'left' }
@@ -397,7 +420,7 @@
                 , height: 550
                 //, page: true
                 , cellMinWidth: 90
-                //, limit: 50
+                , limit: 500
                 //, limits: [50, 500, 5000, 20000]
                 , cols: [[
                     { type: 'checkbox', fixed: 'left' }
@@ -450,7 +473,7 @@
                 , height: 550
                 //, page: true
                 , cellMinWidth: 90
-                //, limit: 50
+                , limit: 500
                 //, limits: [50, 500, 5000, 20000]
                 , text: {
                     none: '鏃犳暟鎹紒'
@@ -464,7 +487,7 @@
                 , height: 550
                 //, page: true
                 , cellMinWidth: 90
-                //, limit: 50
+                , limit: 500
                 //, limits: [50, 500, 5000, 20000]
                 , cols: [[
                     { type: 'checkbox', fixed: 'left' }
@@ -510,6 +533,20 @@
                     , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 100, sort: true }
                     , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 120, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
                 ]]
+                , text: {
+                    none: '鏃犳暟鎹紒'
+                }
+            };
+
+            //鍔ㄦ�佹樉绀哄垪鍚�
+            option6 = {
+                elem: '#mainTable6'
+                , toolbar: '#toolbarDemo6'
+                , height: 550
+                //, page: true
+                , cellMinWidth: 90
+                , limit: 500
+                //, limits: [50, 500, 5000, 20000]
                 , text: {
                     none: '鏃犳暟鎹紒'
                 }
@@ -567,6 +604,13 @@
                             , "list": data1.list[5]
                         };
                         setInit_mainTable5(table5);
+
+                        //娓叉煋琛�6
+                        var table6 = {
+                            "data": data1.data[6]
+                            , "list": data1.list[6]
+                        };
+                        setInit_mainTable6(table6);
 
                         layer.close(ajaxLoad);
                     } else {
@@ -837,6 +881,49 @@
 
             //鍒锋柊琛ㄦ牸鏁版嵁
             DisPlay_HideColumn5();
+        }
+        //#endregion
+
+        //#region 娓叉煋琛�6
+        function setInit_mainTable6(data1) {
+            //闇�瑕佽缃悎璁¤鐨勫垪
+            var totalArray = [];
+
+            //鏁寸悊瀛愯〃鐨勫垪
+            var data = [];
+            var col = [];
+            //缁欑┖鐨勬暟缁勮祴鍊�
+            for (var key in data1.list) {
+                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+            }
+            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+            col.push({ type: 'checkbox', fixed: 'left' });
+            for (var i = 0; i < data.length; i++) {
+                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                if ($.inArray(data[i].name, titleData6) > -1) {
+                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                }
+                else if ($.inArray(data[i].name, totalArray) > -1) {
+                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+                } else {
+                    switch (data[i].Type) {
+                        //int
+                        case 'DateTime':
+                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
+                            break;
+                        default:
+                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 });
+                    }
+                }
+            }
+
+            //璁剧疆瀛愯〃娓叉煋鍙傛暟鐨勫垪闆嗗悎鍜屾暟鎹苟娓叉煋
+            option6.cols = [col];
+            option6.data = data1.data;
+            table.render(option6);
+
+            //鍒锋柊琛ㄦ牸鏁版嵁
+            DisPlay_HideColumn6();
         }
         //#endregion
 
@@ -1548,6 +1635,124 @@
         }
         //#endregion
 
+        //#region 瀛愯〃6锛氶殣钘忓垪璁剧疆
+        function get_HideColumn6() {
+            HModName = "Sc_ICMOBillList_LookDown_ICMOChangeBillList";
+            var colName = "";
+            var contentUrl = "";
+            for (var i = 1; i < option6.cols[0].length; i++) {
+                colName += option6.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_HideColumn6();
+                    //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                    layer.close(index);//鍏抽棴寮圭獥
+                }
+            })
+        }
+        //#endregion
+        //#region 瀛愯〃6锛氭樉绀哄垪鏁版嵁
+        function DisPlay_HideColumn6() {
+            HModName = "Sc_ICMOBillList_LookDown_ICMOChangeBillList";
+            $.ajax({
+                url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                type: "GET",
+                data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+                async: false,
+                success: function (data1) {
+                    if (data1.data.length != 0) {
+                        var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+                        dataCol = data1.data[0].HGridString.split(',');
+
+                        for (var i = 0; i < option6.cols[0].length - 1; i++) {
+                            var dataCols = dataCol[i].split('|');
+                            //闅愯棌鍒�
+                            if (dataCols[1] == 1) {
+                                option6.cols[0][i + 1]["hide"] = true;
+                            }
+                            //璁剧疆鍒楀
+                            if (dataCols[3] > 0) {
+                                option6.cols[0][i + 1]["width"] = dataCols[3];
+                            }
+                            //璁剧疆鍐呭瀛椾綋澶у皬
+                            if (data1.data[0].HFontSize != 0) {
+                                option6.cols[0][i + 1]["style"] += "font-size:" + data1.data[0].HFontSize + "px;";
+                            } else {
+                                option6.cols[0][i + 1]["style"] += "font-size:100%";
+                            }
+                            //璁剧疆鍒楀
+                            //if (data1.data[0].HColumnWidth != 0) {
+                            //    option2.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+                            //} else {
+                            //    option2.cols[0][i + 1]["width"] = "";
+                            //}
+                            //鏄剧ず鍒�
+                            if (dataCols[1] == 0 && $.inArray(option6.cols[0][i + 1]["title"], titleData6) == -1) {
+                                option6.cols[0][i + 1]["hide"] = false;
+                            }
+                            //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                            switch (dataCols[2]) {
+                                case "L":
+                                    option6.cols[0][i + 1]["align"] = "left";
+                                    break;
+                                case "M":
+                                    option6.cols[0][i + 1]["align"] = "center";
+                                    break;
+                                case "R":
+                                    option6.cols[0][i + 1]["align"] = "right";
+                                    break;
+                            }
+                        }
+
+                        //鍙栨秷鍐荤粨鍒�
+                        for (var i = 1; i < option6.cols[0].length - 1; i++) {
+                            if (option6.cols[0][i]["fixed"] != null) {
+                                option6.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(option6.cols[0][i + 1]["title"], titleData6) != -1) {
+                                    data1.data[0].HFixCols += 1;
+                                }
+                                option6.cols[0][i + 1]["fixed"] = "left";
+                            }
+                        }
+                        table.render(option6);
+                    } else {
+                        table.render(option6);
+                    }
+                }, error: function () {
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            })
+        }
+        //#endregion
+
         //#region 鑾峰彇鍙傛暟
         function getUrlVars() {
             var vars = [], hash;

--
Gitblit v1.9.1