| | |
| | | } |
| | | } |
| | | //附件 |
| | | attachmentinfo = [SELECT Id, Name, OwnerId, Owner.Name FROM Attachment WHERE parentid = :ESetId]; |
| | | if (attachmentinfo.size() > 0) { |
| | | for (Integer i = 0; i < attachmentinfo.size(); i++) { |
| | | attachmentRecoeds.add(new ConsumableorderdetailsInfo(attachmentinfo[i])); |
| | | // attachmentinfo = [SELECT Id, Name, OwnerId, Owner.Name FROM Attachment WHERE parentid = :ESetId]; |
| | | // if (attachmentinfo.size() > 0) { |
| | | // for (Integer i = 0; i < attachmentinfo.size(); i++) { |
| | | // attachmentRecoeds.add(new ConsumableorderdetailsInfo(attachmentinfo[i])); |
| | | // } |
| | | // } |
| | | |
| | | List<ContentVersion> cvInfo = [SELECT Id, Title, OwnerId,Owner.Name, CreatedDate FROM ContentVersion WHERE FirstPublishLocationId = :ESetId]; |
| | | if (cvInfo.size() > 0) { |
| | | for (Integer i = 0; i < cvInfo.size(); i++) { |
| | | attachmentRecoeds.add(new ConsumableorderdetailsInfo(cvInfo[i])); |
| | | } |
| | | } |
| | | // |
| | | consumableorderdetailsRecords.sort(); |
| | | getPageInfo(); |
| | | } |
| | |
| | | Results results = new Results(); |
| | | try { |
| | | base64Data = EncodingUtil.urlDecode(base64Data, 'UTF-8'); |
| | | Blob contentBlob = EncodingUtil.base64Decode(base64Data); |
| | | Attachment att = new Attachment(); |
| | | att.ParentId = pId; |
| | | att.Name = fileName; |
| | | att.Body = contentBlob; |
| | | insert att; |
| | | ContentVersion cv = new ContentVersion(); |
| | | cv.Title = fileName; |
| | | cv.PathOnClient = '/' + fileName; |
| | | cv.FirstPublishLocationId = pId; |
| | | cv.VersionData = EncodingUtil.base64Decode(base64Data); |
| | | cv.IsMajorVersion = true; |
| | | insert cv; |
| | | results.result = 'Success'; |
| | | } catch (Exception e) { |
| | | results.result = 'Fail'; |
| | |
| | | String hospitalIdStr |
| | | ) { |
| | | ESetId = ''; |
| | | return save(contractNameStr,cocStr,agencyProTypeStr,accountidStr,consumableorderdetailsRecordsviewStr,contactDealerStr,methodType,ESetId,hospitalIdStr); |
| | | return save(contractNameStr,cocStr,agencyProTypeStr,accountidStr,consumableorderdetailsRecordsviewStr,contactDealerStr,methodTypeStr,ESetId,hospitalIdStr); |
| | | } |
| | | |
| | | //保存按钮 |
| | |
| | | if(con.Prod != null){ |
| | | con.recordId = con.Prod.Id; |
| | | if(!con.oldCheck){ |
| | | con.prodName = con.Prod.Name; |
| | | con.prodName = con.Prod.Name__c; |
| | | // System.debug('ProdName:'+con.Prod.Id+'---'+con.Prod.Name__c); |
| | | } |
| | | con.prodSFDAStatus = con.Prod.SFDA_Status__c; |
| | | con.prodCategory3 = con.Prod.Category3__c; |
| | |
| | | con.prodIntraTradeList = con.Prod.Intra_Trade_List_RMB__c; |
| | | } |
| | | if(con.esd != null){ |
| | | if(con.oldCheck){ |
| | | con.prodName = con.esd.Consumable_Product__r.Name__c; |
| | | } |
| | | // if(con.oldCheck){ |
| | | // con.prodName = con.esd.Consumable_Product__r.Name__c; |
| | | // } |
| | | con.consumableCount = con.esd.Consumable_count__c; |
| | | } |
| | | } |
| | |
| | | @AuraEnabled |
| | | public Boolean canSelect { get; set; } |
| | | @AuraEnabled |
| | | public Attachment Concc { get; set; } |
| | | public ContentVersion Concc { get; set; } |
| | | @AuraEnabled |
| | | public Boolean sortBy { get; set; } |
| | | @AuraEnabled |
| | |
| | | allnumber_piece = 0; |
| | | } |
| | | //附件 |
| | | public ConsumableorderdetailsInfo(Attachment e) { |
| | | public ConsumableorderdetailsInfo(ContentVersion e) { |
| | | Concc = e; |
| | | } |
| | | // 排序Consumable_order__c |