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', ), ), );