19626
2023-09-13 196df4d4bf1941546d349cadbf343655578ec280
force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -150,6 +150,7 @@
          LostTotalAmount__c,LostType__c,
          Report_Status__c,Sales_assistant__c,
          InclusionUltrasound__c, //20230506 lt DB202304618804  包含超声
          ModifyAfterApproval__c,Approved_Day__c,//20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 add
          Opportunity__c, Opportunity__r.Sales_assistant_ID__c,
          Opportunity__r.Sales_manager_departmentID__c,
          Manager_sales__c,recordtypeid,recordtype.DeveloperName
@@ -330,6 +331,10 @@
         report.lostReport.Lost_reason_main__c = null;
         report.lostReport.Lost_Reason_Sub__c  = null;
         report.lostReport.Lost_By_Company__c = null;
            //批准日不为空时给修改后再批准赋值
         if(LostReport.lostReport.Approved_Day__c != null){
            LostReport.lostReport.ModifyAfterApproval__c = true;
         }
         for(LostBrand tempLostBrand : report.LostBrands) {
            if(string.isNotBlank(tempLostBrand.lostBrand.Lost_By_Company__c)) {
               report.lostReport.LostTotalAmount__c += tempLostBrand.lostBrand.LostPrice__c;
@@ -484,7 +489,7 @@
   public static Map<string,Object> submit(String report1,String reportId){
      LostReport report = (LostReport)JSON.deserialize(report1, LostReport.class);
      Map<string,string> messages = new Map<string,string>();
      if(!'草案'.equals(report.lostReport.Report_Status__c) ) {
      if(!'草案'.equals(report.lostReport.Report_Status__c) && LostReport.LostReport.ModifyAfterApproval__c == false) {
         messages.put('error', '只有在草案中才能提交申请!');
         return messages;
      }