order_time

order_time

order_time
This commit is contained in:
xiaoyu
2021-10-30 21:31:36 +08:00
parent a605d811ea
commit 02e580f3b1
4 changed files with 20 additions and 4 deletions
+10 -4
View File
@@ -11,7 +11,7 @@ class Customer extends HD_Controller
{
private $searchTpAry = array('mobile' => '客户手机号', 'name' => '客户姓名');
private $searchTimeAry = array('c_time' => '创建时间', 'p_time' => '分配时间', 'cont_time' => '最后联系时间', 'u_time' => '最后操作时间'
, 'dt_time' => '首次到店时间');
, 'dt_time' => '首次到店时间', 'order_time' => '下单时间');
protected $log_dir;
@@ -149,6 +149,11 @@ class Customer extends HD_Controller
$dt_time[0] && $where["dt_time >="] = $dt_time[0] . ' 00:00:00';
$dt_time[1] && $where["dt_time <="] = $dt_time[1] . ' 23:59:59';
}
if ($params['order_time']) {
$order_time = explode(' ~ ', $params['order_time']);
$order_time[0] && $where["order_time >="] = $order_time[0] . ' 00:00:00';
$order_time[1] && $where["order_time <="] = $order_time[1] . ' 23:59:59';
}
if ($params['cfrom_id'] || $params['cfrom_id2']) {
if ($params['cfrom_id'] == 24) {
$where['cf_id'] = 24;
@@ -279,11 +284,12 @@ class Customer extends HD_Controller
),
array(
array('title' => '分配时间', 'value' => $row['p_time'] != '0000-00-00 00:00:00' ? $row['p_time'] : ''),
array('title' => '最后联系时间', 'value' => $row['cont_time'] != '0000-00-00 00:00:00' ? $row['cont_time'] : ''),
array('title' => '首次到店时间', 'value' => $row['dt_time'] != '0000-00-00 00:00:00' ? $row['dt_time'] : ''),
array('title' => '预计购买时间', 'value' => "{$row['buy_time']} 天内"),
array('title' => '最后联系', 'value' => $row['cont_time'] != '0000-00-00 00:00:00' ? $row['cont_time'] : ''),
array('title' => '首次到店', 'value' => $row['dt_time'] != '0000-00-00 00:00:00' ? $row['dt_time'] : ''),
array('title' => '下单时间', 'value' => $row['order_time'] != '0000-00-00 00:00:00' ? $row['order_time'] : ''),
),
array(
array('title' => '预计购买时间', 'value' => "{$row['buy_time']} 天内"),
array('title' => '重点关注', 'value' => $is_top),
array('title' => '销售员', 'value' => $row_admin['uname']),
),
@@ -203,6 +203,10 @@ class Cusorder extends Wxapp{
$userinfo = $this->app_liche_users_model->get(['mobile'=>$mobile]);
$this->orders_entity->c_intention($o_id,$userinfo,$inten_money);
}
//更新客户下单时间
$this->customers_model->update(array('order_time' => strtotime('now')),['id'=>$cus_id]);
return ['id'=>$o_id];
}else{
throw new Exception('创建失败', ERR_PARAMS_ERROR);
@@ -104,6 +104,10 @@ class Cusorder2 extends Wxapp{
if(!$o_id){
throw new Exception('创建失败', ERR_PARAMS_ERROR);
}
//更新客户下单时间
$this->customers_model->update(array('order_time' => strtotime('now')),['id'=>$cus_id]);
//增加分销记录
$this->load->library('entity/deal_entity',['app_id'=>1]);
$this->deal_entity->deal_log($o_id);
+2
View File
@@ -33,6 +33,8 @@ create table lc_receiver_customers (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='客户表';
alter table lc_receiver_customers add cf_clues varchar(50) not null default '' comment '线索来源' after cf_title;
ALTER TABLE `lc_receiver_customers` ADD `order_time` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '下单时间' AFTER `dt_time`;
-- ----------------------------
-- Title:客户操作日志表
-- Author:lcc