123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317 |
- <?php
- $config = array
- (
-
- 'name' => 'supplier_goods_sku',
-
- 'lang' => '商品价格设置',
- 'order' => 200,
- 'menu' => false,
-
-
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
-
- ),
- 'supplier_id' => array
- (
- 'type' => 'int-11',
- 'name' => '所属供应商',
- 'default' => '',
- 'desc' => '所属供应商',
- 'match' => 'is_numeric',
- 'update' => 'hidden',
- 'search' => 'hidden',
- 'value' => Dever::input('search_option_supplier_id'),
- 'list' => 'Dever::load("scm_role/supplier-one#name", {supplier_id})',
- ),
- 'goods-info_sku-code'=> array
- (
- 'name' => '商品编码',
- 'default' => '',
- 'desc' => '商品编码',
- 'match' => 'option',
-
- 'sync' => array('sku_id', 'id', 'goods_id', 'info_id', 'key'),
- 'list' => true,
- 'list_order' => 4,
- ),
- 'goods_id' => array
- (
- 'type' => 'int-11',
- 'name' => '商品名称',
- 'default' => '',
- 'desc' => '商品名称',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'update_search' => 'scm_product/lib/manage.search',
- 'list' => 'Dever::load("scm_product/info-one#name", {goods_id})',
- ),
- 'sku_id' => array
- (
- 'type' => 'int-11',
- 'name' => '规格型号',
- 'default' => '-1',
- 'desc' => '规格型号',
- 'match' => 'is_numeric',
- ),
- 'cost_price' => array
- (
- 'type' => 'varchar-100',
- 'name' => '成本价',
- 'default' => '',
- 'desc' => '成本价',
- 'match' => 'option',
- 'update' => 'text',
-
- ),
- 'in_num' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '入库库存',
- 'default' => '0',
- 'desc' => '入库库存',
- 'match' => 'is_numeric',
- ),
- 'out_num' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '出库库存',
- 'default' => '0',
- 'desc' => '出库库存',
- 'match' => 'option',
- ),
- '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' => true,
-
-
- ),
- ),
- 'manage' => array
- (
- 'insert' => false,
- 'edit' => false,
- 'delete' => false,
-
- 'page_list_table' => 'sku',
- ),
-
- 'request' => array
- (
- 'getDataPage' => array
- (
-
- 'option' => array
- (
- 'seller_id' => array('yes-t_1.seller_id'),
- 'name' => array('yes-t_2.name', 'like'),
- 'total' => array('yes|t_1.in_num-t_1.out_num', '<'),
- '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' => array('yes-t_2.status', 1),
- 'state' => array('yes-t_2.state', 1),
- 'state_1' => array('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', 't_2.price' => 'asc'),
- 'page' => array(30, 'list'),
- 'col' => '*,t_2.name,t_2.pic,t_2.video,t_2.id as id,t_1.in_num-t_1.out_num as total,t_1.out_num',
- ),
- 'getData' => array
- (
-
- 'option' => array
- (
- 'seller_id' => array('yes-t_1.seller_id'),
- 'name' => array('yes-t_2.name', 'like'),
- 'total' => array('yes|t_1.in_num-t_1.out_num', '<'),
- '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' => array('yes-t_2.status', 1),
- 'state' => array('yes-t_2.state', 1),
- 'state_1' => array('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', 't_2.price' => 'asc'),
- 'col' => '*,t_2.name,t_2.pic,t_2.video,t_2.id as id,t_1.in_num-t_1.out_num as total,t_1.out_num',
- ),
-
- 'getList' => array
- (
-
- 'option' => array
- (
- 'shop_id' => 'yes',
- 'goods_id' => 'yes',
- 'sku_id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('id' => 'desc'),
- 'col' => '*,in_num-out_num as total|sku_id',
- ),
-
- 'getOne' => array
- (
-
- 'option' => array
- (
- 'shop_id' => 'yes',
- 'goods_id' => 'yes',
- 'sku_id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => '*,in_num-out_num as total',
- ),
-
- 'incSell' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'shop_id' => 'yes',
- 'goods_id' => 'yes',
- 'sku_id' => 'yes',
- ),
- 'set' => array
- (
- 'out_num' => array('yes', '+='),
- ),
- ),
-
- 'decSell' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'shop_id' => 'yes',
- 'goods_id' => 'yes',
- 'sku_id' => 'yes',
- ),
- 'set' => array
- (
- 'out_num' => array('yes', '-='),
- ),
- ),
-
- 'updateTotal' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'in_num' => array('yes', '+='),
- ),
- ),
-
- 'incTotal' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'shop_id' => 'yes',
- 'goods_id' => 'yes',
- 'sku_id' => 'yes',
- ),
- 'set' => array
- (
- 'in_num' => array('yes', '+='),
- ),
- ),
-
- 'decTotal' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'shop_id' => 'yes',
- 'goods_id' => 'yes',
- 'sku_id' => 'yes',
- ),
- 'set' => array
- (
- 'in_num' => array('yes', '-='),
- ),
- ),
- ),
- );
- return $config;
|