From b0099ca2ee76daa4fe2238f5a1a1fffef1066e5a Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 11 九月 2024 21:22:15 +0800
Subject: [PATCH] 1

---
 WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html |  577 ++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 506 insertions(+), 71 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html"
index d3e2c3e..41221f7 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html"
@@ -2,7 +2,7 @@
 <html>
 <head>
     <meta charset="utf-8" />
-    <title>鐢熶骇璁″垝骞冲彴</title>
+    <title>鐢熶骇璁″垝鎺掍骇</title>
     <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
     <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
     <script src="../../../layuiadmin/layui/layui.js"></script>
@@ -31,7 +31,7 @@
                             <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnProPC" id="btnProPC">鎺掍骇</button>
                             <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnRoutEdit" id="btnRoutEdit">宸ヨ壓璺嚎</button>
                         </div>
-                        <div class="layui-collapse">
+                        <div class="layui-collapse resizable-container">
                             <div class="layui-colla-item">
                                 <div class="layui-colla-title layui-inline">
                                     <div class="layui-inline">
@@ -178,6 +178,61 @@
                                             <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
                                         </div>
                                     </div>
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1">
+                                        </div>
+                                    </div>
+
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -185,10 +240,11 @@
                         <div class="layui-row" style="padding:10px 0">
                             <table class="" id="mainTable" lay-filter="mainTable"></table>
                         </div>
-                        <div class="layui-tab layui-tab-card" style="margin-top:40px;">
+                        <div class="resizable-container layui-tab layui-tab-card" style="margin-top:40px;">
                             <ul class="layui-tab-title">
-                                <li class="layui-this">鐢熶骇璁㈠崟</li>                                
-                            </ul>
+                                <li class="layui-this">鐢熶骇璁㈠崟</li>
+                                <li>缂烘枡鍒嗘瀽</li>
+                            </ul>                            
                             <div class="layui-tab-content">
                                 <div class="layui-tab-item layui-show">
                                     <div class="layui-inline">
@@ -224,8 +280,11 @@
                                     <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch_ICMO" id="btnSearch_ICMO">鏌ヨ</button>
                                     <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch_ICMO" id="btnReSearch_ICMO">閲嶇疆</button>
                                     <!--寰呮帓璁㈠崟-->
-                                    <table class="layui-hide" id="mainTable_ICMO" lay-filter="mainTable_ICMO"></table>
-                                </div>                               
+                                    <table class="layui-hide" id="mainTable_ICMO" lay-filter="mainTable_ICMO"></table>                                    
+                                </div>
+                                <div class="layui-tab-item">
+                                    <table class="layui-hide" id="mainTable_Material" lay-filter="mainTable_Material"></table>
+                                </div>
                             </div>
                         </div>
                         <script type="text/html" id="toolbarDemo">
@@ -239,6 +298,7 @@
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Priority"><i class="layui-icon layui-icon-delete"></i>浼樺厛绾�</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ReadyAsc"><i class="layui-icon layui-icon-delete"></i>鍑嗗鎺掑簭</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Souce"><i class="layui-icon layui-icon-delete"></i>閫変骇绾�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Emp"><i class="layui-icon layui-icon-delete"></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="set_Routing"><i class="layui-icon layui-icon-form"></i>宸ヨ壓璺嚎</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Calendar"><i class="layui-icon layui-icon-form"></i>宸ュ巶鏃ュ巻</button>
@@ -249,6 +309,12 @@
                             <div class="layui-btn-container">
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Arrangement"><i class="layui-icon layuiiconform"></i>鎺掍骇</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn_ICMO"><i class="layui-icon layuiiconform"></i>鍒楄缃�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
+                            </div>
+                        </script>
+                        <script type="text/html" id="toolbarDemo3">
+                            <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn_Material"><i class="layui-icon layuiiconform"></i>鍒楄缃�</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
                             </div>
                         </script>
@@ -265,11 +331,12 @@
 </script>
 <script>
     var OptionData = [];
+    var OptionData_Emp = [];
     layui.config({
         base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
     }).extend({
         index: 'lib/index', //涓诲叆鍙fā鍧�
-    }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util','soulTable'], function () {
+    }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'soulTable','jquery'], function () {
         //#region 鍏敤鍙橀噺
 
         var $ = layui.$
@@ -286,23 +353,27 @@
         var sWhere_ICMO = "";
         var option = [];
         var option2 = [];
+        var option3 = [];
         var option_columns = [];
         var HModName = "JIT_DayPlanPlatForm";
         //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
         var titleData = [];
-        var titleData_ICMO = ["hmainid", "HEntryID", "HEmpID", "HPRDORGID", "hsubid", "HMaterID", "HUnitID", "HDeptID", "HEntryCusID", "HCenterID","HSourceID"];
+        var titleData_ICMO = ["hmainid", "HEntryID", "HEmpID", "HPRDORGID", "hsubid", "HMaterID", "HUnitID", "HDeptID", "HEntryCusID", "HCenterID", "HSourceID"];
         //#endregion
 
         //#region 杩涘叆椤甸潰鍗冲姞杞�
 
         //鍒濆鍖栫晫闈�
+        $(document).ready(function () {
+            set_InitGrid();
+        });
         set_ClearBill();
 
         //#endregion
 
         //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
 
-         //琛屽唴榧犳爣绂诲紑浜嬩欢
+        //琛屽唴榧犳爣绂诲紑浜嬩欢
         table.on('edit(mainTable)', function (obj) {
             var myDate = new Date();
             var yyyy = myDate.getFullYear();
@@ -352,7 +423,7 @@
                 });
                 return layer.msg("鎺掍骇鏁伴噺澶т簬璁㈠崟鏁伴噺!")
             }
-            
+
             if (Date.parse(obj.field) > Date.parse(obj.data.璁″垝缁撴潫鏃ユ湡)) {
                 return layer.msg("鎺掍骇鏃ユ湡瓒呭嚭璁″垝缁撴潫鏃ユ湡!");
             }
@@ -496,6 +567,10 @@
                 case 'set_Souce':
                     set_Souce(data);
                     break;
+                //閫夋搷浣滃伐
+                case 'set_Emp':
+                    set_Emp(data);
+                    break;                    
                 //鏌ョ湅宸ヨ壓璺嚎
                 case 'set_Routing':
                     set_Routing();
@@ -512,7 +587,7 @@
             }
         });
 
-
+        //鐢熶骇璁㈠崟
         table.on('toolbar(mainTable_ICMO)', function (obj) {
             var checkStatus = table.checkStatus(obj.config.id);
             switch (obj.event) {
@@ -530,6 +605,20 @@
                     break;
             };
         });
+        //缂烘枡鍒嗘瀽
+        table.on('toolbar(mainTable_Material)', function (obj) {
+            var checkStatus = table.checkStatus(obj.config.id);
+            switch (obj.event) {
+                //閫�鍑烘寜閽�
+                case 'btn-Close':
+                    parent.layui.admin.events.closeThisTabs();
+                    break;
+                //鍒楄缃�
+                case 'set_HideColumn_Material':
+                    get_HideColumn_Material();
+                    break;
+            };
+        });
 
         //瀵煎叆
         form.on('submit(ExcelImport)', function () {
@@ -538,7 +627,7 @@
 
         //淇濆瓨
         form.on('submit(btnSave)', function (data) {
-           var HWorkShopID = $("#HWorkShopID").val();//鐢熶骇杞﹂棿
+            var HWorkShopID = $("#HWorkShopID").val();//鐢熶骇杞﹂棿
             if (HWorkShopID == 0) {
                 return layer.msg("鐢熶骇杞﹂棿涓嶈兘涓虹┖!");
             } else if (table.cache["mainTable"].length == 0) {
@@ -546,11 +635,11 @@
             } else {
                 var HYxjQty = 0;
                 for (var i = 0; i < table.cache["mainTable"].length; i++) {
-                   if (table.cache["mainTable"][i] != "") {                       
-                      if (parseFloat(table.cache["mainTable"][i]["浼樺厛绾�"]) == 0) {
-                          HYxjQty++
-                       }
-                   }
+                    if (table.cache["mainTable"][i] != "") {
+                        if (parseFloat(table.cache["mainTable"][i]["浼樺厛绾�"]) == 0) {
+                            HYxjQty++
+                        }
+                    }
                 }
                 if (HYxjQty > 0) {
                     layer.confirm('褰撳墠鎺掍骇椤甸潰瀛樺湪浼樺厛绾т负0鐨勭敓浜ц鍗曪紝鏄惁缁х画杩涜鎺掍骇锛�', {
@@ -566,7 +655,7 @@
                     });
                 } else {
                     set_AddNew();
-                }                
+                }
             }
         });
 
@@ -718,7 +807,7 @@
             DisPlay_HideColumn();
             get_Display2(sWhere_ICMO);
         }
-         //#endregion
+        //#endregion
 
         //鑾峰彇缁勭粐
         function Organ() {
@@ -753,8 +842,7 @@
             columns.push({ field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', hide: true, sort: true });
             columns.push({ field: '閿�鍞鍗曞彿', title: '閿�鍞鍗曞彿', width: 150, sort: true });
             columns.push({ field: '鐢熶骇璁㈠崟鍙�', title: '鐢熶骇璁㈠崟鍙�', width: 150, style: 'background-color: #f9f9f9;', sort: true });
-            columns.push({ field: '鐢熶骇璁㈠崟鏄庣粏琛屽彿', title: '鐢熶骇璁㈠崟鏄庣粏琛屽彿', width: 150, sort: true });
-            columns.push({ field: '鐢熶骇缁勭粐', title: '鐢熶骇缁勭粐', width: 150, sort: true });           
+            columns.push({ field: '鐢熶骇缁勭粐', title: '鐢熶骇缁勭粐', width: 150, sort: true });
             columns.push({ field: '鐗╂枡浠g爜', title: '鐗╂枡缂栫爜', width: 150, sort: true });
             columns.push({ field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, sort: true });
             columns.push({ field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 150, sort: true });
@@ -765,137 +853,169 @@
             columns.push({ field: '浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�', title: '浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�', width: 150, sort: true });//0
             columns.push({ field: '璁″垝寮�濮嬫棩鏈�', title: '棰勮寮�宸ユ棩鏈�', width: 150, templet: "<div>{{d.璁″垝寮�濮嬫棩鏈� ==null ?'':layui.util.toDateString(d.璁″垝寮�濮嬫棩鏈�, 'yyyy-MM-dd')}}</div>", sort: true });
             columns.push({ field: '璁″垝缁撴潫鏃ユ湡', title: '璁″垝缁撴潫鏃ユ湡', width: 150, templet: "<div>{{d.璁″垝缁撴潫鏃ユ湡 ==null ?'':layui.util.toDateString(d.璁″垝缁撴潫鏃ユ湡, 'yyyy-MM-dd')}}</div>", event: "HPlanEndDate", sort: true });
-            columns.push({ field: '璁㈠崟鍙帓鏁伴噺', title: '璁㈠崟鍙帓鏁伴噺', width: 150});
+            columns.push({ field: '璁㈠崟鍙帓鏁伴噺', title: '璁㈠崟鍙帓鏁伴噺', width: 150 });
             columns.push({ field: '鎷嗗崟鏁伴噺', title: '鎷嗗崟鏁伴噺', width: 150, edit: 'text' });
-            columns.push({ field: '鏄ㄦ棩鏁伴噺', title: '鏄ㄦ棩鏁伴噺'});
+            columns.push({ field: '鏄ㄦ棩鏁伴噺', title: '鏄ㄦ棩鏁伴噺' });
             columns.push({ field: '浼樺厛绾�', title: '浼樺厛绾�', width: 150, edit: 'text', sort: true });
             columns.push({ field: '鐢熶骇璧勬簮', title: '鐢熶骇璧勬簮', width: 150, edit: 'text', event: "HSourceID" });
+            columns.push({ field: '鎿嶄綔宸�', title: '鎿嶄綔宸�', width: 150, edit: 'text', event: "HEmpID" });
 
             columns.push({
                 field: Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 0 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
-                    return DayColor(d[Format(myDate.getTime() + 0 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd')],d,Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                    return DayColor(d[Format(myDate.getTime() + 0 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd'));
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 1 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 1 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 1 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 1 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 1 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 2 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 2 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 2 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 2 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 2 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 3 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 3 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 3 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 3 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 3 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 4 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 4 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 4 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 4 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 4 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 5 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 5 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 5 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 5 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 5 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 6 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 6 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 6 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 6 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 6 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 7 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 7 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 7 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 7 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 7 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 8 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 8 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 8 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 8 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 8 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 9 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 9 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 9 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 9 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 9 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 10 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 10 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 10 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 10 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 10 * oneday, 'yyyy-MM-dd'));
-                }  })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 11 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 11 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 11 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 11 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 11 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 12 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 12 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 12 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 12 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 12 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 13 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 13 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 13 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 13 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 13 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 14 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 14 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 14 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 14 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 14 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 15 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 15 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 15 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 15 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 15 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 16 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 16 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 16 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 16 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 16 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 17 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 17 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 17 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 17 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 17 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 18 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 18 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 18 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 18 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 18 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 19 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 19 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 19 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 19 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 19 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 20 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 20 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 20 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 20 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 20 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 21 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 21 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 21 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 21 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 21 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 22 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 22 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 22 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 22 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 22 * oneday, 'yyyy-MM-dd'));
-                }  })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 23 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 23 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 23 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 23 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 23 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 24 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 24 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 24 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 24 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 24 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 25 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 25 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 25 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 25 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 25 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 26 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 26 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 26 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 26 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 26 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 27 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 27 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 27 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 27 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 27 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 28 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 28 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 28 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 28 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 28 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 29 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 29 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 29 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 29 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 29 * oneday, 'yyyy-MM-dd'));
-                } })//0
+                }
+            })//0
             columns.push({
                 field: Format(myDate.getTime() + 30 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 30 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                     return DayColor(d[Format(myDate.getTime() + 30 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 30 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 30 * oneday, 'yyyy-MM-dd'));
-                }  })//0
-
+                }
+            })//0
+            columns.push({ field: '鐢熶骇璁㈠崟鏄庣粏琛屽彿', title: '鐢熶骇璁㈠崟鏄庣粏琛屽彿', width: 150, sort: true });
             columns.push({ field: 'T31', title: 'T31', width: 70 });//0
             columns.push({ field: '璁㈠崟绫诲瀷', title: '璁㈠崟绫诲瀷', width: 150, sort: true });
             columns.push({ field: '鐢熶骇璁㈠崟鍗曟嵁绫诲瀷', title: '婧愬崟璁㈠崟鍗曟嵁绫诲瀷', width: 150, sort: true });
@@ -905,7 +1025,7 @@
             columns.push({ field: '璁㈠崟绛夌骇', title: '璁㈠崟绛夌骇', width: 150, sort: true });
             columns.push({ field: '璁㈠崟浜よ揣鏈�', title: '璁㈠崟浜よ揣鏈�', width: 150, templet: "<div>{{d.璁㈠崟浜よ揣鏈� =='1900-01-01' ?'':layui.util.toDateString(d.璁㈠崟浜よ揣鏈�, 'yyyy-MM-dd')}}</div>", sort: true });
             columns.push({ field: '璁㈠崟闇�姹傛暟閲�', title: '璁㈠崟闇�姹傛暟閲�', width: 150, sort: true });
-            columns.push({ field: '寮�宸ヤ綑閲�', title: '寮�宸ヤ綑閲�', width: 150, sort: true });           
+            columns.push({ field: '寮�宸ヤ綑閲�', title: '寮�宸ヤ綑閲�', width: 150, sort: true });
             columns.push({ field: '鐢熶骇鍛ㄦ湡', title: '鐢熶骇鍛ㄦ湡', width: 150, sort: true });
             columns.push({ field: '鏈�杩熷紑宸ユ棩鏈�', title: '鏈�杩熷紑宸ユ棩鏈�', width: 150, templet: "<div>{{d.鏈�杩熷紑宸ユ棩鏈� =='' ?'':layui.util.toDateString(d.鏈�杩熷紑宸ユ棩鏈�, 'yyyy-MM-dd')}}</div>", sort: true });
             columns.push({ field: '鏈�杩熷畬宸ユ棩鏈�', title: '鏈�杩熷畬宸ユ棩鏈�', width: 150, templet: "<div>{{d.鏈�杩熷畬宸ユ棩鏈� =='' ?'':layui.util.toDateString(d.鏈�杩熷畬宸ユ棩鏈�, 'yyyy-MM-dd')}}</div>", sort: true });
@@ -917,15 +1037,16 @@
             columns.push({ field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 150, sort: true });
             columns.push({ field: '鎷嗗崟鏁伴噺', title: '鎷嗗崟鏁伴噺', width: 150 });//0
             columns.push({ field: '鏈叆搴撴暟閲�', title: '鏈叆搴撴暟閲�', width: 150 });//0
-            columns.push({ field: 'HICMOInterID', title: 'HICMOInterID', width: 150, hide:true });
-            columns.push({ field: 'HGroupID', title: 'HGroupID', width: 150, hide:true });
-            columns.push({ field: 'HGroupName', title: 'HGroupName', width: 150, hide:true });
+            columns.push({ field: 'HICMOInterID', title: 'HICMOInterID', width: 150, hide: true });
+            columns.push({ field: 'HGroupID', title: 'HGroupID', width: 150, hide: true });
+            columns.push({ field: 'HGroupName', title: 'HGroupName', width: 150, hide: true });
             columns.push({ field: '鐢熶骇璧勬簮浠g爜', title: '鐢熶骇璧勬簮浠g爜', width: 150, hide: true });
             columns.push({ field: 'HSourceID', title: 'HSourceID', hide: true });
             columns.push({ field: 'HMaterID', title: 'HMaterID', hide: true });
             columns.push({ field: 'HWorkShopID', title: 'HWorkShopID', hide: true });
             columns.push({ field: 'HUnitID', title: 'HUnitID', hide: true });
             columns.push({ field: 'HProdORGID', title: 'HProdORGID', hide: true });
+            columns.push({ field: 'HEmpID', title: 'HEmpID', hide: true });
             columns.push({ field: '鎷嗗崟姹囨姤鏁伴噺', title: '鎷嗗崟姹囨姤鏁伴噺', width: 150, edit: 'text', sort: true });
             columns.push({ fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' });
             option_columns = columns;
@@ -939,6 +1060,17 @@
                 , limit: Number.MAX_VALUE//榛樿鏄剧ず鍏ㄩ儴
                 , done: function (res, page, count) {
                     soulTable.render(this);
+                    $('.layui-table thead').on('click', 'th', function () {
+                        // 鑾峰彇鐐瑰嚮鐨勮〃澶寸殑 field 鍊�
+                        var field = $(this).data('field');
+                        set_InitGrid1(field);
+                        sWhere = {
+                            HORGID: sessionStorage["OrganizationID"]
+                            , HBEGINDATE: field
+                            , HENDDATE: field
+                        }
+                        get_Display_3(JSON.stringify(sWhere));
+                    });
                     //res.data.forEach(function (item, index) {
                     //    if (data1.data.DataColor != undefined) {
                     //        var sj = data1.data.DataColor;
@@ -955,6 +1087,34 @@
                     //        }
                     //    }
                     //})
+                }
+            }
+        }
+
+        //缂烘枡鍒嗘瀽琛ㄦ牸鏁版嵁
+        function set_InitGrid1(field) {
+            var columns = [];
+            columns.push({ field: 'HOrgName', title: '閲囪喘缁勭粐', sort: true });
+            columns.push({ field: 'FNUMBER', title: '鐗╂枡缂栫爜', sort: true });
+            columns.push({ field: 'HMaterName', title: '鐗╂枡鍚嶇О', sort: true });
+            columns.push({ field: 'HMaterModel', title: '鐗╂枡瑙勬牸', sort: true });
+            columns.push({ field: '鍦ㄩ�旀暟閲�', title: '鍦ㄩ�旀暟閲�', totalRow: true });
+            columns.push({ field: 'CountHQty', title: '鍚堣', sort: true });
+            columns.push({ field: 'FBASEQTY', title: '鍗虫椂搴撳瓨鏁伴噺', sort: true, totalRow: true });
+            columns.push({ field: Format(field, 'yyyy-MM-dd'), title: Format(field, 'MM.dd'), width: 70 })
+
+            option_columns = columns;
+            option3 = {
+                elem: '#mainTable_Material'
+                , toolbar: '#toolbarDemo3'
+                , height: 'full-120'
+                , page: false
+                , cellMinWidth: 90
+                , cols: [columns]
+                , limit: Number.MAX_VALUE//榛樿鏄剧ず鍏ㄩ儴
+                , done: function (res, page, count) {
+                    soulTable.render(this);
+
                 }
             };
         }
@@ -1119,6 +1279,31 @@
             });
         }
 
+        //鏌ヨ  琛ㄦ牸鏁版嵁  缂烘枡鍒嗘瀽
+        function get_Display_3(sWhere) {
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHDateTimeList',
+                type: "GET",
+                async: false,
+                data: { "sWhere": sWhere },
+                success: function (result) {
+                    if (result.count == 1) {
+                        option3.data = result.data;
+                        table.render(option3);
+                        layer.close(ajaxLoad);
+                        //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(result.code + result.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
         //鏁伴噺鏍囪棰滆壊
         function DayColor(DaySate, DayHQty,Data,NowData) {
             if (DaySate == "榻愬" || DaySate == "鏈綈濂�") {
@@ -1258,6 +1443,12 @@
             var ColName = $("#ColName").val();//澶嶉�夋
             var Comparator = $("#Comparator").val()
             var ColContent = $("#ColContent").val();
+            var ColName1 = $("#ColName1").val();//澶嶉�夋
+            var Comparator1 = $("#Comparator1").val()
+            var ColContent1 = $("#ColContent1").val();
+            var ColName2 = $("#ColName2").val();//澶嶉�夋
+            var Comparator2 = $("#Comparator2").val()
+            var ColContent2 = $("#ColContent2").val();
             var sWheres = "";
 
             if (ColName != 0 && Comparator != 0) {
@@ -1282,6 +1473,48 @@
                 sWheres += " and [" + ColName + "] " + com;
             }
 
+            if (ColName1 != 0 && Comparator1 != 0) {
+                var com1 = "";
+                switch (Comparator1) {
+                    case "7":
+                        com1 = "like'%" + ColContent1 + "%'";
+                        break;
+                    case "8":
+                        com1 = "like'%" + ColContent1 + "'";
+                        break;
+                    case "9":
+                        com1 = "like'" + ColContent1 + "%'";
+                        break;
+                    case "10":
+                        com1 = "not like'%" + ColContent1 + "%'";
+                        break;
+                    default:
+                        com1 = "" + Comparator1 + "'" + ColContent1 + "'";
+                        break;
+                }
+                sWhere += " and " + ColName1 + " " + com1;
+            }
+            if (ColName2 != 0 && Comparator2 != 0) {
+                var com2 = "";
+                switch (Comparator2) {
+                    case "7":
+                        com2 = "like'%" + ColContent2 + "%'";
+                        break;
+                    case "8":
+                        com2 = "like'%" + ColContent2 + "'";
+                        break;
+                    case "9":
+                        com2 = "like'" + ColContent2 + "%'";
+                        break;
+                    case "10":
+                        com2 = "not like'%" + ColContent2 + "%'";
+                        break;
+                    default:
+                        com2 = "" + Comparator + "'" + ColContent + "'";
+                        break;
+                }
+                sWhere += " and " + ColName2 + " " + com2;
+            }
             sWhere = {
                 HPlanBeginDate: HPlanBeginDate
                 , HProdORGID: HProdORGID
@@ -1365,6 +1598,12 @@
             $("#ColContent").val("");
             $("#ColName").val("0");
             $("#Comparator").val("0");
+            $("#ColContent1").val("");
+            $("#ColName1").val("0");
+            $("#Comparator1").val("0");
+            $("#ColContent2").val("");
+            $("#ColName2").val("0");
+            $("#Comparator2").val("0");
             form.render('select');
             sWhere = "";
         }
@@ -1490,10 +1729,10 @@
                 }
                 if (isNaN(data[i]["HSourceID"])) {
                     return layer.msg("閫夋嫨鐢熶骇璧勬簮!!")
-                }               
+                }
                 HICOMNum.push(data[i]["HICMOInterID"] + ";" + data[i]["HICMOEntryID"] + ";" + data[i]["HSourceID"]);
             }
-           
+
             $('#HProgressBar').html(`
     <div class="layui-progress" lay-filter="demo-filter-progress">
       <div class="layui-progress-bar" lay-percent="40%"></div>
@@ -1554,14 +1793,14 @@
                         $('#HProgressBar').html('')
 
                         table.render(option);
-
+                        set_Priority();
                         data = table.cache["mainTable"];
                         for (var i = 0; i < data.length; i++) {
                             if (parseFloat(data[i]["灏忔椂浜ц兘"]) == 0 || parseFloat(data[i]["灏忔椂浜ц兘"]) == null || parseFloat(data[i]["灏忔椂浜ц兘"]) == undefined) {
                                 return layer.alert("绗�" + (i + 1) + '琛岋紝灏忔椂浜ц兘鏈缃紝璇锋牳瀵规暟鎹��' + '</br>' + '1.鐗╂枡鏈坊鍔犲伐鑹鸿矾绾�' + '</br>' + '2.宸ヨ壓璺嚎涓湭璁剧疆灏忔椂浜ц兘' + '</br>' + '3.鐢熶骇璧勬簮鏈缃崟鐝伐鏃�' + '</br>' + '4.鐢熶骇璧勬簮涓粦瀹氬伐浣滀腑蹇冧笌宸ヨ壓璺嚎涓缃殑宸ヤ綔涓績涓嶄竴鑷�');
                             }
                         }
-                        
+
                     } else {
                         //layer.close(ajaxLoad);
                         layer.alert(data1.code + data1.Message, { icon: 5 });
@@ -2494,12 +2733,59 @@
                 return layer.msg("璇烽�夋嫨鏁版嵁!")
             }
         }
+        
+        //閫夋搷浣滃伐
+        function set_Emp(data) {
+            if (data != 0) {
+                layer.open({
+                    type: 2
+                    , skin: "layui-layer-rim" //鍔犱笂杈规
+                    , title: "鑱屽憳鍒楄〃"  //鏍囬
+                    , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                    , shift: 2 //寮瑰嚭鍔ㄧ敾
+                    , area: ["90%", "90%"] //绐椾綋澶у皬
+                    , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                    , content: ["../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Htype=HEmp", "yes"]
+                    , btn: ["纭畾", "鍙栨秷"]
+                    , btn1: function (index, laero) {
+                        //鎸夐挳涓�  鐨勫洖璋�
+                        var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+                        if (checkStatus.data.length != 1) {
+                            return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+                        }
+                        OptionData_Emp[0] = checkStatus.data[0];
+                        layer.close(index);//鍏抽棴寮圭獥
+                    }
+                    , end: function () {
+                        if (OptionData_Emp.length > 0) {
+                            var num = 0;
+                            for (var i = 0; i < option.data.length; i++) {
+                                if (num >= data.length) {
+                                    break;
+                                }
+                                if (option.data[i]["LAY_CHECKED"] == true) {
+                                    option.data[i]["HEmpID"] = OptionData_Emp[0].HItemID;
+                                    option.data[i]["鎿嶄綔宸�"] = OptionData_Emp[0].鑱屽憳鍚嶇О;
+                                    num += 1;
+                                }
+                            }
+                            table.render(option);
+                        }
+                    }
+                })
+            }
+            else {
+                return layer.msg("璇烽�夋嫨鏁版嵁!")
+            }
+        }
 
         //淇濆瓨
         function set_AddNew() {
 
             //鍒犻櫎瀛愯〃鏁版嵁 浼氬崰鐢ㄦ暟缁勭殑浣嶇疆,闇�瑕侀噸鏂版帓涓�涓嬮『搴�
-            var num = [];            
+            var num = [];
             for (var i = 0; i < table.cache["mainTable"].length; i++) {
                 if (table.cache["mainTable"][i] != "") {
                     if (parseFloat(table.cache["mainTable"][i]["鎷嗗崟鏁伴噺"]) == 0) {
@@ -2511,7 +2797,7 @@
                     table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
                     num.push(table.cache["mainTable"][i])
                 }
-            }           
+            }
 
             //var sMainStr = JSON.stringify(data.field);
             var sSubStr = JSON.stringify(num);
@@ -2620,6 +2906,47 @@
                             }
                         })
                     }
+
+                    //鎿嶄綔宸�
+                    if (obj.event == "HEmpID") {
+                        layer.open({
+                            type: 2
+                            , skin: "layui-layer-rim" //鍔犱笂杈规
+                            , title: "鍛樺伐鍒楄〃"  //鏍囬
+                            , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                            , shift: 2 //寮瑰嚭鍔ㄧ敾
+                            , area: ["90%", "90%"] //绐椾綋澶у皬
+                            , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                            , content: ["../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Htype=HEmp", "yes"]
+                            , btn: ["纭畾", "鍙栨秷"]
+                            , btn1: function (index, laero) {
+                                //鎸夐挳涓�  鐨勫洖璋�
+                                var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+                                var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+                                if (checkStatus.data.length != 1) {
+                                    return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+                                }
+                                OptionData_Emp[0] = checkStatus.data[0];
+                                //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                obj.update({
+                                    "HEmpID": checkStatus.data[0].HItemID
+                                    , "鎿嶄綔宸�": checkStatus.data[0].鑱屽憳鍚嶇О
+                                })
+                                layer.close(index);//鍏抽棴寮圭獥
+                            }
+                            , end: function () {
+                                if (OptionData_Emp.length > 0) {
+                                    obj.update({
+                                        "HEmpID": OptionData_Emp[0].HItemID
+                                        , "鎿嶄綔宸�": OptionData_Emp[0].鑱屽憳鍚嶇О
+                                    })
+                                    OptionData_Emp = [];
+                                }
+                            }
+                        })
+                    }
+
                     obj.event = "";
                     return false;
                 } else if (event.key == "F8") {
@@ -2766,7 +3093,7 @@
                             , data: data1.data
                             , height: 400
                             , page: true
-                            , limits: [200, 500, 5000, 50000]
+                            , limits: [200, 500, 5000, 20000]
                             , limit: 200
                             , cellMinWidth: 90
                         }
@@ -2913,7 +3240,7 @@
                     item.瑙勬牸鍨嬪彿 = item.瑙勬牸鍨嬪彿.replace(/[,]+/g, '锛�');  // 灏嗘崲鍒嗗彿鏇挎崲涓虹┖瀛楃涓�
                 }
             });
-            table.exportFile(ins.config.id, data, "xls"); 
+            table.exportFile(ins.config.id, data, "xls");
         }
 
         //鎺掍骇鍔熻兘
@@ -3031,7 +3358,9 @@
                         dataCol = data1.data[0].HGridString.split(',');
 
                         for (var i = 0; i < option.cols[0].length - 2; i++) {
-                            var dataCols = dataCol[i].split('|');
+                            if (dataCol[i]) {
+                                var dataCols = dataCol[i].split('|');
+                            }                           
                             //闅愯棌鍒�
                             if (dataCols[1] == 1) {
                                 option.cols[0][i + 1]["hide"] = true;
@@ -3216,6 +3545,105 @@
             })
         }
 
+        function get_HideColumn_Material() {
+            var colName = "";
+            var contentUrl = "";
+            for (var i = 1; i < option3.cols[0].length; i++) {
+                colName += option3.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 + "Main" + '&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_Material();
+                    //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                    layer.close(index);//鍏抽棴寮圭獥
+                }
+            })
+        }
+
+        function DisPlay_HideColumn_Material() {
+            $.ajax({
+                url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                type: "GET",
+                data: { "HModName": HModName + "Main", "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.data.length != 0) {
+
+
+                        var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+
+                        dataCol = data1.data[0].HGridString.split(',');
+
+                        for (var i = 0; i < option3.cols[0].length - 1; i++) {
+                            if (dataCol[i]) {
+                                var dataCols = dataCol[i].split('|');
+                            }
+                            //闅愯棌鍒�
+                            if (dataCols[1] == 1) {
+                                option3.cols[0][i + 1]["hide"] = true;
+                            }
+                            //璁剧疆鍒楀
+                            if (dataCols[3] > 0) {
+                                option3.cols[0][i + 1]["width"] = dataCols[3];
+                            }
+                            //璁剧疆鍐呭瀛椾綋澶у皬
+                            if (data1.data[0].HFontSize != 0) {
+                                option3.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+                            } else {
+                                option3.cols[0][i + 1]["style"] = "font-size:100%";
+                            }
+
+                            //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                            switch (dataCols[2]) {
+                                case "L":
+                                    option3.cols[0][i + 1]["align"] = "left";
+                                    break;
+                                case "M":
+                                    option3.cols[0][i + 1]["align"] = "center";
+                                    break;
+                                case "R":
+                                    option3.cols[0][i + 1]["align"] = "right";
+                                    break;
+                            }
+                        }
+
+                        //鍙栨秷鍐荤粨鍒�
+                        for (var i = 1; i < option3.cols[0].length - 1; i++) {
+                            if (option3.cols[0][i]["fixed"] != null) {
+                                option3.cols[0][i]["fixed"] = null;
+                            }
+                            else {
+                                break;
+                            }
+                        }
+                        table.render(option3);
+                    } else {
+                        table.render(option3);
+                    }
+                }, error: function () {
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            })
+        }
+
         //鍒楁槑鏄剧ず涓嬫媺妗�
         function ColFilter() {
             var Organization = '<option  value="0" selected="selected" ></option>';
@@ -3225,7 +3653,9 @@
                 }
             }
             $("#ColName").empty();
-            $("#ColName").append(Organization);
+            $("#ColName").append(Organization);$("#ColName1").empty();
+            $("#ColName1").append(Organization);$("#ColName2").empty();
+            $("#ColName2").append(Organization);
             form.render('select');
         }
         //#endregion
@@ -3237,4 +3667,9 @@
         OptionData = data
     }
 
+    //鍙屽嚮杩斿洖鎿嶄綔宸�
+    function GetHEmpValue(data) {
+        OptionData_Emp = data
+    }
+
 </script>
\ No newline at end of file

--
Gitblit v1.9.1