diff --git a/app/adminapi/lists/cost_project/CostProjectLists.php b/app/adminapi/lists/cost_project/CostProjectLists.php index aa24ed37e..b1f46b67e 100644 --- a/app/adminapi/lists/cost_project/CostProjectLists.php +++ b/app/adminapi/lists/cost_project/CostProjectLists.php @@ -75,7 +75,7 @@ ->order(['id' => 'desc']) ->select() ->each(function ($res) { - $contract = MarketingContract::field('contract_name,part_a,part_b,signed_amount,create_time')->where('id', $res['contract_id'])->findOrEmpty(); + $contract = MarketingContract::field('contract_name,contract_type,part_a,part_b,signed_amount,create_time')->where('id', $res['contract_id'])->findOrEmpty(); $province = GeoProvince::field('province_name')->where('province_code', $res['province'])->findOrEmpty(); $city = GeoCity::field('city_name')->where('city_code', $res['city'])->findOrEmpty(); $dept = Dept::field('name')->where('id', $res['depar'])->findOrEmpty(); @@ -83,6 +83,7 @@ $custom = MarketingCustom::field('name')->where('id', $res['aunit'])->findOrEmpty(); $part_a = MarketingCustom::field('name')->where('id', $contract['part_a'])->findOrEmpty(); $res['contract_name'] = $contract?->contract_name; + $res['contract_type_text'] = $contract?->contract_type_text; $res['part_a_name'] = $part_a?->name; $res['part_b'] = $contract?->part_b; $res['signed_amount'] = $contract?->signed_amount; @@ -106,7 +107,7 @@ ->order(['id' => 'desc']) ->select() ->each(function ($res) { - $contract = MarketingContract::field('contract_name,part_a,part_b,signed_amount,create_time')->where('id', $res['contract_id'])->findOrEmpty(); + $contract = MarketingContract::field('contract_name,contract_type,part_a,part_b,signed_amount,create_time')->where('id', $res['contract_id'])->findOrEmpty(); $province = GeoProvince::field('province_name')->where('province_code', $res['province'])->findOrEmpty(); $city = GeoCity::field('city_name')->where('city_code', $res['city'])->findOrEmpty(); $dept = Dept::field('name')->where('id', $res['depar'])->findOrEmpty(); @@ -114,6 +115,7 @@ $custom = MarketingCustom::field('name')->where('id', $res['aunit'])->findOrEmpty(); $part_a = MarketingCustom::field('name')->where('id', $contract['part_a'])->findOrEmpty(); $res['contract_name'] = $contract?->contract_name; + $res['contract_type_text'] = $contract?->contract_type_text; $res['part_a_name'] = $part_a?->name; $res['part_b'] = $contract?->part_b; $res['signed_amount'] = $contract?->signed_amount;