From 45e4876c811c861adc5744d06b5bba840fae397a Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期四, 29 六月 2023 17:59:09 +0800
Subject: [PATCH] 优化失单画面以及修改按钮
---
force-app/main/default/classes/lexPCLLostReportLwcController.cls | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/lexPCLLostReportLwcController.cls b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
index 9ec6918..fb16ace 100644
--- a/force-app/main/default/classes/lexPCLLostReportLwcController.cls
+++ b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -434,6 +434,22 @@
objs.put('Id', reportId);
objs.put('pageStatus', 'View');
objs.put('submitFlag', '1');
+ ProcessInstance pro = [
+ SELECT
+ ProcessDefinition.Name,
+ (
+ SELECT StepStatus,
+ Comments,
+ CreatedDate,
+ Actor.Name,
+ OriginalActor.Name,
+ ProcessNode.Name FROM StepsAndWorkitems order by IsPending DESC, CreatedDate DESC
+ )
+ FROM ProcessInstance where TargetObjectId =:reportId order by CreatedDate DESC
+ ];
+ List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>();
+ items.addall(pro.StepsAndWorkitems);
+ objs.put('approvalHistorys',items);
return objs;
}catch(exception ex) {
Database.rollback(sp);
@@ -454,6 +470,17 @@
return lostBrand;
}
+ @AuraEnabled
+ public static PCLLostProducts getNewLostProduct(Integer lineNo2){
+ PCLLostProducts pro = null;
+ try {
+ pro = new PCLLostProducts(lineNo2);
+ } catch (Exception e) {
+ System.debug(e.getMessage());
+ }
+ return pro;
+ }
+
// update tcm 20211125 娣诲姞鍨嬪彿鏃惰嚜鍔ㄥ甫鍑哄搧鐗� end
// 椤甸潰鐨勬暟鎹粨鏋�
public class LostReport {
@@ -461,17 +488,22 @@
public Lost_cancel_report__c lostReport { get; set; }
@AuraEnabled
public list<LostBrand> LostBrands { get; set; }
+ @AuraEnabled
+ public list<ProcessInstanceHistory> approvalHistorys { get; set; }
public LostReport(){
lostReport = new Lost_cancel_report__c();
LostBrands = new list<LostBrand> {new LostBrand(0)};
+ approvalHistorys = new list<ProcessInstanceHistory>();
}
public LostReport(Lost_cancel_report__c lostReport){
this.lostReport = lostReport;
LostBrands = new list<LostBrand> {new LostBrand(0)};
+ approvalHistorys = new list<ProcessInstanceHistory>();
}
public LostReport(Lost_cancel_report__c lostReport, list<LostBrand> LostBrands){
this.lostReport = lostReport;
this.LostBrands = LostBrands;
+ approvalHistorys = new list<ProcessInstanceHistory>();
}
}
--
Gitblit v1.9.1