| | |
| | | <div class="layui-card-body febs-table-full"> |
| | | <form class="layui-form layui-table-form" lay-filter="user-table-form"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> |
| | | <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="add"> |
| | | 新增 |
| | | |
| | | <div class="layui-col-md10"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">登录账户:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="登录账户" name="accountLogin" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> |
| | | <!-- <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="add">--> |
| | | <!-- 新增--> |
| | | <!-- </div>--> |
| | | <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain table-action" id="query"> |
| | | <i class="layui-icon"></i> |
| | | </div> |
| | |
| | | </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) { }} |
| | |
| | | <a lay-event="edit" shiro:hasPermission="user:update"><i |
| | | class="layui-icon febs-edit-area febs-blue"></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"> |
| | | // 引入组件并初始化 |
| | |
| | | table.on('tool(buyTable)', function (obj) { |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | if (layEvent === 'productNFTUpdate') { |
| | | febs.modal.open('编辑', 'modules/news/productNFTUpdate/' + data.id, { |
| | | if (layEvent === 'productSellPick') { |
| | | febs.modal.open('编辑', 'modules/news/productSellPick/' + data.id, { |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#nftInfo-update').find('#submit').trigger('click'); |
| | | $('#product-sell-pick').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | 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 () { |
| | |
| | | cols: [[ |
| | | {field: 'accountLogin', title: '登录账户', minWidth: 120,align:'center'}, |
| | | {field: 'nftTotal', title: '预约额度', minWidth: 120,align:'center'}, |
| | | {field: 'nftAva', title: '已分配', minWidth: 120,align:'center'}, |
| | | {field: 'nftAva', title: '可分配', minWidth: 120,align:'center'}, |
| | | {field: 'orderTime', title: '匹配时间', minWidth: 120,align:'center'}, |
| | | {templet: '#isBuyState', title: '预约状态', minWidth: 120,align:'center'}, |
| | | {templet: '#isBuyMateState', title: '匹配状态', minWidth: 120,align:'center'}, |
| | | {title: '操作', |
| | | templet: function (d) { |
| | | if(d.state == 1){ |
| | | return '' |
| | | 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 '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="productNFTUpdate" shiro:hasPermission="user:update">编辑</button>' |
| | | +'<button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delNFT" shiro:hasPermission="user:update">删除</button>' |
| | | 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'} |
| | | ]] |
| | |
| | | // 获取查询参数 |
| | | function getQueryParams() { |
| | | return { |
| | | accountLogin: $searchForm.find('input[name="accountLogin"]').val().trim(), |
| | | }; |
| | | } |
| | | |