edit-admin-order_list

This commit is contained in:
lccsw
2022-05-09 14:31:01 +08:00
parent fada3ad596
commit c6f2db4b95
2 changed files with 23 additions and 17 deletions
@@ -55,6 +55,7 @@ class Orders extends HD_Controller
}
$cate = $where = array();
$where["$t1.status<>"] = -1;
strlen($value['pid_status']) && $where["$t1.brand_id>"] = 0;
if(strlen($value['pid_status']) && $value['pid_status']){
$where["$t1.id>="] = $old_oid;
}
+22 -17
View File
@@ -209,6 +209,9 @@ class Ordersv2List
{$this->t1}.cor_id,{$this->t1}.incor_id,{$this->t1}.money_json,{$this->t1}.payway,{$this->t1}.status,{$this->t1}.c_time,
{$this->t1}.biz_id,{$this->t1}.bill_time,{$this->t1}.customer_id,{$this->t1}.owner_name,{$this->t1}.owner_mobile,{$this->t1}.main_type,{$this->t1}.info_json,
{$this->t1}.order_time,{$this->t1}.bill_time,{$this->t1}.item_id,{$this->t1}.over_time";
if(strlen($params['status_pid'])){
$where["{$this->t1}.brand_id>"] = 0;
}
if (strlen($params['status_pid']) && $params['status'] == 1) { //付款-已下定
$where["{$this->t1}.status <> 2"] = null;
}
@@ -357,45 +360,45 @@ class Ordersv2List
];
$_title = '全部订单';
$view = 'receiver/orderv2/lists';
$params['status_pid'] == 1 && $where["{$this->t1}.payway"] = 0;
$params['status_pid'] == 1 && $where["payway"] = 0;
if (is_product()) {
$where["{$this->t1}.biz_id<>"] = 1;
$where["biz_id<>"] = 1;
}
if ($_SESSION['admin_info']['biz_id']) {
$biz_ids = implode(',', $_SESSION['admin_info']['biz_id']);
$where["{$this->t1}.biz_id in ($biz_ids)"] = null;
$where["biz_id in ($biz_ids)"] = null;
}
if ($params['biz_type']) {
$where["{$this->t1}.biz_id in (select id from lc_biz where type = " . $params['biz_type'] . ' and status=1)'] = null;
$where["biz_id in (select id from lc_biz where type = " . $params['biz_type'] . ' and status=1)'] = null;
}
if ($params['of_id'] || $params['of2_id']) {
$where_c = 'status>=0';
$params['of_id'] && $where_c .= ' and of_id = ' . $params['of_id'];
$params['of2_id'] && $where_c .= ' and of2_id = ' . $params['of2_id'];
$where["{$this->t1}.customer_id in (select id from lc_receiver_customers where " . $where_c . ')'] = null;
$where["customer_id in (select id from lc_receiver_customers where " . $where_c . ')'] = null;
}
if ($params['qdjl_id']) {//渠道经理
$where["{$this->t1}.biz_id in(select biz_id from lc_app_licheb_channel_biz where uid={$params['qdjl_id']})"] = null;
$where["biz_id in(select biz_id from lc_app_licheb_channel_biz where uid={$params['qdjl_id']})"] = null;
}
if ($params['title']) {
$where["{$this->t1}.{$params['search_tp']} like '%{$params['title']}%'"] = null;
$where["{$params['search_tp']} like '%{$params['title']}%'"] = null;
}
//创建时间
if ($params['c_time']) {
$c_time = explode(' ~ ', $params['c_time']);
if ($c_time[0]) {
$where["{$this->t1}.c_time >="] = strtotime($c_time[0] . ' 00:00:00');
$where["c_time >="] = strtotime($c_time[0] . ' 00:00:00');
}
if ($c_time[1]) {
$where["{$this->t1}.c_time <="] = strtotime($c_time[1] . ' 23:59:59');
$where["c_time <="] = strtotime($c_time[1] . ' 23:59:59');
}
}
//销售员筛选
if ($params['admin_id']) {
$where["{$this->t1}.sale_id"] = $params['admin_id'];
$where["sale_id"] = $params['admin_id'];
} else {
if ($params['biz_id_admin']) {//指定店铺所有销售员
$where["{$this->t1}.biz_id"] = $params['biz_id_admin'];
$where["biz_id"] = $params['biz_id_admin'];
} else {
//指定城市的所有门店
$where_biz = array();
@@ -409,9 +412,9 @@ class Ordersv2List
$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["{$this->t1}.biz_id in({$str_ids})"] = null;
$where["biz_id in({$str_ids})"] = null;
} else {
$where["{$this->t1}.biz_id"] = -1;
$where["biz_id"] = -1;
}
}
}
@@ -420,10 +423,12 @@ class Ordersv2List
!$params['biz_id_admin'] && $params['biz_id_admin'] = '';
$params['admin_id'] = '';
}
$fileds = "{$this->t1}.id,{$this->t1}.name,{$this->t1}.mobile,{$this->t1}.brand_id,{$this->t1}.s_id,{$this->t1}.v_id,
{$this->t1}.cor_id,{$this->t1}.incor_id,{$this->t1}.money_json,{$this->t1}.payway,{$this->t1}.status,{$this->t1}.c_time,
{$this->t1}.biz_id,{$this->t1}.bill_time,{$this->t1}.customer_id,{$this->t1}.owner_name,{$this->t1}.owner_mobile,{$this->t1}.main_type,{$this->t1}.info_json,
{$this->t1}.order_time,{$this->t1}.bill_time,{$this->t1}.item_id,{$this->t1}.over_time";
$where["id in(select o_id from lc_app_liche_orders where type=4 and status=1 and o_id>=10000)"] = null;
$fileds = "id,name,mobile,brand_id,s_id,v_id,
cor_id,incor_id,money_json,payway,status,c_time,
biz_id,bill_time,customer_id,owner_name,owner_mobile,main_type,info_json,
order_time,bill_time,item_id,over_time";
$count = $this->ci->mdOrders->count($where);
$rows = $this->ci->mdOrders->select($where, 'c_time desc', $page, $size, $fileds);