|
@@ -877,11 +877,9 @@ class ConstructionService extends Service
|
|
|
if(isset($data['construction_order_number'])) $model = DeliveryNote::where('id',$data['construction_order_number'])->where('del_time',0)->first();
|
|
|
if(empty($model)) return [false,'数据不存在!'];
|
|
|
$employee_key_list = Employee::pluck('emp_name','id')->toArray();
|
|
|
- $detail = $model;
|
|
|
- foreach ($detail as &$v){
|
|
|
- $v['install_man_title'] = $employee_key_list[$v['install_man']];
|
|
|
- $v['sale_man_title'] = $employee_key_list[$v['sale_man']];
|
|
|
- }
|
|
|
+ $detail = $model->toArray();
|
|
|
+ $detail['install_man_title'] = $employee_key_list[$detail['install_man']] ?? "";
|
|
|
+ $detail['sale_man_title'] = $employee_key_list[$detail['sale_man']] ?? "";
|
|
|
|
|
|
return [true,$detail];
|
|
|
}
|