From 1cb49b04ae6709e6054c328f5ed12bff9ca014c8 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期二, 12 十一月 2024 09:21:57 +0800
Subject: [PATCH] no message

---
 CoreCms.Net.Web.Admin/wwwroot/views/corecmsplanorder/index.html |   78 +++++++++++++++++++++++++++++++++++----
 1 files changed, 70 insertions(+), 8 deletions(-)

diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/corecmsplanorder/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/corecmsplanorder/index.html
index d80091b..07900f9 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/corecmsplanorder/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/corecmsplanorder/index.html
@@ -147,6 +147,7 @@
             <div class="layui-inline">
                 <button class="layui-btn layui-btn-sm" lay-submit lay-filter="LAY-app-CoreCmsPlanOrder-search"><i class="layui-icon layui-icon-search"></i>绛涢��</button>
                 <button class="layui-btn layui-btn-sm" lay-submit lay-filter="LAY-app-doBatchDelete"><i class="layui-icon layui-icon-add-circle"></i>鎵归噺閿佸崟</button>
+                <button class="layui-btn layui-btn-sm" lay-submit lay-filter="LAY-app-selectchakan"><i class="layui-icon layui-icon-add-circle"></i>鎵归噺鏌ョ湅</button>
                 <button type="button" class="layui-btn layui-btn-sm" id="upIndexPopupWindowImageUrlBtn">涓婁紶璁″垝璁㈠崟</button>
                 <button class="layui-btn layui-btn-sm" lay-submit lay-filter="LAY-app-selectExportExcel"><i class="layui-icon layui-icon-add-circle"></i>閫夋嫨瀵煎嚭</button>
                 <button class="layui-btn layui-btn-sm" lay-submit lay-filter="LAY-app-queryExportExcel"><i class="layui-icon layui-icon-download-circle"></i>鏌ヨ瀵煎嚭</button>
@@ -228,6 +229,14 @@
                         var checkStatus = table.checkStatus("LAY-app-CoreCmsPlanOrder-tableBox");
                         doSelectExportExcel(checkStatus);
                     });
+
+                //鐩戝惉鎼滅储
+                form.on('submit(LAY-app-selectchakan)',
+                    function (data) {
+                        var checkStatus = table.checkStatus("LAY-app-CoreCmsPlanOrder-tableBox");
+                        doSelectselectchakan(checkStatus);
+                    });
+
                 //鐩戝惉鎼滅储
                 form.on('submit(LAY-app-doBatchDelete)',
                     function (data) {
@@ -297,28 +306,42 @@
                     text: {none: '鏆傛棤鐩稿叧鏁版嵁'},
                     cols: [
                         [
-                            { type: "checkbox", fixed: "left" },
+                            { type: "checkbox" },
+                            { field: 'zizeng', width: 50, title: '搴忓彿', type: 'numbers' },
 						    { field: 'orderId', title: '璁㈠崟鍙�', sort: false,width: 135 },
                             { field: 'shi', title: '甯�', sort: false, width: 50 },
                             { field: 'quxian', title: '鍖哄幙', sort: false, width: 50 },
-                            { field: 'pianqu', title: '鐗囧尯', sort: false, width: 115 }, 
+                            { field: 'pianqu', title: '鐗囧尯', sort: false, width: 65 }, 
 						 /*   { field: 'userId', title: '鐢ㄦ埛ID 鍏宠仈user.id', sort: false,width: 105 },*/
                             { field: 'shipAddress', title: '瀛︽牎', sort: false, width: 135 },
 						    { field: 'shipName', title: '鑱旂郴浜�', sort: false,width: 55 },
                             { field: 'shipMobile', title: '鑱旂郴鐢佃瘽', sort: false, width: 115 },
-                            { field: 'shouhuoAddress', title: '鏀惰揣鍦板潃', sort: false, width: 265 },
+                            { field: 'shouhuoAddress', title: '鏀惰揣鍦板潃', sort: false, width: 165 },
                             { field: 'oldOrderAmount', title: '璁″垝閲戦', sort: false, width: 75 },
                             { field: 'orderAmount', title: '璋冩暣閲戦', sort: false, width: 75 },
-                            { field: 'keYongAmount', title: '鍙敤浣欓', sort: false, width: 75 },
+                            { field: 'keYongAmount', title: '鍙敤浣欓', sort: false, width: 65 },
                             { field: 'createTime', title: '寤虹珛鏃堕棿', width: 95, sort: false},
                             { field: 'upDataTime', title: '淇敼鏃堕棿', width: 95, sort: false},
 						    //{ field: 'createBy', title: '鍒涘缓浜�', sort: false,width: 105 },
 						    //{ field: 'upDataBy', title: '淇敼浜�', sort: false,width: 105 },
                             //{ field: 'isdelete', title: '鍒犻櫎鏍囧織', width: 95, templet: '#switch_isdelete', sort: false , unresize: true},
-                            { field: 'statusText', title: '璁㈠崟鐘舵��', sort: false, width: 65 },
-                            { width: 222, align: 'center', title:'鎿嶄綔', fixed: 'right', toolbar: '#LAY-app-CoreCmsPlanOrder-tableBox-bar' }
+                            { field: 'statusText', title: '璁㈠崟鐘舵��', sort: false, width: 55 },
+                            { width: 222, align: 'center', title:'鎿嶄綔', toolbar: '#LAY-app-CoreCmsPlanOrder-tableBox-bar' }
                         ]
-                    ]
+                    ], done: function (res, curr, count) {
+
+                        console.log(res);
+                        // 鍒涘缓鍚堣琛岀殑HTML
+                        var totalRowHtml = '<tr class="layui-table-total" style="background-color: #f2f2f2; font-weight: bold;">\
+    <td></td><td></td><td colspan="8">褰撻〉鍚堣</td><td>&nbsp;&nbsp;&nbsp;'+ res.otherData.heji1 + '</td><td>&nbsp;&nbsp;&nbsp;' + res.otherData.heji2 + '</td><td>&nbsp;&nbsp;&nbsp;' + res.otherData.heji3 + '</td><td></td><td></td><td></td><td></td>\
+  </tr>\
+  <tr class="layui-table-total" style="background-color: #e9e9e9; font-weight: bold;">\
+    <td></td><td></td><td colspan="8">鎬诲悎璁�</td><td>&nbsp;&nbsp;&nbsp;'+ res.otherData.heji4 + '</td><td>&nbsp;&nbsp;&nbsp;' + res.otherData.heji5 + '</td><td>&nbsp;&nbsp;&nbsp;' + res.otherData.heji6 + '</td><td></td><td></td><td></td><td></td>\
+  </tr>';
+
+                        // 灏嗗悎璁¤娣诲姞鍒拌〃鏍煎簳閮�
+                        $('#LAY-app-CoreCmsPlanOrder-tableBox').next().find('.layui-table-body tbody').append(totalRowHtml);
+                    }
                 });
                 //鐩戝惉鎺掑簭浜嬩欢
                 table.on('sort(LAY-app-CoreCmsPlanOrder-tableBox)', function(obj){
@@ -496,6 +519,10 @@
                 }
                 //鎵ц鍗曚釜鍒犻櫎
                 function doDelete(obj) {
+                    if (obj.data.status == 2) {
+                        layer.msg("宸茬粡閿佸崟锛�");
+                        return;
+                    }
                     layer.confirm('纭畾閿佸崟鍚楋紵',
                         function (index) {
                             coreHelper.Post("Api/CoreCmsPlanOrder/DoDelete", { id: obj.data.orderId }, function (e) {
@@ -577,7 +604,42 @@
                                     }
                                 });
                         });
-			    }
+                }
+
+
+                //鎵ц閫夋嫨鐩綍瀵煎嚭鏁版嵁
+                function doSelectselectchakan(checkStatus) {
+                    var checkData = checkStatus.data;
+                    if (checkData.length === 0) {
+                        return layer.msg('璇烽�夋嫨鎮ㄨ鏌ョ湅鐨勬暟鎹�');
+                    }
+                    var delidsStr = [];
+                    layui.each(checkData,
+                        function (index, item) {
+                            delidsStr.push(item.orderId);
+                        });
+
+                    coreHelper.Post("Api/CoreCmsPlanOrder/Selectselectchakan", { id: delidsStr }, function (e) {
+                        if (e.code === 0) {
+                            admin.popup({
+                                shadeClose: false,
+                                title: '鏌ョ湅璇︽儏',
+                                area: ['1200px', '90%'],
+                                id: 'LAY-popup-CoreCmsPlanOrder-details',
+                                success: function (layero, index) {
+                                    view(this.id).render('CoreCmsPlanOrder/Selectselectchakan', { data: e.data }).done(function () {
+                                        form.render();
+                                    });
+                                    // 绂佹寮圭獥鍑虹幇婊氬姩鏉�
+                                    /*   $(layero).children('.layui-layer-content').css('overflow', 'visible');*/
+                                }
+                            });
+                        } else {
+                            layer.msg(e.msg);
+                        }
+                    });                   
+                }
+
                 //鎵ц閫夋嫨鐩綍瀵煎嚭鏁版嵁
                 function doSelectExportExcel(checkStatus){
                     var checkData = checkStatus.data;

--
Gitblit v1.9.1