123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <?php
- $shop = function()
- {
- $array = array();
- $data = Dever::db('shop/info-state');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- return array
- (
- # 表名
- 'name' => 'area_entry',
- # 显示给用户看的名称
- 'lang' => '区域分润录入',
- 'order' => 79,
- 'menu' => 'agent',
- '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' => 'day',
- 'list' => 'date("Y-m", {month})',
- ),
- // 'area' => array
- // (
- // 'type' => 'varchar-500',
- // 'name' => '区域',
- // 'default' => '',
- // 'desc' => '区域',
- // 'match' => 'option',
- // 'update' => 'linkage',
- // 'list' => 'Dever::load("area/api.string", "{area}")',
- // 'option' => Dever::url('api.get?level_total=4', 'area'),
- // ),
- 'shop_id' => array
- (
- 'type' => 'int-11',
- 'name' => '店铺名称/店铺编号',
- 'default' => '',
- 'desc' => '店铺名称',
- 'match' => 'is_numeric',
- 'option' => $shop,
- 'search' => array
- (
- 'api' => 'shop/info-like',
- 'col' => '*',
- 'result' => 'id',
- ) ,
- 'list_name' => '门店信息',
- 'list' => 'Dever::load("mail/lib/manage.entry_member", {id})',
- 'list_order' => 2,
- ),
- 'sid' => array
- (
- 'type' => 'varchar-30',
- 'name' => '店铺编号-一般为5位数字,不能重复',
- 'default' => '',
- 'desc' => '店铺编号',
- 'match' => 'is_string',
- 'update' => 'text',
- # 绑定js脚本,更新时使用,第一个参数是执行的方式,第二个参数执行的方法,第三个参数是传值。
- 'bind' => array('onblur', 'loading', array('url' => Dever::url("shop/lib/record.search"))),
- ),
- 'num' => array
- (
- 'type' => 'decimal-11',
- 'name' => '店铺数量',
- 'default' => '0',
- 'desc' => '店铺数量',
- 'match' => 'is_numeric',
- // 'update' => 'text',
- // 'list' => true,
- ),
- 'cprice' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '毛利',
- 'default' => '0',
- 'desc' => '采购金额',
- 'match' => 'is_numeric',
- 'update' => 'text',
- 'list' => true,
- 'list_order' => 4,
- ),
- 'price' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '分润金额',
- 'default' => '0',
- 'desc' => '分润金额',
- 'match' => 'is_numeric',
- // 'update' => 'text',
- // 'list' => true,
- 'list_order' => 5,
- ),
- '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' => true,
- ),
- 'request' => array
- (
- 'getNewAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-month','>='),
- 'end' => array('yes-month','<='),
- // 'area' => array('yes','like'),
- 'state' => 1,
- ),
-
- 'type' => 'all',
- 'col' => '*',
- ),
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-month','>='),
- 'end' => array('yes-month','<='),
- // 'area' => array('yes','like'),
- 'state' => 1,
- ),
-
- 'type' => 'all',
- 'col' => 'id,area',
- ),
- 'getNum' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-month','>='),
- 'end' => array('yes-month','<='),
- 'area' => array('yes','like'),
- 'state' => 1,
- ),
-
- 'type' => 'one',
- 'col' => 'sum(num) as num',
- ),
- 'getPrice' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-month','>='),
- 'end' => array('yes-month','<='),
- 'area' => array('yes','like'),
- 'state' => 1,
- ),
-
- 'type' => 'one',
- 'col' => 'sum(cprice) as cprice',
- ),
- ),
- );
|