| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359 | 
							- <?php
 
- $type = function()
 
- {
 
- 	$array = array();
 
- 	$data = Dever::load('scm_supplier/type-state');
 
- 	if($data)
 
- 	{
 
- 		$array += $data;
 
- 	}
 
- 	return $array;
 
- };
 
- $category = function()
 
- {
 
- 	$array = array();
 
- 	$data = Dever::load('scm_product/category-getTop');
 
- 	if($data)
 
- 	{
 
- 		$array += $data;
 
- 	}
 
- 	return $array;
 
- };
 
- $identity = array
 
- (
 
- 	1 => '个人',
 
- 	2 => '个体户',
 
- 	3 => '企业',
 
- );
 
- $status = array
 
- (
 
-     1 => '启用',
 
-     2 => '禁用',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'info',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '供应商列表',
 
- 	# 是否显示在后台菜单
 
- 	'order' => 11,
 
- 	# 数据结构
 
- 	'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,
 
- 		),
 
-         'code'      => array
 
-         (
 
-             'type'      => 'varchar-150',
 
-             'name'      => '供应商编码',
 
-             'default'   => '',
 
-             'desc'      => '供应商编码',
 
-             'match'     => 'is_string',
 
-             'update'    => 'text',
 
-             'search'    => 'fulltext',
 
-             'list'      => true,
 
-         ),
 
- 		'type_id'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '供应商类型',
 
-             'default'   => '1',
 
-             'desc'      => '供应商类型',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'radio',
 
-             'option'    => $type,
 
-             'list'      => true,
 
-         ),
 
-         'category'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-2000',
 
- 			'name' 		=> '商品属性分类-如不选择就是可以销售所有商品属性分类下的商品',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '商品属性分类',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'checkbox',
 
- 			'option'	=> $category,
 
- 		),
 
- 		'truename'      => array
 
-         (
 
-             'type'      => 'varchar-100',
 
-             'name'      => '联系人姓名',
 
-             'default'   => '',
 
-             'desc'      => '请输入联系人姓名',
 
-             'match'     => 'is_string',
 
-             'update'    => 'text',
 
-             'search'    => 'fulltext',
 
-             'tab'		=> 1,
 
-         ),
 
-         'tel'      => array
 
-         (
 
-             'type'      => 'varchar-50',
 
-             'name'      => '联系人电话',
 
-             'default'   => '',
 
-             'desc'      => '请输入联系人电话',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'text',
 
-             'search'    => 'fulltext',
 
-             'tab'		=> 1,
 
-         ),
 
-         'email'      => array
 
-         (
 
-             'type'      => 'varchar-50',
 
-             'name'      => '联系人邮箱',
 
-             'default'   => '',
 
-             'desc'      => '联系人邮箱',
 
-             'match'     => 'option',
 
-             '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_license'     => array
 
-         (
 
-             'type'      => 'varchar-150',
 
-             'name'      => '营业执照',
 
-             'default'   => '',
 
-             'desc'      => '营业执照',
 
-             'match'     => 'option',
 
-             'update'    => 'image',
 
-             'key'       => '8',
 
-             'place'     => '660*660',
 
-             'show'		=> 'identity=2,3',
 
-             'tab'		=> 2,
 
-         ),
 
-         'company_name'      => array
 
-         (
 
-             'type'      => 'varchar-200',
 
-             'name'      => '企业全称',
 
-             'default'   => '',
 
-             'desc'      => '企业全称',
 
-             'match'     => 'option',
 
-             //'update'    => 'text',
 
-             'show'      => 'identity=2,3',
 
-             'tab'       => 2,
 
-         ),
 
-         'company_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,
 
- 		),
 
-         'status'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '状态',
 
-             'default'   => '1',
 
-             'desc'      => '状态',
 
-             'match'     => 'is_numeric',
 
-             //'update'  => 'select',
 
-             'option'    => $status,
 
-             'search'    => 'select',
 
-             'list'      => true,
 
-             '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
 
- 	(
 
-         'delete' => false,
 
- 		'tab' => array('基本设置', '联系人信息', '认证信息'),
 
- 		'button' => array
 
-         (
 
-             //'类型配置' => array('list', 'type&oper_parent=info'),
 
-         ),
 
-         'list_button' => array
 
-         (
 
-         	'location' => array('商品设置', Dever::url('lib/set.home?project=supplier&table=goods&info=info', 'scm_product')),
 
-         )
 
- 	),
 
- 	'default' => array
 
- 	(
 
- 		'col' => 'name,code,type_id,state,cdate',
 
- 		'value' => array
 
- 		(
 
- 			'"默认供应商", "default", 1, 1,' . DEVER_TIME,
 
- 		),
 
- 	),
 
- 	'request' => array
 
- 	(
 
- 		
 
- 	)
 
- );
 
 
  |