123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407 |
- <?php
- $type = array
- (
- 1 => '购买',
- 2 => '兑换',
- );
- $status = array
- (
- 1 => '待支付',
- 2 => '已支付',
- 3 => '支付失败',
- //4 => '申请退款',
- 5 => '已退款',
- );
- $product = function()
- {
- return Dever::db('service/product')->state();
- };
- /*
- $feedback_status = array
- (
- 1 => '未反馈',
- 2 => '已反馈',
- 3 => '已出方案',
- );
- */
- $feedback_status = array
- (
- 1 => '未填写问卷',
- 2 => '填写问卷中',
- 3 => '完成填写问卷',
- 4 => '已出方案',
- );
- return array
- (
- # 表名
- 'name' => 'order',
- # 显示给用户看的名称
- 'lang' => '订单管理',
- 'order' => 100,
- 'feedback_status' => $feedback_status,
- 'end' => array
- (
- 'update' => 'service/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("service/lib/manage.showOrderUser", "{id}")',
- ),
- 'uid' => array
- (
- 'type' => 'int-11',
- 'name' => '用户id',
- 'default' => '',
- 'desc' => '用户id',
- 'match' => 'is_numeric',
- 'update' => 'text',
- 'list_name' => '问卷详情',
- 'list' => 'Dever::load("service/lib/manage.showQuestion", "{uid}", "{product_id}", "{id}", "{feedback_status}")',
- ),
- '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',
- ),
- 'feedback_status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '反馈状态',
- 'default' => '1',
- 'desc' => '反馈状态',
- 'match' => 'is_numeric',
- 'option' => $feedback_status,
- 'search' => 'select',
- 'update' => 'select',
- 'list' => 'Dever::load("service/lib/manage.showFeedbackStatus", "{id}")',
- ),
- 'feedback_time' => array
- (
- 'type' => 'int-11',
- 'name' => '设计反馈时间-直接填写天数 已废弃',
- 'default' => '7',
- 'desc' => '设计反馈时间',
- 'match' => 'option',
- //'update' => 'text',
- 'show' => 'feedback_status=2',
- ),
- 'feedback_desc' => array
- (
- 'type' => 'varchar-300',
- 'name' => '设计反馈说明 已废弃',
- 'default' => '',
- 'desc' => '设计反馈说明',
- 'match' => 'option',
- //'update' => 'textarea',
- 'show' => 'feedback_status=2',
- ),
- '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',
- ),
- 'feedback_date' => array
- (
- 'type' => 'int-11',
- 'name' => '反馈问卷时间',
- 'default' => '',
- 'desc' => '反馈问卷时间',
- 'match' => 'option',
- 'search' => 'date',
- //'list' => true,
- ),
- 'survey_date' => array
- (
- 'type' => 'int-11',
- 'name' => '填写问卷时间',
- 'default' => '',
- 'desc' => '填写问卷时间',
- 'match' => 'option',
- 'search' => 'date',
- //'list' => true,
- ),
- 'survey_end_date' => array
- (
- 'type' => 'int-11',
- 'name' => '完成填写问卷时间',
- 'default' => '',
- 'desc' => '完成填写问卷时间',
- 'match' => 'option',
- //'search' => 'date',
- //'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}")',
- ),
- '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' => array('查看问卷', '"feedback&project=service&search_option_order_id={id}&search_option_product_id={product_id}&oper_parent=order&oper_project=service"'),
- 'list_button' => array(
- 'edit' => array('退款', 'tk_time,tk_desc,tk_admin', '{status} > 1'),
- 'add' => array('添加方案', '"feedback&project=service&search_option_order_id={id}&search_option_product_id={product_id}&search_option_uid={uid}&oper_parent=order&oper_project=service&oper_save_jump=order&where_id={id}"', '{feedback_status} >= 3'),
- 'oper' => array('发送方案', '"service/lib/manage.sendFeedback?id={id}"', '{feedback_status} == 3'),
- 'oper1' => array('再次发送短信', '"service/lib/manage.sendFeedbackSms?id={id}"', '{feedback_status} == 4'),
- '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',
- 'feedback_status' => array('yes', '>='),
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'desc'),
- 'col' => '*',
- ),
- # 获取提交订单超过12个小时并且没有提交问卷的
- 'getDataByTime' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'cdate' => array('yes', '>='),
- 'feedback_status' => array(2, '<='),
- 'notice' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'desc'),
- 'col' => '*',
- ),
- ),
- );
|