<?php $type = Dever::db('option/cash')->config['config_type']; $status = array ( 1 => '已确认', 2 => '未确认', ); $audit = array ( 1 => '正常', 2 => '作废', ); $audit_manage = array ( //1 => '正常', 2 => '作废', ); $col = Dever::input('col'); $aid = Dever::input('search_option_aid'); $button = array(); if ($aid) { $option_aid = $aid; $search_type = Dever::input('search_type'); if ($search_type) { $option_aid .= '&search_type=' . $search_type; } $button = array ( '返回上一页' => array('location', 'l=project/database/list&project=option&table=cash&page_type=1&aid=' . $option_aid), ); } return array ( # 表名 'name' => 'bill_jiaofu', # 显示给用户看的名称 'lang' => '期权交付记录', 'order' => 90, 'end' => array ( //'update' => 'option/lib/manage.setJiaofu', ), 'config_audit' => $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', 'update' => 'text', 'search' => 'fulltext', 'list' => true, 'list_order' => 1, ), 'type' => array ( 'type' => 'tinyint-1', 'name' => '交易类型', 'default' => '1', 'desc' => '交易类型', 'match' => 'is_numeric', 'option' => $type, 'update' => 'radio', 'list' => true, 'list_order' => 4, ), 'aid' => array ( 'type' => 'int-11', 'name' => '手机号', 'default' => '-1', 'desc' => '代理商', 'match' => 'is_string', 'update' => 'text', 'search' => array ( 'api' => 'option/account-find', 'col' => 'mobile', 'result' => 'id', ), 'list_name' => '期权账户', 'list' => 'Dever::load("option/lib/account.getInfo", {aid})', 'list_order' => 2, ), 'cash' => array ( 'type' => 'float-11,2', 'name' => '期权操作', 'default' => '0', 'desc' => '期权操作', 'match' => 'is_numeric', //'update' => 'text', 'list' => '"+{cash}"', 'list_order' => 3, ), 'sign' => array ( 'type' => 'varchar-150', 'name' => '签字', 'default' => '', 'desc' => '签字', 'match' => 'option', 'update' => 'image', 'key' => '7', 'list' => '"<img src=\'{sign}\' width=\'150\'>"', 'list_order' => 5, ), 'status' => array ( 'type' => 'tinyint-1', 'name' => '交付确认', 'default' => '2', 'desc' => '交付确认', 'match' => 'is_numeric', 'option' => $status, 'update' => 'radio', 'list' => true, 'list_order' => 4, ), 'audit' => array ( 'type' => 'tinyint-1', 'name' => '审核', 'default' => $col ? '3' : '1', 'desc' => '审核', 'match' => 'is_numeric', 'option' => $col ? $audit_manage : $audit, 'update' => 'radio', 'control' => 'audit', 'value' => $col ? '3' : '1', //'list' => true, 'list_order' => 7, ), 'audit_desc' => array ( 'type' => 'varchar-500', 'name' => '审核备注', 'default' => '', 'desc' => '备注', 'match' => 'option', 'update' => 'textarea', //'list' => '"{audit_desc}" ? "{audit_desc}" : "-"', 'list_order' => 9, ), 'audit_date' => array ( 'type' => 'int-11', 'name' => '审核时间', 'match' => 'is_numeric', 'desc' => '审核时间', 'default' => '', ), 'audit_admin' => array ( 'type' => 'int-11', 'name' => '操作人', 'default' => '', 'match' => 'is_numeric', 'desc' => '操作人', //'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#name", {audit_admin}) : "-"', //'list_order' => 6, ), 'desc' => array ( 'type' => 'varchar-500', 'name' => '备注说明', 'default' => '', 'desc' => '备注说明', 'match' => 'option', 'update' => 'textarea', 'list' => true, 'list_order' => 10, ), 'qdate' => array ( 'type' => 'int-11', 'name' => '确认时间', 'default' => '', 'match' => 'is_numeric', 'desc' => '', ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', ), 'cdate' => array ( 'type' => 'int-11', 'name' => '操作时间', 'match' => array('is_numeric', time()), 'desc' => '', 'default' => '', # 只有insert时才生效 'insert' => true, 'list' => 'Dever::load("option/lib/manage.getJiaofuDate", {id})', 'list_order' => 18, ), ), 'manage' => array ( 'insert' => false, 'delete' => false, 'edit' => false, 'button' => $button, 'list_button' => array ( //'list' => array('查看详情', '"member_area&mid={id}&page_type=1"'), //'edit' => array('审核', 'audit,audit_desc', '{audit} == 2'), //'delete' => array('删除', '', '{status} == 1'), ), ), 'request' => array ( 'getData' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'aid' => 'yes', 'type' => 'yes', 'audit' => 'yes', 'status' => 'yes', 'state' => 1, ), 'order' => array('id' => 'desc'), 'page' => array(10, 'list'), 'type' => 'all', 'col' => '*', ), 'getTotal' => array ( # 匹配的正则或函数 选填项 'where' => array ( 'aid' => 'yes', 'type' => 'yes', 'end' => array('yes-cdate', '<='), 'status' => 'yes', 'state' => 1, ), 'type' => 'one', 'col' => 'sum(cash) as total', ), 'upYes' => array ( # 匹配的正则或函数 选填项 'where' => array ( 'aid' => 'yes', 'end' => array('yes-cdate', '<='), 'status' => 'yes', 'state' => 1, ), 'set' => array ( 'status' => 'yes', 'qdate' => 'yes', ), 'type' => 'update', ), ), );