|
|
@@ -369,6 +369,7 @@ class ServiceWorkLogic extends BaseLogic
|
|
|
* @return array|false
|
|
|
*/
|
|
|
public static function detail($params){
|
|
|
+ $work_where = !empty($params['work_sn'])?['work_sn'=>$params['work_sn']]:['id'=>$params['id']];
|
|
|
$result = ServiceWork::with([
|
|
|
'worker'=> function(Query $query) {
|
|
|
$query->field('id,worker_number,real_name');
|
|
|
@@ -380,7 +381,8 @@ class ServiceWorkLogic extends BaseLogic
|
|
|
$query->field('id,work_id,opera_log,create_time');
|
|
|
}
|
|
|
])->append(['id','work_status_text','service_status_text'])
|
|
|
- ->findOrEmpty($params['id'])->toArray();
|
|
|
+ ->where($work_where)
|
|
|
+ ->findOrEmpty()->toArray();
|
|
|
|
|
|
//师傅工单按钮状态
|
|
|
$work_service_status = 0;
|