From 6b17ba066e9b3b2690abd04308767fdc9453195a Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Fri, 24 Nov 2023 15:01:15 +0800
Subject: [PATCH] 匹配

---
 src/main/resources/templates/febs/views/modules/news/productBuyList.html |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 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 b124c77..122126a 100644
--- a/src/main/resources/templates/febs/views/modules/news/productBuyList.html
+++ b/src/main/resources/templates/febs/views/modules/news/productBuyList.html
@@ -177,6 +177,46 @@
                 ]]
             });
         }
+        // 单击父表表格中的某一行
+        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