define(["jquery", "easy-admin"], function ($, ea) {
var init = {
table_elem: '#currentTable',
table_render_id: 'currentTableRenderId',
index_url: 'xzdata.dianfei/index',
};
var Controller = {
index: function () {
ea.table.render({
init: init,
toolbar: ['refresh', 'export'],
cols: [[
{type: "checkbox"},
{field: 'id', width: 100, title: 'ID', search:false},
{field: 'df_ordersn', width: 200, title: '充值订单号'},
{
field: 'status', minWidth: 120, title: '充值状态', templet: function (d) {
if (d.status == 1) {
return '充值中';
}
if (d.status == 2) {
return '充值成功';
}
if (d.status == 3) {
return '充值失败';
}
}, selectList: {1: '充值中', 2: '充值成功', 3:'充值失败'}
},
{field: 'uid', width: 120, title: '用户UID'},
{field: 'account', minWidth: 120, title: '电卡号码'},
{field: 'address', minWidth: 120, title: '地区'},
{field: 'mobile', minWidth: 120, title: '联系电话'},
{field: 'price', minWidth: 120, title: '充值金额'},
{field: 'xz_num', minWidth: 120, title: '支付星钻', search: false},
{field: 'shouxu', minWidth: 120, title: '手续费', search: false},
{field: 'is_backsx', minWidth: 120, title: '是否退还手续费', selectList: {1: '退还', 0: '不退还'}},
{field: 'create_time', minWidth: 180, title: '申请时间', search: 'range'},
{field: 'error_text', minWidth: 180, title: '失败原因', search: false},
{
width: 250,
title: '操作',
templet: function (d) {
var button = '';
if (d.status == 1) {
// if (ea.checkAuth('czsuccss', init.table_elem) && d.status == 0) {
button += '';
// }
if (ea.checkAuth('czerror', init.table_elem)) {
button += '';
}
}
return button;
},
}
]],
});
ea.listen();
},
czerror: function () {
ea.listen();
},
czsuccss: function () {
ea.listen();
},
};
return Controller;
});