From a58f3710e0d9ea91b160a22d842e78eaad44e769 Mon Sep 17 00:00:00 2001 From: weiz Date: Wed, 10 Jan 2024 10:18:13 +0800 Subject: [PATCH] update --- app/adminapi/lists/custom/CustomServiceLists.php | 2 +- app/adminapi/logic/custom/CustomServiceLogic.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/adminapi/lists/custom/CustomServiceLists.php b/app/adminapi/lists/custom/CustomServiceLists.php index beb21775e..e6c247f71 100644 --- a/app/adminapi/lists/custom/CustomServiceLists.php +++ b/app/adminapi/lists/custom/CustomServiceLists.php @@ -64,7 +64,7 @@ class CustomServiceLists extends BaseAdminDataLists implements ListsSearchInterf $project_ids = Project::where('custom_id',$params['custom_id'])->column('id'); $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']) ->select()->each(function($item){ $item['classification'] = $item->classification_text; diff --git a/app/adminapi/logic/custom/CustomServiceLogic.php b/app/adminapi/logic/custom/CustomServiceLogic.php index 4fa298fe1..e8f62867b 100644 --- a/app/adminapi/logic/custom/CustomServiceLogic.php +++ b/app/adminapi/logic/custom/CustomServiceLogic.php @@ -51,6 +51,7 @@ class CustomServiceLogic extends BaseLogic 'dept_id' => $params['dept_id'], 'project_id' => $params['project_id'], 'contract_id' => $params['contract_id'], + 'custom_service_code' => data_unique_code('售后工单'), 'date' => strtotime($params['date']), 'classification' => $params['classification'], 'urgency' => $params['urgency'], @@ -124,7 +125,7 @@ class CustomServiceLogic extends BaseLogic */ 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']); $org = Orgs::field('name')->where('id',$data['org_id'])->findOrEmpty(); $dept = Dept::field('name')->where('id',$data['dept_id'])->findOrEmpty();