update
This commit is contained in:
parent
d44e65536c
commit
cfd5b4ca6d
@ -58,7 +58,7 @@ class TaskAllocationLogic extends BaseLogic
|
||||
'task_type_id' => $taskType['id'], // 任务类别id
|
||||
'cost_project_id' => $taskType['cost_project_id'], // 项目id
|
||||
'apptime' => $params['apptime'],
|
||||
'annex' => json_encode($params['annex']),
|
||||
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||
]);
|
||||
// 任务明细
|
||||
$taskDetail = $params['task_detail'];
|
||||
@ -99,7 +99,7 @@ class TaskAllocationLogic extends BaseLogic
|
||||
'task_type_id' => $taskType['id'], // 任务类别id
|
||||
'cost_project_id' => $taskType['cost_project_id'], // 项目id
|
||||
'apptime' => $params['apptime'],
|
||||
'annex' => json_encode($params['annex']),
|
||||
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
@ -134,7 +134,6 @@ class TaskAllocationLogic extends BaseLogic
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = TaskAllocation::with(['taskTypeInfo', 'projectInfo'])->findOrEmpty($params['id'])->toArray();
|
||||
$data['annex'] = json_decode($data['annex'], true);
|
||||
$data['task_detail'] = TaskDetail::where('task_allocation_id', $data['id'])->select()->each(function ($item){
|
||||
$taskTypeInfo = TaskType::findOrEmpty($item['task_type_id'])->toArray();
|
||||
$item['task_name'] = $taskTypeInfo['name'];
|
||||
|
@ -32,6 +32,7 @@ class TaskAllocationValidate extends BaseValidate
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
@ -41,6 +42,7 @@ class TaskAllocationValidate extends BaseValidate
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
|
||||
];
|
||||
|
||||
|
||||
@ -64,7 +66,7 @@ class TaskAllocationValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
return $this->only(['id','annex']);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user