EquipmentSetShippmentReceived5changebyRentalApplyFault
备品检测报告相关的备品页面的修改
 
	
	
	
	
	
	
	
	
	
	
	
	
	
 |  |  | 
 |  |  |                 select AssetName__c, SerialNumber_F__c, Repair_Status_F__c, OnStock_By_Cancel__c, Inspection_Comment__c,Inspection_result_after_Final__c, Inspection_result_after_NG_Final__c, Check_lost_Item_F__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, Fixture_QRCode_F__c, Rental_Apply_Equipment_Set__r.Name, Pre_inspection_time__c, StockDown__c, StockDown_time__c, Id, Name, Asset__c, Asset__r.Name, Asset__r.SerialNumber, Asset__r.Product_Serial_No__c, | 
 |  |  |                        Asset__r.Remark__c, Asset__r.ImageAsset__c, Asset__r.ImageSerial__c, Asset__r.ImageAssetUploadedTime__c, Asset__r.ImageSerialUploadedTime__c, | 
 |  |  |                        Loaner_CDS_Info__c, Inspection_result__c, Check_lost_Item__c, Pre_disinfection__c, Water_leacage_check__c, Inspection_result_after__c, Arrival_in_wh__c, | 
 |  |  |                        Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c, | 
 |  |  |                        Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c | 
 |  |  |                        Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c, Rental_Apply__r.Name, Rental_Apply__r.Hospital__c, Rental_Apply__r.Hospital__r.Name, | 
 |  |  |                        Rental_Apply__r.Person_In_Charge__c, Rental_Apply__r.Person_In_Charge__r.Name, Rental_Apply__r.demo_purpose2__c, Rental_Apply__r.WorkPlace__c, Rental_Apply__r.OCM_dept_category__c, Fixture_Model_No__c, | 
 |  |  |                        Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c, Is_Body__c | 
 |  |  |                   from Rental_Apply_Equipment_Set_Detail__c | 
 |  |  |                  where Rental_Apply_Equipment_Set__c in :esIds | 
 |  |  |                    and ((Shipment_request_time2__c <> null and Cancel_Select__c = False ) or Repair_Status_F__c = '修理完毕') | 
 |  |  | 
 |  |  |         // 回库はSet単位で、明細一つ一つのquickCheck要らない | 
 |  |  |         public boolean quickCheck { get; set; } | 
 |  |  |         public boolean editable { get; set; } | 
 |  |  |         // 备品借出申请故障报告 按钮显示逻辑 | 
 |  |  |         public boolean showFaultRepor { get; set;} | 
 |  |  |         public String faultReportFlag { get; set;} | 
 |  |  |         public String personInChargeId { get; set;} | 
 |  |  |         public String personInChargeName { get; set;} | 
 |  |  |         public String demoPurpose2 { get; set;} | 
 |  |  |         public String raName { get; set;} | 
 |  |  |         public String hospitalId { get; set;} | 
 |  |  |         public String hospitalName { get; set;} | 
 |  |  |         public String workPlace { get; set;} | 
 |  |  |         public String deptCategory { get; set;} | 
 |  |  |  | 
 |  |  |         public EsdInfo(Rental_apply_equipment_Set_Detail__c rec) { | 
 |  |  |             this.rec = rec; | 
 |  |  | 
 |  |  |             if (rec.Asset__r.ImageSerialUploadedTime__c != null) { | 
 |  |  |                 imageSerialUploadedTime = rec.Asset__r.ImageSerialUploadedTime__c.format('yyyy/MM/dd HH:mm'); | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             //当明细 设备为主体 且 NG时 显示按钮 | 
 |  |  |             if (rec.Is_Body__c == true && rec.Inspection_result_after__c == 'NG'){ | 
 |  |  |                 showFaultRepor = true; | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             List<Rental_Apply_Fault__c> rafList = [SELECT Id ,status__c ,Rental_Apply_Equipment_Set_Detail__c from Rental_Apply_Fault__c where Rental_Apply_Equipment_Set_Detail__c = :rec.Id Order By CreatedDate DESC LIMIT 1]; | 
 |  |  |              | 
 |  |  |              | 
 |  |  |             if( rafList != null && rafList.size() > 0 ){          | 
 |  |  |                 this.faultReportFlag = rafList[0].Id;     | 
 |  |  |             }else { | 
 |  |  |                 this.faultReportFlag = '不存在故障报告单'; | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             personInChargeId = rec.Rental_Apply__r.Person_In_Charge__c; | 
 |  |  |             personInChargeName = rec.Rental_Apply__r.Person_In_Charge__r.Name; | 
 |  |  |             demoPurpose2 = rec.Rental_Apply__r.demo_purpose2__c; | 
 |  |  |             raName = rec.Rental_Apply__r.Name; | 
 |  |  |             hospitalId = rec.Rental_Apply__r.Hospital__c; | 
 |  |  |             hospitalName = rec.Rental_Apply__r.Hospital__r.Name; | 
 |  |  |             workPlace = rec.Rental_Apply__r.WorkPlace__c; | 
 |  |  |             deptCategory = rec.Rental_Apply__r.OCM_dept_category__c; | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  | <apex:page Controller="EquipmentSetShippmentReceived5Controller" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="备品出库入库"> | 
 |  |  | <apex:page Controller="EquipmentSetShippmentReceived5Controller" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="备品出库入库" lightningStylesheets="true"> | 
 |  |  | <head> | 
 |  |  |     <meta name="format-detection" content="telephone=no"/> | 
 |  |  | </head> | 
 |  |  | 
 |  |  | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> | 
 |  |  | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> | 
 |  |  | <apex:includeScript value="{!URLFOR($Resource.instascan)}"/> | 
 |  |  | <apex:includeScript value="{!URLFOR($Resource.connection20)}"/> | 
 |  |  | <apex:stylesheet value="{!URLFOR($Resource.EquipmentSetShippmentReceivedcss)}"/> | 
 |  |  | <apex:stylesheet value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.css')}"/> | 
 |  |  | <apex:includeScript value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.js')}"/> | 
 |  |  |  | 
 |  |  | <script type="text/javascript"> | 
 |  |  | var Session_ID = '{!$Api.Session_ID}'; | 
 |  |  | function getQueryVariable(variable) | 
 |  |  | { | 
 |  |  |        var query = window.location.search.substring(1); | 
 |  |  | 
 |  |  |         }) | 
 |  |  |     } | 
 |  |  | } | 
 |  |  |  | 
 |  |  | function OpenRentalApplyFault(faultReportFlag, radetailId, radetailName, personId, personName, purpose2, name, hospitalId, hospitalName, serialNumber, fixtureNo, workPlace, deptCategory){ | 
 |  |  |     if(faultReportFlag == '不存在故障报告单'){ | 
 |  |  |         window.open("/a5F/e?Name=*" + "&CF00N9D000007hkLN_lKid=" + radetailId + "&CF00N9D000007hkLN=" + radetailName + "&CF00N9D000007jemP_lKid=" + personId + "&CF00N9D000007jemP=" + personName + "&00N9D000007jrE6=" + purpose2 + "&00N9D000007ijyA=" + name + "&CF00N9D000007jrEG_lKid=" + hospitalId + "&CF00N9D000007jrEG=" + hospitalName + "&00N9D000007jrEL=" + serialNumber + "&00N9D000007jrEQ=" + fixtureNo + "&00N9D000007jrEV=" + workPlace + "&00N9D000007jrJW=" + deptCategory); | 
 |  |  |     }else{ | 
 |  |  |         // if(confirm('是否打开或创建新的检测分析报告?')){ | 
 |  |  |         //     if (faultReportFlag == '存在故障报告单'){ | 
 |  |  |         //         window.open("/a5C/e?Name=*" + "&CF00N9D000007hkLN_lKid=" + radetailId + "&CF00N9D000007hkLN=" + radetailName + "&CF00N9D000007jemP_lKid=" + personId + "&CF00N9D000007jemP=" + personName + "&00N9D000007jrE6=" + purpose2 + "&00N9D000007ijyA=" + name + "&CF00N9D000007jrEG_lKid=" + hospitalId + "&CF00N9D000007jrEG=" + hospitalName + "&00N9D000007jrEL=" + serialNumber + "&00N9D000007jrEQ=" + fixtureNo + "&00N9D000007jrEV=" + workPlace + "&00N9D000007jrJW=" + deptCategory); | 
 |  |  |         //     }else{ | 
 |  |  |         //         window.open("/" + faultReportFlag); | 
 |  |  |         //     } | 
 |  |  |         // } | 
 |  |  |  | 
 |  |  |         if(confirm('已存在检测分析报告')){ | 
 |  |  |             window.open("/" + faultReportFlag); | 
 |  |  |         } | 
 |  |  |     }  | 
 |  |  | } | 
 |  |  |  | 
 |  |  | function filljs1() { | 
 |  |  |    j$("select[name$='inspectionResult']").val("OK"); | 
 |  |  |    j$("select[name$='inspectionResultNg']").prop("selectedIndex", 0); | 
 |  |  | 
 |  |  |                         <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', '', 'display: none;')}" data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" > | 
 |  |  |                             <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_F__c.label}: </span> --> | 
 |  |  |                             <span>检测结果: </span><span> | 
 |  |  |                             <apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" /> | 
 |  |  |                             </span> | 
 |  |  |                             <!-- <apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" /> --> | 
 |  |  |                             <output style="margin:3px;width:55px;text-align:left;margin-left:3px;margin-top:0px;float: left;">{!esdInfo.rec.Inspection_result_after__c}</output> | 
 |  |  |                             <apex:commandButton style="margin-top:0px;font-size: 9px !important;" onclick="OpenRentalApplyFault('{!esdInfo.faultReportFlag}', '{!esdInfo.rec.Id}', '{!esdInfo.rec.Name}','{!esdInfo.personInChargeId}','{!esdInfo.personInChargeName}','{!esdInfo.demoPurpose2}','{!esdInfo.raName}','{!esdInfo.hospitalId}','{!esdInfo.hospitalName}','{!esdInfo.rec.SerialNumber_F__c}','{!esdInfo.rec.Fixture_Model_No__c}','{!esdInfo.workPlace}','{!esdInfo.deptCategory}')" value="故障报告" rerender="dummy" rendered="{!esdInfo.showFaultRepor}"/> | 
 |  |  |                             </span>         | 
 |  |  |                         </li> | 
 |  |  |                         <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', '', 'display: none;')}"> | 
 |  |  |                             <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_NG_F__c.label}: </span> --> | 
 |  |  | 
 |  |  |                             <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_F__c.label}: </span> --> | 
 |  |  |                             <span>检测结果: </span> | 
 |  |  |                             <apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable, esdInfo.rec.Inspection_result_after_NG__c!='维修')}"> | 
 |  |  |                             <apex:inputField id="inspectionResult" value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 1)" /> | 
 |  |  |                                 <apex:inputField id="inspectionResult" value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 1)" /> | 
 |  |  |                             </apex:outputPanel> | 
 |  |  |                             <apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c!='维修')}"> | 
 |  |  |                             <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" /></span> | 
 |  |  |                                 <output style="margin:3px;width:55px;text-align:left;margin-left:3px;margin-top:0px;float: left;">{!esdInfo.rec.Inspection_result_after__c}</output> | 
 |  |  |                             </apex:outputPanel> | 
 |  |  |                             <apex:commandButton style="margin-top:0px;font-size: 9px !important;" onclick="OpenRentalApplyFault('{!esdInfo.faultReportFlag}', '{!esdInfo.rec.Id}', '{!esdInfo.rec.Name}','{!esdInfo.personInChargeId}','{!esdInfo.personInChargeName}','{!esdInfo.demoPurpose2}','{!esdInfo.raName}','{!esdInfo.hospitalId}','{!esdInfo.hospitalName}','{!esdInfo.rec.SerialNumber_F__c}','{!esdInfo.rec.Fixture_Model_No__c}','{!esdInfo.workPlace}','{!esdInfo.deptCategory}')" value="故障报告" rerender="dummy" rendered="{!esdInfo.showFaultRepor}"/> | 
 |  |  |                         </li> | 
 |  |  |                         <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', 'display: none;', '')}"> | 
 |  |  |                             <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_NG_F__c.label}: </span> --> | 
 |  |  | 
 |  |  |                         </li> | 
 |  |  |                         <li> | 
 |  |  |                             <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span> | 
 |  |  |                             <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span> | 
 |  |  |                             <!-- <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span> --> | 
 |  |  |                             <span><apex:outputLink value="/{!esdInfo.rec.Asset__c}" target="_blank" id="assetLink" style="margin:3px;width:140px;float: left;text-align:left;margin-left:3px;margin-top:0px;">{!esdInfo.rec.SerialNumber_F__c}</apex:outputLink></span> | 
 |  |  |                         </li> | 
 |  |  |                         <!-- </div> --> | 
 |  |  |  |