修改管理后台客户列表筛选和增加字段

This commit is contained in:
lcc
2025-08-10 22:46:09 +08:00
parent 8efdea6181
commit 464730e199
3 changed files with 12 additions and 7 deletions
@@ -82,14 +82,15 @@ class Customer extends BaseController
$checkStatus = Receiver_order_subsidy_model::IF_CHECK_STATUS[$orderSubsidy['ifcheck']] ?: '';
}
$temp = [
'cluesSid' => $cluesRow['sid'],
'cid' => $val['cid'],
'id' => $val['id'],
'name' => $val['name'],
'mobile' => mobile_asterisk($val['mobile']),
'status_name' => $status_arr[$val['status']],
'biz_poi' => $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'] : '',
'brand_detail' => $brand_detail,
'bizPoi' => $area ? "{$area['province_name']}-{$area['city_name']}-{$area['county_name']}" : '',
'bizName' => isset($biz_rows[$val['biz_id']]) ? $biz_rows[$val['biz_id']][0]['biz_name'] : '',
'brandDetail' => $brand_detail,
'belongUserName' => $pinganUsersRow ?: [],
'enTime' => date('Y-m-d H:i:s', $val['c_time']),
'checkStatus' => $checkStatus
@@ -342,6 +343,9 @@ class Customer extends BaseController
$subSql .= " and pingan_user_id=-99999";
}
}
if($params['cluesSid']){
$subSql .= " and sid like '%{$params['cluesSid']}%'";
}
$where["rid in ($subSql)"] = null;
$params['title'] && $where['mobile LIKE "%' . trim($params['title']) . '%"'] = null;
if ($params['dateRange'][0] && $params['dateRange'][1]) {
@@ -28,6 +28,7 @@ class Cmmssn extends BaseController
$page = $this->input_param('page');
$limit = $this->input_param('limit');
$type = $this->input_param('type');
$cfType = $this->input_param('cfType');
$dateRange = $this->input_param('dateRange');
$userId = $this->input_param('userId');
$brands = $this->input_param('brands');
@@ -56,8 +57,8 @@ class Cmmssn extends BaseController
}
}
}
if ($type) {
if ($type == 1) { //线索
if ($cfType) {
if ($cfType == 1) { //线索
$types = [Pingan_users_cmmssn_model::CF_TYPE_CLUES_OWN, Pingan_users_cmmssn_model::CF_TYPE_CLUES_TEAM];
} else { //订单
$types = [Pingan_users_cmmssn_model::CF_TYPE_ORDER_OWN, Pingan_users_cmmssn_model::CF_TYPE_ORDER_TEAM];
@@ -56,7 +56,7 @@ class Auto_user_coupon_model extends HD_Model
'couponId' => $couponId,
];
$row = $this->get($where);
$sid = create_order_no(350200, 'pingan');
$sid = create_order_no($cityId, 'pingan');
$product = $this->auto_product_model->get(['id' => $coupon['product_id']]);
$user = $this->autoUserModel->get(['id' => $userId]);
$teamCf = $this->organizationModel->getCfIdByTeamId($user['orgTeamId']);
@@ -94,7 +94,7 @@ class Auto_user_coupon_model extends HD_Model
$cluesRow = $this->receiver_clues_model->get(['mobile' => $mobile]);
if (!$cluesRow) {
$data = [
'sid' => create_order_no(350200, 'pingan'),
'sid' => create_order_no($cityId, 'pingan'),
'mobile' => $mobile,
'en_time' => date('Y-m-d H:i:s'),
'out_id' => $product['id'],