123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <?php
- $excel = false;
- $button = array();
- if (Dever::load('manage/auth')->checkFunc('agent.mail.area_entry', 'editareaentry', '数据导出')) {
- $excel[] = array('数据导出','数据导出','mail/lib/manage.out_area_entry');
- $button['数据导入'] = array('fast', '', 'import&project=upload&call=mail/lib/manage.import');
- }
- return array
- (
- # 表名
- 'name' => 'area_entry',
- # 显示给用户看的名称
- 'lang' => '区域分润录入',
- 'order' => 79,
- 'menu' => 'agent',
- 'info' => '点击“数据导出”,下载下来的表格就是“数据导入”的模板,请删除表格里的数据,然后按照表格里的内容填写点击“数据导入”上传即可',
- 'end' => array
- (
- //'insert' => 'mail/lib/manage.updateArea_entry',
- ),
- # 数据结构
- 'struct' => array
- (
-
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- //'list' => true,
- ),
- 'month' => array
- (
- 'type' => 'int-11',
- 'name' => '月份',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- 'update' => 'month',
- 'search' => 'month_eq',
- 'callback' => 'maketime',
- 'list' => 'date("Y-m", {month})',
- ),
- 'shop_id' => array
- (
- 'type' => 'int-11',
- 'name' => '店铺名称/店铺编号',
- 'default' => '',
- 'desc' => '店铺名称',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'update_search' => 'shop/lib/manage.search_l_shop',
- 'search' => array
- (
- 'api' => 'shop/info-like',
- 'col' => '*',
- 'result' => 'id',
- ) ,
- 'list_name' => '门店信息',
- 'list' => 'Dever::load("mail/lib/manage.entry_member", {id})',
- 'list_order' => 2,
- ),
- 'buy' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '毛利',
- 'default' => '0',
- 'desc' => '采购金额',
- 'match' => 'is_numeric',
- 'update' => 'text',
- 'list' => true,
- 'list_order' => 4,
- ),
- 'state' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '状态',
- 'default' => '1',
- 'desc' => '请选择状态',
- 'match' => 'is_numeric',
- ),
-
- 'cdate' => array
- (
- 'type' => 'int-11',
- 'name' => '统计时间',
- 'match' => array('is_numeric', time()),
- 'desc' => '',
- ),
- ),
- 'manage' => array
- (
- // 'insert' => false,
- 'delete' => false,
- // 'edit' => false,
- 'excel' => $excel,
- 'button' => $button,
- ),
- 'request' => array
- (
- 'getBuy' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-month','>='),
- 'end' => array('yes-month','<='),
- 'shop_id' => array('yes','in'),
- 'state' => 1,
- ),
-
- 'type' => 'all',
- 'col' => '*',
- ),
- 'getBuyTotal' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-month','>='),
- 'end' => array('yes-month','<='),
- 'shop_id' => 'yes',
- 'state' => 1,
- ),
-
- 'type' => 'one',
- 'col' => 'sum(buy) as total',
- ),
- ),
- );
|