123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- <?php
- $config = function()
- {
- $array = array();
- $info = Dever::db('account/config')->state();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $project = function()
- {
- $array = array();
- $data = Dever::load('account/config_project-state');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- if (Dever::project('pay')) {
- $status = Dever::config('base', 'pay')->pay['status'];
- } else {
- $status = array();
- }
- return array
- (
- # 表名
- 'name' => 'pay',
- # 显示给用户看的名称
- 'lang' => '充值订单',
- 'order' => 30,
- 'menu' => false,
- # 数据结构
- '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,
- ),
- 'config_id' => array
- (
- 'type' => 'int-11',
- 'name' => '账户名称',
- 'default' => '1',
- 'desc' => '账户名称',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $config,
- //'search' => 'select',
- 'list' => true,
- ),
- 'info_id' => array
- (
- 'type' => 'int-11',
- 'name' => '账户id',
- 'default' => '',
- 'desc' => '账户id',
- 'match' => 'is_numeric',
- ),
- 'card_id' => array
- (
- 'type' => 'int-11',
- 'name' => '充值卡',
- 'default' => '',
- 'desc' => '充值卡',
- 'match' => 'is_numeric',
- 'list' => '"{card_id}" ? Dever::load("account/config_card-find#name", {card_id}) : "-"',
- ),
- 'uid' => array
- (
- 'type' => 'int-11',
- 'name' => '购买人-输入用户手机号或者用户名',
- 'default' => '',
- 'desc' => '购买人',
- 'match' => 'is_numeric',
- 'search' => array
- (
- 'api' => 'user/info-like',
- 'col' => 'search',
- 'result' => 'id',
- ),
- 'update' => 'select',
- 'update_search' => 'user/lib/info.manage_search',
- 'list' => '"{uid}" ? Dever::load("user/lib/info.get#aname", {uid}) : "暂无"',
- ),
- 'name' => array
- (
- 'type' => 'varchar-800',
- 'name' => '充值信息',
- 'default' => '',
- 'desc' => '充值信息',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'cash' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '充值金额',
- 'default' => '',
- 'desc' => '充值金额',
- 'match' => 'option',
- //'update' => 'text',
- 'list' => true,
- ),
- 'price' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '实付金额',
- 'default' => '',
- 'desc' => '实付金额',
- 'match' => 'option',
- //'update' => 'text',
- 'list' => true,
- ),
- 'yue' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '充值后余额',
- 'default' => '',
- 'desc' => '充值后余额',
- 'match' => 'option',
- //'update' => 'text',
- 'list' => true,
- ),
- 'status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '订单状态',
- 'default' => '1',
- 'desc' => '订单状态',
- 'match' => 'is_numeric',
- 'option' => $status,
- 'search' => 'select',
- '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' => 'sdate',
- 'list' => 'date("Y-m-d H:i", {cdate})',
- ),
- ),
- 'manage' => array
- (
- 'delete' => false,
- 'edit' => false,
- 'insert' => false,
- ),
- 'request' => array
- (
- 'getCash' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'uid' => 'yes',
- 'config_id' => 'yes',
- 'status' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(price) as price, sum(cash) as cash',
- ),
- ),
- );
|