| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397 | 
							- <?php
 
- $project = function()
 
- {
 
- 	$array = array();
 
- 	$data = Dever::load('account/config_project-state');
 
- 	if($data)
 
- 	{
 
- 		$array += $data;
 
- 	}
 
- 	return $array;
 
- };
 
- $type = function()
 
- {
 
- 	$array = array();
 
- 	$data = Dever::load('account/config_type-state');
 
- 	if($data)
 
- 	{
 
- 		$array += $data;
 
- 	}
 
- 	return $array;
 
- };
 
- $config = function()
 
- {
 
- 	$array = array();
 
- 	$data = Dever::load('account/config-state');
 
- 	if($data)
 
- 	{
 
- 		$array += $data;
 
- 	}
 
- 	return $array;
 
- };
 
- $button = array();
 
- $desc = '';
 
- $user = '用户ID';
 
- $search = 'hidden';
 
- $config_key = Dever::input('config_key');
 
- if ($config_key) {
 
-     $info = Dever::db('account/config')->find(array('key' => $config_key));
 
-     if ($info) {
 
-         Dever::setInput('set_config_id', $info['id']);
 
-     }
 
- }
 
- $uid = Dever::input('search_option_uid');
 
- $config_id = Dever::input('set_config_id');
 
- if ($config_id && $uid) {
 
- 	$search_config = Dever::load('account/lib/manage')->getSearch($config_id);
 
- 	if ($search_config) {
 
- 		$search = $search_config;
 
- 		$user = '用户名称';
 
-         $button['账户操作'] = array('fast', false, 'push');
 
-         $button['设置提现人'] = array('fast', false, 'withdraw_info');
 
-         $account_info = Dever::db('account/info')->find(array('config_id' => $config_id, 'uid' => $uid));
 
-         if ($account_info) {
 
-             $username = Dever::load("account/lib/project.getUsername", $uid, $config_id);
 
-             $desc = '<blockquote class="layui-elem-quote">';
 
-             $desc .= $search_config['project_name'] . '.' . $search_config['name'];
 
-             $desc .= ' -> ';
 
-             $desc .= '<b>' . $username.'</b>';
 
-             $desc .= '<br />';
 
-             $desc .= '可用金额:' . '<b>' . $account_info['cash'] . '</b>';
 
-             $desc .= ' 总增加金额:' . '<b>' . $account_info['z_cash'] . '</b>';
 
-             $desc .= ' 总减少金额:' . '<b>' . $account_info['t_cash'] . '</b>';
 
-             $desc .= '</blockquote>';
 
-         }
 
- 	}
 
- }
 
- $method = array
 
- (
 
-     1 => '自动',
 
-     2 => '手动',
 
- );
 
- $status = array
 
- (
 
-     1 => '待审核',
 
-     2 => '已审核',
 
-     3 => '已发放',
 
-     4 => '已作废',
 
- );
 
- $col = Dever::input('col');
 
- $fafang = Dever::input('fafang');
 
- if ($fafang == 1) {
 
-     $audit_status = array
 
-     (
 
-         //1 => '待审核',
 
-         //2 => '已审核',
 
-         3 => '已发放',
 
-         4 => '已作废',
 
-     );
 
- } else {
 
-     $audit_status = array
 
-     (
 
-         //1 => '待审核',
 
-         2 => '已审核',
 
-         //3 => '已发放',
 
-         4 => '已作废',
 
-     );
 
- }
 
- return array
 
- (
 
-     # 表名
 
-     'name' => 'info_log',
 
-     # 显示给用户看的名称
 
-     'lang' => '用户资金流水',
 
-     'menu' => false,
 
-     'info' => $desc,
 
-     'order' => 99,
 
-     'end' => array
 
-     (
 
-         'update' => 'account/lib/manage.audit',
 
-         'updatemul' => 'account/lib/manage.audit',
 
-     ),
 
-     # 数据结构
 
-     '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,
 
-         ),
 
-         'info_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '账户id',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '账户id',
 
- 			'match' 	=> 'is_numeric',
 
-             'search'    => 'hidden',
 
- 		),
 
-         'uid'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> $user,
 
- 			'default' 	=> '0',
 
- 			'desc' 		=> '用户名称',
 
- 			'match' 	=> 'is_numeric',
 
-             'search'	=> 'hidden',
 
-             'value'     => $uid,
 
-             'list_name'	=> '用户名称',
 
- 			'list'		=> 'Dever::load("account/lib/project.getUsername", {uid}, {config_id})',
 
-             //'list'      => true,
 
- 		),
 
- 		'config_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '账户名称',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '账户名称',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $config,
 
- 			//'search'	=> 'select',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'project_id'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '所属项目',
 
-             'default'   => '1',
 
-             'desc'      => '所属项目',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'radio',
 
-             'option'    => $project,
 
-             'list'		=> true,
 
-         ),
 
-         'type_id'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '交易类型',
 
-             'default'   => '1',
 
-             'desc'      => '交易类型',
 
-             'match'     => 'is_numeric',
 
-             'search'    => 'select',
 
-             'update'    => 'radio',
 
-             'option'    => $type,
 
-             'list'		=> true,
 
-         ),
 
-         'source'      => array
 
-         (
 
-             'type'      => 'varchar-150',
 
-             'name'      => '来源表名',
 
-             'default'   => '',
 
-             'desc'      => '来源表名',
 
-             'match'     => 'is_numeric',
 
-         ),
 
-         'source_id'      => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '来源表id',
 
-             'default'   => '',
 
-             'desc'      => '来源表id',
 
-             'match'     => 'is_string',
 
-             'update'    => 'text',
 
-         ),
 
-         'ycash'      => array
 
-         (
 
-             'type'      => 'decimal-11,2',
 
-             'name'      => '金额',
 
-             'default'   => '0',
 
-             'desc'      => '金额',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'text',
 
-             'list'      => true,
 
-         ),
 
-         'cash'      => array
 
-         (
 
-             'type'      => 'decimal-11,2',
 
-             'name'      => '实际金额',
 
-             'default'   => '0',
 
-             'desc'      => '实际金额',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'text',
 
-             'list'      => true,
 
-         ),
 
-         'yue'      => array
 
-         (
 
-             'type'      => 'decimal-11,2',
 
-             'name'      => '操作后余额',
 
-             'default'   => '0',
 
-             'desc'      => '操作后余额',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'text',
 
-             'list'      => true,
 
-         ),
 
-         'desc'      => array
 
-         (
 
-             'type'      => 'varchar-600',
 
-             'name'      => '资金说明',
 
-             'default'   => '',
 
-             'desc'      => '资金说明',
 
-             'match'     => 'is_string',
 
-             'update'    => 'text',
 
-             'search'    => 'fulltext',
 
-             'list'      => true,
 
-         ),
 
-         'method'        => array
 
-         (
 
-             'type'      => 'tinyint-1',
 
-             'name'      => '方式',
 
-             'default'   => '1',
 
-             'desc'      => '方式',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'radio',
 
-             'option'    => $method,
 
-         ),
 
-         'status'        => array
 
-         (
 
-             'type'      => 'tinyint-1',
 
-             'name'      => '状态',
 
-             'default'   => '2',
 
-             'desc'      => '状态',
 
-             'match'     => 'is_numeric',
 
-             'option'    => $status,
 
-             'list'      => 'Dever::load("account/lib/log.status", {type_id}, {status})',
 
-         ),
 
-         'audit_admin'     => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '审核人',
 
-             'default'   => '',
 
-             'match'     => 'is_numeric',
 
-             'desc'      => '审核人',
 
-             //'list'      => '"{audit_admin}" > 0 ? Dever::load("user/lib/info.get#name", {audit_admin}) : "-"',
 
-             'list'      => 'user/lib/info.get#name',
 
-         ),
 
-         'audit_status'        => array
 
-         (
 
-             'type'      => 'tinyint-1',
 
-             'name'      => '审核状态',
 
-             'default'   => '2',
 
-             'desc'      => '审核状态',
 
-             'match'     => 'is_numeric',
 
-             'option'    => $audit_status,
 
-             'update'    => $col ? 'radio' : false,
 
-             'control'   => 'audit_status',
 
-         ),
 
-         'audit_desc'        => array
 
-         (
 
-             'type'      => 'varchar-500',
 
-             'name'      => '审核备注',
 
-             'default'   => '',
 
-             'desc'      => '审核备注',
 
-             'match'     => 'is_string',
 
-             'update'    => $col ? 'textarea' : false,
 
-             'show'      => 'audit_status=4',
 
-             'list'      => '"{audit_desc}" ? "{audit_desc}" : "-"',
 
-         ),
 
-         'audit_date'     => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '审核时间',
 
-             'match'     => 'is_numeric',
 
-             'desc'      => '审核时间',
 
-             'default'   => '',
 
-             'list'      => 'time',
 
-         ),
 
-         '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' => '交易时间',
 
-             'list'        => 'time',
 
-         ),
 
-     ),
 
-     'manage' => array
 
-     (
 
-         'insert' => false,
 
-         'delete' => false,
 
-         'edit' => false,
 
-         'button' => $button,
 
-         'excel' => true,
 
-         # 列表
 
-         'list_button' => array
 
-         (
 
-             'edit' => array('审核', 'audit_status,audit_desc', '{status} == 1'),
 
-             'edit' => array('发放', 'audit_status,audit_desc,fafang', '{status} == 2 && {type_id} == 2'),
 
-         ),
 
-     ),
 
-     'request' => array
 
-     (
 
-         'getData' => array
 
-         (
 
-             'type' => 'all',
 
-             'option' => array
 
-             (
 
-                 'config_id' => 'yes',
 
-                 'info_id' => 'yes',
 
-                 'start' => array('yes-cdate', '>='),
 
-                 'end' => array('yes-cdate', '<='),
 
-                 'state' => 1,
 
-             ),
 
-             'page' => array(10, 'list'),
 
-             'col' => '*',
 
-         ),
 
-     ),
 
- );
 
 
  |