/**
|
* 通知管理初始化
|
*/
|
var HasCollectOrderDetail = {
|
id: "HasCollectOrderDetailTable", //表格id
|
seItem: null, //选中的条目
|
table: null,
|
layerIndex: -1
|
};
|
|
/**
|
* 初始化表格的列
|
*/
|
HasCollectOrderDetail.initColumn = function () {
|
return [
|
{field: 'selectItem', radio: false, visible: false},
|
{title: '序号', field: 'id', align: 'center', valign: 'middle'},
|
{title: '时间', field: 'endServiceTime', align: 'center', valign: 'middle'},
|
{title: '订单类型', field: 'orderType', align: 'center', valign: 'middle'},
|
{title: '订单ID', field: 'orderNum', align: 'center', valign: 'middle'},
|
{title: '订单金额', field: 'orderMoney', align: 'center', valign: 'middle'},
|
{title: '收益金额', field: 'driverOrderEarningMoney', align: 'center', valign: 'middle'}
|
];
|
};
|
|
|
/**
|
* 检查是否选中
|
*/
|
HasCollectOrderDetail.check = function () {
|
var selected = $('#' + this.id).bootstrapTable('getSelections');
|
if (selected.length == 0) {
|
Feng.info("请先选中表格中的某一记录!");
|
return false;
|
} else {
|
HasCollectOrderDetail.seItem = selected[0];
|
return true;
|
}
|
};
|
|
|
|
/**
|
* 导出
|
*/
|
HasCollectOrderDetail.excel = function(){
|
if (this.check()){
|
|
/// 批量选中
|
var ids = Feng.checkBoxIds("#"+this.id); //(产生以逗号隔开的id字符串集)
|
|
window.location.href=Feng.ctxPath + "/spendingDetailPlatform/exportRecordxxx?driverId=" + $("#driverId").val() + "&ids=" + ids;
|
}
|
};
|
|
|
/**
|
* 全部导出
|
*/
|
HasCollectOrderDetail.excelAll = function(){
|
window.location.href=Feng.ctxPath + "/spendingDetailPlatform/exportRecordxxx?driverId=" + $("#driverId").val() + "&ids=All";
|
};
|
|
|
|
|
/**
|
* 查询通知列表
|
*/
|
HasCollectOrderDetail.search = function () {
|
var queryData = {};
|
queryData['orderNum'] = $("#orderNum").val();
|
queryData['endServiceTime'] = $("#endServiceTime").val();
|
queryData['orderType'] = $("#orderType").val();
|
HasCollectOrderDetail.table.refresh({query: queryData});
|
};
|
|
HasCollectOrderDetail.resetSearch = function () {
|
$("#orderNum").val("");
|
$("#endServiceTime").val("");
|
$("#orderType").val("");
|
HasCollectOrderDetail.search();
|
};
|
|
$(function () {
|
var defaultColunms = HasCollectOrderDetail.initColumn();
|
var table = new BSTable(HasCollectOrderDetail.id, "/spendingDetailPlatform/HasCollectOrderDetailList", defaultColunms);
|
// table.setPaginationType("server");
|
table.setPaginationType("client");
|
|
var queryData = {};
|
queryData['driverId'] = $("#driverId").val();
|
table.setQueryParams(queryData);
|
HasCollectOrderDetail.table = table.init();
|
});
|