This commit is contained in:
weiz 2024-01-30 09:53:56 +08:00
parent 7c3e86d10e
commit b7de3bf876
6 changed files with 220 additions and 10 deletions

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\custom;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\custom\Custom;
use app\common\model\custom\CustomContacts;
use app\common\lists\ListsSearchInterface;
@ -28,7 +29,7 @@ use app\common\model\dept\Orgs;
* Class CustomContactsLists
* @package app\adminapi\listscustom
*/
class CustomContactsLists extends BaseAdminDataLists implements ListsSearchInterface
class CustomContactsLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -97,5 +98,38 @@ class CustomContactsLists extends BaseAdminDataLists implements ListsSearchInter
}
return CustomContacts::where($this->searchWhere)->where($where)->count();
}
/**
* @notes 导出文件名
* @return string
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setFileName(): string
{
return '客户联系人列表';
}
/**
* @notes 导出字段
* @return string[]
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setExcelFields(): array
{
return [
'id' => 'id',
'org_name' => '组织',
'dept_name' => '部门',
'custom_name' => '客户名称',
'name' => '姓名',
'position' => '职务',
'phone' => '手机',
'telephone' => '电话',
'email' => '邮箱',
'notes' => '备注',
];
}
}

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\custom;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\lists\ListsSearchInterface;
use app\common\model\auth\Admin;
use app\common\model\custom\Custom;
@ -27,7 +28,7 @@ use app\common\model\custom\CustomFollow;
* Class CustomFollowLists
* @package app\adminapi\listscustom_follow
*/
class CustomFollowLists extends BaseAdminDataLists implements ListsSearchInterface
class CustomFollowLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -67,7 +68,7 @@ class CustomFollowLists extends BaseAdminDataLists implements ListsSearchInterfa
$custom_ids = Custom::where('custom_name','like','%'.$params['contacts'].'%')->column('id');
$where[] = ['custom_id','in',$custom_ids];
}
return CustomFollow::field('id,custom_id,name,date,types,executor,description,coordinate,next_follow_date,add_user,update_user,create_time,update_time')
return CustomFollow::field('id,custom_id,name,date,types,executor,description,annex,coordinate,next_follow_date,add_user,update_user,create_time,update_time')
->where($this->searchWhere)->where($where)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
@ -105,5 +106,40 @@ class CustomFollowLists extends BaseAdminDataLists implements ListsSearchInterfa
}
return CustomFollow::where($this->searchWhere)->where($where)->count();
}
/**
* @notes 导出文件名
* @return string
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setFileName(): string
{
return '客户跟进记录列表';
}
/**
* @notes 导出字段
* @return string[]
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setExcelFields(): array
{
return [
'id' => 'id',
'name' => '跟进主题',
'custom_name' => '客户名称',
'custom_master_name' => '联系人',
'date' => '日期',
'types' => '类型',
'executor' => '执行人',
'description' => '行动描述',
'annex' => '附件/现场照片',
'coordinate' => '位置',
'next_follow_date' => '下次回访日期',
];
}
}

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\custom;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\lists\ListsSearchInterface;
use app\common\model\auth\Admin;
use app\common\model\custom\Custom;
@ -29,7 +30,7 @@ use app\common\model\GeoProvince;
* Class CustomLists
* @package app\adminapi\listscustom
*/
class CustomLists extends BaseAdminDataLists implements ListsSearchInterface
class CustomLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -93,5 +94,40 @@ class CustomLists extends BaseAdminDataLists implements ListsSearchInterface
{
return Custom::where($this->searchWhere)->count();
}
/**
* @notes 导出文件名
* @return string
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setFileName(): string
{
return '客户列表';
}
/**
* @notes 导出字段
* @return string[]
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setExcelFields(): array
{
return [
'id' => 'id',
'name' => '客户名称',
'custom_type' => '客户属性',
'province_name' => '所在省',
'master_name' => '负责人姓名',
'master_position' => '负责人职务',
'master_telephone' => '负责人电话',
'master_phone' => '负责人手机',
'follow_total' => '跟进记录',
'last_follow_date' => '最后跟进',
'next_follow_date' => '下次回访日期',
'create_time' => '创建时间',
];
}
}

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\custom;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\lists\ListsSearchInterface;
use app\common\model\auth\Admin;
use app\common\model\contract\Contract;
@ -28,7 +29,7 @@ use app\common\model\project\Project;
* Class CustomServiceLists
* @package app\adminapi\listscustom_service
*/
class CustomServiceLists extends BaseAdminDataLists implements ListsSearchInterface
class CustomServiceLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -100,7 +101,6 @@ class CustomServiceLists extends BaseAdminDataLists implements ListsSearchInterf
->toArray();
}
/**
* @notes 获取数量
* @return int
@ -130,5 +130,44 @@ class CustomServiceLists extends BaseAdminDataLists implements ListsSearchInterf
}
return CustomService::where($this->searchWhere)->where($where)->count();
}
/**
* @notes 导出文件名
* @return string
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setFileName(): string
{
return '售后工单列表';
}
/**
* @notes 导出字段
* @return string[]
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setExcelFields(): array
{
return [
'id' => 'id',
'custom_name' => '客户名称',
'project_name' => '项目名称',
'project_code' => '项目编码',
'contract_code' => '合同编号',
'name' => '投诉主题',
'date' => '日期',
'receiver' => '接待人',
'classification' => '分类',
'custom_master_name' => '投诉人',
'custom_master_phone' => '联系电话',
'processing_result' => '处理结果',
'urgency' => '紧急程度',
'processed_user' => '指定处理人',
'is_solve_text' => '问题是否解决',
'done_date' => '完成日期',
'score' => '评分',
];
}
}

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\custom;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\custom\Custom;
use app\common\model\custom\CustomerDemand;
use app\common\lists\ListsSearchInterface;
@ -29,7 +30,7 @@ use app\common\model\project\Project;
* Class CustomerDemandLists
* @package app\adminapi\listscustom
*/
class CustomerDemandLists extends BaseAdminDataLists implements ListsSearchInterface
class CustomerDemandLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -107,5 +108,37 @@ class CustomerDemandLists extends BaseAdminDataLists implements ListsSearchInter
}
return CustomerDemand::where($this->searchWhere)->where($where)->count();
}
/**
* @notes 导出文件名
* @return string
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setFileName(): string
{
return '客户需求列表';
}
/**
* @notes 导出字段
* @return string[]
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setExcelFields(): array
{
return [
'id' => 'id',
'project_name' => '项目名称',
'custom_name' => '客户名称',
'theme' => '需求主题',
'supplier' => '需求提供人',
'supplier_contacts' => '提供人联系方式',
'importance_text' => '重要程度',
'recording_time' => '记录时间',
'demand_content' => '需求内容',
];
}
}

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\custom;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\custom\Custom;
use app\common\model\custom\CustomerDemand;
use app\common\model\custom\CustomerDemandSolution;
@ -28,7 +29,7 @@ use app\common\model\project\Project;
* Class CustomerDemandSolutionLists
* @package app\adminapi\listscustom
*/
class CustomerDemandSolutionLists extends BaseAdminDataLists implements ListsSearchInterface
class CustomerDemandSolutionLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -115,5 +116,36 @@ class CustomerDemandSolutionLists extends BaseAdminDataLists implements ListsSea
}
return CustomerDemandSolution::where($this->searchWhere)->where($where)->count();
}
/**
* @notes 导出文件名
* @return string
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setFileName(): string
{
return '解决方案列表';
}
/**
* @notes 导出字段
* @return string[]
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setExcelFields(): array
{
return [
'id' => 'id',
'project_name' => '项目名称',
'custom_name' => '客户名称',
'customer_demand_name' => '需求名称',
'theme' => '解决方案主题',
'submission_time' => '提交时间',
'solution_content' => '方案内容',
'customer_feedback' => '客户反馈',
'annex' => '附件',
];
}
}