edit-admin-order_list

This commit is contained in:
lccsw
2021-12-03 14:18:07 +08:00
parent c206bc3975
commit 4cc121c496
+28 -112
View File
@@ -181,11 +181,10 @@ class OrdersList
if ($params['admin_id']) {
$where['admin_id'] = $params['admin_id'];
} else {
$where_lcb = array();
if ($params['biz_id_admin']) {//指定店铺所有销售员
$where_lcb['biz_id'] = $params['biz_id_admin'];
$where['biz_id'] = $params['biz_id_admin'];
} else {
//指定城市的所有销售员
//指定城市的所有门店
$where_biz = array();
if ($params['county_id_admin']) {
$where_biz['county_id'] = $params['county_id_admin'];
@@ -197,23 +196,12 @@ class OrdersList
$rows_biz = $this->ci->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;
$where["biz_id in({$str_ids})"] = null;
} else {
$where_lcb['biz_id'] = -1;
$where['biz_id'] = -1;
}
}
}
//获取目标销售员列表
if ($where_lcb) {
$where_lcb['status>-1'] = null;
$rows_lcb = $this->ci->mdLichebUsers->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'] = '';
@@ -395,11 +383,10 @@ class OrdersList
if ($params['admin_id']) {
$where['admin_id'] = $params['admin_id'];
} else {
$where_lcb = array();
if ($params['biz_id_admin']) {//指定店铺所有销售员
$where_lcb['biz_id'] = $params['biz_id_admin'];
$where['biz_id'] = $params['biz_id_admin'];
} else {
//指定城市的所有销售员
//指定城市的所有门店
$where_biz = array();
if ($params['county_id_admin']) {
$where_biz['county_id'] = $params['county_id_admin'];
@@ -411,23 +398,12 @@ class OrdersList
$rows_biz = $this->ci->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;
$where["biz_id in({$str_ids})"] = null;
} else {
$where_lcb['biz_id'] = -1;
$where['biz_id'] = -1;
}
}
}
//获取目标销售员列表
if ($where_lcb) {
$where_lcb['status>-1'] = null;
$rows_lcb = $this->ci->mdLichebUsers->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'] = '';
@@ -628,11 +604,10 @@ class OrdersList
if ($params['admin_id']) {
$where['admin_id'] = $params['admin_id'];
} else {
$where_lcb = array();
if ($params['biz_id_admin']) {//指定店铺所有销售员
$where_lcb['biz_id'] = $params['biz_id_admin'];
$where['biz_id'] = $params['biz_id_admin'];
} else {
//指定城市的所有销售员
//指定城市的所有门店
$where_biz = array();
if ($params['county_id_admin']) {
$where_biz['county_id'] = $params['county_id_admin'];
@@ -644,23 +619,12 @@ class OrdersList
$rows_biz = $this->ci->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;
$where["biz_id in({$str_ids})"] = null;
} else {
$where_lcb['biz_id'] = -1;
$where['biz_id'] = -1;
}
}
}
//获取目标销售员列表
if ($where_lcb) {
$where_lcb['status>-1'] = null;
$rows_lcb = $this->ci->mdLichebUsers->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'] = '';
@@ -815,11 +779,10 @@ class OrdersList
if ($params['admin_id']) {
$where['admin_id'] = $params['admin_id'];
} else {
$where_lcb = array();
if ($params['biz_id_admin']) {//指定店铺所有销售员
$where_lcb['biz_id'] = $params['biz_id_admin'];
$where['biz_id'] = $params['biz_id_admin'];
} else {
//指定城市的所有销售员
//指定城市的所有门店
$where_biz = array();
if ($params['county_id_admin']) {
$where_biz['county_id'] = $params['county_id_admin'];
@@ -831,23 +794,12 @@ class OrdersList
$rows_biz = $this->ci->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;
$where["biz_id in({$str_ids})"] = null;
} else {
$where_lcb['biz_id'] = -1;
$where['biz_id'] = -1;
}
}
}
//获取目标销售员列表
if ($where_lcb) {
$where_lcb['status>-1'] = null;
$rows_lcb = $this->ci->mdLichebUsers->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'] = '';
@@ -1030,11 +982,10 @@ class OrdersList
if ($params['admin_id']) {
$where['admin_id'] = $params['admin_id'];
} else {
$where_lcb = array();
if ($params['biz_id_admin']) {//指定店铺所有销售员
$where_lcb['biz_id'] = $params['biz_id_admin'];
$where['biz_id'] = $params['biz_id_admin'];
} else {
//指定城市的所有销售员
//指定城市的所有门店
$where_biz = array();
if ($params['county_id_admin']) {
$where_biz['county_id'] = $params['county_id_admin'];
@@ -1046,23 +997,12 @@ class OrdersList
$rows_biz = $this->ci->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;
$where["biz_id in({$str_ids})"] = null;
} else {
$where_lcb['biz_id'] = -1;
$where['biz_id'] = -1;
}
}
}
//获取目标销售员列表
if ($where_lcb) {
$where_lcb['status>-1'] = null;
$rows_lcb = $this->ci->mdLichebUsers->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'] = '';
@@ -1236,11 +1176,10 @@ class OrdersList
if ($params['admin_id']) {
$where['admin_id'] = $params['admin_id'];
} else {
$where_lcb = array();
if ($params['biz_id_admin']) {//指定店铺所有销售员
$where_lcb['biz_id'] = $params['biz_id_admin'];
$where['biz_id'] = $params['biz_id_admin'];
} else {
//指定城市的所有销售员
//指定城市的所有门店
$where_biz = array();
if ($params['county_id_admin']) {
$where_biz['county_id'] = $params['county_id_admin'];
@@ -1252,23 +1191,12 @@ class OrdersList
$rows_biz = $this->ci->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;
$where["biz_id in({$str_ids})"] = null;
} else {
$where_lcb['biz_id'] = -1;
$where['biz_id'] = -1;
}
}
}
//获取目标销售员列表
if ($where_lcb) {
$where_lcb['status>-1'] = null;
$rows_lcb = $this->ci->mdLichebUsers->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'] = '';
@@ -1441,11 +1369,10 @@ class OrdersList
if ($params['admin_id']) {
$where['admin_id'] = $params['admin_id'];
} else {
$where_lcb = array();
if ($params['biz_id_admin']) {//指定店铺所有销售员
$where_lcb['biz_id'] = $params['biz_id_admin'];
$where['biz_id'] = $params['biz_id_admin'];
} else {
//指定城市的所有销售员
//指定城市的所有门店
$where_biz = array();
if ($params['county_id_admin']) {
$where_biz['county_id'] = $params['county_id_admin'];
@@ -1457,23 +1384,12 @@ class OrdersList
$rows_biz = $this->ci->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;
$where["biz_id in({$str_ids})"] = null;
} else {
$where_lcb['biz_id'] = -1;
$where['biz_id'] = -1;
}
}
}
//获取目标销售员列表
if ($where_lcb) {
$where_lcb['status>-1'] = null;
$rows_lcb = $this->ci->mdLichebUsers->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'] = '';