123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326 |
- <?php
- $excel = false;
- $excel[] = array('数据导出','数据导出','active/lib/excel.out_active_order');
- $list_button = array();
- // if (Dever::load('manage/auth')->checkFunc('active.order', 'editRefund', '全额退款')) {
- // $list_button['fast'] = array('退款', '"info_refund&project=active&search_option_order_id={id}"');
- // $list_button['oper'] = array('全额退款', '"active/lib/manage.refund?id={id}"', '"{status}" == 2 && "{code_num}" < 0');
- // }
- $list_button['list'] = array('查看详情','"info_code&project=active&id={id}&page_type=1&[refer]"');
- $list_button['fast'] = array('备注', '"order&where_id={id}&col=remark"');
- $pay_type = array
- (
- 1 => '在线支付',
- );
- $status = array
- (
- 1 => '待支付',
- 2 => '已支付',
- 7 => '已支付(有退款)',
- 3 => '已关闭',#超时未支付
- // 4 => '已完成',
- // 5 => '已完成(有退款)',
- 6 => '已退款',#(全部退款)
- );
- $active = function()
- {
- $array = array();
- $info = Dever::load('active/info-state');
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- return array
- (
- # 表名
- 'name' => 'order',
- # 显示给用户看的名称
- 'lang' => '活动订单',
- 'order' => 100,
- 'config_status' => $status,
- 'config_pay_type' => $pay_type,
- # 数据结构
- 'struct' => array
- (
-
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- // 'list' => true,
- ),
- 'order_num' => array
- (
- 'type' => 'varchar-100',
- 'name' => '订单单号',
- 'default' => '',
- 'desc' => '订单单号',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'mid' => array
- (
- 'type' => 'int-11',
- 'name' => '代理商姓名/手机号',
- 'default' => '-1',
- 'desc' => '代理商',
- 'match' => 'is_string',
- 'update' => 'text',
- // 'search' => array
- // (
- // 'api' => 'agent/member-getSearch',
- // 'col' => 'col',
- // 'result' => 'id',
- // 'search' => 'mid',
- // ),
- // 'list_name' => '代理商信息',
- // 'list' => 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
- ),
- 'uid' => array
- (
- 'type' => 'int-11',
- 'name' => '用户名称/手机号',
- 'default' => '-1',
- 'desc' => '用户名称',
- 'match' => 'is_string',
- // 'option' => $user,
- // 'update' => 'text',
- 'search' => array
- (
- 'api' => 'active/user-getSearch',
- 'col' => 'col',
- 'result' => 'id',
- 'search' => 'uid',
- ),
- 'list_name' => '用户信息',
- 'list' => 'Dever::load("active/lib/manage.user", {uid})',
- ),
- 'active_id' => array
- (
- 'type' => 'int-11',
- 'name' => '活动名称',
- 'default' => '-1',
- 'desc' => '活动名称',
- 'match' => 'is_string',
- 'option' => $active,
- 'update' => 'text',
- 'search' => array
- (
- 'api' => 'active/info-getSearch',
- 'col' => 'col',
- 'result' => 'id',
- 'search' => 'active_id',
- ),
- 'list' => true,
- ),
- 'num' => array
- (
- 'type' => 'varchar-100',
- 'name' => '数量',
- 'default' => '',
- 'desc' => '数量',
- 'match' => 'option',
- 'list' => true,
- ),
- 'price' => array
- (
- 'type' => 'varchar-50',
- 'name' => '金额',
- 'default' => '0',
- 'desc' => '金额',
- 'match' => 'option',
- 'update' => 'text',
- 'list' => true,
- ),
- 'status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '支付状态',
- 'default' => '1',
- 'desc' => '支付状态',
- 'match' => 'is_numeric',
- 'option' => $status,
- 'search' => 'select',
- 'list' => true,
- ),
- 'pay_type' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '支付类型',
- 'default' => '1',
- 'desc' => '支付类型',
- 'match' => 'is_numeric',
- 'option' => $pay_type,
- 'search' => 'select',
- 'list' => true,
- ),
- 'path' => array
- (
- 'type' => 'varchar-300',
- 'name' => '自定义字段',
- 'default' => '',
- 'desc' => '自定义字段',
- 'match' => 'option',
- // 'update' => 'textarea',
- ),
- 'code_num' => array
- (
- 'type' => 'varchar-100',
- 'name' => '已使用数量',
- 'default' => '-1',
- 'desc' => '已使用数量',
- 'match' => 'option',
- // 'list' => true,
- ),
- 'no_num' => array
- (
- 'type' => 'varchar-100',
- 'name' => '未核销数量',
- 'default' => '0',
- 'desc' => '未核销数量',
- 'match' => 'option',
- // 'list' => true,
- ),
- 'refund_num' => array
- (
- 'type' => 'varchar-100',
- 'name' => '退款数量',
- 'default' => '0',
- 'desc' => '退款数量',
- 'match' => 'option',
- // 'list' => true,
- ),
- 'remark' => array
- (
- 'type' => 'varchar-300',
- 'name' => '订单备注',
- 'default' => '',
- 'desc' => '订单备注',
- 'match' => 'option',
- 'update' => 'textarea',
- ),
- 'url' => array
- (
- 'type' => 'varchar-3000',
- 'name' => '支付链接',
- 'default' => '',
- 'desc' => '支付链接',
- 'match' => 'is_string',
- // 'update' => 'fulltext',
- //'search' => 'fulltext',
- //'list' => true,
- ),
- 'refund_admin' => array
- (
- 'type' => 'int-11',
- 'name' => '退款操作人',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- // 'search' => 'order',
- 'list_name' => '退款操作人<br>退款时间',
- 'list' => 'Dever::load("active/lib/manage.show",{id})',
- ),
- 'rdate' => array
- (
- 'type' => 'int-11',
- 'name' => '退款时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'search' => 'date',
- // 'desc' => '',
- // 'list' => 'date("Y-m-d H:i:s", {zdate})',
- ),
- '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,
- 'excel' => $excel,
- 'list_button' => $list_button,
- ),
- 'request' => array
- (
- // # 获取数量
- 'getNum' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'mid' => 'yes',
- 'uid' => 'yes',
- 'active_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(num-refund_num) as total',
- ),
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'mid' => 'yes',
- 'uid' => 'yes',
- 'status' => array('yes','!='),
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate'=>'desc'),
- 'page' => array(20,'list'),
- 'col' => '*',
- ),
- ),
- );
|