add-admin-order_admin_name

This commit is contained in:
lccsw
2022-09-28 16:57:12 +08:00
parent ca53bdd327
commit f31fb81b57
+11 -2
View File
@@ -230,7 +230,7 @@ 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,{$this->t1}.sale_id,{$this->t1}.finance_id,{$this->t1}.refund_time,
{$this->t1}.ck_time";
{$this->t1}.ck_time,{$this->t1}.admin_id";
if(strlen($params['status_pid'])){
$where["{$this->t1}.brand_id>"] = 0;
}
@@ -320,6 +320,15 @@ class Ordersv2List
$incor_arr = array_unique(array_column($rows, 'incor_id'));
$attr_arr = array_merge($v_arr, $cor_arr, $incor_arr);
$attr = $this->ci->auto_attr_model->get_map_by_ids($attr_arr, 'id,title');
$admin_ids = array_column($rows,'admin_id');
$admin_ids_str = implode(',',$admin_ids);
$admins = [];
if($admin_ids_str){
$where = [
"id in ($admin_ids_str)" => null
];
$admins = $this->ci->mdLichebUsers->map('id','uname',$where,'id desc',1,10,'id,uname'); //顾问
}
foreach ($rows as $key => $val) {
$info_json = json_decode($val['info_json'], true);
$fields = array();
@@ -363,7 +372,7 @@ class Ordersv2List
!$status_name && $status_name = '未下定';
}
$fields['status_name'] = $status_name;
$fields['biz_name'] = $bizs[$val['biz_id']] ? $bizs[$val['biz_id']]['biz_name'] : '';
$fields['biz_name'] = $bizs[$val['biz_id']] ? $bizs[$val['biz_id']]['biz_name'].'<br>'.$admins[$val['admin_id']] : '';
$fields['city_name'] = $bizs[$val['biz_id']] ? $bizs[$val['biz_id']]['city_name'] : '';
$fields['biz_type'] = $bizs[$val['biz_id']] ? $this->ci->biz_model->type_ary($bizs[$val['biz_id']]['type']) : '';
$fields['c_time'] = date('Y-m-d H:i:s', $val['c_time']);