123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309 |
- <?php
- $status = array
- (
- 1 => array('name' => '待入账', 'style' => 'font-weight:bold;color:#436EEE'),
- 2 => array('name' => '已入账', 'style' => 'font-weight:bold;color:green'),
- 3 => array('name' => '已作废', 'style' => 'font-weight:bold;color:#CD3700'),
- );
- $manage_status = array
- (
- //1 => '待审核',
- 2 => '已审核',
- 3 => '已作废',
- );
- $type = array
- (
- 1 => '充值',
- 2 => '充值返还',
- 3 => '邀请奖励',
- 4 => '商品退款',
- 11 => '提现',
- 12 => '购买商品',
- );
- $excel = false;
- $mul = false;
- $list_button = array();
- $list_button['list'] = array('查看详情', '"user_money_sign&project=shop&id={id}&page_type=1&[refer]"');
- /*
- if (Dever::load('manage/auth')->checkFunc('shop.user_money', 'edit', '审核')) {
- $list_button['fast'] = array('审核', '"cash&where_id={id}&col=audit,audit_desc&oper_save_jump=cash&oper_table=cash&oper_parent=cash"', '{status} == 1');
- }
- if (Dever::load('manage/auth')->checkFunc('shop.user_money', 'user_money', '批量审核')) {
- $mul = '{status} == 1';
- }
- */
- $button = array();
- return array
- (
- # 表名
- 'name' => 'use_money',
- # 显示给用户看的名称
- 'lang' => '用户资金流水',
- 'set' => array
- (
- 'status' => $status,
- 'type' => $type,
- ),
- 'end' => array
- (
- 'update' => 'bill/lib/manage.cashAuditUpdate',
- 'updatemul' => 'bill/lib/manage.cashAuditUpdate',
- ),
- 'order' => 99,
- # 数据结构
- 'struct' => array
- (
-
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- //'list' => true,
- ),
- 'uid' => array
- (
- 'type' => 'int-11',
- 'name' => '用户信息',
- 'default' => '-1',
- 'desc' => '用户信息',
- 'match' => 'is_string',
- 'update' => 'text',
- 'list' =>'Dever::load("shop/lib/money.showUser", {uid})',
- 'list_order' => 2,
- ),
- 'order_num' => array
- (
- 'type' => 'varchar-100',
- 'name' => '流水号',
- 'default' => '',
- 'desc' => '流水号',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list_name' => '流水号<br />交易时间',
- 'list' =>'"{order_num}<br />".date(\'Y-m-d H:i\', {cdate})',
- 'list_order' => 1,
- ),
- 'type' => array
- (
- 'type' => 'int-11',
- 'name' => '交易类型',
- 'default' => '1',
- 'desc' => '交易类型',
- 'match' => 'is_numeric',
- 'search' => 'select',
- 'update' => 'checkbox',
- 'option' => $type,
- 'list' => true,
- 'list_order' => 2,
- ),
- 'type_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' => '交易金额<br />账户余额',
- 'list' =>'Dever::load("shop/lib/money.getCash", {id})',
- 'list_order' => 3,
- ),
- 'yue' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '操作后余额',
- 'default' => '0',
- 'desc' => '操作后余额',
- 'match' => 'is_numeric',
- 'update' => 'text',
- // 'list' => true,
- // 'list_order' => 7,
- ),
- 'status' => array
- (
- 'type' => 'int-11',
- 'name' => '交易状态',
- 'default' => '1',
- 'desc' => '交易状态',
- 'match' => 'is_numeric',
- 'update' => 'hidden',
- 'option' => $status,
- 'search' => 'select',
- 'list' => true,
- 'list_name' => '交易状态',
- 'list_order' => 4,
- ),
- 'audit' => array
- (
- 'type' => 'int-11',
- 'name' => '审核状态',
- 'default' => '2',
- 'desc' => '审核状态',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $manage_status,
- 'mul' => true,
- 'control' => 'audit',
- ),
- 'audit_desc' => array
- (
- 'type' => 'varchar-600',
- 'name' => '备注',
- 'default' => '',
- 'desc' => '审核说明',
- 'match' => 'is_string',
- 'update' => 'textarea',
- 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
- 'list_order' => 5,
- 'show' => 'audit=3',
- ),
- 'desc' => array
- (
- 'type' => 'varchar-600',
- 'name' => '资金说明',
- 'default' => '',
- 'desc' => '资金说明',
- 'match' => 'is_string',
- 'update' => 'text',
- ),
- 'operdate' => array
- (
- 'type' => 'int-11',
- 'name' => '审核确认时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- //'list' => '"{operdate}" > 0 ? date("Y-m-d H:i", {operdate}) : "-"',
- //'list_order' => 9,
- ),
- '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' => '交易时间<br />审核时间',
- //'list' => 'Dever::load("bill/lib/cash.order_num#num", {id})',
- //'list_order' => 20,
- ),
- ),
- 'manage' => array
- (
- 'insert' => false,
- 'delete' => false,
- 'edit' => false,
- //'excel' => $excel,
- 'button' => $button,
- 'mul' => $mul,
- 'list_button' => $list_button,
- ),
- 'request' => array
- (
- 'getData' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'uid' => 'yes',
- 'type' => 'yes',
- 'state' => 1,
- ),
- 'order' => array('id' => 'desc'),
- 'page' => array(10, 'list'),
- 'type' => 'all',
- 'col' => '*',
- ),
- # 获取订单数量
- 'getCash' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'type' => array('yes', 'in'),
- 'uid' => 'yes',
- 'status' => 2,
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(cash) as total',
- ),
- 'getwsCash' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'status' => array('yes', 'in'),
- 'uid' => array('yes', 'in'),
- 'mid' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(cash) as total',
- ),
- 'getExcelAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'state' => 1,
- ),
- 'type' => 'all',
- 'col' => '*',
- ),
- ),
- );
|