123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745 |
- define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
- var Controller = {
- index: function () {
- // 初始化表格参数
- Table.api.init({
- extend: {
- index_url: 'commission/agent/index' + location.search,
- add_url: '',
- multi_url: 'commission/agent/multi',
- import_url: 'commission/agent/import',
- table: 'commission_agent',
- }
- });
- var table = $("#table");
- // 初始化表格
- table.bootstrapTable({
- url: $.fn.bootstrapTable.defaults.extend.index_url,
- pk: 'user_id',
- sortName: 'user_id',
- fixedColumns: true, // 启用固定列功能
- fixedRightNumber: 1, // 固定右侧最后1列(操作列)
- columns: [
- [
- {checkbox: true},
- {field: 'user_id', title: __('ID'), width: 60},
- {field: 'user.nickname', title: __('用户昵称'), operate: 'LIKE'},
- {field: 'user.mobile', title: __('手机号'), operate: 'LIKE'},
- {field: 'level_info.name', title: __('分销等级'), formatter: function(value, row, index) {
- if (row.level_info) {
- return row.level_info.name + '(等级' + row.level_info.level + ')';
- }
- return row.level || '-';
- }},
- {field: 'status', title: __('状态'), searchList: {
- "normal": __('正常'),
- "pending": __('审核中'),
- "freeze": __('冻结'),
- "forbidden": __('禁用'),
- "reject": __('拒绝')
- }, formatter: function(value, row, index) {
- var colorMap = {
- 'normal': 'success',
- 'pending': 'warning',
- 'freeze': 'info',
- 'forbidden': 'danger',
- 'reject': 'danger'
- };
- var textMap = {
- 'normal': '正常',
- 'pending': '审核中',
- 'freeze': '冻结',
- 'forbidden': '禁用',
- 'reject': '拒绝'
- };
- var color = colorMap[value] || 'default';
- var text = textMap[value] || value;
- return '<span class="label label-' + color + '">' + text + '</span>';
- }},
- {field: 'total_income', title: __('总收益'), operate: 'BETWEEN'},
- {field: 'child_agent_count_1', title: __('直推分销商'), width: 80},
- {field: 'child_agent_count_all', title: __('团队分销商'), width: 80},
- {field: 'child_user_count_all', title: __('团队人数'), width: 80},
- {field: 'pending_reward', title: __('待结算佣金'), width: 80},
- {field: 'become_time', title: __('成为分销商时间'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false, formatter: Table.api.formatter.datetime},
- {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
- buttons: [
- {
- name: 'detail',
- text: __('详情'),
- title: __('详情'),
- classname: 'btn btn-xs btn-primary btn-dialog',
- icon: 'fa fa-list',
- url: 'commission/agent/detail',
- callback: function (data) {
- table.bootstrapTable('refresh');
- }
- },
- {
- name: 'team',
- text: __('团队'),
- title: __('团队'),
- classname: 'btn btn-xs btn-info btn-dialog',
- icon: 'fa fa-users',
- url: 'commission/agent/team',
- callback: function (data) {
- table.bootstrapTable('refresh');
- }
- },
- ],
- formatter: Table.api.formatter.operate}
- ]
- ]
- });
- // 为表格绑定事件
- Table.api.bindevent(table);
- },
- detail: function () {
- var agentId = Fast.api.query('id');
- var agentData = {};
- // 获取分销商详情
- function getDetail() {
- Fast.api.ajax({
- url: 'commission/agent/detail',
- data: {id: agentId}
- }, function(data) {
- agentData = data;
- updateDetailView(data);
- });
- }
- // 更新详情视图
- function updateDetailView(data) {
- if (data.user) {
- $('#user-avatar').attr('src', data.user.avatar || '/assets/img/avatar.png');
- $('#user-nickname').text(data.user.nickname || data.user_id);
- }
- // 状态
- var statusMap = {
- 'normal': {text: '正常', class: 'label-success'},
- 'pending': {text: '审核中', class: 'label-warning'},
- 'freeze': {text: '冻结', class: 'label-info'},
- 'forbidden': {text: '禁用', class: 'label-danger'},
- 'reject': {text: '拒绝', class: 'label-danger'}
- };
- var status = statusMap[data.status] || {text: data.status, class: 'label-default'};
- $('#agent-status').text(status.text).attr('class', 'label ' + status.class);
- // 等级
- if (data.level_info) {
- $('#agent-level').text(data.level_info.name + '(等级' + data.level_info.level + ')');
- if (data.level_info.commission_rules) {
- $('#commission-1').text(data.level_info.commission_rules.commission_1 || '0.00');
- $('#commission-2').text(data.level_info.commission_rules.commission_2 || '0.00');
- $('#commission-3').text(data.level_info.commission_rules.commission_3 || '0.00');
- }
- } else {
- $('#agent-level').text(data.level);
- }
- // 待升级等级
- if (data.level_status > 0 && data.level_status_info) {
- $('#upgrade-level-group').show();
- $('#upgrade-level').text(data.level_status_info.name + '(等级' + data.level_status + ')');
- } else {
- $('#upgrade-level-group').hide();
- }
- // 上级分销商
- if (data.user && data.user.parent_user) {
- $('#parent-agent').text(data.user.parent_user.nickname || '用户' + data.user.parent_user_id);
- } else {
- $('#parent-agent').text('无');
- }
- // 允许升级
- $('#upgrade-lock').prop('checked', data.upgrade_lock == 0);
- // 统计数据
- $('#child-user-count-all').text(data.child_user_count_all || 0);
- $('#child-user-count-1').text(data.child_user_count_1 || 0);
- $('#child-agent-count-all').text(data.child_agent_count_all || 0);
- $('#child-agent-count-1').text(data.child_agent_count_1 || 0);
- $('#child-order-money-all').text((data.child_order_money_all || 0) + '元');
- $('#child-order-count-all').text(data.child_order_count_all || 0);
- $('#child-order-money-1').text((data.child_order_money_1 || 0) + '元');
- $('#child-order-count-1').text(data.child_order_count_1 || 0);
- $('#total-income').text((data.total_income || 0) + '元');
- $('#pending-reward').text((data.pending_reward || 0) + '元');
- $('#total-consume').text(((data.user && data.user.total_consume) || 0) + '元');
- // 申请信息
- if (data.apply_info && data.apply_info.length > 0) {
- var applyHtml = '<form class="form-horizontal">';
- data.apply_info.forEach(function(item) {
- applyHtml += '<div class="form-group">';
- applyHtml += '<label class="col-sm-3 control-label">' + item.name + ':</label>';
- applyHtml += '<div class="col-sm-9">';
- if (item.type === 'image') {
- applyHtml += '<img src="' + item.value + '" style="max-width: 200px; max-height: 120px;">';
- } else {
- applyHtml += '<p class="form-control-static">' + item.value + '</p>';
- }
- applyHtml += '</div></div>';
- });
- applyHtml += '</form>';
- $('#apply-info').html(applyHtml);
- } else {
- $('#apply-info').html('<p class="text-muted">暂无申请信息</p>');
- }
- }
- // 详情页面特有的全局函数
- // 修改状态事件委托
- $(document).on('click', '.btn-edit-status', function () {
- var userId = $(this).data('user-id');
- var currentStatus = $(this).data('current-status') || 'normal';
-
- var html = Template('statusedittml', {
- currentStatus: currentStatus,
- userId: userId
- });
-
- layer.open({
- type: 1,
- skin: 'layui-layer-demo',
- title: '修改分销商状态',
- anim: 2,
- area: ['400px', '280px'],
- shadeClose: 1,
- content: html,
- btn: ['确定', '取消'],
- zIndex: 999999,
- yes: function (index) {
- var newStatus = $('input[name="status"]:checked').val();
-
- if (!newStatus) {
- Toastr.error('请选择状态');
- return false;
- }
-
- // 发送AJAX请求
- Fast.api.ajax({
- url: 'commission/agent/edit',
- data: {
- ids: $('#status_user_id').val(),
- status: newStatus
- }
- }, function(data, ret) {
- window.location.reload();
- Toastr.success('修改成功');
- layer.close(index);
- });
- },
- success: function (layero, index) {
- // 使用FastAdmin标准方式绑定表单事件
- Form.api.bindevent(layero.find("form"));
- }
- });
- });
- // 修改到期时间 - 使用事件委托
- $(document).on('click', '.btn-edit-expire-time', function () {
- var userId = $(this).data('user-id');
- var expireTime = $(this).data('expire-time');
-
- // 将时间戳转换为日期字符串
- var currentTime = '';
- if (expireTime && expireTime != '') {
- var date = new Date(expireTime * 1000);
- currentTime = date.getFullYear() + '-' +
- String(date.getMonth() + 1).padStart(2, '0') + '-' +
- String(date.getDate()).padStart(2, '0') + ' ' +
- String(date.getHours()).padStart(2, '0') + ':' +
- String(date.getMinutes()).padStart(2, '0') + ':' +
- String(date.getSeconds()).padStart(2, '0');
- }
-
- // 使用Template渲染HTML
- var html = Template('expiretimetpl', {
- currentTime: currentTime,
- userId: userId
- });
-
- layer.open({
- type: 1,
- skin: 'layui-layer-demo',
- title: '修改分销商到期时间',
- anim: 2,
- area: ['500px', '500px'],
- shadeClose: 1,
- content: html,
- btn: ['确定', '取消'],
- zIndex: 999999,
- yes: function (index) {
- var newTime = ($('#expire_time').val()).trim();
-
- // 验证时间格式
- if (newTime && !/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(newTime)) {
- Toastr.error('时间格式不正确,请使用格式: 2024-01-01 00:00:00');
- return;
- }
-
- var userId = $('#user_id').val();
-
- Fast.api.ajax({
- url: 'commission/agent/updateExpireTime',
- data: {
- user_id: userId,
- expire_time: newTime
- }
- }, function(data, ret) {
- window.location.reload();
- Toastr.success('修改成功');
- layer.close(index);
- });
- },
- success: function (layero, index) {
- // 使用FastAdmin标准方式绑定表单事件
- Form.api.bindevent(layero.find("form"));
-
- }
- });
- });
- window.changeLevel = function(userId) {
- Toastr.info('等级修改功能待完善');
- };
- window.changeParentUser = function(userId) {
- Fast.api.open('commission/agent/select?id=' + userId, '更换上级分销商', {
- callback: function() {
- location.reload();
- }
- });
- };
- window.approveLevel = function(userId, levelStatus) {
- Fast.api.ajax({
- url: 'commission/agent/edit',
- data: {ids: userId, level_status: levelStatus}
- }, function() {
- location.reload();
- });
- };
- window.rejectLevel = function(userId) {
- Fast.api.ajax({
- url: 'commission/agent/edit',
- data: {ids: userId, level_status: 0}
- }, function() {
- location.reload();
- });
- };
- window.toggleUpgradeLock = function(userId, currentLock) {
- var newLock = currentLock == 0 ? 1 : 0;
- Fast.api.ajax({
- url: 'commission/agent/edit',
- data: {ids: userId, upgrade_lock: newLock}
- }, function() {
- location.reload();
- });
- };
- window.viewTeam = function(userId) {
- Fast.api.open('commission/agent/team?id=' + userId, '查看团队');
- };
- // 事件绑定
- $(document).ready(function() {
- $('.btn-refresh').click(function() {
- location.reload();
- });
- $('#refresh-detail').click(function() {
- getDetail();
- });
- $('#edit-status').click(function() {
- Layer.prompt({
- title: '修改状态',
- formType: 2,
- value: agentData.status,
- select: ['normal', 'pending', 'freeze', 'forbidden', 'reject'],
- selectTips: ['正常', '审核中', '冻结', '禁用', '拒绝']
- }, function(value, index) {
- Fast.api.ajax({
- url: 'commission/agent/edit',
- data: {ids: agentId, status: value}
- }, function() {
- Layer.close(index);
- getDetail();
- });
- });
- });
- $('#change-parent').click(function() {
- Fast.api.open('commission/agent/select?id=' + agentId, '更换上级分销商', {
- callback: function() {
- getDetail();
- }
- });
- });
- $('#upgrade-lock').change(function() {
- var value = $(this).is(':checked') ? 0 : 1;
- Fast.api.ajax({
- url: 'commission/agent/edit',
- data: {ids: agentId, upgrade_lock: value}
- }, function() {
- getDetail();
- });
- });
- $('#approve-level').click(function() {
- Fast.api.ajax({
- url: 'commission/agent/edit',
- data: {ids: agentId, level_status: agentData.level_status}
- }, function() {
- getDetail();
- });
- });
- $('#reject-level').click(function() {
- Fast.api.ajax({
- url: 'commission/agent/edit',
- data: {ids: agentId, level_status: 0}
- }, function() {
- getDetail();
- });
- });
- // 初始化
- if (agentId) {
- getDetail();
- }
- });
- Controller.api.bindevent();
- },
- select: function () {
- var userId = Fast.api.query('id');
- var selectedParentId = null;
- var currentPage = 1;
- var pageSize = 10;
- // 获取当前用户信息
- function getCurrentUserInfo() {
- Fast.api.ajax({
- url: 'commission/agent/detail',
- data: {id: userId}
- }, function(data) {
- var html = '<label>当前推荐人:</label>';
- if (data.user && data.user.parent_user) {
- html += '<img src="' + (data.user.parent_user.avatar || '/assets/img/avatar.png') + '" ';
- html += 'style="width: 20px; height: 20px; border-radius: 50%; margin-right: 5px;">';
- html += (data.user.parent_user.nickname || '用户' + data.user.parent_user_id);
- selectedParentId = data.user.parent_user_id;
- } else {
- html += '无';
- selectedParentId = 0;
- }
- $('#current-parent').html(html);
- });
- }
- // 获取分销商列表
- function getAgentList() {
- var searchType = $('#search-type').val();
- var searchValue = $('#search-value').val();
- var searchData = {
- page: currentPage,
- limit: pageSize
- };
- if (searchValue) {
- searchData[searchType] = searchValue;
- }
- Fast.api.ajax({
- url: 'commission/agent/select',
- data: searchData
- }, function(ret) {
- var html = '';
- if (ret.data.rows && ret.data.rows.length > 0) {
- ret.data.rows.forEach(function(item) {
- var statusClass = '';
- var statusText = '';
- switch(item.status) {
- case 'normal':
- statusClass = 'label-success';
- statusText = '正常';
- break;
- case 'pending':
- statusClass = 'label-warning';
- statusText = '审核中';
- break;
- case 'freeze':
- statusClass = 'label-info';
- statusText = '冻结';
- break;
- case 'forbidden':
- statusClass = 'label-danger';
- statusText = '禁用';
- break;
- case 'reject':
- statusClass = 'label-danger';
- statusText = '拒绝';
- break;
- default:
- statusClass = 'label-default';
- statusText = item.status;
- }
- html += '<tr' + (selectedParentId == item.user_id ? ' class="warning"' : '') + '>';
- html += '<td><input type="radio" name="parent_agent" value="' + item.user_id + '"' + (selectedParentId == item.user_id ? ' checked' : '') + '></td>';
- html += '<td>' + item.user_id + '</td>';
- html += '<td>';
- html += '<img src="' + (item.user.avatar || '/assets/img/avatar.png') + '" style="width: 32px; height: 32px; border-radius: 50%; margin-right: 5px;">';
- html += (item.user.nickname || '用户' + item.user_id);
- html += '</td>';
- html += '<td>';
- if (item.level_info) {
- html += item.level_info.name + '<br><small>等级' + item.level_info.level + '</small>';
- } else {
- html += '等级' + item.level;
- }
- html += '</td>';
- html += '<td>' + (item.user.mobile || '-') + '</td>';
- html += '<td><span class="label ' + statusClass + '">' + statusText + '</span></td>';
- html += '<td>';
- if (selectedParentId == item.user_id) {
- html += '<span class="text-success">已选择</span>';
- } else {
- html += '<button type="button" class="btn btn-xs btn-primary" onclick="selectAgent(' + item.user_id + ')">选择</button>';
- }
- html += '</td>';
- html += '</tr>';
- });
- } else {
- html = '<tr><td colspan="7" class="text-center">暂无数据</td></tr>';
- }
- $('#agent-list').html(html);
- // 更新分页
- updatePagination(ret.data.total);
- });
- }
- // 更新分页
- function updatePagination(total) {
- var totalPages = Math.ceil(total / pageSize);
- var html = '<ul class="pagination">';
-
- // 上一页
- if (currentPage > 1) {
- html += '<li><a href="javascript:;" onclick="changePage(' + (currentPage - 1) + ')">上一页</a></li>';
- }
-
- // 页码
- for (var i = 1; i <= totalPages; i++) {
- if (i == currentPage) {
- html += '<li class="active"><a href="javascript:;">' + i + '</a></li>';
- } else {
- html += '<li><a href="javascript:;" onclick="changePage(' + i + ')">' + i + '</a></li>';
- }
- }
-
- // 下一页
- if (currentPage < totalPages) {
- html += '<li><a href="javascript:;" onclick="changePage(' + (currentPage + 1) + ')">下一页</a></li>';
- }
-
- html += '</ul>';
- $('#pagination').html(html);
- }
- // 选择页面特有的全局函数
- window.searchAgent = function() {
- currentPage = 1;
- getAgentList();
- };
- window.selectAgent = function(agentId) {
- selectedParentId = agentId;
- $('input[name="parent_agent"]').prop('checked', false);
- $('input[value="' + agentId + '"]').prop('checked', true);
- $('#agent-table tbody tr').removeClass('warning');
- $('input[value="' + agentId + '"]').closest('tr').addClass('warning');
- $('#set-platform').prop('checked', false);
- };
- window.changePage = function(page) {
- currentPage = page;
- getAgentList();
- };
- window.confirmChange = function() {
- if (selectedParentId === null) {
- Toastr.error('请选择上级分销商');
- return;
- }
- Fast.api.ajax({
- url: 'commission/agent/changeParentUser',
- data: {
- id: userId,
- parent_user_id: selectedParentId
- }
- }, function() {
- Toastr.success('更换成功');
- Fast.api.close();
- });
- };
- // 事件绑定
- $(document).ready(function() {
- // 设为平台直推
- $('#set-platform').change(function() {
- if ($(this).is(':checked')) {
- selectedParentId = 0;
- $('input[name="parent_agent"]').prop('checked', false);
- $('#agent-table tbody tr').removeClass('warning');
- }
- });
- // 搜索框回车事件
- $('#search-value').keypress(function(e) {
- if (e.which == 13) {
- searchAgent();
- }
- });
- // 初始化
- getCurrentUserInfo();
- getAgentList();
- });
- },
- team: function () {
- // 优先从Config中获取ID,否则从URL参数获取
- var agentId = Config.current_agent_id || Fast.api.query('id');
- console.log('agentId:', agentId);
-
- // 初始化表格参数
- Table.api.init({
- extend: {
- index_url: 'commission/agent/team?id=' + agentId,
- add_url: '',
- edit_url: '',
- del_url: '',
- multi_url: '',
- import_url: '',
- table: 'user',
- }
- });
- var table = $("#table");
- // 初始化表格
- table.bootstrapTable({
- url: $.fn.bootstrapTable.defaults.extend.index_url,
- pk: 'id',
- sortName: 'id',
- columns: [
- [
- {checkbox: true},
- {field: 'id', title: __('ID'), width: 60},
- {field: 'nickname', title: __('团队成员'), operate: 'LIKE', formatter: function(value, row, index) {
- var avatarUrl = row.avatar ? Fast.api.cdnurl(row.avatar) : Fast.api.cdnurl('/assets/img/avatar.png');
- var html = '<div style="display:flex;align-items:center;">';
- html += '<img src="' + avatarUrl + '" style="width:40px;height:40px;border-radius:50%;margin-right:10px;" />';
- html += '<div>';
- html += '<div style="color:#337ab7;font-weight:bold;">' + (row.nickname || '用户' + row.id) + '</div>';
- html += '<div style="color:#6c757d;font-size:12px;">' + (row.mobile || '') + '</div>';
- html += '</div></div>';
- return html;
- }},
- {field: 'agent.level_info.name', title: __('分销等级'), formatter: function(value, row, index) {
- if (row.agent && row.agent.level_info) {
- return row.agent.level_info.name + '<br><small>等级' + row.agent.level_info.level + '</small>';
- } else if (row.agent) {
- return '等级' + (row.agent.level || '-');
- }
- return '<span class="text-muted">非分销商</span>';
- }},
- {field: 'agent.status', title: __('状态'), searchList: {
- "normal": __('正常'),
- "pending": __('审核中'),
- "freeze": __('冻结'),
- "forbidden": __('禁用'),
- "reject": __('拒绝')
- }, formatter: function(value, row, index) {
- if (!row.agent) {
- return '<span class="label label-default">非分销商</span>';
- }
- var status = row.agent.status;
- var colorMap = {
- 'normal': 'success',
- 'pending': 'warning',
- 'freeze': 'info',
- 'forbidden': 'danger',
- 'reject': 'danger'
- };
- var textMap = {
- 'normal': '正常',
- 'pending': '审核中',
- 'freeze': '冻结',
- 'forbidden': '禁用',
- 'reject': '拒绝'
- };
- var color = colorMap[status] || 'default';
- var text = textMap[status] || status;
- return '<span class="label label-' + color + '">' + text + '</span>';
- }},
- {field: 'agent.child_user_count_all', title: __('团队人数'), width: 80, formatter: function(value, row, index) {
- return row.agent ? (row.agent.child_user_count_all || 0) : 0;
- }},
- {field: 'agent.child_agent_count_1', title: __('直推分销商'), width: 80, formatter: function(value, row, index) {
- return row.agent ? (row.agent.child_agent_count_1 || 0) : 0;
- }},
- {field: 'agent.child_agent_count_all', title: __('团队分销商'), width: 80, formatter: function(value, row, index) {
- return row.agent ? (row.agent.child_agent_count_all || 0) : 0;
- }},
- {field: 'agent.total_income', title: __('累计佣金'), operate: 'BETWEEN', formatter: function(value, row, index) {
- return row.agent ? ((row.agent.total_income || 0) + '元') : '0元';
- }},
- {field: 'agent.pending_reward', title: __('待结算佣金'), width: 80, formatter: function(value, row, index) {
- return row.agent ? ((row.agent.pending_reward || 0) + '元') : '0元';
- }},
- {field: 'agent.become_time', title: __('成为分销商时间'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false, formatter: function(value, row, index) {
- return row.agent && row.agent.become_time ? Table.api.formatter.datetime(row.agent.become_time, row, index) : '<span class="text-muted">-</span>';
- }}
- ]
- ]
- });
- // 为表格绑定事件
- Table.api.bindevent(table);
- // // 团队页面特有的全局函数
- // window.viewTeam = function(userId) {
- // Fast.api.open('commission/agent/team?id=' + userId, '查看团队');
- // };
- // window.viewDetail = function(userId) {
- // Fast.api.open('commission/agent/detail?id=' + userId, '分销商详情');
- // };
- Controller.api.bindevent();
- },
- api: {
- bindevent: function () {
- Form.api.bindevent($("form[role=form]"));
- }
- }
- };
- return Controller;
- });
|