张宇恒
2023-08-08 e15f4679a2b71a186aa9e87cd49b4ab9c249cc63
force-app/main/default/pages/EquipmentSetShippmentReceived5.page
@@ -64,10 +64,39 @@
        })
    }
}
var standalone = window.navigator.standalone,
    userAgent = window.navigator.userAgent.toLowerCase(),
    safari = /safari/.test( userAgent ),
    ios = /iphone|ipod|ipad/.test( userAgent ),
    // ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
    ver = '';
    if(ios) {
        ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
    }
function OpenRentalApplyFault(faultReportFlag, radetailId, radetailName, personId, personName, purpose2, name, hospitalName, serialNumber, fixtureNo, workPlace, deptCategory){
    console.log(!standalone && !safari && ios);
    if (!standalone && !safari && ios) {
    if(faultReportFlag == '不存在故障报告单'){
        window.open("/a5C/e?Name=*" + "&CF00N10000009I5UX_lKid=" + radetailId + "&CF00N10000009I5UX=" + radetailName + "&CF00N10000009I5UV_lKid=" + personId + "&CF00N10000009I5UV=" + personName + "&00N10000009I5Uh=" + purpose2 + "&00N10000009I5UW=" + name + "&00N10000009I6jv=" + hospitalName + "&00N10000009I5Ua=" + serialNumber + "&00N10000009I5UP=" + fixtureNo + "&00N10000009I5Uf=" + workPlace + "&00N10000009I5UU=" + deptCategory);
        }else{
            if(confirm('已存在检测分析报告')){
                window.open("/" + faultReportFlag);
            }
        }
    }else{
        if(faultReportFlag == '不存在故障报告单'){
            // window.open("/a5C/e?Name=*" + "&CF00N10000009I5UX_lKid=" + radetailId + "&CF00N10000009I5UX=" + radetailName + "&CF00N10000009I5UV_lKid=" + personId + "&CF00N10000009I5UV=" + personName + "&00N10000009I5Uh=" + purpose2 + "&00N10000009I5UW=" + name + "&00N10000009I6jv=" + hospitalName + "&00N10000009I5Ua=" + serialNumber + "&00N10000009I5UP=" + fixtureNo + "&00N10000009I5Uf=" + workPlace + "&00N10000009I5UU=" + deptCategory);
        //window.open("/a5F/e?Name=*" + "&CF00N9D000007hkLN_lKid=" + radetailId + "&CF00N9D000007hkLN=" + radetailName + "&CF00N9D000007jemP_lKid=" + personId + "&CF00N9D000007jemP=" + personName + "&00N9D000007jrE6=" + purpose2 + "&00N9D000007ijyA=" + name + "&00N9D000007yNXu=" + hospitalName + "&00N9D000007jrEL=" + serialNumber + "&00N9D000007jrEQ=" + fixtureNo + "&00N9D000007jrEV=" + workPlace + "&00N9D000007jrJW=" + deptCategory);
            var url = '/lightning/o/Rental_Apply_Fault__c/new?defaultFieldValues=Name=*,Rental_Apply_Equipment_Set_Detail__c='+radetailId+',Person_In_Charge_User__c='+personId
            +',demo_purpose2__c='+purpose2
            +',RentalApplyNo__c='+name
            +',HospitalText__c='+hospitalName
            +',Repair_product_body_number__c='+serialNumber
            +',Fixture_Model_No__c='+fixtureNo
            +',WorkPlace__c='+workPlace
            +',OCM_dept_category__c='+deptCategory;
            // console.log(url);
            window.open(url);
    }else{
        // if(confirm('是否打开或创建新的检测分析报告?')){
        //     if (faultReportFlag == '存在故障报告单'){
@@ -79,6 +108,7 @@
        if(confirm('已存在检测分析报告')){
            window.open("/" + faultReportFlag);
            }
        }
    } 
}
@@ -156,8 +186,8 @@
        /*width: 308px;*/
        text-align: left;
        margin: 0;
        /*background:#DCDCDC;*/
        background:#95aee5;
        background:#DCDCDC;
        /* background:#95aee5; */
        /*height: 42px;*/
        padding-left: 0.75rem;/*20230721 ljh  */
    }
@@ -205,7 +235,7 @@
    }*/
    div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
    div.rtop div {/*background:#DCDCDC;*/background:#95aee5;}
    div.rtop div {background:#DCDCDC;/*background:#95aee5;*/}
    div.r1, div.r2, div.r3, div.r4 {display:block; overflow:hidden;}
    div.r1, div.r2, div.r3 {height:1px;}
    div.r2, div.r3, div.r4 {border-left:1px solid silver; border-right:1px solid silver;}
@@ -330,6 +360,10 @@
                </div>
                <div class="menu">
                <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.AssetName__c}" />&nbsp;&nbsp;
                    <!-- 2023-08-01 zyh 机身编号换地方 -->
                    <span>(<apex:outputLink value="/{!esdInfo.rec.Asset__c}" target="_blank" id="assetLink" >{!esdInfo.rec.SerialNumber_F__c}</apex:outputLink>)</span>
                    <!-- 2023-08-01 zyh 机身编号换地方 -->
                </div></h2>
                <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                <!-- 20230722 ljh -->
@@ -352,7 +386,7 @@
                            <!-- 20230722 ljh -->
                            <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.hospitalName}','{!esdInfo.rec.SerialNumber_F__c}','{!esdInfo.rec.Fixture_Model_No__c}','{!esdInfo.workPlace}','{!esdInfo.deptCategory}')" value="故障报告" rerender="dummy" rendered="{!esdInfo.showFaultRepor}"/> -->
                            <apex:commandButton styleClass="commandbutton" style="margin-left: 20px;" onclick="OpenRentalApplyFault('{!esdInfo.faultReportFlag}', '{!esdInfo.rec.Id}', '{!esdInfo.rec.Name}','{!esdInfo.personInChargeId}','{!esdInfo.personInChargeName}','{!esdInfo.demoPurpose2}','{!esdInfo.raName}','{!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;')}">
@@ -421,7 +455,7 @@
                                <!-- <output style="margin:3px;width:55px;text-align:left;margin-left:3px;margin-top:0px;float: left;">{!esdInfo.rec.Inspection_result_after__c}</output> -->
                                <output>{!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.hospitalName}','{!esdInfo.rec.SerialNumber_F__c}','{!esdInfo.rec.Fixture_Model_No__c}','{!esdInfo.workPlace}','{!esdInfo.deptCategory}')" value="故障报告" rerender="dummy" rendered="{!esdInfo.showFaultRepor}"/> -->
                            <apex:commandButton styleClass="commandbutton" style="margin-left: 20px;" onclick="OpenRentalApplyFault('{!esdInfo.faultReportFlag}', '{!esdInfo.rec.Id}', '{!esdInfo.rec.Name}','{!esdInfo.personInChargeId}','{!esdInfo.personInChargeName}','{!esdInfo.demoPurpose2}','{!esdInfo.raName}','{!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> -->
@@ -472,13 +506,15 @@
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_Comment__c}"/></span>    
                        </apex:outputPanel>
                        </li>
                        <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                        <!-- <li> -->
                            <!-- 2023-08-01 zyh 机身编号换地方 -->
                            <!-- <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> -->
                            <!-- 20230722 ljh -->
                            <!-- <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> -->
                            <span><apex:outputLink value="/{!esdInfo.rec.Asset__c}" target="_blank" id="assetLink" >{!esdInfo.rec.SerialNumber_F__c}</apex:outputLink></span>
                        </li>
                            <!-- <span><apex:outputLink value="/{!esdInfo.rec.Asset__c}" target="_blank" id="assetLink" >{!esdInfo.rec.SerialNumber_F__c}</apex:outputLink></span> -->
                            <!-- 2023-08-01 zyh 机身编号换地方 -->
                        <!-- </li> -->
                        <!-- </div> -->
                        <script>