更新细节

This commit is contained in:
yaooo 2023-12-23 17:34:59 +08:00
parent c31ef25f86
commit cffa0a3ef5
2 changed files with 8 additions and 1 deletions

View File

@ -184,11 +184,15 @@ class ExpenseReimbursementLogic extends BaseLogic
{
$expenseReimbursement = ExpenseReimbursement::findOrEmpty($params['id']);
$expenseReimbursement->detail;
foreach ($expenseReimbursement->detail as &$item) {
$item->subject;
}
$expenseReimbursement->invoice;
$expenseReimbursement->custom;
$expenseReimbursement->org;
$expenseReimbursement->dept;
$expenseReimbursement->annex = json_decode($expenseReimbursement->annex, true);
unset($item);
return $expenseReimbursement->toArray();
}
}

View File

@ -30,5 +30,8 @@ class ExpenseReimbursementDetail extends BaseModel
protected $name = 'expense_reimbursement_detail';
protected $deleteTime = 'delete_time';
public function subject()
{
return $this->belongsTo(\app\common\model\cost\CostSubject::class, 'cost_subject_id');
}
}