update
This commit is contained in:
parent
6c82588e34
commit
8b2c3127c3
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user