From e15f4679a2b71a186aa9e87cd49b4ab9c249cc63 Mon Sep 17 00:00:00 2001
From: 张宇恒 <bxyun0@163.com>
Date: 星期二, 08 八月 2023 18:20:47 +0800
Subject: [PATCH] 新品收货样式、颜色、显示margin

---
 force-app/main/default/pages/EquipmentSetShippmentReceived5.page |   82 +++++++++++++++++++++++++++++-----------
 1 files changed, 59 insertions(+), 23 deletions(-)

diff --git a/force-app/main/default/pages/EquipmentSetShippmentReceived5.page b/force-app/main/default/pages/EquipmentSetShippmentReceived5.page
index 0ddc234..ace3864 100644
--- a/force-app/main/default/pages/EquipmentSetShippmentReceived5.page
+++ b/force-app/main/default/pages/EquipmentSetShippmentReceived5.page
@@ -64,23 +64,53 @@
         })
     }
 }
+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){
-    if(faultReportFlag == '涓嶅瓨鍦ㄦ晠闅滄姤鍛婂崟'){
+    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);
-        //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);
-    }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=" + hospitalName + "&00N9D000007jrEL=" + serialNumber + "&00N9D000007jrEQ=" + fixtureNo + "&00N9D000007jrEV=" + workPlace + "&00N9D000007jrJW=" + deptCategory);
-        //     }else{
-        //         window.open("/" + faultReportFlag);
-        //     }
-        // }
-
-        if(confirm('宸插瓨鍦ㄦ娴嬪垎鏋愭姤鍛�')){
-            window.open("/" + faultReportFlag);
+        }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 == '瀛樺湪鏁呴殰鎶ュ憡鍗�'){
+            //         window.open("/a5C/e?Name=*" + "&CF00N9D000007hkLN_lKid=" + radetailId + "&CF00N9D000007hkLN=" + radetailName + "&CF00N9D000007jemP_lKid=" + personId + "&CF00N9D000007jemP=" + personName + "&00N9D000007jrE6=" + purpose2 + "&00N9D000007ijyA=" + name +  + "&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");
@@ -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 鍥炲簱銇疭et鍗樹綅銇с�佹槑绱颁竴銇や竴銇ゃ伄quickCheck瑕併倝銇亜銇屻�丼et銇畄uickCheck瑕併倠锛� -->
                 <!-- 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>

--
Gitblit v1.9.1