From dfc1961f8c3cd1bdaf7fa83843c14b0540705cf4 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 25 十二月 2023 09:35:43 +0800
Subject: [PATCH] 1

---
 WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html                  |  455 +++++++++++++++++
 WebTM/views/生产管理/报工台工序/产量汇报/Sc_ICMOBillWorkQtyStatus_TmpList.html |    4 
 WebTM/views/生产管理/生产完工单/Sc_Add_MESEndWorkBillList.html             |   33 
 WebTM/views/生产管理/产量汇报单/Sc_Add_ProductReportBillList.html          |   33 
 WebTM/views/设备管理/Sb_Add_EqpConkBookBillList.html                  |    4 
 WebTM/views/生产管理/生产开工单/Sc_Add_MESBeginWorkBillList.html           |   34 
 WebTM/views/生产管理/生产汇报单/Sc_Add_ICMOReportBillList.html             |   33 +
 WebTM/views/车间管理/单品过站/BadQueryReport.html                         |  341 +++++++++++-
 WebTM/views/生产管理/产量汇报单/Sc_ProductReportBillList.html              |   26 
 WebTM/views/生产管理/报工台工序/产量汇报/Sc_ICMOBillQualityStatus_TmpList.html |    4 
 WebTM/views/车间管理/单品过站/RetrospectiveQueryReport.html               |  507 ++++++++++++++++++-
 WebTM/views/index.html                                            |    4 
 WebTM/views/模治具管理/模治具管理/Sc_Add_MouldConkBookBillList.html         |    2 
 13 files changed, 1,337 insertions(+), 143 deletions(-)

diff --git a/WebTM/views/index.html b/WebTM/views/index.html
index 6ac0d5b..c88803f 100644
--- a/WebTM/views/index.html
+++ b/WebTM/views/index.html
@@ -606,8 +606,8 @@
                                         <dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/Cj_ProcessItemBGA.html">宸ュ簭鍗曞搧杩斾慨鍙�</a></dd>
                                         <!--<dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/Cj_ProcessItemBGA_PJGH.html">宸ュ簭鍗曞搧杩斾慨鍙�(閰嶄欢鏇存崲)</a></dd>-->
                                         <dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/Sc_SourceLineRepairBillList.html">杩斾慨璁板綍鍒楄〃</a></dd>
-                                        <dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/RetrospectiveQueryReport.html">鍚堟牸杩芥函鏌ヨ鎶ヨ〃</a></dd>
-                                        <dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/BadQueryReport.html">涓嶈壇杩芥函鏌ヨ鎶ヨ〃</a></dd>
+                                        <dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/RetrospectiveQueryReport.html">璐ㄩ噺杩芥函鏌ヨ</a></dd>
+                                        <dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/BadQueryReport.html">閫嗗悜杩芥函鏌ヨ鎶ヨ〃</a></dd>
                                     </dl>
                                 </dd>
                             </dl>
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldConkBookBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldConkBookBillList.html"
index a573253..cbc4f7c 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldConkBookBillList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldConkBookBillList.html"
@@ -728,7 +728,7 @@
                                 shift: 2,
                                 area: ['80%', '80%'],
                                 maxmin: true,
-                                content: ['../../PublicPage/UserInformation.html', 'yes'],
+                                content: ['../../Baseset/鍩虹璧勬枡/Gy_EmployeeList.html', 'yes'],
                                 btn: ['纭畾', '鍙栨秷']
                                 , btn1: function (index, layero) {
 
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_Add_ProductReportBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_Add_ProductReportBillList.html"
index d8f5c28..93c2c15 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_Add_ProductReportBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_Add_ProductReportBillList.html"
@@ -883,18 +883,29 @@
                     success: function (data) {
                         if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
                             $("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
-                            layer.confirm(data.Message, {
-                                btn: ['纭']
-                            }, function (index) {
-                                if (data.Verify == "Y") //鑷姩瀹℃牳
-                                {
-                                    layer.close(index);
-                                    SaveVerify(); //瀹℃牳
-                                }
-                                else {
-                                    layer.close(index);
-                                }
+                            layer.msg(result.Message, { time: 1 * 2000, icon: 1 }, function () {
+
                             });
+                            if (data.Verify == "Y") //鑷姩瀹℃牳
+                            {
+                                layer.close(index);
+                                SaveVerify(); //瀹℃牳
+                            }
+                            else {
+                                layer.close(index);
+                            }
+                            //layer.confirm(data.Message, {
+                            //    btn: ['纭']
+                            //}, function (index) {
+                            //    if (data.Verify == "Y") //鑷姩瀹℃牳
+                            //    {
+                            //        layer.close(index);
+                            //        SaveVerify(); //瀹℃牳
+                            //    }
+                            //    else {
+                            //        layer.close(index);
+                            //    }
+                            //});
                         }
                         else {
                             layer.alert(data.Message, { icon: 5 })
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
index a3a37b6..b568186 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
@@ -184,6 +184,25 @@
 
             //#endregion
 
+            table.on('row(mainTable)', function (obj) {
+                //閫変腑琛屾敼鍙橀鑹�
+                var flag = !obj.tr.find(':checkbox:first').prop('checked');
+                obj.tr.find(':checkbox').prop('checked', flag);
+                if (flag) {
+                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //璁剧疆澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+                } else {
+                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+                }
+                //mainTable 涓鸿〃鏍糏D   娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+                layui.each(table.cache.mainTable, function (i, l) {
+                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+                        l.LAY_CHECKED = flag;
+                    }
+                });
+            })
+
             //#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
 
             //鍒濆鍖栬〃鏍�
@@ -193,9 +212,12 @@
                     elem: '#mainTable'
                     , height: 'full-50'
                     , page: true
+                    , limit:500
+                    , totalRow: true
+                    , limits: [100, 500, 1000, 2000]
                     , cellMinWidth: 90
                     , cols: [[
-                        { type: 'checkbox', fixed: 'left' }
+                        { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }
                         , { field: 'HInterID', title: 'HInterID', sort: true, hide: true, width: 200 }
                         , { field: 'HDate', title: '鏃ユ湡', width: 200, templet: "<div>{{d.HDate ==null ?'':layui.util.toDateString(d.HDate, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                         , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 200 }
@@ -212,7 +234,7 @@
                         , { field: 'HMaterCode', title: '浜у搧浠g爜', width: 200 }
                         , { field: 'HMaterName', title: '浜у搧鍚嶇О', width: 200 }
                         , { field: 'HMaterSpec', title: '浜у搧瑙勬牸', width: 200 }
-                        , { field: 'HQty', title: '姹囨姤鏁伴噺', width: 200 }
+                        , { field: 'HQty', title: '姹囨姤鏁伴噺', width: 200, totalRow: true }
                         , { field: 'HSourceID', title: '鐢熶骇璧勬簮ID', width: 200, hide: true }
                         , { field: 'HSourceCode', title: '鐢熶骇璧勬簮浠g爜', width: 200 }
                         , { field: 'HSourceName', title: '鐢熶骇璧勬簮', width: 200 }
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillQualityStatus_TmpList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillQualityStatus_TmpList.html"
index 1cc8bf1..130bad5 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillQualityStatus_TmpList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillQualityStatus_TmpList.html"
@@ -297,10 +297,10 @@
             }
 
             if (HDate) {
-                sWhere += " and 鍒跺崟鏃ユ湡 >= '" + HDate + "'";
+                sWhere += " and CONVERT(varchar(100), 鍒跺崟鏃ユ湡, 23) >= '" + HDate + "'";
             }
             if (HDate1) {
-                sWhere += " and 鍒跺崟鏃ユ湡 <= '" + HDate1 + "'";
+                sWhere += " and CONVERT(varchar(100), 鍒跺崟鏃ユ湡, 23) <= '" + HDate1 + "'";
             }
 
             if (HICMOBillNo) {
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillWorkQtyStatus_TmpList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillWorkQtyStatus_TmpList.html"
index ce76b65..e15de44 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillWorkQtyStatus_TmpList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillWorkQtyStatus_TmpList.html"
@@ -297,10 +297,10 @@
             }
 
             if (HDate) {
-                sWhere += " and 閲囬泦鏃堕棿 >= '" + HDate + "'";
+                sWhere += " and CONVERT(varchar(100), 閲囬泦鏃堕棿, 23) >= '" + HDate + "'";
             }
             if (HDate1) {
-                sWhere += " and 閲囬泦鏃堕棿 <= '" + HDate1 + "'";
+                sWhere += " and CONVERT(varchar(100), 閲囬泦鏃堕棿, 23) <= '" + HDate1 + "'";
             }
 
             if (HICMOBillNo) {
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\256\214\345\267\245\345\215\225/Sc_Add_MESEndWorkBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\256\214\345\267\245\345\215\225/Sc_Add_MESEndWorkBillList.html"
index 9a5bdee..5e1ad48 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\256\214\345\267\245\345\215\225/Sc_Add_MESEndWorkBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\256\214\345\267\245\345\215\225/Sc_Add_MESEndWorkBillList.html"
@@ -793,18 +793,29 @@
                     success: function (data) {
                         if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
                             $("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
-                            layer.confirm(data.Message, {
-                                btn: ['纭']
-                            }, function (index) {
-                                if (data.Verify == "Y") //鑷姩瀹℃牳
-                                {
-                                    layer.close(index);
-                                    SaveVerify(); //瀹℃牳
-                                }
-                                else {
-                                    layer.close(index);
-                                }
+                            layer.msg(result.Message, { time: 1 * 2000, icon: 1 }, function () {
+
                             });
+                            if (data.Verify == "Y") //鑷姩瀹℃牳
+                            {
+                                layer.close(index);
+                                SaveVerify(); //瀹℃牳
+                            }
+                            else {
+                                layer.close(index);
+                            }
+                            //layer.confirm(data.Message, {
+                            //    btn: ['纭']
+                            //}, function (index) {
+                            //    if (data.Verify == "Y") //鑷姩瀹℃牳
+                            //    {
+                            //        layer.close(index);
+                            //        SaveVerify(); //瀹℃牳
+                            //    }
+                            //    else {
+                            //        layer.close(index);
+                            //    }
+                            //});
                         }
                         else {
                             layer.alert(data.Message, { icon: 5 })
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
index b7a92d6..ad50d73 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
@@ -634,18 +634,30 @@
                     success: function (data) {
                         if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
                             $("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
-                            layer.confirm(data.Message, {
-                                btn: ['纭']
-                            }, function (index) {
-                                    if (data.Verify == "Y") //鑷姩瀹℃牳
-                                    {
-                                        layer.close(index);
-                                        SaveVerify(); //瀹℃牳
-                                    }
-                                    else {
-                                        layer.close(index);
-                                    }
+                            layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) {
+                                //layer.close(layer.index);
+                                //window.parent.location.reload();
                             });
+                            if (data.Verify == "Y") //鑷姩瀹℃牳
+                            {
+                                layer.close(index);
+                                SaveVerify(); //瀹℃牳
+                            }
+                            else {
+                                layer.close(index);
+                            }
+                            //layer.confirm(data.Message, {
+                            //    btn: ['纭']
+                            //}, function (index) {
+                            //        if (data.Verify == "Y") //鑷姩瀹℃牳
+                            //        {
+                            //            layer.close(index);
+                            //            SaveVerify(); //瀹℃牳
+                            //        }
+                            //        else {
+                            //            layer.close(index);
+                            //        }
+                            //});
                         }
                         else {
                             layer.alert(data.Message, { icon: 5 })
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html"
index e45fb24..0cb8b35 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html"
@@ -569,7 +569,7 @@
 
             //#region 瀹℃牳
             form.on('submit(set_CheckBill)', function (data) {
-
+                set_CheckBill()
             });
             //#endregion
 
@@ -647,6 +647,35 @@
                         }
                     });
                 }
+            }
+            //#endregion
+
+            //#region 瀹℃牳
+            function set_CheckBill() {
+                var InterID = $("#HInterID").val();
+                //閫昏緫瀹℃牳鏂规硶
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/Sc_ICMOReportBill/AuditProcessReportList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        if (result.count == 1) {
+                            layer.msg(result.Message, { time: 1 * 10000, icon: 1 }, function () {
+                                // 寰楀埌frame绱㈠紩
+                                var index = layer.getFrameIndex(window.name);
+                                //鍏抽棴褰撳墠frame
+                                layer.close(index);
+                                //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                $("#btnSearch").trigger('click');
+                            });
+
+                        } else {
+                            layer.alert(result.code + result.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });              
             }
             //#endregion
 
@@ -911,7 +940,7 @@
                     success: function (d) {
                         //console.log(d.data);
                         $("#HBillNo").val(d.data[0].HBillNo);
-                        $("#HInterID").val(0);
+                        $("#HInterID").val(d.data[0].HInterID);
                         $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                         $("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                         $("#HMaker").val(sessionStorage["HUserName"]);
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 de6e8ae..862b6fb 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"
@@ -181,7 +181,40 @@
                             </div>
                         </div>
                         <div id="HProgressBar"></div>
-                        <table class="" id="mainTable" lay-filter="mainTable"></table>
+                        <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;">
+                            <ul class="layui-tab-title">
+                                <li class="layui-this">鐢熶骇璁㈠崟</li>                                
+                            </ul>
+                            <div class="layui-tab-content">
+                                <div class="layui-tab-item layui-show">
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label" style="width: 85px;">杞﹂棿</label>
+                                        <div class="layui-input-block" style="margin-left: 120px;">
+                                            <input type="text" class="layui-input" name="HMaterName" id="HMaterName">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label" style="width: 85px;">鐗╂枡鍚嶇О</label>
+                                        <div class="layui-input-block" style="margin-left: 120px;">
+                                            <input type="text" class="layui-input" name="HMaterName" id="HMaterName">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label" style="width: 85px;">鐢熶骇璁㈠崟</label>
+                                        <div class="layui-input-block" style="margin-left: 120px;">
+                                            <input type="text" class="layui-input" name="HMaterName" id="HMaterName">
+                                        </div>
+                                    </div>
+                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">鏌ヨ</button>
+                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch">閲嶇疆</button>
+                                    <!--寰呮帓璁㈠崟-->
+                                    <table class="layui-hide" id="mainTable_ICMO" lay-filter="mainTable_ICMO"></table>
+                                </div>                               
+                            </div>
+                        </div>
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
                                 <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_BatchFill"><i class="layui-icon layui-icon-file-b"></i>鎵归噺濉厖</button>
@@ -194,6 +227,13 @@
                                 <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_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                            </div>
+                        </script>
+                        <script type="text/html" id="toolbarDemo2">
+                            <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_HideColumn2"><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>
                     </form>
@@ -227,9 +267,13 @@
             , element = layui.element;
 
         var sWhere = "";
+        var sWhere_ICMO = "";
         var option = [];
+        var option2 = [];
+        var option_columns = [];
         var HModName = "JIT_DayPlanPlatForm";
-
+        //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+        var titleData = [];
         //#endregion
 
         //#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -413,9 +457,28 @@
                 case 'set_Souce':
                     set_Souce(data);
                     break;
-                    
+
 
             }
+        });
+
+
+        table.on('toolbar(mainTable_ICMO)', function (obj) {
+            var checkStatus = table.checkStatus(obj.config.id);
+            switch (obj.event) {
+                //鎺掍骇
+                case 'set_Arrangement':
+                    set_Arrangement();
+                    break;
+                //閫�鍑烘寜閽�
+                case 'btn-Close':
+                    parent.layui.admin.events.closeThisTabs();
+                    break;
+                //鍒楄缃�
+                case 'set_HideColumn2':
+                    get_HideColumn2();
+                    break;
+            };
         });
 
         //瀵煎叆
@@ -562,6 +625,7 @@
             get_FastQuery(1);
             //闅愯棌鍕鹃�夊瓧娈�
             DisPlay_HideColumn();
+            get_Display2(sWhere_ICMO);
         }
          //#endregion
 
@@ -614,6 +678,7 @@
             columns.push({ field: '鎷嗗崟鏁伴噺', title: '鎷嗗崟鏁伴噺', width: 150, edit: 'text' });
             columns.push({ field: '鏄ㄦ棩鏁伴噺', title: '鏄ㄦ棩鏁伴噺'});
             columns.push({ field: '浼樺厛绾�', title: '浼樺厛绾�', width: 150, edit: 'text', sort: true });
+            columns.push({ field: '鎷嗗崟姹囨姤鏁伴噺', title: '鎷嗗崟姹囨姤鏁伴噺', width: 150, edit: 'text', sort: true });
             columns.push({ field: '鐢熶骇璧勬簮', title: '鐢熶骇璧勬簮', width: 150, edit: 'text', event: "HSourceID" });
 
             columns.push({
@@ -768,12 +833,12 @@
             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: 'HWorkShopID', title: 'HWorkShopID', hide: true });
             columns.push({ field: 'HUnitID', title: 'HUnitID', hide: true });
             columns.push({ field: 'HProdORGID', title: 'HProdORGID', hide: true });
             columns.push({ fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' });
-
+            option_columns = columns;
             option = {
                 elem: '#mainTable'
                 , toolbar: '#toolbarDemo'
@@ -1142,6 +1207,70 @@
             sWhere = ""//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
         }
 
+        
+        //蹇�熻繃婊�
+        function get_FastQuery_ICMO(number) {
+            var HWorkShopID = 0;
+            var HProdORGID = 0;
+            HWorkShopID = $("#HWorkShopID").val();//鐢熶骇杞﹂棿
+            if (number == 2) {
+                if (HWorkShopID == 0) {
+                    return layer.msg("鐢熶骇杞﹂棿涓嶈兘涓虹┖!");
+                }
+
+                HProdORGID = $("#HProdORGID").val();//鐢熶骇璁㈠崟缁勭粐
+            }
+            if (number == 1) {
+                HProdORGID = sessionStorage["OrganizationID"];//鐢熶骇璁㈠崟缁勭粐
+            }
+            var HPlanBeginDate = $("#HPlanBeginDate").val();//寮�宸ヨ捣濮嬫棩鏈�
+            var HPlanEndDate = $("#HPlanEndDate").val();//寮�宸ユ埅姝㈡棩鏈�
+            var HMastersDate = $("#HMastersDate").val();//鎺掍骇鏃ユ湡
+            var HSeOrderBillNo = $("#HSeOrderBillNo").val();//閿�鍞鍗曞彿
+            var HMaterID = $("#HMaterID").val();//鐗╂枡缂栫爜id
+            var HICMOBillNo = $("#HICMOBillNo").val();//鐢熶骇璁㈠崟鍙�
+            var ColName = $("#ColName").val();//澶嶉�夋
+            var Comparator = $("#Comparator").val()
+            var ColContent = $("#ColContent").val();
+            var sWhere_ICMO = "";
+
+            if (ColName != 0 && Comparator != 0) {
+                var com = "";
+                switch (Comparator) {
+                    case "7":
+                        com = "like''%" + ColContent + "%''";
+                        break;
+                    case "8":
+                        com = "like''%" + ColContent + "''";
+                        break;
+                    case "9":
+                        com = "like''" + ColContent + "%''";
+                        break;
+                    case "10":
+                        com = "not like''%" + ColContent + "%''";
+                        break;
+                    default:
+                        com = "" + Comparator + "''" + ColContent + "''";
+                        break;
+                }
+                sWhere_ICMO += " and [" + ColName + "] " + com;
+            }
+
+            sWhere_ICMO = {
+                HPlanBeginDate: HPlanBeginDate
+                , HProdORGID: HProdORGID
+                , HSeOrderBillNo: HSeOrderBillNo
+                , HPlanEndDate: HPlanEndDate
+                , HMaterID: HMaterID
+                , HICMOBillNo: HICMOBillNo
+                , HWorkShopID: HWorkShopID
+                , HMastersDate: HMastersDate
+                , sWheres: sWheres
+            }
+            get_Display2(JSON.stringify(sWhere_ICMO));
+            sWhere_ICMO = ""//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+        }
+
         //鍙屽嚮璺宠浆榻愬鍒嗘瀽鏄庣粏琛�
         function btnrowDouble(obj) {
 
@@ -1183,6 +1312,27 @@
             $("#Comparator").val("0");
             form.render('select');
             sWhere = "";
+        }
+        
+        //閲嶇疆
+        function set_ClearQuery_ICMO() {
+            $("#HPlanBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//寮�宸ヨ捣濮嬫棩鏈�
+            $("#HSeOrderBillNo").val("");//閿�鍞鍗曞彿
+            $("#HPlanEndDate").val(Format(new Date(), "yyyy-MM-dd"));//寮�宸ユ埅姝㈡棩鏈�
+            $("#HMastersDate").val("");//鎺掍骇鏃ユ湡
+            $("#HMaterID").val("0");//鐗╂枡缂栫爜id
+            $("#HMaterNumber").val("");//鐗╂枡缂栫爜
+            $("#HMaterName").val("");//鐗╂枡鍚嶇О
+            $("#HMaterModel").val("");//瑙勬牸鍨嬪彿
+            $("#HICMOBillNo").val("");//鐢熶骇璁㈠崟鍙�
+            $("#HWorkShopID").val("0");//鐢熶骇杞﹂棿id
+            $("#HWorkShopIDName").val("");//鐢熶骇杞﹂棿
+            $("#HProdORGID").val(sessionStorage["OrganizationID"])//鐢熶骇璁㈠崟缁勭粐
+            $("#ColContent").val("");
+            $("#ColName").val("0");
+            $("#Comparator").val("0");
+            form.render('select');
+            sWhere_ICMO = "";
         }
 
         //榻愬鍒嗘瀽
@@ -2211,13 +2361,13 @@
                     }
                 })
 
-              
+
             }
             else {
                 return layer.msg("璇烽�夋嫨鏁版嵁!")
             }
         }
-        
+
         //淇濆瓨
         function set_AddNew() {
 
@@ -2228,7 +2378,7 @@
                     if (parseFloat(table.cache["mainTable"][i]["鎷嗗崟鏁伴噺"]) == 0) {
                         return layer.msg("绗�" + (i + 1) + "琛�,鎷嗕骇鏁伴噺鏈夎,璇烽噸鏂拌緭鍏�!");
                     }
-                    if (parseFloat(table.cache["mainTable"][i]["鎷嗗崟鏁伴噺"]) < parseFloat(table.cache["mainTable"][i]["鏃ヨ鍒掓暟閲忔�婚噺"]) + parseFloat(table.cache["mainTable"][i]["浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�"])) { // - 宸叉眹鎶ユ暟閲�
+                    if (parseFloat(table.cache["mainTable"][i]["鎷嗗崟鏁伴噺"]) - parseFloat(table.cache["mainTable"][i]["鎷嗗崟姹囨姤鏁伴噺"]) < parseFloat(table.cache["mainTable"][i]["鏃ヨ鍒掓暟閲忔�婚噺"])) { // - 宸叉眹鎶ユ暟閲�
                         return layer.msg("绗�" + (i + 1) + "琛�,鎺掍骇鏁伴噺瓒呭嚭璁㈠崟鏁伴噺!");
                     }
                     table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
@@ -2404,6 +2554,177 @@
             }
         }
 
+
+        //鏌ヨ鏈帓浜х殑鐢熶骇璁㈠崟
+        function get_Display2(sWhere_ICMO) {
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/LEMS/MES_IF_ICMOBillList_Json',
+                type: "GET",
+                data: { "sWhere": sWhere_ICMO, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        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, titleData) > -1) {
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                            }
+                            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 });
+                                }
+                            }
+                        }
+
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        option2 = {
+                            elem: '#mainTable_ICMO'
+                            , toolbar: '#toolbarDemo2'
+                            , cols: [col]
+                            , data: data1.data
+                            , height: 400
+                            , page: true
+                            , limits: [50, 500, 5000, 50000]
+                            , limit: 200
+                            , cellMinWidth: 90
+                        }
+                        table.render(option2);
+
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn2();
+
+                        layer.close(ajaxLoad);
+                        //if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                        //    ColFilter();
+                        //}
+                        //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        //鎺掍骇鍔熻兘
+        function set_Arrangement() {
+            var checkStatus = table.checkStatus('mainTable_ICMO')
+                , data = checkStatus.data;
+            if (checkStatus.data.length > 0) {
+                console.log(option.data);
+                var arr_field = [];
+                //鑾峰彇宸叉帓璁㈠崟鍒楄〃瀛楁
+                for (let i = 0; i < option_columns.length; i++) {
+                    if (option_columns[i].field != undefined && option_columns[i].field != null) {
+                        arr_field.push(option_columns[i].field);
+                    }
+                }
+                //鎶婂凡鎺掕鍗曞垪琛ㄥ瓧娈靛瓨鍏bj瀵硅薄涓紝浠ヤ究缁欏瓧娈佃祴鍊�
+                var obj = {};
+                for (let i = 0; i < arr_field.length; i++) {
+                    var key = arr_field[i];
+                    var value = '';
+                    obj[key] = value;
+                }
+                //鑾峰彇鍕鹃�変笂鐨勫緟鎺掔敓浜ц鍗�
+                for (var i = 0; i < checkStatus.data.length; i++) {
+                    obj.HMaterID = data[i].HMaterID;
+                    obj.HProdORGID = data[i].HPRDORGID;
+                    obj.HUnitID = data[i].HUnitID;
+                    obj.HWorkShopID = data[i].HDeptID;
+                    obj.鎷嗗崟鏁伴噺 = data[i].鐢熶骇浠诲姟鍗曟暟閲�;
+                    obj.婧愬崟涓诲唴鐮� = data[i].hmainid;
+                    obj.婧愬崟瀛愬唴鐮� = data[i].HEntryID;
+                    obj.鐗╂枡浠g爜 = data[i].浜у搧浠g爜;
+                    obj.鐗╂枡鍚嶇О = data[i].浜у搧鍚嶇О;
+                    obj.鐢熶骇缁勭粐 = "鏅轰簯杩堟��";
+                    obj.鐢熶骇璁㈠崟鍗曟嵁绫诲瀷 = data[i].鍗曟嵁绫诲瀷;
+                    obj.鐢熶骇璁㈠崟鍙� = data[i].鍗曟嵁鍙�;
+                    obj.鐢熶骇璁㈠崟鏄庣粏琛屽彿 = data[i].HEntryID;
+                    obj.鐢熶骇杞﹂棿 = data[i].鐢熶骇杞﹂棿;
+                    obj.瑙勬牸鍨嬪彿 = data[i].瑙勬牸鍨嬪彿;
+                    obj.璁″垝寮�濮嬫棩鏈� = data[i].璁″垝寮�宸ユ棩鏈�;
+                    obj.璁″垝鏁伴噺 = data[i].鐢熶骇浠诲姟鍗曟暟閲�;
+                    obj.璁″垝缁撴潫鏃ユ湡 = data[i].璁″垝瀹屽伐鏃ユ湡;
+                    obj.璁¢噺鍗曚綅 = data[i].璁¢噺鍗曚綅;
+                    obj.璁㈠崟鍙帓鏁伴噺 = data[i].鐢熶骇浠诲姟鍗曟暟閲�;
+                    obj.璁㈠崟绛夌骇 = data[i].璁㈠崟绛夌骇;
+                    obj.璁㈠崟绫诲瀷 = data[i].鍗曟嵁绫诲瀷;
+                    obj.閿�鍞鍗曞彿 = data[i].閿�鍞鍗曞彿;
+                    obj.閿�鍞鍗曟暟閲� = data[i].閿�鍞暟閲�;
+
+                    option.data.push(obj);
+                    table.render(option)
+                }
+
+                //鑾峰彇涓婃柟鎺掍骇鍒楄〃鏁版嵁,鐢ㄤ簬瀵规瘮涓嬫柟鐢熶骇璁㈠崟鍒楄〃锛屽皢涓嬫柟鐢熶骇璁㈠崟鍒楄〃鐩稿悓鐨勬暟鎹笉鏄剧ず
+                var compareList = [];
+                for (var i = 0; i < option.data.length; i++) {
+                    var temp = option.data[i]["婧愬崟涓诲唴鐮�"] + "|" + option.data[i]["婧愬崟瀛愬唴鐮�"];
+                    compareList.push(temp);
+                }
+
+                //鍓旈櫎涓婃柟鎺掍骇鍒楄〃涓凡缁忓姞鍏ョ殑鐢熶骇璁㈠崟
+                var tables = [];
+                for (var i = 0; i < option2.data.length; i++) {
+                    var temp = option2.data[i]["hmainid"] + "|" + option2.data[i]["HEntryID"];
+                    if ($.inArray(temp, compareList) == -1) {
+                        tables.push(option2.data[i]);
+                    }
+                }
+                option2.data = tables;
+
+                //閲嶆柊娓叉煋瀛愯〃2
+                table.render(option2);
+
+                //var wait = layer.load();
+                ////閫昏緫鏂规硶
+                //$.ajax({
+                //    url: GetWEBURL() + '/LEMS/ProcessExchangeArrangement_Add',
+                //    type: "GET",
+                //    data: { "HInterID_S": HInterID_S.toString(), "HSourceID": DataSourceID, "HOrgID": sessionStorage["OrganizationID"], "user": sessionStorage["HUserName"] },
+                //    success: function (result) {
+                //        if (result.count == 1) {
+                //            layer.msg(result.Message, { icon: 1 }, function () {
+                //                // 寰楀埌frame绱㈠紩
+                //                var index = layer.getFrameIndex(window.name);
+                //                //鍏抽棴褰撳墠frame
+                //                layer.close(wait);
+                //                get_Display("  and HSourceID=" + DataSourceID);
+                //                //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                //                get_FastQuery();
+                //            });
+                //        } else {
+                //            layer.alert(result.code + result.Message, { icon: 5 });
+                //            layer.close(wait);
+                //        }
+                //    }, error: function () {
+                //        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                //        layer.close(wait);
+                //    }
+                //});
+            }
+            else {
+                layer.msg('璇烽�夋嫨鏁版嵁锛�');
+            }
+        }
+
         //闅愯棌鍒楄缃�
         function get_HideColumn() {
             var colName = "";
@@ -2522,6 +2843,124 @@
             })
         }
 
+        function get_HideColumn2() {
+            var colName = "";
+            var contentUrl = "";
+            for (var i = 1; i < option2.cols[0].length; i++) {
+                colName += option2.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_HideColumn2();
+                    //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                    layer.close(index);//鍏抽棴寮圭獥
+                }
+            })
+        }
+
+        function DisPlay_HideColumn2() {
+            $.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 = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+                        /* var titleData = ["鍗曟嵁ID", "HMouldID", "hsubid", "HManagerID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
+
+                        dataCol = data1.data[0].HGridString.split(',');
+
+                        for (var i = 0; i < option2.cols[0].length - 1; i++) {
+                            if (dataCol[i]) {
+                                var dataCols = dataCol[i].split('|');
+                            }
+                            //闅愯棌鍒�
+                            if (dataCols[1] == 1) {
+                                option2.cols[0][i + 1]["hide"] = true;
+                            }
+                            //璁剧疆鍒楀
+                            if (dataCols[3] > 0) {
+                                option2.cols[0][i + 1]["width"] = dataCols[3];
+                            }
+                            //璁剧疆鍐呭瀛椾綋澶у皬
+                            if (data1.data[0].HFontSize != 0) {
+                                option2.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+                            } else {
+                                option2.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(option2.cols[0][i + 1]["title"], titleData) == -1) {
+                                option2.cols[0][i + 1]["hide"] = false;
+                            }
+                            //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                            switch (dataCols[2]) {
+                                case "L":
+                                    option2.cols[0][i + 1]["align"] = "left";
+                                    break;
+                                case "M":
+                                    option2.cols[0][i + 1]["align"] = "center";
+                                    break;
+                                case "R":
+                                    option2.cols[0][i + 1]["align"] = "right";
+                                    break;
+                            }
+                        }
+
+                        //鍙栨秷鍐荤粨鍒�
+                        for (var i = 1; i < option2.cols[0].length - 1; i++) {
+                            if (option2.cols[0][i]["fixed"] != null) {
+                                option2.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(option2.cols[0][i + 1]["title"], titleData) != -1) {
+                                    data1.data[0].HFixCols += 1;
+                                }
+                                option2.cols[0][i + 1]["fixed"] = "left";
+                            }
+                        }
+                        table.render(option2);
+                    } else {
+                        table.render(option2);
+                    }
+                }, error: function () {
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            })
+        }
+
         //鍒楁槑鏄剧ず涓嬫媺妗�
         function ColFilter() {
             var Organization = '<option  value="0" selected="selected" ></option>';
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpConkBookBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpConkBookBillList.html"
index 21d749d..ef287e0 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpConkBookBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpConkBookBillList.html"
@@ -107,7 +107,7 @@
                                                 <label class="layui-form-label">鏁呴殰绫诲埆</label>
                                                 <div class="layui-input-inline">
                                                     <input type="text" name="HConkTypeName" id="HConkTypeName" class="layui-input" value="" style="float:left;width:150px;">
-                                                    <input type="hidden" name="HConkTypeID" id="HConkTypeID" class="layui-input" value="" style="float:left;width:150px;">
+                                                    <input type="hidden" name="HConkTypeID" id="HConkTypeID" class="layui-input" value="0" style="float:left;width:150px;">
                                                     <button type="button" lay-submit="" class="layui-btn" lay-filter="HConkTypeList" style="width:40px;">
                                                         <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                     </button>
@@ -378,7 +378,7 @@
                                 shift: 2,
                                 area: ['80%', '80%'],
                                 maxmin: true,
-                                content: ['../PublicPage/RepairItemInformation.html', 'yes'],
+                                content: ['../Baseset/鍩虹璧勬枡/Gy_EmployeeList.html', 'yes'],
                                 btn: ['纭畾', '鍙栨秷']
                                 , btn1: function (index, layero) {
 
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/BadQueryReport.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/BadQueryReport.html"
index 768eeff..f01ef59 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/BadQueryReport.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/BadQueryReport.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>
@@ -26,21 +26,27 @@
                                     </div>
                                 </div>
                                 <div class="layui-inline">
-                                    <label class="layui-form-label">鐢熶骇璁㈠崟鍙�</label>
+                                    <label class="layui-form-label">鐗╂枡缂栫爜</label>
                                     <div class="layui-input-block">
-                                        <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" value="">
+                                        <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" value="">
                                     </div>
                                 </div>
                                 <div class="layui-inline">
-                                    <label class="layui-form-label" style="width: 76px;">浜у搧鏉$爜</label>
+                                    <label class="layui-form-label">鐗╂枡鍚嶇О</label>
                                     <div class="layui-input-block">
-                                        <input type="text" class="layui-input" name="HBardCode" id="HBardCode" value="">
+                                        <input type="text" class="layui-input" name="HMaterName" id="HMaterName" value="" style="background-color: #efefef4d;" readonly>
                                     </div>
                                 </div>
                                 <div class="layui-inline">
-                                    <label class="layui-form-label">娴佽浆鍗″彿</label>
+                                    <label class="layui-form-label" style="width: 76px;">瑙勬牸鍨嬪彿</label>
                                     <div class="layui-input-block">
-                                        <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" value="">
+                                        <input type="text" class="layui-input" name="HMaterModel" id="HMaterModel" value="" style="background-color: #efefef4d;" readonly>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鎵规鍙�</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input" name="HBatchNo" id="HBatchNo">
                                     </div>
                                 </div>
                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
@@ -81,10 +87,41 @@
                                 </div>
                             </div>
                         </div>
-                        <table class="" id="mainTable" lay-filter="mainTable"></table>
-                        <script type="text/html" id="toolbarDemo">
+                        <div class="layui-tab layui-tab-card">
+                            <ul class="layui-tab-title">
+                                <li class="layui-this">娴佽浆鍗℃竻鍗�</li>
+                                <li>浜у搧鐮佺粦瀹氭竻鍗�</li>
+                                <li>鍑哄叆搴撹褰�</li>
+                                <!--<li>鐩稿叧搴撳瓨娓呭崟</li>-->
+                            </ul>
+                            <div class="layui-tab-content">
+                                <div class="layui-tab-item layui-show">
+                                    <!--娴佽浆鍗℃竻鍗�-->
+                                    <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <!--浜у搧鐮佺粦瀹氭竻鍗�-->
+                                    <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <!--鍑哄叆搴撹褰�-->
+                                    <table class="layui-hide" id="mainTable3" lay-filter="mainTable3"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <!--鐩稿叧搴撳瓨娓呭崟-->
+                                    <table class="layui-hide" id="mainTable4" lay-filter="mainTable4"></table>
+                                </div>
+                            </div>
+                        </div>
+
+                        <script type="text/html" id="toolbarDemo1">
                             <div class="layui-btn-container">
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                            </div>
+                        </script>
+                        <script type="text/html" id="toolbarDemo5">
+                            <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn5"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
                             </div>
                         </script>
                     </form>
@@ -112,8 +149,14 @@
             , laydate = layui.laydate
             , soulTable = layui.soulTable
         var sWhere = "";
-        var option = [];
-        var HModName = "BadQueryReport";
+        var option1 = [];
+        var option2 = [];
+        var option3 = [];
+        var option4 = [];
+        var option5 = [];
+        var option6 = [];
+        var option7 = [];
+        var HModName = "RetrospectiveQueryReport";
         var titleData = ["HInterID", "HEntryID", "HBadReasonID", "HSourceInterID", "HSourceEntryID"];//瀛愯〃涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
 
         //#endregion
@@ -130,7 +173,7 @@
         //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
 
         // 澶村伐鍏锋爮浜嬩欢
-        table.on('toolbar(mainTable)', function (obj) {
+        table.on('toolbar(mainTable1)', function (obj) {
             switch (obj.event) {
                 //鍒楄缃�
                 case 'set_HideColumn': get_HideColumn();
@@ -152,15 +195,15 @@
             //鏌ヨ
             get_FastQuery();
         }
-
-        // 鏌ヨ
-        function get_Display(sWhere) {
+        // 娴佽浆鍗℃竻鍗�
+        function get_Display1(sWhere) {
 
             var ajaxLoad = layer.load();
             $.ajax({
-                url: GetWEBURL() + '/Cj_SingleStation/BadQueryReport',
+                url: GetWEBURL() + '/Cj_SingleStation/Sc_ProcessExchangeBillMainList',
                 type: "GET",
-                data: { "HBardCode": $("#HBardCode").val(), "HProcExchBillNo": $("#HProcExchBillNo").val(), "HICMOBillNo": $("#HICMOBillNo").val(), "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                async: false,
+                data: { "HMaterNumber": $("#HMaterNumber").val(), "HBatchNo": $("#HBatchNo").val(), "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                 success: function (data1) {
                     if (data1.count == 1) {
                         var data = [];
@@ -189,9 +232,9 @@
                         }
 
                         //鍔ㄦ�佹樉绀哄垪鍚�
-                        option = {
-                            elem: '#mainTable'
-                            , toolbar: '#toolbarDemo'
+                        option1 = {
+                            elem: '#mainTable1'
+                            , toolbar: '#toolbarDemo1'
                             , cols: [col]
                             , data: data1.data
                             , height: 800
@@ -204,7 +247,12 @@
                                 soulTable.render(this);
                             }
                         }
-                        table.render(option);
+                        table.render(option1);
+                        if ($("#HBardCode").val() != "" && data1.data.length != 0) {
+                            $("#HICMOBillNo").val(data1.data[0]["鐢熶骇璁㈠崟鍙�"]);
+                            $("#HProcExchBillNo").val(data1.data[0]["娴佽浆鍗�"]);
+                        }
+
 
                         //鍒锋柊琛ㄦ牸鏁版嵁
                         DisPlay_HideColumn();
@@ -225,8 +273,203 @@
             });
         }
 
+        // 浜у搧鐮佺粦瀹氭竻鍗�
+        function get_Display2(sWhere) {
+
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/Cj_SingleStation/HBardcodeList',
+                type: "GET",
+                async: false,
+                data: { "HMaterNumber": $("#HMaterNumber").val(), "HBatchNo": $("#HBatchNo").val(), "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        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, titleData) > -1) {
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                            }
+                            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 HH:mm:ss')}}</div>", width: 180 });
+                                        break;
+                                    default:
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 150 });
+                                }
+                            }
+                        }
+
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        option2 = {
+                            elem: '#mainTable2'
+                            , toolbar: '#toolbarDemo1'
+                            , cols: [col]
+                            , data: data1.data
+                            , height: 800
+                            , page: true
+                            , totalRow: true
+                            , cellMinWidth: 90
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , done: function (res, curr, count) {
+                                soulTable.render(this);
+                            }
+                        }
+                        table.render(option2);
+                        if ($("#HBardCode").val() != "" && data1.data.length != 0) {
+                            $("#HICMOBillNo").val(data1.data[0]["鐢熶骇璁㈠崟鍙�"]);
+                            $("#HProcExchBillNo").val(data1.data[0]["娴佽浆鍗�"]);
+                        }
+
+
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+
+                        if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                            ColFilter();
+                        }
+
+                        layer.close(ajaxLoad);
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        //鍑哄叆搴撹褰�
+        function get_Display3(sWhere) {
+
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/Cj_SingleStation/BardCodeOutInList',
+                type: "GET",
+                async: false,
+                data: { "HMaterNumber": $("#HMaterNumber").val(), "HBatchNo": $("#HBatchNo").val(), "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        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, titleData) > -1) {
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                            }
+                            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 HH:mm:ss')}}</div>", width: 180 });
+                                        break;
+                                    default:
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 150 });
+                                }
+                            }
+                        }
+
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        option3 = {
+                            elem: '#mainTable3'
+                            , toolbar: '#toolbarDemo3'
+                            , cols: [col]
+                            , data: data1.data
+                            , height: 800
+                            , page: true
+                            , totalRow: true
+                            , cellMinWidth: 90
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , done: function (res, curr, count) {
+                                soulTable.render(this);
+                            }
+                        }
+                        table.render(option3);
+                        layer.close(ajaxLoad);
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        //鐩稿叧搴撳瓨娓呭崟
+        function get_Display4(sWhere) {
+            var sWhere = " and HMaterSN='" + HBardcode + "'";
+
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/Cj_SingleStation/Sc_SourceLineRepairBillSub_MaterList',
+                type: "GET",
+                async: false,
+                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        option4 = {
+                            elem: '#mainTable4'
+                            , toolbar: '#toolbarDemo4'
+                            , cols: [[
+                                { type: 'checkbox', fixed: 'left' }
+                                , { type: 'numbers', title: '搴忓彿' }
+                                , { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟' }
+                                , { field: 'HDate', title: '鏃ユ湡' }
+                                , { field: 'HMaterNumber', title: '閰嶄欢鐗╂枡缂栫爜' }
+                                , { field: 'HMaterName', title: '閰嶄欢鐗╂枡鍚嶇О' }
+                                , { field: 'HBarCode', title: '閰嶄欢SN鐮�' }
+                                , { field: 'HMaterSN', title: '浜у搧SN鐮�' }
+
+                            ]]
+                            , data: data1.data
+                            , height: 800
+                            , page: true
+                            , totalRow: true
+                            , cellMinWidth: 90
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , done: function (res, curr, count) {
+                                soulTable.render(this);
+                            }
+                        }
+                        table.render(option4);
+                        layer.close(ajaxLoad);
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
         // 蹇�熻繃婊�
         function get_FastQuery() {
+
             var ColName = $("#ColName").val();//澶嶉�夋
             var Comparator = $("#Comparator").val()
             var ColContent = $("#ColContent").val();
@@ -253,7 +496,13 @@
                 com = " and (" + ColName + " " + com + ")";
             }
 
-            get_Display(sWhere);
+            sWhere += com;
+
+            get_Display1(sWhere);//娴佽浆鍗℃竻鍗�
+            get_Display2(sWhere);//浜у搧鐮佺粦瀹氭竻鍗�
+            get_Display3(sWhere);//鍑哄叆搴撹褰�
+            //get_Display4(HBardCode);//鐩稿叧搴撳瓨娓呭崟
+
             sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
         }
 
@@ -261,8 +510,8 @@
         function get_HideColumn() {
             var colName = "";
             var contentUrl = "";
-            for (var i = 1; i < option.cols[0].length - 1; i++) {
-                colName += option.cols[0][i]["title"] + ",";
+            for (var i = 1; i < option1.cols[0].length - 1; i++) {
+                colName += option1.cols[0][i]["title"] + ",";
             }
             var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
             var urlLen = urlStr.split('/');
@@ -307,50 +556,50 @@
 
                         dataCol = data1.data[0].HGridString.split(',');
 
-                        for (var i = 0; i < option.cols[0].length - 2; i++) {
+                        for (var i = 0; i < option1.cols[0].length - 2; i++) {
                             var dataCols = dataCol[i].split('|');
                             //闅愯棌鍒�
                             if (dataCols[1] == 1) {
-                                option.cols[0][i + 1]["hide"] = true;
+                                option1.cols[0][i + 1]["hide"] = true;
                             }
                             //璁剧疆鍒楀
                             if (dataCols[3] > 0) {
-                                option.cols[0][i + 1]["width"] = dataCols[3];
+                                option1.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;";
+                                option1.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
                             } else {
-                                option.cols[0][i + 1]["style"] = "font-size:100%";
+                                option1.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;";
+                            //    option1.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
                             //} else {
-                            //    option.cols[0][i + 1]["width"] = "";
+                            //    option1.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;
+                            if (dataCols[1] == 0 && $.inArray(option1.cols[0][i + 1]["title"], titleData) == -1) {
+                                option1.cols[0][i + 1]["hide"] = false;
                             }
                             //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
                             switch (dataCols[2]) {
                                 case "L":
-                                    option.cols[0][i + 1]["align"] = "left";
+                                    option1.cols[0][i + 1]["align"] = "left";
                                     break;
                                 case "M":
-                                    option.cols[0][i + 1]["align"] = "center";
+                                    option1.cols[0][i + 1]["align"] = "center";
                                     break;
                                 case "R":
-                                    option.cols[0][i + 1]["align"] = "right";
+                                    option1.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;
+                        for (var i = 1; i < option1.cols[0].length - 1; i++) {
+                            if (option1.cols[0][i]["fixed"] != null) {
+                                option1.cols[0][i]["fixed"] = null;
                             }
                             else {
                                 break;
@@ -359,15 +608,15 @@
                         //鍐荤粨鍒�
                         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) {
+                                if ($.inArray(option1.cols[0][i + 1]["title"], titleData) != -1) {
                                     data1.data[0].HFixCols += 1;
                                 }
-                                option.cols[0][i + 1]["fixed"] = "left";
+                                option1.cols[0][i + 1]["fixed"] = "left";
                             }
                         }
-                        table.render(option);
+                        table.render(option1);
                     } else {
-                        table.render(option);
+                        table.render(option1);
                     }
                 }, error: function () {
                     layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
@@ -378,9 +627,9 @@
         // 鍒楁槑鏄剧ず涓嬫媺妗�
         function ColFilter() {
             var Organization = '<option  value="0" selected="selected" ></option>';
-            for (var i = 1; i < option.cols[0].length; i++) {
-                if (option.cols[0][i].hide != true) {
-                    Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+            for (var i = 1; i < option1.cols[0].length; i++) {
+                if (option1.cols[0][i].hide != true) {
+                    Organization += '<option  style="color:blue;" value="' + option1.cols[0][i].field + '">' + option1.cols[0][i].field + '</option>';
                 }
             }
             $("#ColName").empty();
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/RetrospectiveQueryReport.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/RetrospectiveQueryReport.html"
index 83dbed4..7bd11c9 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/RetrospectiveQueryReport.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/RetrospectiveQueryReport.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>
@@ -28,7 +28,7 @@
                                 <div class="layui-inline">
                                     <label class="layui-form-label">鐢熶骇璁㈠崟鍙�</label>
                                     <div class="layui-input-block">
-                                        <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo"  value="">
+                                        <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" value="">
                                     </div>
                                 </div>
                                 <div class="layui-inline">
@@ -40,7 +40,7 @@
                                 <div class="layui-inline">
                                     <label class="layui-form-label">娴佽浆鍗″彿</label>
                                     <div class="layui-input-block">
-                                        <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo"  value="">
+                                        <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo">
                                     </div>
                                 </div>
                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
@@ -49,7 +49,7 @@
                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
                                 <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
                                     <div class="layui-row" style="margin-top:10px;margin-left:5%;">
-                                       
+
                                     </div>
                                     <div class="layui-row" style="margin-top: 10px; margin-bottom: 10px ">
                                         <div class="layui-inline">
@@ -81,10 +81,56 @@
                                 </div>
                             </div>
                         </div>
-                        <table class="" id="mainTable" lay-filter="mainTable"></table>
-                        <script type="text/html" id="toolbarDemo">
+                        <div class="layui-tab layui-tab-card">
+                            <ul class="layui-tab-title">
+                                <li class="layui-this">杩涘嚭绔欒褰�</li>
+                                <li>涓嶈壇姹囨姤璁板綍</li>
+                                <li>宸ヨ壓鍙傛暟璁板綍</li>
+                                <li>閰嶄欢娓呭崟</li>
+                                <li>杩斾慨璁板綍</li>
+                                <li>閰嶄欢鍙樻洿璁板綍</li>
+                                <!--<li>鍑哄叆搴撹褰�</li>-->
+                            </ul>
+                            <div class="layui-tab-content">
+                                <div class="layui-tab-item layui-show">
+                                    <!--杩涘嚭绔欒褰�-->
+                                    <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <!--涓嶈壇姹囨姤璁板綍-->
+                                    <table class="layui-hide" id="mainTable5" lay-filter="mainTable5"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <!--宸ヨ壓鍙傛暟璁板綍-->
+                                    <table class="layui-hide" id="mainTable7" lay-filter="mainTable7"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <!--閰嶄欢娓呭崟-->
+                                    <table class="layui-hide" id="mainTable3" lay-filter="mainTable3"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <!--杩斾慨璁板綍-->
+                                    <table class="layui-hide" id="mainTable6" lay-filter="mainTable6"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <!--閰嶄欢鍙樻洿璁板綍-->
+                                    <table class="layui-hide" id="mainTable4" lay-filter="mainTable4"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <!--鍑哄叆搴撹褰�-->
+                                    <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
+                                </div>
+                            </div>
+                        </div>
+
+                        <script type="text/html" id="toolbarDemo1">
                             <div class="layui-btn-container">
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                            </div>
+                        </script>
+                        <script type="text/html" id="toolbarDemo5">
+                            <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn5"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
                             </div>
                         </script>
                     </form>
@@ -112,7 +158,13 @@
             , laydate = layui.laydate
             , soulTable = layui.soulTable
         var sWhere = "";
-        var option = [];
+        var option1 = [];
+        var option2 = [];
+        var option3 = [];
+        var option4 = [];
+        var option5 = [];
+        var option6 = [];
+        var option7 = [];
         var HModName = "RetrospectiveQueryReport";
         var titleData = ["HInterID", "HEntryID", "HBadReasonID", "HSourceInterID", "HSourceEntryID"];//瀛愯〃涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
 
@@ -130,7 +182,7 @@
         //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
 
         // 澶村伐鍏锋爮浜嬩欢
-        table.on('toolbar(mainTable)', function (obj) {
+        table.on('toolbar(mainTable2)', function (obj) {
             switch (obj.event) {
                 //鍒楄缃�
                 case 'set_HideColumn': get_HideColumn();
@@ -138,6 +190,34 @@
             };
         });
 
+        table.on('row(mainTable2)', function (obj) {
+            var HBardcode = obj.data["鏉$爜"];
+            get_Display3(HBardcode);//閰嶄欢娓呭崟
+            get_Display6(HBardcode);//杩斾慨璁板綍
+            get_Display7(HBardcode);//宸ヨ壓鍙傛暟
+        })
+
+        table.on('row(mainTable5)', function (obj) {
+            var HBardcode = obj.data["鏉$爜"];
+            get_Display3(HBardcode);//閰嶄欢娓呭崟
+            get_Display6(HBardcode);//杩斾慨璁板綍
+            get_Display7(HBardcode);//宸ヨ壓鍙傛暟
+        })
+
+        table.on('row(mainTable6)', function (obj) {
+            var HBardcode = obj.data["SN鐮�"];
+            get_Display4(HBardcode);//閰嶄欢鍙樻洿璁板綍
+        })
+
+
+        table.on('toolbar(mainTable5)', function (obj) {
+            switch (obj.event) {
+                //鍒楄缃�
+                case 'set_HideColumn5': get_HideColumn5();
+                    break;
+            };
+        });
+    
         //鏌ヨ鎸夐挳
         form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
             get_FastQuery();
@@ -153,13 +233,210 @@
             get_FastQuery();
         }
 
-        // 鏌ヨ
-        function get_Display(sWhere) {
+        // 杩涘嚭绔欐煡璇�
+        function get_Display2(sWhere) {
 
             var ajaxLoad = layer.load();
             $.ajax({
-                url: GetWEBURL() + '/Cj_SingleStation/RetrospectiveQueryReport',
+                url: GetWEBURL() + '/Cj_SingleStation/EntryAndExitRecords',
                 type: "GET",
+                async: false,
+                data: { "HBardCode": $("#HBardCode").val(), "HProcExchBillNo": $("#HProcExchBillNo").val(), "HICMOBillNo": $("#HICMOBillNo").val(), "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        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, titleData) > -1) {
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                            }
+                            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 HH:mm:ss')}}</div>", width: 180 });
+                                        break;
+                                    default:
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 150 });
+                                }
+                            }
+                        }
+
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        option2 = {
+                            elem: '#mainTable2'
+                            , toolbar: '#toolbarDemo1'
+                            , cols: [col]
+                            , data: data1.data
+                            , height: 800
+                            , page: true
+                            , totalRow: true
+                            , cellMinWidth: 90
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , done: function (res, curr, count) {
+                                soulTable.render(this);
+                            }
+                        }
+                        table.render(option2);
+                        //if ($("#HBardCode").val() != "" && data1.data.length != 0) {
+                        //    $("#HICMOBillNo").val(data1.data[0]["鐢熶骇璁㈠崟鍙�"]);
+                        //    $("#HProcExchBillNo").val(data1.data[0]["娴佽浆鍗�"]);
+                        //}
+                     
+
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+
+                        if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                            ColFilter();
+                        }
+
+                        layer.close(ajaxLoad);
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        //閰嶄欢娓呭崟
+        function get_Display3(HBardcode) {
+
+            var sWhere = " and 浜у搧鏉$爜='" + HBardcode + "'";
+
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/Sc_AssemblyBill/list1',
+                type: "GET",
+                async: false,
+                data: { "sWhere": sWhere },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        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, titleData) > -1) {
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                            }
+                            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 HH:mm:ss')}}</div>", width: 180 });
+                                        break;
+                                    default:
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 150 });
+                                }
+                            }
+                        }
+
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        option3 = {
+                            elem: '#mainTable3'
+                            , toolbar: '#toolbarDemo3'
+                            , cols: [col]
+                            , data: data1.data
+                            , height: 800
+                            , page: true
+                            , totalRow: true
+                            , cellMinWidth: 90
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , done: function (res, curr, count) {
+                                soulTable.render(this);
+                            }
+                        }
+                        table.render(option3);
+                        layer.close(ajaxLoad);
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        //閰嶄欢鍙樻洿璁板綍
+        function get_Display4(HBardcode) {
+            var sWhere = " and HMaterSN='" + HBardcode + "'";
+
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/Cj_SingleStation/Sc_SourceLineRepairBillSub_MaterList',
+                type: "GET",
+                async: false,
+                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        option4 = {
+                            elem: '#mainTable4'
+                            , toolbar: '#toolbarDemo4'
+                            , cols: [[
+                                { type: 'checkbox', fixed: 'left' }
+                                , { type: 'numbers', title: '搴忓彿' }
+                                , { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟' }
+                                , { field: 'HDate', title: '鏃ユ湡' }
+                                , { field: 'HMaterNumber', title: '閰嶄欢鐗╂枡缂栫爜' }
+                                , { field: 'HMaterName', title: '閰嶄欢鐗╂枡鍚嶇О' }
+                                , { field: 'HBarCode', title: '閰嶄欢SN鐮�' }
+                                , { field: 'HMaterSN', title: '浜у搧SN鐮�' }
+
+                            ]]
+                            , data: data1.data
+                            , height: 800
+                            , page: true
+                            , totalRow: true
+                            , cellMinWidth: 90
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , done: function (res, curr, count) {
+                                soulTable.render(this);
+                            }
+                        }
+                        table.render(option4);
+                        layer.close(ajaxLoad);
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        //涓嶈壇姹囨姤璁板綍
+        function get_Display5(sWhere) {
+
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/Cj_SingleStation/BadQueryReport',
+                type: "GET",
+                async: false,
                 data: { "HBardCode": $("#HBardCode").val(), "HProcExchBillNo": $("#HProcExchBillNo").val(), "HICMOBillNo": $("#HICMOBillNo").val(), "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                 success: function (data1) {
                     if (data1.count == 1) {
@@ -190,8 +467,8 @@
 
                         //鍔ㄦ�佹樉绀哄垪鍚�
                         option = {
-                            elem: '#mainTable'
-                            , toolbar: '#toolbarDemo'
+                            elem: '#mainTable5'
+                            , toolbar: '#toolbarDemo5'
                             , cols: [col]
                             , data: data1.data
                             , height: 800
@@ -206,13 +483,147 @@
                         }
                         table.render(option);
 
-                        //鍒锋柊琛ㄦ牸鏁版嵁
-                        DisPlay_HideColumn();
+                        ////鍒锋柊琛ㄦ牸鏁版嵁
+                        //DisPlay_HideColumn();
 
-                        if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
-                            ColFilter();
+                        //if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                        //    ColFilter();
+                        //}
+
+                        layer.close(ajaxLoad);
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        //杩斾慨璁板綍
+        function get_Display6(HBardcode) {
+
+            var sWhere = " and SN鐮�='" + HBardcode + "'";
+
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/Cj_SingleStation/ProcessItemRepair',
+                type: "GET",
+                async: false,
+                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        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, titleData) > -1) {
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                            }
+                            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 HH:mm:ss')}}</div>", width: 180 });
+                                        break;
+                                    default:
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 150 });
+                                }
+                            }
                         }
 
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        option6 = {
+                            elem: '#mainTable6'
+                            , toolbar: '#toolbarDemo6'
+                            , cols: [col]
+                            , data: data1.data
+                            , height: 800
+                            , page: true
+                            , totalRow: true
+                            , cellMinWidth: 90
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , done: function (res, curr, count) {
+                                soulTable.render(this);
+                            }
+                        }
+                        table.render(option6);
+                        layer.close(ajaxLoad);
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        //宸ヨ壓鍙傛暟
+        function get_Display7(HBardcode) {
+
+            var sWhere = " and 鏉$爜='" + HBardcode + "'";
+
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/Cj_SingleStation/ProcessParameters',
+                type: "GET",
+                async: false,
+                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        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, titleData) > -1) {
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                            }
+                            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 HH:mm:ss')}}</div>", width: 180 });
+                                        break;
+                                    default:
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 150 });
+                                }
+                            }
+                        }
+
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        option7 = {
+                            elem: '#mainTable7'
+                            , toolbar: '#toolbarDemo7'
+                            , cols: [col]
+                            , data: data1.data
+                            , height: 800
+                            , page: true
+                            , totalRow: true
+                            , cellMinWidth: 90
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , done: function (res, curr, count) {
+                                soulTable.render(this);
+                            }
+                        }
+                        table.render(option7);
                         layer.close(ajaxLoad);
                     } else {
                         layer.close(ajaxLoad);
@@ -227,10 +638,12 @@
 
         // 蹇�熻繃婊�
         function get_FastQuery() {
+            var HBardCode = $("#HBardCode").val();
+        
             var ColName = $("#ColName").val();//澶嶉�夋
             var Comparator = $("#Comparator").val()
             var ColContent = $("#ColContent").val();
-
+          
             var com = "";
             if (ColName != 0 && Comparator != 0) {
                 switch (Comparator) {
@@ -253,7 +666,15 @@
                 com = " and (" + ColName + " " + com + ")";
             }
 
-            get_Display(sWhere);
+            get_Display2(sWhere);
+            get_Display5(sWhere);
+            if (HBardCode != "") {
+                get_Display3(HBardCode);//閰嶄欢娓呭崟
+                get_Display6(HBardCode);//杩斾慨璁板綍
+                get_Display7(HBardCode);//宸ヨ壓鍙傛暟
+                get_Display4(HBardCode);//閰嶄欢鍙樻洿璁板綍
+            }
+         
             sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
         }
 
@@ -261,8 +682,8 @@
         function get_HideColumn() {
             var colName = "";
             var contentUrl = "";
-            for (var i = 1; i < option.cols[0].length - 1; i++) {
-                colName += option.cols[0][i]["title"] + ",";
+            for (var i = 1; i < option2.cols[0].length - 1; i++) {
+                colName += option2.cols[0][i]["title"] + ",";
             }
             var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
             var urlLen = urlStr.split('/');
@@ -307,50 +728,50 @@
 
                         dataCol = data1.data[0].HGridString.split(',');
 
-                        for (var i = 0; i < option.cols[0].length - 2; i++) {
+                        for (var i = 0; i < option2.cols[0].length - 2; i++) {
                             var dataCols = dataCol[i].split('|');
                             //闅愯棌鍒�
                             if (dataCols[1] == 1) {
-                                option.cols[0][i + 1]["hide"] = true;
+                                option2.cols[0][i + 1]["hide"] = true;
                             }
                             //璁剧疆鍒楀
                             if (dataCols[3] > 0) {
-                                option.cols[0][i + 1]["width"] = dataCols[3];
+                                option2.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;";
+                                option2.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
                             } else {
-                                option.cols[0][i + 1]["style"] = "font-size:100%";
+                                option2.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;";
+                            //    option2.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
                             //} else {
-                            //    option.cols[0][i + 1]["width"] = "";
+                            //    option2.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;
+                            if (dataCols[1] == 0 && $.inArray(option2.cols[0][i + 1]["title"], titleData) == -1) {
+                                option2.cols[0][i + 1]["hide"] = false;
                             }
                             //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
                             switch (dataCols[2]) {
                                 case "L":
-                                    option.cols[0][i + 1]["align"] = "left";
+                                    option2.cols[0][i + 1]["align"] = "left";
                                     break;
                                 case "M":
-                                    option.cols[0][i + 1]["align"] = "center";
+                                    option2.cols[0][i + 1]["align"] = "center";
                                     break;
                                 case "R":
-                                    option.cols[0][i + 1]["align"] = "right";
+                                    option2.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;
+                        for (var i = 1; i < option2.cols[0].length - 1; i++) {
+                            if (option2.cols[0][i]["fixed"] != null) {
+                                option2.cols[0][i]["fixed"] = null;
                             }
                             else {
                                 break;
@@ -359,15 +780,15 @@
                         //鍐荤粨鍒�
                         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) {
+                                if ($.inArray(option2.cols[0][i + 1]["title"], titleData) != -1) {
                                     data1.data[0].HFixCols += 1;
                                 }
-                                option.cols[0][i + 1]["fixed"] = "left";
+                                option2.cols[0][i + 1]["fixed"] = "left";
                             }
                         }
-                        table.render(option);
+                        table.render(option2);
                     } else {
-                        table.render(option);
+                        table.render(option2);
                     }
                 }, error: function () {
                     layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
@@ -378,9 +799,9 @@
         // 鍒楁槑鏄剧ず涓嬫媺妗�
         function ColFilter() {
             var Organization = '<option  value="0" selected="selected" ></option>';
-            for (var i = 1; i < option.cols[0].length; i++) {
-                if (option.cols[0][i].hide != true) {
-                    Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+            for (var i = 1; i < option2.cols[0].length; i++) {
+                if (option2.cols[0][i].hide != true) {
+                    Organization += '<option  style="color:blue;" value="' + option2.cols[0][i].field + '">' + option2.cols[0][i].field + '</option>';
                 }
             }
             $("#ColName").empty();

--
Gitblit v1.9.1