123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <?php
- $company = function()
- {
- $array = array();
- $data = Dever::db('manage/company')->state();
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- # 常用的col
- $col = '*';
- return array
- (
- # 表名
- 'name' => 'company',
- # 显示给用户看的名称
- 'lang' => '期权公司配置',
- 'order' => -100,
- 'check' => 'company_id',
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'list' => true,
- ),
-
- 'company_id' => array
- (
- 'type' => 'int-11',
- 'name' => '选择公司',
- 'default' => '',
- 'desc' => '公司名称',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'list_name' => '公司名称',
- 'option' => $company,
- 'list' => true,
- 'search' => 'select',
- ),
- 'agreement_name' => array
- (
- 'type' => 'varchar-500',
- 'name' => '合同名称-变量说明:{name}是姓名,{date}签署时间',
- 'default' => '',
- 'desc' => '合同名称',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'option-company_qiquan'=> array
- (
- 'name' => '期权类型设置',
- 'default' => '',
- 'desc' => '期权类型设置',
- 'match' => 'option',
- # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
- 'sync' => array('id', 'company_id'),
- # 根据category字段的值,获取product/attr.search接口的内容
- 'update' => array(1),
- ),
- /*
- 'qiquan' => array
- (
- 'type' => 'text-1000',
- 'name' => '期权类型设置',
- 'default' => '',
- 'desc' => '期权类型设置',
- 'match' => 'is_string',
- 'update' => array
- (
- array
- (
- 'col' => 'name',
- 'name' => '类型名称',
- 'default' => '',
- 'desc' => '类型名称',
- 'match' => 'is_string',
- 'update' => 'textarea',
- ),
- ),
- ),
- */
-
- '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,
- 'list' => 'date("Y-m-d H:i", {cdate})',
- ),
- ),
- 'default' => array
- (
- 'col' => 'id,company_id,agreement_name, state,cdate',
- 'value' => array
- (
- '1, 1, "{name}期权交付合同.{date}.pdf", 1,' . DEVER_TIME,
- ),
- ),
-
- # 管理功能
- 'manage' => array
- (
- 'delete' => false,
- ),
- 'request' => array
- (
- 'getIds' => array
- (
- 'type' => 'all',
- 'option' => array
- (
- 'ids' => array('yes-id', 'in'),
- 'state' => 1,
- ),
- 'order' => array('id' => 'desc'),
- 'col' => '*|id',
- ),
- ),
- );
|