|
@@ -170,9 +170,9 @@ class ServiceWorkLogic extends BaseLogic
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//验证更改的预约时间必须是在领单时间内的半小内修改,否则不允许修改
|
|
//验证更改的预约时间必须是在领单时间内的半小内修改,否则不允许修改
|
|
|
- if(strtotime($work->appointment_time) != strtotime($params['appointment_time']) && (time()-strtotime($work->receive_time))>1800){
|
|
|
|
|
- throw new Exception('距离领单时间已超过半小时,无法修改预约时间,请联系客服');
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if(strtotime($work->appointment_time) != strtotime($params['appointment_time']) && (time()-strtotime($work->receive_time))>1800){
|
|
|
|
|
+ // throw new Exception('距离领单时间已超过半小时,无法修改预约时间,请联系客服');
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
//添加预约时间修改待审核记录
|
|
//添加预约时间修改待审核记录
|
|
|
ServiceWorkAppointmentLog::create([
|
|
ServiceWorkAppointmentLog::create([
|
|
@@ -756,7 +756,6 @@ class ServiceWorkLogic extends BaseLogic
|
|
|
if ($result['appointment_log']){
|
|
if ($result['appointment_log']){
|
|
|
$result['appointment_log']['last_appointment_time'] = date('Y/m/d H:i:s',$result['appointment_log']['last_appointment_time']);
|
|
$result['appointment_log']['last_appointment_time'] = date('Y/m/d H:i:s',$result['appointment_log']['last_appointment_time']);
|
|
|
$result['appointment_log']['this_appointment_time'] = date('Y/m/d H:i:s',$result['appointment_log']['this_appointment_time']);
|
|
$result['appointment_log']['this_appointment_time'] = date('Y/m/d H:i:s',$result['appointment_log']['this_appointment_time']);
|
|
|
- //$result['appointment_log']['create_time'] = date('Y/m/d H:i:s',$result['appointment_log']['create_time']);
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return $result;
|
|
return $result;
|
|
@@ -1339,7 +1338,7 @@ class ServiceWorkLogic extends BaseLogic
|
|
|
throw new \Exception('审核记录不存在');
|
|
throw new \Exception('审核记录不存在');
|
|
|
}
|
|
}
|
|
|
$master = MasterWorker::where('id',$log->worker_id)->findOrEmpty();
|
|
$master = MasterWorker::where('id',$log->worker_id)->findOrEmpty();
|
|
|
- Db::commit();
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
$log->status = $params['status'];
|
|
$log->status = $params['status'];
|
|
|
$log->remark = $params['remark'];
|
|
$log->remark = $params['remark'];
|
|
@@ -1347,7 +1346,7 @@ class ServiceWorkLogic extends BaseLogic
|
|
|
|
|
|
|
|
//预约时间修改审核通过则更新工单预约时间
|
|
//预约时间修改审核通过则更新工单预约时间
|
|
|
if ($params['status'] == 1) {
|
|
if ($params['status'] == 1) {
|
|
|
- $work->work_status = 3;//待上门
|
|
|
|
|
|
|
+ //$work->work_status = 3;//待上门
|
|
|
$work->appointment_time = $log->this_appointment_time;
|
|
$work->appointment_time = $log->this_appointment_time;
|
|
|
$work->save();
|
|
$work->save();
|
|
|
|
|
|
|
@@ -1355,10 +1354,11 @@ class ServiceWorkLogic extends BaseLogic
|
|
|
$work_log = [
|
|
$work_log = [
|
|
|
'work_id'=>$work->id,
|
|
'work_id'=>$work->id,
|
|
|
'master_worker_id'=>$log->worker_id,
|
|
'master_worker_id'=>$log->worker_id,
|
|
|
- 'opera_log'=>'编号['.$master->worker_number.']'.$master->real_name.'于'.date('y-m-d H:i:s',time()).'联系了客户,确认了于'.date('Y-m-d H:i:s',$log->this_appointment_time).'预约上门',
|
|
|
|
|
|
|
+ 'opera_log'=>'编号['.$master->worker_number.']'.$master->real_name.'于'.$log->create_time.'联系了客户,确认了于'.date('Y-m-d H:i:s',$log->this_appointment_time).'预约上门',
|
|
|
];
|
|
];
|
|
|
ServiceWorkLogLogic::add($work_log);
|
|
ServiceWorkLogLogic::add($work_log);
|
|
|
}
|
|
}
|
|
|
|
|
+ Db::commit();
|
|
|
return true;
|
|
return true;
|
|
|
} catch (\Exception $e) {
|
|
} catch (\Exception $e) {
|
|
|
Db::rollback();
|
|
Db::rollback();
|