From 2b3b9bf751a1b6654b6f226a7ee5399026f209ea Mon Sep 17 00:00:00 2001
From: lccsw <1127794702@qq.com>
Date: Tue, 16 Nov 2021 17:10:42 +0800
Subject: [PATCH] add-plan-order_time
---
admin/libraries/OrdersList.php | 15 +++++++--
admin/views/receiver/order/lists.php | 16 +++++++++-
api/controllers/plan/Temp.php | 31 +++++++++++++++++++
api/libraries/liche/Progressopt.php | 5 ++-
.../receiver/Receiver_customers_model.php | 2 +-
5 files changed, 64 insertions(+), 5 deletions(-)
diff --git a/admin/libraries/OrdersList.php b/admin/libraries/OrdersList.php
index b272194c..07ff3eea 100644
--- a/admin/libraries/OrdersList.php
+++ b/admin/libraries/OrdersList.php
@@ -367,6 +367,16 @@ class OrdersList
$where["{$t2}.c_time <="] = strtotime($c_time[1] . ' 23:59:59');
}
}
+ //下定时间
+ if ($params['order_time']) {
+ $order_time = explode(' ~ ', $params['order_time']);
+ if ($order_time[0]) {
+ $where["{$t2}.order_time >="] = $order_time[0];
+ }
+ if ($order_time[1]) {
+ $where["{$t2}.order_time <="] = $order_time[1] . ' 23:59:59';
+ }
+ }
if ($params['brand_id']) {//品牌
$where["{$t2}.brand_id"] = $params['brand_id'];
} else {
@@ -434,7 +444,7 @@ class OrdersList
$lists = [];
if ($count) {
$fileds = "$t1.id,$t1.o_id,$t1.status,";
- $fileds .= "$t2.rid,$t2.sid,$t2.name,$t2.mobile,$t2.brand_id,$t2.s_id,$t2.v_id,$t2.cor_id,$t2.incor_id,$t2.price,$t2.deposit,$t2.payway,$t2.c_time, {$t2}.admin_id";
+ $fileds .= "$t2.rid,$t2.sid,$t2.name,$t2.mobile,$t2.brand_id,$t2.s_id,$t2.v_id,$t2.cor_id,$t2.incor_id,$t2.price,$t2.deposit,$t2.payway,$t2.c_time, {$t2}.admin_id,{$t2}.order_time";
$rows = $this->ci->order_signs_model->select_order($where, "$t2.c_time desc", $page, $size, $fileds);
$brand_arr = $series_arr = $v_arr = $cor_arr = $incor_arr = array();
$admin_ids = array();
@@ -512,6 +522,7 @@ class OrdersList
$cfroms[$customers[$val['rid']][0]['cf_id']][0]['title'] && $cf_name = $cfroms[$customers[$val['rid']][0]['cf_id']][0]['title'].'(线上)
';
$customers[$val['rid']][0]['cf_clues'] && $cf_name .= $customers[$val['rid']][0]['cf_clues'].'(线下)';
$fields['cf_name'] = $cf_name;
+ $fields['order_time'] = $val['order_time'] != '0000-00-00 00:00:00' ? $val['order_time'] : '';
$lists[] = $fields;
}
}
@@ -1566,7 +1577,7 @@ class OrdersList
'biz_name' => ['title' => '门店', 'width' => '10%'], 'price' => ['title' => '合同价', 'width' => '7%'],
'payway_name' => ['title' => '付款', 'width' => '5%'],'admin_name' => ['title' => '销售员', 'width' => '7%'],
'cf_title' => ['title' => '来源类型', 'width' => '8%'],'cf_name' => ['title' => '来源','width' => '10%'],
- 'status_name' => ['title' => '合同状态', 'width' => '7%'], 'c_time' => ['title' => '订单时间', 'width' => '12%']];
+ 'status_name' => ['title' => '合同状态', 'width' => '7%'], 'order_time' => ['title' => '下定时间', 'width' => '12%']];
$fields = array_merge($fields1, $fields2);
} else if ($status_pid == 1) {
$fields2 = ['title' => ['title' => '分期产品', 'width' => '15%'],
diff --git a/admin/views/receiver/order/lists.php b/admin/views/receiver/order/lists.php
index 1b8d7053..b2d1064c 100644
--- a/admin/views/receiver/order/lists.php
+++ b/admin/views/receiver/order/lists.php
@@ -229,7 +229,7 @@
-
+