|
|
@@ -272,7 +272,7 @@ class CustomerSupplyService extends Service
|
|
|
$data['data'][$key]['crt_time'] = $value['crt_time'] ? date('Y-m-d H:i:s',$value['crt_time']) : '';
|
|
|
$data['data'][$key]['crt_name'] = $emp[$value['crt_id']] ?? '';
|
|
|
$data['data'][$key]['type_title'] = CustomerSupply::$type_name[$value['type']] ?? '';
|
|
|
- $data['data'][$key]['status_title'] = CustomerSupply::$status_name[$data['status']] ?? '';
|
|
|
+ $data['data'][$key]['status_title'] = CustomerSupply::$status_name[$value['status']] ?? '';
|
|
|
$e = $emp_2[$value['id']] ?? [];
|
|
|
$data['data'][$key]['organization_title'] = $e['organization_title'] ?? "";
|
|
|
}
|
|
|
@@ -289,17 +289,17 @@ class CustomerSupplyService extends Service
|
|
|
->get()->toArray();
|
|
|
if(! $type) return array_column($result,'title','id');
|
|
|
|
|
|
- $details = CustomerSupplyDetails::from('customer_supply_details as b')
|
|
|
+ $details = CustomerSupplyDetails::from('customer_supply_details as a')
|
|
|
->leftJoin('organization as b','b.id','a.organization_id')
|
|
|
->where('a.del_time',0)
|
|
|
->whereIn('a.customer_supply_id',$employee_ids)
|
|
|
- ->select('a.organization_id','a.title','a.customer_supply_id')
|
|
|
+ ->select('a.organization_id','b.title','a.customer_supply_id')
|
|
|
->get()->toArray();
|
|
|
$details_map = [];
|
|
|
foreach ($details as $value){
|
|
|
$details_map[$value['customer_supply_id']][] = [
|
|
|
'organization_id' => $value['organization_id'],
|
|
|
- 'organization_title' => $value['organization_title'],
|
|
|
+ 'organization_title' => $value['title'],
|
|
|
];
|
|
|
}
|
|
|
foreach ($result as $key => $value){
|