| | |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '申请时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | {title: '申请时间', field: 'withdrawalTime', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.insertTime != '' && row.insertTime != null) { |
| | | var time = row.insertTime.replace(" ",'<br>'); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.insertTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] |
| | | if(row.withdrawalTime != '' && row.withdrawalTime != null) { |
| | | var time = row.withdrawalTime.replace(" ",'<br>'); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.withdrawalTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '提现人', field: 'name', visible: true, align: 'center', valign: 'middle', |
| | | {title: '提现人', field: 'userName', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.name != '' && row.name != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.name + '" onfocus="TUser.tooltip()">' + row.name + '</p>'] |
| | | if(row.userName != '' && row.userName != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.userName + '" onfocus="TUser.tooltip()">' + row.userName + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | |
| | | {title: '账户余额', field: 'balance', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.money != '' && row.money != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.money + '" onfocus="TUser.tooltip()">' + row.money + '</p>'] |
| | | if(row.balance != '' && row.balance != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.balance + '" onfocus="TUser.tooltip()">' + row.balance + '</p>'] |
| | | }else if (row.withdrawalType == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="0" onfocus="TUser.tooltip()">0</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '提现金额', field: 'money', visible: true, align: 'center', valign: 'middle', |
| | | {title: '提现金额', field: 'withdrawalMoney', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.money != '' && row.money != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.money + '" onfocus="TUser.tooltip()">' + row.money + '</p>'] |
| | | if(row.withdrawalMoney != '' && row.withdrawalMoney != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.withdrawalMoney + '" onfocus="TUser.tooltip()">' + row.withdrawalMoney + '</p>'] |
| | | }else if (row.withdrawalType == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="0" onfocus="TUser.tooltip()">0</p>'] |
| | | } |
| | |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.state != '' && row.state != null) { |
| | | if(row.state == 1){ |
| | | if(row.status != '' && row.status != null) { |
| | | if(row.status == 1){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="待处理" onfocus="TUser.tooltip()">待处理</p>'] |
| | | }else if (row.state == 2){ |
| | | }else if (row.status == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已同意" onfocus="TUser.tooltip()">已同意</p>'] |
| | | }else if (row.state == 3){ |
| | | }else if (row.status == 3){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已拒绝" onfocus="TUser.tooltip()">已拒绝</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | { |
| | | title: '操作', visible: true, align: 'center', valign: 'middle', formatter: function (value, row, index) { |
| | | return '<button type="button" class="btn btn-primary button-margin" onclick="TPubWithdrawal.immediately1(' + row.id + ')" id=""><i class="fa fa-search"></i> 详情</button>'; } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 导出 |
| | | */ |
| | | TPubWithdrawal.export = function () { |
| | | window.location.href=Feng.ctxPath + "/withdrawal/excel?insertTime="+$("#insertTime").val()+ |
| | | "&driverName="+$("#name").val()+ |
| | | "&status="+$("#status").val(); |
| | | }; |
| | | /** |
| | | * 查看更多按钮 |
| | | * @param con |
| | |
| | | */ |
| | | TPubWithdrawal.immediately = function () { |
| | | if (this.check()) { |
| | | var state = TPubWithdrawal.seItem.state; |
| | | var state = TPubWithdrawal.seItem.status; |
| | | if (1 != state){ |
| | | swal("操作失败", "【待处理】状态下才能执行此操作", "warning"); |
| | | return; |
| | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '立即处理', |
| | | area: ['800px', '420px'], //宽高 |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tPubWithdrawal/tPubWithdrawal_immediately/' + TPubWithdrawal.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TPubWithdrawal.immediately1 = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '查看详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tPubWithdrawal/tPubWithdrawal_immediately/' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | |
| | | var queryData = {}; |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['withdrawalType'] = $("#withdrawalType").val(); |
| | | queryData['status'] = $("#status").val(); |
| | | TPubWithdrawal.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TPubWithdrawal.resetSearch = function () { |
| | | $("#insertTime").val(""); |
| | | $("#name").val(""); |
| | | $("#withdrawalType").val(""); |
| | | $("#status").val(""); |
| | | TPubWithdrawal.search(); |
| | | }; |
| | | |