'合作中', 2 => '已终止合作', 3 => '申请合作中', ); $type = array ( 1 => '普通店', 2 => '平台店', ); $act = function() { $array = array(); $info = Dever::db('act/info')->select(); if($info) { $array += $info; } return $array; }; $yes = array ( 1 => '可用', 2 => '不可用', ); $open = array ( 1 => '开启', 2 => '关闭', ); $method = array ( 1 => '自提', 2 => '外送', 3 => '以上全支持', ); return array ( # 表名 'name' => 'info', # 显示给用户看的名称 'lang' => '门店列表', # 后台菜单排序 'order' => 99, 'act' => $act, 'end' => array ( 'insert' => 'shop/lib/manage.infoUpdate', 'update' => 'shop/lib/manage.infoUpdate', ), # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', 'list' => true, 'order' => 'desc', ), 'hr1' => array ( 'name' => '门店基本信息', 'class' => '',//本项必须填写 'attr' => '', ), 'uid' => array ( 'type' => 'int-11', 'name' => '用户名', 'default' => '0', 'desc' => '请选择用户', 'match' => 'is_numeric', //'update' => 'text', //'search' => 'select', 'searchs' => array ( 'api' => 'passport/user-select', 'col' => 'username', 'result' => 'id', ), //'list' => '{uid} > 0 ? Dever::load("passport/user-find#username", {uid}) : "匿名用户"', ), 'name' => array ( 'type' => 'varchar-32', 'name' => '门店名称', 'default' => '', 'desc' => '请输入门店名称', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'desc' => array ( 'type' => 'varchar-800', 'name' => '门店介绍', 'default' => '', 'desc' => '门店介绍', 'match' => 'is_string', 'update' => 'textarea', ), 'truename' => array ( 'type' => 'varchar-100', 'name' => '联系人姓名', 'default' => '', 'desc' => '请输入联系人姓名', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'mobile' => array ( 'type' => 'bigint-11', 'name' => '联系人电话', 'default' => '', 'desc' => '请输入联系人电话', 'match' => 'is_numeric', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'area' => array ( 'type' => 'varchar-500', 'name' => '所在街道', 'default' => '', 'desc' => '所在街道', 'match' => 'option', 'search' => 'linkage', 'update' => 'linkage', 'option' => Dever::url('api.get?level_total=4', 'area'), 'list' => 'Dever::load("area/api.string", "{area}")', ), 'province' => array ( 'type' => 'int-11', 'name' => '省份', 'default' => '', 'desc' => '省份', 'match' => 'option', //'update' => 'text', ), 'city' => array ( 'type' => 'int-11', 'name' => '城市', 'default' => '', 'desc' => '城市', 'match' => 'option', //'update' => 'text', ), 'county' => array ( 'type' => 'int-11', 'name' => '县区', 'default' => '', 'desc' => '县区', 'match' => 'option', //'update' => 'text', ), 'town' => array ( 'type' => 'int-11', 'name' => '街道', 'default' => '', 'desc' => '街道', 'match' => 'option', //'update' => 'text', ), 'map' => array ( 'type' => 'varchar-300', 'name' => '地理位置', 'default' => '', 'desc' => '地理位置', 'match' => 'is_string', # 如果是map,必须在config的base.php中设置map信息 'update' => 'map', ), 'lng' => array ( 'type' => 'varchar-100', 'name' => '经度', 'default' => '', 'desc' => '经度', 'match' => 'option', //'update' => 'text', //'list' => true, ), 'lat' => array ( 'type' => 'varchar-100', 'name' => '纬度', 'default' => '', 'desc' => '纬度', 'match' => 'option', //'update' => 'text', //'list' => true, ), 'address' => array ( 'type' => 'varchar-1000', 'name' => '门店地址', 'default' => '', 'desc' => '门店地址', 'match' => 'option', 'update' => 'text', //'list' => true, ), 'goods' => array ( 'type' => 'text-255', 'name' => '请先选择分类-选择分类,之后选择分类下的商品,点击商品名称可以设置库存', 'default' => '', 'desc' => '生产能力', 'match' => 'option', // 多级联动+多选 'update' => Dever::input('col') ? 'linkage' : false, 'option' => array(Dever::url('api.get', 'category'), 'cate_id', Dever::url('lib/info.getGoods', 'goods'), '快速设置', Dever::url('project/database/list?project=goods&table=info_sku&page_type=1&other=shop&other_id={where_id}&goods_id={id}', 'manage')), ), 'factory' => array ( 'type' => 'text-255', 'name' => '分配工厂-请先选择地区,再选择工厂', 'default' => '', 'desc' => '分配工厂', 'match' => 'option', // 多级联动+多选 'update' => Dever::input('col') ? 'linkage' : false, 'option' => array(Dever::url('api.get?level_total=3', 'area'), 'city', Dever::url('lib/manage.getInfo', 'factory'), '分配工厂'), ), 'store' => array ( 'type' => 'text-255', 'name' => '分配仓库-请先选择地区,再选择仓库', 'default' => '', 'desc' => '分配仓库', 'match' => 'option', // 多级联动+多选 'update' => Dever::input('col') ? 'linkage' : false, 'option' => array(Dever::url('api.get?level_total=3', 'area'), 'city', Dever::url('lib/manage.getInfo', 'store'), '分配仓库'), ), 'hr2' => array ( 'name' => '门店营业设置', 'class' => '',//本项必须填写 'attr' => '', ), 'open' => array ( 'type' => 'int-11', 'name' => '营业状态', 'default' => '1', 'desc' => '营业状态', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $open, 'search' => 'select', 'list' => true, ), 'method' => array ( 'type' => 'int-11', 'name' => '门店能力', 'default' => '3', 'desc' => '门店能力', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $method, 'control' => 'method', ), 'worktime' => array ( 'type' => 'varchar-100', 'name' => '营业时间-如10:00~22:00,24小时制', 'default' => '', 'desc' => '营业时间', 'match' => 'is_string', 'update' => 'text', //'show' => 'method=1,3', ), 'gotime' => array ( 'type' => 'varchar-100', 'name' => '外送时间-如10:00~22:00,24小时制', 'default' => '', 'desc' => '外送时间', 'match' => 'is_string', //'update' => 'text', //'show' => 'method=2,3', ), 'hr3' => array ( 'name' => '门店认证信息', 'class' => '',//本项必须填写 'attr' => '', ), 'license' => array ( 'type' => 'varchar-150', 'name' => '营业执照', 'default' => '', 'desc' => '营业执照', 'match' => 'option', 'update' => 'image', 'key' => '1', 'place' => '660*660', ), 'license_number' => array ( 'type' => 'varchar-200', 'name' => '营业执照号码', 'default' => '', 'desc' => '营业执照号码', 'match' => 'option', 'update' => 'text', ), 'company_name' => array ( 'type' => 'varchar-200', 'name' => '公司名称', 'default' => '', 'desc' => '公司名称', 'match' => 'option', 'update' => 'text', ), 'idcard_front' => array ( 'type' => 'varchar-150', 'name' => '身份证正面', 'default' => '', 'desc' => '身份证正面', 'match' => 'option', 'update' => 'image', 'key' => '1', 'place' => '660*660', ), 'idcard_back' => array ( 'type' => 'varchar-150', 'name' => '身份证背面', 'default' => '', 'desc' => '身份证背面', 'match' => 'option', 'update' => 'image', 'key' => '1', 'place' => '660*660', ), 'jy_license' => array ( 'type' => 'varchar-150', 'name' => '经营许可证', 'default' => '', 'desc' => '经营许可证', 'match' => 'option', 'update' => 'image', 'key' => '1', 'place' => '660*660', ), 'food_license' => array ( 'type' => 'varchar-150', 'name' => '食品许可证', 'default' => '', 'desc' => '食品许可证', 'match' => 'option', 'update' => 'image', 'key' => '1', 'place' => '660*660', ), 'hr4' => array ( 'name' => '其他设置', 'class' => '',//本项必须填写 'attr' => '', ), 'type' => array ( 'type' => 'int-11', 'name' => '门店类型-自营为平台店,当没有找到加盟店时,将自动获取平台店', 'default' => '1', 'desc' => '门店类型', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $type, 'search' => 'select', 'list' => true, ), 'coupon_city' => array ( 'type' => 'int-11', 'name' => '优惠券是否同城可用', 'default' => '2', 'desc' => '优惠券是否同城可用', 'match' => 'is_numeric', 'update' => 'radio', 'update' => Dever::input('col') ? 'radio' : false, 'option' => $yes, ), 'act' => array ( 'type' => 'varchar-500', 'name' => '参与活动', 'default' => '', 'desc' => '参与活动', 'match' => 'is_numeric', 'update' => 'checkbox', 'update' => Dever::input('col') ? 'checkbox' : false, 'option' => $act, ), 'pdesc' => array ( 'type' => 'text-255', 'name' => '配送与自提说明', 'default' => '', 'desc' => '配送与自提说明', 'match' => 'is_string', 'update' => 'textarea', ), '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, 'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), 'manage' => array ( //'insert' => false, 'list_button' => array ( 'delete' => '删除', 'br11' => array('

'), 'add12' => array('分配工厂', '"info&where_id={id}&col=factory&oper_save_jump=info&oper_table=info&oper_parent=info"'), 'add13' => array('分配仓库', '"info&where_id={id}&col=store&oper_save_jump=info&oper_table=info&oper_parent=info"'), 'fast' => array('设置活动', '"info&where_id={id}&col=coupon_city,act&oper_save_jump=info&oper_table=info&oper_parent=info"'), 'br1' => array('

'), 'add1' => array('批量设置商品', '"info&where_id={id}&col=goods&oper_save_jump=info&oper_table=info&oper_parent=info"'), 'list22' => array('商品管理', '"goods&search_option_shop_id={id}&oper_table=info"'), 'br2' => array('

'), 'list' => array('优惠券管理', '"coupon&search_option_shop_id={id}&search_option_city={city}&oper_table=info"'), 'list1' => array('账号管理', '"member&search_option_shop_id={id}&oper_table=info"'), 'list2' => array('打印机管理', '"print&search_option_shop_id={id}&oper_table=info"'), 'br3' => array('

'), 'list3' => array('销售订单', '"sell_order&search_option_shop_id={id}&oper_table=info"'), 'list4' => array('采购订单', '"buy_order&search_option_shop_id={id}&oper_table=info"'), ), ), 'request' => array ( # 获取单条数据 'getOne' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'city' => 'yes', 'coupon_city' => 'yes', 'id' => 'yes', 'status' => 1, 'state' => 1, ), 'type' => 'one', 'col' => 'id,name,`desc`,truename,mobile,lng,lat,address,open,worktime,method,gotime,city,area,province,county,town,coupon_city,pdesc', ), ), );