| | |
| | | //LJPH-C6A3DF 【委托】 【重要】产品主数据中增加服务用产品分类 liuyan 20210908 Star |
| | | public List<Maintenance_Product_Data_Details__c> RepairInfo { |
| | | get { |
| | | // 20231103 陈京武 sitbug对应 Start |
| | | return [select id,Service_Category6__c,Service_Category7__c FROM Maintenance_Product_Data_Details__c where Default_Fixture_Arrival_Product__c = '' and Service_Category6__c = null and Service_Category7__c = null LIMIT 1 ]; |
| | | // 20231103 陈京武 sitbug对应 End |
| | | } |
| | | } |
| | | //LJPH-C6A3DF 【委托】 【重要】产品主数据中增加服务用产品分类 liuyan 20210908 End |
| | |
| | | public Boolean editDelCommitBtnDisabled {get; private set;} |
| | | public Boolean saveBtnDisabled { get; private set; } |
| | | //public Boolean sorderBtnDisabled { get; private set; } |
| | | // 20231103 chenjingwu Lightning文件修改 Start |
| | | private List<ContentDocument> attachmentinfo = new List<ContentDocument>(); |
| | | // 20231103 chenjingwu Lightning文件修改 End |
| | | //----------- |
| | | |
| | | private void initStandardController(){ |
| | |
| | | } |
| | | } |
| | | //附件(lightning) |
| | | // 20231103 chenjingwu Lightning文件修改 Start |
| | | List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId |
| | | FROM ContentDocumentLink |
| | | WHERE LinkedEntityId = :id]; |
| | |
| | | fileIDs.add(docLink.ContentDocumentId); |
| | | } |
| | | attachmentinfo=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs]; |
| | | |
| | | // attachmentinfo =[SELECT Id, Name,OwnerId FROM Attachment WHERE parentid =:id ]; |
| | | // 20231103 chenjingwu Lightning文件修改 End |
| | | if(attachmentinfo.size()>0){ |
| | | for (Integer i = 0; i < attachmentinfo.size(); i++) { |
| | | attachmentRecoeds.add(new MaintenanceProductDataDetailsInfo(attachmentinfo[i])); |
| | |
| | | // 显示数据条数信息 |
| | | makeMessage(); |
| | | } |
| | | // 20231103 chenjingwu Lightning文件修改 Start |
| | | public void refreshFile(){ |
| | | if(String.isBlank(id)){ |
| | | return; |
| | | } |
| | | attachmentRecoeds = new List<MaintenanceProductDataDetailsInfo>(); |
| | | List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId |
| | | FROM ContentDocumentLink |
| | | WHERE LinkedEntityId = :id]; |
| | | List<ID> fileIDs = new List<ID>(); |
| | | for (ContentDocumentLink docLink : cdlList) { |
| | | fileIDs.add(docLink.ContentDocumentId); |
| | | } |
| | | attachmentinfo=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs]; |
| | | |
| | | // attachmentinfo =[SELECT Id, Name,OwnerId FROM Attachment WHERE parentid =:id ]; |
| | | if(attachmentinfo.size()>0){ |
| | | for (Integer i = 0; i < attachmentinfo.size(); i++) { |
| | | attachmentRecoeds.add(new MaintenanceProductDataDetailsInfo(attachmentinfo[i])); |
| | | } |
| | | } |
| | | } |
| | | // 20231103 chenjingwu Lightning文件修改 End |
| | | public PageReference save() { |
| | | Integer FLG = 0; |
| | | Integer Count = 0; |
| | |
| | | return ref; |
| | | } |
| | | //上传附件 |
| | | // 20231103 陈京武 Lightning文件修改 Start |
| | | public PageReference FilesUpload(){ |
| | | PageReference ref = new Pagereference('/p/attach/NoteAttach?pid='+id+'&retURL=%2F' + '/apex/MaintenanceProductData?id=' +id); |
| | | ref.setRedirect(true); |
| | |
| | | ref.setRedirect(true); |
| | | return ref; |
| | | } |
| | | // 20231103 陈京武 Lightning文件修改 Start |
| | | // 提交按钮 |
| | | public PageReference Submitmpd() { |
| | | //List<Maintenance_Product_Data__c> qs = New List<Maintenance_Product_Data__c>(); |
| | |
| | | public PageReference returnMpdPage(){ |
| | | PageReference ref; |
| | | if(String.isBlank(id)){ |
| | | // 20231103 陈京武 Lightning文件修改 Start |
| | | // ref = new Pagereference(ApexPages.currentPage().getParameters().get('retURL')); |
| | | ref = new Pagereference('/lightning/o/Maintenance_Product_Data__c/list?filterName=Recent'); |
| | | // 20231103 陈京武 Lightning文件修改 End |
| | | }else{ |
| | | ref = new Pagereference('/'+id); |
| | | } |
| | |
| | | public Boolean canSelect { get; set; } |
| | | public Product2 Prod { get; set; } |
| | | public Maintenance_Product_Data_Details__c mpdrdd {get; set;} |
| | | // 20231103 chenjingwu Lightning文件修改 Start |
| | | public ContentDocument Concc { get; set; } |
| | | // 20231103 chenjingwu Lightning文件修改 End |
| | | |
| | | public MaintenanceProductDataDetailsInfo(Maintenance_Product_Data_Details__c e) { |
| | | check = true; |
| | |
| | | canSelect = true; |
| | | } |
| | | //附件 |
| | | // 20231103 chenjingwu Lightning文件修改 Start |
| | | public MaintenanceProductDataDetailsInfo(ContentDocument e) { |
| | | Concc = e; |
| | | } |
| | | // 20231103 chenjingwu Lightning文件修改 End |
| | | } |
| | | class MpdDetailsInfo { |
| | | public Boolean check { get; set; } |