|
@@ -0,0 +1,309 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+$type = array
|
|
|
+(
|
|
|
+ 1 => '购买',
|
|
|
+ 2 => '兑换',
|
|
|
+);
|
|
|
+
|
|
|
+$status = array
|
|
|
+(
|
|
|
+ 1 => '待支付',
|
|
|
+ 2 => '已支付',
|
|
|
+ 3 => '支付失败',
|
|
|
+ //4 => '申请退款',
|
|
|
+ 5 => '已退款',
|
|
|
+);
|
|
|
+
|
|
|
+$product = function()
|
|
|
+{
|
|
|
+ return Dever::db('journal/info')->state();
|
|
|
+};
|
|
|
+
|
|
|
+return array
|
|
|
+(
|
|
|
+ # 表名
|
|
|
+ 'name' => 'order',
|
|
|
+ # 显示给用户看的名称
|
|
|
+ 'lang' => '订单管理',
|
|
|
+ 'order' => 100,
|
|
|
+
|
|
|
+ 'end' => array
|
|
|
+ (
|
|
|
+ //'update' => 'journal/lib/manage.order',
|
|
|
+ ),
|
|
|
+
|
|
|
+ # 数据结构
|
|
|
+ 'struct' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => 'ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'search' => 'order',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'order_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-100',
|
|
|
+ 'name' => '订单id',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '付款订单id',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'search' => 'fulltext',
|
|
|
+ //'list' => true,
|
|
|
+ //'list' => '"{order_id}" ? "{order_id}" : "{code}"',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'name' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-80',
|
|
|
+ 'name' => '订单名称',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '订单名称',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'search' => 'fulltext',
|
|
|
+ 'list_name' => '订单信息',
|
|
|
+ //'list' => 'Dever::load("journal/lib/manage.showOrderUser", "{id}")',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'uid' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '用户id',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '用户id',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'update' => 'text',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'product_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '小刊',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '小刊',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'update' => 'select',
|
|
|
+ 'option' => $product,
|
|
|
+ 'search' => 'select',
|
|
|
+ //'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'type' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '支付方式',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '支付方式',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'option' => $type,
|
|
|
+ 'search' => 'select',
|
|
|
+ 'update' => 'radio',
|
|
|
+ //'list' => true,
|
|
|
+ 'control' => 'type',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'notice' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '模板消息提醒次数',
|
|
|
+ 'default' => '0',
|
|
|
+ 'desc' => '模板消息提醒次数',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'cash' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-50',
|
|
|
+ 'name' => '支付金额',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '支付金额',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'text',
|
|
|
+ //'list' => true,
|
|
|
+ 'show' => 'type=1',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'code' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-50',
|
|
|
+ 'name' => '使用的兑换码',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '使用的兑换码',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'text',
|
|
|
+ //'list' => true,
|
|
|
+ 'show' => 'type=2',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'status' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '订单状态',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '请选择订单状态',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'option' => $status,
|
|
|
+ 'search' => 'select',
|
|
|
+ 'update' => 'radio',
|
|
|
+ //'list' => 'Dever::load("service/lib/manage.showOrderStatus", "{id}")',
|
|
|
+ 'control' => 'status',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'tk_time' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '退款时间',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '退款时间',
|
|
|
+ 'match' => 'option',
|
|
|
+ //'list' => true,
|
|
|
+ 'show' => 'status=5',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'tk_admin' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '退款审核人',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '退款审核人',
|
|
|
+ 'match' => 'option',
|
|
|
+ //'list' => true,
|
|
|
+ 'show' => 'status=5',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'tk_desc' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-300',
|
|
|
+ 'name' => '退款备注',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '退款备注',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'textarea',
|
|
|
+ //'show' => 'status=5',
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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}")',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'info' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-300',
|
|
|
+ 'name' => '备注',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '备注',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'textarea',
|
|
|
+ //'show' => 'status=5'
|
|
|
+ 'list' => '"{info}" ? "{info}" : "双击添加备注"',
|
|
|
+ 'edit' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'mobile' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-300',
|
|
|
+ 'name' => '手机号',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '手机号',
|
|
|
+ 'match' => 'option',
|
|
|
+ //'show' => 'status=5'
|
|
|
+ 'search' => array
|
|
|
+ (
|
|
|
+ 'api' => 'passport/user-all',//接口地址,最好是获取多条数据的地址
|
|
|
+ 'col' => 'mobile',//要查询的字段
|
|
|
+ 'result' => 'id',//返回的字段
|
|
|
+ 'search' => 'uid',//本表的字段,默认为当前的字段
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'manage' => array
|
|
|
+ (
|
|
|
+ //'delete' => false,
|
|
|
+ //'edit' => false,
|
|
|
+ //'insert' => false,
|
|
|
+
|
|
|
+ 'button' => array
|
|
|
+ (
|
|
|
+ '导出订单' => array('location', 'service/lib/manage.out'),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'list_button' => array(
|
|
|
+ 'edit' => array('退款', 'tk_time,tk_desc,tk_admin', '{status} > 1'),
|
|
|
+ 'delete' => array('删除', '', '{status} == 1'),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'request' => array
|
|
|
+ (
|
|
|
+ 'getAll' => array
|
|
|
+ (
|
|
|
+ # 匹配的正则或函数 选填项
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'status' => array('1', '!='),
|
|
|
+ 'uid' => 'yes',
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('cdate' => 'desc'),
|
|
|
+ 'page' => array(10, 'list'),
|
|
|
+ 'col' => '*',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'getYes' => array
|
|
|
+ (
|
|
|
+ # 匹配的正则或函数 选填项
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'product_id' => 'yes',
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('cdate' => 'desc'),
|
|
|
+ 'col' => '*',
|
|
|
+ ),
|
|
|
+
|
|
|
+ # 获取提交订单超过12个小时
|
|
|
+ 'getDataByTime' => array
|
|
|
+ (
|
|
|
+ # 匹配的正则或函数 选填项
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'cdate' => array('yes', '>='),
|
|
|
+ 'notice' => 'yes',
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('cdate' => 'desc'),
|
|
|
+ 'col' => '*',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+);
|