| | |
| | | public Boolean checkexact { get; set; } // 20230110 gzw 订单号精确查询用 |
| | | public AssetModifyBelongsChange__c ambc { get; set; } |
| | | public static List<SelectOption> textOpts { get; private set; } |
| | | public static Account ir { get; set; } |
| | | //public static List<SelectOption> changeReasonOpts { get; private set; } |
| | | static { |
| | | textOpts = new List<SelectOption>(); |
| | |
| | | Id = ApexPages.currentPage().getParameters().get('Id'); |
| | | |
| | | statusEdit = ApexPages.currentPage().getParameters().get('KeyWords'); |
| | | System.debug('Id:'+Id+' accountId:'+RawAccountId+' KeyWords:'+statusEdit); |
| | | assetModifyBelongsChangeDetailRecords = new List<AssetModifyBelongsChangeDetailInfo>(); |
| | | assetModifyBelongsChangeDetailRecordsview = new List<AssetModifyBelongsChangeDetailInfo>(); |
| | | editAble = false; |
| | |
| | | pageLimit = Integer.valueOf(System.Label.orderdetPageLimitsize); |
| | | |
| | | attachments = new List<Attachment>(); |
| | | List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId |
| | | FROM ContentDocumentLink |
| | | WHERE LinkedEntityId = :Id]; |
| | | List<ID> fileIDs = new List<ID>(); |
| | | for (ContentDocumentLink docLink : cdlList) { |
| | | fileIDs.add(docLink.ContentDocumentId); |
| | | //update 李文涛 2023/07/13 更新lightning附件上传 start |
| | | if(String.isNotBlank(Id)){ |
| | | List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId |
| | | FROM ContentDocumentLink |
| | | WHERE LinkedEntityId = :Id]; |
| | | List<ID> fileIDs = new List<ID>(); |
| | | for (ContentDocumentLink docLink : cdlList) { |
| | | fileIDs.add(docLink.ContentDocumentId); |
| | | } |
| | | contents=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs]; |
| | | } |
| | | contents=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs]; |
| | | //update 李文涛 2023/07/13 更新lightning附件上传 end |
| | | } |
| | | |
| | | public boolean getcheckUser() { |
| | |
| | | if (String.isNotBlank(val1)) { |
| | | val1 = val1.trim(); |
| | | } |
| | | String soql=''; |
| | | System.debug(RawAccountId); |
| | | RawAccountId=''; |
| | | if(String.isBlank(RawAccountId)){ |
| | | soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'\''; |
| | | System.debug('id is null'); |
| | | } |
| | | else { |
| | | soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'' + RawAccountId + '\''; |
| | | System.debug('id is not null'); |
| | | } |
| | | String soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'' + RawAccountId + '\''; |
| | | if (!String.isBlank(text1)) { |
| | | if (text1 == 'Order_No__c' && checkexact) { |
| | | soql += ' AND (' + text1 + ' = \'' + String.escapeSingleQuotes(val1) + '\' )'; |
| | |
| | | //跳转到上传附件页面 |
| | | public PageReference uploadingAttachment() { |
| | | PageReference ref = new Pagereference('/p/attach/NoteAttach?pid=' + Id + '&retURL=%2Fapex/AssetModifyBelongs?Id=' + Id); |
| | | |
| | | |
| | | //PageReference ref = new Pagereference('/lightning/n/Excel?objectApiName&context=RECORD_DETAIL&backgroundContext=%2Flightning%2Fr%2FAssetModifyBelongsChange__c%2F'+Id+'%2Fedit%3F0.source%3DalohaHeader&0.source='+Id+'&0.recordId='+Id+''); |
| | | |
| | | |
| | | ref.setRedirect(true); |
| | | return ref; |
| | | } |
| | | //update 李文涛 2023/07/13 更新lightning附件上传 start |
| | | //跳转到上传附件页面(lightning) |
| | | public PageReference uploadingAttachmentLightning() { |
| | | //PageReference ref = new Pagereference('/p/attach/NoteAttach?pid=' + Id + '&retURL=%2Fapex/AssetModifyBelongs?Id=' + Id); |
| | | PageReference ref = new Pagereference('/lightning/n/lightning?backgroundContext=%2Flightning%2Fr%2FAssetModifyBelongsChange__c%2F'+Id+'%2Fedit%3Fcount%3D1&0.recordId='+Id+''); |
| | | PageReference ref = new Pagereference('/lightning/n/LexUploadPage?0.recordId='+Id+''); |
| | | |
| | | ref.setRedirect(true); |
| | | return ref; |
| | | } |
| | | //update 李文涛 2023/07/13 更新lightning附件上传 end |
| | | // CHAN-BC6BV2 XHL AddEnd 20190522 |
| | | // 重新刷新 |
| | | public PageReference returnChangePage() { |