123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437 |
- <?php
- $type = function()
- {
- $array = array();
- $data = Dever::load('role/seller_type-state');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $seller = function()
- {
- $array = array();
- $data = Dever::load('role/seller-state');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $category = function()
- {
- $array = array();
- $data = Dever::load('product/category-getTop');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $price = function()
- {
- $array = array
- (
- -1 => '默认模板',
- );
- $data = Dever::load('product/price-state');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $sell_goods = array
- (
- 1 => '销售所有商品',
- 2 => '销售部分商品',
- );
- $identity = array
- (
- 1 => '个人',
- 2 => '个体户',
- 3 => '企业',
- );
- $stock = array
- (
- 1 => '独立库存',
- 2 => '共享库存',
- );
- $account = function() {
- return Dever::load('account/api')->getConfig('role/seller');
- };
- return array
- (
- # 表名
- 'name' => 'seller',
- # 显示给用户看的名称
- 'lang' => '销售商',
- # 是否显示在后台菜单
- 'order' => 10,
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => '销售商ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'list' => true,
- 'order' => 'asc',
- ),
- 'name' => array
- (
- 'type' => 'varchar-150',
- 'name' => '销售商名称',
- 'default' => '',
- 'desc' => '销售商名称',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- 'edit' => true,
- ),
- 'info' => array
- (
- 'type' => 'varchar-800',
- 'name' => '销售商介绍',
- 'default' => '',
- 'desc' => '销售商介绍',
- 'match' => 'option',
- 'update' => 'textarea',
- ),
- 'type_id' => array
- (
- 'type' => 'int-11',
- 'name' => '销售商类型',
- 'default' => '1',
- 'desc' => '销售商类型',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $type,
- 'list' => true,
- ),
- 'account' => array
- (
- 'type' => 'varchar-800',
- 'name' => '选择账户',
- 'default' => '',
- 'desc' => '选择账户',
- 'match' => 'is_string',
- 'update' => 'checkbox',
- 'option' => $account,
- 'list_name' => '账户信息',
- 'list' => 'Dever::load("account/api.getInfo", {id}, "{account}")',
- ),
- 'stock' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '库存设置-如果商品有库存,这里设置库存是否独立或共享,独立库存就是该销售商自己使用一套库存,共享库存就是和其他销售商共享一套库存',
- 'default' => '1',
- 'desc' => '库存设置',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $stock,
- 'control' => 'stock',
- ),
- 'stock_seller' => array
- (
- 'type' => 'int-11',
- 'name' => '共享销售商-选择和哪个销售商共享一套库存',
- 'default' => '-1',
- 'desc' => '共享销售商',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $seller,
- 'show' => 'stock=2'
- ),
- 'category' => array
- (
- 'type' => 'varchar-2000',
- 'name' => '商品属性分类-如不选择就是可以销售所有商品属性分类下的商品',
- 'default' => '',
- 'desc' => '商品属性分类',
- 'match' => 'is_string',
- 'update' => 'checkbox',
- 'option' => $category,
- ),
- 'price_id' => array
- (
- 'type' => 'int-11',
- 'name' => '商品价格模板',
- 'default' => '-1',
- 'desc' => '商品价格模板',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $price,
- ),
- 'commission' => array
- (
- 'type' => 'varchar-20',
- 'name' => '销售佣金调整-针对每个商品的销售佣金做统一调整,如填写5%,就是在原有销售佣金的基础上增加5%佣金,设置为0,则不做任何调整,设置为n,则佣金为0',
- 'default' => '0',
- 'desc' => '销售佣金调整',
- 'match' => 'is_string',
- 'update' => 'text',
- ),
- 'truename' => array
- (
- 'type' => 'varchar-100',
- 'name' => '联系人姓名',
- 'default' => '',
- 'desc' => '请输入联系人姓名',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'tab' => 1,
- ),
- 'mobile' => array
- (
- 'type' => 'bigint-11',
- 'name' => '联系人电话',
- 'default' => '',
- 'desc' => '请输入联系人电话',
- 'match' => 'is_numeric',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'tab' => 1,
- ),
- 'area' => array
- (
- 'type' => 'varchar-500',
- 'name' => '联系人城市',
- 'default' => '',
- 'desc' => '联系人城市',
- 'match' => 'option',
- 'search' => 'linkage',
- 'update' => 'linkage',
- 'option' => Dever::url('api.get?level_total=3', 'area'),
- //'list' => 'Dever::load("area/api.string", "{area}")',
- 'tab' => 1,
- ),
- 'province' => array
- (
- 'type' => 'int-11',
- 'name' => '省份',
- 'default' => '',
- 'desc' => '省份',
- 'match' => 'option',
- //'update' => 'text',
- 'tab' => 1,
- ),
- 'city' => array
- (
- 'type' => 'int-11',
- 'name' => '城市',
- 'default' => '',
- 'desc' => '城市',
- 'match' => 'option',
- //'update' => 'text',
- 'tab' => 1,
- ),
- 'county' => array
- (
- 'type' => 'int-11',
- 'name' => '县区',
- 'default' => '',
- 'desc' => '县区',
- 'match' => 'option',
- //'update' => 'text',
- 'tab' => 1,
- ),
- 'address' => array
- (
- 'type' => 'varchar-1000',
- 'name' => '联系人地址',
- 'default' => '',
- 'desc' => '联系人地址',
- 'match' => 'option',
- 'update' => 'text',
- //'list' => true,
- 'tab' => 1,
- ),
- 'identity' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '销售商身份',
- 'default' => '1',
- 'desc' => '销售商身份',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $identity,
- 'control' => 'identity',
- 'tab' => 2,
- ),
- 'idcard_front' => array
- (
- 'type' => 'varchar-150',
- 'name' => '身份证正面-如果是个人,这里上传联系人身份证,如果是个体户或者企业,这里上传法人身份证',
- 'default' => '',
- 'desc' => '身份证正面',
- 'match' => 'option',
- 'update' => 'image',
- 'key' => '8',
- 'place' => '660*660',
- 'tab' => 2,
- ),
- 'idcard_back' => array
- (
- 'type' => 'varchar-150',
- 'name' => '身份证背面-如果是个人,这里上传联系人身份证,如果是个体户或者企业,这里上传法人身份证',
- 'default' => '',
- 'desc' => '身份证背面',
- 'match' => 'option',
- 'update' => 'image',
- 'key' => '8',
- 'place' => '660*660',
- 'tab' => 2,
- ),
- 'company_name' => array
- (
- 'type' => 'varchar-200',
- 'name' => '企业名称',
- 'default' => '',
- 'desc' => '企业名称',
- 'match' => 'option',
- 'update' => 'text',
- 'show' => 'identity=2,3',
- 'tab' => 2,
- ),
- 'company_license' => array
- (
- 'type' => 'varchar-150',
- 'name' => '企业营业执照',
- 'default' => '',
- 'desc' => '企业营业执照',
- 'match' => 'option',
- 'update' => 'image',
- 'key' => '8',
- 'place' => '660*660',
- 'show' => 'identity=2,3',
- 'tab' => 2,
- ),
- 'company_license_number' => array
- (
- 'type' => 'varchar-200',
- 'name' => '企业营业执照号码',
- 'default' => '',
- 'desc' => '营业执照号码',
- 'match' => 'option',
- 'update' => 'text',
- 'show' => 'identity=2,3',
- 'tab' => 2,
- ),
- 'reorder' => array
- (
- 'type' => 'int-11',
- 'name' => '排序(数值越大越靠前)',
- 'default' => '1',
- 'desc' => '请输入排序',
- 'match' => 'option',
- //'update' => 'text',
- 'search' => 'order',
- 'list_name' => '排序',
- 'list' => true,
- 'order' => 'desc',
- 'edit' => 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
- (
- 'tab' => array('基本设置', '联系人信息', '认证信息'),
- 'button' => array
- (
- '类型配置' => array('list', 'seller_type&oper_parent=seller'),
- ),
- 'list_button' => array
- (
- 'location' => array('商品列表', Dever::url('lib/seller.setGoods', 'role')),
- 'fast_add' => array('账户操作', 'push&project=account&oper_table=seller&oper_project=role&uid={id}'),
- )
- ),
- 'default' => array
- (
- 'col' => 'name,type_id,state,cdate',
- 'value' => array
- (
- '"平台销售", 1, 1,' . DEVER_TIME,
- ),
- ),
- 'request' => array
- (
- 'like' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'name' => array('yes', 'like'),
- 'id' => 'yes',
- //'status' => 1,
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('reorder' => 'desc', 'id' => 'desc'),
- 'col' => '*|id',
- ),
- )
- );
|