From 7b76ee644426a303433a47cccf3c9518994b46ba Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 14 十一月 2024 18:27:45 +0800
Subject: [PATCH] 首巡末库存,自检增加数据库分页,优化人机料法报表

---
 WebTM/WebTM.csproj.user                                     |    2 
 WebTM/views/质量管理/质量报表/QC_FiveMenOneRingList.html            |   56 ++++
 WebTM/views/质量管理/首件检验单/QC_FirstPieceCheckBillList2.html     |  112 +++++++++
 WebTM/views/质量管理/巡检记录单/QC_PatrolProcCheckOtherBillList.html |  113 +++++++++
 WebTM/layuiadmin/Scripts/webConfig.js                       |    6 
 WebTM/views/质量管理/工序检验单/QC_ProcessCheckBillList2.html        |  112 +++++++++
 WebTM/views/质量管理/库存检验单/QC_StockCheckBillList.html           |  115 +++++++++
 WebTM/views/质量管理/车间自检单/QC_WorkSelfCheckBillList.html        |  113 +++++++++
 8 files changed, 593 insertions(+), 36 deletions(-)

diff --git a/WebTM/WebTM.csproj.user b/WebTM/WebTM.csproj.user
index 8f1260e..8233a56 100644
--- a/WebTM/WebTM.csproj.user
+++ b/WebTM/WebTM.csproj.user
@@ -4,7 +4,7 @@
     <NameOfLastUsedPublishProfile>D:\鏅轰簯杩堟�漒MES\MES-WEB-LayUI\WebTM\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
     <NameOfLastUsedPublishProfile>D:\鏅轰簯杩堟�漒MES\MES-WEB-LayUI\WebTM\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
     <ProjectView>ProjectFiles</ProjectView>
-    <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
+    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
     <UseIISExpress>true</UseIISExpress>
     <Use64BitIISExpress />
     <IISExpressSSLPort />
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index fc9d38b..f58049f 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -5,12 +5,12 @@
     //var WEBURL = "http://61.164.86.218:8099/ABAPI/";
     /*var WEBURL = "http://localhost/API/";             //棰滄檽鍐涙湰鍦伴厤缃�*/
     //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //鏉ㄤ箰鏈湴閰嶇疆
-    var WEBURL = "http://localhost:8082/API/";    //鏉滆春鏈湴閰嶇疆
+   /* var WEBURL = "http://localhost:8082/API/";    //鏉滆春鏈湴閰嶇疆*/
     /*var WEBURL = "http://localhost/API/";*/    //娼樻禉娓告湰鍦伴厤缃�  
-    //var WEBURL = "http://localhost:8082/API/";    //寮犵憺骞挎湰鍦伴厤缃�
+    var WEBURL = "http://localhost:8082/API/";    //寮犵憺骞挎湰鍦伴厤缃�
     //var WEBURL = "http://localhost:81/API/"    //缈佹稕娑涙湰鍦伴厤缃�
     //var WEBURL = "http://47.96.97.237/API/";          //鏅轰簯鏈嶅姟鍣�
-    var WEBURL = "http://localhost:8082/LuBaoAPI/";   //浣欐�濇澃鏈湴閰嶇疆
+/*    var WEBURL = "http://localhost:8082/LuBaoAPI/";   //浣欐�濇澃鏈湴閰嶇疆*/
     //var WEBURL = "http://localhost:8088/ARAPI/";      //浣欐�濇澃鏈湴閰嶇疆(瀹夌憺)
     //var WEBURL = "http://localhost/API/";             //娼樻禉娓告湰鍦伴厤缃�
     //var WEBURL = "http://61.164.86.218:8099/ABAPI/";  //濂ラ偊
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\267\241\346\243\200\350\256\260\345\275\225\345\215\225/QC_PatrolProcCheckOtherBillList.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\267\241\346\243\200\350\256\260\345\275\225\345\215\225/QC_PatrolProcCheckOtherBillList.html"
index 018e87e..f51352c 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\267\241\346\243\200\350\256\260\345\275\225\345\215\225/QC_PatrolProcCheckOtherBillList.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\267\241\346\243\200\350\256\260\345\275\225\345\215\225/QC_PatrolProcCheckOtherBillList.html"
@@ -210,6 +210,7 @@
                             </div>
                         </div>
                         <table class="" id="mainTable" lay-filter="mainTable"></table>
+                        <div id="page" style="position: relative; bottom: 0;"></div>
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Add" lay-event="btn-Add"><i class="layui-icon layui-icon-form"></i>鏂板</button>
@@ -254,6 +255,8 @@
 
             var option = [];
             var sWhere = "";
+            var page = 1;//鍒嗛〉鏁版嵁
+            var size = 50;
             var HModName = "QC_PatrolProcCheckOtherBillList";
 
             //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
@@ -263,7 +266,7 @@
             //#endregion
 
             //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
-            var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID", "HInspectinstruMentlD", "HShiftslD", "妫�娴嬪�煎熀纭�璧勬枡","鐩爣鍊煎熀纭�璧勬枡"];
+            var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID", "HInspectinstruMentlD", "HShiftslD", "妫�娴嬪�煎熀纭�璧勬枡", "鐩爣鍊煎熀纭�璧勬枡","sorderid"];
 
             var sql = " ";
             //#endregion
@@ -456,9 +459,17 @@
             //#region 鏌ヨ鎸夐挳
             form.on('submit(btnSearch)', function (data) {
                 if ($("#HProject").val() == 0) {
-                    get_FastQuery();
+                    if (page != 1) {
+                        $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+                    } else {
+                        get_FastQuery();
+                    }
                 } else {
-                    get_FastQuery(2);
+                    if (page != 1) {
+                        $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+                    } else {
+                        get_FastQuery(2);
+                    }
                 }
             });
             //#endregion
@@ -493,7 +504,7 @@
                     elem: '#mainTable'
                     , toolbar: '#toolbarDemo'
                     , height: 'full-50'
-                    , page: true
+                    , page: false
                     , sort: true  //閲嶇偣1锛氳繖閲岀殑sort琛ㄧず table琛ㄥ湪鍙栧緱鎺ュ彛鏁版嵁鍚庯紝瀵归〉闈㈡覆鏌撳悗鐨則able鏁版嵁杩涜鎺掑簭銆傚悓鏃讹紝杩欓噷鐨則rue 浼氬奖鍝嶉〉闈ort 涓婁笅灏忕澶寸殑 鏄剧ず鏁堟灉
                     , totalRow: true
                     //, cellMinWidth: 90
@@ -503,6 +514,24 @@
                         soulTable.render(this);
                     }
                 };
+                optionPage = {
+                    elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
+                    count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
+                    limit: 50,
+                    limits: [50, 500, 5000, 50000],
+                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
+                    jump: function (obj, first) {
+
+                        //棣栨涓嶆墽琛�
+                        if (!first) {
+                            //do something
+                            page = obj.curr;
+                            size = obj.limit;
+                            get_FastQuery();
+                        }
+                    }
+                }
+                laypage.render(optionPage);
             }
             //#endregion
             //#endregion  鐩戝惉缃戞牸琛ㄤ綋浜嬩欢
@@ -617,6 +646,78 @@
                     }
                 });
 
+            }
+            //#endregion
+
+            //#region 鍒嗛〉鏌ヨ
+            function get_DisplayPage(sqlWhere) {
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/QC_PatrolProcCheckOtherBill/QC_PatrolProcCheckOtherBillListPage',
+                    type: "GET",
+                    data: { "sWhere": sqlWhere, "user": sessionStorage["HUserName"], "page": page, "size": size },
+                    success: function (data1) {
+                        option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏�
+                        if (data1.code == 1) {
+                            optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟
+                            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 });
+                                //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛�
+                                var patrn = new RegExp(/^h/i);
+                                if (patrn.test(data1.list[key].ColmCols)) {
+                                    titleData[key] = data1.list[key].ColmCols;
+                                }
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+                            for (var i = 0; i < data.length; i++) {
+                                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: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 });
+                                            break;
+                                        case 'Decimal':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
+                                            break;
+                                        case 'Int32':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 });
+                                    }
+                                }
+                            }
+
+                            columns = col;
+                            option.cols = [col];
+                            option.data = data1.data;
+                            option.totalRow = true;
+                            laypage.render(optionPage);
+                            //鍒锋柊琛ㄦ牸鏁版嵁
+                            DisPlay_HideColumn();
+
+                            layer.close(ajaxLoad);
+                            if ($("#ColName option").length < 1) {
+                                ColFilter();
+                            }
+
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
             }
             //#endregion
 
@@ -738,7 +839,9 @@
                         sqlWhere += " and 椤圭洰鍙� like '%" + HProject + "%'";
                     }
                 }
-                RoadHBillNo(sqlWhere);
+                 //RoadHBillNo(sqlWhere);
+                //鍒嗛〉鏌ヨ
+                get_DisplayPage(sqlWhere);
             }
             //#endregion
 
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillList2.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillList2.html"
index 740754d..9658b2e 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillList2.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillList2.html"
@@ -221,6 +221,7 @@
                             </div>
                         </div>
                         <table class="" id="mainTable" lay-filter="mainTable"></table>
+                        <div id="page" style="position: relative; bottom: 0;"></div>
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_AddNew" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
@@ -265,6 +266,8 @@
 
             var option = [];
             var sWhere = "";
+            var page = 1;//鍒嗛〉鏁版嵁
+            var size = 50;
             var HModName = "QC_ProcessCheckBillList";
 
             //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
@@ -274,7 +277,7 @@
             //#endregion
 
             //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
-            var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID"];
+            var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID", "sorderid"];
 
             var sql = " ";
             //#endregion
@@ -408,9 +411,17 @@
             //#region 鏌ヨ鎸夐挳
             form.on('submit(btnSearch)', function (data) {
                 if ($("#HProject").val() == 0) {
-                    get_FastQuery();
+                    if (page != 1) {
+                        $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+                    } else {
+                        get_FastQuery();
+                    }
                 } else {
-                    get_FastQuery(2);
+                    if (page != 1) {
+                        $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+                    } else {
+                        get_FastQuery(2);
+                    }
                 }
             });
             //#endregion
@@ -475,7 +486,7 @@
                     elem: '#mainTable'
                     , toolbar: '#toolbarDemo'
                     , height: 'full-50'
-                    , page: true
+                    , page: false
                     , sort: true  //閲嶇偣1锛氳繖閲岀殑sort琛ㄧず table琛ㄥ湪鍙栧緱鎺ュ彛鏁版嵁鍚庯紝瀵归〉闈㈡覆鏌撳悗鐨則able鏁版嵁杩涜鎺掑簭銆傚悓鏃讹紝杩欓噷鐨則rue 浼氬奖鍝嶉〉闈ort 涓婁笅灏忕澶寸殑 鏄剧ず鏁堟灉
                     , totalRow: true
                     //, cellMinWidth: 90
@@ -485,6 +496,24 @@
                         soulTable.render(this);
                     }
                 };
+                optionPage = {
+                    elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
+                    count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
+                    limit: 50,
+                    limits: [50, 500, 5000, 50000],
+                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
+                    jump: function (obj, first) {
+
+                        //棣栨涓嶆墽琛�
+                        if (!first) {
+                            //do something
+                            page = obj.curr;
+                            size = obj.limit;
+                            get_FastQuery();
+                        }
+                    }
+                }
+                laypage.render(optionPage);
             }
             //#endregion
             //#endregion  鐩戝惉缃戞牸琛ㄤ綋浜嬩欢
@@ -600,6 +629,77 @@
             }
             //#endregion
 
+            //#region 鍒嗛〉鏌ヨ
+            function get_DisplayPage(sqlWhere) {
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/QC_ProcessCheckMainBill/QC_ProcessCheckMainBillListPage',
+                    type: "GET",
+                    data: { "sWhere": sqlWhere, "user": sessionStorage["HUserName"], "page": page, "size": size },
+                    success: function (data1) {
+                        option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏�
+                        if (data1.code == 1) {
+                            optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟
+                            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 });
+                                //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛�
+                                var patrn = new RegExp(/^h/i);
+                                if (patrn.test(data1.list[key].ColmCols)) {
+                                    titleData[key] = data1.list[key].ColmCols;
+                                }
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+                            for (var i = 0; i < data.length; i++) {
+                                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: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 });
+                                            break;
+                                        case 'Decimal':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
+                                            break;
+                                        case 'Int32':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 });
+                                    }
+                                }
+                            }
+
+                            columns = col;
+                            option.cols = [col];
+                            option.data = data1.data;
+                            option.totalRow = true;
+                            laypage.render(optionPage);
+                            //鍒锋柊琛ㄦ牸鏁版嵁
+                            DisPlay_HideColumn();
+
+                            layer.close(ajaxLoad);
+                            if ($("#ColName option").length < 1) {
+                                ColFilter();
+                            }
+
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
 
             //#region 蹇�熻繃婊�
             function get_FastQuery(number) {
@@ -719,7 +819,9 @@
                         sqlWhere += " and 椤圭洰鍙� like '%" + HProject + "%'";
                     }
                 }
-                get_Display(sqlWhere);
+                //get_Display(sqlWhere);
+                //鏁版嵁搴撳垎椤垫煡璇�
+                get_DisplayPage(sqlWhere);
             }
             //#endregion
 
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\272\223\345\255\230\346\243\200\351\252\214\345\215\225/QC_StockCheckBillList.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\272\223\345\255\230\346\243\200\351\252\214\345\215\225/QC_StockCheckBillList.html"
index c20f22d..93367a2 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\272\223\345\255\230\346\243\200\351\252\214\345\215\225/QC_StockCheckBillList.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\272\223\345\255\230\346\243\200\351\252\214\345\215\225/QC_StockCheckBillList.html"
@@ -218,6 +218,7 @@
                             </div>
                         </div>
                         <table class="" id="mainTable" lay-filter="mainTable"></table>
+                        <div id="page" style="position: relative; bottom: 0;"></div>
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Add" lay-event="btn-Add"><i class="layui-icon layui-icon-form"></i>鏂板</button>
@@ -262,6 +263,8 @@
 
             var option = [];
             var sWhere = "";
+            var page = 1;//鍒嗛〉鏁版嵁
+            var size = 50;
             var HModName = "QC_StockCheckBillList";
 
             //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
@@ -271,7 +274,7 @@
             //#endregion
 
             //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
-            var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID", "HInspectinstruMentlD", "HShiftslD", "妫�娴嬪�煎熀纭�璧勬枡","鐩爣鍊煎熀纭�璧勬枡"];
+            var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID", "HInspectinstruMentlD", "HShiftslD", "妫�娴嬪�煎熀纭�璧勬枡", "鐩爣鍊煎熀纭�璧勬枡", "sorderid"];
 
             var sql = " ";
             //#endregion
@@ -464,9 +467,17 @@
             //#region 鏌ヨ鎸夐挳
             form.on('submit(btnSearch)', function (data) {
                 if ($("#HProject").val() == 0) {
-                    get_FastQuery();
+                    if (page != 1) {
+                        $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+                    } else {
+                        get_FastQuery();
+                    }
                 } else {
-                    get_FastQuery(2);
+                    if (page != 1) {
+                        $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+                    } else {
+                        get_FastQuery(2);
+                    }
                 }
 
             });
@@ -533,7 +544,7 @@
                     elem: '#mainTable'
                     , toolbar: '#toolbarDemo'
                     , height: 'full-50'
-                    , page: true
+                    , page: false
                     , sort: true  //閲嶇偣1锛氳繖閲岀殑sort琛ㄧず table琛ㄥ湪鍙栧緱鎺ュ彛鏁版嵁鍚庯紝瀵归〉闈㈡覆鏌撳悗鐨則able鏁版嵁杩涜鎺掑簭銆傚悓鏃讹紝杩欓噷鐨則rue 浼氬奖鍝嶉〉闈ort 涓婁笅灏忕澶寸殑 鏄剧ず鏁堟灉
                     , totalRow: true
                     //, cellMinWidth: 90
@@ -543,6 +554,24 @@
                         soulTable.render(this);
                     }
                 };
+                optionPage = {
+                    elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
+                    count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
+                    limit: 50,
+                    limits: [50, 500, 5000, 50000],
+                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
+                    jump: function (obj, first) {
+
+                        //棣栨涓嶆墽琛�
+                        if (!first) {
+                            //do something
+                            page = obj.curr;
+                            size = obj.limit;
+                            get_FastQuery();
+                        }
+                    }
+                }
+                laypage.render(optionPage);
             }
             //#endregion
             //#endregion  鐩戝惉缃戞牸琛ㄤ綋浜嬩欢
@@ -573,7 +602,8 @@
                     })
                 }
             });
-             //#endregion
+            //#endregion
+
             //#region 鏌ヨ
             function RoadHBillNo(sqlWhere) {
                 var ajaxLoad = layer.load();
@@ -660,6 +690,77 @@
             }
             //#endregion
 
+            //#region 鍒嗛〉鏌ヨ
+            function get_DisplayPage(sqlWhere) {
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/QC_StockCheckBill/QC_StockCheckBillListPage',
+                    type: "GET",
+                    data: { "sWhere": sqlWhere, "user": sessionStorage["HUserName"], "page": page, "size": size },
+                    success: function (data1) {
+                        option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏�
+                        if (data1.code == 1) {
+                            optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟
+                            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 });
+                                //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛�
+                                var patrn = new RegExp(/^h/i);
+                                if (patrn.test(data1.list[key].ColmCols)) {
+                                    titleData[key] = data1.list[key].ColmCols;
+                                }
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+                            for (var i = 0; i < data.length; i++) {
+                                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: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 });
+                                            break;
+                                        case 'Decimal':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
+                                            break;
+                                        case 'Int32':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 });
+                                    }
+                                }
+                            }
+
+                            columns = col;
+                            option.cols = [col];
+                            option.data = data1.data;
+                            option.totalRow = true;
+                            laypage.render(optionPage);
+                            //鍒锋柊琛ㄦ牸鏁版嵁
+                            DisPlay_HideColumn();
+
+                            layer.close(ajaxLoad);
+                            if ($("#ColName option").length < 1) {
+                                ColFilter();
+                            }
+
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
 
             //#region 蹇�熻繃婊�
             function get_FastQuery(number) {
@@ -780,7 +881,9 @@
                         sqlWhere += " and 椤圭洰鍙� like '%" + HProject + "%'";
                     }
                 }
-                RoadHBillNo(sqlWhere);
+                //RoadHBillNo(sqlWhere);
+                //鏁版嵁搴撳垎椤�
+                get_DisplayPage(sqlWhere);
             }
             //#endregion
 
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_FiveMenOneRingList.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_FiveMenOneRingList.html"
index 6dca135..20ff078 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_FiveMenOneRingList.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_FiveMenOneRingList.html"
@@ -49,17 +49,20 @@
                                             <div class="layui-inline">
                                                 <label class="layui-form-label">SN鐮�</label>
                                                 <div class="layui-input-block">
-                                                    <input type="text" class="layui-input ForFilteringSchemes" name="SN" id="SN" style="width:300px;">
+                                                    <input type="text" class="layui-input ForFilteringSchemes" name="SN" id="SN" style="width:260px;">
                                                 </div>
                                             </div>
                                             <div class="layui-inline">
                                                 <label class="layui-form-label">宸ュ簭娴佽浆鍗�</label>
                                                 <div class="layui-input-block">
-                                                    <input type="text" class="layui-input ForFilteringSchemes" name="HProcHBillNo" id="HProcHBillNo">
-                                                </div>
-                                            </div>
-                                            <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
-                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                                    <input type="text" class="layui-input ForFilteringSchemes" name="HProcHBillNo" id="HProcHBillNo" style="background-color:#efefef4d;width: 75%;display: inline-block;" readonly>
+                                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHProcExch" id="btnHProcExch" style="padding: 0 10px;float: right;margin-right: 3px;">
+                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                                    </button>
+                                                </div>                                              
+                                            </div>                                           
+                                            <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"  style="padding: 0 10px;margin-left: 20px;">
+                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn">鏌ヨ</i>
                                             </button>
                                             <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
                                             <div class="layui-inline">
@@ -832,6 +835,44 @@
             });
             //#endregion
 
+            //#region 宸ュ簭娴佽浆鍗″脊绐�
+            form.on('submit(btnHProcExch)', function () {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '宸ュ簭娴佽浆鍗″垪琛�',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['90%', '90%'],
+                    maxmin: true,
+                    content: ['../../../views/杞﹂棿绠$悊/宸ュ簭娴佽浆鍗�/Sc_ProcessExchangeBillList.html', 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HProcHBillNo").val(checkStatus.data[0].鍗曟嵁鍙�);                     
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+            //#endregion
+
             //#region 鍓〃鏍�  
             //浜�
             table.on('tool(mainTable_Man)', function (obj) {
@@ -1528,6 +1569,7 @@
                                 , data: data1.data.h_p_QC_FiveMenOneRingList_Query3
                                 , height: 'full-80'
                                 , cellMinWidth: 90
+                                , limit: Number.MAX_VALUE//榛樿鏄剧ず鍏ㄩ儴
                                 , page: false
                             }
                             table.render(option_Method);
@@ -1539,6 +1581,7 @@
                                 , data: data1.data.h_p_QC_FiveMenOneRingList_Query4
                                 , height: 'full-80'
                                 , cellMinWidth: 90
+                                , limit: Number.MAX_VALUE//榛樿鏄剧ず鍏ㄩ儴
                                 , page: false
                             }
                             table.render(option_Environments);
@@ -1550,6 +1593,7 @@
                                 , data: data1.data.h_p_QC_FiveMenOneRingList_Query5
                                 , height: 'full-80'
                                 , cellMinWidth: 90
+                                , limit: Number.MAX_VALUE//榛樿鏄剧ず鍏ㄩ儴
                                 , page: false
                             }
                             table.render(option_Measure);
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\275\246\351\227\264\350\207\252\346\243\200\345\215\225/QC_WorkSelfCheckBillList.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\275\246\351\227\264\350\207\252\346\243\200\345\215\225/QC_WorkSelfCheckBillList.html"
index 7aaa476..a0975fc 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\275\246\351\227\264\350\207\252\346\243\200\345\215\225/QC_WorkSelfCheckBillList.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\275\246\351\227\264\350\207\252\346\243\200\345\215\225/QC_WorkSelfCheckBillList.html"
@@ -209,6 +209,7 @@
                             </div>
                         </div>
                         <table class="" id="mainTable" lay-filter="mainTable"></table>
+                        <div id="page" style="position: relative; bottom: 0;"></div>
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Add" lay-event="btn-Add"><i class="layui-icon layui-icon-form"></i>鏂板</button>
@@ -253,6 +254,8 @@
 
             var option = [];
             var sWhere = "";
+            var page = 1;//鍒嗛〉鏁版嵁
+            var size = 50;
             var HModName = "QC_WorkSelfCheckBillList";
 
             //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
@@ -262,7 +265,7 @@
             //#endregion
 
             //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
-            var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID", "HInspectinstruMentlD", "HShiftslD", "妫�娴嬪�煎熀纭�璧勬枡","鐩爣鍊煎熀纭�璧勬枡"];
+            var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID", "HInspectinstruMentlD", "HShiftslD", "妫�娴嬪�煎熀纭�璧勬枡", "鐩爣鍊煎熀纭�璧勬枡", "sorderid"];
 
             var sql = " ";
             //#endregion
@@ -455,9 +458,17 @@
             //#region 鏌ヨ鎸夐挳
             form.on('submit(btnSearch)', function (data) {
                 if ($("#HProject").val() == 0) {
-                    get_FastQuery();
+                    if (page != 1) {
+                        $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+                    } else {
+                        get_FastQuery();
+                    }
                 } else {
-                    get_FastQuery(2);
+                    if (page != 1) {
+                        $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+                    } else {
+                        get_FastQuery(2);
+                    }
                 }
             });
             //#endregion
@@ -492,7 +503,7 @@
                     elem: '#mainTable'
                     , toolbar: '#toolbarDemo'
                     , height: 'full-50'
-                    , page: true
+                    , page: false
                     , sort: true  //閲嶇偣1锛氳繖閲岀殑sort琛ㄧず table琛ㄥ湪鍙栧緱鎺ュ彛鏁版嵁鍚庯紝瀵归〉闈㈡覆鏌撳悗鐨則able鏁版嵁杩涜鎺掑簭銆傚悓鏃讹紝杩欓噷鐨則rue 浼氬奖鍝嶉〉闈ort 涓婁笅灏忕澶寸殑 鏄剧ず鏁堟灉
                     , totalRow: true
                     //, cellMinWidth: 90
@@ -502,6 +513,24 @@
                         soulTable.render(this);
                     }
                 };
+                optionPage = {
+                    elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
+                    count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
+                    limit: 50,
+                    limits: [50, 500, 5000, 50000],
+                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
+                    jump: function (obj, first) {
+
+                        //棣栨涓嶆墽琛�
+                        if (!first) {
+                            //do something
+                            page = obj.curr;
+                            size = obj.limit;
+                            get_FastQuery();
+                        }
+                    }
+                }
+                laypage.render(optionPage);
             }
             //#endregion
             //#endregion  鐩戝惉缃戞牸琛ㄤ綋浜嬩欢
@@ -533,6 +562,7 @@
                 }
             });
              //#endregion
+
             //#region 鏌ヨ
             function RoadHBillNo(sqlWhere) {
                 var ajaxLoad = layer.load();
@@ -619,6 +649,77 @@
             }
             //#endregion
 
+            //#region 鍒嗛〉鏌ヨ
+            function get_DisplayPage(sqlWhere) {
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/QC_WorkSelfCheckBill/QC_WorkSelfCheckBillListPage',
+                    type: "GET",
+                    data: { "sWhere": sqlWhere, "user": sessionStorage["HUserName"], "page": page, "size": size },
+                    success: function (data1) {
+                        option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏�
+                        if (data1.code == 1) {
+                            optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟
+                            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 });
+                                //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛�
+                                var patrn = new RegExp(/^h/i);
+                                if (patrn.test(data1.list[key].ColmCols)) {
+                                    titleData[key] = data1.list[key].ColmCols;
+                                }
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+                            for (var i = 0; i < data.length; i++) {
+                                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: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 });
+                                            break;
+                                        case 'Decimal':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
+                                            break;
+                                        case 'Int32':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 });
+                                    }
+                                }
+                            }
+
+                            columns = col;
+                            option.cols = [col];
+                            option.data = data1.data;
+                            option.totalRow = true;
+                            laypage.render(optionPage);
+                            //鍒锋柊琛ㄦ牸鏁版嵁
+                            DisPlay_HideColumn();
+
+                            layer.close(ajaxLoad);
+                            if ($("#ColName option").length < 1) {
+                                ColFilter();
+                            }
+
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
 
             //#region 蹇�熻繃婊�
             function get_FastQuery(number) {
@@ -739,7 +840,9 @@
                         sqlWhere += " and 椤圭洰鍙� like '%" + HProject + "%'";
                     }
                 }
-                RoadHBillNo(sqlWhere);
+                //RoadHBillNo(sqlWhere);
+                //鏁版嵁搴撳垎椤�
+                get_DisplayPage(sqlWhere);
             }
             //#endregion
 
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillList2.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillList2.html"
index 59e22d2..e428ef9 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillList2.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillList2.html"
@@ -161,6 +161,7 @@
                             </div>
                         </div>
                         <table class="" id="mainTable" lay-filter="mainTable"></table>
+                        <div id="page" style="position: relative; bottom: 0;"></div>
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Add" lay-event="btn-Add"><i class="layui-icon layui-icon-form"></i>鏂板</button>
@@ -205,6 +206,8 @@
 
             var option = [];
             var sWhere = "";
+            var page = 1;//鍒嗛〉鏁版嵁
+            var size = 50;
             var HModName = "QC_FirstPieceCheckBillList";
 
             //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
@@ -214,7 +217,7 @@
             //#endregion
 
             //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
-            var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID"];
+            var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID","sorderid"];
 
             var sql = " ";
             //#endregion
@@ -407,9 +410,17 @@
             //#region 鏌ヨ鎸夐挳
             form.on('submit(btnSearch)', function (data) {
                 if ($("#HProject").val() == 0) {
-                    get_FastQuery();
+                    if (page != 1) {
+                        $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+                    } else {
+                        get_FastQuery();
+                    }                   
                 } else {
-                    get_FastQuery(2);
+                    if (page != 1) {
+                        $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+                    } else {
+                        get_FastQuery(2);
+                    }
                 }
             });
             //#endregion
@@ -444,7 +455,7 @@
                     elem: '#mainTable'
                     , toolbar: '#toolbarDemo'
                     , height: 'full-50'
-                    , page: true
+                    , page: false
                     , sort: true  //閲嶇偣1锛氳繖閲岀殑sort琛ㄧず table琛ㄥ湪鍙栧緱鎺ュ彛鏁版嵁鍚庯紝瀵归〉闈㈡覆鏌撳悗鐨則able鏁版嵁杩涜鎺掑簭銆傚悓鏃讹紝杩欓噷鐨則rue 浼氬奖鍝嶉〉闈ort 涓婁笅灏忕澶寸殑 鏄剧ず鏁堟灉
                     , totalRow: true
                     //, cellMinWidth: 90
@@ -454,6 +465,24 @@
                         soulTable.render(this);
                     }
                 };
+                optionPage = {
+                    elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
+                    count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
+                    limit: 50,
+                    limits: [50, 500, 5000, 50000],
+                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
+                    jump: function (obj, first) {
+
+                        //棣栨涓嶆墽琛�
+                        if (!first) {
+                            //do something
+                            page = obj.curr;
+                            size = obj.limit;
+                            get_FastQuery();
+                        }
+                    }
+                }
+                laypage.render(optionPage);            
             }
             //#endregion
 
@@ -540,6 +569,77 @@
             }
             //#endregion
 
+            //#region 鍒嗛〉鏌ヨ
+            function get_DisplayPage(sWhere) {           
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/QC_FirstPieceCheckBillMain/QC_FirstPieceCheckBillMainListPage',
+                    type: "GET",
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size },
+                    success: function (data1) {
+                        option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏�
+                        if (data1.code == 1) {
+                            optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟
+                            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 });
+                                //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛�
+                                var patrn = new RegExp(/^h/i);
+                                if (patrn.test(data1.list[key].ColmCols)) {
+                                    titleData[key] = data1.list[key].ColmCols;
+                                }
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+                            for (var i = 0; i < data.length; i++) {
+                                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: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 });
+                                            break;
+                                        case 'Decimal':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
+                                            break;
+                                        case 'Int32':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 });
+                                    }
+                                }
+                            }
+
+                            columns = col;
+                            option.cols = [col];
+                            option.data = data1.data;
+                            option.totalRow = true;
+                            laypage.render(optionPage);
+                            //鍒锋柊琛ㄦ牸鏁版嵁
+                            DisPlay_HideColumn();
+
+                            layer.close(ajaxLoad);
+                            if ($("#ColName option").length < 1) {
+                                ColFilter();
+                            }
+                           
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
 
             //#region 蹇�熻繃婊�
             function get_FastQuery(number) {
@@ -612,7 +712,8 @@
                         sqlWhere += " and 椤圭洰鍙� like '%" + HProject + "%'";
                     }
                 }
-                RoadHBillNo(sqlWhere);
+                //RoadHBillNo(sqlWhere);
+                get_DisplayPage(sqlWhere);
             }
             //#endregion
 
@@ -641,6 +742,7 @@
             }
             //#endregion
 
+
             //#region 鑾峰彇椤圭洰鍙�
             function Get_HProject() {
                 //鑾峰彇椤圭洰鍙�

--
Gitblit v1.9.1