Customers_708
This commit is contained in:
@@ -16,6 +16,19 @@ class Common extends CI_Controller
|
||||
|
||||
public $data = array();
|
||||
|
||||
//获取门店类型数组
|
||||
public function biz_type_ary()
|
||||
{
|
||||
$this->load->model('biz/biz_model', 'mdBiz');
|
||||
$list = [];
|
||||
$type_ary = $this->mdBiz->type_ary();
|
||||
foreach ($type_ary as $key => $value) {
|
||||
$list[] = ['id' => $key, 'name' => $value];
|
||||
}
|
||||
$this->data = $list;
|
||||
return $this->show_json(SYS_CODE_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:获取车系
|
||||
* Created on: 2022/3/18 17:09
|
||||
|
||||
@@ -48,13 +48,19 @@ class Customer extends HD_Controller
|
||||
!$params['level'] && $params['level'] = '';
|
||||
!$params['of_id'] && $params['of_id'] = '';
|
||||
!$params['of2_id'] && $params['of2_id'] = '';
|
||||
!$params['biz_type'] && $params['biz_type'] = '';
|
||||
$page = $params['page'] = $params['page'] ? intval($params['page']) : 1;
|
||||
$size = $params['size'] = $params['size'] ? intval($params['size']) : 20;
|
||||
|
||||
$where = array('status>=0' => null);
|
||||
if ($_SESSION['admin_info']['biz_id']) {
|
||||
$biz_ids = implode(',', $_SESSION['admin_info']['biz_id']);
|
||||
$where["biz_id in ($biz_ids)"] = null;
|
||||
if ($params['biz_type']) {
|
||||
$where["biz_id in(select id from lc_biz where type={$params['biz_type']} and status=1 and id in({$biz_ids}))"] = null;
|
||||
} else {
|
||||
$where["biz_id in ($biz_ids)"] = null;
|
||||
}
|
||||
} else if ($params['biz_type']) {
|
||||
$where["biz_id in(select id from lc_biz where type={$params['biz_type']} and status=1)"] = null;
|
||||
}
|
||||
if (false == strpos($_SERVER['HTTP_HOST'], 'dev')) {//dev时不限制
|
||||
$where['biz_id<>'] = 1;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<input type="hidden" id="id_tag" name="tag" value="<?= $params['tag'] ?>">
|
||||
<div class="am-form am-form-horizontal">
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">客户搜索:</label>
|
||||
<label class="am-para-label w80">客户搜索:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="search_tp" v-model="params.search_tp">
|
||||
<option :value="i" v-for="(v,i) in searchTpAry">{{v}}</option>
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">客户等级:</label>
|
||||
<label class="am-para-label w80">客户等级:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="level" v-model="params.level">
|
||||
<option value=''>请选择</option>
|
||||
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">渠道经理:</label>
|
||||
<label class="am-para-label w80">渠道经理:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="qdjl_id" v-model="params.qdjl_id">
|
||||
<option value=''>请选择</option>
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">企微好友:</label>
|
||||
<label class="am-para-label w80">企微好友:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="wxqy" v-model="params.wxqy">
|
||||
<option value=''>请选择</option>
|
||||
@@ -63,7 +63,7 @@
|
||||
</div>
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">客户来源:</label>
|
||||
<label class="am-para-label w80">客户来源:</label>
|
||||
<div class="am-form-group am-para-inline w120">
|
||||
<select name="of_id" v-model="params.of_id">
|
||||
<option value="">请选择</option>
|
||||
@@ -78,7 +78,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">销售员:</label>
|
||||
<label class="am-para-label w90">门店类型:</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>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w80">销售员:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<select title="城市" name="city_id_admin" v-model="params.city_id_admin">
|
||||
<option value="">选择城市</option>
|
||||
@@ -273,6 +282,7 @@
|
||||
admins: {cityAry: [], countyAry: [], bizAry: [], list: []},
|
||||
show_info: {levelAry: [], offlineSourcesAry: [], wxqyAry: []},
|
||||
of2Ary: [],
|
||||
bizTypeAry: [],
|
||||
},
|
||||
mounted: function () {
|
||||
var vm = this;
|
||||
@@ -282,8 +292,23 @@
|
||||
vm.qdjl_lists = <?=json_encode($qdjl_lists)?>;
|
||||
vm.show_info = <?=json_encode($show_info)?>;
|
||||
vm.init_citys();
|
||||
vm.initBizType();
|
||||
},
|
||||
methods: {
|
||||
initBizType: function () {
|
||||
var vm = this;
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/common/biz_type_ary',
|
||||
dataType: 'json',
|
||||
data: {},
|
||||
success: function (response) {
|
||||
if (response.code == 1) {
|
||||
vm.bizTypeAry = response.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
btnTimes: function () {
|
||||
layer.open({
|
||||
type: 1,
|
||||
|
||||
Reference in New Issue
Block a user