This commit is contained in:
小鱼开发
2024-07-01 16:40:08 +08:00
parent 028359f2f3
commit b079259aec
+14
View File
@@ -18,6 +18,7 @@ class Cusorder extends Wxapp
$this->check_headimg = array();//授权微信信息
$this->load->model('receiver/receiver_customers_model', 'customers_model');
$this->load->model('receiver/receiver_clues_cfrom_model', 'clues_cfrom_model');
$this->load->model('receiver/order/receiver_orders_model', 'orders_model');
$this->load->model('receiver/order/receiver_order_datas_model');
$this->load->model('receiver/order/receiver_order_oplogs_model');
@@ -398,6 +399,7 @@ class Cusorder extends Wxapp
$lists = $map_users = [];
if ($count) {
$rows = $this->orders_model->select($where, 'id desc', $page, $size);
$biz = $this->biz_model->get(['id' => $this->biz_id]);
//销售顾问
$str_user_ids = implode(',', array_unique(array_column($rows, 'admin_id')));
$str_user_ids && $map_users = $this->app_user_model->map('id', 'uname', ["id in({$str_user_ids})" => null]);
@@ -420,6 +422,16 @@ class Cusorder extends Wxapp
$serie_name = isset($series[$val['series_id']]) ? $series[$val['series_id']][0]['name'] : '';
$car_name = isset($cars[$val['car_id']]) ? $cars[$val['car_id']][0]['name'] : '';
$img_status = $this->order_datas_entity->data_status($order_datas[$val['id']][0],$val['status']);
$customer = $this->customers_model->get(['id' => $val['customer_id']]);
$of_title = '';
if ($customer['of_id']) {
$of = $this->clues_cfrom_model->get(array('id' => $customer['of_id']));
$of_title = $of['title'];
if ($customer['of2_id']) {
$of = $this->clues_cfrom_model->get(array('id' => $customer['of2_id']));
$of_title .= '-' . $of['title'];
}
}
$title = "{$brand_name}-{$serie_name}";
$o_data_1 = [
@@ -449,6 +461,8 @@ class Cusorder extends Wxapp
$val['order_time'] != '0000-00-00 00:00:00' && $o_data_4['下定时间'] = ['type' => 'text', 'value' => date('Y-m-d', strtotime($val['order_time'])), 'bg_color' => ''];
//$val['delry_time'] != '0000-00-00 00:00:00' && $o_data_4['期望交付'] = ['type' => 'text', 'value' => date('Y-m-d', strtotime($val['delry_time'])), 'bg_color' => ''];
if ($map_users[$val['admin_id']]) {
$o_data_4['客户来源'] = ['type' => 'text', 'value' => $of_title, 'bg_color' => ''];
$o_data_4['车卖场'] = ['type' => 'text', 'value' => $biz['biz_name'], 'bg_color' => ''];
$o_data_4['车管家'] = ['type' => 'text', 'value' => $map_users[$val['admin_id']], 'bg_color' => ''];
}
$other_data['o_data_1'] = $o_data_1;