123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416 |
- <?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');
- $mid = Dever::input('search_option_mid');
- $oper_table = Dever::input('oper_table');
- $button = array();
- if (!$oper_table && $aid) {
- $option_aid = $aid;
- $search_auth = Dever::input('search_auth');
- if ($search_auth) {
- $option_aid .= '&search_auth=' . $search_auth;
- }
- $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,
- ),
- 'option-member-company_id'=> array
- (
- 'name' => '所属公司',
- 'default' => '',
- 'desc' => '所属公司',
- 'match' => 'option',
- # 读取另外表的关联方式
- 'sync' => array('mid', 'id'),
- ),
- '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' => $aid ? 'hidden' : array
- (
- 'api' => 'option/member-getMain',
- 'col' => 'mobile',
- 'result' => 'aid',
- 'search' => 'aid',//本表的字段,默认为当前的字段
- ),
- 'list_name' => '主账户',
- 'list' => 'Dever::load("option/lib/account.getInfo", {aid})',
- 'list_order' => 3,
- ),
- 'mid' => array
- (
- 'type' => 'int-11',
- 'name' => '子账号手机号',
- 'default' => '-1',
- 'desc' => '期权账户',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => $mid ? 'hidden' : array
- (
- 'api' => 'option/member-getChild',
- 'col' => 'mobile',
- 'result' => 'id',
- 'search' => 'mid',//本表的字段,默认为当前的字段
- ),
- 'list_name' => '子账户',
- 'list' => 'Dever::load("option/lib/member.getInfo", {mid})',
- 'list_order' => 3,
- ),
- 'cash' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '账户操作',
- 'default' => '0',
- 'desc' => '账户操作',
- 'match' => 'is_numeric',
- //'update' => 'text',
- 'list' => '"+{cash}"',
- 'list_order' => 4,
- ),
- 'sign' => array
- (
- 'type' => 'varchar-150',
- 'name' => '签字',
- 'default' => '',
- 'desc' => '签字',
- 'match' => 'option',
- 'update' => 'image',
- 'key' => '7',
- //'list' => '"<img src=\'{sign}\' width=\'150\'>"',
- //'list_order' => 5,
- ),
- 'agreement_id' => array
- (
- 'type' => 'int-11',
- 'name' => '合同id',
- 'default' => '',
- 'desc' => '合同id',
- 'match' => 'is_numeric',
- ),
- 'status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '交付确认',
- 'default' => '2',
- 'desc' => '交付确认',
- 'match' => 'is_numeric',
- 'option' => $status,
- 'search' => 'select',
- '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#username", {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' => 'date("Y-m-d H:i:s", {cdate})',
- 'list_order' => 2,
- ),
- ),
- 'alter' => array
- (
- 5 => array
- (
- array('update', 'cash', 'cash', 'decimal-11,2 0 期权操作'),
- ),
- 'version' => 5,
- ),
- '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'),
- ),
- 'company' => array
- (
- 'col' => 'company_id',
- 'join' => array
- (
- 'table' => 'option/member',
- 'type' => 'left join',
- 'on' => array('mid', 'id'),
- ),
- ),
- ),
- 'request' => array
- (
- 'getData' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'aid' => 'yes',
- 'mid' => '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',
- 'mid' => 'yes',
- 'type' => 'yes',
- 'end' => array('yes-cdate', '<='),
- 'status' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(cash) as total',
- ),
- 'upYes' => array
- (
- # 匹配的正则或函数 选填项
- 'where' => array
- (
- 'aid' => 'yes',
- 'mid' => 'yes',
- 'type' => 'yes',
- 'end' => array('yes-cdate', '<='),
- 'status' => 'yes',
- 'state' => 1,
- ),
- 'set' => array
- (
- 'status' => 'yes',
- 'qdate' => 'yes',
- 'agreement_id' => 'yes',
- ),
- 'type' => 'update',
- ),
- #获取所有数据
- 'getCount' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'state' => 1,
- 'status' =>'yes',
- ),
- // 'order' => array('id' => 'desc'),
- 'type' => 'count',
- 'group' => 'mid',
- 'col' => '*',
- ),
- 'getCash' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'type' => 'yes',
- 'status' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(cash) as total',
- ),
- 'getSearch' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'mid' => 'yes',
- 'aid' => 'yes',
- 'type' => 'yes',
- 'status' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(cash) as total',
- ),
- ),
- );
|