From ebef191888d9d2c2a2e7a7f677189164e4eef0b3 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 05 八月 2025 19:04:33 +0800
Subject: [PATCH] 车间委外接收单列表bug处理

---
 WebTM/views/工资管理/定额申请/Pay_ProcPriceRequestBillList.html |  677 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 613 insertions(+), 64 deletions(-)

diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBillList.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBillList.html"
index 2be2efe..22ddf1c 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBillList.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBillList.html"
@@ -92,19 +92,80 @@
                                             <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent">
                                         </div>
                                     </div>
+                                    <div class="layui-row" style="margin-top:5px">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName1" id="ColName1" lay-filter="ColName1" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent1" id="ColContent1">
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style="margin-top:5px">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName2" id="ColName2" lay-filter="ColName2" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent2" id="ColContent2">
+                                        </div>
+                                    </div>
                                 </div>
                             </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" lay-event="btn_Export" id="btn_Export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Add" id="btn_Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Edit" id="btn_Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-print" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Delete" id="btn_Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Refresh" id="btn_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Audit" id="btn_Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_DeAudit" id="btn_DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_startCheckBill" id="set_startCheckBill"><i class="layui-icon layui-icon-form"></i>鍙戣捣瀹℃壒</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_CheckFlowInfo" id="get_CheckFlowInfo"><i class="layui-icon layui-icon-form"></i>鏌ョ湅瀹℃壒杩涘害</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill_Flow" id="CheckBill_Flow"><i class="layui-icon layui-icon-form"></i>澶氱骇瀹℃牳</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck_Flow" id="AbandonCheck_Flow"><i class="layui-icon layui-icon-form"></i>澶氱骇鍙嶅鏍�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_RejectCheck_Flow" id="RejectCheck_Flow"><i class="layui-icon layui-icon-form"></i>椹冲洖</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Close" id="btn_Close"><i class="layui-icon layui-icon-radio"></i>鍏抽棴</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_DeClose" id="btn_DeClose"><i class="layui-icon layui-icon-circle"></i>鍙嶅叧闂�</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Drop" id="btn_Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button>
@@ -144,6 +205,8 @@
             var sWhere = "";
             var ins;                //鐢ㄤ簬瀵煎嚭excel
             var option = [];
+            var page = 1;//鍒嗛〉鏁版嵁
+            var size = 50;
             var columns = "";
             var titleData = [];     //涓嶉渶瑕佹樉绀虹殑瀛楁
             //#endregion
@@ -188,7 +251,7 @@
                 option = {
                     elem: '#mainTable'
                     , toolbar: '#toolbarDemo'
-                    , page: true
+                    , page: false
                     , totalRow: true
                     , height: 'full-50'
                     , cellMinWidth: 90
@@ -198,6 +261,28 @@
                         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) {
+                        //console.log(obj)
+                        //obj鍖呭惈浜嗗綋鍓嶅垎椤电殑鎵�鏈夊弬鏁帮紝姣斿锛�
+                        //console.log(obj.curr); //寰楀埌褰撳墠椤碉紝浠ヤ究鍚戞湇鍔$璇锋眰瀵瑰簲椤电殑鏁版嵁銆�
+                        //console.log(obj.limit); //寰楀埌姣忛〉鏄剧ず鐨勬潯鏁�
+
+                        //棣栨涓嶆墽琛�
+                        if (!first) {
+                            //do something
+                            page = obj.curr;
+                            size = obj.limit;
+                            get_FastQuery();
+                        }
+                    }
+                }
+                laypage.render(optionPage);
             }
             //#endregion
 
@@ -222,87 +307,214 @@
             })
             //#endregion
 
+            table.on('tool(mainTable)', function (obj) {
+                var data = obj.data;
+                if (obj.event == '鍗曟嵁鍙�') {
+                    var HInterID = data.hmainid.toString();
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: HPageTitle + '- 缂栬緫'
+                        , shift: 0  //寮瑰嚭鍔ㄧ敾
+                        , content: '../../宸ヨ祫绠$悊/瀹氶鐢宠/Pay_ProcPriceRequestBill.html?OperationType=3&linterid=' + HInterID + '&HSouceBillType='
+                        , btn: ['纭畾'],
+                        // 鎸夐挳1 鐨勫洖璋�
+                        end: function (index, layero, that) {
+                            //鍒锋柊椤甸潰
+                            $("#btnSearch").trigger('click');
+                        }
+                    })
+                }
+            });
+
+            //#region 鏄剧ず鍒楁暟鎹�
+            //function DisPlay_HideColumn() {
+            //    $.ajax({
+            //        type: "GET",
+            //        url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+            //        async: false,
+            //        data: { "HModName": HModName, "user": HMaker },
+            //        success: function (data1) {
+            //            if (data1.data.length != 0) {
+            //                var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+            //                dataCol = data1.data[0].HGridString.split(',');
+
+            //                for (var i = 0; i < option.cols[0].length - 2; i++) {
+            //                    if (dataCol[i]) {
+            //                        var dataCols = dataCol[i].split('|');
+            //                    }
+            //                    //闅愯棌鍒�
+            //                    if (dataCols[1] == 1) {
+            //                        option.cols[0][i + 1]["hide"] = true;
+            //                    }
+            //                    //璁剧疆鍒楀
+            //                    if (dataCols[3] > 0) {
+            //                        option.cols[0][i + 1]["width"] = dataCols[3];
+            //                    }
+            //                    //璁剧疆鍐呭瀛椾綋澶у皬
+            //                    if (data1.data[0].HFontSize != 0) {
+            //                        option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+            //                    } else {
+            //                        option.cols[0][i + 1]["style"] = "font-size:100%";
+            //                    }
+            //                    //鏄剧ず鍒�
+            //                    if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+            //                        option.cols[0][i + 1]["hide"] = false;
+            //                    }
+            //                    //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+            //                    switch (dataCols[2]) {
+            //                        case "L":
+            //                            option.cols[0][i + 1]["align"] = "left";
+            //                            break;
+            //                        case "M":
+            //                            option.cols[0][i + 1]["align"] = "center";
+            //                            break;
+            //                        case "R":
+            //                            option.cols[0][i + 1]["align"] = "right";
+            //                            break;
+            //                    }
+            //                }
+
+            //                //鍙栨秷鍐荤粨鍒�
+            //                for (var i = 1; i < option.cols[0].length - 1; i++) {
+            //                    if (option.cols[0][i]["fixed"] != null) {
+            //                        option.cols[0][i]["fixed"] = null;
+            //                    }
+            //                    else {
+            //                        break;
+            //                    }
+            //                }
+            //                //鍐荤粨鍒�
+            //                if (data1.data[0].HFixCols != 0) {
+            //                    for (var i = 0; i < data1.data[0].HFixCols; i++) {
+            //                        if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+            //                            data1.data[0].HFixCols += 1;
+            //                        }
+            //                        option.cols[0][i + 1]["fixed"] = "left";
+            //                    }
+            //                }
+            //                table.render(option);
+            //                ins = table.render(option);
+            //            } else {
+            //                table.render(option);
+            //                ins = table.render(option);
+            //            }
+
+            //            //鍒锋柊鎸夐挳鏄剧ず
+            //            var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+            //            Display_HideButton(btns, HBillType, HModName, HMaker);
+
+            //        }, error: function () {
+            //            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+            //        }
+            //    })
+            //}
+            //#endregion
+
+
             //#region 鏄剧ず鍒楁暟鎹�
             function DisPlay_HideColumn() {
                 $.ajax({
-                    type: "GET",
                     url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                    type: "GET",
                     async: false,
-                    data: { "HModName": HModName, "user": HMaker },
+                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                     success: function (data1) {
                         if (data1.data.length != 0) {
+
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+                            var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+                            newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
                             dataCol = data1.data[0].HGridString.split(',');
-
-                            for (var i = 0; i < option.cols[0].length - 2; i++) {
-                                if (dataCol[i]) {
-                                    var dataCols = dataCol[i].split('|');
-                                }
-                                //闅愯棌鍒�
-                                if (dataCols[1] == 1) {
-                                    option.cols[0][i + 1]["hide"] = true;
-                                }
-                                //璁剧疆鍒楀
-                                if (dataCols[3] > 0) {
-                                    option.cols[0][i + 1]["width"] = dataCols[3];
-                                }
-                                //璁剧疆鍐呭瀛椾綋澶у皬
-                                if (data1.data[0].HFontSize != 0) {
-                                    option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
-                                } else {
-                                    option.cols[0][i + 1]["style"] = "font-size:100%";
-                                }
-                                //鏄剧ず鍒�
-                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
-                                    option.cols[0][i + 1]["hide"] = false;
-                                }
-                                //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
-                                switch (dataCols[2]) {
-                                    case "L":
-                                        option.cols[0][i + 1]["align"] = "left";
-                                        break;
-                                    case "M":
-                                        option.cols[0][i + 1]["align"] = "center";
-                                        break;
-                                    case "R":
-                                        option.cols[0][i + 1]["align"] = "right";
-                                        break;
-                                }
-                            }
-
-                            //鍙栨秷鍐荤粨鍒�
-                            for (var i = 1; i < option.cols[0].length - 1; i++) {
-                                if (option.cols[0][i]["fixed"] != null) {
-                                    option.cols[0][i]["fixed"] = null;
-                                }
-                                else {
-                                    break;
-                                }
-                            }
-                            //鍐荤粨鍒�
-                            if (data1.data[0].HFixCols != 0) {
-                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
-                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
-                                        data1.data[0].HFixCols += 1;
+                            //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+                            if (dataCol.length == option.cols[0].length - 1) {
+                                //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+                                for (var j = 0; j < option.cols[0].length - 1; j++) {
+                                    for (var i = 0; i < option.cols[0].length - 1; i++) {
+                                        var dataCols = dataCol[j].split('|');
+                                        //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+                                        if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+                                            //闅愯棌鍒�
+                                            if (dataCols[1] == 1) {
+                                                option.cols[0][i + 1]["hide"] = true;
+                                            }
+                                            //璁剧疆鍒楀
+                                            if (dataCols[3] > 0) {
+                                                option.cols[0][i + 1]["width"] = dataCols[3];
+                                            }
+                                            //璁剧疆鍐呭瀛椾綋澶у皬
+                                            if (data1.data[0].HFontSize != 0) {
+                                                option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+                                            } else {
+                                                option.cols[0][i + 1]["style"] = "font-size:100%";
+                                            }
+                                            //鏄剧ず鍒�
+                                            if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+                                                option.cols[0][i + 1]["hide"] = false;
+                                            }
+                                            //缁熻鍒�
+                                            if (dataCols[6] == 1) {
+                                                option.cols[0][i + 1]["totalRow"] = true;
+                                            }
+                                            //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                                            switch (dataCols[2]) {
+                                                case "L":
+                                                    option.cols[0][i + 1]["align"] = "left";
+                                                    break;
+                                                case "M":
+                                                    option.cols[0][i + 1]["align"] = "center";
+                                                    break;
+                                                case "R":
+                                                    option.cols[0][i + 1]["align"] = "right";
+                                                    break;
+                                            }
+                                            //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+                                            if (dataCols[4] != null && dataCols[4] != "") {
+                                                option.cols[0][i + 1]["title"] = dataCols[4];
+                                            }
+                                            newCols[0].push(option.cols[0][i + 1]);
+                                        }
                                     }
-                                    option.cols[0][i + 1]["fixed"] = "left";
+                                }
+                                //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+                                if (dataCol.length == newCols[0].length - 1) {
+                                    option.cols = newCols;
+                                    //鍙栨秷鍐荤粨鍒�
+                                    for (var i = 1; i < option.cols[0].length - 1; i++) {
+                                        if (option.cols[0][i]["fixed"] != null) {
+                                            option.cols[0][i]["fixed"] = null;
+                                        }
+                                        else {
+                                            break;
+                                        }
+                                    }
+                                    //鍐荤粨鍒�
+                                    if (data1.data[0].HFixCols != 0) {
+                                        for (var i = 0; i < data1.data[0].HFixCols; i++) {
+                                            if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+                                                data1.data[0].HFixCols += 1;
+                                            }
+                                            option.cols[0][i + 1]["fixed"] = "left";
+                                        }
+                                    }
                                 }
                             }
                             table.render(option);
+                            
                         } else {
                             table.render(option);
+                            
                         }
-
                         //鍒锋柊鎸夐挳鏄剧ず
                         var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
                         Display_HideButton(btns, HBillType, HModName, HMaker);
-
                     }, error: function () {
                         layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                     }
                 })
             }
             //#endregion
+
 
             //#endregion
 
@@ -320,6 +532,10 @@
                     //缂栬緫鎸夐挳
                     case 'btn_Edit': btn_Edit();
                         break;
+                    //鎵撳嵃
+                    case 'btn-print':
+                        get_PrintReport();
+                        break;
                     //鍒犻櫎鎸夐挳
                     case 'btn_Delete': btn_Delete();
                         break;
@@ -331,6 +547,21 @@
                         break;
                     //鍙嶅鏍告寜閽�
                     case 'btn_DeAudit': set_CheckBill(2);
+                        break;
+                    //鍙戣捣瀹℃壒
+                    case 'set_startCheckBill': set_startCheckBill();
+                        break;
+                    //鏌ョ湅瀹℃壒杩涘害
+                    case 'get_CheckFlowInfo': get_CheckFlowInfo();
+                        break;
+                    //澶氱骇瀹℃牳
+                    case 'set_CheckBill_Flow': set_CheckBill_Flow(0);
+                        break;
+                    //澶氱骇鍙嶅鏍�
+                    case 'set_AbandonCheck_Flow': set_CheckBill_Flow(1);
+                        break;
+                    //椹冲洖
+                    case 'set_RejectCheck_Flow': set_RejectCheck_Flow();
                         break;
                     //鍏抽棴鎸夐挳        锛�1:鍏抽棴銆�2:鍙嶅叧闂級
                     case 'btn_Close': set_CloseBill(1);
@@ -415,6 +646,33 @@
             }
             //#endregion
 
+            //#region 鎵撳嵃鍔熻兘
+            function get_PrintReport() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                if (checkStatus.data.length === 0) {
+                    return layer.msg('璇烽�夋嫨鏁版嵁鎵撳嵃锛�');
+                }
+                else {
+                    var hmainid = [];
+                    for (var i = 0; i < checkStatus.data.length; i++) {
+                        hmainid.push((data[i].hmainid * (10 ** 8)) + data[i].hsubid)
+                    }
+
+                    layer.open({
+                        type: 2
+                        , area: ['50%', '50%']
+                        , title: '鎵撳嵃妯$増閫夋嫨'
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + hmainid.toString() + '&MyMsg=' + hmainid.toString() + '&Type=HProcPriceRequestBillList', 'yes']
+                        , resize: false
+                    })
+                }
+            }
+            //#endregion
             //#region 鍒犻櫎
             function btn_Delete() {
                 var checkStatus = table.checkStatus('mainTable')
@@ -582,12 +840,157 @@
             }
             //#endregion
 
+
+            //#region 鍙戣捣瀹℃壒
+            function set_startCheckBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    //閫昏緫瀹℃牳鏂规硶
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Pay_ProcPriceRequestBill/StartCheckFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { time: 1 * 1000, 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 });
+                        }
+                    });
+                    //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                    $("#btnSearch").trigger('click');
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+                }
+            }
+            //#endregion
+
+            //#region 鏌ョ湅瀹℃壒杩涘害
+            function get_CheckFlowInfo() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var hID = data[0].hmainid.toString();
+                    layer.open({
+                        type: 2
+                        , area: ['70%', '70%']
+                        , title: '鍗曟嵁瀹℃壒杩涘害'
+                        , closeBtn: 1
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: '../../绯荤粺绠$悊/澶氱骇瀹℃壒/瀹℃壒杩涘害/Xt_CheckFlowProgressList.html?linterid=' + hID + '&HSouceBillType=' + HBillType
+                        , resize: false,
+                        end: function () {
+                            ////淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                            //if (get_needClose_Bar == 0) {
+                            //    $("#btnSearch").trigger('click');
+                            //} else if (get_needClose_Bar == 1) {
+                            //    $("#get_needClose").trigger('click');
+                            //}
+                        }
+                        , cancel: function () {
+
+                        }
+                    })
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹煡鐪嬶紒');
+                }
+            }
+            //#endregion
+
+            //#region 澶氱骇 鍙嶅鏍�/瀹℃牳鏁版嵁
+            function set_CheckBill_Flow(num) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    //閫昏緫瀹℃牳鏂规硶
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Pay_ProcPriceRequestBill/AuditFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"], "CurUserID": sessionStorage["Czybm"] },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { time: 1 * 1000, 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 });
+                        }
+                    });
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+                }
+            }
+            //#endregion
+
+            //#region 椹冲洖
+            function set_RejectCheck_Flow(num) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    //閫昏緫瀹℃牳鏂规硶
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Pay_ProcPriceRequestBill/RejectCheckFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "CurUserID": sessionStorage["Czybm"] },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { time: 1 * 1000, 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 });
+                        }
+                    });
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+                }
+            }
+            //#endregion
+
+
             //#region 鍒楄缃�
             function get_HideColumn() {
                 var colName = "";
                 var contentUrl = "";
                 for (var i = 1; i < option.cols[0].length; i++) {
-                    colName += option.cols[0][i]["title"] + ",";
+                    colName += option.cols[0][i]["field"] + ",";
                 }
                 var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
                 var urlLen = urlStr.split('/');
@@ -596,7 +999,7 @@
                 }
                 colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
 
-                contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+                contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName;
 
                 layer.open({
                     type: 2
@@ -630,9 +1033,15 @@
                 $("#HBeginDate").val(Pub_Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//寮�濮嬫棩鏈�
                 $("#HEndDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));;//缁撴潫鏃ユ湡
                 $("#HBillNo").val("");//鍗曟嵁鍙�
+                $("#ColContent").val("");
                 $("#ColName").val("0");
                 $("#Comparator").val("0");
-                $("#ColContent").val("");
+                $("#ColContent2").val("");
+                $("#ColName2").val("0");
+                $("#Comparator2").val("0");
+                $("#ColContent1").val("");
+                $("#ColName1").val("0");
+                $("#Comparator1").val("0");
                 form.render('select');
                 sWhere = "";
             }
@@ -641,7 +1050,11 @@
 
             //#region 鏌ヨ鎸夐挳
             form.on('submit(btnSearch)', function (data) {
-                get_FastQuery();
+                if (page != 1) {
+                    $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+                } else {
+                    get_FastQuery();
+                }
             });
 
             //蹇�熸煡璇�
@@ -652,6 +1065,13 @@
                 var ColName = $("#ColName").val();//澶嶉�夋
                 var Comparator = $("#Comparator").val()
                 var ColContent = $("#ColContent").val();
+
+                var ColName1 = $("#ColName1").val();//澶嶉�夋
+                var Comparator1 = $("#Comparator1").val()
+                var ColContent1 = $("#ColContent1").val();
+                var ColName2 = $("#ColName2").val();//澶嶉�夋
+                var Comparator2 = $("#Comparator2").val()
+                var ColContent2 = $("#ColContent2").val();
 
                 if (ColName != 0 && Comparator != 0) {
                     var com = "";
@@ -674,6 +1094,48 @@
                     }
                     sWhere += " and " + ColName + " " + com;
                 }
+                if (ColName1 != 0 && Comparator1 != 0) {
+                    var com1 = "";
+                    switch (Comparator1) {
+                        case "7":
+                            com1 = "like'%" + ColContent1 + "%'";
+                            break;
+                        case "8":
+                            com1 = "like'%" + ColContent1 + "'";
+                            break;
+                        case "9":
+                            com1 = "like'" + ColContent1 + "%'";
+                            break;
+                        case "10":
+                            com1 = "not like'%" + ColContent1 + "%'";
+                            break;
+                        default:
+                            com1 = "" + Comparator1 + "'" + ColContent1 + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName1 + " " + com1;
+                }
+                if (ColName2 != 0 && Comparator2 != 0) {
+                    var com2 = "";
+                    switch (Comparator2) {
+                        case "7":
+                            com2 = "like'%" + ColContent2 + "%'";
+                            break;
+                        case "8":
+                            com2 = "like'%" + ColContent2 + "'";
+                            break;
+                        case "9":
+                            com2 = "like'" + ColContent2 + "%'";
+                            break;
+                        case "10":
+                            com2 = "not like'%" + ColContent2 + "%'";
+                            break;
+                        default:
+                            com2 = "" + Comparator + "'" + ColContent + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName2 + " " + com2;
+                }
                 if (HBeginDate) {
                     sWhere += " and 鏃ユ湡 >= '" + HBeginDate + "'";
                 }
@@ -683,7 +1145,7 @@
                 if (HBillNo) {
                     sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
                 }
-                get_Display(sWhere);
+                get_DisplayPage(sWhere);
                 sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
             }
 
@@ -760,16 +1222,103 @@
             }
             //#endregion
 
-            //#region 鑷畾涔夎繃婊や笅鎷夋
+            //#region 鍒嗛〉鏌ヨ
+            function get_DisplayPage(sWhere) {
+                var wait = layer.load();//閬僵
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/Pay_ProcPriceRequestBillController/page',
+                    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 (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 if (data[i].name == '鍗曟嵁鍙�') {//娣诲姞瓒呴摼鎺�
+                                    col.push({
+                                        field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '鍗曟嵁鍙�', templet: function (d) {
+                                            return '<span style="color: blue;">' + d.鍗曟嵁鍙� + '</span>'
+                                        }, style: 'cursor: pointer;'
+                                    });
+                                }
+                                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();
+                            }
+                            //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                        } else {
+                            //option.data = [[]]
+                            //table.render(option);
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 鍒楁槑鏄剧ず涓嬫媺妗�
             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>';
+                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
                     }
                 }
                 $("#ColName").empty();
                 $("#ColName").append(Organization);
+                $("#ColName1").empty();
+                $("#ColName1").append(Organization);
+                $("#ColName2").empty();
+                $("#ColName2").append(Organization);
                 form.render('select');
             }
             //#endregion

--
Gitblit v1.9.1