liche update for admin order search by admin_id like
This commit is contained in:
@@ -72,9 +72,45 @@ class Agent extends HD_Controller{
|
||||
if($params['admin_id']){
|
||||
$where['admin_id'] = $params['admin_id'];
|
||||
} else {
|
||||
$params['city_id_admin'] = '';
|
||||
$params['county_id_admin'] = '';
|
||||
$params['biz_id_admin'] = '';
|
||||
$where_lcb = array();
|
||||
if($params['biz_id_admin']){//指定店铺所有销售员
|
||||
$where_lcb['biz_id'] = $params['biz_id_admin'];
|
||||
} else {
|
||||
//指定城市的所有销售员
|
||||
$where_biz = array();
|
||||
if($params['county_id_admin']){
|
||||
$where_biz['county_id'] = $params['county_id_admin'];
|
||||
} else if($params['city_id_admin']){
|
||||
$where_biz['city_id'] = $params['city_id_admin'];
|
||||
}
|
||||
if($where_biz){
|
||||
$where_biz['status>-1'] = null;
|
||||
$this->load->model("biz/biz_model");
|
||||
$rows_biz = $this->biz_model->select($where_biz, 'id desc', 0, 0, 'id');
|
||||
if($rows_biz){
|
||||
$str_ids = implode(',', array_column($rows_biz, 'id'));
|
||||
$where_lcb["biz_id in({$str_ids})"] = null;
|
||||
} else {
|
||||
$where_lcb['biz_id'] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
//获取目标销售员列表
|
||||
if($where_lcb){
|
||||
$where_lcb['status>-1'] = null;
|
||||
$this->load->model('app/licheb/App_licheb_users_model', 'licheb_user_model');
|
||||
$rows_lcb = $this->licheb_user_model->select($where_lcb, 'id desc', 0, 0, 'id');
|
||||
if($rows_lcb){
|
||||
$str_ids = implode(',', array_column($rows_lcb, 'id'));
|
||||
$where["admin_id in({$str_ids})"] = null;
|
||||
} else {
|
||||
$where['admin_id'] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
!$params['city_id_admin'] && $params['city_id_admin'] = '';
|
||||
!$params['county_id_admin'] && $params['county_id_admin'] = '';
|
||||
!$params['biz_id_admin'] && $params['biz_id_admin'] = '';
|
||||
$params['admin_id'] = '';
|
||||
}
|
||||
|
||||
|
||||
@@ -72,9 +72,45 @@ class Bill extends HD_Controller{
|
||||
if($params['admin_id']){
|
||||
$where['admin_id'] = $params['admin_id'];
|
||||
} else {
|
||||
$params['city_id_admin'] = '';
|
||||
$params['county_id_admin'] = '';
|
||||
$params['biz_id_admin'] = '';
|
||||
$where_lcb = array();
|
||||
if($params['biz_id_admin']){//指定店铺所有销售员
|
||||
$where_lcb['biz_id'] = $params['biz_id_admin'];
|
||||
} else {
|
||||
//指定城市的所有销售员
|
||||
$where_biz = array();
|
||||
if($params['county_id_admin']){
|
||||
$where_biz['county_id'] = $params['county_id_admin'];
|
||||
} else if($params['city_id_admin']){
|
||||
$where_biz['city_id'] = $params['city_id_admin'];
|
||||
}
|
||||
if($where_biz){
|
||||
$where_biz['status>-1'] = null;
|
||||
$this->load->model("biz/biz_model");
|
||||
$rows_biz = $this->biz_model->select($where_biz, 'id desc', 0, 0, 'id');
|
||||
if($rows_biz){
|
||||
$str_ids = implode(',', array_column($rows_biz, 'id'));
|
||||
$where_lcb["biz_id in({$str_ids})"] = null;
|
||||
} else {
|
||||
$where_lcb['biz_id'] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
//获取目标销售员列表
|
||||
if($where_lcb){
|
||||
$where_lcb['status>-1'] = null;
|
||||
$this->load->model('app/licheb/App_licheb_users_model', 'licheb_user_model');
|
||||
$rows_lcb = $this->licheb_user_model->select($where_lcb, 'id desc', 0, 0, 'id');
|
||||
if($rows_lcb){
|
||||
$str_ids = implode(',', array_column($rows_lcb, 'id'));
|
||||
$where["admin_id in({$str_ids})"] = null;
|
||||
} else {
|
||||
$where['admin_id'] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
!$params['city_id_admin'] && $params['city_id_admin'] = '';
|
||||
!$params['county_id_admin'] && $params['county_id_admin'] = '';
|
||||
!$params['biz_id_admin'] && $params['biz_id_admin'] = '';
|
||||
$params['admin_id'] = '';
|
||||
}
|
||||
|
||||
|
||||
@@ -72,9 +72,45 @@ class Ckcar extends HD_Controller{
|
||||
if($params['admin_id']){
|
||||
$where['admin_id'] = $params['admin_id'];
|
||||
} else {
|
||||
$params['city_id_admin'] = '';
|
||||
$params['county_id_admin'] = '';
|
||||
$params['biz_id_admin'] = '';
|
||||
$where_lcb = array();
|
||||
if($params['biz_id_admin']){//指定店铺所有销售员
|
||||
$where_lcb['biz_id'] = $params['biz_id_admin'];
|
||||
} else {
|
||||
//指定城市的所有销售员
|
||||
$where_biz = array();
|
||||
if($params['county_id_admin']){
|
||||
$where_biz['county_id'] = $params['county_id_admin'];
|
||||
} else if($params['city_id_admin']){
|
||||
$where_biz['city_id'] = $params['city_id_admin'];
|
||||
}
|
||||
if($where_biz){
|
||||
$where_biz['status>-1'] = null;
|
||||
$this->load->model("biz/biz_model");
|
||||
$rows_biz = $this->biz_model->select($where_biz, 'id desc', 0, 0, 'id');
|
||||
if($rows_biz){
|
||||
$str_ids = implode(',', array_column($rows_biz, 'id'));
|
||||
$where_lcb["biz_id in({$str_ids})"] = null;
|
||||
} else {
|
||||
$where_lcb['biz_id'] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
//获取目标销售员列表
|
||||
if($where_lcb){
|
||||
$where_lcb['status>-1'] = null;
|
||||
$this->load->model('app/licheb/App_licheb_users_model', 'licheb_user_model');
|
||||
$rows_lcb = $this->licheb_user_model->select($where_lcb, 'id desc', 0, 0, 'id');
|
||||
if($rows_lcb){
|
||||
$str_ids = implode(',', array_column($rows_lcb, 'id'));
|
||||
$where["admin_id in({$str_ids})"] = null;
|
||||
} else {
|
||||
$where['admin_id'] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
!$params['city_id_admin'] && $params['city_id_admin'] = '';
|
||||
!$params['county_id_admin'] && $params['county_id_admin'] = '';
|
||||
!$params['biz_id_admin'] && $params['biz_id_admin'] = '';
|
||||
$params['admin_id'] = '';
|
||||
}
|
||||
|
||||
|
||||
@@ -72,9 +72,45 @@ class Delivery extends HD_Controller{
|
||||
if($params['admin_id']){
|
||||
$where['admin_id'] = $params['admin_id'];
|
||||
} else {
|
||||
$params['city_id_admin'] = '';
|
||||
$params['county_id_admin'] = '';
|
||||
$params['biz_id_admin'] = '';
|
||||
$where_lcb = array();
|
||||
if($params['biz_id_admin']){//指定店铺所有销售员
|
||||
$where_lcb['biz_id'] = $params['biz_id_admin'];
|
||||
} else {
|
||||
//指定城市的所有销售员
|
||||
$where_biz = array();
|
||||
if($params['county_id_admin']){
|
||||
$where_biz['county_id'] = $params['county_id_admin'];
|
||||
} else if($params['city_id_admin']){
|
||||
$where_biz['city_id'] = $params['city_id_admin'];
|
||||
}
|
||||
if($where_biz){
|
||||
$where_biz['status>-1'] = null;
|
||||
$this->load->model("biz/biz_model");
|
||||
$rows_biz = $this->biz_model->select($where_biz, 'id desc', 0, 0, 'id');
|
||||
if($rows_biz){
|
||||
$str_ids = implode(',', array_column($rows_biz, 'id'));
|
||||
$where_lcb["biz_id in({$str_ids})"] = null;
|
||||
} else {
|
||||
$where_lcb['biz_id'] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
//获取目标销售员列表
|
||||
if($where_lcb){
|
||||
$where_lcb['status>-1'] = null;
|
||||
$this->load->model('app/licheb/App_licheb_users_model', 'licheb_user_model');
|
||||
$rows_lcb = $this->licheb_user_model->select($where_lcb, 'id desc', 0, 0, 'id');
|
||||
if($rows_lcb){
|
||||
$str_ids = implode(',', array_column($rows_lcb, 'id'));
|
||||
$where["admin_id in({$str_ids})"] = null;
|
||||
} else {
|
||||
$where['admin_id'] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
!$params['city_id_admin'] && $params['city_id_admin'] = '';
|
||||
!$params['county_id_admin'] && $params['county_id_admin'] = '';
|
||||
!$params['biz_id_admin'] && $params['biz_id_admin'] = '';
|
||||
$params['admin_id'] = '';
|
||||
}
|
||||
|
||||
|
||||
@@ -69,9 +69,45 @@ class Loan extends HD_Controller{
|
||||
if($params['admin_id']){
|
||||
$where['admin_id'] = $params['admin_id'];
|
||||
} else {
|
||||
$params['city_id_admin'] = '';
|
||||
$params['county_id_admin'] = '';
|
||||
$params['biz_id_admin'] = '';
|
||||
$where_lcb = array();
|
||||
if($params['biz_id_admin']){//指定店铺所有销售员
|
||||
$where_lcb['biz_id'] = $params['biz_id_admin'];
|
||||
} else {
|
||||
//指定城市的所有销售员
|
||||
$where_biz = array();
|
||||
if($params['county_id_admin']){
|
||||
$where_biz['county_id'] = $params['county_id_admin'];
|
||||
} else if($params['city_id_admin']){
|
||||
$where_biz['city_id'] = $params['city_id_admin'];
|
||||
}
|
||||
if($where_biz){
|
||||
$where_biz['status>-1'] = null;
|
||||
$this->load->model("biz/biz_model");
|
||||
$rows_biz = $this->biz_model->select($where_biz, 'id desc', 0, 0, 'id');
|
||||
if($rows_biz){
|
||||
$str_ids = implode(',', array_column($rows_biz, 'id'));
|
||||
$where_lcb["biz_id in({$str_ids})"] = null;
|
||||
} else {
|
||||
$where_lcb['biz_id'] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
//获取目标销售员列表
|
||||
if($where_lcb){
|
||||
$where_lcb['status>-1'] = null;
|
||||
$this->load->model('app/licheb/App_licheb_users_model', 'licheb_user_model');
|
||||
$rows_lcb = $this->licheb_user_model->select($where_lcb, 'id desc', 0, 0, 'id');
|
||||
if($rows_lcb){
|
||||
$str_ids = implode(',', array_column($rows_lcb, 'id'));
|
||||
$where["admin_id in({$str_ids})"] = null;
|
||||
} else {
|
||||
$where['admin_id'] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
!$params['city_id_admin'] && $params['city_id_admin'] = '';
|
||||
!$params['county_id_admin'] && $params['county_id_admin'] = '';
|
||||
!$params['biz_id_admin'] && $params['biz_id_admin'] = '';
|
||||
$params['admin_id'] = '';
|
||||
}
|
||||
|
||||
|
||||
@@ -79,9 +79,45 @@ class Sign extends HD_Controller{
|
||||
if($params['admin_id']){
|
||||
$where['admin_id'] = $params['admin_id'];
|
||||
} else {
|
||||
$params['city_id_admin'] = '';
|
||||
$params['county_id_admin'] = '';
|
||||
$params['biz_id_admin'] = '';
|
||||
$where_lcb = array();
|
||||
if($params['biz_id_admin']){//指定店铺所有销售员
|
||||
$where_lcb['biz_id'] = $params['biz_id_admin'];
|
||||
} else {
|
||||
//指定城市的所有销售员
|
||||
$where_biz = array();
|
||||
if($params['county_id_admin']){
|
||||
$where_biz['county_id'] = $params['county_id_admin'];
|
||||
} else if($params['city_id_admin']){
|
||||
$where_biz['city_id'] = $params['city_id_admin'];
|
||||
}
|
||||
if($where_biz){
|
||||
$where_biz['status>-1'] = null;
|
||||
$this->load->model("biz/biz_model");
|
||||
$rows_biz = $this->biz_model->select($where_biz, 'id desc', 0, 0, 'id');
|
||||
if($rows_biz){
|
||||
$str_ids = implode(',', array_column($rows_biz, 'id'));
|
||||
$where_lcb["biz_id in({$str_ids})"] = null;
|
||||
} else {
|
||||
$where_lcb['biz_id'] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
//获取目标销售员列表
|
||||
if($where_lcb){
|
||||
$where_lcb['status>-1'] = null;
|
||||
$this->load->model('app/licheb/App_licheb_users_model', 'licheb_user_model');
|
||||
$rows_lcb = $this->licheb_user_model->select($where_lcb, 'id desc', 0, 0, 'id');
|
||||
if($rows_lcb){
|
||||
$str_ids = implode(',', array_column($rows_lcb, 'id'));
|
||||
$where["admin_id in({$str_ids})"] = null;
|
||||
} else {
|
||||
$where['admin_id'] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
!$params['city_id_admin'] && $params['city_id_admin'] = '';
|
||||
!$params['county_id_admin'] && $params['county_id_admin'] = '';
|
||||
!$params['biz_id_admin'] && $params['biz_id_admin'] = '';
|
||||
$params['admin_id'] = '';
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w100">车型:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<select name="brand_id" v-model="params.brand_id">
|
||||
@@ -257,6 +257,7 @@
|
||||
$("#title").val('');
|
||||
$("#id-create-time").val('');
|
||||
that.params.brand_id = '';
|
||||
that.params.city_id_admin = '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w100">车型:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<select name="brand_id" v-model="params.brand_id">
|
||||
@@ -117,7 +117,7 @@
|
||||
<button type="submit" class="am-btn am-btn-success am-btn-sm w100">搜索</button>
|
||||
</div>
|
||||
<div class="am-form-group fl ml10">
|
||||
<button type="button" class="am-btn am-btn-success am-btn-sm w100" @click="reset">设置</button>
|
||||
<button type="button" class="am-btn am-btn-success am-btn-sm w100" @click="reset">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -257,6 +257,7 @@
|
||||
$("#title").val('');
|
||||
$("#id-create-time").val('');
|
||||
that.params.brand_id = '';
|
||||
that.params.city_id_admin = '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w100">车型:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<select name="brand_id" v-model="params.brand_id">
|
||||
@@ -117,7 +117,7 @@
|
||||
<button type="submit" class="am-btn am-btn-success am-btn-sm w100">搜索</button>
|
||||
</div>
|
||||
<div class="am-form-group fl ml10">
|
||||
<button type="button" class="am-btn am-btn-success am-btn-sm w100" @click="reset">设置</button>
|
||||
<button type="button" class="am-btn am-btn-success am-btn-sm w100" @click="reset">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -257,6 +257,7 @@
|
||||
$("#title").val('');
|
||||
$("#id-create-time").val('');
|
||||
that.params.brand_id = '';
|
||||
that.params.city_id_admin = '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w100">车型:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<select name="brand_id" v-model="params.brand_id">
|
||||
@@ -116,6 +116,9 @@
|
||||
<div class="am-form-group fl ml10">
|
||||
<button type="submit" class="am-btn am-btn-success am-btn-sm w100">搜索</button>
|
||||
</div>
|
||||
<div class="am-form-group fl ml10">
|
||||
<button type="button" class="am-btn am-btn-success am-btn-sm w100" @click="reset">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -248,6 +251,14 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
reset:function(){
|
||||
var that = this;
|
||||
$("#search_tp").val('mobile');
|
||||
$("#title").val('');
|
||||
$("#id-create-time").val('');
|
||||
that.params.brand_id = '';
|
||||
that.params.city_id_admin = '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'params.brand_id':function(nv, ov){
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w100">车型:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<select name="brand_id" v-model="params.brand_id">
|
||||
@@ -117,7 +117,7 @@
|
||||
<button type="submit" class="am-btn am-btn-success am-btn-sm w100">搜索</button>
|
||||
</div>
|
||||
<div class="am-form-group fl ml10">
|
||||
<button type="button" class="am-btn am-btn-success am-btn-sm w100" @click="reset">设置</button>
|
||||
<button type="button" class="am-btn am-btn-success am-btn-sm w100" @click="reset">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -257,6 +257,7 @@
|
||||
$("#title").val('');
|
||||
$("#id-create-time").val('');
|
||||
that.params.brand_id = '';
|
||||
that.params.city_id_admin = '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w100">车型:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<select name="brand_id" v-model="params.brand_id">
|
||||
@@ -258,6 +258,7 @@
|
||||
$("#title").val('');
|
||||
$("#id-create-time").val('');
|
||||
that.params.brand_id = '';
|
||||
that.params.city_id_admin = '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in New Issue
Block a user