edit-admin-order_export

This commit is contained in:
lccsw
2022-06-07 14:14:00 +08:00
parent 747ee0505e
commit 288b61c0b9
+26 -3
View File
@@ -19,6 +19,7 @@ class Ordersv2List
$this->ci->load->model('receiver/order/receiver_order_status_model');
$this->ci->load->model('receiver/order/receiver_order_agents_model', 'order_agents_model');
$this->ci->load->model('app/licheb/app_licheb_users_model', 'mdLichebUsers');
$this->ci->load->model('app/licheb/app_licheb_channel_biz_model');
$this->ci->load->model('receiver/receiver_customers_model', 'mdCustomers');
$this->ci->load->model('receiver/receiver_clues_cfrom_model', 'mdCluesCfrom');
$this->ci->load->model("biz/biz_model");
@@ -209,7 +210,7 @@ class Ordersv2List
$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";
{$this->t1}.order_time,{$this->t1}.bill_time,{$this->t1}.item_id,{$this->t1}.over_time,{$this->t1}.sale_id";
if(strlen($params['status_pid'])){
$where["{$this->t1}.brand_id>"] = 0;
}
@@ -323,8 +324,8 @@ class Ordersv2List
$fields['name'] = $size > 1000 ? $val['name']
: '<a href="javascript:;" data-open="' . $open_url . $val['id'] . '">' . $val['name'] . $o_tp . '<br>' . $val['mobile'] . '</a>';
}
$fields['id_card'] = $info_json['c_owner_cardid'] ? '\t'.$info_json['c_owner_cardid'] : '';
$fields['mobile'] = $size > 1000 ? '\t'.$mobile : $mobile;
$fields['id_card'] = $info_json['c_owner_cardid'] ? '="'.$info_json['c_owner_cardid'].'"' : '';
$fields['mobile'] = $size > 1000 ? '="'.$mobile.'"' : $mobile;
$fields['car_name'] = "{$brand_name}-{$series_name}-{$v_name}-{$cor_name}";
$fields['price_car'] = number_format($money_json['price_car'],2);
$fields['payway_name'] = $this->paywayAry[$val['payway']];
@@ -356,6 +357,27 @@ class Ordersv2List
$fields['bill_time'] = $val['bill_time'] != '0000-00-00 00:00:00' ? $val['bill_time'] : '';
$fields['over_time'] = $val['over_time'] != '0000-00-00 00:00:00' ? date('Y-m-d',strtotime($val['over_time'])) : '';
$fields['vin'] = $items[$val['item_id']] ? $items[$val['item_id']] : '';
if($size>1000){
if($bizs[$val['biz_id']]['type']==3){ //代理店显示渠道经理的姓名
$channel_users = $this->ci->app_licheb_channel_biz_model->select(['biz_id'=>$val['biz_id']],'','','','uid');
$user_ids = array_column($channel_users,'uid');
$user_ids_str = implode(',',$user_ids);
$user_info = '';
if($user_ids_str && $user_ids){
$where = [
'group_id' => 4,
'status' => 1,
"id in ($user_ids_str)" => null
];
$users = $this->ci->mdLichebUsers->select($where,'id desc',1,10,'uname,biz_id'); //渠道经理
$users && $user_info = implode(' ',array_column($users,'uname'));
}
$fields['admin_name'] = $user_info;
}else{
$sale = $this->ci->mdLichebUsers->get(['id'=>$val['sale_id']],'uname');
$fields['admin_name'] = $sale['uname'];
}
}
$lists[] = $fields;
}
}
@@ -559,6 +581,7 @@ class Ordersv2List
$fields['order_time'] = ['title' => '下定时间'];
$fields['bill_time'] = ['title' => '开票时间'];
$fields['id_card'] = ['title' => '身份证'];
$fields['admin_name'] = ['title' => '销售人员'];
}
return $fields;
}