KKSU
2024-07-01 c3ed9a07b0765834136afb6400d350d895584b51
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,10 +219,13 @@
                    {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'}
                ]]