/**
|
* 提现列表管理初始化
|
*/
|
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;
|
switch (orderType) {
|
case 1:
|
orderType = '快车';
|
break
|
case 2:
|
orderType = '出租车';
|
break
|
case 3:
|
orderType = '跨城出行';
|
break
|
case 4:
|
orderType = '同城小件物流';
|
break
|
case 5:
|
orderType = '跨城小件物流';
|
break
|
case 6:
|
orderType = '包车';
|
break
|
case 7:
|
orderType = '95128';
|
break
|
}
|
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].name == "undefined" ? "-" : list[i].name;
|
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].phone == "undefined" ? "-" : list[i].phone;
|
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: '', 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 activityAward = typeof list[i].activityAward == "undefined" ? "-" : list[i].activityAward;
|
if(parseInt(i) == 0){
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;">' + activityAward + '</div>'
|
}else{
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;border-top: 1px solid #ddd">' + activityAward + '</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 = typeof list[i].all == "undefined" ? "-" : list[i].all;
|
all = parseFloat(all).toFixed(2);
|
if(parseInt(i) == 0){
|
str += '<div style="width: 100%;height: 35px;line-height: 35px;">' + all + '</div>'
|
}else{
|
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/exportSummaryOfSpendingDetails?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/summaryOfSpendingDetailsList", defaultColunms);
|
table.setPaginationType("server");
|
TPubWithdrawal.table = table.init();
|
});
|