define(["jquery", "easy-admin"], function ($, ea) { var init = { table_elem: '#currentTable', table_render_id: 'currentTableRenderId', index_url: 'user.withdrawal/index', export_url: 'user.withdrawal/export', }; var Controller = { index: function () { ea.table.render({ init: init, toolbar: ['refresh', 'export'], cols: [[ {type: "checkbox"}, {field: 'id', width: 100, title: 'ID'}, { field: 'status', minWidth: 120, title: '提现状态', templet: function (d) { if (d.status == 0) { return '未提现'; } if (d.status == 1) { return '提现成功'; } if (d.status == 2) { return '提现失败'; } if (d.status == 3) { return '已取消'; } } }, {field: 'uid', width: 120, title: '用户UID'}, {field: 'apply_money', minWidth: 120, title: '申请金额'}, {field: 'practical_money', minWidth: 120, title: '提现金额'}, {field: 'service_money', minWidth: 120, title: '手续费'}, {field: 'channel', minWidth: 120, title: '申请平台', selectList: {1: '支付宝', 2: '微信红包'}}, {field: 'zfb_number', minWidth: 150, title: '支付宝账号'}, {field: 'zfb_name', minWidth: 120, title: '真实姓名'}, {field: 'mchid', minWidth: 120, title: '提现商户'}, {field: 'transfer_type', minWidth: 120, title: '申请提现方式', selectList: {1: '自动', 2: '手动', 3: '线下'}}, { field: 'final_transfer_type', minWidth: 120, title: '最终提现方式', selectList: {0: '#', 1: '自动', 2: '手动', 3: '线下'} }, {field: 'fail_log', minWidth: 150, title: '失败原因'}, {field: 'create_at', minWidth: 180, title: '申请时间'}, {field: 'update_at', minWidth: 180, title: '提现时间'}, { width: 250, title: '操作', templet: function (d) { var button = ''; if (ea.checkAuth('tx', init.table_elem) && d.status == 0) { button += ''; } if (ea.checkAuth('cancel', init.table_elem) && (d.status == 0 || d.status == 2)) { button += ''; } return button; }, } ]], }); ea.listen(); }, add: function () { ea.listen(); }, edit: function () { ea.listen(); }, stock: function () { ea.listen(); }, }; return Controller; });