123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- <?php
- $project = function()
- {
- $array = array();
- $data = Dever::load('account/config_project-state');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $type = function()
- {
- $array = array();
- $data = Dever::load('account/config_type-state');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $config = function()
- {
- $array = array();
- $data = Dever::load('account/config-state');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $user = '用户ID';
- $search = 'fulltext';
- $config_id = Dever::input('search_option_config_id');
- if ($config_id) {
- $search_config = Dever::load('account/lib/info')->getSearch($config_id);
- if ($search_config) {
- $search = $search_config;
- $user = '用户名称';
- }
- }
- $method = array
- (
- 1 => '自动',
- 2 => '手动',
- );
- return array
- (
- # 表名
- 'name' => 'info_log',
- # 显示给用户看的名称
- 'lang' => '用户资金流水',
- 'menu' => false,
- 'order' => 99,
- # 数据结构
- 'struct' => array
- (
-
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- //'list' => true,
- ),
- 'info_id' => array
- (
- 'type' => 'int-11',
- 'name' => '账户id',
- 'default' => '',
- 'desc' => '账户id',
- 'match' => 'is_numeric',
- ),
- 'uid' => array
- (
- 'type' => 'int-11',
- 'name' => $user,
- 'default' => '0',
- 'desc' => '用户名称',
- 'match' => 'is_numeric',
- 'search' => $search,
- 'list_name' => '用户名称',
- 'list' => 'Dever::load("account/lib/info.getName", {uid}, {config_id})',
- ),
- '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',
- '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',
- ),
- 'cash' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '金额',
- 'default' => '0',
- 'desc' => '金额',
- 'match' => 'is_numeric',
- 'update' => 'text',
- 'list_name' => '金额',
- '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',
- 'list' => true,
- ),
- 'admin_id' => array
- (
- 'type' => 'int-11',
- 'name' => '操作人',
- 'default' => '',
- 'desc' => '操作人',
- 'match' => 'is_string',
- 'update' => 'text',
- 'list' => '"{admin_id}" > 0 ? Dever::load("manage/admin-find#username", {admin_id}) : "-"',
- ),
- 'method' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '方式',
- 'default' => '1',
- 'desc' => '方式',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $method,
- ),
- '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' => 'date("Y-m-d H:i", {cdate})',
- ),
- ),
- 'manage' => array
- (
- 'insert' => false,
- 'delete' => false,
- 'edit' => false,
- ),
- 'request' => array
- (
-
- ),
- );
|