|
@@ -0,0 +1,185 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+if (Dever::load('manage/auth')->checkFunc('bill.role_stat', 'out_bill_role', '导出数据')) {
|
|
|
+ $excel = true;
|
|
|
+}else{
|
|
|
+ $excel = false;
|
|
|
+}
|
|
|
+$role = function()
|
|
|
+{
|
|
|
+ $array = array();
|
|
|
+ $data = Dever::load('setting/role-state');
|
|
|
+ if($data)
|
|
|
+ {
|
|
|
+ $array += $data;
|
|
|
+ }
|
|
|
+ return $array;
|
|
|
+};
|
|
|
+$config = array
|
|
|
+(
|
|
|
+
|
|
|
+ 'name' => 'role_stat',
|
|
|
+
|
|
|
+ 'lang' => '角色统计',
|
|
|
+ 'order' => -10,
|
|
|
+
|
|
|
+
|
|
|
+ 'struct' => array
|
|
|
+ (
|
|
|
+ 'id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => 'ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'day' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '日期',
|
|
|
+ 'default' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'desc' => '',
|
|
|
+ 'search' => 'day',
|
|
|
+ 'search_button' => array
|
|
|
+ (
|
|
|
+ 'sum' => 'num,cash,touru,shouru',
|
|
|
+ 'option' => array(
|
|
|
+ 'day' => '按天',
|
|
|
+ 'week' => '按周',
|
|
|
+ 'month' => '按月',
|
|
|
+ ),
|
|
|
+ 'group' => '',
|
|
|
+ ),
|
|
|
+ 'order' => 'desc',
|
|
|
+ 'list' => 'Dever::showDay("{day}")',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'role' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '代理角色',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '代理角色',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'search' => 'select',
|
|
|
+ 'update' => 'select',
|
|
|
+ 'option' => $role,
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'num' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '数量',
|
|
|
+ 'default' => '0',
|
|
|
+ 'desc' => '数量',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'search' => 'order',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'cash' => array
|
|
|
+ (
|
|
|
+ 'type' => 'decimal-11,2',
|
|
|
+ 'name' => '金额',
|
|
|
+ 'default' => '0',
|
|
|
+ 'desc' => '金额',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'search' => 'order',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'touru' => array
|
|
|
+ (
|
|
|
+ 'type' => 'decimal-11,2',
|
|
|
+ 'name' => '投入成本',
|
|
|
+ 'default' => '0',
|
|
|
+ 'desc' => '投入成本',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'search' => 'order',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'shouru' => array
|
|
|
+ (
|
|
|
+ 'type' => 'decimal-11,2',
|
|
|
+ 'name' => '角色收入',
|
|
|
+ 'default' => '0',
|
|
|
+ 'desc' => '角色收入',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'search' => 'order',
|
|
|
+ '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' => true,
|
|
|
+
|
|
|
+
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'manage' => array
|
|
|
+ (
|
|
|
+ 'insert' => false,
|
|
|
+ 'edit' => false,
|
|
|
+ 'delete' => false,
|
|
|
+ 'num' => false,
|
|
|
+ 'excel' => $excel,
|
|
|
+ ),
|
|
|
+
|
|
|
+
|
|
|
+ 'request' => array
|
|
|
+ (
|
|
|
+ 'list' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'start_day' => array('yes-day', '>='),
|
|
|
+ 'end_day' => array('yes-day', '<='),
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('time' => 'desc', 'cdate' => 'desc'),
|
|
|
+ 'page' => array(20, 'list'),
|
|
|
+ 'group' => 'day',
|
|
|
+ 'col' => '*,min(day) as time, sum(num) as num, sum(cash) as cash, sum(touru) as touru, sum(shouru) as shouru',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'all' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'start_day' => array('yes-day', '>='),
|
|
|
+ 'end_day' => array('yes-day', '<='),
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('time' => 'desc', 'cdate' => 'desc'),
|
|
|
+ 'group' => 'day',
|
|
|
+ 'col' => '*,min(day) as time, sum(num) as num, sum(cash) as cash, sum(touru) as touru, sum(shouru) as shouru',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+);
|
|
|
+
|
|
|
+return $config;
|