| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- define(["jquery", "easy-admin"], function ($, ea) {
- var init = {
- table_elem: '#currentTable',
- table_render_id: 'currentTableRenderId',
- index_url: 'xzdata.huafei/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: 'hf_ordersn', width: 200, title: '充值订单号'},
- {
- field: 'status', minWidth: 120, title: '充值状态', templet: function (d) {
- if (d.status == 1) {
- return '<span class="layui-btn layui-btn-xs layui-btn-success">充值中</span>';
- }
- if (d.status == 2) {
- return '<span class="layui-btn layui-btn-xs layui-btn-danger">充值成功</span>';
- }
- if (d.status == 3) {
- return '<span class="layui-btn layui-btn-xs layui-btn-disabled">充值失败</span>';
- }
- }, selectList: {1: '充值中', 2: '充值成功', 3:'充值失败'}
- },
- {field: 'uid', width: 120, title: '用户UID'},
- {field: 'mobile', minWidth: 120, title: '充值号码'},
- {field: 'type', minWidth: 120, title: '运营商', selectList: {1: '移动', 2: '联通', 3:'电信'}},
- {field: 'price', minWidth: 120, title: '充值金额'},
- {field: 'xz_num', minWidth: 120, title: '支付星钻', search: false},
- {field: 'shouxu', minWidth: 120, title: '手续费', search: false},
- {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 += '<button class="layui-btn layui-btn-xs layui-btn-normal" data-request="xzdata.Huafei/czsuccess?id=' + d.id + '" data-title="确认充值成功?" data-full="true">充值成功</button>';
- // }
- if (ea.checkAuth('czerror', init.table_elem)) {
- button += '<button class="layui-btn layui-btn-xs layui-btn-danger" data-open="xzdata.Huafei/czerror?id=' + d.id + '" data-title="充值失败">充值失败</button>';
- }
- }
- return button;
- },
- }
- ]],
- });
- ea.listen();
- },
- czerror: function () {
- ea.listen();
- },
- czsuccss: function () {
- ea.listen();
- },
- };
- return Controller;
- });
|