/**
|
* 提现列表管理初始化
|
*/
|
var ComplaintDeductmoney = {
|
id: "ComplaintDeductmoneyTable", //表格id
|
seItem: null, //选中的条目
|
table: null,
|
layerIndex: -1
|
};
|
|
/**
|
* 初始化表格的列
|
*/
|
ComplaintDeductmoney.initColumn = function () {
|
return [
|
{field: 'selectItem',visible: true, radio: true},
|
{title: '扣款时间', field: 'createTime', visible: true, align: 'center', valign: 'middle',width:'10%',
|
formatter: function (value, row) {
|
var btn = "";
|
if(row.createTime != '' && row.createTime != null) {
|
var time = row.createTime.replace(" ",'<br>');
|
btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.createTime + '" onfocus="TUser.tooltip()">' + time + '</p>']
|
}
|
return btn;
|
}
|
},
|
{title: '流水id', field: 'id', 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>']
|
}
|
return btn;
|
}
|
},
|
|
|
{title: '司机电话', field: 'phone', visible: true, align: 'center', valign: 'middle'},
|
{title: '投诉id', field: 'complaintIds', visible: true, align: 'center', valign: 'middle'},
|
{title: '扣款金额', field: 'money', visible: true, align: 'center', valign: 'middle',
|
formatter: function (value,row) {
|
return row.money;
|
}
|
}
|
];
|
};
|
|
/**
|
* 检查是否选中
|
*/
|
ComplaintDeductmoney.check = function () {
|
var selected = $('#' + this.id).bootstrapTable('getSelections');
|
if(selected.length == 0){
|
Feng.info("请先选中表格中的某一记录!");
|
return false;
|
}else{
|
ComplaintDeductmoney.seItem = selected[0];
|
return true;
|
}
|
};
|
ComplaintDeductmoney.delete = function(){
|
if (this.check()) {
|
swal({
|
title: "您是否确认删除?",
|
text: "请谨慎操作,删除后数据无法恢复!",
|
type: "warning",
|
showCancelButton: true,
|
confirmButtonColor: "#DD6B55",
|
confirmButtonText: "删除",
|
closeOnConfirm: false
|
}, function () {
|
var ajax = new $ax(Feng.ctxPath + "/incomeDetail/deleteComplaintDeductmoney", function (data) {
|
swal("删除成功", "您已经删除了。", "success");
|
YesDriver.table.refresh();
|
}, function (data) {
|
swal("删除失败", data.responseJSON.message + "!", "warning");
|
});
|
ajax.set("id", ComplaintDeductmoney.seItem.id);
|
ajax.start();
|
});
|
}
|
}
|
/**
|
* 查询提现列表列表
|
*/
|
ComplaintDeductmoney.search = function () {
|
var queryData = {};
|
queryData['insertTime'] = $("#insertTime").val();
|
queryData['id'] = $("#id").val();
|
queryData['userName'] = $("#userName").val();
|
queryData['userPhone'] = $("#userPhone").val();
|
ComplaintDeductmoney.table.refresh({query: queryData});
|
};
|
|
ComplaintDeductmoney.resetSearch = function () {
|
$("#insertTime").val("");
|
$("#userName").val("");
|
$("#userPhone").val("");
|
$("#id").val("");
|
ComplaintDeductmoney.search();
|
};
|
/// 导出
|
ComplaintDeductmoney.excel = function(){
|
var arr = $("#insertTime").val();
|
window.location.href = Feng.ctxPath + "/incomeDetail/exportComplaintDeductmoney?id=" + $("#id").val() + "&insertTime=" + arr
|
+ "&userName=" + $("#userName").val()
|
+ "&userPhone=" + $("#userPhone").val();
|
};
|
$(function () {
|
var defaultColunms = ComplaintDeductmoney.initColumn();
|
var table = new BSTable(ComplaintDeductmoney.id, "/incomeDetail/complaintDeductmoneyList", defaultColunms);
|
table.setPaginationType("server");
|
ComplaintDeductmoney.table = table.init();
|
});
|