123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- <?php
- /*
- $type = array
- (
- 1 => '期权账户',
- 2 => '原始期权账户',
- 3 => '岗位期权账户',
- 4 => '奖励期权账户',
- );
- */
- $type = function()
- {
- $array = array();
- $data = Dever::load('option/lib/manage.getQiquan');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- return array
- (
- # 表名
- 'name' => 'cash',
- # 显示给用户看的名称
- 'lang' => '期权账户数据',
- 'order' => 100,
- 'menu' => false,
- 'config_type' => $type,
- # 数据结构
- 'struct' => array
- (
-
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- //'list' => true,
- ),
- 'type' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '类型',
- 'default' => '1',
- 'desc' => '类型',
- 'match' => 'is_numeric',
- 'option' => $type,
- 'update' => 'radio',
- ),
- 'aid' => array
- (
- 'type' => 'int-11',
- 'name' => '主账号手机号',
- 'default' => '-1',
- 'desc' => '期权登录账户',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => array
- (
- 'api' => 'option/member-getMain',
- 'col' => 'mobile',
- 'result' => 'aid',
- 'search' => 'aid',//本表的字段,默认为当前的字段
- ),
- 'list_name' => '主账户',
- 'list' => 'Dever::load("option/lib/account.getInfo", {aid})',
- 'list_order' => 3,
- ),
- 'mid' => array
- (
- 'type' => 'int-11',
- 'name' => '子账号手机号',
- 'default' => '-1',
- 'desc' => '期权账户',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => array
- (
- 'api' => 'option/member-getChild',
- 'col' => 'mobile',
- 'result' => 'id',
- 'search' => 'mid',//本表的字段,默认为当前的字段
- ),
- 'list_name' => '子账户',
- 'list' => 'Dever::load("option/lib/member.getInfo", {mid})',
- 'list_order' => 3,
- ),
- 'daijiaofu_date' => array
- (
- 'type' => 'int-11',
- 'name' => '最新的交付时间',
- 'match' => 'is_numeric',
- 'desc' => '最新的交付时间',
- ),
- 'daijiaofu' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '待交付额度',
- 'default' => '0.00',
- 'desc' => '待交付额度',
- 'match' => 'is_numeric',
- //'update' => 'text',
- 'list' => true,
- ),
- 'jiaofu' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '已交付额度',
- 'default' => '0.00',
- 'desc' => '交付额度',
- 'match' => 'is_numeric',
- //'update' => 'text',
- 'list' => true,
- ),
- 'zuofei' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '作废额度',
- 'default' => '0.00',
- 'desc' => '作废额度',
- 'match' => 'is_numeric',
- //'update' => 'text',
- 'list' => true,
- ),
- 'fafang' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '发放额度',
- 'default' => '0.00',
- 'desc' => '发放额度',
- 'match' => 'is_numeric',
- //'update' => 'text',
- 'list' => true,
- ),
- 'duifu' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '兑付额度',
- 'default' => '0.00',
- 'desc' => '兑付额度',
- 'match' => 'is_numeric',
- //'update' => 'text',
- 'list' => true,
- ),
- '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' => 'date("Y-m-d H:i:s", {cdate})',
- 'list_order' => 2,
- ),
- ),
- 'alter' => array
- (
- 5 => array
- (
- array('update', 'daijiaofu', 'daijiaofu', 'decimal-11,2 0 待交付额度'),
- array('update', 'jiaofu', 'jiaofu', 'decimal-11,2 0 已交付额度'),
- array('update', 'fafang', 'fafang', 'decimal-11,2 0 发放额度'),
- array('update', 'duifu', 'duifu', 'decimal-11,2 0 兑付额度'),
- ),
- 'version' => 5,
- ),
- 'manage' => array
- (
- 'insert' => false,
- 'delete' => false,
- 'edit' => false,
- 'page_list' => 'cash',
- ),
- 'request' => array
- (
- 'getTotal' => array
- (
- 'type' => 'all',
- 'option' => array
- (
- 'id' => 'yes',
- 'aid' => 'yes',
- 'mid' => 'yes',
- 'state' => 1,
- ),
- 'group' => 'type',
- 'order' => array('daijiaofu_date' => 'desc', 'id' => 'desc'),
- 'col' => '*,sum(daijiaofu) as daijiaofu, sum(jiaofu) as jiaofu, sum(fafang) as fafang, sum(duifu) as duifu, sum(zuofei) as zuofei|type',
- ),
- 'upCash_daijiaofu' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'cash' => array('yes-daijiaofu', '+='),
- 'daijiaofu_date' => 'yes',
- ),
- ),
- 'upCash_jiaofu' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'cash' => array('yes-jiaofu', '+='),
- ),
- ),
- 'upCash_fafang' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'cash' => array('yes-fafang', '+='),
- 'jiaofu' => array('yes', '-='),
- ),
- ),
- 'upCash_zuofei' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'cash' => array('yes-zuofei', '+='),
- 'jiaofu' => array('yes', '-='),
- ),
- ),
- 'upCash_duifu' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'cash' => array('yes-duifu', '+='),
- 'fafang' => array('yes', '-='),
- ),
- ),
- ),
- );
|