update
This commit is contained in:
parent
5916949a3f
commit
a58f3710e0
@ -64,7 +64,7 @@ class CustomServiceLists extends BaseAdminDataLists implements ListsSearchInterf
|
|||||||
$project_ids = Project::where('custom_id',$params['custom_id'])->column('id');
|
$project_ids = Project::where('custom_id',$params['custom_id'])->column('id');
|
||||||
$where[] = ['project_id','in',$project_ids];
|
$where[] = ['project_id','in',$project_ids];
|
||||||
}
|
}
|
||||||
return CustomService::field('id,project_id,contract_id,name,receiver,date,classification,processing_result,urgency,processed_user,is_solve,done_date,score')
|
return CustomService::field('id,project_id,contract_id,custom_service_code,name,receiver,date,classification,processing_result,urgency,processed_user,is_solve,done_date,score')
|
||||||
->where($this->searchWhere)->where($where)->limit($this->limitOffset, $this->limitLength)->order(['id' => 'desc'])
|
->where($this->searchWhere)->where($where)->limit($this->limitOffset, $this->limitLength)->order(['id' => 'desc'])
|
||||||
->select()->each(function($item){
|
->select()->each(function($item){
|
||||||
$item['classification'] = $item->classification_text;
|
$item['classification'] = $item->classification_text;
|
||||||
|
@ -51,6 +51,7 @@ class CustomServiceLogic extends BaseLogic
|
|||||||
'dept_id' => $params['dept_id'],
|
'dept_id' => $params['dept_id'],
|
||||||
'project_id' => $params['project_id'],
|
'project_id' => $params['project_id'],
|
||||||
'contract_id' => $params['contract_id'],
|
'contract_id' => $params['contract_id'],
|
||||||
|
'custom_service_code' => data_unique_code('售后工单'),
|
||||||
'date' => strtotime($params['date']),
|
'date' => strtotime($params['date']),
|
||||||
'classification' => $params['classification'],
|
'classification' => $params['classification'],
|
||||||
'urgency' => $params['urgency'],
|
'urgency' => $params['urgency'],
|
||||||
@ -124,7 +125,7 @@ class CustomServiceLogic extends BaseLogic
|
|||||||
*/
|
*/
|
||||||
public static function detail($params): array
|
public static function detail($params): array
|
||||||
{
|
{
|
||||||
$field = 'id,org_id,dept_id,project_id,contract_id,date,classification,urgency,receiver,processed_user,name,description,notes,annex,processing_result,processing_process,processing_hours,done_date,score,is_solve,feedback';
|
$field = 'id,org_id,dept_id,project_id,contract_id,custom_service_code,date,classification,urgency,receiver,processed_user,name,description,notes,annex,processing_result,processing_process,processing_hours,done_date,score,is_solve,feedback';
|
||||||
$data = CustomService::field($field)->findOrEmpty($params['id']);
|
$data = CustomService::field($field)->findOrEmpty($params['id']);
|
||||||
$org = Orgs::field('name')->where('id',$data['org_id'])->findOrEmpty();
|
$org = Orgs::field('name')->where('id',$data['org_id'])->findOrEmpty();
|
||||||
$dept = Dept::field('name')->where('id',$data['dept_id'])->findOrEmpty();
|
$dept = Dept::field('name')->where('id',$data['dept_id'])->findOrEmpty();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user