字段调整

This commit is contained in:
2025-03-19 11:17:02 +08:00
parent 37823cc98a
commit 0dd057c9c8
2 changed files with 2 additions and 5 deletions

View File

@ -39,8 +39,6 @@ class Record extends Auth
$result = $this->_vali([
'record_id.require' => '记录ID不能为空',
'record_id.integer' => '记录ID必须是整数',
'error.require' => '巡检结果不能为空',
'error.in:0,1' => '巡检结果范围异常',
'content.require' => '记录内容不能为空',
'imgs.require' => '记录图片不能为空'
]);
@ -52,7 +50,6 @@ class Record extends Auth
$lng = $this->request->post('lng');
$record->status = 1;
$record->imgs = $result['imgs'];
$record->error = $result['error'];
$record->content = $result['content'];
$record->points()->save([
'staff_id' => $this->staff->id,

View File

@ -28,7 +28,7 @@ class Ticket extends Auth
$ticket_region = $this->request->post('ticket_region');
$ticket_address = $this->request->post('ticket_address');
$imgs = $this->request->post('imgs');
$ticket_work_use = $this->request->post('ticket_work_use');
$work_days = $this->request->post('work_days');
$data = [
'user_id' => $this->staff->id,
'type_id' => $type_id,
@ -42,7 +42,7 @@ class Ticket extends Auth
'contact_name' => $this->staff->name,
'contact_phone' => $this->staff->phone,
'status' => 0,
'work_days' => $ticket_work_use
'work_days' => $work_days
];
if (!empty($record)) {
$ticket = $record->ticket()->save($data);