|
@@ -0,0 +1,447 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+$pay_status = Dever::config('base', 'pay')->pay['status'];
|
|
|
+
|
|
|
+$method = array
|
|
|
+(
|
|
|
+ 1 => '配送',
|
|
|
+ 2 => '自提',
|
|
|
+);
|
|
|
+
|
|
|
+$pay_method = array
|
|
|
+(
|
|
|
+ 1 => '平台结算',
|
|
|
+ 2 => '门店现付',
|
|
|
+ 3 => '礼品卡',
|
|
|
+);
|
|
|
+
|
|
|
+$status = array
|
|
|
+(
|
|
|
+ 1 => '待支付',
|
|
|
+ 2 => '待处理',
|
|
|
+ 3 => '配送中',
|
|
|
+ 4 => '已完成',
|
|
|
+ 5 => '已取消',
|
|
|
+ 6 => '退款',
|
|
|
+);
|
|
|
+
|
|
|
+return array
|
|
|
+(
|
|
|
+
|
|
|
+ 'name' => 'sell_order',
|
|
|
+
|
|
|
+ 'lang' => '销售订单',
|
|
|
+ 'order' => 100,
|
|
|
+ 'menu' => false,
|
|
|
+
|
|
|
+ 'struct' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => 'ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'search' => 'order',
|
|
|
+
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'shop_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '所属门店',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '所属门店',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'list' => 'Dever::load("shop/info-find#name", {shop_id})';
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'uid' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '购买人',
|
|
|
+ 'default' => '0',
|
|
|
+ 'desc' => '请选择用户',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'update' => 'text',
|
|
|
+
|
|
|
+ 'search' => array
|
|
|
+ (
|
|
|
+ 'api' => 'passport/user-select',
|
|
|
+ 'col' => 'username',
|
|
|
+ 'result' => 'id',
|
|
|
+ ),
|
|
|
+ 'list' => '{uid} > 0 ? Dever::load("passport/user-find#username", {uid}) : "匿名用户"',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'mobile' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-300',
|
|
|
+ 'name' => '下单手机号',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '手机号',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'search' => array
|
|
|
+ (
|
|
|
+ 'api' => 'passport/user-select',
|
|
|
+ 'col' => 'mobile',
|
|
|
+ 'result' => 'id',
|
|
|
+ 'search' => 'uid',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'address_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '送货地址',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '送货地址',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'name' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-80',
|
|
|
+ '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,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'card_code_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '礼品卡id',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '礼品卡id',
|
|
|
+ 'match' => 'option',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'pay_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-100',
|
|
|
+ 'name' => '支付订单ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '付款订单id',
|
|
|
+ 'match' => 'is_string',
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'pay_status' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '支付状态',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '请选择支付状态',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'option' => $pay_status,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'pay_price' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-50',
|
|
|
+ 'name' => '付款金额',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '付款金额',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'text',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'info' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-300',
|
|
|
+ 'name' => '订单备注',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '订单备注',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'textarea',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'note' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '是否发送状态提醒-1未发送,2已发送',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '请选择状态',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'notice' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '模板消息提醒次数',
|
|
|
+ 'default' => '0',
|
|
|
+ 'desc' => '模板消息提醒次数',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'tk_pic' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-150',
|
|
|
+ 'name' => '退款截图',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '退款截图',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'image',
|
|
|
+ 'key' => 1
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'tk_time' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '退款时间',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '退款时间',
|
|
|
+ 'match' => 'option',
|
|
|
+
|
|
|
+
|
|
|
+ 'callback' => 'maketime',
|
|
|
+ 'show' => 'status=5',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'tk_admin' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '退款审核人',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '退款审核人',
|
|
|
+ 'match' => 'option',
|
|
|
+
|
|
|
+ 'show' => 'status=5',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'tk_desc' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-300',
|
|
|
+ 'name' => '退款备注',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '退款备注',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'textarea',
|
|
|
+
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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' => true,
|
|
|
+ 'search' => 'date',
|
|
|
+ 'list' => 'date("Y-m-d H:i:s", {cdate})',
|
|
|
+
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'top' => Dever::config('base')->top,
|
|
|
+
|
|
|
+
|
|
|
+ 'top_option' => array
|
|
|
+ (
|
|
|
+ 'value' => $auth,
|
|
|
+ 'col' => 'cate_id',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'manage' => array
|
|
|
+ (
|
|
|
+ 'delete' => false,
|
|
|
+ 'edit' => false,
|
|
|
+ 'insert' => false,
|
|
|
+
|
|
|
+ 'button' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'list_button' => array(
|
|
|
+ 'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin', '{status} == 2'),
|
|
|
+
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'request' => array
|
|
|
+ (
|
|
|
+ 'getList' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'info_id' => 'yes',
|
|
|
+ 'uid' => 'yes',
|
|
|
+ 'status' => 'yes',
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('cdate' => 'desc'),
|
|
|
+ 'page' => array(5, 'list'),
|
|
|
+ 'col' => '*',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'getAll' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'uid' => 'yes',
|
|
|
+ 'status' => array('1', '!='),
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('cdate' => 'desc'),
|
|
|
+ 'page' => array(10, 'list'),
|
|
|
+ 'col' => '*',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'getYes' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'info_id' => 'yes',
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('cdate' => 'desc'),
|
|
|
+ 'col' => '*',
|
|
|
+ ),
|
|
|
+
|
|
|
+
|
|
|
+ 'getDataByTime' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'cdate' => array('yes', '>='),
|
|
|
+ 'notice' => 'yes',
|
|
|
+ 'note' => 'yes',
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('cdate' => 'desc'),
|
|
|
+ 'col' => '*',
|
|
|
+ ),
|
|
|
+
|
|
|
+
|
|
|
+ 'getBuy' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'status' => 'yes',
|
|
|
+ 'info_id' => 'yes',
|
|
|
+ 'order_id' => 'yes',
|
|
|
+ 'uid' => 'yes',
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('id' => 'desc'),
|
|
|
+ 'col' => '*',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'getMyAll' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'uid' => 'yes',
|
|
|
+ 'status' => 'yes',
|
|
|
+ 'cate_id' => 'yes',
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('id' => 'desc'),
|
|
|
+ 'page' => array(10, 'list'),
|
|
|
+ 'col' => 'id,order_id,name,buy_num,cdate,cash,info_id,buy_id',
|
|
|
+ ),
|
|
|
+
|
|
|
+
|
|
|
+ 'drop' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'where' => array
|
|
|
+ (
|
|
|
+ 'time' => array('yes-cdate', '<='),
|
|
|
+ 'status' => 1,
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'delete',
|
|
|
+ 'col' => 'id,order_id',
|
|
|
+ ),
|
|
|
+
|
|
|
+
|
|
|
+ 'getAllByDate' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'where' => array
|
|
|
+ (
|
|
|
+ 'time' => array('yes-cdate', '<='),
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'col' => 'id,order_id',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'getNum' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'object_id' => 'yes',
|
|
|
+ 'info_id' => 'yes',
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'one',
|
|
|
+ 'col' => 'sum(buy_num) as buy_num',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+);
|