From d6db3fa707f470fd8a6160c6daf6bcea75b8a6ce Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 06 六月 2024 15:18:45 +0800
Subject: [PATCH] 上下模单优化

---
 WebTM/views/应收管理/报表分析/Kf_SellOutEntryReport.html |   79 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 74 insertions(+), 5 deletions(-)

diff --git "a/WebTM/views/\345\272\224\346\224\266\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/Kf_SellOutEntryReport.html" "b/WebTM/views/\345\272\224\346\224\266\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/Kf_SellOutEntryReport.html"
index 8743b9d..52ebfcc 100644
--- "a/WebTM/views/\345\272\224\346\224\266\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/Kf_SellOutEntryReport.html"
+++ "b/WebTM/views/\345\272\224\346\224\266\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/Kf_SellOutEntryReport.html"
@@ -164,9 +164,15 @@
                             <div class="layui-btn-container">
                                 <button type="button" class="layui-btn layui-btn-sm" 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" 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" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export_normal" id="get_export_normal"><i class="layui-icon layui-icon-export"></i>瀵煎嚭(甯歌)</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭(鐗规畩)</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
+                            </div>
+                        </script>
+                        <script type="text/html" id="toolbarDemo1">
+                            <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export_normal" id="get_export_normal"><i class="layui-icon layui-icon-export"></i>瀵煎嚭(甯歌)</button>
                             </div>
                         </script>
                     </form>
@@ -201,6 +207,10 @@
             var option_Bak = {};
             var option1_Bak = {};
             var sWhere_Bak = "";
+
+
+            var ins1;
+            var ins2;
             //#endregion
 
             //#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -224,6 +234,10 @@
                     case 'get_export':
                         get_Export();
                         break;
+                    //瀵煎嚭excel
+                    case 'get_export_normal':
+                        get_Export_Normal();
+                        break;
                     //鍒楄缃�
                     case 'set_HideColumn': get_HideColumn();
                         break;
@@ -232,6 +246,17 @@
                         var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
                         var HBillType = "Kf_SellOutEntryReport";
                         get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+                        break;
+                };
+            });
+            //#endregion
+
+            //#region 澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable1)', function (obj) {
+                switch (obj.event) {
+                    //瀵煎嚭excel
+                    case 'get_export_normal':
+                        get_Export1_Normal();
                         break;
                 };
             });
@@ -319,7 +344,7 @@
 
                 option1 = {
                     elem: '#mainTable1'
-                    //, toolbar: '#toolbarDemo'
+                    , toolbar: '#toolbarDemo1'
                     , height: 'full-50'
                     , page: true
                     , totalRow: true
@@ -470,8 +495,8 @@
                             option1.data = result1;
 
                             //娓叉煋琛�1銆佽〃2
-                            table.render(option);
-                            table.render(option1);
+                            ins1 = table.render(option);
+                            ins2 = table.render(option1);
                             DisPlay_HideColumn();
 
                             HPieceQtyTotalSum = HPieceQtySum + HPieceQtySum_YM;
@@ -568,7 +593,7 @@
                     sWhere += " and CONVERT(varchar(100),鏃ユ湡, 120) <= ''" + HDate1 + "''";
                 }
                 if (HCusName) {
-                    sWhere += " and 瀹㈡埛 like ''%" + HCusName + "%''";
+                    sWhere += " and 璐揣鍗曚綅 like ''%" + HCusName + "%''";
                 }
                 if (HEmpName) {
                     sWhere += " and 涓氬姟鍛� like ''%" + HEmpName + "%''";
@@ -646,6 +671,50 @@
             }
             //#endregion
 
+            //#region 甯歌瀵煎嚭Execel
+            function get_Export_Normal() {
+                var ModRightNameCheck = "Kf_SellOutEntryReport_ExportExcel";
+
+               //閫昏緫瀹℃牳鏂规硶
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        if (result.count == 1) {
+                            table.exportFile(ins1.config.id, option.data, "xls");
+                        } else {
+                            layer.alert("褰撳墠妯″潡娌℃湁瀵煎嚭鏉冮檺!", { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 甯歌瀵煎嚭Execel
+            function get_Export1_Normal() {
+                var ModRightNameCheck = "Kf_SellOutEntryReport_ExportExcel";
+
+                //閫昏緫瀹℃牳鏂规硶
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        if (result.count == 1) {
+                            table.exportFile(ins2.config.id, option1.data, "xls");
+                        } else {
+                            layer.alert("褰撳墠妯″潡娌℃湁瀵煎嚭鏉冮檺!", { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
             //#region 闅愯棌鍒楄缃�
             function get_HideColumn() {
                 var colName = "";

--
Gitblit v1.9.1