| | |
| | | private static void createAssetData() { |
| | | // OLY_OCM-643 追加EscapeNFM001Trigger |
| | | ControllerUtil.EscapeNFM001Trigger = true; |
| | | TestDataUtility.CreatePIPolicyConfiguration(); |
| | | StaticParameter.EscapeVMCTrigger = true; |
| | | // 省 |
| | | Address_Level__c al = new Address_Level__c(); |
| | | al.Name = '東京'; |
| | |
| | | public Integer consumApplySetDetailListSize { get; set; } // 耗材备品总数量 |
| | | public String errorMsg { get; set; } // 错误信息 |
| | | |
| | | public string staticResource { get; private set; } |
| | | public string staticResourceCon { get; private set; } |
| | | public string staticResourceFile { get; private set; } |
| | | //public string staticResource { get; private set; } |
| | | //public string staticResourceCon { get; private set; } |
| | | //public string staticResourceFile { get; private set; } |
| | | public string BRSrc{get;private set;} |
| | | public string QRSrc{get;private set;} |
| | | |
| | |
| | | throw new ControllerUtil.myException('参数错误:请指定Id。'); |
| | | } |
| | | pdfPageList = new List<PdfPageClass>(); |
| | | staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Consum_Apply_Equipment_Set_Detail__c')); |
| | | staticResourceCon = JSON.serialize(PIHelper.getPIIntegrationInfo('Consum_Apply__c')); |
| | | staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document')); |
| | | //staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Consum_Apply_Equipment_Set_Detail__c')); |
| | | //staticResourceCon = JSON.serialize(PIHelper.getPIIntegrationInfo('Consum_Apply__c')); |
| | | //staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document')); |
| | | } |
| | | |
| | | /** |
| | |
| | | , Post_Code__c // 邮编 |
| | | , Loaner_received_staff__c // 接收人姓名 |
| | | , Loaner_received_staff_phone__c // 接收人电话 |
| | | ,AWS_Data_Id__c |
| | | //,AWS_Data_Id__c //deloitte-zhj 20231010 PIPL还原 |
| | | FROM Consum_Apply__c |
| | | WHERE Id = :targetConsumApplyId |
| | | ]; |
| | |
| | | , Follower_User__r.Name |
| | | , Spare__c // 备用 |
| | | , Comment__c // 备注 |
| | | , AWS_Data_Id__c |
| | | //, AWS_Data_Id__c //deloitte-zhj 20231010 PIPL还原 |
| | | , ManagementCode__c // 管理编码 yc 耗材追溯 |
| | | , EquipmentManagementCode__c // 备品管理码 yc 耗材追溯 |
| | | FROM Consum_Apply_Equipment_Set_Detail__c |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public static string GetImageBase64(string id){ |
| | | List<ContentVersion> version = [select VersionData from ContentVersion where Id =: id]; |
| | | // List<Attachment> atts = [SELECT Id, IsDeleted, ParentId, Name, IsPrivate, ContentType, BodyLength, Body, OwnerId, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, Description FROM Attachment where id=:id]; |
| | | if (version.size()==0) { |
| | | return null; |
| | | List<ContentVersion> version =new List<ContentVersion>(); |
| | | version = [select VersionData from ContentVersion where Id =: id]; |
| | | if(version.size() > 0){ |
| | | return 'data:image/png;base64,' + EncodingUtil.base64Encode(version[0].VersionData); |
| | | }else{ |
| | | return ''; |
| | | } |
| | | return 'data:image/png;base64,' + EncodingUtil.base64Encode(version[0].VersionData); |
| | | |
| | | } |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-12 11:16:07 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-10-08 18:09:35 |
| | | * @LastEditTime: 2023-10-10 17:08:13 |
| | | */ |
| | | public with sharing class OpportunityLightingButtonController { |
| | | @AuraEnabled |
| | |
| | | from Lost_cancel_report__c where RecordTypeId != '01210000000R4hHAAS' and Opportunity__c =: recordId]; |
| | | rep.lostReport = re; |
| | | objs.put('report',rep); |
| | | Schema.DescribeSObjectResult s = Lost_cancel_report__c.sObjectType.getDescribe(); |
| | | if( !s.isCreateable()) { |
| | | objs.put('error',true); |
| | | }else{ |
| | | objs.put('error',false); |
| | | } |
| | | } catch (Exception e) { |
| | | objs.put('error',e.getMessage()); |
| | | return objs; |
| | |
| | | res.salesOwnerBuchang = opportunity.Sales_owner_buchang__c; |
| | | res.salesOwnerBuchangID = opportunity.Sales_owner_buchangID__c; |
| | | res.cntLostCancelDraft = opportunity.Cnt_Lost_cancel_Draft__c; |
| | | Schema.DescribeSObjectResult s = Lost_cancel_report__c.sObjectType.getDescribe(); |
| | | if( !s.isCreateable()) { |
| | | res.isHavePower = false; |
| | | }else{ |
| | | res.isHavePower = true; |
| | | } |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | |
| | | public String reportStatus; |
| | | @AuraEnabled |
| | | public String reportId; |
| | | @AuraEnabled |
| | | public Boolean isHavePower; |
| | | } |
| | | } |
| | |
| | | public with sharing class OpportunityService{ |
| | | |
| | | private static String opp_search_field = ' Id, Name, Account_Name_F__c, OwnerId, Hospital__c, Opportunity_No__c, Opportunity_stage__c, StageName__c, Bidding_Project_Name_Bid__c, Department_Class__r.RecordTypeId '; |
| | | public static Decimal selectcancelcount{get;set;}//选择的取消的询价个数 |
| | | |
| | | private static String opp_search_field = ' Id, Name, Account_Name_F__c, OwnerId, Hospital__c, Opportunity_No__c, Opportunity_stage__c, StageName__c, stagename, Bidding_Project_Name_Bid__c, Department_Class__r.RecordTypeId '; |
| | | |
| | | // 查询已保存的数据 |
| | | //noStr 询价的ID |
| | |
| | | // String paremt2 = '01210000000QekK'; |
| | | // String paremt3 = '引合'; |
| | | // sql += ' and (recordtypeid = :paremt1 or recordtypeid = :paremt2) and stagename = :paremt3 '; |
| | | sql += ' and recordtype.developername in (\'Opportunity\',\'SI_Oppor\') and Hospital__r.Is_Active__c = \'有効\' '+ |
| | | sql += ' and recordtype.developername in (\'Opportunity\',\'SI_Oppor\') and Hospital__r.Is_Active__c = \'有効\' '; |
| | | // 这里有修改,别给盖了 |
| | | /** |
| | | DB202305552102 you 202305230 除了目标的都看 |
| | | ' and ( (SAP_Send_OK__c = true and SAP_Send_OK_Date__c = LAST_N_DAYS:183 ) '+ |
| | | 'or( stagename = \'敗戦\' and Final_Contract_Proceeded_Date__c = LAST_N_DAYS:183 ) or stagename = \'引合\' ) '; |
| | | **/ |
| | | // 这里有修改,别给盖了 |
| | | // 20210914 战略科室修改 |
| | | //if (departments != null && String.isNotBlank(departments)) { |
| | |
| | | if(proId.substring(0,15) == p_2M4.substring(0,15)){ |
| | | sql += ' AND OwnerId =\''+UserInfo.getUserId()+'\''; |
| | | } |
| | | System.debug('sql:'+sql); |
| | | // 20221014 ljh SWAG-CK28WT add end |
| | | sql += ' limit 50'; |
| | | //DB202305552102 you 202305230 除了目标的都看 |
| | | sql += ' and stageName != \'目標\''; |
| | | //DB202305552102 you 202305230 除了目标的都看 |
| | | //DB202309608863 chenjingwu 2023/10/11 招标项目待关联询价中排除变更用户询价 |
| | | sql += ' and If_Account_Change__c = false'; |
| | | //DB202309608863 chenjingwu 2023/10/11 招标项目待关联询价中排除变更用户询价 |
| | | sql += ' order by stageName limit 50'; |
| | | System.debug('sql1:'+sql); |
| | | List<Opportunity> arrays = Database.query(sql); |
| | | return JSON.serialize(arrays); |
| | | |
| | |
| | | @AuraEnabled |
| | | public static string GetNormalProductDataNotSave(String IdStr,String[] hospital, String departments) { |
| | | |
| | | //TODU |
| | | // QueryWrapper query = new QueryWrapper(Tender_information__c.SObjectType); |
| | | // query.eq('Id',IdStr); |
| | | |
| | |
| | | // String paremt3 = '引合'; |
| | | // sql += ' and (recordtypeid = :paremt1 or recordtypeid = :paremt2) and stagename = \'引合\' '; |
| | | // sql += ' and recordtype.developername in (\'Opportunity\',\'SI_Oppor\') and Hospital__r.Is_Active__c = \'有効\' '+ |
| | | sql += ' where recordtype.developername in (\'Opportunity\',\'SI_Oppor\') and Hospital__r.Is_Active__c = \'有効\' '+ |
| | | sql += ' where recordtype.developername in (\'Opportunity\',\'SI_Oppor\') and Hospital__r.Is_Active__c = \'有効\' '; |
| | | // 这里有修改,别给盖了 |
| | | /**DB202305552102 you 202305230 除了目标的都看 |
| | | ' and ( (SAP_Send_OK__c = true and SAP_Send_OK_Date__c = LAST_N_DAYS:183 ) '+ |
| | | 'or( stagename = \'敗戦\' and Final_Contract_Proceeded_Date__c = LAST_N_DAYS:183 ) or stagename = \'引合\' ) '; |
| | | **/ |
| | | // 这里有修改,别给盖了 |
| | | // 去掉已经关联的招标 |
| | | if(IdStr != null && String.isNotBlank(IdStr)) { |
| | |
| | | sql += ' and Hospital__c in :hospital'; |
| | | } |
| | | // 20221014 ljh SWAG-CK28WT add start |
| | | |
| | | String proId = UserInfo.getProfileId(); |
| | | String p_2M4 = System.Label.ProfileId_2M4; |
| | | if(proId.substring(0,15) == p_2M4.substring(0,15)){ |
| | | sql += ' AND OwnerId =\''+UserInfo.getUserId()+'\''; |
| | | } |
| | | System.debug('sql:'+sql); |
| | | |
| | | // 20221014 ljh SWAG-CK28WT add end |
| | | sql += ' limit 50'; |
| | | //DB202305552102 you 202305230 除了目标的都看 |
| | | sql += ' and stageName != \'目標\''; |
| | | //DB202305552102 you 202305230 除了目标的都看 |
| | | //DB202309608863 chenjingwu 2023/10/11 招标项目待关联询价中排除变更用户询价 |
| | | sql += ' and If_Account_Change__c = false'; |
| | | //DB202309608863 chenjingwu 2023/10/11 招标项目待关联询价中排除变更用户询价 |
| | | sql += ' order by stageName limit 200'; |
| | | System.debug('sql2:'+sql); |
| | | List<Opportunity> arrays = Database.query(sql); |
| | | |
| | | // Tender_information__c |
| | | return JSON.serialize(arrays); |
| | | |
| | |
| | | // flag 修改 招投标项目 关联询价时间的一个标识 |
| | | @AuraEnabled |
| | | public static string SaveData(String JsonSelected,String JsonNotSelected,String BiddingId,Boolean flag) { |
| | | |
| | | selectcancelcount=0; |
| | | try{ |
| | | // 新增招标-询价关联关系表,去掉更新询价上的最新招标信息 20210813 start |
| | | // if(JsonSelected != null && JsonSelected != '' && JsonSelected !='[]') |
| | |
| | | sql += 'Hospital2__c, '; |
| | | sql += 'Hospital3__c, '; |
| | | sql += 'Hospital4__c, '; |
| | | sql += 'OpportunityNum__c, ';//20230714 you DB202306372336 |
| | | sql += 'publicDate__c, ';// 20221114 ljh SWAG-CKL5UC |
| | | sql += 'Tender_Order__c, '; //20220620 you SWAG-CFD4SU |
| | | sql += 'subInfoType__c '; //20220718 you 招标任务 |
| | | sql += 'subInfoType__c, '; //20220718 you 招标任务 |
| | | sql += 'status__c, ProjectRestartFLG__c,IsTerminate__c,TerminateApprovalStatus__c, '; |
| | | sql += 'TerminateApprovalTime__c ';//DB202305552102 增加项目终止时间 只有申请项目终止才允许关联取消的询价 |
| | | sql += 'FROM Tender_information__c WHERE Id = :BiddingId order by Tender_Order__c desc,relativeTime_F__c desc'; //20220620 you SWAG-CFD4SU 增加 order by |
| | | List<Tender_information__c> arrays = Database.query(sql); |
| | | Tender_information__c tender = arrays[0]; |
| | |
| | | List<Opportunity> upd_opps = new List<Opportunity>(); |
| | | List<Opportunity> upd_opps1 = new List<Opportunity>(); |
| | | List<String> owners = new List<String>(); |
| | | Integer links=0; |
| | | // 插入link |
| | | if (all_selected_list.size() > 0) { |
| | | //取消状态 询价判断 |
| | | Map<String,String> oppStagename= new Map<String,String>(); |
| | | for (Opportunity opp : all_selected_list) { //当前选择的询价 |
| | | if(opp.stagename=='削除'){ |
| | | oppStagename.put(opp.Id,opp.stagename); |
| | | selectcancelcount +=1; |
| | | } |
| | | } |
| | | |
| | | system.debug(all_selected_list.size()+'==oppStagename=='+oppStagename +'==selectcancelcount=='+selectcancelcount); |
| | | if(null!= oppStagename && oppStagename.size()>0 && tender.TerminateApprovalTime__c ==null){ |
| | | return '只有申请项目终止才允许关联取消的询价'; |
| | | /** |
| | | List<Tender_Opportunity_Link__c> del_links = [select Id,Opportunity__c,Opportunity__r.Name,Opportunity__r.Opportunity_No__c,Tender_information__r.status__c from Tender_Opportunity_Link__c where Opportunity__c = :oppStagename.keySet() and Tender_information__r.status__c !='09.终止']; |
| | | system.debug('==del_links=='+del_links); |
| | | Map<String,String> deldate= new Map<String,String>(); |
| | | if(del_links != null && del_links.size() > 0){ |
| | | for(Tender_Opportunity_Link__c ten:del_links){ |
| | | deldate.put(ten.Opportunity__c,ten.Opportunity__r.Name); |
| | | } |
| | | } |
| | | if(null!=deldate&& deldate.size()>0){ |
| | | for (String del : deldate.keySet()) { |
| | | qxopp+=deldate.get(del)+','; |
| | | } |
| | | } |
| | | **/ |
| | | } |
| | | // 设置招标所有人 |
| | | // OppOwnerId = all_selected_list[0].ownerId; |
| | | // 初始化参数 |
| | |
| | | } |
| | | // 插入link |
| | | if (add_list.size() > 0) { |
| | | links=add_list.size(); |
| | | insert add_list; |
| | | } |
| | | // 恢复trigger标记 |
| | |
| | | } |
| | | opp.Tender_Number__c = returncount; |
| | | // 20221114 ljh SWAG-CKL5UC start |
| | | if(opp.LeakageNumber__c != 1 && tender.publicDate__c != null && String.isNotBlank(opp.LeadSource) && opp.LeadSource == '招标网' && opp.Created_Day__c > tender.publicDate__c){ |
| | | //20230727 lt DB202307367354 【招标项目】漏单计算逻辑修改 delete && String.isNotBlank(opp.LeadSource) && opp.LeadSource == '招标网' |
| | | if(opp.LeakageNumber__c != 1 && tender.publicDate__c != null && opp.Created_Day__c > tender.publicDate__c){ |
| | | opp.LeakageNumber__c = 1; |
| | | } |
| | | // 20221114 ljh SWAG-CKL5UC start |
| | |
| | | tender.IsReactionOpp__c = true; |
| | | // 查询招标数量并更新 |
| | | //List<Tender_Opportunity_Link__c> tenderLinks = [SELECT id, Tender_information__c, Opportunity__c, Opportunity__r.Hospital__c FROM Tender_Opportunity_Link__c WHERE Tender_information__c = :tender.Id]; |
| | | tender.OpportunityNum__c = tenderLinks != null ? tenderLinks.size() : 0; |
| | | //tender.OpportunityNum__c = tenderLinks != null ? tenderLinks.size() : 0; |
| | | //20230714 you DB202306372336 原因,当前担当只能看到自己得关联询价,看不到其他人得,所以询价数量也只能累计自己的 |
| | | tender.OpportunityNum__c = tender.OpportunityNum__c != null ? tender.OpportunityNum__c + links :links ; |
| | | // 关联询价时间和是否相关状态 |
| | | if (tender.IsRelateProject__c != '是') { |
| | | tender.IsRelateProject__c = '是'; |
| | |
| | | tender.Hospital3__c = fiveHospitalMap.get('Hospital3__c'); |
| | | tender.Hospital4__c = fiveHospitalMap.get('Hospital4__c'); |
| | | } |
| | | //状态为终止 && 全部选择的是取消时,不进行项目重启 |
| | | if(tender.status__c == '09.终止' && selectcancelcount !=0 && selectcancelcount != all_selected_list.size()){ |
| | | tender.ProjectRestartFLG__c = true; |
| | | tender.IsTerminate__c = null; |
| | | tender.TerminateApprovalTime__c = null; |
| | | tender.TerminateApprovalStatus__c = null; |
| | | } |
| | | update tender; |
| | | // 招标-询价关联修改 20210813 end |
| | | return '成功'; |
| | | }catch (Exception ex) { |
| | | return ex.getMessage(); |
| | | return '成功'; |
| | | }catch (Exception e) { |
| | | // String eMsg = e.getMessage(); |
| | | // Integer left = eMsg.indexOf(':')+1; |
| | | // Integer right = eMsg.indexOf(','); |
| | | // return eMsg.substring(left,right); |
| | | return e.getMessage(); |
| | | } |
| | | |
| | | } |
| | |
| | | conTest2.dataEntry(); |
| | | } |
| | | |
| | | @isTest |
| | | private static void TestMeth3(){ |
| | | //@isTest |
| | | // private static void TestMeth3(){ |
| | | |
| | | // recode type を取得 |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | } |
| | | List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name IN ('診療科 消化科', '診療科 呼吸科') order by Name desc]; |
| | | if (rectDpt.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | } |
| | | // // recode type を取得 |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | // if (rectCo.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | // } |
| | | // List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name IN ('診療科 消化科', '診療科 呼吸科') order by Name desc]; |
| | | // if (rectDpt.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | // } |
| | | |
| | | // insert |
| | | Account company1 = new Account(); |
| | | company1.RecordTypeId = rectCo[0].Id; |
| | | company1.Name = '病院テスト1'; |
| | | insert company1; |
| | | // // insert |
| | | // Account company1 = new Account(); |
| | | // company1.RecordTypeId = rectCo[0].Id; |
| | | // company1.Name = '病院テスト1'; |
| | | // insert company1; |
| | | |
| | | List<Account> dc1s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = : company1.Id order by Department_Class_Label__c]; |
| | | // List<Account> dc1s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = : company1.Id order by Department_Class_Label__c]; |
| | | |
| | | Account depart1 = new Account(); |
| | | depart1.RecordTypeId = rectDpt[0].Id; |
| | | depart1.Name = '*'; |
| | | depart1.Department_Name__c = '診療科1'; |
| | | depart1.ParentId= dc1s[0].Id; |
| | | depart1.Department_Class__c = dc1s[0].Id; |
| | | depart1.Hospital__c= company1.Id; |
| | | insert depart1; |
| | | // Account depart1 = new Account(); |
| | | // depart1.RecordTypeId = rectDpt[0].Id; |
| | | // depart1.Name = '*'; |
| | | // depart1.Department_Name__c = '診療科1'; |
| | | // depart1.ParentId= dc1s[0].Id; |
| | | // depart1.Department_Class__c = dc1s[0].Id; |
| | | // depart1.Hospital__c= company1.Id; |
| | | // insert depart1; |
| | | |
| | | PCLLostReportController conTest2 = EditLoad(); |
| | | Set<Id> IdSet=new Set<Id> {depart1.Id}; |
| | | conTest2.deleteBrandIDSet=IdSet; |
| | | conTest2.LostReport.LostReport.LostType__c = '部分失单'; |
| | | conTest2.LostReport.LostBrands[0].lostBrand.LostPrice__c = 12; |
| | | conTest2.LostReport.LostBrands[0].lostBrand.Lost_reason_main__c = '价格'; |
| | | conTest2.LostReport.LostBrands[0].LostProducts[0].LostProductss.Quantity__c =0; |
| | | conTest2.LostReport.LostBrands[0].lostBrand.Agency__c = depart1.Id; |
| | | conTest2.LostReport.LostBrands[0].lostBrand.Lost_By_Company__c = 'STORZ'; |
| | | conTest2.LostReport.LostBrands[0].LostProducts[0].lineNo2 = 0; |
| | | conTest2.LostReport.LostBrands[0].LostProducts[0].LostProductss = new PCLLostProduct__c(Quantity__c = 0); |
| | | // conTest2.setBrand(); |
| | | conTest2.dataEntry(); |
| | | } |
| | | // PCLLostReportController conTest2 = EditLoad(); |
| | | // Set<Id> IdSet=new Set<Id> {depart1.Id}; |
| | | // conTest2.deleteBrandIDSet=IdSet; |
| | | // conTest2.LostReport.LostReport.LostType__c = '部分失单'; |
| | | // conTest2.LostReport.LostBrands[0].lostBrand.LostPrice__c = 12; |
| | | // conTest2.LostReport.LostBrands[0].lostBrand.Lost_reason_main__c = '价格'; |
| | | // conTest2.LostReport.LostBrands[0].LostProducts[0].LostProductss.Quantity__c =0; |
| | | // conTest2.LostReport.LostBrands[0].lostBrand.Agency__c = depart1.Id; |
| | | // conTest2.LostReport.LostBrands[0].lostBrand.Lost_By_Company__c = 'STORZ'; |
| | | // conTest2.LostReport.LostBrands[0].LostProducts[0].lineNo2 = 0; |
| | | // conTest2.LostReport.LostBrands[0].LostProducts[0].LostProductss = new PCLLostProduct__c(Quantity__c = 0); |
| | | // // conTest2.setBrand(); |
| | | // conTest2.dataEntry(); |
| | | // } |
| | | |
| | | |
| | | |
| | |
| | | pickList.put('洗消机', xixiaoji); |
| | | pickList.put('光源', guangyuan); |
| | | pickList.put('其他', qita); |
| | | pickList.put('全部',lstPickvals); |
| | | return JSON.serialize(pickList); |
| | | } |
| | | @AuraEnabled |
| | |
| | | submitFlag = submitFlag1; |
| | | return init1(); |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | return e.getMessage(); |
| | | } |
| | | } |
| | | // 初始化 |
| | |
| | | if(pros.size() > 0){ |
| | | |
| | | List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>(); |
| | | maps.put('allowUserId',pros[0].StepsAndWorkitems[0].OriginalActor.Id); |
| | | maps.put('allowUserId',pros[0].StepsAndWorkitems[0].Actor.Id); |
| | | maps.put('userProfileId',UserInfo.getProfileId()); |
| | | for(ProcessInstance pro: pros){ |
| | | items.addAll(pro.StepsAndWorkitems); |
| | | } |
| | | for(ProcessInstanceHistory pro: pros[0].StepsAndWorkitems){ |
| | | if(pro.StepStatus == 'Started'){ |
| | | maps.put('submitUserId',pro.OriginalActorId); |
| | | maps.put('submitUserId',pro.ActorId); |
| | | } |
| | | } |
| | | LostReport.approvalHistorys = items; |
| | |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | return e.getMessage(); |
| | | } |
| | | } |
| | | // 数据录入 |
| | |
| | | } |
| | | } |
| | | } |
| | | // add tcm 20211119 end |
| | | |
| | | // add tcm 20211118 start |
| | | public static void search() { |
| | | if (LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c==null) { |
| | | LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=null; |
| | | LostReport.LostBrands[topNum].LostProducts[secondNum].bool=false; |
| | | |
| | | }else { |
| | | Product2 prd = [select Id,ProductClass__c |
| | | , ProductCategory__c |
| | | from Product2 where Id =:LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c]; |
| | | if (prd.ProductCategory__c!=null) { |
| | | LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=prd.ProductClass__c; |
| | | LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=prd.ProductCategory__c; |
| | | LostReport.LostBrands[topNum].LostProducts[secondNum].bool=true; |
| | | }else { |
| | | LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=null; |
| | | LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=null; |
| | | LostReport.LostBrands[topNum].LostProducts[secondNum].bool=false; |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static string searchProduct(String lostProduct){ |
| | | Product2 prd = null; |
| | |
| | | , ProductCategory__c |
| | | from Product2 where Id =:lostProduct]; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | return e.getMessage(); |
| | | } |
| | | return JSON.serialize(prd); |
| | | } |
| New file |
| | |
| | | @isTest |
| | | private class lexPCLLostReportLwcControllerTest { |
| | | |
| | | @TestSetup |
| | | static void makeData(){ |
| | | PCLLostProduct2AssetHandlerTest.setUp(); |
| | | } |
| | | static testMethod void testInitCreate(){ |
| | | Opportunity opp = [select Id from Opportunity limit 1]; |
| | | Test.startTest(); |
| | | lexPCLLostReportLwcController.init('' + opp.Id,'','Create','失单',''); |
| | | Test.stopTest(); |
| | | } |
| | | static testMethod void testInitView(){ |
| | | Lost_cancel_report__c report = [select Id from Lost_cancel_report__c where LostType__c = '失单']; |
| | | Test.startTest(); |
| | | lexPCLLostReportLwcController.init('','' + report.Id,'View','',''); |
| | | Test.stopTest(); |
| | | } |
| | | static testMethod void testOther(){ |
| | | Lost_cancel_report__c report = [select Id from Lost_cancel_report__c where LostType__c = '失单']; |
| | | Test.startTest(); |
| | | lexPCLLostReportLwcController.getUserProfileId(); |
| | | lexPCLLostReportLwcController.getPickList('PCLLostProduct__c','ProductCategory__c'); |
| | | lexPCLLostReportLwcController.searchBrands(); |
| | | lexPCLLostReportLwcController.searchBatchIfForProduct(''); |
| | | lexPCLLostReportLwcController.getNewLostBrand(0); |
| | | lexPCLLostReportLwcController.getNewLostProduct(0); |
| | | |
| | | Test.stopTest(); |
| | | } |
| | | static testMethod void testSave(){ |
| | | // Lost_cancel_report__c report = [select Id from Lost_cancel_report__c where LostType__c = '失单']; |
| | | Account depart1 = [select Id from Account where RecordTypeId = '01210000000QemG' limit 1]; |
| | | LostReport conTest2 = new LostReport(); |
| | | conTest2.lostReport.LostType__c = '失单'; |
| | | conTest2.LostBrands[0].lostBrand.LostPrice__c = 12; |
| | | conTest2.LostBrands[0].lostBrand.Lost_reason_main__c = '价格'; |
| | | conTest2.LostBrands[0].LostProducts[0].LostProductss.Quantity__c =3; |
| | | conTest2.LostBrands[0].lostBrand.Agency__c = depart1.Id; |
| | | conTest2.LostBrands[0].lostBrand.Lost_By_Company__c = '其他'; |
| | | conTest2.LostBrands[0].lostBrand.Lost_By_Company_Mannual__c = 'dddddd'; |
| | | conTest2.LostBrands[0].LostProducts[0].lineNo2 = 0; |
| | | conTest2.LostBrands[0].LostProducts[0].LostProductss = new PCLLostProduct__c(Quantity__c = 3); |
| | | |
| | | Test.startTest(); |
| | | lexPCLLostReportLwcController.dataEntry(JSON.serialize(conTest2),new List<Id>(),new List<Id>()); |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | // 页面的数据结构 |
| | | public class LostReport { |
| | | @AuraEnabled |
| | | 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>(); |
| | | } |
| | | } |
| | | |
| | | public class LostBrand { |
| | | @AuraEnabled |
| | | public PCLLostBrand__c lostBrand; |
| | | @AuraEnabled |
| | | public Integer lineNo; |
| | | @AuraEnabled |
| | | public list<PCLLostProducts> LostProducts; |
| | | @AuraEnabled |
| | | public Integer ProductSize; |
| | | @AuraEnabled |
| | | public Boolean reasonFlag = false; |
| | | @AuraEnabled |
| | | public String brandTitle; |
| | | public LostBrand( integer lineNo ){ |
| | | lostBrand = new PCLLostBrand__c(); |
| | | this.lineNo = lineNo; |
| | | this.brandTitle = '失单品牌' + (lineNo + 1); |
| | | LostProducts = new list<PCLLostProducts> {new PCLLostProducts()}; |
| | | ProductSize = 1; |
| | | lostBrand = new PCLLostBrand__c(); |
| | | } |
| | | public LostBrand( integer lineNo, list<PCLLostProducts> LostProducts ){ |
| | | lostBrand = new PCLLostBrand__c(); |
| | | this.lineNo = lineNo; |
| | | this.brandTitle = '失单品牌' + (lineNo + 1); |
| | | this.LostProducts = LostProducts; |
| | | ProductSize = LostProducts.size(); |
| | | } |
| | | public LostBrand( integer lineNo, list<PCLLostProducts> LostProducts, PCLLostBrand__c lostBrand){ |
| | | this.lostBrand = lostBrand; |
| | | this.lineNo = lineNo; |
| | | this.brandTitle = '失单品牌' + (lineNo + 1); |
| | | this.LostProducts = LostProducts; |
| | | ProductSize = LostProducts.size(); |
| | | } |
| | | } |
| | | // add tcm 20211119 start |
| | | public class PCLLostProducts { |
| | | @AuraEnabled |
| | | public Integer lineNo2; |
| | | @AuraEnabled |
| | | public PCLLostProduct__c LostProductss; |
| | | @AuraEnabled |
| | | public Boolean bool; |
| | | @AuraEnabled |
| | | public String productName; |
| | | @AuraEnabled |
| | | public List<Map<String, String>> productOptions = new List<Map<String, String>>(); |
| | | public PCLLostProducts() { |
| | | this.lineNo2 = 0; |
| | | this.LostProductss=new PCLLostProduct__c(); |
| | | } |
| | | |
| | | public PCLLostProducts(Integer lineNo2) { |
| | | this.lineNo2 = lineNo2; |
| | | this.LostProductss=new PCLLostProduct__c(); |
| | | } |
| | | |
| | | public PCLLostProducts(Integer lineNo2,PCLLostProduct__c LostProductss) { |
| | | this.lineNo2 = lineNo2; |
| | | this.LostProductss=LostProductss; |
| | | if (LostProductss.LostProduct__c != null) { |
| | | this.bool = true; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>58.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | import SystemModstamp from '@salesforce/schema/Account.SystemModstamp'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | import lwcCSS from '@salesforce/resourceUrl/lwcCSS'; |
| | | import {loadStyle} from 'lightning/platformResourceLoader'; |
| | | import lexDateCss from '@salesforce/resourceUrl/lexDateCss'; |
| | |
| | | {label:"提前",value:"提前"}, |
| | | {label:"延后",value:"延后"}, |
| | | ] |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | |
| | | handleRelationFn(event){ |
| | | |
| | |
| | | showToast(msg,type) { |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | title: '', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | |
| | | SaveData({JsonData:JSON.stringify(this.opp)}).then((response)=>{ |
| | | if (response == '成功') { |
| | | this.OnLoading(false); |
| | | this.showToast("保存成功","success"); |
| | | this.showToast("保存成功","success"); |
| | | // window.location.hash = "Refresh"+"=="+this.oppId; |
| | | const closeEvent = new CustomEvent('closeaction', { |
| | | bubbles: true, // 允许事件冒泡至父组件 |
| | | composed: true, // 允许事件穿越 Shadow DOM 界限 |
| | | }); |
| | | setTimeout(() => { |
| | | window.location = '/' + this.recordId; |
| | | }, 2000); |
| | | this.dispatchEvent(closeEvent); |
| | | }else{ |
| | | this.showToast(response,"error"); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-12 14:51:44 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-10-04 12:28:54 |
| | | * @LastEditTime: 2023-10-10 17:25:57 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | |
| | | |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(); |
| | | } |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(); |
| | | } |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-13 15:08:43 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:11:28 |
| | | * @LastEditTime: 2023-10-10 17:30:54 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | this.handleConfirmClick('是否新建OPD报告书?\n[确定] => 新建OPD\n[取消] => 只生成 [产品试用评价]'); |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-13 15:55:45 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:11:51 |
| | | * @LastEditTime: 2023-10-10 17:30:18 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-03-27 13:47:21 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-10-09 17:47:05 |
| | | * @LastEditTime: 2023-10-10 17:31:25 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | showToast(msg,type) { |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | |
| | | }); |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:13:34 |
| | | * @LastEditTime: 2023-10-10 17:32:11 |
| | | */ |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-10-09 17:48:24 |
| | | * @LastEditTime: 2023-10-10 17:32:29 |
| | | */ |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | showToast(msg,type) { |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | |
| | | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-05-15 13:17:26 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-25 10:17:42 |
| | | * @LastEditTime: 2023-10-10 17:33:05 |
| | | */ |
| | | /* |
| | | * @Description: |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-21 14:32:09 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-25 10:40:25 |
| | | * @LastEditTime: 2023-10-10 17:33:45 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-13 13:50:23 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-06 14:36:47 |
| | | * @LastEditTime: 2023-10-10 17:34:10 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:31:46 |
| | | * @LastEditTime: 2023-10-10 17:34:49 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | this.DispatchOCSMQARA(); |
| | | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-12 17:37:34 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-10-09 16:43:31 |
| | | * @LastEditTime: 2023-10-11 14:58:33 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | |
| | | }).then(result=>{ |
| | | console.log(result); |
| | | if(result.error){ |
| | | this.showToast(res.error); |
| | | this.showToast('您不能修改失单/部分失单报告!','error'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else if(result.report){ |
| | | this.lostlist = result.report.lostReport; |
| | |
| | | <div class="slds-notify slds-notify_toast slds-theme_success" role="status"> |
| | | <lightning-icon class="white" icon-name="utility:success" alternative-text="success" variant="inverse" size="small" ></lightning-icon> |
| | | <div class="slds-notify__content" style="padding-left: 20px;"> |
| | | <h2 style="color:white;font-size:large">{message}</h2> |
| | | <h2 style="color:white;font-size:16px;">{message}</h2> |
| | | </div> |
| | | <div class="slds-notify__close"> |
| | | <lightning-button-icon icon-name="utility:close" variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon> |
| | |
| | | <div class="slds-notify slds-notify_toast slds-theme_error" role="status"> |
| | | <lightning-icon class="white" icon-name="utility:error" size="small" variant="inverse"></lightning-icon> |
| | | <div class="slds-notify__content" style="padding-left: 20px;"> |
| | | <h2 style="color:white;font-size:large">{message}</h2> |
| | | <h2 style="color:white;font-size:16px;">{message}</h2> |
| | | </div> |
| | | <div class="slds-notify__close"> |
| | | <lightning-button-icon icon-name="utility:close" variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon> |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-05-25 13:59:44 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-27 15:30:16 |
| | | * @LastEditTime: 2023-10-11 11:43:30 |
| | | --> |
| | | <template> |
| | | <div data-id="myInput"> |
| | |
| | | </template> |
| | | </div> |
| | | <template if:true={recordsList}> |
| | | <div class="slds-combobox_container"> |
| | | <div onmousedown={dontClose} class="slds-combobox_container"> |
| | | <div id="listbox-id-1" class="slds-dropdown slds-dropdown_fluid slds-dropdown_autocomplete" role="listbox" style=" overflow: auto;"> |
| | | <ul class="slds-listbox slds-listbox_vertical" role="presentation"> |
| | | <template for:each={recordsList} for:item="item"> |
| | | <li key={item.Id} role="presentation" class="slds-listbox__item"> |
| | | <div class="slds-media slds-listbox__option slds-listbox__option_plain slds-media_small" role="option" |
| | | data-itemid = {item.Id} data-itemname={item.Name} onmousedown={setSelectedValue}> |
| | | data-itemid = {item.Id} data-itemname={item.Name} onclick={setSelectedValue}> |
| | | <span role="menuitem" tabindex="-1" data-itemid = {item.Id} data-itemname={item.Name}> |
| | | <lightning-icon icon-name={iconname} size="x-small" data-itemid = {item.Id} data-itemname={item.Name}></lightning-icon> {item.Name} |
| | | </span> |
| | |
| | | }); |
| | | this.dispatchEvent(customEvent); |
| | | } |
| | | dontClose(event){ |
| | | event.preventDefault(); |
| | | } |
| | | |
| | | //Method to pass selected record to parent component. |
| | | setSelectedValue(event) { |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-05-08 14:36:33 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-20 17:11:07 |
| | | * @LastEditTime: 2023-10-10 17:35:09 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-20 14:08:55 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-10-08 15:40:39 |
| | | * @LastEditTime: 2023-10-10 17:35:29 |
| | | */ |
| | | /* |
| | | * @Description: |
| | |
| | | this.salesOwnerBuchang = result.salesOwnerBuchang; |
| | | this.salesOwnerBuchangID = result.salesOwnerBuchangID; |
| | | this.cntLostCancelDraft = result.cntLostCancelDraft; |
| | | if(!result.isHavePower){ |
| | | this.showToast('您不能创建失单/部分失单报告!','error'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | this.loseReport(); |
| | | }) |
| | | } |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | //显示信息 |
| | | showMyToast(title, message, variant) { |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <apiVersion>58.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-09 13:31:12 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:33:54 |
| | | * @LastEditTime: 2023-10-10 17:35:45 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | | loadStyle(this, lwcCSS) |
| | |
| | | this.IsLoading = false; |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-06-29 16:43:08 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:35:40 |
| | | * @LastEditTime: 2023-10-10 17:36:38 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-08-29 14:42:25 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:36:05 |
| | | * @LastEditTime: 2023-10-10 17:36:56 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-06-26 11:10:52 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:36:31 |
| | | * @LastEditTime: 2023-10-10 17:37:14 |
| | | */ |
| | | |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-03-28 15:59:44 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-10-03 12:39:11 |
| | | * @LastEditTime: 2023-10-10 17:37:39 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | noToReport(){ |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:38:02 |
| | | * @LastEditTime: 2023-10-10 17:37:58 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-13 13:15:52 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-20 16:58:35 |
| | | * @LastEditTime: 2023-10-10 17:38:20 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | }); |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-06-09 16:41:45 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:39:39 |
| | | * @LastEditTime: 2023-10-10 17:38:50 |
| | | */ |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:40:30 |
| | | * @LastEditTime: 2023-10-10 17:39:04 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-23 10:09:31 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:40:55 |
| | | * @LastEditTime: 2023-10-10 17:39:34 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | |
| | | display: block; |
| | | width: 10%; |
| | | } |
| | | } |
| | | |
| | | .textAreaBody { |
| | | --sds-c-textarea-sizing-min-height:175px; |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-09 13:27:59 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-10-09 17:10:13 |
| | | * @LastEditTime: 2023-10-11 14:52:27 |
| | | --> |
| | | <!-- |
| | | * @Description: |
| | |
| | | <div class="slds-notify slds-notify_toast slds-theme_success" role="status" style="top: 130px;"> |
| | | <lightning-icon class="white" icon-name="utility:success" alternative-text="success" variant="inverse" size="small" ></lightning-icon> |
| | | <div class="slds-notify__content" style="padding-left: 20px;"> |
| | | <span class="toastMessage forceActionsText">{message}</span> |
| | | <span style="font-size: 16px;" class="toastMessage forceActionsText">{message}</span> |
| | | </div> |
| | | <div class="slds-notify__close"> |
| | | <lightning-button-icon icon-name="utility:close" variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon> |
| | |
| | | <div class="slds-notify slds-notify_toast slds-theme_error" role="status" style="background-color: #BA0517;top: 130px;"> |
| | | <lightning-icon class="white" icon-name="utility:error" size="small" variant="inverse"></lightning-icon> |
| | | <div class="slds-notify__content" style="padding-left: 20px;"> |
| | | <span class="toastMessage forceActionsText">{message}</span> |
| | | <span style="font-size: 16px;" class="toastMessage forceActionsText">{message}</span> |
| | | </div> |
| | | <div class="slds-notify__close"> |
| | | <lightning-button-icon icon-name="utility:close" variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon> |
| | |
| | | </lightning-layout> |
| | | <lightning-layout> |
| | | <template if:true={isEdit}> |
| | | <template if:true={brand.lostBrand.Lost_By_Company_Mannual__c}> |
| | | <!-- <template if:true={brand.lostBrand.Lost_By_Company_Mannual__c}> |
| | | <lightning-layout-item size="4" padding="horizontal-small"> |
| | | <lightning-input name={i} data-id="Lost_By_Company_Mannual" value={brand.lostBrand.Lost_By_Company_Mannual__c} type="text" label="失单品牌(手动): " class="searchField" onchange={handleLostByCompanyMannualChange}></lightning-input> |
| | | </lightning-layout-item> |
| | |
| | | <lightning-layout-item size="4" padding="horizontal-small"> |
| | | <lightning-input disabled="true" name={i} data-id="Lost_By_Company_Mannual" value={brand.lostBrand.Lost_By_Company_Mannual__c} type="text" label="失单品牌(手动): " class="searchField" onchange={handleLostByCompanyMannualChange}></lightning-input> |
| | | </lightning-layout-item> |
| | | </template> |
| | | </template> --> |
| | | <lightning-layout-item size="4" padding="horizontal-small"> |
| | | <lightning-input disabled="true" name={i} data-id="Lost_By_Company_Mannual" value={brand.lostBrand.Lost_By_Company_Mannual__c} type="text" label="失单品牌(手动): " class="searchField" onchange={handleLostByCompanyMannualChange}></lightning-input> |
| | | </lightning-layout-item> |
| | | </template> |
| | | <template if:false={isEdit}> |
| | | <lightning-layout-item size="4" padding="horizontal-small"> |
| | |
| | | <td> |
| | | <template if:true={isEdit}> |
| | | <template if:true={product.LostProductss.ProductClass__c}> |
| | | <lightning-combobox variant="label-hidden" read-only="true" class="ProductClass" data-id={i} placeholder="--无--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> |
| | | |
| | | <template if:true={product.LostProductss.LostProduct__c}> |
| | | <lightning-combobox variant="label-hidden" read-only="true" class="ProductClass" data-id={i} placeholder="--无--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> |
| | | </template> |
| | | <template if:false={product.LostProductss.LostProduct__c}> |
| | | <lightning-combobox variant="label-hidden" class="ProductClass" data-id={i} placeholder="--无--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> |
| | | </template> |
| | | </template> |
| | | <template if:false={product.LostProductss.ProductClass__c}> |
| | | <lightning-combobox variant="label-hidden" class="ProductClass" data-id={i} placeholder="--无--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> |
| | |
| | | <td> |
| | | |
| | | <template if:true={isEdit}> |
| | | <lightning-combobox variant="label-hidden" class="ProductCategory" data-id={i} placeholder={product.LostProductss.ProductCategory__c} title={i} name={j} options={product.productOptions} value={product.LostProductss.ProductCategory__c} onchange={handleProductCategoryChange} read-only="true"></lightning-combobox> |
| | | <lightning-combobox variant="label-hidden" class="ProductCategory" data-id={i} placeholder="--无--" title={i} name={j} options={product.productOptions} value={product.LostProductss.ProductCategory__c} onchange={handleProductCategoryChange} read-only="true"></lightning-combobox> |
| | | </template> |
| | | <template if:false={isEdit}> |
| | | <lightning-combobox variant="label-hidden" class="ProductCategory" data-id={i} placeholder="--无--" title={i} name={j} options={product.productOptions} value={product.LostProductss.ProductCategory__c} onchange={handleProductCategoryChange} read-only="true"></lightning-combobox> |
| | |
| | | </div> |
| | | </template> |
| | | <template if:true={isPop}> |
| | | <section role="dialog" aria-labelledby="modal-heading-01" aria-describedby="modal-content-id-1" tabindex="-1" aria-modal="true" class="slds-modal slds-fade-in-open " data-aura-rendered-by="478:0"> |
| | | <div style="height: 50px;"></div> |
| | | <div style="background-color: white;height:196px;" class="slds-modal__container" data-aura-rendered-by="479:0"> |
| | | |
| | | |
| | | <div style="align-self: center;font-size: large;padding-bottom: 10px" slot="header">{modalsubmitLabel}页面</div> |
| | | <template if:true={isLookup}> |
| | | <section role="dialog" tabindex="-1" aria-modal="true" aria-labelledby="modal-heading-01" class="slds-modal slds-fade-in-open"> |
| | | <div class="slds-modal__container" data-aura-rendered-by="479:0"> |
| | | <!-- <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"> |
| | | <svg aria-hidden="true"> |
| | | <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#close"></use> |
| | | </svg> |
| | | <span class="slds-assistive-text">Cancel and close</span> |
| | | </button> --> |
| | | <div style="height: 40px;"> |
| | | <lightning-button-icon style="float: right;" variant="bare" icon-class="slds-button__icon slds-button__icon_large slds-button_icon-inverse" icon-name="utility:close" onclick={handleModalCancel}></lightning-button-icon> |
| | | </div> |
| | | |
| | | <div class="slds-modal__header"> |
| | | <h1 id="modal-heading-01" class="slds-modal__title slds-hyphenate">{modalsubmitLabel} 询价失单/取消报告</h1> |
| | | </div> |
| | | <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1"> |
| | | <template if:true={isLookup}> |
| | | |
| | | <lightning-record-edit-form |
| | | object-api-name='Lost_Report__c' |
| | |
| | | </div> |
| | | </lightning-record-edit-form> |
| | | |
| | | </template> |
| | | <template if:false={isLookup}> |
| | | <div style="height: 100px;"> |
| | | <lightning-textarea class="comment" style="width: 95%;padding-left: 10px;" data-id="comment" label="评论" value=""></lightning-textarea> |
| | | |
| | | </div> |
| | | </template> |
| | | </template> |
| | | <template if:false={isLookup}> |
| | | <div> |
| | | <lightning-textarea class="textAreaBody" style="width: 95%;padding-left: 10px;" data-id="comment" label="评论" value=""></lightning-textarea> |
| | | |
| | | </div> |
| | | </template> |
| | | </div> |
| | | <!-- <div style="align-self: center;font-size: large;padding-bottom: 10px" slot="header"></div> --> |
| | | |
| | | |
| | | |
| | | <!-- <template if:true={isLookup}> |
| | |
| | | </lightning-layout-item> |
| | | |
| | | </template> --> |
| | | <div slot="footer" style="align-self: center;padding-top: 10px;"> |
| | | <div class="slds-modal__footer"> |
| | | <lightning-button |
| | | class="slds-button " |
| | | data-id="Cancel" |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-20 15:04:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-10-09 16:36:54 |
| | | * @LastEditTime: 2023-10-11 18:24:16 |
| | | */ |
| | | let columns2=[ |
| | | { label: '--无--', value: '' }, |
| | |
| | | import lexButtonCss from '@salesforce/resourceUrl/lexButtonCss'; |
| | | import systemProfileId from '@salesforce/label/c.ProfileId_SystemAdmin'; |
| | | import {loadStyle} from 'lightning/platformResourceLoader'; |
| | | import { RefreshEvent } from "lightning/refresh"; |
| | | export default class LexPCLLostReportPage extends NavigationMixin(LightningElement) { |
| | | @track visible = false; |
| | | @wire(CurrentPageReference) pageRef; |
| | |
| | | }else{ |
| | | this.showToast(result.message,"error"); |
| | | setTimeout(() => { |
| | | window.location = '/lightning/r/Opportunity/' + this.oppId + '/view'; |
| | | // window.location = '/lightning/r/Opportunity/' + this.oppId + '/view'; |
| | | this.remoteUrl(); |
| | | }, 2000); |
| | | } |
| | | }else{ |
| | |
| | | |
| | | var report = result.LostReport; |
| | | this.LostReport = report; |
| | | |
| | | |
| | | // this.LostReport.LostBrands.forEach(brand=>{ |
| | | // if(brand.lostBrand.Lost_Reason_Sub__c == '行政决策' || brand.lostBrand.Lost_reason_main__c == '行政决策'){ |
| | | // this.template.querySelectorAll(); |
| | | // } |
| | | // }); |
| | | // for(var i=0;i < this.LostReport.LostBrands.length;i++){ |
| | | // if(this.LostReport.LostBrands[i].lostBrand.Lost_Reason_Sub__c == '行政决策' || this.LostReport.LostBrands[i].lostBrand.Lost_reason_main__c == '行政决策'){ |
| | | |
| | | // } |
| | | // } |
| | | |
| | | if(!this.LostReport.lostReport.LostTotalAmount__c){ |
| | | this.LostReport.lostReport.LostTotalAmount__c = 0.0; |
| | |
| | | fieldName: 'ProductCategory__c' |
| | | }).then(result=>{ |
| | | this.productOptionsList = JSON.parse(result); |
| | | this.LostReport.LostBrands.forEach(brand=>{ |
| | | brand.LostProducts.forEach(product=>{ |
| | | product.productOptions = this.productOptionsList['全部']; |
| | | }); |
| | | }); |
| | | this.LostReport = JSON.parse(JSON.stringify(this.LostReport)); |
| | | console.log(this.LostReport.approvalHistorys.length + 'size'); |
| | | }).catch(error=>{ |
| | |
| | | }); |
| | | |
| | | } |
| | | isqita(){ |
| | | |
| | | } |
| | | renderedCallback(){ |
| | | const sections = this.template.querySelectorAll('lightning-accordion-section'); |
| | | sections.forEach(section=>{ |
| | | console.log(section); |
| | | section.active = true; |
| | | }); |
| | | console.log('1'); |
| | | console.log(this.LostReport.lostReport.LostTotalAmount__c); |
| | | this.LostReport.lostReport.LostTotalAmount__c = this.LostReport.lostReport.LostTotalAmount__c; |
| | | var elements = this.template.querySelectorAll('lightning-combobox'); |
| | | elements.forEach(element=>{ |
| | | if(element.value == '行政决策'){ |
| | | element.options = columns2; |
| | | } |
| | | }); |
| | | var elements1 = this.template.querySelectorAll('[data-id="Lost_By_Company_Mannual"]'); |
| | | var i = 0; |
| | | console.log('elements1=> ' + elements1[i]); |
| | | this.LostReport.LostBrands.forEach(brand=>{ |
| | | if(brand.lostBrand.Lost_By_Company__c == '其他' && elements1.length > 0 ){ |
| | | console.log('val=> ' + elements1[i].value); |
| | | if(elements1[i].value){ |
| | | elements1[i].disabled = false; |
| | | elements1[i].required = true; |
| | | } |
| | | } |
| | | |
| | | }); |
| | | // if((value == '' || value == null) && this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c == '其他'){ |
| | | // var elements = |
| | | // elements[index].disabled = false; |
| | | |
| | | // } |
| | | // this.LostReport = JSON.parse(JSON.stringify(this.LostReport)); |
| | | } |
| | | brandTitle = ['失单品牌1','失单品牌2','失单品牌3','失单品牌4','失单品牌5','失单品牌6']; |
| | |
| | | }).then(result=>{ |
| | | result.LostProductss.LostBrandName__c = this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c; |
| | | this.LostReport.LostBrands[index].LostProducts.push(result); |
| | | console.log('***'); |
| | | console.log(this.LostReport); |
| | | }); |
| | | } |
| | | submitJs() { |
| | |
| | | this.showToast('提交成功!','success'); |
| | | setTimeout(() => { |
| | | |
| | | window.location = '/' + this.LostReport.lostReport.Id; |
| | | this.remoteUrl(); |
| | | }, 2000); |
| | | } |
| | | this.IsLoading = false; |
| | |
| | | console.log("error"); |
| | | console.log(error); |
| | | }); |
| | | } |
| | | |
| | | remoteUrl(){ |
| | | var url = '/lightning/n/PCLLostReportPageLwc#pageStatus=View&reportId=' + this.LostReport.lostReport.Id; |
| | | var urlStatus = this.getQueryVariable('pageStatus',this.location); |
| | | if(urlStatus == 'View'){ |
| | | console.log('viewpage'); |
| | | window.location.reload(); |
| | | }else{ |
| | | console.log('editpage'); |
| | | window.location = url; |
| | | window.location.reload(); |
| | | } |
| | | } |
| | | onApproveChange(event){ |
| | | // var approvalId; |
| | |
| | | // this.setDefaultBrand(payload.value,index); |
| | | this.clearBrandMannualName(payload.value,index); |
| | | } |
| | | console.log('cnm:' + JSON.stringify(this.LostReport)); |
| | | }); |
| | | |
| | | } |
| | |
| | | } |
| | | clearProducts(value,index){ |
| | | var cc = this.LostReport.LostBrands[index].lostBrand.Lost_By_Company_Mannual__c; |
| | | if (value == '其他' && (cc != null || cc != '' || cc != undefined)) { |
| | | console.log('cc=' + cc) |
| | | if (value == '其他' && (cc != null && cc != '' && cc != undefined)) { |
| | | return; |
| | | }else if(value != '其他'){ |
| | | this.LostReport.LostBrands[index].lostBrand.Lost_By_Company_Mannual__c = null; |
| | | console.log('wqeer1'); |
| | | } |
| | | var newProducts = []; |
| | | console.log(this.newProduct); |
| | | getNewLostProduct({ |
| | | lineNo2: this.LostReport.LostBrands[index].LostProducts.length |
| | | }).then(result=>{ |
| | | console.log('wqeer2'); |
| | | this.LostReport.LostBrands[index].LostProducts.forEach(product=>{ |
| | | result.LostProductss.LostBrandName__c = value; |
| | | newProducts.push(result); |
| | | }); |
| | | console.log('wqeer3'); |
| | | var elements1 = this.template.querySelectorAll('.ProductClass[data-id="' + index + '"]'); |
| | | elements1.forEach(element=>{ |
| | | element.readOnly = false; |
| | | }); |
| | | console.log('wqeer4'); |
| | | var elements2 = this.template.querySelectorAll('.Product[data-id="' + index + '"]'); |
| | | elements2.forEach(element=>{ |
| | | element.clearSelection(); |
| | | }); |
| | | console.log('wqeer5'); |
| | | this.LostReport.LostBrands[index].LostProducts = newProducts; |
| | | console.log('wqeer'); |
| | | console.log(this.LostReport); |
| | | }).catch(error=>{ |
| | | console.log('error'); |
| | | console.log(error); |
| | | }); |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | this.status.pageStatus = 'View'; |
| | | this.LostReport = newLostReport; |
| | | this.reportId = result.reportId; |
| | | // this.LostReport.lostReport.Id = result.reportId; |
| | | // console.log(this.LostReport); |
| | | this.status.pageStatus = 'View'; |
| | | |
| | | this.tableflag = 0; |
| | | this.showToast('保存成功','success'); |
| | | console.log(this.LostReport); |
| | | this.LostReport.LostBrands.forEach(brand=>{ |
| | | if(brand.lostBrand.Id){ |
| | | this.updateRecordView(brand.lostBrand.Id); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | this.IsLoading = false; |
| | | }).catch(error=>{ |
| | |
| | | }); |
| | | } |
| | | editJs(){ |
| | | |
| | | this.status.pageStatus = 'Edit'; |
| | | var elements = this.template.querySelectorAll('lightning-combobox'); |
| | | console.log('elements=>' + elements.length); |
| | | elements.forEach(element=>{ |
| | | if(element.value == '行政决策'){ |
| | | element.options = columns2; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | dataCheck(){ |
| | |
| | | console.log('12345'); |
| | | var elements1 = this.template.querySelectorAll('.ProductClass[data-id="' + topNum + '"]'); |
| | | var elements2 = this.template.querySelectorAll('.ProductCategory[data-id="' + topNum + '"]'); |
| | | |
| | | if (this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c==null) { |
| | | console.log('element1' + elements1[secondNum]); |
| | | console.log('element2' + elements2[secondNum]); |
| | | elements1[secondNum].readOnly = false; |
| | | elements2[secondNum].readOnly = false; |
| | | this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=null; |
| | |
| | | var prd = JSON.parse(result); |
| | | this.LostReport.LostBrands[topNum].LostProducts[secondNum].productOptions = this.productOptionsList[prd.ProductClass__c]; |
| | | if (prd.ProductCategory__c!=null) { |
| | | elements1[secondNum].readOnly = false; |
| | | console.log('element1' + elements1[secondNum]); |
| | | console.log('element2' + elements2[secondNum]); |
| | | if(elements1[secondNum]!=undefined){ |
| | | elements1[secondNum].readOnly = false; |
| | | } |
| | | |
| | | elements2[secondNum].readOnly = false; |
| | | this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=prd.ProductClass__c; |
| | | console.log(prd.ProductClass__c + ' ' + prd.ProductCategory__c); |
| | |
| | | this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=prd.ProductCategory__c; |
| | | } |
| | | |
| | | elements1[secondNum].readOnly = true; |
| | | if(elements1[secondNum]!=undefined){ |
| | | elements1[secondNum].readOnly = true; |
| | | } |
| | | elements2[secondNum].readOnly = true; |
| | | }else { |
| | | elements1[secondNum].readOnly = false; |
| | | if(elements1[secondNum]!=undefined){ |
| | | elements1[secondNum].readOnly = false; |
| | | } |
| | | elements2[secondNum].readOnly = false; |
| | | this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=null; |
| | | this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=null; |
| | |
| | | this.showToast('您无权重新分配','error'); |
| | | this.IsLoading = false; |
| | | }else{ |
| | | window.location = '/' + this.LostReport.lostReport.Id; |
| | | // window.location = '/' + this.LostReport.lostReport.Id; |
| | | this.remoteUrl(); |
| | | } |
| | | |
| | | }); |
| | |
| | | |
| | | this.IsLoading = false; |
| | | }else{ |
| | | window.location = '/' + this.LostReport.lostReport.Id; |
| | | // window.location = '/' + this.LostReport.lostReport.Id; |
| | | this.remoteUrl(); |
| | | } |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | handleLostByCompanyMannualChange(event){ |
| | | try { |
| | | var index = event.target.name; |
| | | var value = event.target.value; |
| | | this.LostReport.LostBrands[index].lostBrand.Lost_By_Company_Mannual__c = value; |
| | | this.setDefaultBrand(value,index); |
| | | var elements = this.template.querySelectorAll('.Product[data-id="' + index + '"]'); |
| | | if(value == '' || value == null){ |
| | | elements.forEach(element=>{ |
| | | element.letDisabledTrue(); |
| | | }); |
| | | }else{ |
| | | elements.forEach(element=>{ |
| | | element.letDisabledFalse(); |
| | | }); |
| | | } |
| | | // if((value == '' || value == null) && this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c == '其他'){ |
| | | // var elements = this.template.querySelectorAll('[data-id="Lost_By_Company_Mannual"]'); |
| | | // elements[index].disabled = false; |
| | | |
| | | // } |
| | | } catch (error) { |
| | | console.log('error'); |
| | | console.log(error); |
| | | } |
| | | // var elements = this.template.querySelectorAll('.Product[data-id="' + index + '"]'); |
| | | // if(value == '' || value == null){ |
| | | // elements.forEach(element=>{ |
| | | // element.letDisabledTrue(); |
| | | // }); |
| | | // }else{ |
| | | // elements.forEach(element=>{ |
| | | // element.letDisabledFalse(); |
| | | // }); |
| | | // } |
| | | } |
| | | |
| | | handleLostPriceOutChange(event){ |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-12 10:46:24 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-20 17:28:12 |
| | | * @LastEditTime: 2023-10-10 17:39:53 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | |
| | | } |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-14 17:15:33 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-08 13:07:55 |
| | | * @LastEditTime: 2023-10-10 17:40:15 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-14 11:09:28 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:42:54 |
| | | * @LastEditTime: 2023-10-10 17:40:30 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | }) |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="toReportHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-10-09 19:20:28 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-10-09 19:21:32 |
| | | */ |
| | | import { LightningElement,wire,track,api } from 'lwc'; |
| | | import { CurrentPageReference,NavigationMixin } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import updateOpportunity from '@salesforce/apex/LexQuoteEntryDecidebottonController.updateOpportunity'; |
| | | import selectOpportunityById from '@salesforce/apex/LexQuoteEntryDecidebottonController.selectOpportunityById'; |
| | | import selectUser from '@salesforce/apex/LexQuoteEntryDecidebottonController.selectUser'; |
| | | import lwcCSS from '@salesforce/resourceUrl/lwcCSS'; |
| | | import {loadStyle} from 'lightning/platformResourceLoader' |
| | | |
| | | export default class LexQuoteEntryDecidebottonLwc extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | // IsLoading2 = true; |
| | | msg; |
| | | success; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | console.log(currentPageReference); |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | console.warn("str"); |
| | | console.warn(str); |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | console.warn('recordId'+this.recordId); |
| | | selectUser().then(us=>{ |
| | | if (!us.Quote_Correct__c) { |
| | | this.showToast("你没有取消Decide的权限","error"); |
| | | } else { |
| | | selectOpportunityById({recordId:this.recordId}).then(opp=>{ |
| | | if (!opp.Estimation_Decision__c) { |
| | | this.showToast("还没有Decide过,不能取消","error"); |
| | | } else { |
| | | updateOpportunity({recordId:this.recordId}).then(result=>{ |
| | | if (result == 'success') { |
| | | this.showToast("取消Decide了!","success"); |
| | | setTimeout(() => { |
| | | window.open('/' +this.recordId, '_self'); |
| | | },3000); |
| | | } else { |
| | | this.showToast(result,"error"); |
| | | } |
| | | }); |
| | | } |
| | | this.IsLoading = false; |
| | | }); |
| | | } |
| | | }); |
| | | Promise.all([ |
| | | loadStyle(this, lwcCSS) |
| | | ]); |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | titel:' ', |
| | | message: msg, |
| | | variant : type, |
| | | mode : 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>58.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:43:46 |
| | | * @LastEditTime: 2023-10-10 17:41:01 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-06-06 15:41:32 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:45:42 |
| | | * @LastEditTime: 2023-10-10 17:41:40 |
| | | */ |
| | | import { api, wire,LightningElement, track } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | |
| New file |
| | |
| | | .StartTradingbtn{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <!-- <div class="StartTradingbtn" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> --> |
| | | <lightning-spinner if:true={IsLoading} variant="brand" alternative-text="Loading" size="large"> </lightning-spinner> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import init from '@salesforce/apex/StartTradingController2.init'; |
| | | import start from '@salesforce/apex/StartTradingController2.start'; |
| | | import lwcCSS from '@salesforce/resourceUrl/lwcCSS'; |
| | | import {loadStyle} from 'lightning/platformResourceLoader'; |
| | | |
| | | export default class LexStartTrading extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | Hospital_Name__c; |
| | | Close_Forecasted_Date__c; |
| | | Opp_Name_Search__c; |
| | | begin_opp_name__c; |
| | | Status; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | | loadStyle(this, lwcCSS) |
| | | ]); |
| | | init({Id:this.recordId}).then(result=>{ |
| | | console.log('init result==========',result); |
| | | if(result!=null){ |
| | | // 给参数赋值 |
| | | this.Hospital_Name__c = result.Hospital_Name__c; |
| | | this.Close_Forecasted_Date__c = result.Close_Forecasted_Date__c; |
| | | this.Opp_Name_Search__c = result.Opp_Name_Search__c; |
| | | this.begin_opp_name__c = result.begin_opp_name__c; |
| | | this.Status = result.Status; |
| | | // 执行判断 |
| | | this.InquiryJudgment(); |
| | | } |
| | | }); |
| | | // .catch(err=>{ |
| | | // console.log("init error:"); |
| | | // console.log(err); |
| | | // }).finally(()=>{}); |
| | | } |
| | | |
| | | InquiryJudgment(){ |
| | | console.log('InquiryJudgment check'); |
| | | let status_list = ['完毕','无需求','已有询价','確認済み','不要','开始询价']; |
| | | let lead_status = this.Status; |
| | | let that = this; |
| | | if(this.Hospital_Name__c == ''){ |
| | | this.showToast('病院名称を設定してください','error'); |
| | | } else if (this.comparDate(this.Close_Forecasted_Date__c)) { |
| | | this.showToast('预测OCSM签约日不能小于今天','error'); |
| | | } else if (this.Opp_Name_Search__c == '' || !this.begin_opp_name__c == '' || status_list.indexOf(lead_status) !== -1) { |
| | | this.showToast('已存在转化的询价或不需要转化询价','error'); |
| | | } else{ |
| | | console.log('start at: ' + this.recordId); |
| | | start({Id:this.recordId}).then(result=>{ |
| | | console.log('start result==========',result); |
| | | if(result!=null){ |
| | | this.showToast('已成功转化询价','success'); |
| | | window.open('/lightning/r/Opportunity/'+result+'/view','_parent'); |
| | | // this[NavigationMixin.GenerateUrl]({ |
| | | // type: "standard__recordPage", |
| | | // attributes: { |
| | | // recordId: result, |
| | | // objectApiName:"Opportunity", |
| | | // actionName:"edit" |
| | | // } |
| | | // }) |
| | | } |
| | | }); |
| | | // .catch(err=>{ |
| | | // console.log("start error:"); |
| | | // console.log(err); |
| | | // }).finally(()=>{}); |
| | | } |
| | | |
| | | } |
| | | comparDate(dateValue) { |
| | | return new Date().getTime() >= new Date(dateValue).getTime() + 3600 * 1000 * 24; |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-09 13:27:59 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-10-11 17:59:10 |
| | | */ |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-14 13:04:53 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:46:11 |
| | | * @LastEditTime: 2023-10-10 17:41:57 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | this.handleConfirmClick("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?"); |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent); |
| | | } |
| | | showToast(msg,type) { |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:46:40 |
| | | * @LastEditTime: 2023-10-10 17:42:13 |
| | | */ |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-11 09:20:29 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-26 09:32:55 |
| | | * @LastEditTime: 2023-10-10 17:47:00 |
| | | */ |
| | | import { api, wire,LightningElement, track } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-06-20 14:37:24 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-13 15:03:09 |
| | | * @LastEditTime: 2023-10-11 16:54:13 |
| | | */ |
| | | import { api, wire,LightningElement, track } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | var usrname = this.userName; |
| | | var rtn = ''; |
| | | console.log("start"); |
| | | if(header.includes(usrname)){ |
| | | if(header != undefined && header != null && header != '' && header.includes(usrname)){ |
| | | rtn = 'Y'; |
| | | }else{ |
| | | rtn = 'N'; |
| | |
| | | } |
| | | } |
| | | showToast(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | if(type==='success'){ |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | window.location.href = '/lightning/r/Solution_Programme__c/'+this.recordId+'/view'; |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-06-21 10:42:48 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:47:51 |
| | | * @LastEditTime: 2023-10-10 17:44:41 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | import {loadStyle} from 'lightning/platformResourceLoader'; |
| | | export default class LexUpdateToOpp extends LightningElement { |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-03-27 14:05:59 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:48:12 |
| | | * @LastEditTime: 2023-10-10 17:45:01 |
| | | */ |
| | | import { LightningElement, wire, track, api } from "lwc"; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | updateRecordView(recordId) { |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | getUserId(userName){ |
| | | getUserIdByName({ |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-03-27 14:08:56 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:49:02 |
| | | * @LastEditTime: 2023-10-10 17:45:58 |
| | | */ |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-03-27 14:11:17 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:49:23 |
| | | * @LastEditTime: 2023-10-10 17:46:16 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-03-27 13:39:23 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-14 16:49:45 |
| | | * @LastEditTime: 2023-10-10 17:46:31 |
| | | */ |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | |
| | | Submit () { |
| | | if (this.status != "草案中") { |
| | | this.showToast("不是草案中不能点击","error"); |
| | |
| | | display: flex; |
| | | } |
| | | .inputBox input { |
| | | padding-left: 10px; |
| | | padding-left: 100px; |
| | | cursor: pointer; |
| | | } |
| | | .eachItem:hover { |
| | | background-color: #F1F1F1; |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-25 17:41:26 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-27 17:36:59 |
| | | * @LastEditTime: 2023-10-11 11:34:42 |
| | | --> |
| | | |
| | | <!-- Code by CafeForce || www.cafeforce.com || support@cafeforce.com || Mandatory Header --> |
| | |
| | | <div class="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click slds-is-open" aria-expanded="true" aria-haspopup="listbox" role="combobox"> |
| | | <!-- Search Input --> |
| | | <div class="slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right" role="none"> |
| | | <lightning-input data-id="myinput" disabled={disabled} class="inputBox" placeholder={placeholder} onblur={blurEvent} onclick={showOptions} onkeyup={filterOptions} value={searchString} auto-complete="off" variant="label-hidden" id="combobox-id-1"></lightning-input> |
| | | <lightning-input data-id="myinput" disabled={disabled} onblur={blurEvent} class="inputBox" placeholder={placeholder} onclick={showOptions} onkeyup={filterOptions} value={searchString} auto-complete="off" variant="label-hidden" id="combobox-id-1"></lightning-input> |
| | | <lightning-icon class="slds-input__icon slds-input__icon_right slds-icon-utility-down slds-icon_container" icon-name="utility:down" size="x-small" alternative-text="search"></lightning-icon> |
| | | </div> |
| | | <!-- Dropdown List --> |
| | | <template if:true={showDropdown}> |
| | | <div id="listbox-id-1" class="slds-dropdown slds-dropdown_length-5 slds-dropdown_fluid" role="listbox"><!--style="{! 'max-height:' + (8 + (v.recordCount * 40)) + 'px' }""--> |
| | | <div onmousedown={dontClose} onopen={handlePayModeOpen} data-id=“scrollSec” id="listbox-id-1" class="slds-dropdown slds-dropdown_length-5 slds-dropdown_fluid" role="listbox"><!--style="{! 'max-height:' + (8 + (v.recordCount * 40)) + 'px' }""--> |
| | | <ul class="slds-listbox slds-listbox_vertical recordListBox" role="presentation"> |
| | | <template if:false={message} > |
| | | <template for:each={optionData} for:item="option"> |
| | | <template if:true={option.isVisible}> |
| | | <li key={option.value} data-id={option.value} onmousedown={selectItem} class="slds-listbox__item eachItem"> |
| | | <li key={option.value} data-id={option.value} onclick={selectItem} class="slds-listbox__item eachItem"> |
| | | <div id="option724" class="slds-media slds-listbox__option slds-listbox__option_plain slds-media_small" role="option"> |
| | | <template if:true={option.selected}> |
| | | <lightning-icon icon-name="utility:check" size="x-small" alternative-text="icon" ></lightning-icon> |
| | |
| | | /* Code by CafeForce || www.cafeforce.com || support@cafeforce.com || Mandatory Header */ |
| | | import { LightningElement, track, api } from 'lwc'; |
| | | |
| | | import lexHandCss from '@salesforce/resourceUrl/lexHandCss'; |
| | | import {loadStyle} from 'lightning/platformResourceLoader'; |
| | | export default class MultiSelectCombobox extends LightningElement { |
| | | |
| | | @api options; |
| | |
| | | @api placeholder = '--无--'; |
| | | @track errorFlag = false; |
| | | connectedCallback() { |
| | | Promise.all([ |
| | | loadStyle(this, lexHandCss) |
| | | ]); |
| | | this.showDropdown = false; |
| | | var optionData = this.options ? (JSON.parse(JSON.stringify(this.options))) : null; |
| | | var value = this.selectedValue ? (JSON.parse(JSON.stringify(this.selectedValue))) : null; |
| | |
| | | |
| | | get isRequired() { |
| | | return this.required; |
| | | } |
| | | closeAction(){ |
| | | this.showDropdown = false; |
| | | } |
| | | handlePayModeOpen() { |
| | | setTimeout(() => { |
| | | const topDiv = this.template.querySelector('[data-id="scrollSec"]'); |
| | | topDiv.scrollTop = topDiv.scrollHeight; |
| | | }, 20); |
| | | } |
| | | |
| | | filterOptions(event) { |
| | |
| | | event.preventDefault(); |
| | | else |
| | | this.showDropdown = false; |
| | | this.dispatchEvent(new CustomEvent('select', { |
| | | detail: { |
| | | 'payloadType' : 'multi-select', |
| | | 'payload' : { |
| | | 'value' : this.value, |
| | | 'values' : this.values |
| | | } |
| | | } |
| | | })); |
| | | } |
| | | } |
| | | |
| | | dontClose(event){ |
| | | event.preventDefault(); |
| | | } |
| | | |
| | | showOptions() { |
| | |
| | | |
| | | this.showDropdown = false; |
| | | |
| | | this.dispatchEvent(new CustomEvent('select', { |
| | | detail: { |
| | | 'payloadType' : 'multi-select', |
| | | 'payload' : { |
| | | 'value' : this.value, |
| | | 'values' : this.values |
| | | } |
| | | } |
| | | })); |
| | | |
| | | } |
| | | } |
| | | /* |
| | |
| | | <!-- |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-09 13:28:00 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-23 12:14:01 |
| | | --> |
| | | <template> |
| | | <!-- <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> --> |
| | | <!-- 成功 --> |
| | | <div> |
| | | |
| | | </div> |
| | | <div> |
| | | <template if:true={visible}> |
| | | <template if:true={isSuccess}> |
| | | <div class="slds-notify_container slds-is-relative" style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;"> |
| | | <div class="slds-notify slds-notify_toast slds-theme_success" role="status"> |
| | | <lightning-icon class="white" icon-name="utility:success" alternative-text="success" variant="inverse" size="small" ></lightning-icon> |
| | | <div class="slds-notify__content" style="padding-left: 20px;"> |
| | | <h2 style="color:white;font-size:large">{message}</h2> |
| | | </div> |
| | | <div class="slds-notify__close"> |
| | | <lightning-button-icon icon-name="utility:close" variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon> |
| | | </div> |
| | | <div style="float:right"> |
| | | <div class="demo-only demo-only_viewport" style="height:4.5rem;" if:true={Tongzhishow}> |
| | | <div class="slds-notification-container" style={IsLeftStyle}> |
| | | <div aria-live="assertive" aria-atomic="true" class="slds-assistive-text" style="color:#fff">提示</div> |
| | | <section class="slds-notification" style="border: none;display:flex;width:auto;margin: 0 5px 0 10px;" role="dialog" aria-labelledby="noti77" aria-describedby="dialog-body-id-43"> |
| | | <div class="slds-notification__body" style="min-width: 300px;" id="dialog-body-id-43"> |
| | | <a class="slds-notification__target slds-media" href="#" style={BgColorStyle}> |
| | | <span class="slds-icon_container slds-media__figure" title="task"> |
| | | <lightning-icon icon-name={TongzhiIcon} alternative-text="Account" variant="inverse" title="Account" size="small" ></lightning-icon> |
| | | </span> |
| | | <div class="slds-media__body"> |
| | | <!-- <h2 class="slds-text-heading_small slds-m-bottom_xx-small" id="noti77"> |
| | | <span class="slds-assistive-text" style="color:#fff">task notification:</span>提示 |
| | | </h2> --> |
| | | <p style="color:#fff;font-size:var(--lwc-fontSize5,1rem)">{SaveShowText}</p> |
| | | </div> |
| | | </div> |
| | | <!-- <div style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;"> |
| | | <div class="slds-notify_container slds-is-relative"> |
| | | <div class="slds-notify slds-notify_toast slds-theme_default slds-box slds-box_small" style="background-color:rgb(46, 132, 74);" role="success"> |
| | | <div class="slds-align_absolute-center"> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | </template> |
| | | <template if:false={isSuccess}> |
| | | <!-- <div style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;"> |
| | | <div class="slds-notify_container slds-is-relative"> |
| | | <div class="slds-notify slds-notify_toast slds-theme_default slds-box slds-box_small" style="background-color:rgb(234, 0, 30);" role="success"> |
| | | <div class="slds-align_right"> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <div class="slds-notify_container slds-is-relative" style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;"> |
| | | <div class="slds-notify slds-notify_toast slds-theme_error" role="status"> |
| | | <lightning-icon class="white" icon-name="utility:error" size="small" variant="inverse"></lightning-icon> |
| | | <div class="slds-notify__content" style="padding-left: 20px;"> |
| | | <h2 style="color:white;font-size:large">{message}</h2> |
| | | </div> |
| | | <div class="slds-notify__close"> |
| | | <lightning-button-icon icon-name="utility:close" variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </template> |
| | | <button class="slds-button slds-button_icon slds-button_icon-container" title="close" style="height: 100%;"> |
| | | <lightning-icon icon-name="utility:close" alternative-text="close" variant="inverse" title="close" size="small" onclick={CloseAlert}></lightning-icon> |
| | | </button> |
| | | </a> |
| | | |
| | | <!-- <button class="slds-button slds-button_icon slds-button_icon-container slds-notification__close" |
| | | title="close"> |
| | | <div onclick={CloseAlert} style="color: #fff;">x</div> |
| | | </button> --> |
| | | </div> |
| | | </section> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="exampleHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner> |
| | |
| | | IsLeftStyle = "" //提示框的样式 |
| | | BgColorStyle = "" |
| | | toastTime = null; |
| | | isSuccess = false; |
| | | message; |
| | | visible; |
| | | closeAction(){ |
| | | this.visible = false; |
| | | } |
| | | showToast(msg,type) { |
| | | try { |
| | | if(type == 'success'){ |
| | | this.isSuccess = true; |
| | | }else{ |
| | | this.isSuccess = false; |
| | | } |
| | | this.message = msg; |
| | | this.visible = true; |
| | | let delay = 5000; |
| | | console.log(this.message); |
| | | console.log('1'); |
| | | // setTimeout(() => { |
| | | // this.visible = false; |
| | | // }, delay ); |
| | | } catch (error) { |
| | | console.log(error); |
| | | } |
| | | |
| | | |
| | | } |
| | | IsLeftStyle = "width: 100%;top: 14%;display: flex;justify-content: center;" |
| | | Alert(content,error = false,left = false){ |
| | | this.Tongzhishow = false |
| | | clearTimeout(this.toastTime) |
| | |
| | | |
| | | if (error) { |
| | | this.TongzhiIcon = "utility:error"; |
| | | this.BgColorStyle = "background-color:#ba0517 !important;padding: 9px 9px 9px 18px;"; |
| | | this.BgColorStyle = "background-color:#ba0517 !important;padding:0.65rem 0.75rem 0.65rem 1.25rem;"; |
| | | }else{ |
| | | this.TongzhiIcon = "utility:success"; |
| | | this.BgColorStyle = "background-color:rgb(46, 132, 74)!important;padding: 9px 9px 9px 18px;"; |
| | | toastTime = setTimeout(() => { |
| | | this.Tongzhishow = false |
| | | },3000) |
| | | this.BgColorStyle = "background-color:rgb(46, 132, 74)!important;padding:0.65rem 0.75rem 0.65rem 1.25rem;"; |
| | | // this.toastTime = setTimeout(() => { |
| | | // this.Tongzhishow = false |
| | | // },3000) |
| | | } |
| | | // if (left) { |
| | | // // this.IsLeftStyle = "left: 0.25rem;" |
| | | this.IsLeftStyle = "width: 100%;top: 14%;display: flex;justify-content: center;" |
| | | // }else{ |
| | | // this.IsLeftStyle = "color:#fff" |
| | | // } |
| | |
| | | if (isloading == 2) { |
| | | this.OnLoading(false); |
| | | if (flag) { |
| | | // this.Alert("保存成功",false); |
| | | this.showToast('保存成功','success'); |
| | | this.Alert("保存成功",false); |
| | | } |
| | | } |
| | | }) |
| | |
| | | if (isloading == 2) { |
| | | this.OnLoading(false); |
| | | if (flag) { |
| | | // this.Alert("保存成功",false); |
| | | this.showToast('保存成功','success'); |
| | | this.Alert("保存成功",false); |
| | | } |
| | | } |
| | | |
| | |
| | | isloading ++; |
| | | if (isloading == 2) { |
| | | this.OnLoading(false); |
| | | // this.Alert("保存成功",false); |
| | | this.showToast('保存成功','success'); |
| | | this.Alert("保存成功",false); |
| | | } |
| | | }) |
| | | |
| | |
| | | isloading ++; |
| | | if (isloading == 2) { |
| | | this.OnLoading(false); |
| | | // this.Alert("保存成功",false); |
| | | this.showToast('保存成功','success'); |
| | | this.Alert("保存成功",false); |
| | | } |
| | | }) |
| | | } |
| | |
| | | var flag = this.compareSelected(); |
| | | if (flag == false) { |
| | | this.OnLoading(false); |
| | | // this.Alert("医院不匹配,保存失败!",true); |
| | | this.showToast('医院不匹配,保存失败!','error'); |
| | | this.Alert("医院不匹配,保存失败!",true); |
| | | return; |
| | | } |
| | | debugger; |
| | |
| | | this.UpdateDatas(this.notselected); |
| | | window.location.hash = "Refresh"+"=="+this.ParamIdStr; |
| | | this.OnLoading(false); |
| | | // this.Alert('保存成功',false); |
| | | this.showToast('保存成功','success'); |
| | | this.Alert('保存成功',false); |
| | | }else{ |
| | | this.OnLoading(false); |
| | | // this.Alert(response,true); |
| | | this.showToast(response,'error'); |
| | | this.Alert(response,true); |
| | | } |
| | | |
| | | }); |
| | |
| | | top.window.close(); |
| | | } |
| | | </script> |
| | | <style> |
| | | .headerStyle{ |
| | | border-right: ridge !important; |
| | | } |
| | | .headerStyle1{ |
| | | font-weight: 600 !important; |
| | | } |
| | | </style> |
| | | |
| | | <apex:outputPanel id="all"> |
| | | <apex:outputPanel id="message1"> |
| | |
| | | </apex:outputPanel> |
| | | <apex:form id="mainForm"> |
| | | <apex:pageBlock id="idSearchSetProduct" title="特价医院选择"> |
| | | <table width="750" style="background-color:#DCDCDC"> |
| | | <apex:facet name="header"> |
| | | <span style="font-size: initial;font-weight: 600;">特价医院选择</span> |
| | | </apex:facet> |
| | | <table width="750" border="0" style="background-color:#DCDCDC"> |
| | | <colgroup> |
| | | <col width="12" /> |
| | | <col width="5" /> |
| | | <col width="20" /> |
| | | <col width="20" /> |
| | | <col width="200" /> |
| | | <col width="300" /> |
| | | <col width="20" /> |
| | | <col width="428" /> |
| | | </colgroup> |
| | | <tr> |
| | | <td> </td> |
| | | <th style="width: 66px;">{!$Label.Search_Condition}</th> |
| | | <td></td> |
| | | <th style="width:100px;">{!$Label.Search_Condition}</th> |
| | | <th>医院名称</th> |
| | | <td> </td> |
| | | <td> </td> |
| | | </tr> |
| | | <tr> |
| | | <td> </td> |
| | | <td> </td> |
| | | <td> </td> |
| | | <td><apex:inputText id="searchName" value="{!SearchName}" style="width:200px" required="false"/></td> |
| | |
| | | <th valign="top">{!$Label.Search_Result}</th> |
| | | <td width="20"> </td> |
| | | <td> |
| | | <table border="0" style="border-left: 0px;border-right: 0px;"> |
| | | <table class="slds-table" border="0" style="border-left: 0px;border-right: 0px;"> |
| | | <tr> |
| | | <td> |
| | | <div id="iframelike" style="width:665px"> |
| | | <apex:pageBlockTable style="border-left: 0px;border-right: 0px;" id="idRezultVisitor" value="{!at}" var="c" border="1" columns="3" columnsWidth="200px,100px,350px"> |
| | | <apex:column > |
| | | <apex:pageBlockTable style="border-left: 1px;border-right: 1px;" id="idRezultVisitor" value="{!at}" var="c" border="1" columns="3" columnsWidth="200px,100px,350px"> |
| | | <apex:column headerClass="headerStyle headerStyle1"> |
| | | <apex:facet name="header">医院名称</apex:facet> |
| | | <apex:outputLink id="contactName" value="{!c.Name}" onclick="setProductOne('{!c.Name}','{!c.Id}');return false;">{!c.Name}</apex:outputLink> |
| | | </apex:column> |
| | | <apex:column > |
| | | <apex:column headerClass="headerStyle headerStyle1"> |
| | | <apex:facet name="header">省份</apex:facet> |
| | | <apex:outputField id="State_Master" value="{!c.State_Master__r.Name}" /> |
| | | </apex:column> |
| | | <apex:column > |
| | | <apex:column headerClass="headerStyle1"> |
| | | <apex:facet name="header">地址</apex:facet> |
| | | <apex:outputField id="Alternative" value="{!c.Address__c}" /> |
| | | </apex:column> |