|
@@ -0,0 +1,305 @@
|
|
|
|
+<?php
|
|
|
|
+
|
|
|
|
+$type = array
|
|
|
|
+(
|
|
|
|
+ 1 => '店铺活动',
|
|
|
|
+ 2 => '礼品赠送',
|
|
|
|
+ 3 => '超过保质期销毁',
|
|
|
|
+ 10 => '其他',
|
|
|
|
+);
|
|
|
|
+
|
|
|
|
+$status = array
|
|
|
|
+(
|
|
|
|
+ 1 => '已出库',
|
|
|
|
+);
|
|
|
|
+
|
|
|
|
+return array
|
|
|
|
+(
|
|
|
|
+ # 表名
|
|
|
|
+ 'name' => 'out_order',
|
|
|
|
+ # 显示给用户看的名称
|
|
|
|
+ 'lang' => '出库订单',
|
|
|
|
+ 'order' => 99,
|
|
|
|
+ 'menu' => false,
|
|
|
|
+ # 数据结构
|
|
|
|
+ 'struct' => array
|
|
|
|
+ (
|
|
|
|
+
|
|
|
|
+ 'id' => array
|
|
|
|
+ (
|
|
|
|
+ 'type' => 'int-11',
|
|
|
|
+ 'name' => 'ID',
|
|
|
|
+ 'default' => '',
|
|
|
|
+ 'desc' => '',
|
|
|
|
+ 'match' => 'is_numeric',
|
|
|
|
+ 'search' => 'order',
|
|
|
|
+ //'list' => true,
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'shop_id' => array
|
|
|
|
+ (
|
|
|
|
+ 'type' => 'int-11',
|
|
|
|
+ 'name' => '所属门店',
|
|
|
|
+ 'default' => '',
|
|
|
|
+ 'desc' => '所属门店',
|
|
|
|
+ 'match' => 'is_numeric',
|
|
|
|
+ 'update' => 'hidden',
|
|
|
|
+ 'value' => Dever::input('search_option_shop_id'),
|
|
|
|
+ 'list' => 'Dever::load("shop/info-find#name", {shop_id})',
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'mobile' => array
|
|
|
|
+ (
|
|
|
|
+ 'type' => 'varchar-300',
|
|
|
|
+ 'name' => '下单手机号',
|
|
|
|
+ 'default' => '',
|
|
|
|
+ 'desc' => '手机号',
|
|
|
|
+ 'match' => 'option',
|
|
|
|
+ 'search' => array
|
|
|
|
+ (
|
|
|
|
+ 'api' => 'shop/info-select',//接口地址,最好是获取多条数据的地址
|
|
|
|
+ 'col' => 'mobile',//要查询的字段
|
|
|
|
+ 'result' => 'id',//返回的字段
|
|
|
|
+ 'search' => 'shop_id',//本表的字段,默认为当前的字段
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'name' => array
|
|
|
|
+ (
|
|
|
|
+ 'type' => 'varchar-800',
|
|
|
|
+ 'name' => '订单名称',
|
|
|
|
+ 'default' => '',
|
|
|
|
+ 'desc' => '订单名称',
|
|
|
|
+ 'match' => 'is_string',
|
|
|
|
+ 'update' => 'text',
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'order_num' => array
|
|
|
|
+ (
|
|
|
|
+ 'type' => 'varchar-100',
|
|
|
|
+ 'name' => '订单编号',
|
|
|
|
+ 'default' => '',
|
|
|
|
+ 'desc' => '订单编号',
|
|
|
|
+ 'match' => 'is_string',
|
|
|
|
+ 'update' => 'text',
|
|
|
|
+ 'search' => 'fulltext',
|
|
|
|
+ 'list' => true,
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'price' => array
|
|
|
|
+ (
|
|
|
|
+ 'type' => 'varchar-50',
|
|
|
|
+ 'name' => '价格',
|
|
|
|
+ 'default' => '',
|
|
|
|
+ 'desc' => '价格',
|
|
|
|
+ 'match' => 'option',
|
|
|
|
+ 'update' => 'text',
|
|
|
|
+ 'list' => true,
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'num' => array
|
|
|
|
+ (
|
|
|
|
+ 'type' => 'int-11',
|
|
|
|
+ 'name' => '数量',
|
|
|
|
+ 'default' => '',
|
|
|
|
+ 'desc' => '数量',
|
|
|
|
+ 'match' => 'is_numeric',
|
|
|
|
+ 'search' => 'select',
|
|
|
|
+ 'list' => true,
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'info' => array
|
|
|
|
+ (
|
|
|
|
+ 'type' => 'varchar-300',
|
|
|
|
+ 'name' => '订单备注',
|
|
|
|
+ 'default' => '',
|
|
|
|
+ 'desc' => '订单备注',
|
|
|
|
+ 'match' => 'option',
|
|
|
|
+ 'update' => 'textarea',
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'area' => array
|
|
|
|
+ (
|
|
|
|
+ 'type' => 'varchar-500',
|
|
|
|
+ 'name' => '所在地区',
|
|
|
|
+ 'default' => '',
|
|
|
|
+ 'desc' => '所在地区',
|
|
|
|
+ 'match' => 'option',
|
|
|
|
+ 'search' => 'linkage',
|
|
|
|
+ 'option' => Dever::url('api.get?level_total=4', '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',
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'member_id' => array
|
|
|
|
+ (
|
|
|
|
+ 'type' => 'int-11',
|
|
|
|
+ 'name' => '操作人',
|
|
|
|
+ 'default' => '',
|
|
|
|
+ 'desc' => '操作人',
|
|
|
|
+ 'match' => 'option',
|
|
|
|
+ //'update' => 'text',
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'status' => array
|
|
|
|
+ (
|
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
|
+ 'name' => '状态',
|
|
|
|
+ 'default' => '1',
|
|
|
|
+ 'desc' => '状态',
|
|
|
|
+ 'match' => 'is_numeric',
|
|
|
|
+ 'option' => $status,
|
|
|
|
+ 'search' => 'select',
|
|
|
|
+ 'list' => 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})',
|
|
|
|
+ //'list' => 'Dever::load("service/lib/manage.showOrderTime", "{id}")',
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'manage' => array
|
|
|
|
+ (
|
|
|
|
+ 'delete' => false,
|
|
|
|
+ 'edit' => false,
|
|
|
|
+ 'insert' => false,
|
|
|
|
+
|
|
|
|
+ 'button' => array
|
|
|
|
+ (
|
|
|
|
+ //'导出订单' => array('location', 'user/lib/manage.out'),
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'list_button' => array(
|
|
|
|
+ //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin', '{status} == 2'),
|
|
|
|
+ //'delete' => array('删除', '', '{status} == 1'),
|
|
|
|
+
|
|
|
|
+ 'fast_list' => array('查看详情', '"buy_order_goods&project=shop&order_id={id}&page_type=1"'),
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ 'request' => array
|
|
|
|
+ (
|
|
|
|
+ 'getAll' => array
|
|
|
|
+ (
|
|
|
|
+ # 匹配的正则或函数 选填项
|
|
|
|
+ 'option' => array
|
|
|
|
+ (
|
|
|
|
+ 'name' => array('yes', 'like'),
|
|
|
|
+ 'shop_id' => 'yes',
|
|
|
|
+ 'mobile' => 'yes',
|
|
|
|
+ 'start' => array('yes-cdate', '>='),
|
|
|
|
+ 'end' => array('yes-cdate', '<='),
|
|
|
|
+ 'status' => array('yes', 'in'),
|
|
|
|
+ 'state' => 1,
|
|
|
|
+ ),
|
|
|
|
+ 'type' => 'all',
|
|
|
|
+ 'order' => array('cdate' => 'desc'),
|
|
|
|
+ 'page' => array(10, 'list'),
|
|
|
|
+ 'col' => '*',
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ # 获取订单数量
|
|
|
|
+ 'getOrderNum' => array
|
|
|
|
+ (
|
|
|
|
+ # 匹配的正则或函数 选填项
|
|
|
|
+ 'option' => array
|
|
|
|
+ (
|
|
|
|
+ 'start' => array('yes-cdate', '>='),
|
|
|
|
+ 'end' => array('yes-cdate', '<='),
|
|
|
|
+ 'shop_id' => 'yes',
|
|
|
|
+ 'status' => array('yes', 'in'),
|
|
|
|
+ 'state' => 1,
|
|
|
|
+ ),
|
|
|
|
+ 'type' => 'count',
|
|
|
|
+ 'col' => '*',
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ # 获取总金额
|
|
|
|
+ 'getCashNum' => array
|
|
|
|
+ (
|
|
|
|
+ # 匹配的正则或函数 选填项
|
|
|
|
+ 'option' => array
|
|
|
|
+ (
|
|
|
|
+ 'start' => array('yes-cdate', '>='),
|
|
|
|
+ 'end' => array('yes-cdate', '<='),
|
|
|
|
+ 'shop_id' => 'yes',
|
|
|
|
+ 'status' => array('yes', 'in'),
|
|
|
|
+ 'state' => 1,
|
|
|
|
+ ),
|
|
|
|
+ 'type' => 'one',
|
|
|
|
+ 'col' => 'sum(price) as total',
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ # 获取商品数量
|
|
|
|
+ 'getGoodsNum' => array
|
|
|
|
+ (
|
|
|
|
+ # 匹配的正则或函数 选填项
|
|
|
|
+ 'option' => array
|
|
|
|
+ (
|
|
|
|
+ 'start' => array('yes-cdate', '>='),
|
|
|
|
+ 'end' => array('yes-cdate', '<='),
|
|
|
|
+ 'shop_id' => 'yes',
|
|
|
|
+ 'status' => array('yes', 'in'),
|
|
|
|
+ 'state' => 1,
|
|
|
|
+ ),
|
|
|
|
+ 'type' => 'one',
|
|
|
|
+ 'col' => 'sum(num) as total',
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+);
|