2020-06-08 01:14:42 +08:00
|
|
|
|
<?php
|
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
|
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
|
|
|
|
|
// +----------------------------------------------------------------------
|
2021-03-16 10:34:52 +08:00
|
|
|
|
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
|
2020-06-08 01:14:42 +08:00
|
|
|
|
// +----------------------------------------------------------------------
|
2021-03-16 10:34:52 +08:00
|
|
|
|
// | Licensed ( https://opensource.org/licenses/mit-license.php )
|
2020-06-08 01:14:42 +08:00
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
|
// | Author: Devil
|
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
|
namespace app\admin\form;
|
|
|
|
|
|
|
2021-07-18 23:42:10 +08:00
|
|
|
|
use think\facade\Db;
|
2020-06-08 01:14:42 +08:00
|
|
|
|
use app\service\PaymentService;
|
2020-06-08 14:03:33 +08:00
|
|
|
|
use app\service\ExpressService;
|
2020-06-08 01:14:42 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
2020-06-08 14:03:33 +08:00
|
|
|
|
* 订单动态表格
|
2020-06-08 01:14:42 +08:00
|
|
|
|
* @author Devil
|
|
|
|
|
|
* @blog http://gong.gg/
|
|
|
|
|
|
* @version 1.0.0
|
2020-06-08 14:03:33 +08:00
|
|
|
|
* @date 2020-06-08
|
2020-06-08 01:14:42 +08:00
|
|
|
|
* @desc description
|
|
|
|
|
|
*/
|
|
|
|
|
|
class Order
|
|
|
|
|
|
{
|
|
|
|
|
|
// 基础条件
|
|
|
|
|
|
public $condition_base = [
|
|
|
|
|
|
['is_delete_time', '=', 0],
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 入口
|
|
|
|
|
|
* @author Devil
|
|
|
|
|
|
* @blog http://gong.gg/
|
|
|
|
|
|
* @version 1.0.0
|
2020-06-08 14:03:33 +08:00
|
|
|
|
* @date 2020-06-08
|
2020-06-08 01:14:42 +08:00
|
|
|
|
* @desc description
|
|
|
|
|
|
* @param [array] $params [输入参数]
|
|
|
|
|
|
*/
|
|
|
|
|
|
public function Run($params = [])
|
|
|
|
|
|
{
|
|
|
|
|
|
return [
|
|
|
|
|
|
// 基础配置
|
|
|
|
|
|
'base' => [
|
|
|
|
|
|
'key_field' => 'id',
|
|
|
|
|
|
'is_search' => 1,
|
|
|
|
|
|
'search_url' => MyUrl('admin/order/index'),
|
2020-06-14 16:04:37 +08:00
|
|
|
|
'detail_title' => '基础信息',
|
2020-07-26 00:22:29 +08:00
|
|
|
|
'is_middle' => 0,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
],
|
|
|
|
|
|
// 表单配置
|
|
|
|
|
|
'form' => [
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '基础信息',
|
|
|
|
|
|
'view_type' => 'module',
|
2020-07-07 18:58:29 +08:00
|
|
|
|
'view_key' => 'order/module/goods',
|
2020-07-28 23:28:06 +08:00
|
|
|
|
'grid_size' => 'xl',
|
2020-06-14 16:04:37 +08:00
|
|
|
|
'is_detail' => 0,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
2020-06-08 14:03:33 +08:00
|
|
|
|
'form_type' => 'input',
|
|
|
|
|
|
'form_name' => 'id',
|
|
|
|
|
|
'where_type_custom' => 'in',
|
2020-08-20 23:38:41 +08:00
|
|
|
|
'where_value_custom' => 'WhereBaseGoodsInfo',
|
2020-07-29 10:52:26 +08:00
|
|
|
|
'placeholder' => '请输入订单ID/订单号/商品名称/型号',
|
2020-06-08 01:14:42 +08:00
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '用户信息',
|
|
|
|
|
|
'view_type' => 'module',
|
2020-06-27 22:48:16 +08:00
|
|
|
|
'view_key' => 'lib/module/user',
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'grid_size' => 'sm',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
2020-06-08 14:03:33 +08:00
|
|
|
|
'form_type' => 'input',
|
|
|
|
|
|
'form_name' => 'user_id',
|
|
|
|
|
|
'where_type_custom' => 'in',
|
2020-08-20 23:38:41 +08:00
|
|
|
|
'where_value_custom' => 'WhereValueUserInfo',
|
2020-06-08 14:03:33 +08:00
|
|
|
|
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
2020-06-08 01:14:42 +08:00
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '订单状态',
|
|
|
|
|
|
'view_type' => 'module',
|
|
|
|
|
|
'view_key' => 'order/module/status',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'select',
|
|
|
|
|
|
'form_name' => 'status',
|
|
|
|
|
|
'where_type' => 'in',
|
2021-08-14 17:27:14 +08:00
|
|
|
|
'data' => MyConst('common_order_status'),
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'data_key' => 'id',
|
|
|
|
|
|
'data_name' => 'name',
|
|
|
|
|
|
'is_multiple' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '支付状态',
|
|
|
|
|
|
'view_type' => 'module',
|
|
|
|
|
|
'view_key' => 'order/module/pay_status',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'select',
|
|
|
|
|
|
'form_name' => 'pay_status',
|
|
|
|
|
|
'where_type' => 'in',
|
2021-08-14 17:17:45 +08:00
|
|
|
|
'data' => MyConst('common_order_pay_status'),
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'data_key' => 'id',
|
|
|
|
|
|
'data_name' => 'name',
|
|
|
|
|
|
'is_multiple' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
2020-07-25 00:13:18 +08:00
|
|
|
|
[
|
2020-08-09 00:04:02 +08:00
|
|
|
|
'label' => '总价(元)',
|
2020-07-25 00:13:18 +08:00
|
|
|
|
'view_type' => 'field',
|
2020-08-09 00:04:02 +08:00
|
|
|
|
'view_key' => 'total_price',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-07-25 00:13:18 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'section',
|
|
|
|
|
|
'is_point' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
2020-08-09 00:04:02 +08:00
|
|
|
|
'label' => '支付金额(元)',
|
2020-07-25 00:13:18 +08:00
|
|
|
|
'view_type' => 'field',
|
2020-08-09 00:04:02 +08:00
|
|
|
|
'view_key' => 'pay_price',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-07-25 00:13:18 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'section',
|
|
|
|
|
|
'is_point' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
2020-08-09 00:04:02 +08:00
|
|
|
|
'label' => '单价(元)',
|
2020-07-25 00:13:18 +08:00
|
|
|
|
'view_type' => 'field',
|
2020-08-09 00:04:02 +08:00
|
|
|
|
'view_key' => 'price',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-07-25 00:13:18 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'section',
|
|
|
|
|
|
'is_point' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
2020-07-29 10:52:26 +08:00
|
|
|
|
[
|
|
|
|
|
|
'label' => '出货仓库',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'warehouse_name',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-07-29 10:52:26 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'select',
|
|
|
|
|
|
'form_name' => 'warehouse_id',
|
|
|
|
|
|
'where_type' => 'in',
|
|
|
|
|
|
'data' => $this->OrderWarehouseList(),
|
|
|
|
|
|
'data_key' => 'id',
|
|
|
|
|
|
'data_name' => 'name',
|
|
|
|
|
|
'is_multiple' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
2020-06-08 01:14:42 +08:00
|
|
|
|
[
|
|
|
|
|
|
'label' => '订单模式',
|
|
|
|
|
|
'view_type' => 'field',
|
2020-07-02 22:42:01 +08:00
|
|
|
|
'view_key' => 'order_model',
|
|
|
|
|
|
'view_data_key' => 'name',
|
2022-01-04 15:28:30 +08:00
|
|
|
|
'view_data' => MyConst('common_order_type_list'),
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'select',
|
|
|
|
|
|
'where_type' => 'in',
|
2022-01-04 15:28:30 +08:00
|
|
|
|
'data' => MyConst('common_order_type_list'),
|
2020-06-08 14:03:33 +08:00
|
|
|
|
'data_key' => 'value',
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'data_name' => 'name',
|
|
|
|
|
|
'is_multiple' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '来源',
|
|
|
|
|
|
'view_type' => 'field',
|
2020-07-02 22:42:01 +08:00
|
|
|
|
'view_key' => 'client_type',
|
|
|
|
|
|
'view_data_key' => 'name',
|
2021-08-14 17:17:45 +08:00
|
|
|
|
'view_data' => MyConst('common_platform_type'),
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'select',
|
|
|
|
|
|
'where_type' => 'in',
|
2021-08-14 17:17:45 +08:00
|
|
|
|
'data' => MyConst('common_platform_type'),
|
2020-06-08 14:03:33 +08:00
|
|
|
|
'data_key' => 'value',
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'data_name' => 'name',
|
|
|
|
|
|
'is_multiple' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
2020-07-25 00:13:18 +08:00
|
|
|
|
'label' => '地址信息',
|
|
|
|
|
|
'view_type' => 'module',
|
|
|
|
|
|
'view_key' => 'order/module/address',
|
|
|
|
|
|
'grid_size' => 'sm',
|
|
|
|
|
|
'is_detail' => 0,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
2020-07-25 00:13:18 +08:00
|
|
|
|
'form_type' => 'input',
|
|
|
|
|
|
'form_name' => 'id',
|
|
|
|
|
|
'where_type_custom' => 'in',
|
2020-08-20 23:38:41 +08:00
|
|
|
|
'where_value_custom' => 'WhereValueAddressInfo',
|
2020-06-08 01:14:42 +08:00
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
2020-07-25 00:13:18 +08:00
|
|
|
|
'label' => '取货信息',
|
|
|
|
|
|
'view_type' => 'module',
|
|
|
|
|
|
'view_key' => 'order/module/take',
|
|
|
|
|
|
'width' => 125,
|
|
|
|
|
|
'is_detail' => 0,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
2020-07-25 00:13:18 +08:00
|
|
|
|
'form_type' => 'input',
|
|
|
|
|
|
'form_name' => 'id',
|
|
|
|
|
|
'where_type_custom' => 'in',
|
2020-08-20 23:38:41 +08:00
|
|
|
|
'where_value_custom' => 'WhereValueTakeInfo',
|
2020-06-08 01:14:42 +08:00
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '退款金额(元)',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'refund_price',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'section',
|
|
|
|
|
|
'is_point' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '退货数量',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'returned_quantity',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'section',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
2020-06-14 16:04:37 +08:00
|
|
|
|
[
|
|
|
|
|
|
'label' => '购买总数',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'buy_number_count',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-14 16:04:37 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'section',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
2020-06-08 01:14:42 +08:00
|
|
|
|
[
|
|
|
|
|
|
'label' => '增加金额(元)',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'increase_price',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'section',
|
|
|
|
|
|
'is_point' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '优惠金额(元)',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'preferential_price',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'section',
|
|
|
|
|
|
'is_point' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '支付方式',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'payment_name',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'select',
|
|
|
|
|
|
'form_name' => 'payment_id',
|
|
|
|
|
|
'where_type' => 'in',
|
|
|
|
|
|
'data' => PaymentService::PaymentList(),
|
|
|
|
|
|
'data_key' => 'id',
|
|
|
|
|
|
'data_name' => 'name',
|
|
|
|
|
|
'is_multiple' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
2020-06-14 16:04:37 +08:00
|
|
|
|
[
|
|
|
|
|
|
'label' => '用户备注',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'user_note',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-14 16:04:37 +08:00
|
|
|
|
'search_config' => [
|
2022-02-23 10:51:04 +08:00
|
|
|
|
'form_type' => 'input',
|
2020-06-14 16:04:37 +08:00
|
|
|
|
'where_type' => 'like',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
2020-06-08 01:14:42 +08:00
|
|
|
|
[
|
|
|
|
|
|
'label' => '扩展信息',
|
|
|
|
|
|
'view_type' => 'module',
|
|
|
|
|
|
'view_key' => 'order/module/extension',
|
|
|
|
|
|
'grid_size' => 'sm',
|
|
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'input',
|
|
|
|
|
|
'form_name' => 'extension_data',
|
|
|
|
|
|
'where_type' => 'like',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
2020-06-08 14:03:33 +08:00
|
|
|
|
'label' => '快递公司',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'express_name',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 14:03:33 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'select',
|
|
|
|
|
|
'form_name' => 'express_id',
|
|
|
|
|
|
'data' => ExpressService::ExpressList(),
|
|
|
|
|
|
'where_type' => 'in',
|
|
|
|
|
|
'data_key' => 'id',
|
|
|
|
|
|
'data_name' => 'name',
|
|
|
|
|
|
'is_multiple' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '快递单号',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'express_number',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 01:14:42 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'input',
|
|
|
|
|
|
'where_type' => 'like',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '最新售后',
|
|
|
|
|
|
'view_type' => 'module',
|
|
|
|
|
|
'view_key' => 'order/module/aftersale',
|
|
|
|
|
|
'grid_size' => 'sm',
|
|
|
|
|
|
],
|
2020-08-21 10:22:17 +08:00
|
|
|
|
[
|
|
|
|
|
|
'label' => '用户是否评论',
|
|
|
|
|
|
'view_type' => 'module',
|
|
|
|
|
|
'view_key' => 'order/module/is_comments',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-08-21 10:22:17 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'select',
|
|
|
|
|
|
'where_type' => 'in',
|
|
|
|
|
|
'form_name' => 'user_is_comments',
|
2021-08-14 17:17:45 +08:00
|
|
|
|
'data' => MyConst('common_is_text_list'),
|
2020-08-21 10:22:17 +08:00
|
|
|
|
'data_key' => 'id',
|
|
|
|
|
|
'data_name' => 'name',
|
|
|
|
|
|
'where_type_custom' => 'WhereTypyUserIsComments',
|
|
|
|
|
|
'where_value_custom' => 'WhereValueUserIsComments',
|
|
|
|
|
|
'is_multiple' => 1,
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
2020-06-14 16:04:37 +08:00
|
|
|
|
[
|
|
|
|
|
|
'label' => '确认时间',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'confirm_time',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-14 16:04:37 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'datetime',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '支付时间',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'pay_time',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-14 16:04:37 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'datetime',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '发货时间',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'delivery_time',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-14 16:04:37 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'datetime',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '完成时间',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'collect_time',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-14 16:04:37 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'datetime',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '取消时间',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'cancel_time',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-14 16:04:37 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'datetime',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '关闭时间',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'close_time',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-14 16:04:37 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'datetime',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
2020-06-08 14:03:33 +08:00
|
|
|
|
[
|
|
|
|
|
|
'label' => '创建时间',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'add_time',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 14:03:33 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'datetime',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
'label' => '更新时间',
|
|
|
|
|
|
'view_type' => 'field',
|
|
|
|
|
|
'view_key' => 'upd_time',
|
2020-10-27 22:53:14 +08:00
|
|
|
|
'is_sort' => 1,
|
2020-06-08 14:03:33 +08:00
|
|
|
|
'search_config' => [
|
|
|
|
|
|
'form_type' => 'datetime',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
2020-06-08 01:14:42 +08:00
|
|
|
|
[
|
|
|
|
|
|
'label' => '操作',
|
|
|
|
|
|
'view_type' => 'operate',
|
|
|
|
|
|
'view_key' => 'order/module/operate',
|
|
|
|
|
|
'align' => 'center',
|
|
|
|
|
|
'fixed' => 'right',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
2022-08-02 17:23:10 +08:00
|
|
|
|
// 数据配置
|
|
|
|
|
|
'data' => [
|
|
|
|
|
|
'table_name' => 'Order',
|
|
|
|
|
|
'page_tips_handle' => 'OrderService::OrderTipsMsg',
|
|
|
|
|
|
'data_handle' => 'OrderService::OrderListHandle',
|
|
|
|
|
|
'detail_where' => [
|
|
|
|
|
|
['is_delete_time', '=', 0],
|
|
|
|
|
|
],
|
|
|
|
|
|
'is_page' => 1,
|
|
|
|
|
|
'data_params' => [
|
|
|
|
|
|
'is_public' => 0,
|
|
|
|
|
|
'is_operate'=> 1,
|
|
|
|
|
|
'user_type' => 'admin',
|
|
|
|
|
|
],
|
|
|
|
|
|
],
|
2020-06-08 01:14:42 +08:00
|
|
|
|
];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-08-21 10:22:17 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 评论条件符号处理
|
|
|
|
|
|
* @author Devil
|
|
|
|
|
|
* @blog http://gong.gg/
|
|
|
|
|
|
* @version 1.0.0
|
|
|
|
|
|
* @date 2020-06-08
|
|
|
|
|
|
* @desc description
|
|
|
|
|
|
* @param [string] $form_key [表单数据key]
|
|
|
|
|
|
* @param [array] $params [输入参数]
|
|
|
|
|
|
*/
|
|
|
|
|
|
public function WhereTypyUserIsComments($form_key, $params = [])
|
|
|
|
|
|
{
|
|
|
|
|
|
if(isset($params[$form_key]))
|
|
|
|
|
|
{
|
|
|
|
|
|
// 条件值是 0,1
|
|
|
|
|
|
// 解析成数组,都存在则返回null,则1 >, 0 =
|
|
|
|
|
|
$value = explode(',', urldecode($params[$form_key]));
|
|
|
|
|
|
if(count($value) == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
return in_array(1, $value) ? '>' : '=';
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 评论条件值处理
|
|
|
|
|
|
* @author Devil
|
|
|
|
|
|
* @blog http://gong.gg/
|
|
|
|
|
|
* @version 1.0.0
|
|
|
|
|
|
* @date 2020-06-08
|
|
|
|
|
|
* @desc description
|
|
|
|
|
|
* @param [string] $form_key [表单数据key]
|
|
|
|
|
|
* @param [array] $params [输入参数]
|
|
|
|
|
|
*/
|
|
|
|
|
|
public function WhereValueUserIsComments($value, $params = [])
|
|
|
|
|
|
{
|
|
|
|
|
|
return (count($value) == 2) ? null : 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-07-29 10:52:26 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 订单仓库列表
|
|
|
|
|
|
* @author Devil
|
|
|
|
|
|
* @blog http://gong.gg/
|
|
|
|
|
|
* @version 1.0.0
|
|
|
|
|
|
* @date 2020-07-29
|
|
|
|
|
|
* @desc description
|
|
|
|
|
|
*/
|
|
|
|
|
|
public function OrderWarehouseList()
|
|
|
|
|
|
{
|
|
|
|
|
|
$data = [];
|
|
|
|
|
|
$wids = Db::name('Order')->column('warehouse_id');
|
|
|
|
|
|
if(!empty($wids))
|
|
|
|
|
|
{
|
|
|
|
|
|
$where = ['id'=>$wids];
|
|
|
|
|
|
$order_by = 'level desc, id desc';
|
2021-07-18 23:42:10 +08:00
|
|
|
|
$data = Db::name('Warehouse')->field('id,name')->where($where)->order($order_by)->select()->toArray();
|
2020-07-29 10:52:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
return $data;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-06-08 01:14:42 +08:00
|
|
|
|
/**
|
2020-06-08 14:03:33 +08:00
|
|
|
|
* 取货码条件处理
|
|
|
|
|
|
* @author Devil
|
|
|
|
|
|
* @blog http://gong.gg/
|
|
|
|
|
|
* @version 1.0.0
|
|
|
|
|
|
* @date 2020-06-08
|
|
|
|
|
|
* @desc description
|
|
|
|
|
|
* @param [string] $value [条件值]
|
|
|
|
|
|
* @param [array] $params [输入参数]
|
|
|
|
|
|
*/
|
|
|
|
|
|
public function WhereValueTakeInfo($value, $params = [])
|
|
|
|
|
|
{
|
|
|
|
|
|
if(!empty($value))
|
|
|
|
|
|
{
|
|
|
|
|
|
// 获取订单 id
|
|
|
|
|
|
$ids = Db::name('OrderExtractionCode')->where('code', '=', $value)->column('order_id');
|
|
|
|
|
|
|
|
|
|
|
|
// 避免空条件造成无效的错觉
|
|
|
|
|
|
return empty($ids) ? [0] : $ids;
|
|
|
|
|
|
}
|
|
|
|
|
|
return $value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 收件地址条件处理
|
|
|
|
|
|
* @author Devil
|
|
|
|
|
|
* @blog http://gong.gg/
|
|
|
|
|
|
* @version 1.0.0
|
|
|
|
|
|
* @date 2020-06-08
|
|
|
|
|
|
* @desc description
|
|
|
|
|
|
* @param [string] $value [条件值]
|
|
|
|
|
|
* @param [array] $params [输入参数]
|
|
|
|
|
|
*/
|
|
|
|
|
|
public function WhereValueAddressInfo($value, $params = [])
|
|
|
|
|
|
{
|
|
|
|
|
|
if(!empty($value))
|
|
|
|
|
|
{
|
|
|
|
|
|
// 获取订单 id
|
|
|
|
|
|
$ids = Db::name('OrderAddress')->where('name|tel|address', 'like', '%'.$value.'%')->column('order_id');
|
|
|
|
|
|
|
|
|
|
|
|
// 避免空条件造成无效的错觉
|
|
|
|
|
|
return empty($ids) ? [0] : $ids;
|
|
|
|
|
|
}
|
|
|
|
|
|
return $value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 用户信息条件处理
|
2020-06-08 01:14:42 +08:00
|
|
|
|
* @author Devil
|
|
|
|
|
|
* @blog http://gong.gg/
|
|
|
|
|
|
* @version 1.0.0
|
2020-06-08 14:03:33 +08:00
|
|
|
|
* @date 2020-06-08
|
2020-06-08 01:14:42 +08:00
|
|
|
|
* @desc description
|
2020-06-08 14:03:33 +08:00
|
|
|
|
* @param [string] $value [条件值]
|
2020-06-08 01:14:42 +08:00
|
|
|
|
* @param [array] $params [输入参数]
|
|
|
|
|
|
*/
|
2020-06-08 14:03:33 +08:00
|
|
|
|
public function WhereValueUserInfo($value, $params = [])
|
2020-06-08 01:14:42 +08:00
|
|
|
|
{
|
|
|
|
|
|
if(!empty($value))
|
|
|
|
|
|
{
|
2020-06-08 14:03:33 +08:00
|
|
|
|
// 获取用户 id
|
|
|
|
|
|
$ids = Db::name('User')->where('username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id');
|
2020-06-08 01:14:42 +08:00
|
|
|
|
|
2020-06-08 14:03:33 +08:00
|
|
|
|
// 避免空条件造成无效的错觉
|
|
|
|
|
|
return empty($ids) ? [0] : $ids;
|
|
|
|
|
|
}
|
|
|
|
|
|
return $value;
|
|
|
|
|
|
}
|
2020-06-08 01:14:42 +08:00
|
|
|
|
|
2020-06-08 14:03:33 +08:00
|
|
|
|
/**
|
2020-07-25 00:13:18 +08:00
|
|
|
|
* 基础条件处理
|
2020-06-08 14:03:33 +08:00
|
|
|
|
* @author Devil
|
|
|
|
|
|
* @blog http://gong.gg/
|
|
|
|
|
|
* @version 1.0.0
|
|
|
|
|
|
* @date 2020-06-08
|
|
|
|
|
|
* @desc description
|
|
|
|
|
|
* @param [string] $value [条件值]
|
|
|
|
|
|
* @param [array] $params [输入参数]
|
|
|
|
|
|
*/
|
2020-07-25 00:13:18 +08:00
|
|
|
|
public function WhereBaseGoodsInfo($value, $params = [])
|
2020-06-08 14:03:33 +08:00
|
|
|
|
{
|
|
|
|
|
|
if(!empty($value))
|
|
|
|
|
|
{
|
2020-07-25 00:13:18 +08:00
|
|
|
|
// 订单ID、订单号
|
2020-07-29 10:52:26 +08:00
|
|
|
|
$ids = Db::name('Order')->where(['id|order_no'=>$value])->column('id');
|
2020-07-25 00:13:18 +08:00
|
|
|
|
|
2020-06-08 14:03:33 +08:00
|
|
|
|
// 获取订单详情搜索的订单 id
|
2020-07-25 00:13:18 +08:00
|
|
|
|
if(empty($ids))
|
|
|
|
|
|
{
|
|
|
|
|
|
$ids = Db::name('OrderDetail')->where('title|model', 'like', '%'.$value.'%')->column('order_id');
|
|
|
|
|
|
}
|
2020-06-08 01:14:42 +08:00
|
|
|
|
|
|
|
|
|
|
// 避免空条件造成无效的错觉
|
2020-06-08 14:03:33 +08:00
|
|
|
|
return empty($ids) ? [0] : $ids;
|
2020-06-08 01:14:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
return $value;
|
|
|
|
|
|
}
|
2020-06-08 14:03:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
?>
|