|
@@ -0,0 +1,154 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+$attr = function()
|
|
|
+{
|
|
|
+ $auth = Dever::load('attr/api.get', false);
|
|
|
+ return $auth;
|
|
|
+};
|
|
|
+
|
|
|
+return array
|
|
|
+(
|
|
|
+
|
|
|
+ 'name' => 'supply',
|
|
|
+
|
|
|
+ 'lang' => '供应管理',
|
|
|
+
|
|
|
+ 'order' => 100,
|
|
|
+
|
|
|
+
|
|
|
+ 'sync' => array
|
|
|
+ (
|
|
|
+ 'sad/supply_area' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'where' => array('supply_id', 'id'),
|
|
|
+
|
|
|
+ 'update' => array('area_id' => 'area'),
|
|
|
+
|
|
|
+ 'type' => 'delete',
|
|
|
+ ),
|
|
|
+ 'sad/supply_category' => array
|
|
|
+ (
|
|
|
+ 'where' => array('supply_id', 'id'),
|
|
|
+ 'update' => array('category_id' => 'category'),
|
|
|
+ 'type' => 'delete',
|
|
|
+ )
|
|
|
+ ),
|
|
|
+
|
|
|
+
|
|
|
+ 'struct' => array
|
|
|
+ (
|
|
|
+ 'id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => 'ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'order' => 'asc',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'name' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-150',
|
|
|
+ 'name' => '标题',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '标题',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'search' => 'fulltext',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'area' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-100',
|
|
|
+ 'name' => '地区',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '地区',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'search' => 'linkage',
|
|
|
+ 'update' => 'linkage',
|
|
|
+ 'option' => Dever::url('api.get', 'area'),
|
|
|
+ 'list' => 'Dever::load("area/api.string", "{area}")',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'category' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-500',
|
|
|
+ 'name' => '分类',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '分类',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'search' => 'linkage',
|
|
|
+ 'update' => 'linkage',
|
|
|
+ 'option' => Dever::url('api.get', 'category'),
|
|
|
+ 'list' => 'Dever::load("category/api.string", "{category}")',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'attr' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-800',
|
|
|
+ 'name' => '属性设置',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '属性设置',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'checkbox',
|
|
|
+ 'option' => $attr,
|
|
|
+ 'update_input' => '',
|
|
|
+ 'update_input_default' => '',
|
|
|
+ 'update_parent' => 'checkbox',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'attr_input' => array
|
|
|
+ (
|
|
|
+ 'type' => 'text-255',
|
|
|
+ 'name' => '属性值设置',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '属性值设置',
|
|
|
+ 'match' => 'option',
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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' => true,
|
|
|
+ 'search' => 'date',
|
|
|
+ 'list' => 'date("Y-m-d H:i:s", {cdate})',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'manage' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ ),
|
|
|
+);
|