From be8b558b89a89deb3aa871fc2ddaacb7fb2197bd Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 16 十月 2023 09:25:14 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI

---
 WebTM/views/销售管理/销售订单/Xs_SeOrderBillList.html |  533 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 505 insertions(+), 28 deletions(-)

diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBillList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBillList.html"
index 968eb9f..f3d60ba 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBillList.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBillList.html"
@@ -17,6 +17,9 @@
     <script src="../../../layuiadmin/PubCustom.js"></script>
     <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
 
+    <script src="../../../layuiadmin/soulTable.slim.js"></script>
+    <script src="../../../layuiadmin/HideButton.js"></script>
+
     <style type="text/css">
         input.layui-input.layui-unselect {
             padding-right: 0;
@@ -58,28 +61,61 @@
                                     <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">
+                                    <label class="layui-form-label">鍗曟嵁鍙�</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input" name="HBillno2" id="HBillno2" style="width:190px;">
+                                    </div>
+                                </div>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnResCnz" id="btnReSearch" style="padding:0 5px">閲嶆柊鍚屾</button>
+
                                 <div class="layui-colla-content">
-                                    <div class="layui-inline">
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
                                         <div class="layui-inline">
-                                            <span>鍏朵粬鏉′欢></span>
+                                            <label class="layui-form-label">瀹㈡埛</label>
+                                            <div class="layui-input-block">
+                                                <input type="text" class="layui-input" name="HCusID" id="HCusID" style="width:190px;">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">閮ㄩ棬</label>
+                                            <div class="layui-input-block">
+                                                <input type="text" class="layui-input" name="HDeptID" id="HDeptID" style="width:190px;">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">涓荤</label>
+                                            <div class="layui-input-block">
+                                                <input type="text" class="layui-input" name="HMangerID" id="HMangerID" style="width:190px;">
+                                            </div>
                                         </div>
                                     </div>
-                                    <div class="layui-inline">
-                                        <label class="layui-form-label">瀹㈡埛</label>
-                                        <div class="layui-input-block">
-                                            <input type="text" class="layui-input" name="HCusID" id="HCusID" style="width:190px;">
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+                                                </select>
+                                            </div>
                                         </div>
-                                    </div>
-                                    <div class="layui-inline">
-                                        <label class="layui-form-label">閮ㄩ棬</label>
-                                        <div class="layui-input-block">
-                                            <input type="text" class="layui-input" name="HDeptID" id="HDeptID" style="width:190px;">
+                                        <div class="layui-inline">
+                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" 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>
-                                    <div class="layui-inline">
-                                        <label class="layui-form-label">涓荤</label>
-                                        <div class="layui-input-block">
-                                            <input type="text" class="layui-input" name="HMangerID" id="HMangerID" style="width:190px;">
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
                                         </div>
                                     </div>
                                 </div>
@@ -88,11 +124,20 @@
                         <table class="" id="mainTable" lay-filter="mainTable"></table>
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="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"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" 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" style="display:none;" 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;" 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" style="display:none;" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-print" id="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="HideColumn" id="HideColumn"><i class="layui-icon layui-icon-form"></i>闅愯棌鍒楄缃�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>鍙嶅鏍�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>鍏抽棴</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>鍙嶅叧闂�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_Drop" id="set_Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_DeDrop" id="set_DeDrop"><i class="layui-icon layui-icon-radio"></i>鍙嶄綔搴�</button>
                             </div>
                         </script>
                     </form>
@@ -109,7 +154,7 @@
             base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
         }).extend({
             index: 'lib/index', //涓诲叆鍙fā鍧�
-        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
             var $ = layui.$
                 , admin = layui.admin
                 , layer = layui.layer
@@ -119,14 +164,22 @@
                 , laypage = layui.laypage
                 , laydate = layui.laydate
                 , util = layui.util
+                , soulTable = layui.soulTable
             //鏌ヨ鏉′欢
             var sWhere = "";
             var option = [];
+            var HModName = "Xs_SeOrderBill";
+            var HBillType = "1401";
 
             //鍒濆鍖栫晫闈�
             set_ClearBill();
 
             //#endregion
+
+            //閲嶆柊鍚屾鎸夐挳
+            form.on('submit(btnResCnz)', function (data) {
+                set_ResCnz();
+            });
 
             //#region 閲嶇疆鎸夐挳
             form.on('submit(btnReSearch)', function (data) {
@@ -143,15 +196,17 @@
 
             //#region 鍒濆鍖栫晫闈�
             function set_ClearBill() {
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                 //鍒濆鍖栬〃鏍�
                 set_InitGrid();
                 //鏌ヨ
-                get_Display(sWhere);
+                get_FastQuery();
+                //get_Display(sWhere);
+                DisPlay_HideColumn();
             }
             //#endregion
-            //#region 鍒濆鍖栬〃鏍兼柟娉�
-            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
-            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+            //#region 鍒濆鍖栬〃鏍兼柟娉�           
             function set_InitGrid() {
                 option = {
                     elem: '#mainTable'
@@ -221,6 +276,13 @@
                         , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
 
                     ]]
+                    , done: function () {
+                        soulTable.render(this);
+
+                        //鍒锋柊鎸夐挳鏄剧ず
+                        var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                        Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+                    }
                 };
             }
             //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
@@ -235,6 +297,15 @@
                             option.data = data1.data;
                             table.render(option);
                             layer.close(ajaxLoad);
+
+                            //鍒锋柊鎸夐挳鏄剧ず
+                            var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                            Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
+
+                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                                ColFilter();
+                            }
                         } else {
                             layer.close(ajaxLoad);
                             layer.alert(data1.code + data1.Message, { icon: 5 });
@@ -308,8 +379,8 @@
                             layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
                                 $.ajax({
                                     type: "GET",
-                                    url: GetWEBURL() + "Cg_POInStockBill/DeltetPOInStockBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                                    data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
+                                    url: GetWEBURL() + "Xs_SeOrderBill/DeltetSeOrderBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                                    data: { "HInterID": InterID },
                                     success: function (result) {
                                         if (result.count == 1) {
                                             layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -340,6 +411,37 @@
                     //閫�鍑烘寜閽�
                     case 'get_Exit': Pub_Close(2);
                         break;
+                    //鎵撳嵃
+                    case 'btn-print':
+                        get_PrintReport();
+                        break;
+                    //闅愯棌鍒楄缃�
+                    case 'HideColumn':
+                        get_HideColumn();
+                        break;
+                    //鎸夐挳璁剧疆
+                    case 'set_HideButton':
+                        var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                        get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+                        break;
+                    //瀹℃牳
+                    case 'set_CheckBill': set_CheckBill();
+                        break;
+                    //鍙嶅鏍�
+                    case 'set_AbandonCheck': set_AbandonCheck();
+                        break;
+                    //鍏抽棴
+                    case 'set_CloseBill': set_CloseBill();
+                        break;
+                    //鍙嶅叧闂�
+                    case 'set_CancelCloseBill': set_CancelCloseBill();
+                        break;
+                    //浣滃簾鎸夐挳       
+                    case 'set_Drop': set_DropBill(1);
+                        break;
+                    //鍙嶄綔搴熸寜閽�
+                    case 'set_DeDrop': set_DropBill(2);
+                        break;
                 };
             });
 
@@ -352,6 +454,31 @@
                 var HCusID = $("#HCusID").val();
                 var HDeptID = $("#HDeptID").val();
                 var HMangerID = $("#HMangerID").val();
+                var ColName = $("#ColName").val();//澶嶉�夋
+                var Comparator = $("#Comparator").val()
+                var ColContent = $("#ColContent").val();
+
+                if (ColName != 0 && Comparator != 0) {
+                    var com = "";
+                    switch (Comparator) {
+                        case "7":
+                            com = "like'%" + ColContent + "%'";
+                            break;
+                        case "8":
+                            com = "like'%" + ColContent + "'";
+                            break;
+                        case "9":
+                            com = "like'" + ColContent + "%'";
+                            break;
+                        case "10":
+                            com = "not like'%" + ColContent + "%'";
+                            break;
+                        default:
+                            com = "" + Comparator + "'" + ColContent + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName + " " + com;
+                }
                 if (HDate) {
                     sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HDate + "'";
                 }
@@ -382,7 +509,38 @@
                 $("#HCusID").val("");
                 $("#HDeptID").val("");
                 $("#HMangerID").val("");
+                $("#ColContent").val("");
+                $("#ColName").val("0");
+                $("#Comparator").val("0");
+                form.render('select');
                 sWhere = "";
+            }
+            //閲嶆柊鍚屾鎸夐挳
+            function set_ResCnz() {
+                var HBillno2 = $('#HBillno2').val();
+                $.ajax({
+                    url: GetWEBURL() + '/Xs_SeOrderBill/Xs_SeOrderBillViewApi',
+                    type: "GET",
+                    data: { "BillNo": HBillno2, "BillType": 1401 },
+                    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);
+                                //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                window.location.reload();
+                            });
+
+                        } else {
+                            layer.alert(result.code + result.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(wait);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
             }
             //#endregion
 
@@ -393,6 +551,325 @@
             }
             //#endregion
 
+            //瀹℃牳
+            function set_CheckBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                if (data.length == 1) {
+                    layer.confirm("纭瑕佸鏍稿悧?", function (index) {
+                        var wait = layer.load();
+                        var HInterID = data[0].hmainid;
+                        $.ajax({
+                            url: GetWEBURL() + '/Xs_SeOrderBill/CheckXs_SeOrderBill',
+                            type: "GET",
+                            data: { "HInterID": HInterID, "Type": 1, "user": sessionStorage["HUserName"] },
+                            success: function (result) {
+                                if (result.count == 1) {
+                                    get_FastQuery();
+                                    layer.msg(result.Message, { icon: 1 });
+                                    layer.close(wait);
+                                } else {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                    layer.close(wait);
+                                }
+                            }, error: function () {
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                layer.close(wait);
+                            }
+                        });
+                    })
+                } else {
+                    layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+                }
+            }
+
+            //鍙嶅鏍�
+            function set_AbandonCheck() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                if (data.length == 1) {
+                    layer.confirm("纭瑕佸弽瀹℃牳鍚�?", function (index) {
+                        var wait = layer.load();
+                        var HInterID = data[0].hmainid;
+                        $.ajax({
+                            url: GetWEBURL() + '/Xs_SeOrderBill/CheckXs_SeOrderBill',
+                            type: "GET",
+                            data: { "HInterID": HInterID, "Type": 2, "user": sessionStorage["HUserName"] },
+                            success: function (result) {
+                                if (result.count == 1) {
+                                    get_FastQuery();
+                                    layer.msg(result.Message, { icon: 1 });
+                                    layer.close(wait);
+                                } else {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                    layer.close(wait);
+                                }
+                            }, error: function () {
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                layer.close(wait);
+                            }
+                        });
+                    })
+                } else {
+                    layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+                }
+            }
+
+            //鍏抽棴
+            function set_CloseBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                if (data.length == 1) {
+                    layer.confirm("纭瑕佸叧闂悧?", function (index) {
+                        var wait = layer.load();
+                        var HInterID = data[0].hmainid;
+                        $.ajax({
+                            url: GetWEBURL() + '/Xs_SeOrderBill/CloseXs_SeOrderBill',
+                            type: "GET",
+                            data: { "HInterID": HInterID, "Type": 1, "user": sessionStorage["HUserName"] },
+                            success: function (result) {
+                                if (result.count == 1) {
+                                    layer.msg(result.Message, { icon: 1 });
+                                    layer.close(wait);
+                                } else {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                    layer.close(wait);
+                                }
+                            }, error: function () {
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                layer.close(wait);
+                            }
+                        });
+                    })
+                }
+                else {
+                    layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+                }
+            }
+
+            //鍙嶅叧闂�
+            function set_CancelCloseBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                if (data.length == 1) {
+                    layer.confirm("纭瑕佸弽鍏抽棴鍚�?", function (index) {
+                        var wait = layer.load();
+                        var HInterID = data[0].hmainid;
+                        $.ajax({
+                            url: GetWEBURL() + '/Xs_SeOrderBill/CloseXs_SeOrderBill',
+                            type: "GET",
+                            data: { "HInterID": HInterID, "Type": 2, "user": sessionStorage["HUserName"] },
+                            success: function (result) {
+                                if (result.count == 1) {
+                                    layer.msg(result.Message, { icon: 1 });
+                                    layer.close(wait);
+                                } else {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                    layer.close(wait);
+                                }
+                            }, error: function () {
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                layer.close(wait);
+                            }
+                        });
+                    })
+                }
+                else {
+                    layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+                }
+            }
+
+            //#region 鍙嶄綔搴�/浣滃簾鏁版嵁
+            function set_DropBill(num) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].HInterID.toString();
+                    //閫昏緫瀹℃牳鏂规硶
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Xs_SeOrderBill/CancellXs_SeOrderBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "Type": num, "user": 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 });
+                        }
+                    });
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+                }
+            }
+            //#endregion
+
+            //鎵撳嵃
+            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=HSeOrderBillList', 'yes']
+                        , resize: false
+                    })
+                }
+            }
+
+            //闅愯棌鍒楄缃�
+            function get_HideColumn() {
+                var colName = "";
+                for (var i = 1; i < option.cols[0].length - 1; i++) {
+                    colName += option.cols[0][i]["title"] + ",";
+                }
+
+                colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+                layer.open({
+                    type: 2
+                    , skin: "layui-layer-rim" //鍔犱笂杈规
+                    , title: "闅愯棌鍒楄缃�"  //鏍囬
+                    , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                    , shift: 2 //寮瑰嚭鍔ㄧ敾
+                    , area: ["50%", "90%"] //绐椾綋澶у皬
+                    , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                    , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+                    , btn: ["纭畾", "鍙栨秷"]
+                    , btn1: function (index, laero) {
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                        layer.close(index);//鍏抽棴寮圭獥
+                    }
+                })
+            }
+
+            //鏄剧ず鍒楁暟鎹�
+            function DisPlay_HideColumn() {
+                $.ajax({
+                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                    type: "GET",
+                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+                    success: function (data1) {
+                        if (data1.data.length != 0) {
+
+                            var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+                            var titleData = ["hmainid", "HBillType", "HCusID", "HSSID", "HCurID", "HDeptID", "HManagerID", "HEmpID", "hsubid", "HMaterID","HUnitID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+                            dataCol = data1.data[0].HGridString.split(',');
+
+                            for (var i = 0; i < option.cols[0].length - 2; i++) {
+                                var dataCols = dataCol[i].split('|');
+                                //闅愯棌鍒�
+                                if (dataCols[1] == 1) {
+                                    option.cols[0][i + 1]["hide"] = true;
+                                }
+                                //璁剧疆鍐呭瀛椾綋澶у皬
+                                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[3] > 0) {
+                                    option.cols[0][i + 1]["width"] = dataCols[3];
+                                }
+                                //鏄剧ず鍒�
+                                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);
+
+                            //鍒锋柊鎸夐挳鏄剧ず
+                            var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                            Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+                        } else {
+                            table.render(option);
+
+                            //鍒锋柊鎸夐挳鏄剧ず
+                            var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                            Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                })
+            }
+
+            //鍒楁槑鏄剧ず涓嬫媺妗�
+            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>';
+                    }
+                }
+                $("#ColName").empty();
+                $("#ColName").append(Organization);
+                form.render('select');
+            }
+
 
             //浠ヤ笂鏄痩ayui妯″潡
         });

--
Gitblit v1.9.1