|
|
@@ -438,7 +438,7 @@ class ServiceOrderLogic extends BaseLogic
|
|
|
$order_info = \app\common\model\recharge\RechargeOrder::with(['order_goods'=>function ($query) {
|
|
|
$query->visible(['goods_id','goods_name','goods_image','goods_number','good_unit']);
|
|
|
},'service_work'=>function ($query) {
|
|
|
- $query->visible(['work_sn','real_name','mobile','address','service_status','appointment_time','master_worker_id','work_images','explanation','finished_images','finished_time','spare_total','service_work_spare_id','refund_approval','property_activity_id'])->append(['service_status_text','user_service_status','user_service_status_text']);
|
|
|
+ $query->visible(['id','order_effective_id','work_sn','real_name','mobile','address','service_status','appointment_time','master_worker_id','work_images','explanation','finished_images','finished_time','spare_total','service_work_spare_id','refund_approval','property_activity_id'])->append(['service_status_text','user_service_status','user_service_status_text']);
|
|
|
}])
|
|
|
->visible(['id','sn','payment_type','order_total','order_amount','paid_amount','pay_status','create_time','title','work_id'])
|
|
|
->where([
|
|
|
@@ -568,9 +568,11 @@ class ServiceOrderLogic extends BaseLogic
|
|
|
}
|
|
|
|
|
|
// 尾款报价信息
|
|
|
- $determinedPrice = ServiceWorkDeterminedPrice::where('work_id',$order_info['service_work']['id'])->findOrEmpty();
|
|
|
- if(!$determinedPrice->isEmpty()){
|
|
|
- $order_info['price_content'] = $determinedPrice->toArray()['content'];
|
|
|
+ if($order_info['service_work']['id']){
|
|
|
+ $determinedPrice = ServiceWorkDeterminedPrice::where('work_id',$order_info['service_work']['id'])->findOrEmpty();
|
|
|
+ if(!$determinedPrice->isEmpty()){
|
|
|
+ $order_info['price_content'] = $determinedPrice->toArray()['content'];
|
|
|
+ }
|
|
|
}
|
|
|
return $order_info;
|
|
|
}
|