|
@@ -0,0 +1,301 @@
|
|
|
+<?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 => '提现',
|
|
|
+);
|
|
|
+$excel = false;
|
|
|
+if(Dever::load('manage/auth')->checkFunc('menu_244.menu_245', 'editCout', '数据导出')){
|
|
|
+ $excel[] = array('数据导出','代理商分润', 'bill/lib/cash.out_cash');
|
|
|
+}
|
|
|
+
|
|
|
+$list_button = array();
|
|
|
+$list_button['list'] = array('查看详情', '"push_cash&project=bill&id={id}&page_type=1&[refer]"');
|
|
|
+if (Dever::load('manage/auth')->checkFunc('bill.tixian', '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');
|
|
|
+}
|
|
|
+$mul = false;
|
|
|
+if (Dever::load('manage/auth')->checkFunc('bill.tixian', 'tixianedit', '批量审核')) {
|
|
|
+ $mul = '{status} == 1';
|
|
|
+}
|
|
|
+
|
|
|
+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',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'order_num' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-100',
|
|
|
+ 'name' => '流水号',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '流水号',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'search' => 'fulltext',
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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("bill/lib/cash.order_num#cash", {id})',
|
|
|
+ //'list_order' => 4,
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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' => 3,
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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
|
|
|
+ (
|
|
|
+ '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' => '*',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+);
|