| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286 | 
							- <?php
 
- return array
 
- (
 
-     # 表名
 
-     'name' => 'shop_goods',
 
-     # 显示给用户看的名称
 
-     'lang' => '门店商品列表',
 
-     'order' => 10,
 
-     'menu'  => false,
 
-     # 数据结构
 
-     'struct' => array
 
-     (
 
-     
 
-         'id'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => 'ID',
 
-             'default'   => '',
 
-             'desc'      => '',
 
-             'match'     => 'is_numeric',
 
-             'search'    => 'order',
 
-             'update'    => 'hidden',
 
-             //'list'        => true,
 
-         ),
 
-         'seller_shop_id'      => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '经销商门店',
 
-             'default'   => '',
 
-             'desc'      => '经销商门店',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'hidden',
 
-             'search'    => 'hidden',
 
-             'value'     => Dever::input('search_option_seller_shop_id'),
 
-             'list'      => 'Dever::load("scm_seller/shop-one#name", {seller_shop_id})',
 
-         ),
 
-         'scm_product-info_sku-code'=> array
 
-         (
 
-             'name'      => '商品编码',
 
-             'default'   => '',
 
-             'desc'      => '商品编码',
 
-             'match'     => 'option',
 
-             # 读取另外表的关联方式
 
-             'sync'      => array('sku_id', 'id', 'goods_id', 'info_id', 'key'),
 
-             'search'    => array
 
-             (
 
-                 'api' => 'scm_product/info_sku-all',
 
-                 'col' => 'code',
 
-                 'result' => 'id',
 
-                 'search' => 'sku_id',
 
-             ),
 
-             'list'      => true,
 
-         ),
 
-         'goods_id'      => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '商品名称',
 
-             'default'   => '',
 
-             'desc'      => '商品名称',
 
-             'match'     => 'is_numeric',
 
-             'search'    => array
 
-             (
 
-                 'api' => 'scm_product/info-all',
 
-                 'col' => 'name',
 
-                 'result' => 'id',
 
-                 'search' => 'goods_id',
 
-             ),
 
-             'update'    => 'select',
 
-             'update_search' => 'scm_product/lib/manage.search',
 
-             'list'      => 'Dever::load("scm_product/lib/info.getBaseInfo#aname", "{goods_id}", "{sku_id}")',
 
-         ),
 
-         'sku_id'      => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '规格型号',
 
-             'default'   => '-1',
 
-             'desc'      => '规格型号',
 
-             'match'     => 'is_numeric',
 
-         ),
 
-         'unit_id'      => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '基本单位',
 
-             'default'   => '',
 
-             'desc'      => '基本单位',
 
-             'match'     => 'is_numeric',
 
-             'list'      => 'Dever::load("scm/unit-one#name", {unit_id})',
 
-         ),
 
-         'cash'      => array
 
-         (
 
-             'type'      => 'decimal-11,2',
 
-             'name'      => '入库均价',
 
-             'default'   => '',
 
-             'desc'      => '入库均价',
 
-             'match'     => 'option',
 
-             'list'      => true,
 
-         ),
 
-         'in_num'        => array
 
-         (
 
-             'type'      => 'decimal-11,2',
 
-             'name'      => '入库总库存',
 
-             'default'   => '0',
 
-             'desc'      => '入库总库存',
 
-             'match'     => 'is_numeric',
 
-             'list'      => true,
 
-         ),
 
-         'out_num'      => array
 
-         (
 
-             'type'      => 'decimal-11,2',
 
-             'name'      => '出库总库存',
 
-             'default'   => '0',
 
-             'desc'      => '出库总库存',
 
-             'match'     => 'option',
 
-             '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
 
-     (
 
-         'insert' => false,
 
-         'edit' => false,
 
-         'delete' => false,
 
-         'list_button' => array
 
-         (
 
-             'list' => array('查看详情', '"shop_goods_list&oper_table=shop_goods&top_table=info&search_option_shop_goods_id={id}"'),
 
-         ),
 
-     ),
 
-     'request' => array
 
-     (
 
-         # 后台搜索用到,也可以不加,自动生成
 
-         'search' => array
 
-         (
 
-             # 匹配的正则或函数 选填项
 
-             'option' => array
 
-             (
 
-                 'name' => array('yes-t_2.name', 'like'),
 
-                 'seller_shop_id' => array('yes-t_1.seller_shop_id'),
 
-                 'status' => 'yes-t_2.status-1',
 
-                 'state' => 'yes-t_2.state-1',
 
-                 'state_1' => 'yes-t_1.state-1',
 
-             ),
 
-             # 联表
 
-             'join' => array
 
-             (
 
-                 array
 
-                 (
 
-                     'table' => 'scm_product/info',
 
-                     'type' => 'left join',
 
-                     'on' => array('goods_id','id'),
 
-                     'col' => 'goods_id',
 
-                 ),
 
-             ),
 
-             'type' => 'all',
 
-             'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'),
 
-             'page' => array(10, 'list'),
 
-             'col' => '*, t_2.*,t_2.id as value, "" as selected, "" as disabled',
 
-         ),
 
-         'getData' => array
 
-         (
 
-             # 匹配的正则或函数 选填项
 
-             'option' => array
 
-             (
 
-                 'seller_shop_id' => array('yes-t_1.seller_shop_id'),
 
-                 'sell_type' => array('yes-t_2.sell_type'),
 
-                 'name' => array('yes-t_2.name', 'like'),
 
-                 'category' => array('yes-t_2.category', 'like'),
 
-                 'top_category_id' => array('yes-t_2.top_category_id'),
 
-                 'second_category_id' => array('yes-t_2.second_category_id'),
 
-                 'category_id' => array('yes-t_2.category_id'),
 
-                 'status' => 'yes-t_2.status-1',
 
-                 'state' => 'yes-t_2.state-1',
 
-                 'state_1' => 'yes-t_1.state-1',
 
-             ),
 
-             # 联表
 
-             'join' => array
 
-             (
 
-                 array
 
-                 (
 
-                     'table' => 'scm_product/info',
 
-                     'type' => 'left join',
 
-                     'on' => array('goods_id','id'),
 
-                     'col' => 'goods_id',
 
-                 ),
 
-             ),
 
-             'type' => 'all',
 
-             'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'),
 
-             'col' => 'id,name,category,pic,content,video,type,unit,spec_type,goods,commission,pay_money,money_id,score_id,sell_type,buy_type,udate,cdate',
 
-         ),
 
-         'getDataPage' => array
 
-         (
 
-             # 匹配的正则或函数 选填项
 
-             'option' => array
 
-             (
 
-                 'seller_shop_id' => array('yes-t_1.seller_shop_id'),
 
-                 'sell_type' => array('yes-t_2.sell_type'),
 
-                 'name' => array('yes-t_2.name', 'like'),
 
-                 'category' => array('yes-t_2.category', 'like'),
 
-                 'top_category_id' => array('yes-t_2.top_category_id'),
 
-                 'second_category_id' => array('yes-t_2.second_category_id'),
 
-                 'category_id' => array('yes-t_2.category_id'),
 
-                 'status' => 'yes-t_2.status-1',
 
-                 'state' => 'yes-t_2.state-1',
 
-                 'state_1' => 'yes-t_1.state-1',
 
-             ),
 
-             # 联表
 
-             'join' => array
 
-             (
 
-                 array
 
-                 (
 
-                     'table' => 'scm_product/info',
 
-                     'type' => 'left join',
 
-                     'on' => array('goods_id','id'),
 
-                     'col' => 'goods_id',
 
-                 ),
 
-             ),
 
-             'type' => 'all',
 
-             'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'),
 
-             'page' => array(10, 'list'),
 
-             'col' => 'id,name,category,pic,content,video,type,unit,spec_type,goods,commission,pay_money,money_id,score_id,sell_type,buy_type,udate,t_1.cdate,t_1.id as id',
 
-         ),
 
-         # 获取某个sku的单条数据
 
-         'getOne' => array
 
-         (
 
-             # 匹配的正则或函数 选填项
 
-             'option' => array
 
-             (
 
-                 'seller_shop_id' => 'yes',
 
-                 'goods_id' => 'yes',
 
-                 'sku_id' => 'yes',
 
-                 'state' => 1,
 
-             ),
 
-             'type' => 'one',
 
-             'col' => '*,(sum(in_num)-sum(out_num)) as total,AVG(cash) as cash',
 
-         ),
 
-         # 获取单位下的数据
 
-         'getUnit' => array
 
-         (
 
-             # 匹配的正则或函数 选填项
 
-             'option' => array
 
-             (
 
-                 'seller_shop_id' => 'yes',
 
-                 'goods_id' => 'yes',
 
-                 'sku_id' => 'yes',
 
-                 'state' => 1,
 
-             ),
 
-             'type' => 'all',
 
-             'col' => '*,(in_num-out_num) as total|unit_id',
 
-         ),
 
-     ),
 
- );
 
 
  |