update
This commit is contained in:
parent
4aa0d392ef
commit
7225206303
@ -11,128 +11,128 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\cost_project;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\lists\ListsExcelInterface;
|
||||
use app\common\model\cost_project\CostApprovedProject;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 待立项造价项目列表
|
||||
* Class CostApprovedProjectLists
|
||||
* @package app\adminapi\listscost_project
|
||||
*/
|
||||
class CostApprovedProjectLists extends BaseAdminDataLists implements ListsSearchInterface, ListsExcelInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/20 14:16
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['business_nature', 'industry_nature', 'fund_sources', 'const_area'],
|
||||
'%like%' => ['contract_name', 'contract_num', 'part_a', 'part_b'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取待立项造价项目列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/20 14:16
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return CostApprovedProject::where($this->searchWhere)
|
||||
->where('status', 1)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function ($data) {
|
||||
$data['business_nature_text'] = $data->business_nature_text;
|
||||
$data['industry_nature_text'] = $data->industry_nature_text;
|
||||
$data['fund_sources_text'] = $data->fund_sources_text;
|
||||
$data['const_area_text'] = $data->const_area_text;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取待立项造价项目数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/20 14:16
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return CostApprovedProject::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
public function setFileName(): string
|
||||
{
|
||||
return '待立项造价合同';
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 导出字段
|
||||
* @return string[]
|
||||
* @author 段誉
|
||||
* @date 2022/11/24 16:17
|
||||
*/
|
||||
public function setExcelFields(): array
|
||||
{
|
||||
return [
|
||||
'id' => 'id',
|
||||
'contract_name' => '合同名称',
|
||||
'contract_num' => '合同编号',
|
||||
'part_a' => '甲方签约单位',
|
||||
'part_a_contract' => '甲方联系人',
|
||||
'part_a_address' => '业主地址',
|
||||
'part_b' => '乙方签约',
|
||||
'part_b_signatory' => '乙方签约人',
|
||||
'business_nature' => '业务性质',
|
||||
'fund_sources' => '资金来源',
|
||||
'const_area' => '建设区域',
|
||||
'project_money' => '工程总投资',
|
||||
'project_scale' => '工程规模及概况',
|
||||
'money' => '签订金额(元)',
|
||||
'rate' => '合同签订费率(%)',
|
||||
'contract_service' => '合同服务工期',
|
||||
'start_date' => '合同计划开始日期',
|
||||
'end_date' => '合同计划结束日期',
|
||||
'performance' => '合同履约金(元)',
|
||||
'due_time' => '履约金到期时间',
|
||||
'payment' => '合同付款方式',
|
||||
'content' => '合同主要内容',
|
||||
'founder' => '创建人',
|
||||
'create_date' => '创建日期',
|
||||
'dept' => '签订部门',
|
||||
'signing_person' => '签订负责人',
|
||||
'regulators' => '监管部门',
|
||||
'project_director' => '项目总监/经理',
|
||||
'way' => '实施方式',
|
||||
'seal_name' => '盖章名称',
|
||||
'limit' => '是否限制',
|
||||
'limit_num' => '限制次数',
|
||||
'file_type' => '文件类',
|
||||
'seal_num' => '盖章份数',
|
||||
'sealer' => '盖章人',
|
||||
'plance_seal' => '骑缝盖章',
|
||||
'send_date' => '发出日期',
|
||||
'number' => '邮寄编号',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
namespace app\adminapi\lists\cost_project;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\lists\ListsExcelInterface;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\cost_project\CostApprovedProject;
|
||||
|
||||
|
||||
/**
|
||||
* 待立项造价项目列表
|
||||
* Class CostApprovedProjectLists
|
||||
* @package app\adminapi\listscost_project
|
||||
*/
|
||||
class CostApprovedProjectLists extends BaseAdminDataLists implements ListsSearchInterface, ListsExcelInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/20 14:16
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['business_nature', 'industry_nature', 'fund_sources', 'const_area', 'status'],
|
||||
'%like%' => ['contract_name', 'contract_num', 'part_a', 'part_b'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取待立项造价项目列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/20 14:16
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return CostApprovedProject::where($this->searchWhere)
|
||||
->where('status', 1)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function ($data) {
|
||||
$data['business_nature_text'] = $data->business_nature_text;
|
||||
$data['industry_nature_text'] = $data->industry_nature_text;
|
||||
$data['fund_sources_text'] = $data->fund_sources_text;
|
||||
$data['const_area_text'] = $data->const_area_text;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取待立项造价项目数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/20 14:16
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return CostApprovedProject::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
public function setFileName(): string
|
||||
{
|
||||
return '待立项造价合同';
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 导出字段
|
||||
* @return string[]
|
||||
* @author 段誉
|
||||
* @date 2022/11/24 16:17
|
||||
*/
|
||||
public function setExcelFields(): array
|
||||
{
|
||||
return [
|
||||
'id' => 'id',
|
||||
'contract_name' => '合同名称',
|
||||
'contract_num' => '合同编号',
|
||||
'part_a' => '甲方签约单位',
|
||||
'part_a_contract' => '甲方联系人',
|
||||
'part_a_address' => '业主地址',
|
||||
'part_b' => '乙方签约',
|
||||
'part_b_signatory' => '乙方签约人',
|
||||
'business_nature' => '业务性质',
|
||||
'fund_sources' => '资金来源',
|
||||
'const_area' => '建设区域',
|
||||
'project_money' => '工程总投资',
|
||||
'project_scale' => '工程规模及概况',
|
||||
'money' => '签订金额(元)',
|
||||
'rate' => '合同签订费率(%)',
|
||||
'contract_service' => '合同服务工期',
|
||||
'start_date' => '合同计划开始日期',
|
||||
'end_date' => '合同计划结束日期',
|
||||
'performance' => '合同履约金(元)',
|
||||
'due_time' => '履约金到期时间',
|
||||
'payment' => '合同付款方式',
|
||||
'content' => '合同主要内容',
|
||||
'founder' => '创建人',
|
||||
'create_date' => '创建日期',
|
||||
'dept' => '签订部门',
|
||||
'signing_person' => '签订负责人',
|
||||
'regulators' => '监管部门',
|
||||
'project_director' => '项目总监/经理',
|
||||
'way' => '实施方式',
|
||||
'seal_name' => '盖章名称',
|
||||
'limit' => '是否限制',
|
||||
'limit_num' => '限制次数',
|
||||
'file_type' => '文件类',
|
||||
'seal_num' => '盖章份数',
|
||||
'sealer' => '盖章人',
|
||||
'plance_seal' => '骑缝盖章',
|
||||
'send_date' => '发出日期',
|
||||
'number' => '邮寄编号',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user