This commit is contained in:
weiz 2024-04-16 11:32:28 +08:00
parent 4572a12d21
commit b7a0fd3cd3
3 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@
->order(['id' => 'desc'])
->select()->each(function ($data) {
$contract = MarketingContract::field('contract_name,part_a,create_time,signed_amount,contract_type')->where('id', $data['contract_id'])->findOrEmpty();
$custom = MarketingCustom::field('name')->where('id', $data['part_a'])->findOrEmpty();
$custom = MarketingCustom::field('name')->where('id', $contract['part_a'])->findOrEmpty();
$data['contract_name'] = $contract['contract_name'];
$data['part_a'] = $custom['name'];
$data['create_date'] = $contract['create_time'];

View File

@ -156,7 +156,7 @@
{
$data = FinancialBudgetDoc::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
$contract = MarketingContract::field('contract_name,part_a,create_time,signed_amount,contract_type')->where('id', $data['contract_id'])->findOrEmpty();
$custom = MarketingCustom::field('name')->where('id', $data['part_a'])->findOrEmpty();
$custom = MarketingCustom::field('name')->where('id', $contract['part_a'])->findOrEmpty();
$data['contract_name'] = $contract['contract_name'];
$data['part_a'] = $custom['name'];
$data['create_date'] = $contract['create_time'];

View File

@ -157,7 +157,7 @@
$data = FinancialDepartmentIncomeSettlement::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
$budget_doc = FinancialBudgetDoc::field('contract_id,code,name,issue_date')->where('id', $data['budget_doc_id'])->findOrEmpty();
$contract = MarketingContract::field('contract_name,part_a,create_time,signed_amount,contract_type')->where('id', $budget_doc['contract_id'])->findOrEmpty();
$custom = MarketingCustom::field('name')->where('id', $data['part_a'])->findOrEmpty();
$custom = MarketingCustom::field('name')->where('id', $contract['part_a'])->findOrEmpty();
$data['code'] = $budget_doc['code'];
$data['name'] = $budget_doc['name'];
$data['issue_date'] = $budget_doc['issue_date'];