This commit is contained in:
weiz 2024-01-30 10:24:00 +08:00
parent b7de3bf876
commit 1a19a7ba24
6 changed files with 145 additions and 9 deletions

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\project;
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\project\Competitor;
@ -28,7 +29,7 @@ use app\common\model\project\Project;
* Class CompetitorLists
* @package app\adminapi\listsproject
*/
class CompetitorLists extends BaseAdminDataLists implements ListsSearchInterface
class CompetitorLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -115,5 +116,29 @@ class CompetitorLists extends BaseAdminDataLists implements ListsSearchInterface
}
return Competitor::where($this->searchWhere)->where($where)->count();
}
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' => '客户需求',
'competitor_name' => '竞争对手名称',
'competitor_contacts' => '竞争对手联系人',
'competitor_contacts_phone' => '联系人电话',
'competitive_power' => '竞争能力',
];
}
}

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\project;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\auth\Admin;
use app\common\model\custom\Custom;
use app\common\model\custom\CustomContacts;
@ -30,7 +31,7 @@ use app\common\lists\ListsSearchInterface;
* Class ProjectEstimateLists
* @package app\adminapi\listsproject
*/
class ProjectEstimateLists extends BaseAdminDataLists implements ListsSearchInterface
class ProjectEstimateLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -152,5 +153,32 @@ class ProjectEstimateLists extends BaseAdminDataLists implements ListsSearchInte
}
return ProjectEstimate::where($this->searchWhere)->where($where)->count();
}
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' => '需求',
'estimate_source_text' => '概算来源',
'create_user' => '制单人',
'quotation_date' => '报价日期',
'invoice_type_text' => '发票类型',
'technician_name' => '技术人员',
'estimate_amount' => '概算金额',
];
}
}

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\project;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\auth\Admin;
use app\common\model\custom\Custom;
use app\common\model\project\Project;
@ -28,7 +29,7 @@ use app\common\lists\ListsSearchInterface;
* Class ProjectFollowUpLists
* @package app\adminapi\listsproject
*/
class ProjectFollowUpLists extends BaseAdminDataLists implements ListsSearchInterface
class ProjectFollowUpLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -109,5 +110,33 @@ class ProjectFollowUpLists extends BaseAdminDataLists implements ListsSearchInte
}
return ProjectFollowUp::where($this->searchWhere)->where($where)->count();
}
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' => '客户名称',
'executor' => '执行人',
'follow_date' => '日期',
'follow_type_text' => '类型',
'theme' => '主题',
'project_assurance_text' => '项目把握度',
'follow_status_text' => '状态',
'follow_stage_text' => '阶段',
'next_follow_up_date' => '下次回访日期',
];
}
}

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\project;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\custom\Custom;
use app\common\model\dept\Dept;
use app\common\model\dept\Orgs;
@ -29,7 +30,7 @@ use app\common\model\project\ProjectTypeSet;
* Class ProjectLists
* @package app\adminapi\listsproject
*/
class ProjectLists extends BaseAdminDataLists implements ListsSearchInterface
class ProjectLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -95,8 +96,7 @@ class ProjectLists extends BaseAdminDataLists implements ListsSearchInterface
})
->toArray();
}
/**
* @notes 获取数量
* @return int
@ -113,5 +113,35 @@ class ProjectLists extends BaseAdminDataLists implements ListsSearchInterface
}
return Project::where($this->searchWhere)->where($condition)->count();
}
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_code' => '项目编码',
'name' => '项目名称',
'status' => '项目状态',
'project_address' => '项目所在地',
'project_type' => '项目类型',
'strategic_significance' => '战略意义',
'industry' => '所属行业',
'unit_nature' => '单位性质',
'bidding_method' => '招标方式',
'information_sources' => '信息来源',
'person' => '负责人',
];
}
}

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\project;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\auth\Admin;
use app\common\model\custom\Custom;
use app\common\model\project\Project;
@ -28,7 +29,7 @@ use app\common\lists\ListsSearchInterface;
* Class ProjectPreSalesMembersLists
* @package app\adminapi\listsproject
*/
class ProjectPreSalesMembersLists extends BaseAdminDataLists implements ListsSearchInterface
class ProjectPreSalesMembersLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -112,5 +113,28 @@ class ProjectPreSalesMembersLists extends BaseAdminDataLists implements ListsSea
}
return ProjectPreSalesMembers::where($this->searchWhere)->where($where)->count();
}
public function setFileName(): string
{
return '售前成员列表';
}
/**
* @notes 导出字段
* @return string[]
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setExcelFields(): array
{
return [
'id' => 'id',
'project_name' => '项目名称',
'technician' => '技术人员',
'business_people' => '商务人员',
'cross_departmental_personnel' => '跨部门人员',
'add_user' => '添加人',
];
}
}

View File

@ -34,7 +34,7 @@ class Project extends BaseModel
public function getStatusTextAttr($value,$data)
{
$dictData = DictData::where('type_value','project_status')->column('name','value');
return !empty($data['status']) ? $dictData[$data['status']] : '';
return $dictData[$data['status']];
}
public function getProjectContentTextAttr($value,$data)