This commit is contained in:
weiz 2024-01-08 17:32:50 +08:00
parent 8ee5046ae6
commit be796ba02b
2 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ class ProjectTotalBudgetLists extends BaseAdminDataLists implements ListsSearchI
{
return [
'=' => ['project_id'],
'%like%' => ['total_cost_code', 'project_manager'],
'%like%' => ['total_budget_code', 'project_manager'],
];
}
@ -58,7 +58,7 @@ class ProjectTotalBudgetLists extends BaseAdminDataLists implements ListsSearchI
public function lists(): array
{
return ProjectTotalBudget::where($this->searchWhere)
->field('id,project_id,total_cost_code,project_manager,budget_date,contract_amount,cl_cost,fb_cost,rg_cost,fy_cost,jj_cost,remark,budget_list')
->field('id,project_id,total_budget_code,project_manager,budget_date,contract_amount,cl_cost,fb_cost,rg_cost,fy_cost,jj_cost,remark,budget_list')
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function($data){

View File

@ -47,7 +47,7 @@ class ProjectTotalBudgetLogic extends BaseLogic
'org_id' => $params['org_id'],
'dept_id' => $params['dept_id'],
'project_id' => $params['project_id'],
'total_cost_code' => data_unique_code('项目总预算'),
'total_budget_code' => data_unique_code('项目总预算'),
'contract_amount' => $params['contract_amount'],
'cl_cost' => $params['cl_cost'] ?? 0,
'fb_cost' => $params['fb_cost'] ?? 0,
@ -129,7 +129,7 @@ class ProjectTotalBudgetLogic extends BaseLogic
*/
public static function detail($params): array
{
$data = ProjectTotalBudget::field('id,org_id,dept_id,project_id,total_cost_code,contract_amount,cl_cost,fb_cost,rg_cost,fy_cost,jj_cost,remark,budget_list,budget_date,project_manager')
$data = ProjectTotalBudget::field('id,org_id,dept_id,project_id,total_budget_code,contract_amount,cl_cost,fb_cost,rg_cost,fy_cost,jj_cost,remark,budget_list,budget_date,project_manager')
->findOrEmpty($params['id']);
$org = Orgs::field('name')->where('id',$data['org_id'])->findOrEmpty();
$dept = Dept::field('name')->where('id',$data['dept_id'])->findOrEmpty();