You've already forked guangan
字段调整
This commit is contained in:
@ -39,8 +39,6 @@ class Record extends Auth
|
|||||||
$result = $this->_vali([
|
$result = $this->_vali([
|
||||||
'record_id.require' => '记录ID不能为空',
|
'record_id.require' => '记录ID不能为空',
|
||||||
'record_id.integer' => '记录ID必须是整数',
|
'record_id.integer' => '记录ID必须是整数',
|
||||||
'error.require' => '巡检结果不能为空',
|
|
||||||
'error.in:0,1' => '巡检结果范围异常',
|
|
||||||
'content.require' => '记录内容不能为空',
|
'content.require' => '记录内容不能为空',
|
||||||
'imgs.require' => '记录图片不能为空'
|
'imgs.require' => '记录图片不能为空'
|
||||||
]);
|
]);
|
||||||
@ -52,7 +50,6 @@ class Record extends Auth
|
|||||||
$lng = $this->request->post('lng');
|
$lng = $this->request->post('lng');
|
||||||
$record->status = 1;
|
$record->status = 1;
|
||||||
$record->imgs = $result['imgs'];
|
$record->imgs = $result['imgs'];
|
||||||
$record->error = $result['error'];
|
|
||||||
$record->content = $result['content'];
|
$record->content = $result['content'];
|
||||||
$record->points()->save([
|
$record->points()->save([
|
||||||
'staff_id' => $this->staff->id,
|
'staff_id' => $this->staff->id,
|
||||||
|
@ -28,7 +28,7 @@ class Ticket extends Auth
|
|||||||
$ticket_region = $this->request->post('ticket_region');
|
$ticket_region = $this->request->post('ticket_region');
|
||||||
$ticket_address = $this->request->post('ticket_address');
|
$ticket_address = $this->request->post('ticket_address');
|
||||||
$imgs = $this->request->post('imgs');
|
$imgs = $this->request->post('imgs');
|
||||||
$ticket_work_use = $this->request->post('ticket_work_use');
|
$work_days = $this->request->post('work_days');
|
||||||
$data = [
|
$data = [
|
||||||
'user_id' => $this->staff->id,
|
'user_id' => $this->staff->id,
|
||||||
'type_id' => $type_id,
|
'type_id' => $type_id,
|
||||||
@ -42,7 +42,7 @@ class Ticket extends Auth
|
|||||||
'contact_name' => $this->staff->name,
|
'contact_name' => $this->staff->name,
|
||||||
'contact_phone' => $this->staff->phone,
|
'contact_phone' => $this->staff->phone,
|
||||||
'status' => 0,
|
'status' => 0,
|
||||||
'work_days' => $ticket_work_use
|
'work_days' => $work_days
|
||||||
];
|
];
|
||||||
if (!empty($record)) {
|
if (!empty($record)) {
|
||||||
$ticket = $record->ticket()->save($data);
|
$ticket = $record->ticket()->save($data);
|
||||||
|
Reference in New Issue
Block a user