unknown
2023-08-23 50ce6a5e5ae7ac6ce3e6281acca9a0db568306e6
force-app/main/default/pages/EquipmentSetShippmentReceived2.page
@@ -119,11 +119,17 @@
</script>
<style type="text/css">
    .menu div.m_title{
        width: 308px;
        /* width: 308px;  20230719 zyh */
        text-align: left;
        margin: 0;
        background:#DCDCDC;
        border-radius:8px 8px 0 0;
        /*height: 42px;*/
        padding-left: 0.75rem;/*20230629 zyh */
    }
    .menu {
        border-radius:8px;
        border:1px solid #D1D1D1;
    }
    .dateFormat {
        display: none;
@@ -134,13 +140,14 @@
        /* 2023-04-23   zyh   lightning升级   start */
        /* height: 25px; */
        height: 30px;
        margin-left:0;
        /* 2023-04-23   zyh   lightning升级   end */
        border-bottom: 5px solid #3b5998;
    }
    #Step_tab li {
        position: relative;
        /* 2023-04-23   zyh   lightning升级   start */
        width: 30%;
        width: 50%;
        /* width: 24%; */
        /* 2023-04-23   zyh   lightning升级   end */
        float: left;
@@ -148,6 +155,10 @@
        padding: 0;
        text-align: center;
        cursor: pointer;
        /*20230719 zyh*/
        height:30px;
        line-height: 30px;
        /*20230719 zyh*/
    }
    #Step_tab li span {
        margin: 0;
@@ -165,7 +176,7 @@
    }
    
    div#main {
        width: 320px;
        /* width: 320px; */
    }
    div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
@@ -182,7 +193,10 @@
        color: #fff;
        background-color: #fff;
        height: 1px;
        width: 90%;
        /*20230719 zyh*/
        /*width: 90%;*/
        width: 98%;
        /*20230719 zyh*/
    }
    .close {
        color: #aaaaaa;
@@ -229,19 +243,19 @@
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <div style="text-align: right;margin-top: 10px;">
            <!-- <div style="text-align: right;margin-top: 10px;">
              <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
            </div>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/> -->
            <!-- <apex:outputText value="(出库指示后取消)" style="color:red;" rendered="{!IF(SR_status='Received' && es.cancel_after_loaner_arranged__c, true, false)}"/> -->
            <table style="border-collapse: collapse; font-size:13px;">
            <!-- <table style="border-collapse: collapse; font-size:13px;">
                <colgroup>
                    <col width="150" />
                    <col width="170" />
                </colgroup>
                <tr>
                <tr> -->
                    <!-- 状态切换btn -->
                    <th colspan="2" style="font-size:20px;text-align: center;width:380px;">
                    <!-- <th colspan="2" style="font-size:20px;text-align: center;width:380px;">
                        <ul id="Step_tab">
                        <apex:outputPanel layout="none" rendered="{!IF(SR_status='Shippment', true, false)}">
                            <apex:outputPanel layout="none" rendered="{!IF(Step_status='发货前', true, false)}">
@@ -260,7 +274,37 @@
            <div style="text-align: right">
                <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='发货前', true, false)}"/>
                <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='发货前', true, false)}"/>
            </div>
            </div> -->
            <apex:pageBlock >
                <table style="border-collapse: collapse; font-size:13px;">
                    <colgroup>
                        <col width="20%" />
                        <col width="80%" />
                    </colgroup>
                    <tr>
                        <!-- 状态切换btn -->
                        <th style="font-size:20px;text-align: center;width:280px;height: 50px;">
                            <ul id="Step_tab">
                            <apex:outputPanel layout="none" rendered="{!IF(SR_status='Shippment', true, false)}">
                                <apex:outputPanel layout="none" rendered="{!IF(Step_status='发货前', true, false)}">
                                    <li onclick="javascript:Shippment1();" class="selected"><span class="tabsize">发货前检查</span></li>
                                    <li onclick="javascript:Shippment2();"><span class="tabsize">发货</span></li>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!IF(Step_status='发货', true, false)}">
                                    <li onclick="javascript:Shippment1();"><span class="tabsize">发货前检测</span></li>
                                    <li onclick="javascript:Shippment2();" class="selected"><span class="tabsize">发货</span></li>
                                </apex:outputPanel>
                            </apex:outputPanel>
                            </ul>
                        </th>
                        <th width="900px;" style="padding-left:50px;" class="myBtn">
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='发货前', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='发货前', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
                        </th>
                    </tr>
                </table>
            </apex:pageBlock>
        </div>
        <apex:outputPanel id="detail">
@@ -271,31 +315,38 @@
                <apex:variable var="indexloop" value="{!indexloop+1}"/>
                <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, SetName)}" />
                <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id && indexloop != 1, true, false)}">
                    <br/>
                    <!-- <br/> -->
                </apex:outputPanel>
                <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}">
                    <hr/>
                    <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                    <!-- 20230721 ljh -->
                    <h3 style="padding: 5px 0.75rem;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                    <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Id}" />
                </apex:outputPanel>
                <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                        <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                    </apex:outputPanel>
                <div class="rtop">
                    <!-- 20230721 ljh -->
                    <h3 style="padding: 5px 0.75rem;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                </apex:outputPanel>
                <!-- <div class="rtop">
                    <div class="r1"></div>
                    <div class="r2"></div>
                    <div class="r3"></div>
                    <div class="r4"></div>
                </div>
                </div> -->
                <div class="menu">
                <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
                    <!-- 2023-08-01 zyh 机身编码换位置 start -->
                    <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)</span>
                    <!-- 2023-08-01 zyh 机身编码换位置 end -->
                </div></h2>
                <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                <ul style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                <!-- 20230721 ljh -->
                <ul style="padding: 1px 0.75rem;{!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='发货前', true, false)}">
                        <!-- <div style="position: relative; padding-left: 50px; background:{!IF(esdInfo.quickCheck, '#BBFF66', '')}"> -->
                        <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                        <!-- <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}"> -->
                        <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" style="{!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                            <!-- 20210721 ljh 1719 start -->
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result__c.label}: </span> -->
                            <span>发货前-检测结果: </span> 
@@ -307,7 +358,8 @@
                            <span><apex:outputField id="inspectionResult2" value="{!esdInfo.rec.Inspection_result__c}" style="margin:3px;width:75px;" /></span>
                            </apex:outputPanel>
                        </li>
                        <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                        <!-- <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}"> -->
                        <li style="{!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_NG__c.label}: </span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}">
                            <span><apex:inputField id="inspectionResultNg" value="{!esdInfo.rec.Inspection_result_NG__c}" style="margin:3px;width:75px;"/></span>
@@ -317,7 +369,8 @@
                            </apex:outputPanel>
                        </li>
                        <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                        <!-- <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}"> -->
                        <li style="{!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Pre_NG_abord_reason__c.label}:</span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}">
                            <span>
@@ -340,11 +393,14 @@
                            </apex:outputPanel>
                        </li>
                        <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                        <!-- <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}"> -->
                        <li style="{!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Pre_Inspection_Comment__c.label}: </span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}" >
                                <span>
                                    <apex:inputField value="{!esdInfo.rec.Pre_Inspection_Comment__c}" style="margin:3px;width:90%;float:left;"/>
                                    <!-- 20230721 ljh -->
                                    <!-- <apex:inputField value="{!esdInfo.rec.Pre_Inspection_Comment__c}" style="margin:3px;width:90%;float:left;"/> -->
                                    <apex:inputField value="{!esdInfo.rec.Pre_Inspection_Comment__c}" style="margin:3px;"/>
                                </span>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
@@ -354,7 +410,8 @@
                            </apex:outputPanel>
                        </li>
                        <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                        <!-- <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}"> -->
                        <li style="{!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                            <span>上次回收后检测时间: </span>
                            <span><apex:outputField rendered="{!IF(esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__c==null, false, true)}" value="{!esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c}" style="margin:3px;width:75px;"/></span>
                        </li>
@@ -362,21 +419,23 @@
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Pre_After_Inspection_elapsed_days__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.Pre_After_Inspection_elapsed_days__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        <li>
                        <!-- 2023-08-01 zyh 机身编码换位置 start -->
                        <!-- <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>
                        </li>
                        </li> -->
                        <!-- 2023-08-01 zyh 机身编码换位置 end -->
                        <!-- </div> -->
                    </apex:outputPanel>
                </ul>
                
                </div>
                <div class="rbottom">
                <!-- <div class="rbottom">
                    <div class="r4"></div>
                    <div class="r3"></div>
                    <div class="r2"></div>
                    <div class="r1"></div>
                </div>
                </div> -->
                
            </apex:repeat>
        </div>
@@ -387,7 +446,10 @@
            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 ","");
            }
        let scanner = new Instascan.Scanner({ video: document.getElementById('preview'), scanPeriod: 5 ,mirror: false});
        scanner.addListener('scan', function (content) {
          filljsQR(content);