fixed
This commit is contained in:
@@ -414,6 +414,7 @@ class Common extends CI_Controller
|
||||
$size = $this->input->post('size') ? intval($this->input->post('size')) : 10;
|
||||
$type = intval($this->input->post('type'));
|
||||
$brand_id = intval($this->input->post('brand_id'));
|
||||
$province_id = intval($this->input->post('province_id'));
|
||||
$city_id = intval($this->input->post('city_id'));
|
||||
$county_id = intval($this->input->post('county_id'));
|
||||
|
||||
@@ -431,6 +432,7 @@ class Common extends CI_Controller
|
||||
$sys_cate_id && $where['cate_id'] = $sys_cate_id;
|
||||
$biz_name && $where['biz_name like "%' . $biz_name . '%"'] = null;
|
||||
$brand_id && $where['brand_id'] = $brand_id;
|
||||
$province_id && $where['province_id'] = $province_id;
|
||||
$city_id && $where['city_id'] = $city_id;
|
||||
$county_id && $where['county_id'] = $county_id;
|
||||
$type && $where['type'] = $type;
|
||||
@@ -440,21 +442,25 @@ class Common extends CI_Controller
|
||||
$typeAry = $this->mdBiz->type_ary();
|
||||
$type_ids = implode(',',array_keys($typeAry));
|
||||
$type_ids && $where["type in ($type_ids)"] = null;
|
||||
$count = $this->mdBiz->count($where);
|
||||
if ($count) {
|
||||
$resBiz = $this->mdBiz->select($where, 'id desc', $page, $size);
|
||||
foreach ($resBiz as $key => $value) {
|
||||
$setValue = array();
|
||||
$setValue['id'] = $value['id'];
|
||||
$setValue['name'] = $value['biz_name'];
|
||||
$img = $value['headimg'] ? $value['headimg'] : $value['cover'];
|
||||
$setValue['img'] = $img ? build_qiniu_image_url($img) : '';
|
||||
$setValue['sort'] = $key;
|
||||
$setValue['is_checked'] = $shopChecked[$value['id']] ? 1 : 0;
|
||||
$setValue['brand_id'] = $value['brand_id'];
|
||||
$shopList[] = $setValue;
|
||||
|
||||
if($province_id && $city_id){
|
||||
$count = $this->mdBiz->count($where);
|
||||
if ($count) {
|
||||
$resBiz = $this->mdBiz->select($where, 'id desc', $page, $size);
|
||||
foreach ($resBiz as $key => $value) {
|
||||
$setValue = array();
|
||||
$setValue['id'] = $value['id'];
|
||||
$setValue['name'] = $value['biz_name'];
|
||||
$img = $value['headimg'] ? $value['headimg'] : $value['cover'];
|
||||
$setValue['img'] = $img ? build_qiniu_image_url($img) : '';
|
||||
$setValue['sort'] = $key;
|
||||
$setValue['is_checked'] = $shopChecked[$value['id']] ? 1 : 0;
|
||||
$setValue['brand_id'] = $value['brand_id'];
|
||||
$shopList[] = $setValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->data['shopList'] = $shopList;
|
||||
$hasNext = ceil($count / $size) > $page ? 1 : 0;
|
||||
$this->data['shopPage'] = array('page' => $page, 'pageLimit' => $size, 'pageCount' => $count, 'hasNext' => $hasNext);
|
||||
@@ -781,7 +787,7 @@ class Common extends CI_Controller
|
||||
if (mb_strlen($content) > 300) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '短信最多300个字');
|
||||
}
|
||||
$content = '【狸车】' . $content;
|
||||
$content = '【理车】' . $content;
|
||||
$plaintext = '';
|
||||
if (strstr($mobile, ',')) { //多个手机号
|
||||
$mobiles = explode(',', $mobile);
|
||||
|
||||
@@ -209,7 +209,7 @@ class Channel extends HD_Controller
|
||||
"orders" => "订单数",
|
||||
"days" => "创建时间",
|
||||
];
|
||||
!$params['uid'] && $indexs['uname'] = "渠道经理";
|
||||
!$params['uid'] && $indexs['uname'] = "客户成功经理";
|
||||
array_unshift($data, $indexs);
|
||||
$this->load->library('excel');
|
||||
$this->excel->out_csv($data, $indexs, $fileName . "_" . date('YmdHis'));
|
||||
|
||||
@@ -26,15 +26,15 @@ class Main extends HD_Controller
|
||||
$list = [];
|
||||
$value = $this->userM->count([]);
|
||||
$list[] = array(
|
||||
'title' => '用户(人)',
|
||||
'title' => '系统用户(人)',
|
||||
'value' => $value,
|
||||
'btns' => array(
|
||||
array('name' => '查看详情', 'url' => '/app/licheb/member/index?status=1'),
|
||||
),
|
||||
);
|
||||
$value = $this->userM->count(['group_id' => 4, 'status' => 1]);
|
||||
$value = $this->userM->count(['group_id' => 4,'biz_id !=' => 0, 'status' => 1]);
|
||||
$list[] = array(
|
||||
'title' => '渠道列表(人)',
|
||||
'title' => '客户成功经理(人)',
|
||||
'value' => $value,
|
||||
'btns' => array(
|
||||
array('name' => '查看详情', 'url' => '/app/licheb/channel'),
|
||||
@@ -44,7 +44,7 @@ class Main extends HD_Controller
|
||||
|
||||
$this->data['conditions'] = $conditions;
|
||||
|
||||
$this->data['_title'] = '狸车';
|
||||
$this->data['_title'] = '理车';
|
||||
return $this->show_view('/app/main', true);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,13 +44,16 @@ class Member extends HD_Controller
|
||||
if ($params['biz_id']) {
|
||||
$where['biz_id'] = $params['biz_id'];
|
||||
} else {
|
||||
$params['city_id'] = '';
|
||||
$params['county_id'] = '';
|
||||
$params['biz_id'] = '';
|
||||
$params['province_id'] ? $where['province_id'] = $params['province_id'] : $params['province_id'] = '';
|
||||
$params['city_id'] ? $where['city_id'] = $params['city_id'] : $params['city_id'] = '';
|
||||
!$params['county_id'] && $params['county_id'] = '';
|
||||
}
|
||||
|
||||
if (strlen($params['status'])) {
|
||||
$where['status'] = $params['status'];
|
||||
}
|
||||
|
||||
$count = $this->userM->count($where);
|
||||
$lists = $this->userM->select($where, 'id desc', $page, $size);
|
||||
foreach ($lists as $key => $val) {
|
||||
@@ -83,6 +86,8 @@ class Member extends HD_Controller
|
||||
$lists[$key]['umajia'] = $majia;
|
||||
}
|
||||
}
|
||||
|
||||
$this->data['provinces'] = $this->province_ary();
|
||||
$this->data['app_id'] = 2;
|
||||
$this->data['params'] = $params;
|
||||
$this->data['lists'] = $lists;
|
||||
@@ -156,16 +161,8 @@ class Member extends HD_Controller
|
||||
$action = '/app/licheb/member/add';
|
||||
$_title = '添加用户';
|
||||
}
|
||||
$type_ary = $this->biz_model->type_ary();
|
||||
$typeStr = '1,2,3';//品牌 合伙 代理
|
||||
$typeAry = [];
|
||||
foreach ($type_ary as $k => $v) {
|
||||
if (strstr($typeStr . ',', $k . ',')) {
|
||||
$typeAry[$k] = $v;
|
||||
}
|
||||
}
|
||||
$show_info['typeAry'] = $typeAry;
|
||||
#$show_info['typeAry'] = $this->biz_model->type_ary();
|
||||
|
||||
$this->data['provinces'] = $this->province_ary();
|
||||
$show_info['cityList'] = $this->mdSysCity->select(['status' => 1], 'id desc', 0, 0, 'city_id,name');
|
||||
$this->data['selectedBrands'] = $selectedBrands;
|
||||
$this->data['selectedBrands1'] = $selectedBrands1;
|
||||
@@ -185,10 +182,12 @@ class Member extends HD_Controller
|
||||
$mobile = $info['mobile'];
|
||||
$group_id = $info['group_id'];
|
||||
$bizs = $info['bizs'];
|
||||
$province_id = $info['province_id'];
|
||||
$city_id = $info['city_id'];
|
||||
$biz_id_arr = array_column($bizs, 'biz_id');
|
||||
$bizs && $biz_id_arr = array_column($bizs, 'biz_id');
|
||||
$group_id1 = $info['group_id1'];
|
||||
$bizs1 = $info['bizs1'];
|
||||
$province_id1 = $info['province_id1'];
|
||||
$city_id1 = $info['city_id1'];
|
||||
$biz_id_arr1 = is_array($bizs1) ? array_column($bizs1, 'biz_id') : '';
|
||||
|
||||
@@ -207,6 +206,8 @@ class Member extends HD_Controller
|
||||
$add = array(
|
||||
'mobile' => $mobile,
|
||||
'uname' => $uname,
|
||||
'province_id' => $province_id,
|
||||
'province_id1' => $province_id1,
|
||||
'city_id' => $city_id,
|
||||
'city_id1' => $city_id1,
|
||||
'status' => 1,
|
||||
@@ -218,10 +219,10 @@ class Member extends HD_Controller
|
||||
$biz_id_arr1 && $add['biz_id1'] = implode(',', $biz_id_arr1);
|
||||
|
||||
$id = $this->userM->add($add);
|
||||
if ($id && $group_id == 4 && $biz_id_arr) {//加狸车宝渠道门店
|
||||
if ($id && $group_id == 4 && $biz_id_arr) {//加理车宝渠道门店
|
||||
$this->channel_biz(["uid" => $id, 'biz_id_arr' => $biz_id_arr]);
|
||||
}
|
||||
if ($id && $group_id1 == 4 && $biz_id_arr1) {//加狸车宝渠道门店 group_id1
|
||||
if ($id && $group_id1 == 4 && $biz_id_arr1) {//加理车宝渠道门店 group_id1
|
||||
$this->channel_biz(["uid" => $id, 'biz_id_arr' => $biz_id_arr1, 'edit' => 1, 'group_id1' => true]);
|
||||
}
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '操作成功', '/app/licheb/member');
|
||||
@@ -237,6 +238,8 @@ class Member extends HD_Controller
|
||||
$mobile = $info['mobile'];
|
||||
$group_id = $info['group_id'];
|
||||
$bizs = $info['bizs'];
|
||||
$province_id = $info['province_id'];
|
||||
$province_id1 = $info['province_id1'];
|
||||
$city_id = $info['city_id'];
|
||||
$biz_id_arr = is_array($bizs) ? array_column($bizs, 'biz_id') : '';
|
||||
$group_id1 = $info['group_id1'];
|
||||
@@ -258,6 +261,8 @@ class Member extends HD_Controller
|
||||
|
||||
$upd = array(
|
||||
'mobile' => $mobile,
|
||||
'province_id' => $province_id,
|
||||
'province_id1' => $province_id1,
|
||||
'city_id' => $city_id,
|
||||
'city_id1' => $city_id1,
|
||||
);
|
||||
@@ -271,10 +276,10 @@ class Member extends HD_Controller
|
||||
$uname && $upd['uname'] = $uname;
|
||||
|
||||
$this->userM->update($upd, array('id' => $id));
|
||||
if ($id && $group_id == 4) {//加狸车宝渠道门店
|
||||
if ($id && $group_id == 4) {//加理车宝渠道门店
|
||||
$this->channel_biz(["uid" => $id, 'biz_id_arr' => $biz_id_arr, 'edit' => 1]);
|
||||
}
|
||||
if ($id && $group_id1 == 4) {//加狸车宝渠道门店 group_id1
|
||||
if ($id && $group_id1 == 4) {//加理车宝渠道门店 group_id1
|
||||
$this->channel_biz(["uid" => $id, 'biz_id_arr' => $biz_id_arr1, 'edit' => 1, 'group_id1' => true]);
|
||||
}
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '操作成功');
|
||||
@@ -347,7 +352,7 @@ class Member extends HD_Controller
|
||||
);
|
||||
}
|
||||
}
|
||||
if ($type == 1) {//查找渠道经理
|
||||
if ($type == 1) {//查找客户成功经理
|
||||
$where2 = ['status' => 1, 'group_id' => 4];
|
||||
$where2["id in(select uid from lc_app_licheb_channel_biz where biz_id = {$biz_id})"] = null;
|
||||
$total2 = $this->userM->count($where2);
|
||||
@@ -369,7 +374,7 @@ class Member extends HD_Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:加狸车宝渠道门店
|
||||
* Notes:加理车宝渠道门店
|
||||
* Created on: 2021/11/12 14:54
|
||||
* Created by: dengbw
|
||||
* @param array $json
|
||||
@@ -401,7 +406,7 @@ class Member extends HD_Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:获取门店渠道经理
|
||||
* Notes:获取门店客户成功经理
|
||||
* Created on: 2021/11/15 11:31
|
||||
* Created by: dengbw
|
||||
* @return bool
|
||||
|
||||
@@ -281,20 +281,14 @@ class Store extends HD_Controller
|
||||
$page = $this->input->get('page');
|
||||
$size = $this->input->get('size');
|
||||
$title = $this->input->get('title');
|
||||
$type = $this->input->get('type');
|
||||
|
||||
$where = array();
|
||||
$typeAry = $this->biz_model->type_ary();
|
||||
$type_ids = implode(',', array_keys($typeAry));
|
||||
$type_ids && $where["type in ($type_ids)"] = null;
|
||||
if (strlen($status) > 0) {
|
||||
$where['status'] = $status;
|
||||
} else {
|
||||
$where['status > -1'] = null;
|
||||
}
|
||||
if ($type) {
|
||||
$where["type in({$type})"] = null;
|
||||
}
|
||||
|
||||
$province_id && $where['province_id'] = $province_id;
|
||||
$city_id && $where['city_id'] = $city_id;
|
||||
$county_id && $where['county_id'] = $county_id;
|
||||
|
||||
@@ -66,11 +66,13 @@ class Clues extends HD_Controller
|
||||
$where["en_time <="] = $en_time[1] . ' 23:59:59';
|
||||
}
|
||||
}
|
||||
|
||||
strlen($params['status']) && $where["status"] = $params['status'];
|
||||
strlen($params['status2']) && $where["status2"] = $params['status2'];
|
||||
$province_id && $where['province_id'] = $province_id;
|
||||
$city_id && $where['city_id'] = $city_id;
|
||||
$county_id && $where['county_id'] = $county_id;
|
||||
|
||||
if ($params['cfrom_id'] || $params['cfrom_id2']) {
|
||||
if ($params['cfrom_id2']) {
|
||||
$where['cf_id'] = $params['cfrom_id2'];
|
||||
@@ -82,14 +84,32 @@ class Clues extends HD_Controller
|
||||
$cf_str_ids && $where["cf_id in ({$cf_str_ids})"] = null;
|
||||
}
|
||||
}
|
||||
|
||||
//门店筛选
|
||||
if ($params['biz_id_admin']) {
|
||||
$where['biz_id'] = $params['biz_id_admin'];
|
||||
} else if ($params['county_id_admin']) {
|
||||
$where["biz_id in(select id from lc_biz where county_id={$params['county_id_admin']})"] = null;
|
||||
} else if ($params['city_id_admin']) {
|
||||
$where["biz_id in(select id from lc_biz where city_id={$params['city_id_admin']})"] = null;
|
||||
}else if ($params['province_id_admin']) {
|
||||
$where["biz_id in(select id from lc_biz where province_id={$params['province_id_admin']})"] = null;
|
||||
}
|
||||
|
||||
!$params['province_id_admin'] && $params['province_id_admin'] = '';
|
||||
!$params['city_id_admin'] && $params['city_id_admin'] = '';
|
||||
!$params['county_id_admin'] && $params['county_id_admin'] = '';
|
||||
!$params['biz_id_admin'] && $params['biz_id_admin'] = '';
|
||||
|
||||
$count = $this->clues_model->count($where);
|
||||
$lists = [];
|
||||
if ($count) {
|
||||
$fileds = 'id,name,mobile,cf_id,c_time,admin_id,status,status2,en_time,county_id';
|
||||
$fileds = 'id,name,mobile,cf_id,cf2_id,c_time,admin_id,status,status2,en_time,province_id,city_id,county_id,biz_id';
|
||||
$rows = $this->clues_model->select($where, 'en_time desc,id desc', $page, $size, $fileds);
|
||||
$map_admin = $map_cf_pid = $cf_title_arr = [];
|
||||
//获取来源
|
||||
$cf_id_arr = array_unique(array_column($rows, 'cf_id'));
|
||||
|
||||
//获取来源二
|
||||
$cf_id_arr = array_unique(array_column($rows, 'cf2_id'));
|
||||
if ($cf_id_arr) {
|
||||
$cf_id_str = implode(',', $cf_id_arr);
|
||||
$res_cfrom = $this->clues_cfrom_model->select(["id in({$cf_id_str})" => null], 'id desc', 0, 0, 'id,title,pid');
|
||||
@@ -106,6 +126,7 @@ class Clues extends HD_Controller
|
||||
$cf_title_arr[$val['id']] = $title;
|
||||
}
|
||||
}
|
||||
|
||||
//获取管理员
|
||||
$this->load->model('sys/sys_admin_model', 'admin_model');
|
||||
$admin_id_arr = array_unique(array_column($rows, 'admin_id'));
|
||||
@@ -113,26 +134,62 @@ class Clues extends HD_Controller
|
||||
$str_ids = implode(',', $admin_id_arr);
|
||||
$map_admin = $this->admin_model->map('id', 'username', ["id in ({$str_ids})" => null]);
|
||||
}
|
||||
$county_id_arr = array_unique(array_column($rows, 'county_id'));
|
||||
|
||||
//门店
|
||||
$biz_id_arr = array_unique(array_column($rows, 'biz_id'));
|
||||
$str_ids = implode(',', $biz_id_arr);
|
||||
$biz_id_arr && $biz_rows = $this->biz_model->map('id', 'id,biz_name,county_id', ["id in ({$str_ids})" => null], '', '', '', 'id,biz_name,county_id');
|
||||
|
||||
//门店位置
|
||||
$county_id_bizarr = array_filter(array_unique(array_column($biz_rows, 'county_id')));
|
||||
if ($county_id_bizarr) {
|
||||
$str_ids = implode(',', $county_id_bizarr);
|
||||
$map_area_biz = $this->area_model->map('county_id', '', ["county_id in ({$str_ids})" => null], '', 0, $size, 'county_id,province_name,city_name,county_name');
|
||||
}
|
||||
|
||||
$county_id_arr = array_filter(array_unique(array_column($rows, 'county_id')));
|
||||
if ($county_id_arr) {
|
||||
$str_ids = implode(',', $county_id_arr);
|
||||
$map_area = $this->area_model->map('county_id', '', ["county_id in ({$str_ids})" => null], '', 0, $size, 'county_id,province_name,city_name,county_name');
|
||||
$map_area_county = $this->area_model->map('county_id', '', ["county_id in ({$str_ids})" => null], '', 0, $size, 'county_id,province_name,city_name,county_name');
|
||||
}
|
||||
|
||||
$city_id_arr = array_filter(array_unique(array_column($rows, 'city_id')));
|
||||
if ($city_id_arr) {
|
||||
$str_ids = implode(',', $city_id_arr);
|
||||
$map_area_city = $this->area_model->map('city_id', '', ["city_id in ({$str_ids})" => null], '', 0, $size, 'city_id,province_name,city_name');
|
||||
}
|
||||
|
||||
$province_id_arr = array_filter(array_unique(array_column($rows, 'province_id')));
|
||||
if ($province_id_arr) {
|
||||
$str_ids = implode(',', $province_id_arr);
|
||||
$map_area_province = $this->area_model->map('province_id', '', ["province_id in ({$str_ids})" => null], '', 0, $size, 'province_id,province_name');
|
||||
}
|
||||
|
||||
foreach ($rows as $key => $val) {
|
||||
$val['cf_title'] = $cf_title_arr[$val['cf_id']] ? $cf_title_arr[$val['cf_id']] : '';
|
||||
$val['cf_title'] = $cf_title_arr[$val['cf2_id']] ? $cf_title_arr[$val['cf2_id']] : $cf_title_arr[$val['cf_id']];
|
||||
|
||||
$status_name = $statusAry[$val['status']]['name'];
|
||||
$val['status2'] && $status_name .= '‒' . $statusAry[$val['status']]['list'][$val['status2']];
|
||||
$val['status_name'] = $status_name;
|
||||
$val['admin_name'] = $map_admin[$val['admin_id']] ? $map_admin[$val['admin_id']] : '';
|
||||
if (SUPER_ADMIN == $this->role) {
|
||||
$val['mobile_sub'] = $val['mobile'];
|
||||
} else {
|
||||
$val['mobile_sub'] = $val['mobile'] ? substr_replace($val['mobile'], '*****', 0, 5) : '';
|
||||
}
|
||||
$area = $map_area[$val['county_id']][0];
|
||||
if ($area) {
|
||||
$val['mobile_sub'] = $val['mobile'];
|
||||
|
||||
if ($val['county_id']) {
|
||||
$area = $map_area_county[$val['county_id']][0];
|
||||
$val['poi'] = "{$area['province_name']}-{$area['city_name']}-{$area['county_name']}";
|
||||
}elseif ($val['city_id']) {
|
||||
$area = $map_area_city[$val['city_id']][0];
|
||||
$val['poi'] = "{$area['province_name']}-{$area['city_name']}";
|
||||
}elseif ($val['province_id']) {
|
||||
$area = $map_area_province[$val['province_id']][0];
|
||||
$val['poi'] = "{$area['province_name']}";
|
||||
}
|
||||
|
||||
$val['biz_name'] = isset($biz_rows[$val['biz_id']]) ? $biz_rows[$val['biz_id']]['biz_name'] : '';
|
||||
|
||||
$bizarea = $map_area_biz[$biz_rows[$val['biz_id']]['county_id']][0];
|
||||
$val['biz_poi'] = "{$bizarea['province_name']}-{$bizarea['city_name']}-{$bizarea['county_name']}";
|
||||
|
||||
$lists[] = $val;
|
||||
}
|
||||
}
|
||||
@@ -151,9 +208,10 @@ class Clues extends HD_Controller
|
||||
$statusList[] = array("id" => $key, "name" => $value['name'], "cate" => $cate, "count" => $count1);
|
||||
}
|
||||
|
||||
$map_cfrom = $this->clues_cfrom_model->map('id', 'title', array('status' => 1, 'pid' => 0), '', 0, 0, 'id, title');
|
||||
$map_cfrom = $this->clues_cfrom_model->map('id', 'title', array('status' => 1, 'pid' => 0, 'type' => 0), '', 0, 0, 'id, title');
|
||||
$map_cfrom2 = $this->clues_cfrom_model->map('id', 'title', array('status' => 1, 'pid' => $params['cfrom_id']), '', 0, 0, 'id, title');
|
||||
|
||||
$this->data['provinces'] = $this->province_ary();
|
||||
$this->data['lists'] = $lists;
|
||||
$this->data['pager'] = array('count' => ceil($count / $size), 'curr' => $page, 'totle' => $count);
|
||||
$this->data['searchTpAry'] = $this->searchTpAry;
|
||||
@@ -239,7 +297,7 @@ class Clues extends HD_Controller
|
||||
$dataInfo['county_id'] = $re['county_id'];
|
||||
$dataInfo['v_id'] = intval($jsondata['car']['version']['id']);
|
||||
$dataInfo['cor_id'] = intval($jsondata['car']['color']['id']);
|
||||
//获取已分配店铺
|
||||
//获取已分配门店
|
||||
$cus = $this->customers_model->select(['rid' => $re['id']], '', '', '', 'biz_id');
|
||||
$biz_arr = [];
|
||||
if ($cus) {
|
||||
@@ -293,7 +351,7 @@ class Clues extends HD_Controller
|
||||
}
|
||||
|
||||
$cf_id1 = '';
|
||||
$cf_id2 = '';
|
||||
$c2_id2 = '';
|
||||
if ($row['cf_id']) {
|
||||
$row_cfrom = $this->clues_cfrom_model->get(array('id' => $row['cf_id']));
|
||||
if ($row_cfrom['pid']) {
|
||||
@@ -332,7 +390,7 @@ class Clues extends HD_Controller
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
$where = array('status' => 1, 'pid' => 0);
|
||||
$where = array('status' => 1, 'pid' => 0, 'type' => 0);
|
||||
$select = 'id, title';
|
||||
$map_cfrom = $this->clues_cfrom_model->map('id', 'title', $where, '', 0, 0, $select);
|
||||
$this->data['provinces'] = $this->province_ary();
|
||||
@@ -355,20 +413,20 @@ class Clues extends HD_Controller
|
||||
if (!mobile_valid($info['mobile'])) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '手机号码不准确');
|
||||
}
|
||||
|
||||
if ($this->clues_model->get(['mobile' => $info['mobile']])) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '手机号已存在');
|
||||
}
|
||||
$cf_id = 0;
|
||||
if ($info['cf_id2']) {
|
||||
$cf_id = $info['cf_id2'];
|
||||
} else if ($info['cf_id1']) {
|
||||
$cf_id = $info['cf_id1'];
|
||||
|
||||
if (!$info['cf_id'] || !$info['cf_id2']) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '来源需填写完整');
|
||||
}
|
||||
|
||||
$add = array(
|
||||
'name' => $info['name'],
|
||||
'mobile' => $info['mobile'],
|
||||
'cf_id' => $cf_id,
|
||||
'cf_id' => $info['cf_id'],
|
||||
'cf2_id' => $info['cf_id2'],
|
||||
'admin_id' => $this->uid,
|
||||
'c_time' => time(),
|
||||
);
|
||||
@@ -751,11 +809,15 @@ class Clues extends HD_Controller
|
||||
function json_map_cfrom()
|
||||
{
|
||||
$pid = $this->input->post('pid');
|
||||
$type = $this->input->post('type');
|
||||
$status = $this->input->post('status');
|
||||
|
||||
$where = array();
|
||||
if (strlen($pid) > 0) {
|
||||
$where['pid'] = $pid;
|
||||
}else{
|
||||
!$type && $type = 0;
|
||||
$where['type'] = $type;
|
||||
}
|
||||
|
||||
if (strlen($status) > 0) {
|
||||
|
||||
@@ -37,9 +37,10 @@ class CluesCfrom extends HD_Controller
|
||||
$setValue = [];
|
||||
$setValue['id'] = $value['id'];
|
||||
$setValue['name'] = $value['title'];
|
||||
$setValue['type'] = $value['type'] ? '门店' : '中台';
|
||||
$setValue['sort'] = $value['sort'];
|
||||
$setValue['status'] = $value['status'];
|
||||
$setValue['status_name'] = $value['status'] == 1 ? '正常' : '禁用';
|
||||
$setValue['status_name'] = $value['status'] == 1 ? '开启' : '禁用';
|
||||
$options = '';
|
||||
$res_cfrom = $this->mdCluesCfrom->select(["status<>" => -1, 'pid' => $value['id']], "sort desc,id desc", 1, 10, 'title');
|
||||
$res_cfrom && $options = implode(',', array_column($res_cfrom, 'title'));
|
||||
@@ -76,13 +77,15 @@ class CluesCfrom extends HD_Controller
|
||||
return $this->show_json(SYS_CODE_FAIL, '数据不存在!');
|
||||
}
|
||||
$name = $re['title'];
|
||||
$type = $re['type'];
|
||||
$sort = $re['sort'];
|
||||
} else {
|
||||
$url = "receiver/CluesCfrom/add";
|
||||
$sort = 50;
|
||||
$type = 0;
|
||||
$name = '';
|
||||
}
|
||||
$this->data['showInfo'] = ['id' => $id, 'name' => $name, 'sort' => $sort, 'url' => $url];
|
||||
$this->data['showInfo'] = ['id' => $id, 'name' => $name, 'type' => $type, 'sort' => $sort, 'url' => $url];
|
||||
return $this->show_view('receiver/cluescfrom/edit');
|
||||
}
|
||||
|
||||
@@ -97,7 +100,13 @@ class CluesCfrom extends HD_Controller
|
||||
if ($re) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '名称已存在了!');
|
||||
}
|
||||
$id = $this->mdCluesCfrom->add(['title' => $params['name'], 'sort' => $params['sort'], 'c_time' => time()]);
|
||||
|
||||
$re = $this->mdCluesCfrom->get(array('type' => 1, 'pid' => 0, "status" => 1));
|
||||
if ($re && $re['id'] != $params['id']) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '门店分类最多存在一个!');
|
||||
}
|
||||
|
||||
$id = $this->mdCluesCfrom->add(['title' => $params['name'], 'type' => $params['type'], 'sort' => $params['sort'], 'c_time' => time()]);
|
||||
if (!$id) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '保存失败');
|
||||
}
|
||||
@@ -118,7 +127,12 @@ class CluesCfrom extends HD_Controller
|
||||
if ($re && $re['id'] != $params['id']) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '名称已存在了!');
|
||||
}
|
||||
$this->mdCluesCfrom->update(['title' => $params['name'], 'sort' => $params['sort']], ['id' => $params['id']]);
|
||||
|
||||
$re = $this->mdCluesCfrom->get(array('type' => 1, 'pid' => 0, "status" => 1));
|
||||
if ($re && $re['id'] != $params['id']) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '门店分类最多存在一个!');
|
||||
}
|
||||
$this->mdCluesCfrom->update(['title' => $params['name'], 'type' => $params['type'],'sort' => $params['sort']], ['id' => $params['id']]);
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '保存成功');
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
|
||||
class Customer extends HD_Controller
|
||||
{
|
||||
private $searchTpAry = array('mobile' => '客户手机号', 'name' => '客户姓名');
|
||||
private $searchTimeAry = array('c_time' => '创建时间', 'p_time' => '分配时间', 'cont_time' => '最后联系时间', 'u_time' => '最后操作时间'
|
||||
, 'dt_time' => '首次到店时间', 'order_time' => '下单时间', 'def_time' => '战败时间');
|
||||
private $searchTimeAry = array('c_time' => '创建时间', 'p_time' => '派单时间', 'cont_time' => '最后联系时间', 'dt_time' => '首次到店时间', 'order_time' => '下定时间', 'def_time' => '战败时间');
|
||||
|
||||
protected $log_dir;
|
||||
|
||||
@@ -29,8 +28,9 @@ class Customer extends HD_Controller
|
||||
// $this->load->model('receiver/Receiver_customer_stat_data_log_model', 'statdatalog');
|
||||
$this->load->model('app/licheb/app_licheb_users_model');
|
||||
$this->load->model("biz/biz_model");
|
||||
|
||||
$this->load->model('area_model');
|
||||
$this->load->model('auto/auto_brand_model');
|
||||
|
||||
$this->log_dir = 'receiver_' . get_class($this);
|
||||
}
|
||||
|
||||
@@ -50,30 +50,37 @@ class Customer extends HD_Controller
|
||||
$where = $this->get_where($params);
|
||||
$count = $this->customers_model->count($where);
|
||||
$lists = [];
|
||||
$offlineSources = $this->customers_model->offlineSources();
|
||||
$wxqyAry = $this->customers_model->wxqyAry();
|
||||
|
||||
//$wxqyAry = $this->customers_model->wxqyAry();
|
||||
$wxgrAry = $this->customers_model->wxgrAry();
|
||||
if ($count) {
|
||||
$fileds = 'id,name,mobile,cf_title,cont_time,admin_id,status,biz_id,cs_biz_id,level,of_id,of2_id,wxqy,wxgr';
|
||||
$fileds = 'id,name,mobile,cf_title,cont_time,admin_id,status,biz_id,level,of_id,of2_id,wxgr,c_time,county_id';
|
||||
$rows = $this->customers_model->select($where, 'id desc', $page, $size, $fileds);
|
||||
//获取销售员
|
||||
//获取车管家
|
||||
$admin_id_arr = array_unique(array_column($rows, 'admin_id'));
|
||||
$admin_id_arr && $admin_rows = $this->app_licheb_users_model->get_map_by_ids($admin_id_arr, 'id,uname');
|
||||
//获取门店
|
||||
$biz_id_arr = array_unique(array_column($rows, 'biz_id'));
|
||||
$biz_id_arr && $biz_rows = $this->biz_model->get_map_by_ids($biz_id_arr, 'id,biz_name');
|
||||
foreach ($rows as $key => $val) {
|
||||
if (SUPER_ADMIN == $this->role) {
|
||||
$mobile_sub = $val['mobile'];
|
||||
} else {
|
||||
$mobile_sub = $val['mobile'] ? substr_replace($val['mobile'], '*****', 0, 5) : '';
|
||||
}
|
||||
$mobile_sub = $val['mobile'];
|
||||
$of_title = '';
|
||||
if ($val['of_id']) {
|
||||
$of_ary = $offlineSources[$val['of_id']];
|
||||
$of_title = $of_ary['name'];
|
||||
$val['of2_id'] && $of_title .= '-' . $of_ary['list'][$val['of2_id']];
|
||||
$of = $this->clues_cfrom_model->get(array('id' => $val['of_id']));
|
||||
$of_title = $of['title'];
|
||||
if($val['of2_id']){
|
||||
$of = $this->clues_cfrom_model->get(array('id' => $val['of2_id']));
|
||||
$of_title .= '-' . $of['title'];
|
||||
}
|
||||
}
|
||||
|
||||
$county_id_arr = array_unique(array_column($rows, 'county_id'));
|
||||
if ($county_id_arr) {
|
||||
$str_ids = implode(',', $county_id_arr);
|
||||
$map_area = $this->area_model->map('county_id', '', ["county_id in ({$str_ids})" => null], '', 0, $size, 'county_id,province_name,city_name,county_name');
|
||||
$area = $map_area[$val['county_id']][0];
|
||||
}
|
||||
|
||||
$lists[] = array(
|
||||
'id' => $val['id'],
|
||||
'name' => $val['name'],
|
||||
@@ -83,11 +90,13 @@ class Customer extends HD_Controller
|
||||
'of_title' => $of_title,
|
||||
'of2_id' => $val['of2_id'],
|
||||
'status_name' => $status_arr[$val['status']],
|
||||
'wxqy_name' => $wxqyAry[$val['wxqy']],
|
||||
//'wxqy_name' => $wxqyAry[$val['wxqy']],
|
||||
'wxgr_name' => $wxgrAry[$val['wxgr']],
|
||||
'to_send' => $this->customers_model->csbizidAry($val['cs_biz_id'] ? $val['cs_biz_id'] : 0),
|
||||
//'to_send' => $this->customers_model->csbizidAry($val['cs_biz_id'] ? $val['cs_biz_id'] : 0),
|
||||
'admin_name' => isset($admin_rows[$val['admin_id']]) ? $admin_rows[$val['admin_id']][0]['uname'] : '',
|
||||
'area' => $area ? "{$area['province_name']}-{$area['city_name']}-{$area['county_name']}" : '',
|
||||
'biz_name' => isset($biz_rows[$val['biz_id']]) ? $biz_rows[$val['biz_id']][0]['biz_name'] : '',
|
||||
'c_time' => $val['c_time'] != '0' ? date('Y-m-d H:i:s', $val['c_time']) : '',
|
||||
'cont_time' => $val['cont_time'] != '0000-00-00 00:00:00' ? $val['cont_time'] : '',
|
||||
);
|
||||
}
|
||||
@@ -98,12 +107,11 @@ class Customer extends HD_Controller
|
||||
$show_info['tagsIntention'] = $this->get_tag(0, 2, $tag_data);
|
||||
$tag_data = $params['tagsDefeat'] ? explode(',', $params['tagsDefeat']) : '';
|
||||
$show_info['tagsDefeat'] = $this->get_tag(0, 1, $tag_data);
|
||||
//渠道经理
|
||||
//客户成功经理
|
||||
$qdjl_lists = $this->app_licheb_users_model->select(array('group_id' => 4, 'status' => 1, 'biz_id<>' => '0'), 'id desc', 0, 0, 'id,uname as name');
|
||||
$show_info['levelAry'] = $this->customers_model->get_sdata('level');
|
||||
#$show_info['offlineSourcesAry'] = $offlineSources;
|
||||
$show_info['offlineSourcesAry'] = $this->customers_model->offlineSources_search();
|
||||
$show_info['wxqyAry'] = $wxqyAry;
|
||||
$show_info['cfroms'] = $this->clues_cfrom_model->map('id', 'title', array('status' => 1, 'pid' => 0), '', 0, 0, 'id, title');
|
||||
$show_info['cfroms2'] = $this->clues_cfrom_model->map('id', 'title', array('status' => 1, 'pid' => $params['of_id']), '', 0, 0, 'id, title');
|
||||
$show_info['wxgrAry'] = $wxgrAry;
|
||||
$show_info['csbizidAry'] = $this->customers_model->csbizidAry();
|
||||
$show_info['cbrandAry'] = $this->customers_model->cbrandAry();
|
||||
@@ -400,6 +408,7 @@ class Customer extends HD_Controller
|
||||
!is_numeric($params['c_brand']) && $params['c_brand'] = '';
|
||||
!$params['of_id'] && $params['of_id'] = '';
|
||||
!$params['of2_id'] && $params['of2_id'] = '';
|
||||
!$params['province_id'] && $params['province_id'] = '';
|
||||
!$params['city_id'] && $params['city_id'] = '';
|
||||
!$params['county_id'] && $params['county_id'] = '';
|
||||
!$params['biz_type'] && $params['biz_type'] = '';
|
||||
@@ -432,6 +441,9 @@ class Customer extends HD_Controller
|
||||
if ($params['of2_id']) {
|
||||
$where['of2_id'] = $params['of2_id'];
|
||||
}
|
||||
if ($params['province_id']) {
|
||||
$where['province_id'] = $params['province_id'];
|
||||
}
|
||||
if ($params['city_id']) {
|
||||
$where['city_id'] = $params['city_id'];
|
||||
}
|
||||
@@ -462,8 +474,12 @@ class Customer extends HD_Controller
|
||||
$where["biz_id in(select id from lc_biz where county_id={$params['county_id_admin']})"] = null;
|
||||
} else if ($params['city_id_admin']) {
|
||||
$where["biz_id in(select id from lc_biz where city_id={$params['city_id_admin']})"] = null;
|
||||
}else if ($params['province_id_admin']) {
|
||||
$where["biz_id in(select id from lc_biz where province_id={$params['province_id_admin']})"] = null;
|
||||
}
|
||||
|
||||
$where[$this->customers_model->csbizidWhere($params['cs_biz_id'])] = null;
|
||||
!$params['province_id_admin'] && $params['province_id_admin'] = '';
|
||||
!$params['city_id_admin'] && $params['city_id_admin'] = '';
|
||||
!$params['county_id_admin'] && $params['county_id_admin'] = '';
|
||||
!$params['biz_id_admin'] && $params['biz_id_admin'] = '';
|
||||
@@ -503,22 +519,7 @@ class Customer extends HD_Controller
|
||||
$order_time[0] && $where["def_time >="] = $order_time[0] . ' 00:00:00';
|
||||
$order_time[1] && $where["def_time <="] = $order_time[1] . ' 23:59:59';
|
||||
}
|
||||
if ($params['cfrom_id'] || $params['cfrom_id2']) {
|
||||
if ($params['cfrom_id'] == 24) {
|
||||
$where['cf_id'] = 24;
|
||||
$params['cfrom_id2'] && $where['t_id'] = $params['cfrom_id2'];
|
||||
} else {
|
||||
if ($params['cfrom_id2']) {
|
||||
$where['cf_id'] = $params['cfrom_id2'];
|
||||
} else {
|
||||
$cf_rows = $this->clues_cfrom_model->select(['pid' => $params['cfrom_id']], '', '', '', 'id');
|
||||
$cf_ids = array_column($cf_rows, 'id');
|
||||
$cf_ids[] = $params['cfrom_id'];
|
||||
$cf_str_ids = implode(',', array_filter($cf_ids));
|
||||
$cf_str_ids && $where["cf_id in ({$cf_str_ids})"] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($params['tags']) {
|
||||
$where = $this->tagWhere($where, $params['tags']);
|
||||
} else if ($params['tagsIntention']) {
|
||||
@@ -926,7 +927,9 @@ class Customer extends HD_Controller
|
||||
|
||||
$count = $this->customers_model->count($where);
|
||||
$data = [];
|
||||
$offlineSources = $this->customers_model->offlineSources();
|
||||
|
||||
|
||||
$onlineSources = $this->customers_model->offlineSources();
|
||||
$status_arr = $this->customers_model->get_status();
|
||||
unset($status_arr['-1']);
|
||||
if ($count) {
|
||||
|
||||
@@ -14,7 +14,11 @@ abstract class HD_Controller extends CI_Controller
|
||||
|
||||
public $data = array(), $if_ajax = false;
|
||||
|
||||
public $city_lists = [430, 350]; //开发城省份 湖南 福建
|
||||
//开发城省份 湖南 福建
|
||||
public $city_lists = array(
|
||||
'430000' => ['id' => '430000', 'name' => '湖南省'],
|
||||
'350000' => ['id' => '350000', 'name' => '福建省'],
|
||||
);
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -132,8 +136,10 @@ abstract class HD_Controller extends CI_Controller
|
||||
protected function province_ary()
|
||||
{
|
||||
$area_where = [];
|
||||
if ($this->city_lists) {
|
||||
$area_where["province_id in (" . implode(",", $this->city_lists) . ")"] = null;
|
||||
$citys = array_column($this->city_lists, 'id');
|
||||
if ($citys) {
|
||||
$this->load->model("sys/area_model", 'area_model');
|
||||
$area_where["province_id in (" . implode(",", $citys) . ")"] = null;
|
||||
}
|
||||
return $this->area_model->select($area_where, '', 0, 0, 'distinct(province_id), province_name');
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w120">默认角色:</label>
|
||||
<div class="am-para-input w100" style="margin-left: 130px">
|
||||
<div class="am-para-input w140" style="margin-left: 130px">
|
||||
<select name="group_id" v-model="info.group_id" @change="resetBiz">
|
||||
<option value="">选择角色</option>
|
||||
<option :value="i" v-for="(v,i) in groups">{{v}}</option>
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w120">第二角色:</label>
|
||||
<div class="am-para-input w100" style="margin-left: 130px">
|
||||
<div class="am-para-input w140" style="margin-left: 130px">
|
||||
<select name="group_id1" v-model="info.group_id1" @change="resetBiz1">
|
||||
<option value="0">选择角色</option>
|
||||
<option :value="i" v-for="(v,i) in groups">{{v}}</option>
|
||||
@@ -86,7 +86,15 @@
|
||||
<div class="modal-body">
|
||||
<div class="header">
|
||||
<div class="am-form am-form-horizontal">
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-form-group fl" style="width:1020px">
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select title="城市" v-model="search_info.province_id">
|
||||
<option value="0">省份</option>
|
||||
<template v-for="(v,i) in provinceAry">
|
||||
<option :value="v.province_id">{{v.province_name}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select title="城市" v-model="search_info.city_id">
|
||||
<option value="0">城市</option>
|
||||
@@ -167,6 +175,14 @@
|
||||
<div class="header">
|
||||
<div class="am-form am-form-horizontal">
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select title="城市" v-model="search_info.province_id1">
|
||||
<option value="0">省份</option>
|
||||
<template v-for="(v,i) in provinceAry">
|
||||
<option :value="v.province_id">{{v.province_name}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select title="城市" v-model="search_info.city_id1">
|
||||
<option value="0">城市</option>
|
||||
@@ -197,7 +213,7 @@
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="vuetable-th-slot-title">商家名</th>
|
||||
<th class="vuetable-th-slot-title">门店</th>
|
||||
<th class="vuetable-th-slot-actions text-right">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -260,10 +276,11 @@
|
||||
brandsList1: [],
|
||||
selectedBrands: [],
|
||||
selectedBrands1: [],
|
||||
provinceAry: <?=json_encode($provinces, JSON_UNESCAPED_UNICODE)?>,
|
||||
cityAry: [],
|
||||
countyAry: [],
|
||||
show_info: {cityList: [], typeAry: []},
|
||||
search_info: {city_id: 0, county_id: 0, type: 0, city_id1: 0, county_id1: 0, type1: 0}
|
||||
show_info: {cityList: []},
|
||||
search_info: {province_id: 0, city_id: 0, county_id: 0, type: 0, province_id1: 0, city_id1: 0, county_id1: 0, type1: 0}
|
||||
},
|
||||
computed: {},
|
||||
created: function () {
|
||||
@@ -348,14 +365,14 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
//选择商家
|
||||
//选择门店
|
||||
brandModal: function () {
|
||||
var that = this;
|
||||
layer.open({
|
||||
type: 1,
|
||||
area: ['55%', '80%'], //宽高
|
||||
area: ['40%', '80%'], //宽高
|
||||
content: $('#brand-modal'),
|
||||
title: '选择商家',
|
||||
title: '选择门店',
|
||||
shade: false,
|
||||
btn: ['选好了'],
|
||||
yes: function (index) {
|
||||
@@ -369,9 +386,9 @@
|
||||
data: {
|
||||
page: that.brandsThPage,
|
||||
type: that.search_info.type,
|
||||
province_id: that.search_info.province_id,
|
||||
city_id: that.search_info.city_id,
|
||||
county_id: that.search_info.county_id,
|
||||
types:'1,2,3',
|
||||
},
|
||||
success: function (json) {
|
||||
var brandsList = json.data.shopList;
|
||||
@@ -460,9 +477,9 @@
|
||||
var that = this;
|
||||
layer.open({
|
||||
type: 1,
|
||||
area: ['55%', '80%'], //宽高
|
||||
area: ['40%', '80%'], //宽高
|
||||
content: $('#brand-modal1'),
|
||||
title: '选择商家',
|
||||
title: '选择门店',
|
||||
shade: false,
|
||||
btn: ['选好了'],
|
||||
yes: function (index) {
|
||||
@@ -476,9 +493,9 @@
|
||||
data: {
|
||||
page: that.brandsThPage,
|
||||
type: that.search_info.type1,
|
||||
province_id: that.search_info.province_id1,
|
||||
city_id: that.search_info.city_id1,
|
||||
county_id: that.search_info.county_id1,
|
||||
types:'1,2,3',
|
||||
},
|
||||
success: function (json) {
|
||||
var brandsList1 = json.data.shopList;
|
||||
@@ -501,7 +518,7 @@
|
||||
},
|
||||
init_citys: function () {
|
||||
var vm = this;
|
||||
$.get('common/area', {id: '350', key: 'city', type: 1}, function (response) {
|
||||
$.get('common/area', {id: vm.search_info.province_id, key: 'city', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.cityAry = response.data;
|
||||
}
|
||||
@@ -522,6 +539,10 @@
|
||||
var vm = this;
|
||||
vm.info.bizs = vm.selectedBrands;
|
||||
vm.info.bizs1 = vm.selectedBrands1;
|
||||
vm.info.province_id = vm.search_info.province_id;
|
||||
vm.info.city_id = vm.search_info.city_id;
|
||||
vm.info.province_id1 = vm.search_info.province_id1;
|
||||
vm.info.city_id1 = vm.search_info.city_id1;
|
||||
loading = true;
|
||||
$.ajax({
|
||||
url: '<?=$action?>',
|
||||
@@ -556,6 +577,19 @@
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'search_info.province_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.cityAry = [];
|
||||
that.search_info.city_id = 0;
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'city', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.cityAry = response.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'search_info.city_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
@@ -569,6 +603,32 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
'search_info.province_id1': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.cityAry = [];
|
||||
that.search_info.city_id1 = 0;
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'city', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.cityAry = response.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'search_info.city_id1': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.countyAry = [];
|
||||
that.search_info.county_id1 = 0;
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'county', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.countyAry = response.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -38,6 +38,12 @@
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">默认门店:</label>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select title="省份" name="province_id" v-model="params.province_id">
|
||||
<option value="">省份</option>
|
||||
<option :value="v.province_id" v-for="(v,i) in provinceAry">{{v.province_name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select title="城市" name="city_id" v-model="params.city_id">
|
||||
<option value="">城市</option>
|
||||
@@ -52,7 +58,7 @@
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select title="门店" name="biz_id" v-model="params.biz_id">
|
||||
<option value="">选择门店</option>
|
||||
<option value="">门店</option>
|
||||
<option :value="v.id" v-for="(v,i) in bizAry">{{v.title}}</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -136,44 +142,79 @@
|
||||
el: '#vue-app',
|
||||
data: {
|
||||
params: [],
|
||||
provinceAry: <?=json_encode($provinces, JSON_UNESCAPED_UNICODE)?>,
|
||||
cityAry: [],//城市
|
||||
countyAry: [],//行政区
|
||||
bizAry: [],
|
||||
province_id: '350'
|
||||
},
|
||||
mounted: function () {
|
||||
var vm = this;
|
||||
vm.params = <?=json_encode($params)?>;
|
||||
vm.init_citys(vm.province_id);
|
||||
},
|
||||
methods: {
|
||||
init_citys: function (province_id) {
|
||||
var vm = this;
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/common/area',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
id: province_id,
|
||||
key: 'city',
|
||||
type: 1
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.cityAry = response.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
get_bizs: function () {
|
||||
|
||||
},
|
||||
watch: {
|
||||
'params.province_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if (that.params.city_id > 0 || that.params.county_id > 0) {
|
||||
if (nv == '') {
|
||||
that.cityAry = [];
|
||||
that.params.city_id = '';
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'city', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.cityAry = response.data;
|
||||
if (that.params.city_id > 0) {
|
||||
var city_id = '';
|
||||
for (var i in that.cityAry) {
|
||||
var city = that.cityAry[i];
|
||||
if (city.id == that.params.city_id) {
|
||||
city_id = city.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.params.city_id = city_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'params.city_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.countyAry = [];
|
||||
that.params.city_id = '';
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'county', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.countyAry = response.data;
|
||||
if (that.params.county_id > 0) {
|
||||
var county_id = '';
|
||||
for (var i in that.countyAry) {
|
||||
var county = that.countyAry[i];
|
||||
if (county.id == that.params.county_id) {
|
||||
county_id = county.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.params.county_id = county_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'params.county_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.bizAry = [];
|
||||
that.params.biz_id = '';
|
||||
} else {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
type: 'get',
|
||||
url: '/biz/store/store/json_lists',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
province_id: that.province_id,
|
||||
province_id: that.params.province_id,
|
||||
city_id: that.params.city_id,
|
||||
county_id: that.params.county_id,
|
||||
status: 1
|
||||
@@ -194,44 +235,8 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
that.bizAry = [];
|
||||
that.params.biz_id = '';
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'params.city_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.countyAry = [];
|
||||
that.params.county_id = '';
|
||||
} else {
|
||||
if (nv.substring(0, 4) != that.params.county_id.substring(0, 4)) {
|
||||
that.params.county_id = '';
|
||||
}
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/common/area',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
id: nv,
|
||||
key: 'county',
|
||||
type: 1
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.code == 1) {
|
||||
that.countyAry = response.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
that.get_bizs();
|
||||
},
|
||||
'params.county_id': function (nv, ov) {
|
||||
var that = this;
|
||||
that.get_bizs();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
<div id="channel-modal" style="display: none;">
|
||||
<div class="am-form am-form-horizontal">
|
||||
<div class="am-form-group" style="padding-top: 15px">
|
||||
<label class="am-para-label">渠道经理:</label>
|
||||
<label class="am-para-label">客户成功经理:</label>
|
||||
<div class="am-para-input">
|
||||
<div class="am-g">
|
||||
<label class="am-checkbox-inline" v-for="(v,i) in qdjl_lists">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>狸车</title>
|
||||
<title>理车</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="description" content="">
|
||||
|
||||
@@ -52,10 +52,10 @@
|
||||
<div class="am-panel am-panel-default">
|
||||
<div class="am-panel-hd">
|
||||
<span href="javascript:void(0)" style="font-size: 20px">
|
||||
用户信息
|
||||
客户信息
|
||||
</span>
|
||||
<span style="float:right;margin-top:5px;">
|
||||
<a href="javascript:" @click="editType(2)"><i class="fa fa-edit"></i></a>
|
||||
<a href="javascript:" @click="editType(2)"><i class="fa fa-edit"></i> 编辑信息</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="am-panel-bd am-g">
|
||||
@@ -64,37 +64,55 @@
|
||||
<td class="table-td">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">客户姓名:</div>
|
||||
<input type="text" v-model="info.name" placeholder="请输入客户姓名"></div>
|
||||
<input style="width: 150px;" type="text" v-model="info.name" placeholder="请输入客户姓名" disabled="disabled"></div>
|
||||
</td>
|
||||
<td class="table-td">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">客户电话:</div>
|
||||
<div class="input-group-addon">手机号码:</div>
|
||||
{{infoShow.mobile_sub}}
|
||||
</div>
|
||||
</td>
|
||||
<td class="table-td">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">线索来源:</div>
|
||||
{{infoShow.cfrom_title}}
|
||||
<div class="input-group-addon">首次留资时间:</div>
|
||||
{{infoShow.c_time}}
|
||||
</div>
|
||||
</td>
|
||||
<td class="table-td">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">加入时间:</div>
|
||||
{{infoShow.c_time}}
|
||||
<div class="input-group-addon">最新留资时间:</div>
|
||||
{{infoShow.en_time}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="table-td">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">最后报名时间:</div>
|
||||
{{infoShow.en_time}}
|
||||
</div>
|
||||
</td>
|
||||
<td class="table-td">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">分配商家:</div>
|
||||
<div class="input-group-addon">派单门店:</div>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="省份" name="province_id_admin" v-model="province_id_admin">
|
||||
<option value="0">省份</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.provinceAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="城市" name="city_id_admin" v-model="city_id_admin">
|
||||
<option value="0">城市</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.cityAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="行政区" name="county_id_admin" v-model="county_id_admin">
|
||||
<option value="0">行政区</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.countyAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w180">
|
||||
<select name="biz_id_admin" v-model="biz_id_admin">
|
||||
<option value="0">门店</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.bizAry">{{v.title}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<template v-if="infoShow.cus_bizs">
|
||||
{{infoShow.cus_bizs}}
|
||||
</template>
|
||||
@@ -143,7 +161,7 @@
|
||||
<div class="am-panel am-panel-default">
|
||||
<div class="am-panel-hd">
|
||||
<span href="javascript:void(0)" style="font-size: 20px">
|
||||
意向信息
|
||||
派单信息
|
||||
</span>
|
||||
<span style="float:right;margin-top:5px;">
|
||||
<a href="javascript:" @click="editType(3)"><i class="fa fa-edit"></i></a>
|
||||
@@ -198,7 +216,7 @@
|
||||
<div class="am-form-group ml10">
|
||||
<a href="javascript:void(0)"
|
||||
class="am-btn am-btn-sm am-btn-success"
|
||||
@click="saveEdit()">修改意向信息</a>
|
||||
@click="saveEdit()">修改信息</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -212,7 +230,7 @@
|
||||
<div class="am-panel am-panel-default">
|
||||
<div class="am-panel-hd">
|
||||
<span href="javascript:void(0)" style="font-size: 20px">
|
||||
线索日志
|
||||
跟进日志
|
||||
</span>
|
||||
<span style="float:right;margin-top:5px">
|
||||
<a href="javascript:void(0)" @click="logModal()">新增小记</a>
|
||||
@@ -278,9 +296,14 @@
|
||||
info: {},
|
||||
infoShow: {},
|
||||
goods: {"imgs_url": [], "imgs": [], "log": ''},
|
||||
province_id_admin:<?=$params['province_id_admin'] ? $params['province_id_admin'] : 0?>,
|
||||
city_id_admin:<?=$params['city_id_admin'] ? $params['city_id_admin'] : 0?>,
|
||||
county_id_admin:<?=$params['county_id_admin'] ? $params['county_id_admin'] : 0?>,
|
||||
biz_id_admin:<?=$params['biz_id_admin'] ? $params['biz_id_admin'] : 0?>,
|
||||
cityAry: [],
|
||||
countyAry: [],
|
||||
bizAry: [],
|
||||
admins: {provinceAry: <?=json_encode($provinces, JSON_UNESCAPED_UNICODE)?>, cityAry: [], countyAry: [], bizAry: []},
|
||||
},
|
||||
mounted: function () {
|
||||
var that = this;
|
||||
|
||||
@@ -3,64 +3,66 @@
|
||||
action="" id="edit-form">
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label">姓名:</label>
|
||||
<div class="am-para-input w300">
|
||||
<div class="am-para-input w150">
|
||||
<input type="text" placeholder="输入姓名" v-model="info.name" name="name"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label">手机号:</label>
|
||||
<div class="am-para-input w300">
|
||||
<input type="text" placeholder="输入手机号" v-model="info.mobile" name="mobile"/>
|
||||
<div class="am-para-input w150">
|
||||
<input type="text" placeholder="输入手机号" v-model="info.mobile" name="mobile" maxlength="11"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label">地址:</label>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select name="province_id" data-toggle="next-select" v-model="info.province_id"
|
||||
data-refurl="/common/area?key=city&id={value}&url=search" data-next="#bd-hd-city">
|
||||
<label class="am-para-label">所在地区:</label>
|
||||
<div class="am-form-group am-para-inline w100">
|
||||
<select name="province_id" v-model="info.province_id">
|
||||
<option value="0">省份</option>
|
||||
<?php if ($provinces) {
|
||||
foreach ($provinces as $v) { ?>
|
||||
<option value="<?= $v['province_id'] ?>"
|
||||
<?= $v['province_id'] == $province_id ? 'selected' : '' ?>><?= $v['province_name'] ?></option>
|
||||
<?php }
|
||||
} ?>
|
||||
<option :value="v.id" v-for="(v,i) in provinceAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select id="bd-hd-city" name="_city_id" data-toggle="next-select" v-model="info.city_id"
|
||||
data-refurl="/common/area?key=county&id={value}" data-next="#bd-hd-county">
|
||||
<div class="am-form-group am-para-inline w100">
|
||||
<select name="city_id" v-model="info.city_id">
|
||||
<option value="0">城市</option>
|
||||
<?php if ($citys) {
|
||||
foreach ($citys as $v) { ?>
|
||||
<option value="<?= $v['city_id'] ?>"
|
||||
<?= $v['city_id'] == $city_id ? 'selected' : '' ?>><?= $v['city_name'] ?></option>
|
||||
<?php }
|
||||
} ?>
|
||||
<option :value="v.id" v-for="(v,i) in cityAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select id="bd-hd-county" name="county_id" data-toggle="next-select" v-model="info.county_id"
|
||||
data-refurl="/common/areas?id={value}" data-next="#bd-hd-area">
|
||||
<div class="am-form-group am-para-inline w100">
|
||||
<select name="county_id" v-model="info.county_id">
|
||||
<option value="0">行政区</option>
|
||||
<?php if ($countys) {
|
||||
foreach ($countys as $value) { ?>
|
||||
<option value="<?= $value['county_id'] ?>"
|
||||
<?= $value['county_id'] == $county_id ? 'selected' : '' ?>><?= $value['county_name'] ?></option>
|
||||
<?php }
|
||||
} ?>
|
||||
<option :value="v.id" v-for="(v,i) in countyAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label">门店:</label>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select name="cf_id1" v-model="info.biz_id">
|
||||
<option value="0">选择门店</option>
|
||||
<option :value="v.id" v-for="(v,i) in biz_arr">{{v.title}}</option>
|
||||
|
||||
<div class="am-form-group fl" style="width:1920px">
|
||||
<label class="am-para-label w110">派单门店:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="省份" name="province_id_admin" v-model="province_id_admin">
|
||||
<option value="0">省份</option>
|
||||
<option :value="v.province_id" v-for="(v,i) in admins.provinceAry">{{v.province_name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="城市" name="city_id_admin" v-model="city_id_admin">
|
||||
<option value="0">城市</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.cityAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="行政区" name="county_id_admin" v-model="county_id_admin">
|
||||
<option value="0">行政区</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.countyAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w180">
|
||||
<select name="biz_id_admin" v-model="biz_id_admin">
|
||||
<option value="0">门店</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.bizAry">{{v.title}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label">来源:</label>
|
||||
<div class="am-para-input w300">
|
||||
@@ -88,24 +90,91 @@
|
||||
el: '#edit-form',
|
||||
data: {
|
||||
info: {},
|
||||
province_idn:0,
|
||||
city_id:0,
|
||||
county_id:0,
|
||||
province_id_admin:0,
|
||||
city_id_admin:0,
|
||||
county_id_admin:0,
|
||||
biz_id_admin:0,
|
||||
cfromAry: [],
|
||||
cfromAry2: [],
|
||||
provinceAry: [],
|
||||
cityAry: [],
|
||||
countyAry: [],
|
||||
admins: {provinceAry: <?=json_encode($provinces, JSON_UNESCAPED_UNICODE)?>, cityAry: [], countyAry: [], bizAry: []},
|
||||
action: "",
|
||||
biz_arr: [],
|
||||
},
|
||||
mounted: function () {
|
||||
var vm = this;
|
||||
vm.info = <?=json_encode($info, JSON_UNESCAPED_UNICODE)?>;
|
||||
vm.cfromAry = <?=json_encode($cfromAry, JSON_UNESCAPED_UNICODE)?>;
|
||||
vm.action = "<?=$action?>";
|
||||
this.init_provinces();
|
||||
this.init_citys();
|
||||
this.init_countys();
|
||||
this.init_bizs();
|
||||
this.info = <?=json_encode($info, JSON_UNESCAPED_UNICODE)?>;
|
||||
this.cfromAry = <?=json_encode($cfromAry, JSON_UNESCAPED_UNICODE)?>;
|
||||
this.action = "<?=$action?>";
|
||||
},
|
||||
methods: {
|
||||
init_provinces: function () {
|
||||
var vm = this;
|
||||
$.get('common/area', {}, function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.provinceAry = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
init_citys: function () {
|
||||
var vm = this;
|
||||
$.get('common/area', {id: vm.province_id, key: 'city', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.cityAry = response.data;
|
||||
}
|
||||
});
|
||||
$.get('common/area', {id: vm.province_id_admin, key: 'city', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.admins.cityAry = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
init_countys: function () {
|
||||
var vm = this;
|
||||
$.get('common/area', {id: vm.city_id, key: 'county', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.countyAry = response.data;
|
||||
}
|
||||
});
|
||||
$.get('common/area', {id: vm.city_id_admin, key: 'county', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.admins.countyAry = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
init_bizs: function () {
|
||||
var vm = this;
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/biz/store/store/json_lists',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
province_id: vm.province_id_admin,
|
||||
city_id: vm.city_id_admin,
|
||||
county_id: vm.county_id_admin,
|
||||
status: 1
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.admins.bizAry = response.data.list;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
saveEdit: function () {
|
||||
var vm = this;
|
||||
if (loading) {
|
||||
return;
|
||||
}
|
||||
loading = 1;
|
||||
vm.info.biz_id = vm.biz_id_admin;
|
||||
|
||||
$.ajax({
|
||||
url: "receiver/clues/" + vm.action,
|
||||
@@ -137,20 +206,138 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
getBiz: function () {
|
||||
let vm = this
|
||||
$.get('biz/store/store/json_lists', {
|
||||
province_id: this.info.province_id,
|
||||
city_id: this.info.city_id,
|
||||
county_id: this.info.county_id
|
||||
}, function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.biz_arr = response.data.list;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'info.province_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.cityAry = [];
|
||||
that.info.city_id = '0';
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'city', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.cityAry = response.data;
|
||||
if (that.info.city_id > 0) {
|
||||
var city_id = '0';
|
||||
for (var i in that.cityAry) {
|
||||
var city = that.cityAry[i];
|
||||
if (city.id == that.info.city_id) {
|
||||
city_id = city.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.info.city_id = city_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'info.city_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.countyAry = [];
|
||||
that.info.county_id = '0';
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'county', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.countyAry = response.data;
|
||||
if (that.info.county_id > 0) {
|
||||
var county_id = '0';
|
||||
for (var i in that.countyAry) {
|
||||
var county = that.countyAry[i];
|
||||
if (county.id == that.info.county_id) {
|
||||
county_id = county.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.info.county_id = county_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'province_id_admin': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.admins.cityAry = [];
|
||||
that.city_id_admin = '0';
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'city', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.admins.cityAry = response.data;
|
||||
if (that.city_id_admin > 0) {
|
||||
var city_id = '0';
|
||||
for (var i in that.admins.cityAry) {
|
||||
var city = that.admins.cityAry[i];
|
||||
if (city.id == that.city_id_admin) {
|
||||
city_id = city.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.city_id_admin = city_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'city_id_admin': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.admins.countyAry = [];
|
||||
that.county_id_admin = '0';
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'county', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.admins.countyAry = response.data;
|
||||
if (that.county_id_admin > 0) {
|
||||
var county_id = '0';
|
||||
for (var i in that.admins.countyAry) {
|
||||
var county = that.admins.countyAry[i];
|
||||
if (county.id == that.county_id_admin) {
|
||||
county_id = county.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.county_id_admin = county_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'county_id_admin': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.admins.bizAry = [];
|
||||
that.biz_id_admin = '';
|
||||
} else {
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/biz/store/store/json_lists',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
province_id: that.province_id_admin,
|
||||
city_id: that.city_id_admin,
|
||||
county_id: that.county_id_admin,
|
||||
status: 1
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.code == 1) {
|
||||
that.admins.bizAry = response.data.list;
|
||||
if (that.biz_id_admin > 0) {
|
||||
var biz_id = '';
|
||||
for (var i in that.admins.bizAry) {
|
||||
if (that.biz_id_admin == that.admins.bizAry[i].id) {
|
||||
biz_id = that.biz_id_admin;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.biz_id_admin = biz_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'info.cf_id1': function (nv, ov) {
|
||||
var vm = this;
|
||||
if (nv > 0) {
|
||||
@@ -178,12 +365,6 @@
|
||||
vm.info.cf_id2 = '';
|
||||
}
|
||||
},
|
||||
'info.county_id': function (nv, ov) {
|
||||
if (nv > 0) {
|
||||
this.getBiz()
|
||||
}
|
||||
// $.get('biz/store/store/json_lists')
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,33 +7,22 @@
|
||||
<div class="am-para-input">
|
||||
<div class="am-form-inline">
|
||||
<div class="am-form-group w100">
|
||||
<select name="province_id" data-toggle="next-select" v-model="province_id"
|
||||
data-refurl="/common/area?key=city&id={value}&url=search" data-next="#bd-hd-city">
|
||||
<select name="province_id" data-toggle="next-select" v-model="province_id" data-next="#bd-hd-city">
|
||||
<option value="0">省份</option>
|
||||
<?php if ($provinces) {
|
||||
foreach ($provinces as $v) { ?>
|
||||
<option value="<?= $v['province_id'] ?>"
|
||||
<?= $v['province_id'] == $province_id ? 'selected' : '' ?>><?= $v['province_name'] ?></option>
|
||||
<?php }
|
||||
} ?>
|
||||
<option :value="v.id" v-for="(v,i) in provinceAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group w100">
|
||||
<select id="bd-hd-city" name="_city_id" data-toggle="next-select" v-model="city_id"
|
||||
data-refurl="/common/area?key=county&id={value}" data-next="#bd-hd-county">
|
||||
<select id="bd-hd-city" name="city_id" data-toggle="next-select" v-model="city_id" data-next="#bd-hd-county">
|
||||
<option value="0">城市</option>
|
||||
<template v-for="(v,i) in cityAry">
|
||||
<option :value="v.id">{{v.name}}</option>
|
||||
</template>
|
||||
<option :value="v.id" v-for="(v,i) in cityAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group w100">
|
||||
<select id="bd-hd-county" name="county_id" data-toggle="next-select" v-model="county_id"
|
||||
data-refurl="/common/areas?id={value}" data-next="#bd-hd-area">
|
||||
<option value="0">行政区</option>
|
||||
<template v-for="(v,i) in countyAry">
|
||||
<option :value="v.id">{{v.name}}</option>
|
||||
</template>
|
||||
<option :value="v.id" v-for="(v,i) in countyAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -65,6 +54,7 @@
|
||||
province_id: <?=$params['province_id'] ? $params['province_id'] : 0?>,
|
||||
city_id: <?=$params['city_id'] ? $params['city_id'] : 0?>,
|
||||
county_id: <?=$params['county_id'] ? $params['county_id'] : 0?>,
|
||||
provinceAry: [{"id": "350000", "name": "福建省"}, {"id": "430000", "name": "湖南省"}],
|
||||
cityAry: [],
|
||||
countyAry: [],
|
||||
bizList: [],
|
||||
@@ -98,25 +88,49 @@
|
||||
},
|
||||
watch: {
|
||||
'province_id': function (nv, ov) {
|
||||
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.cityAry = [];
|
||||
that.city_id = '';
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'city', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.cityAry = response.data;
|
||||
if (that.city_id > 0) {
|
||||
var city_id = '0';
|
||||
for (var i in that.cityAry) {
|
||||
var city = that.cityAry[i];
|
||||
if (city.id == that.city_id) {
|
||||
city_id = city.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.city_id = city_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'city_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.countyAry = [];
|
||||
that.county_id = '';
|
||||
that.county_id = '0';
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'county', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.countyAry = response.data;
|
||||
}
|
||||
});
|
||||
$.post('receiver/clues/get_adviser', {
|
||||
city_id: that.city_id,
|
||||
county_id: that.county_id
|
||||
}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.bizList = response.data.bizList;
|
||||
if (that.county_id > 0) {
|
||||
var county_id = '0';
|
||||
for (var i in that.countyAry) {
|
||||
var county = that.countyAry[i];
|
||||
if (county.id == that.county_id) {
|
||||
county_id = county.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.county_id = county_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<input id="title" name="title" type="text" value="<?= $params['title'] ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<div class="fl" style="width:1920px">
|
||||
<label class="am-para-label w100">线索来源:</label>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select name="cfrom_id" v-model="cfrom_id">
|
||||
@@ -80,39 +80,55 @@
|
||||
<option :value="i" v-for="(v,i) in cfroms2">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">所在地区:</label>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select name="province_id" v-model="province_id">
|
||||
<option value="0">省份</option>
|
||||
<template v-for="(v,i) in provinceAry">
|
||||
<option :value="v.id">{{v.name}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select name="city_id" v-model="city_id">
|
||||
<option value="0">城市</option>
|
||||
<template v-for="(v,i) in cityAry">
|
||||
<option :value="v.id">{{v.name}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select name="county_id" v-model="county_id">
|
||||
<option value="0">行政区</option>
|
||||
<template v-for="(v,i) in countyAry">
|
||||
<option :value="v.id">{{v.name}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="am-para-label w100">所在地区:</label>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select name="province_id" v-model="province_id">
|
||||
<option value="0">省份</option>
|
||||
<option :value="v.id" v-for="(v,i) in provinceAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select name="city_id" v-model="city_id">
|
||||
<option value="0">城市</option>
|
||||
<option :value="v.id" v-for="(v,i) in cityAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select name="county_id" v-model="county_id">
|
||||
<option value="0">行政区</option>
|
||||
<option :value="v.id" v-for="(v,i) in countyAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl" style="width:1920px">
|
||||
<label class="am-para-label w100">派单门店:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="省份" name="province_id_admin" v-model="province_id_admin">
|
||||
<option value="0">省份</option>
|
||||
<option :value="v.province_id" v-for="(v,i) in admins.provinceAry">{{v.province_name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="城市" name="city_id_admin" v-model="city_id_admin">
|
||||
<option value="0">城市</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.cityAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="行政区" name="county_id_admin" v-model="county_id_admin">
|
||||
<option value="0">行政区</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.countyAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w180">
|
||||
<select name="biz_id_admin" v-model="biz_id_admin">
|
||||
<option value="0">门店</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.bizAry">{{v.title}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fl" style="width:1920px">
|
||||
<label class="am-para-label w100">创建时间:</label>
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-para-inline w300">
|
||||
@@ -132,7 +148,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl" style="margin-bottom: 0px;">
|
||||
<div class="am-form-group fl ml10">
|
||||
<div class="am-form-group fl ml30">
|
||||
<button type="submit" class="am-btn am-btn-success am-btn-sm w100">搜索</button>
|
||||
</div>
|
||||
<div class="am-form-group fl ml10">
|
||||
@@ -160,35 +176,32 @@
|
||||
|
||||
<div class="coms-table-bd">
|
||||
<div class="fr">共有<?= $pager['totle'] ?>条数据</div>
|
||||
<table class="am-table am-table-bordered">
|
||||
<table class="am-table am-table-bordered " >
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%"><label class="checkall">
|
||||
<input type="checkbox" data-check-target=".order-ids"> 全选</label></th>
|
||||
<th width="10%"><span>ID</span></th>
|
||||
<th width="10%"><span>客户姓名</span></th>
|
||||
<th width="10%"><span>客户电话</span></th>
|
||||
<th width="10%"><span>所在地区</span></th>
|
||||
<th width="10%"><span>状态</span></th>
|
||||
<th width="15%"><span>创建时间</span></th>
|
||||
<th width="15%"><span>操作</span></th>
|
||||
<th width="10%"><span>客户</span></th>
|
||||
<th width="12%"><span>线索来源</span></th>
|
||||
<th width="12%"><span>所在地区</span></th>
|
||||
<th width="12%"><span>所派门店</span></th>
|
||||
<th width="5%"><span>状态</span></th>
|
||||
<th width="12%"><span>创建时间</span></th>
|
||||
<th width="15%"><span>跟进人员</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<? if ($lists) {
|
||||
foreach ($lists as $v) { ?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ids[]" class="order-ids" value="<?= $v['id'] ?>"/></td>
|
||||
<td><?= $v['void'] ?></td>
|
||||
<td><?= $v['name'] ?></td>
|
||||
<td><?= $v['mobile'] ?></td>
|
||||
<td><?= $v['poi'] ?></td>
|
||||
<td><?= $v['status_name'] ?></td>
|
||||
<td><?= date('Y-m-d H:i:s', $v['c_time']) ?></td>
|
||||
<td>
|
||||
<a data-open="/receiver/clues/get?id=<?= $v['id'] ?>&type=clues" href="javascript:void(0);" class="am-btn am-btn-primary am-btn-xs">详情</a>
|
||||
<a data-modal="/receiver/clues/get_adviser?ids=<?= $v['id'] ?>" href="javascript:void(0);" class="am-btn am-btn-primary am-btn-xs">分配</a>
|
||||
</td>
|
||||
<td style="vertical-align: middle;"><input type="checkbox" name="ids[]" class="order-ids" value="<?= $v['id'] ?>"/></td>
|
||||
<td style="vertical-align: middle;"><?= $v['name'] ?><br><a data-open="/receiver/clues/get?id=<?= $v['id'] ?>&type=clues" href="javascript:void(0);" ><?= $v['mobile'] ?></a></td>
|
||||
<td style="vertical-align: middle;"><?= $v['cf_title'] ?></td>
|
||||
<td style="vertical-align: middle;"><?= $v['poi'] ?></td>
|
||||
<td style="vertical-align: middle;"><?= $v['biz_poi']?><br><?=$v['biz_name'] ?></td>
|
||||
<td style="vertical-align: middle;"><?= $v['status_name'] ?></td>
|
||||
<td style="vertical-align: middle;"><?= date('Y-m-d H:i:s', $v['c_time']) ?></td>
|
||||
<td style="vertical-align: middle;"><?=$v['admin']?></td>
|
||||
</tr>
|
||||
<? }
|
||||
} ?>
|
||||
@@ -230,18 +243,24 @@
|
||||
province_id:<?=$params['province_id'] ? $params['province_id'] : 0?>,
|
||||
city_id:<?=$params['city_id'] ? $params['city_id'] : 0?>,
|
||||
county_id:<?=$params['county_id'] ? $params['county_id'] : 0?>,
|
||||
province_id_admin:<?=$params['province_id_admin'] ? $params['province_id_admin'] : 0?>,
|
||||
city_id_admin:<?=$params['city_id_admin'] ? $params['city_id_admin'] : 0?>,
|
||||
county_id_admin:<?=$params['county_id_admin'] ? $params['county_id_admin'] : 0?>,
|
||||
biz_id_admin:<?=$params['biz_id_admin'] ? $params['biz_id_admin'] : 0?>,
|
||||
cfrom_id:<?=$params['cfrom_id'] ? $params['cfrom_id'] : 0?>,
|
||||
cfrom_id2:<?=$params['cfrom_id2'] ? $params['cfrom_id2'] : 0?>,
|
||||
cfroms: [],
|
||||
cfroms2: [],
|
||||
provinceAry: [],
|
||||
cityAry: [],
|
||||
countyAry: []
|
||||
countyAry: [],
|
||||
admins: {provinceAry: <?=json_encode($provinces, JSON_UNESCAPED_UNICODE)?>, cityAry: [], countyAry: [], bizAry: []},
|
||||
},
|
||||
mounted: function () {
|
||||
this.init_provinces();
|
||||
this.init_citys();
|
||||
this.init_countys();
|
||||
this.init_bizs();
|
||||
this.cfroms = <?=json_encode($cfromAry, JSON_UNESCAPED_UNICODE)?>;
|
||||
this.cfroms2 = <?=json_encode($cfromAry2, JSON_UNESCAPED_UNICODE)?>;
|
||||
},
|
||||
@@ -261,6 +280,11 @@
|
||||
vm.cityAry = response.data;
|
||||
}
|
||||
});
|
||||
$.get('common/area', {id: vm.province_id_admin, key: 'city', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.admins.cityAry = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
init_countys: function () {
|
||||
var vm = this;
|
||||
@@ -269,16 +293,43 @@
|
||||
vm.countyAry = response.data;
|
||||
}
|
||||
});
|
||||
$.get('common/area', {id: vm.city_id_admin, key: 'county', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.admins.countyAry = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
init_bizs: function () {
|
||||
var vm = this;
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/biz/store/store/json_lists',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
province_id: vm.province_id_admin,
|
||||
city_id: vm.city_id_admin,
|
||||
county_id: vm.county_id_admin,
|
||||
status: 1
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.admins.bizAry = response.data.list;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
reset: function () {
|
||||
var that = this;
|
||||
$('#search_tp').val('mobile');
|
||||
$('#title').val('');
|
||||
$('#id-create-time').val('');
|
||||
$('#id-en-time').val('');
|
||||
that.province_id = '0';
|
||||
that.city_id = '0';
|
||||
that.county_id = '0';
|
||||
that.province_id_admin = '0';
|
||||
that.city_id_admin = '0';
|
||||
that.county_id_admin = '0';
|
||||
that.biz_id_admin = '0';
|
||||
that.cfrom_id = 0;
|
||||
that.cfrom_id2 = 0;
|
||||
}
|
||||
@@ -296,7 +347,7 @@
|
||||
if (that.city_id > 0) {
|
||||
var city_id = '0';
|
||||
for (var i in that.cityAry) {
|
||||
var city = that.city[i];
|
||||
var city = that.cityAry[i];
|
||||
if (city.id == that.city_id) {
|
||||
city_id = city.id;
|
||||
break;
|
||||
@@ -332,6 +383,88 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
'province_id_admin': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.admins.cityAry = [];
|
||||
that.city_id_admin = '0';
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'city', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.admins.cityAry = response.data;
|
||||
if (that.city_id_admin > 0) {
|
||||
var city_id = '0';
|
||||
for (var i in that.admins.cityAry) {
|
||||
var city = that.admins.cityAry[i];
|
||||
if (city.id == that.city_id_admin) {
|
||||
city_id = city.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.city_id_admin = city_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'city_id_admin': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.admins.countyAry = [];
|
||||
that.county_id_admin = '0';
|
||||
} else {
|
||||
$.get('common/area', {id: nv, key: 'county', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.admins.countyAry = response.data;
|
||||
if (that.county_id_admin > 0) {
|
||||
var county_id = '0';
|
||||
for (var i in that.admins.countyAry) {
|
||||
var county = that.admins.countyAry[i];
|
||||
if (county.id == that.county_id_admin) {
|
||||
county_id = county.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.county_id_admin = county_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'county_id_admin': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.admins.bizAry = [];
|
||||
that.biz_id_admin = '';
|
||||
} else {
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/biz/store/store/json_lists',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
province_id: that.province_id_admin,
|
||||
city_id: that.city_id_admin,
|
||||
county_id: that.county_id_admin,
|
||||
status: 1
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.code == 1) {
|
||||
that.admins.bizAry = response.data.list;
|
||||
if (that.biz_id_admin > 0) {
|
||||
var biz_id = '';
|
||||
for (var i in that.admins.bizAry) {
|
||||
if (that.biz_id_admin == that.admins.bizAry[i].id) {
|
||||
biz_id = that.biz_id_admin;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.biz_id_admin = biz_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'cfrom_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
|
||||
@@ -3,12 +3,21 @@
|
||||
<input type="hidden" value="<?= $showInfo['id'] ?>" name="id"/>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label">分类名称:</label>
|
||||
<div class="am-para-input">
|
||||
<div class="am-para-input" style="width: 30%">
|
||||
<input type="text" placeholder="输入分类名称" value="<?= $showInfo['name'] ?>" name="name"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label">排序:</label>
|
||||
<label class="am-para-label">使用范围:</label>
|
||||
<div class="am-para-input" style="width: 30%">
|
||||
<select name="type" class="mr5">
|
||||
<option value="0">中台</option>
|
||||
<option value="1" <?=$showInfo['type'] ? 'selected': ''?> >门店</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label">分类排序:</label>
|
||||
<div class="am-para-input" style="width: 30%">
|
||||
<input type="number" placeholder="输入排序" value="<?= $showInfo['sort'] ?>" name="sort"/>
|
||||
<small class="text-muted">越大越靠前</small>
|
||||
|
||||
@@ -26,10 +26,11 @@
|
||||
<table class="am-table am-table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30%"><span>一级分类</span></th>
|
||||
<th width="10%"><span>一级分类</span></th>
|
||||
<th width="60%"><span>二级分类</span></th>
|
||||
<th width="5%"><span>排序</span></th>
|
||||
<th width="5%"><span>状态</span></th>
|
||||
<th width="10%"><span>类型</span></th>
|
||||
<th width="10%"><span>排序</span></th>
|
||||
<th width="10%"><span>状态</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -38,11 +39,12 @@
|
||||
<tr>
|
||||
<td><?= $v['name'] ?></td>
|
||||
<td><?= $v['options'] ?></td>
|
||||
<td><?= $v['type'] ?></td>
|
||||
<td><?= $v['sort'] ?></td>
|
||||
<td><?= $v['status_name'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="align-r">
|
||||
<td colspan="5" class="align-r">
|
||||
<a href="javascript:void(0);" data-modal="/receiver/cluesCfrom/get?id=<?= $v['id'] ?>"
|
||||
data-title="编辑一级分类" class="am-btn am-btn-primary am-btn-xs">编辑一级分类</a>
|
||||
<a href="javascript:void(0);" @click="optionsModal(<?= $v['id'] ?>,'<?= $v['name'] ?>')"
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
<input id="title" name="title" type="text" v-model="params.title"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl " style="width:1920px">
|
||||
|
||||
<div class="fl" style="width:1920px">
|
||||
<label class="am-para-label w80">客户等级:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="level" v-model="params.level">
|
||||
@@ -40,30 +41,42 @@
|
||||
<option :value="v" v-for="(v,i) in show_info.levelAry">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="am-para-label w80">企微:</label>
|
||||
<!--label class="am-para-label w80">企微:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="wxqy" v-model="params.wxqy">
|
||||
<option value=''>请选择</option>
|
||||
<option :value="i" v-for="(v,i) in show_info.wxqyAry">{{v}}</option>
|
||||
</select>
|
||||
</div-->
|
||||
<!--label class="am-para-label w100">是否改派:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="cs_biz_id" v-model="params.cs_biz_id">
|
||||
<option value=''>请选择</option>
|
||||
<option :value="i" v-for="(v,i) in show_info.csbizidAry">{{v}}</option>
|
||||
</select>
|
||||
</div-->
|
||||
<label class="am-para-label w80">客户来源:</label>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select name="params.of_id" v-model="params.of_id">
|
||||
<option value=''>请选择</option>
|
||||
<option :value="i" v-for="(v,i) in show_info.cfroms">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="am-para-label w80">个微:</label>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select name="params.of2_id" v-model="params.of2_id">
|
||||
<option value=''>请选择</option>
|
||||
<option :value="i" v-for="(v,i) in show_info.cfroms2">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="am-para-label w60">个微:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="wxgr" v-model="params.wxgr">
|
||||
<option value=''>请选择</option>
|
||||
<option :value="i" v-for="(v,i) in show_info.wxgrAry">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="am-para-label w100">是否改派:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="cs_biz_id" v-model="params.cs_biz_id">
|
||||
<option value=''>请选择</option>
|
||||
<option :value="i" v-for="(v,i) in show_info.csbizidAry">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group fl" style="width:1920px">
|
||||
<!--div class="am-form-group fl" style="width:1920px">
|
||||
<label class="am-para-label w80">品牌归属:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="c_brand" v-model="params.c_brand">
|
||||
@@ -71,19 +84,6 @@
|
||||
<option :value="i" v-for="(v,i) in show_info.cbrandAry">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="am-para-label w80">客户来源:</label>
|
||||
<div class="am-form-group am-para-inline w100">
|
||||
<select name="of_id" v-model="params.of_id">
|
||||
<option value="">请选择</option>
|
||||
<option :value="i" v-for="(v,i) in show_info.offlineSourcesAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w100">
|
||||
<select name="of2_id" v-model="params.of2_id">
|
||||
<option value="">请选择</option>
|
||||
<option :value="i" v-for="(v,i) in of2Ary">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="am-para-label w100">客户位置:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="城市" name="city_id" v-model="params.city_id">
|
||||
@@ -97,26 +97,31 @@
|
||||
<option :value="v.id" v-for="(v,i) in countyAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div-->
|
||||
<div class="am-form-group fl" style="width:1920px">
|
||||
<label class="am-para-label w80">门店类型:</label>
|
||||
<!--label class="am-para-label w80">门店类型:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="biz_type" v-model="params.biz_type">
|
||||
<option value="">请选择</option>
|
||||
<option :value="v.id" v-for="(v,i) in bizTypeAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div-->
|
||||
<label class="am-para-label w80">车管家:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="省份" name="province_id_admin" v-model="params.province_id_admin">
|
||||
<option value="">省份</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.provinceAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="am-para-label w80">销售员:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="城市" name="city_id_admin" v-model="params.city_id_admin">
|
||||
<option value="">选择城市</option>
|
||||
<option value="">城市</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.cityAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="行政区" name="county_id_admin" v-model="params.county_id_admin">
|
||||
<option value="">选择行政区</option>
|
||||
<option value="">行政区</option>
|
||||
<option :value="v.id" v-for="(v,i) in admins.countyAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -130,13 +135,13 @@
|
||||
</div>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="admin_id" v-model="params.admin_id">
|
||||
<option value="">销售员</option>
|
||||
<option value="">车管家</option>
|
||||
<template v-for="(v,i) in admins.list">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
<label class="am-para-label w100">渠道经理:</label>
|
||||
<label class="am-para-label w120">客户成功经理:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="qdjl_id" v-model="params.qdjl_id">
|
||||
<option value=''>请选择</option>
|
||||
@@ -201,18 +206,20 @@
|
||||
<table class="am-table am-table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="3%">ID</th>
|
||||
<th width="7%"><span>客户姓名</span></th>
|
||||
<th width="5%"><span>客户电话</span></th>
|
||||
<th width="5%">ID</th>
|
||||
<th width="8%"><span>客户姓名</span></th>
|
||||
<th width="8%"><span>客户电话</span></th>
|
||||
<th width="5%"><span>客户等级</span></th>
|
||||
<th width="10%"><span>客户来源</span></th>
|
||||
<th width="10%"><span>所属门店</span></th>
|
||||
<th width="5%"><span>状态</span></th>
|
||||
<th width="5%"><span>是否改派</span></th>
|
||||
<th width="5%"><span>销售员</span></th>
|
||||
<th width="5%"><span>企微好友</span></th>
|
||||
<th width="5%"><span>加个微</span></th>
|
||||
<th width="6%"><span>最后联系时间</span></th>
|
||||
<th width="15%"><span>所属地区</span></th>
|
||||
<th width="15%"><span>所属门店</span></th>
|
||||
<!--th width="5%"><span>是否改派</span></th-->
|
||||
<th width="6%"><span>车管家</span></th>
|
||||
<!--th width="5%"><span>企微好友</span></th-->
|
||||
<th width="6%"><span>个微</span></th>
|
||||
<th width="6%"><span>状态</span></th>
|
||||
<th width="13%"><span>创建时间</span></th>
|
||||
<th width="13%"><span>最后联系时间</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -223,12 +230,14 @@
|
||||
<td>{{v.mobile_sub}}</td>
|
||||
<td>{{v.level}}</td>
|
||||
<td>{{v.of_title}}</td>
|
||||
<td>{{v.area}}</td>
|
||||
<td>{{v.biz_name}}</td>
|
||||
<td>{{v.status_name}}</td>
|
||||
<td>{{v.to_send}}</td>
|
||||
<!--td>{{v.to_send}}</td-->
|
||||
<td>{{v.admin_name}}</td>
|
||||
<td>{{v.wxqy_name}}</td>
|
||||
<!--td>{{v.wxqy_name}}</td-->
|
||||
<td>{{v.wxgr_name}}</td>
|
||||
<td>{{v.status_name}}</td>
|
||||
<td>{{v.c_time}}</td>
|
||||
<td>{{v.cont_time}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -237,13 +246,6 @@
|
||||
<div class="col-md-4 align-l">
|
||||
</div>
|
||||
<div class="col-md-8 align-r" style="padding-right: 30px;">
|
||||
<template v-if="v.of2_id==37">
|
||||
<a :data-modal="'/receiver/customer/edit_adviser?id='+v.id" data-title="改派"
|
||||
href="javascript:void(0);" class="am-btn am-btn-primary am-btn-xs">改派</a>
|
||||
<a href="javascript:void (0);" data-ajax="post"
|
||||
data-action="/receiver/customer/del" :data-params-id="v.id"
|
||||
href="javascript:void(0);" class="am-btn am-btn-primary am-btn-xs">取消派单</a>
|
||||
</template>
|
||||
<a :data-modal="'/common/bind_mobile?id='+v.id+'&type=customer'"
|
||||
href="javascript:void(0);" class="am-btn am-btn-primary am-btn-xs"
|
||||
data-title="获取手机号">拨打电话</a>
|
||||
@@ -418,12 +420,12 @@
|
||||
searchTpAry: [],
|
||||
lists: [],
|
||||
qdjl_lists: [],
|
||||
admins: {cityAry: [], countyAry: [], bizAry: [], list: []},
|
||||
show_info: {levelAry: [], offlineSourcesAry: [], wxqyAry: [], wxgrAry: [], csbizidAry: [], tags: []
|
||||
, tagsIntention: [], tagsDefeat: []},
|
||||
admins: {provinceAry: [{"id": "350000", "name": "福建省"}, {"id": "430000", "name": "湖南省"}], cityAry: [], countyAry: [], bizAry: [], list: []},
|
||||
show_info: {levelAry: [], wxqyAry: [], wxgrAry: [], csbizidAry: [], tags: [], cfroms:[],cfroms2: [], tagsIntention: [], tagsDefeat: []},
|
||||
of2Ary: [],
|
||||
bizTypeAry: [],
|
||||
export_button: 0,
|
||||
provinceAry: [],
|
||||
cityAry: [],
|
||||
countyAry: [],
|
||||
},
|
||||
@@ -661,8 +663,7 @@
|
||||
var that = this;
|
||||
that.params.search_tp = 'mobile';
|
||||
that.params.title = '';
|
||||
that.cfrom_id = 0;
|
||||
that.cfrom_id2 = 0;
|
||||
that.params.province_id_admin = '';
|
||||
that.params.city_id_admin = '';
|
||||
that.params.city_id = '';
|
||||
that.params.of_id = '';
|
||||
@@ -697,13 +698,28 @@
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'params.of_id': function (nv, ov) {
|
||||
'params.province_id_admin': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.params.of2_id = '';
|
||||
that.of2Ary = [];
|
||||
that.admins.cityAry = [];
|
||||
that.admins.city_id = '0';
|
||||
} else {
|
||||
that.of2Ary = that.show_info.offlineSourcesAry[nv]['list'];
|
||||
$.get('common/area', {id: nv, key: 'city', type: 1}, function (response) {
|
||||
if (response.code == 1) {
|
||||
that.admins.cityAry = response.data;
|
||||
if (that.admins.city_id > 0) {
|
||||
var city_id = '0';
|
||||
for (var i in that.admins.cityAry) {
|
||||
var city = that.admins.cityAry[i];
|
||||
if (city.id == that.admins.city_id) {
|
||||
city_id = city.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.admins.city_id = city_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'params.city_id_admin': function (nv, ov) {
|
||||
@@ -822,6 +838,28 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'params.of_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.params.of2_id = 0;
|
||||
that.show_info.cfroms2 = [];
|
||||
} else {
|
||||
$.post('/receiver/clues/json_map_cfrom', {pid: nv, status: 1}, function (result) {
|
||||
that.show_info.cfroms2 = result.data;
|
||||
if (that.params.of2_id > 0) {
|
||||
var of2_id = '0';
|
||||
for (var i in that.show_info.cfroms2) {
|
||||
var cfroms2 = that.show_info.cfroms2[i];
|
||||
if (cfroms2.id == that.params.of2_id) {
|
||||
of2_id = cfroms2.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.params.of2_id = of2_id;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ $config = array(
|
||||
'licheb' => array(
|
||||
'id' => 2,
|
||||
'app_id' => 2,
|
||||
'name' => '狸车宝',
|
||||
'name' => '理车宝',
|
||||
'sign_key' => '71fd71173b776766a2ae1209d9a2c2ed',
|
||||
'wx' => array(
|
||||
'appid' => 'wx4733380c110313ec',
|
||||
|
||||
@@ -243,7 +243,7 @@ class Cusorder extends Wxapp
|
||||
$where["(biz_id = {$this->biz_id} OR admin_id = {$uid})"] = null;
|
||||
} else if ($group_id == 4) {
|
||||
$where['biz_id'] = $this->biz_id;
|
||||
$this->biz_id != 1 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$this->biz_id != 1 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
}
|
||||
$d_count = $this->orders_model->count($where);
|
||||
$where['status'] = 1;
|
||||
@@ -310,7 +310,7 @@ class Cusorder extends Wxapp
|
||||
$where["(biz_id = {$this->biz_id} OR admin_id = {$uid})"] = null;
|
||||
} else if ($group_id == 4) {
|
||||
$where['biz_id'] = $this->biz_id;
|
||||
$this->biz_id != 1 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$this->biz_id != 1 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
}
|
||||
if ($keyword) {
|
||||
$where["(name='{$keyword}' or owner_name='{$keyword}')"] = null;
|
||||
|
||||
@@ -784,7 +784,7 @@ class Customers extends Wxapp
|
||||
$where["admin_id"] = $uid;
|
||||
}
|
||||
if ($group_id == 4 && $this->biz_id != 1) {
|
||||
$where['brand_id<>'] = 3; //渠道经理过滤
|
||||
$where['brand_id<>'] = 3; //客户成功经理过滤
|
||||
}
|
||||
if ($s_time && $e_time) {
|
||||
$where['c_time >='] = strtotime($s_time);
|
||||
@@ -978,7 +978,7 @@ class Customers extends Wxapp
|
||||
$re['jsondata'] && $addData['jsondata'] = $re['jsondata'];
|
||||
$customer_id = $this->customers_model->add($addData);
|
||||
if ($customer_id) {
|
||||
//初始门店更改-1,狸车宝过滤
|
||||
//初始门店更改-1,理车宝过滤
|
||||
$this->customers_model->update(['cs_biz_id' => -1], ["id" => $id]);
|
||||
//删除未回访计划
|
||||
$this->mdCustomerVisitData->delete(['c_id' => $id, 'biz_id' => $re['biz_id'], 'status<>' => 2, 't_day >=' => date('Y-m-d')]);
|
||||
@@ -1348,7 +1348,7 @@ class Customers extends Wxapp
|
||||
}
|
||||
|
||||
$biz = $this->get_biz();
|
||||
if ($params['of2_id'] == 37 && $params['of_id'] == 3 && $biz['type'] != 1) { //客户来源:网络推广-狸车分配 隐藏手机号 不是直营店
|
||||
if ($params['of2_id'] == 37 && $params['of_id'] == 3 && $biz['type'] != 1) { //客户来源:网络推广-理车分配 隐藏手机号 不是直营店
|
||||
$mobile = '****' . substr($mobile, -4);
|
||||
}
|
||||
return $mobile;
|
||||
|
||||
@@ -56,7 +56,6 @@ class Sign extends Wxapp
|
||||
throw new Exception($result['msg'], ERR_PARAMS_ERROR);
|
||||
}
|
||||
$data = [
|
||||
'time' => date('Y-m-d H:i:s'),
|
||||
'uname' => "车管家 {$this->session['uname']}",
|
||||
'shop' => "{$area['city_name']}-{$biz['biz_name']}",
|
||||
'qcode' => base64_encode($result['file']),
|
||||
|
||||
@@ -453,7 +453,7 @@ class Statistics extends Wxapp{
|
||||
'status' => $key
|
||||
];
|
||||
$group_id == 1 && $where['admin_id'] = $uid;
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
$count = $this->customers_model->count($where);
|
||||
$count_data[] = [
|
||||
'value' => $count,
|
||||
@@ -466,7 +466,7 @@ class Statistics extends Wxapp{
|
||||
'biz_id'=>$biz_id
|
||||
];
|
||||
$group_id == 1 && $where['admin_id'] = $uid;
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
$count = $this->customers_model->count($where);
|
||||
$where = [
|
||||
'status>='=>0,
|
||||
@@ -474,7 +474,7 @@ class Statistics extends Wxapp{
|
||||
'is_top'=>1
|
||||
];
|
||||
$group_id == 1 && $where['admin_id'] = $uid;
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
$top_count = $this->customers_model->count($where); //关注
|
||||
$where = [
|
||||
'status>='=>0,
|
||||
@@ -482,7 +482,7 @@ class Statistics extends Wxapp{
|
||||
"cont_time = '0000-00-00 00:00:00'"=>null
|
||||
];
|
||||
$group_id == 1 && $where['admin_id'] = $uid;
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
$un_count = $this->customers_model->count($where);//未联系
|
||||
$stat_data = [
|
||||
'tooltip' =>[
|
||||
@@ -552,7 +552,7 @@ class Statistics extends Wxapp{
|
||||
'status' => $key
|
||||
];
|
||||
$group_id == 1 && $where['admin_id'] = $uid;
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
$count = $this->orders_model->count($where);
|
||||
$total += $count;
|
||||
$count_data[] = [
|
||||
|
||||
@@ -308,15 +308,15 @@ class User extends Wxapp
|
||||
$this->load->model('receiver/receiver_customers_visit_data_model', 'mdCustomerVisitData');
|
||||
$where = ['status>' => -1, 'is_top' => 1, 'biz_id' => $biz_id, 'cs_biz_id<>' => -1, 'status!=' => 2];
|
||||
$group_id == 1 && $where['admin_id'] = $uid;
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
$gz_count = $this->customers_model->count($where);
|
||||
$where = ['status' => 0, 'biz_id' => $biz_id];
|
||||
$group_id == 1 && $where['admin_id'] = $uid;
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
$sign_count = 0;
|
||||
$where = ['status' => 1, 'biz_id' => $biz_id];
|
||||
$group_id == 1 && $where['admin_id'] = $uid;
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
$loan_count = 0;
|
||||
//客户代办事项--未派单客户
|
||||
$where = ['admin_id' => 0, 'biz_id' => $biz_id, 'cs_biz_id<>' => -1, 'status>=' => 0];
|
||||
@@ -331,13 +331,13 @@ class User extends Wxapp
|
||||
|
||||
$where = ['status>=' => 0, 'payway' => 0, 'brand_id>' => 0, 'biz_id' => $biz_id, 'status!=' => 2,];
|
||||
$group_id == 1 && $where['sale_id'] = $uid;
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
$fq_total = 0;
|
||||
$where = ['status>=' => 0,
|
||||
'brand_id>' => 0, 'biz_id' => $biz_id, 'status!=' => 2,
|
||||
'id not in (select o_id from lc_receiver_order_status where pid_status=2 and status=1)' => null];
|
||||
$group_id == 1 && $where['sale_id'] = $uid;
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
$pc_total = 0;
|
||||
$where = [
|
||||
'status>=' => 0,
|
||||
@@ -345,7 +345,7 @@ class User extends Wxapp
|
||||
'id not in (select o_id from lc_receiver_order_status where pid_status=3 and status=1)' => null,
|
||||
'id in (select o_id from lc_receiver_order_status where pid_status=0 and status=2)' => null];
|
||||
$group_id == 1 && $where['sale_id'] = $uid;
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
$kp_total = 0;
|
||||
$where = [
|
||||
'status>=' => 0,
|
||||
@@ -354,12 +354,12 @@ class User extends Wxapp
|
||||
'id not in (select o_id from lc_receiver_order_status where pid_status=4 and status=2)' => null
|
||||
];
|
||||
$group_id == 1 && $where['sale_id'] = $uid;
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
$group_id == 4 && $where['brand_id!='] = 3; //客户成功经理过滤
|
||||
$ck_total = 0;
|
||||
$deallist = [
|
||||
['title' => '签约下定 ', 'icon' => 'icon-banfenqi', 'total' => $fq_total, 'page' => '/pages/order/filterList/index2?type=fq&title=分期办理'],
|
||||
['title' => '发票开具', 'icon' => 'icon-kaipiao1', 'total' => $kp_total, 'page' => '/pages/order/filterList/index2?type=kp&title=发票开具'],
|
||||
['title' => '交付确认', 'icon' => 'icon-jiaofu', 'total' => $ck_total, 'page' => '/pages/order/filterList/index2?type=jf&title=交付确认'],
|
||||
['title' => '车辆交付', 'icon' => 'icon-jiaofu', 'total' => $ck_total, 'page' => '/pages/order/filterList/index2?type=jf&title=交付确认'],
|
||||
];
|
||||
$where_v = ['a.biz_id' => $biz_id, 'a.cs_biz_id<>' => -1, 'a.status in(0,1)' => null, 'b.t_day' => date('Y-m-d')];
|
||||
$where_c = ['biz_id' => $biz_id, 'cs_biz_id<>' => -1, 'status in(0,1)' => null];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>狸车平台</title>
|
||||
<title>理车平台</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<link rel="stylesheet" type="text/css" href="https://admin.haodian.cn/AmazeUI/assets/css/amazeui.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://admin.haodian.cn/static/css/common.css">
|
||||
|
||||
@@ -454,7 +454,7 @@ if (!function_exists('send_alisms')) {
|
||||
}
|
||||
$mobile = $json['mobile'];
|
||||
$template = $json['template'];
|
||||
$sign = $json['sign'] ? $json['sign'] : '狸车宝';
|
||||
$sign = $json['sign'] ? $json['sign'] : '理车宝';
|
||||
$templateParam = $json['param'];
|
||||
$alisms = new AliSms();
|
||||
$alisms->sendSms($mobile, $templateParam, $template, $sign);
|
||||
|
||||
@@ -11,7 +11,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*
|
||||
* 生成订单号
|
||||
* int $city_id
|
||||
* string $source 狸车【liche】
|
||||
* string $source 理车【liche】
|
||||
* string $category
|
||||
* int $pay_type 微信【1】
|
||||
* int $order_type 普通订单【1】
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Notes:狸车宝渠道门店
|
||||
* Notes:理车宝渠道门店
|
||||
* Created on: 2021/11/12 12:45
|
||||
* Created by: dengbw
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@ class App_licheb_users_model extends HD_Model
|
||||
{
|
||||
private $table_name = 'lc_app_licheb_users';
|
||||
|
||||
private $group_arr = [1 => '销售', 2 => '店长', 3 => '老板', 4 => '渠道经理'];
|
||||
private $group_arr = [1 => '车管家', 2 => '店长', 3 => '投资人', 4 => '客户成功经理'];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -35,4 +35,5 @@ class Receiver_clues_cfrom_model extends HD_Model
|
||||
}
|
||||
return $rows;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class Receiver_customer_oplogs_model extends HD_Model
|
||||
*/
|
||||
public function typeAry($id = '')
|
||||
{
|
||||
$arr = [0 => '小记', 1 => '发短信', 2 => '拨打号码', 3 => '创建', 4 => '到店', 5 => '试驾', 6 => '订单', 7 => '战败'
|
||||
$arr = [0 => '小记', 1 => '发短信', 2 => '拨打电话', 3 => '创建', 4 => '到店', 5 => '试驾', 6 => '订单', 7 => '战败'
|
||||
, 8 => '企微跟进', 9 => '系统', 10 => '加个微'];
|
||||
if (strlen($id)) {
|
||||
return $arr[$id];
|
||||
|
||||
@@ -121,7 +121,7 @@ class Receiver_customers_model extends HD_Model
|
||||
*/
|
||||
public function wxgrAry($id = '')
|
||||
{
|
||||
$arr = [0 => '未加', 1 => '已添加'];
|
||||
$arr = [0 => '未添加', 1 => '已添加'];
|
||||
if (strlen($id)) {
|
||||
return $arr[$id];
|
||||
} else {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user