diff --git a/admin/controllers/receiver/Clues.php b/admin/controllers/receiver/Clues.php index a7b7d5c1..48804008 100644 --- a/admin/controllers/receiver/Clues.php +++ b/admin/controllers/receiver/Clues.php @@ -4,13 +4,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); class Clues extends HD_Controller{ private $searchTpAry = array('mobile' => '客户手机号', 'name' => '客户姓名'); - protected $log_dir; - public function __construct(){ parent::__construct(); - - $this->log_dir = 'receiver_clues'; - $this->load->model('receiver/receiver_clues_model','clues_model'); $this->load->model('receiver/receiver_clues_cfrom_model','clues_cfrom_model'); $this->load->model('receiver/receiver_customers_model','customers_model'); @@ -75,41 +70,34 @@ class Clues extends HD_Controller{ } public function get(){ - $id = $this->input->get('id'); - - if($id){ - $row = $this->clues_model->get(array('id' => $id)); - if(!$row){ - return $this->show_json(SYS_CODE_FAIL, '记录不存在'); - } - - $info = array( - 'name' => $row['name'], - 'mobile' => $row['mobile'], - 'cf_id' => $row['cf_id'], - ); - $title = "编辑线索"; - $action = "edit"; - } else { - $info = array( - 'name' => '', - 'mobile' => '', - 'cf_id' => '', - ); - $title = "新增线索"; - $action = "add"; + $params = $this->input->get(); + $id = intval($params['id']); + if (!$id) { + return $this->show_json(SYS_CODE_FAIL, '非法参数!'); } - - $where = array('status' => 1); - $select = 'id, title'; - $map_cfrom = $this->clues_cfrom_model->map('id', 'title', $where, '', 0, 0, $select); - - $this->data['info'] = $info; - $this->data['cfrom_ary'] = $map_cfrom; - $this->data['action'] = $action; - - $this->data['_title'] = $title; - return $this->show_view('receiver/clues/get'); + $statusList = $logsList = array(); + $re = $this->clues_model->get(array('id'=>$id)); + $dataInfo = $re; + foreach ($this->clues_model->get_status() as $key => $value) { + $statusList[] = array("id" => $key, "name" => $value); + } + $dataInfo['editType'] = 0; + $re_cf = $this->clues_cfrom_model->get(array('id'=>$re['cf_id'])); + $info_show['cfrom_title'] = $re_cf['title'] ? $re_cf['title'] : ''; + $info_show['statusList'] = $statusList; + $info_show['status2List'] = array(array("id" => 1, "name" => '未回访'),array("id" => 2, "name" => '已回访')); + $info_show['c_time'] = date('Y-m-d H:i', $re['c_time']); + $info_show['mobile_sub'] = $re['mobile'] ? substr_replace($re['mobile'], '*****', 0, 5) : ''; + $resLogs = $this->mdReceiverOplogs->select(array('clue_id'=>$id), 'id desc', 0, 0); + foreach ($resLogs as $key => $value) { + $setValue = array(); + $logsList[] = $setValue; + } + $info_show['logsList'] = $logsList; + $this->data['info'] = $dataInfo; + $this->data['info_show'] = $info_show; + $this->data['_title'] = '线索详情'; + return $this->show_view('receiver/clues/edit', true); } //添加单条数据 @@ -263,6 +251,16 @@ class Clues extends HD_Controller{ return $this->show_json(SYS_CODE_SUCCESS, '分配成功!'); } + //晓致绑定手机号 + public function get_xbind() + { + $id = $this->input->get_post('id'); + $mobile = '18350451617'; + $this->data['mobile_sub'] = substr_replace($mobile, '*****', 0, 5); + $this->data['id'] = $id; + $this->show_view('receiver/clues/edit_xbind'); + } + private function upload() { $config['upload_path'] = $_SERVER['DOCUMENT_ROOT'] . '/temp/'; diff --git a/admin/views/receiver/clues/edit.php b/admin/views/receiver/clues/edit.php new file mode 100644 index 00000000..6c01dc6d --- /dev/null +++ b/admin/views/receiver/clues/edit.php @@ -0,0 +1,426 @@ +
| 操作人员 | +内容 | +类型 | +操作时间 | +
|---|---|---|---|
| = $val['admin_name'] ?> | +
+ if ($val['rec_url']) { ?>
+
+ } else if ($val['rec_text']) { ?>
+ = $val['rec_text'] ?>
+ } else { ?>
+ = $val['log'] ?>
+ } ?>
+ if ($val['imgs']) { ?>
+
+ $val1) { ?>
+
+ } ?>
+
+
+
+ } ?>
+ |
+ = $val['type_name'] ?> | += $val['c_time'] ?> | +