/**
|
* 提现列表管理初始化
|
*/
|
var TPubWithdrawal = {
|
id: "TPubWithdrawalTable", //表格id
|
seItem: null, //选中的条目
|
table: null,
|
layerIndex: -1
|
};
|
|
/**
|
* 初始化表格的列
|
*/
|
TPubWithdrawal.initColumn = function () {
|
return [
|
{field: 'selectItem', radio: true},
|
{title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
|
{title: '时间', field: 'insertTime', align: 'center', valign: 'middle'},
|
{title: '订单', field: '', visible: true, align: 'center', valign: 'middle',width:'10%',
|
formatter: function (value, row) {
|
let list = row.list;
|
let str = '';
|
for(let i in list){
|
let orderType = typeof list[i].orderType == "undefined" ? "-" : list[i].orderType;
|
if(parseInt(i) == 0){
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;">' + orderType + '</div>'
|
}else{
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;border-top: 1px solid #ddd">' + orderType + '</div>'
|
}
|
}
|
return str;
|
}
|
},
|
{title: '收益类型', field: 'name', visible: true, align: 'center', valign: 'middle',
|
formatter: function (value, row) {
|
let list = row.list;
|
let str = '';
|
for(let i in list){
|
let type = typeof list[i].type == "undefined" ? "-" : list[i].type;
|
if(parseInt(i) == 0){
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;">' + type + '</div>'
|
}else{
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;border-top: 1px solid #ddd">' + type + '</div>'
|
}
|
}
|
return str;
|
}
|
},
|
{title: '用户名称', field: 'withdrawalType', visible: true, align: 'center', valign: 'middle',
|
formatter: function (value, row) {
|
let list = row.list;
|
let str = '';
|
for(let i in list){
|
let userName = typeof list[i].userName == "undefined" ? "-" : list[i].userName;
|
if(parseInt(i) == 0){
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;">' + userName + '</div>'
|
}else{
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;border-top: 1px solid #ddd">' + userName + '</div>'
|
}
|
}
|
return str;
|
}
|
},
|
{title: '用户手机号', field: 'balance', visible: true, align: 'center', valign: 'middle',
|
formatter: function (value, row) {
|
let list = row.list;
|
let str = '';
|
for(let i in list){
|
let userPhone = typeof list[i].userPhone == "undefined" ? "-" : list[i].userPhone;
|
if(parseInt(i) == 0){
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;">' + userPhone + '</div>'
|
}else{
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;border-top: 1px solid #ddd">' + userPhone + '</div>'
|
}
|
}
|
return str;
|
}
|
},
|
{title: '订单支付金额', field: 'money', visible: true, align: 'center', valign: 'middle',
|
formatter: function (value, row) {
|
let list = row.list;
|
let str = '';
|
for(let i in list){
|
let orderPayMoney = typeof list[i].orderPayMoney == "undefined" ? "-" : list[i].orderPayMoney;
|
if(parseInt(i) == 0){
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;">' + orderPayMoney + '</div>'
|
}else{
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;border-top: 1px solid #ddd">' + orderPayMoney + '</div>'
|
}
|
}
|
return str;
|
}
|
},
|
{title: '平台订单收益', field: '', visible: true, align: 'center', valign: 'middle',
|
formatter: function (value, row) {
|
let list = row.list;
|
let str = '';
|
for(let i in list){
|
let orderRevenue = typeof list[i].orderRevenue == "undefined" ? "-" : list[i].orderRevenue;
|
if(parseInt(i) == 0){
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;">' + orderRevenue + '</div>'
|
}else{
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;border-top: 1px solid #ddd">' + orderRevenue + '</div>'
|
}
|
}
|
return str;
|
}
|
},
|
{title: '打车卡收益', field: 'realGetMoney', visible: true, align: 'center', valign: 'middle',
|
formatter: function (value, row) {
|
let list = row.list;
|
let str = '';
|
for(let i in list){
|
let taxiCardRevenue = typeof list[i].taxiCardRevenue == "undefined" ? "-" : list[i].taxiCardRevenue;
|
if(parseInt(i) == 0){
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;">' + taxiCardRevenue + '</div>'
|
}else{
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;border-top: 1px solid #ddd">' + taxiCardRevenue + '</div>'
|
}
|
}
|
return str;
|
}
|
},
|
{title: '超时扣款收益', field: 'userName', visible: true, align: 'center', valign: 'middle',
|
formatter: function (value, row) {
|
let list = row.list;
|
let str = '';
|
for(let i in list){
|
let overtimeDeduction = typeof list[i].overtimeDeduction == "undefined" ? "-" : list[i].overtimeDeduction;
|
if(parseInt(i) == 0){
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;">' + overtimeDeduction + '</div>'
|
}else{
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;border-top: 1px solid #ddd">' + overtimeDeduction + '</div>'
|
}
|
}
|
return str;
|
}
|
},
|
{title: '司机投诉扣款平台收益', field: 'userPhone', visible: true, align: 'center', valign: 'middle',
|
formatter: function (value, row) {
|
let list = row.list;
|
let str = '';
|
for(let i in list){
|
let complaintDeductionProceeds = typeof list[i].complaintDeductionProceeds == "undefined" ? "-" : list[i].complaintDeductionProceeds;
|
if(parseInt(i) == 0){
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;">' + complaintDeductionProceeds + '</div>'
|
}else{
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;border-top: 1px solid #ddd">' + complaintDeductionProceeds + '</div>'
|
}
|
}
|
return str;
|
}
|
},
|
{title: '其他收入', field: 'remark', visible: true, align: 'center', valign: 'middle',
|
formatter: function (value, row) {
|
let list = row.list;
|
let str = '';
|
for(let i in list){
|
let other = typeof list[i].other == "undefined" ? "-" : list[i].other;
|
if(parseInt(i) == 0){
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;">' + other + '</div>'
|
}else{
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;border-top: 1px solid #ddd">' + other + '</div>'
|
}
|
}
|
return str;
|
}
|
},
|
{title: '收入合计', field: 'state', visible: true, align: 'center', valign: 'middle',
|
formatter: function (value, row) {
|
let list = row.list;
|
let str = '';
|
for(let i in list){
|
let all = list[i].orderRevenue + list[i].taxiCardRevenue + list[i].overtimeDeduction + list[i].complaintDeductionProceeds + list[i].other;
|
all = parseFloat(all).toFixed(2);
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;border-top: 1px solid #ddd">' + all + '</div>'
|
}
|
return str;
|
}
|
}
|
];
|
};
|
|
|
|
/**
|
* 检查是否选中
|
*/
|
TPubWithdrawal.check = function () {
|
var selected = $('#' + this.id).bootstrapTable('getSelections');
|
if(selected.length == 0){
|
Feng.info("请先选中表格中的某一记录!");
|
return false;
|
}else{
|
TPubWithdrawal.seItem = selected[0];
|
return true;
|
}
|
};
|
|
|
|
TPubWithdrawal.excel = function(){
|
window.location.href = Feng.ctxPath + "/incomeDetail/exportSummaryOfIncomeDetails?insertTime=" + $("#insertTime").val();
|
}
|
|
|
/**
|
* 查询提现列表列表
|
*/
|
TPubWithdrawal.search = function () {
|
var queryData = {};
|
queryData['insertTime'] = $("#insertTime").val();
|
TPubWithdrawal.table.refresh({query: queryData});
|
};
|
|
TPubWithdrawal.resetSearch = function () {
|
$("#insertTime").val("");
|
TPubWithdrawal.search();
|
};
|
|
$(function () {
|
var defaultColunms = TPubWithdrawal.initColumn();
|
var table = new BSTable(TPubWithdrawal.id, "/incomeDetail/summaryOfIncomeDetailsList", defaultColunms);
|
table.setPaginationType("server");
|
TPubWithdrawal.table = table.init();
|
});
|