This commit is contained in:
weiz 2024-01-17 18:02:29 +08:00
parent 0b109bb8f0
commit d47f792dc7

View File

@ -66,13 +66,13 @@ class ProjectSubcontractSettlementLists extends BaseAdminDataLists implements Li
->order(['id' => 'desc'])
->select()->each(function($item){
$project = Project::field('name')->where('id',$item['project_id'])->findOrEmpty();
$contract = ProcurementContract::field('supplier_id,amount,contract_no')->where('id',$item['contract_id'])->findOrEmpty();
$contract = ProcurementContract::field('supplier_id,contract_amount,contract_no')->where('id',$item['contract_id'])->findOrEmpty();
$supplier = Supplier::field('supplier_code,supplier_name')->where('id',$contract['supplier_id'])->findOrEmpty();
$admin = Admin::field('name')->where('id',$item['add_user'])->findOrEmpty();
$item['supplier_name'] = $supplier['supplier_name'];
$item['project_name'] = $project['name'];
$item['contract_code'] = $contract['contract_code'];
$item['contract_amount'] = $contract['amount'];
$item['contract_amount'] = $contract['contract_amount'];
$item['add_user_name'] = $admin['name'];
unset($item['project_id'],$item['contract_id'],$item['add_user']);
return $item;