From c3ed9a07b0765834136afb6400d350d895584b51 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Mon, 01 Jul 2024 14:03:23 +0800
Subject: [PATCH] 后台

---
 src/main/resources/templates/febs/views/modules/news/productBuyList.html |  102 +++++++++++++++++++++++++++++----------------------
 1 files changed, 58 insertions(+), 44 deletions(-)

diff --git a/src/main/resources/templates/febs/views/modules/news/productBuyList.html b/src/main/resources/templates/febs/views/modules/news/productBuyList.html
index 122126a..257b4b4 100644
--- a/src/main/resources/templates/febs/views/modules/news/productBuyList.html
+++ b/src/main/resources/templates/febs/views/modules/news/productBuyList.html
@@ -57,9 +57,9 @@
 </script>
 <script type="text/html" id="isBuyMateState">
     {{# if(d.mateState === 0) { }}
-    <span class="layui-badge febs-bg-red">失败</span>
+    <span class="layui-badge febs-bg-red">未转换</span>
     {{# } else if(d.mateState === 1) { }}
-    <span class="layui-badge febs-bg-blue">匹配中</span>
+    <span class="layui-badge febs-bg-blue">已转换</span>
     {{# } else if(d.mateState === 2) { }}
     <span class="layui-badge febs-bg-orange">待支付</span>
     {{# } else if(d.mateState === 3) { }}
@@ -79,6 +79,17 @@
     <a lay-event="edit" shiro:hasPermission="user:update"><i
             class="layui-icon febs-edit-area febs-blue">&#xe7a5;</i></a>
 </script>
+<style>
+    .layui-form-onswitch {
+        background-color: #5FB878 !important;
+    }
+    .thead {background-color: rgba(255, 175, 16,0.2);text-align: center;}
+    .tbody {
+        background-color: rgba(255, 175, 16, 0.1);
+        text-align: center;
+        width:100px;
+    }
+</style>
 <!-- 表格操作栏 end -->
 <script data-th-inline="none" type="text/javascript">
     // 引入组件并初始化
@@ -114,6 +125,46 @@
                         layer.closeAll();
                     }
                 });
+            }
+            if (layEvent === 'productSellShow') {
+                $('.thead').remove();
+                $('.tbody').remove();
+                // 展示子表数据
+                if(data.mallProductBuyRecords.length > 0) {
+                    // 单击行显示出的表格的表体
+                    for(var i = data.mallProductBuyRecords.length-1;i >=0;i--) {
+                        var html = '<tr class="tbody">' +
+                            '<td>'+data.mallProductBuyRecords[i].accountLogin+'</td>\n' +
+                            '<td>'+data.mallProductBuyRecords[i].pickNftCnt+'</td>\n' +
+                            '<td>'+data.mallProductBuyRecords[i].orderTime+'</td>\n' +
+                            // '<td>'+data.mallProductBuyRecords[i].payTime+'</td>\n' +
+                            '<td><img src="'+data.mallProductBuyRecords[i].nftImg+'" alt="" ></td>\n' +
+                            '<td>'+data.mallProductBuyRecords[i].type+'</td>\n' +
+                            '<td>'+data.mallProductBuyRecords[i].state+'</td>\n' +
+                            '<td>'+data.mallProductBuyRecords[i].state+'</td>\n' +
+                            '<td>'+data.mallProductBuyRecords[i].state+'</td>\n' +
+                            '</tr>';
+                        obj.tr.after(html);
+                    }
+                    // 单击行显示出的表格的表头
+                    var html = '<tr class="thead">\n' +
+                        '      <td>匹配用户</td>\n' +
+                        '      <td>支付金额</td>\n' +
+                        '      <td>匹配时间</td>\n' +
+                        // '      <td>支付时间</td>\n' +
+                        '      <td>支付凭证</td>\n' +
+                        '      <td>支付类型</td>\n' +
+                        '      <td>支付状态</td>\n' +
+                        '      <td>支付状态</td>\n' +
+                        '      <td>操作</td>\n' +
+                        '    </tr>';
+                    obj.tr.after(html);
+                }
+            }
+            if (layEvent === 'productSellHide') {
+                // 实现手风琴效果
+                $('.thead').remove();
+                $('.tbody').remove();
             }
             if (layEvent === 'delNFT') {
                 febs.modal.confirm('删除', '确认删除?', function () {
@@ -168,55 +219,18 @@
                     {templet: '#isBuyMateState', title: '匹配状态', minWidth: 120,align:'center'},
                     {title: '操作',
                         templet: function (d) {
-                        if(d.mateState == 1){
+                        if(d.state == 1){
                             return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="productSellPick" shiro:hasPermission="user:update">手动匹配</button>'
+                                +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="productSellShow" shiro:hasPermission="user:update">显示卖单</button>'
+                                +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="productSellHide" shiro:hasPermission="user:update">隐藏卖单</button>'
                         }else{
-                            return ''
+                            return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="productSellShow" shiro:hasPermission="user:update">显示卖单</button>'
+                                +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="productSellHide" shiro:hasPermission="user:update">隐藏卖单</button>'
                         }
                         },minWidth: 300,align:'center'}
                 ]]
             });
         }
-        // 单击父表表格中的某一行
-        table.on('row(buyTable)',function (obj) {
-            //得到当前行元素数据
-            var data = obj.data;
-            if(true) {
-                // 实现手风琴效果
-                $('.thead').remove();
-                $('.tbody').remove();
-            }
-            // 展示子表数据
-            if(data.mallProductBuyRecords.length > 0) {
-                // 单击行显示出的表格的表体
-                for(var i = data.mallProductBuyRecords.length-1;i >=0;i--) {
-                    var html = '<tr class="tbody">' +
-                        '<td></td>\n' +
-                        '<td>'+data.mallProductBuyRecords[i].accountLogin+'</td>\n' +
-                        '<td>'+data.mallProductBuyRecords[i].pickNftCnt+'</td>\n' +
-                        '<td>'+data.mallProductBuyRecords[i].orderTime+'</td>\n' +
-                        '<td>'+data.mallProductBuyRecords[i].payTime+'</td>\n' +
-                        '<td>'+data.mallProductBuyRecords[i].nftImg+'</td>\n' +
-                        '<td>'+data.mallProductBuyRecords[i].type+'</td>\n' +
-                        '<td>'+data.mallProductBuyRecords[i].state+'</td>\n' +
-                        '</tr>';
-                    obj.tr.after(html);
-                }
-
-                // 单击行显示出的表格的表头
-                var html = '<tr class="thead">\n' +
-                    '      <td></td>\n' +
-                    '      <td>匹配用户</td>\n' +
-                    '      <td>支付金额</td>\n' +
-                    '      <td>匹配时间</td>\n' +
-                    '      <td>支付时间</td>\n' +
-                    '      <td>支付凭证</td>\n' +
-                    '      <td>支付类型</td>\n' +
-                    '      <td>支付状态</td>\n' +
-                    '    </tr>';
-                obj.tr.after(html);
-            }
-        });
 
         // 获取查询参数
         function getQueryParams() {

--
Gitblit v1.9.1