123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- <?php
- $shop_id = Dever::input('search_option_shop_id');
- $coupon = function() use($shop_id)
- {
- $array = array();
- $info = Dever::load('shop/lib/coupon')->getData($shop_id);
-
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- return array
- (
- # 表名
- 'name' => 'coupon_act',
- # 显示给用户看的名称
- 'lang' => '活动优惠券设置',
- 'menu' => false,
- # 数据结构
- 'struct' => array
- (
-
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- 'update' => 'hidden',
- //'list' => true,
- ),
- 'shop_id' => array
- (
- 'type' => 'int-11',
- 'name' => '所属门店',
- 'default' => '',
- 'desc' => '所属门店',
- 'match' => 'is_numeric',
- 'update' => 'hidden',
- 'search' => 'hidden',
- 'value' => $shop_id,
- 'list' => 'Dever::load("shop/info-find#name", {shop_id})',
- ),
- 'act_id' => array
- (
- 'type' => 'int-11',
- 'name' => '活动名称',
- 'default' => '',
- 'desc' => '活动名称',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'list' => 'Dever::load("act/info-find#name", {act_id})',
- ),
- 'shop_coupon_id' => array
- (
- 'type' => 'varchar-500',
- 'name' => '勾选参与活动可发放的优惠券',
- 'default' => '',
- 'desc' => '勾选参与活动可发放的优惠券',
- 'match' => 'option',
- 'update' => 'checkbox',
- 'option' => $coupon,
- 'list' => true,
- ),
- '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,
- 'search' => 'date',
- 'list' => 'date("Y-m-d H:i:s", {cdate})',
- ),
- ),
- 'manage' => array
- (
-
- ),
- 'request' => array
- (
- 'getData' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'shop_id' => 'yes',
- 'act_id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('id' => 'desc'),
- 'col' => '*',
- ),
- 'getOne' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'shop_id' => 'yes',
- 'act_id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => '*',
- ),
- ),
- );
|