浏览代码

客户导出修改

moonsflyer 8 月之前
父节点
当前提交
14a3050d43
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. 8 4
      application/admin/controller/qingdong/customer/Customer.php

+ 8 - 4
application/admin/controller/qingdong/customer/Customer.php

@@ -1363,7 +1363,7 @@ class Customer extends Base
             ->where('owner_staff_id != 0 and owner_staff_id is not null')->order($sort, $order)->select();
 
         $list = collection($list)->toArray();
-        outFileLog($list,'customer','list-export');
+//        outFileLog($list,'customer','list-export');
         if (!$list) {
             $this->error('无导出数据');
         }
@@ -1380,7 +1380,7 @@ class Customer extends Base
         foreach ($dataValue as $val) {
             $title[] = $val['config']['label'];
         }
-        outFileLog($dataValue,'customer','list-export-$dataValue');
+//        outFileLog($dataValue,'customer','list-export-$dataValue');
         $data=[];
         foreach ($list as $k => $v) {
             if($v['customer_other']){//其他客户
@@ -1388,10 +1388,14 @@ class Customer extends Base
                 $other=json_decode($other,true);
                 $v = array_merge($v, $other);
             }
+            $staff_where = [];
+            $staff_where[]=['id','in',$v['owner_staff_id']];
+            $staff_list = Staff::where($staff_where)->field('name')->select()->toArray();
+            $satff_arr = array_column($staff_list,'name');
+            $staff_str = implode('/',$satff_arr);
             $field = array(
                 $v['id'],
-
-                3,
+                $staff_str,
                 $v['createtime'],
                 $v['next_time'],
                 $v['last_time'],