find(array('key' => $config_key)); if ($info) { Dever::setInput('set_config_id', $info['id']); } } $uid = Dever::input('search_option_uid'); $config_id = Dever::input('set_config_id'); if ($config_id && $uid) { $search_config = Dever::load('account/lib/manage')->getSearch($config_id); if ($search_config) { $search = $search_config; $user = '用户信息'; $button['账户操作'] = array('fast', false, 'push'); $button['设置提现人'] = array('fast', false, 'withdraw_info'); $account_info = Dever::db('account/info')->find(array('config_id' => $config_id, 'uid' => $uid)); if ($account_info) { $username = Dever::load("account/lib/project.getUsername", $uid, $config_id); $desc = '
'; $desc .= $search_config['project_name'] . '.' . $search_config['name']; $desc .= ' -> '; $desc .= '' . $username.''; $desc .= '
'; $desc .= '可用金额:' . '' . $account_info['cash'] . ''; $desc .= ' 总增加金额:' . '' . $account_info['z_cash'] . ''; $desc .= ' 总减少金额:' . '' . $account_info['t_cash'] . ''; $desc .= '
'; } } } $method = array ( 1 => '自动', 2 => '手动', ); $status = array ( 1 => '待审核', 2 => '已审核', 3 => '发放成功', 4 => '审核驳回', 5 => '发放失败', 6 => '发放中', ); $col = Dever::input('col'); $fafang = Dever::input('fafang'); if ($fafang == 1) { $audit_status = array ( //1 => '待审核', //2 => '已审核', 3 => '已发放', 4 => '已作废', ); } else { $audit_status = array ( //1 => '待审核', 2 => '已审核', //3 => '已发放', 4 => '已作废', ); } return array ( # 表名 'name' => 'info_log', # 显示给用户看的名称 'lang' => '用户资金流水', 'menu' => false, 'info' => $desc, 'order' => 99, 'end' => array ( 'update' => 'account/lib/manage.audit', 'updatemul' => 'account/lib/manage.audit', ), # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', //'list' => true, ), 'order_num' => array ( 'type' => 'varchar-100', 'name' => '流水号', 'default' => '', 'desc' => '流水号', 'match' => 'is_string', 'search' => 'fulltext', 'list' => true, ), 'info_id' => array ( 'type' => 'int-11', 'name' => '账户id', 'default' => '', 'desc' => '账户id', 'match' => 'is_numeric', 'search' => 'hidden', ), 'uid' => array ( 'type' => 'int-11', 'name' => $user, 'default' => '0', 'desc' => '用户信息', 'match' => 'is_numeric', 'search' => 'hidden', 'value' => $uid, 'list_name' => '用户信息', 'list' => 'Dever::load("account/lib/project.getUsername", {uid}, {config_id})', //'list' => true, ), 'config_id' => array ( 'type' => 'int-11', 'name' => '账户名称', 'default' => '1', 'desc' => '账户名称', 'match' => 'is_numeric', 'update' => 'select', 'option' => $config, //'search' => 'select', //'list' => true, ), 'project_id' => array ( 'type' => 'int-11', 'name' => '所属项目', 'default' => '1', 'desc' => '所属项目', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $project, 'list' => true, ), 'type_id' => array ( 'type' => 'int-11', 'name' => '交易类型', 'default' => '1', 'desc' => '交易类型', 'match' => 'is_numeric', 'search' => 'select', 'update' => 'radio', 'option' => $type, 'list' => true, ), 'source' => array ( 'type' => 'varchar-150', 'name' => '来源表名', 'default' => '', 'desc' => '来源表名', 'match' => 'is_numeric', ), 'source_id' => array ( 'type' => 'int-11', 'name' => '来源表id', 'default' => '', 'desc' => '来源表id', 'match' => 'is_string', 'update' => 'text', ), 'ycash' => array ( 'type' => 'decimal-11,2', 'name' => '金额', 'default' => '0', 'desc' => '金额', 'match' => 'is_numeric', 'update' => 'text', 'list' => true, ), 'cash' => array ( 'type' => 'decimal-11,2', 'name' => '实际金额', 'default' => '0', 'desc' => '实际金额', 'match' => 'is_numeric', 'update' => 'text', 'list' => true, ), 'yue' => array ( 'type' => 'decimal-11,2', 'name' => '操作后余额', 'default' => '0', 'desc' => '操作后余额', 'match' => 'is_numeric', 'update' => 'text', 'list' => true, ), 'desc' => array ( 'type' => 'varchar-600', 'name' => '资金说明', 'default' => '', 'desc' => '资金说明', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'method' => array ( 'type' => 'tinyint-1', 'name' => '方式', 'default' => '1', 'desc' => '方式', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $method, ), 'status' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '2', 'desc' => '状态', 'match' => 'is_numeric', 'option' => $status, 'list' => 'Dever::load("account/lib/log.status", {type_id}, {status})', ), 'audit_admin' => array ( 'type' => 'int-11', 'name' => '审核人', 'default' => '', 'match' => 'is_numeric', 'desc' => '审核人', //'list' => '"{audit_admin}" > 0 ? Dever::load("user/lib/info.get#name", {audit_admin}) : "-"', 'list' => 'user/lib/info.get#name', ), 'audit_status' => array ( 'type' => 'tinyint-1', 'name' => '审核状态', 'default' => '2', 'desc' => '审核状态', 'match' => 'is_numeric', 'option' => $audit_status, 'update' => $col ? 'radio' : false, 'control' => 'audit_status', ), 'audit_desc' => array ( 'type' => 'varchar-500', 'name' => '审核备注', 'default' => '', 'desc' => '审核备注', 'match' => 'is_string', 'update' => $col ? 'textarea' : false, 'show' => 'audit_status=4', 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"', ), 'audit_date' => array ( 'type' => 'int-11', 'name' => '审核时间', 'match' => 'is_numeric', 'desc' => '审核时间', 'default' => '', 'list' => 'time', ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', ), 'cdate' => array ( 'type' => 'int-11', 'name' => '交易时间', 'match' => array('is_numeric', time()), 'desc' => '', # 只有insert时才生效 'insert' => true, 'search' => 'date', 'list_name' => '交易时间', 'list' => 'time', ), ), 'manage' => array ( 'insert' => false, 'delete' => false, 'edit' => false, 'button' => $button, 'excel' => true, # 列表 'list_button' => array ( 'edit' => array('审核', 'audit_status,audit_desc', '{status} == 1'), 'edit' => array('发放', 'audit_status,audit_desc,fafang', '{status} == 2 && {type_id} == 2'), ), ), 'request' => array ( 'getData' => array ( 'type' => 'all', 'option' => array ( 'config_id' => 'yes', 'info_id' => 'yes', 'start' => array('yes-cdate', '>='), 'end' => array('yes-cdate', '<='), 'state' => 1, ), 'order' => array('id' => 'desc'), 'page' => array(10, 'list'), 'col' => '*', ), 'getCash' => array ( 'type' => 'one', 'option' => array ( 'config_id' => 'yes', 'info_id' => 'yes', 'type_id' => 'yes', 'status' => array('yes', 'in'), 'state' => 1, ), 'col' => 'sum(cash) as cash,sum(ycash) as ycash', ), ), );