From 50ce6a5e5ae7ac6ce3e6281acca9a0db568306e6 Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期三, 23 八月 2023 14:54:59 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev

---
 force-app/main/default/pages/EquipmentSetShippmentReceived3.page | 1112 ++++++++++++++++++++++++++++++---------------------------
 1 files changed, 588 insertions(+), 524 deletions(-)

diff --git a/force-app/main/default/pages/EquipmentSetShippmentReceived3.page b/force-app/main/default/pages/EquipmentSetShippmentReceived3.page
index 838e392..dff61f0 100644
--- a/force-app/main/default/pages/EquipmentSetShippmentReceived3.page
+++ b/force-app/main/default/pages/EquipmentSetShippmentReceived3.page
@@ -1,530 +1,594 @@
 <!-- <apex:page Controller="EquipmentSetShippmentReceived3Controller" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="澶囧搧鍑哄簱鍏ュ簱"> -->
-<apex:page Controller="EquipmentSetShippmentReceived3Controller" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true" title="澶囧搧鍑哄簱鍏ュ簱">
-<!-- 2023-04-23   zyh   lightning鍗囩骇 -->
-<head>
-    <meta name="format-detection" content="telephone=no"/>
-</head>
-<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
-<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
-<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
-<apex:includeScript value="{!URLFOR($Resource.instascan)}"/>
-<apex:stylesheet value="{!URLFOR($Resource.EquipmentSetShippmentReceivedcss)}"/>
-<script type="text/javascript">
-function savejs() {
-    blockme();
-    save();
-}
-function deleteDetailJs(ele) {
-    blockme();
-    deleteDetail(j$(ele).next().val());
-}
-var scanType;
-function filljsQR(qrcode) {
-    if(!qrcode)return;
-    blockme();
-    if(scanType == 1){
-        j$("input[name$='SlipNo']").val(qrcode);
-        unblockUI();
-    }
-    else{
-        var aId = j$(escapeVfId('allPage:allForm:applyId')).val();
-        aId = aId + "," + qrcode;
-        var resdid = '';
-        j$("input[type=checkbox]:checked").each(function() {
-            resdid += j$(this).next().val()+",";
-        });
-        resdid = resdid.slice(0,-1);
-        filljsQRAction(aId, resdid);
-    }
-    j$("#scanedqr").append("<li>"+qrcode+"</li>");
-    j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
-}
-function addToDetail() {
-    blockme();
-    var resdid = '';
-    var warning = false;
-    j$("input[type=checkbox]:checked").each(function() {
-        resdid += j$(this).next().val()+":";
-        var applyid = j$(this).next().next().val();
-        if (!warning) warning = j$("[data-ngnum='"+applyid+"']").val() > 0;
-    });
-    resdid = resdid.slice(0,-1);
-    if (warning) {
-        alert("鐢宠鍗曞唴瀛樺湪涓嶇鍚堝彂璐х姸鎬佺殑閰嶅锛岃璺熻繘瀹屾垚閰嶅鍚庣画鎿嶄綔鎴栧垎鍓茬敵璇峰崟!")
-        unblockUI();
-        return;
-    }
-    ShippmentDetail(resdid);
-}
-function checkAllDetail() {
-    j$('input[type="checkbox"]').prop("checked",true);
-}
-function ShippmentAddJs() {
-    j$(escapeVfId('allPage:allForm:SlipNo')).prop("disabled", true);
-    j$(escapeVfId('allPage:allForm:DeliveryType')).prop("disabled", true);
-    j$(escapeVfId('allPage:allForm:DistributorMethod')).prop("disabled", true);
-    j$(escapeVfId('allPage:allForm:DeliveryCompany')).prop("disabled", true);
-    ShippmentAdd();
-}
-function checkMessage() {
-    if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
-        alert("淇濆瓨瀹屼簡");
-    }
-}
-
-function fixDeliveryType() {
-	j$(escapeVfId('allPage:allForm:DeliveryType')).children().each(function() {
-		if (this.value == '鍥炲瘎') j$(this).remove();
-	})
-}
-
-function resetDetailDivMargintop() {
-    var handerHeight = document.getElementById('hander').clientHeight;
-    document.getElementById('detailDiv').style.marginTop = handerHeight + 'px';
-}
-
-window.onload = function hiddenName(){
-    if( document.getElementById('allPage:allForm:CDS_staff_mlktp')){
-        document.getElementById('allPage:allForm:CDS_staff_mlktp').style.visibility="hidden" ;
-        document.getElementById('allPage:allForm:CDS_staff_mlktp').style.width="200px" ;
-    }
-    resetDetailDivMargintop();
-}
-
-</script>
-<style type="text/css">
-    .hideDropdown select{
-        display: none
-    }
-    .menu div.m_title{
-        width: 308px;
-        text-align: left;
-        margin: 0;
-        background:#95aee5;
-        /*height: 42px;*/
-    }
-    .menu div.m_titleg{
-        width: 308px;
-        text-align: left;
-        margin: 0;
-        background:#DCDCDC;
-        /*height: 42px;*/
-    }
-    .dateFormat {
-        display: none;
-    }
-    #Step_tab {
-        list-style-type: none;
-        padding: 0;
-        /* 2023-04-23   zyh   lightning鍗囩骇   start */
-        /* height: 25px; */
-        height: 30px;
-        /* 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: 20%; */
-        /* 2023-04-23   zyh   lightning鍗囩骇   end */
-        float: left;
-        margin: 0;
-        padding: 0;
-        text-align: center;
-        cursor: pointer;
-    }
-    #Step_tab li span {
-        margin: 0;
-        padding: 15px 0 11px;
-        color: #2daae1;
-        font-size: 12px;
-        font-weight: bold;
-        line-height: 1;
-    }
-    #Step_tab li.selected {
-        background: #3b5998;
-    }
-    #Step_tab li.selected span {
-        color: #fff;
-    }
-    
-    div#main {
-        width: 320px;
-    }
-
-    div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
-    div.rtop div {background:#95aee5;}
-    div.rtopg div {background:#DCDCDC;}
-    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;}
-    div.r1 {margin: 0 5px; background:silver;} 
-    div.r2 {margin: 0 3px; border-width:0 2px;} 
-    div.r3 {margin: 0 2px;}  
-    div.r4 {margin: 0 1px; height: 2px;}
-    hr {
-        border-top: 2px dotted #f00;
-        color: #fff;
-        background-color: #fff;
-        height: 1px;
-        width: 90%;
-    }
-    .close {
-        color: #aaaaaa;
-        float: right;
-        font-size: 28px;
-        font-weight: bold;
-    }
-    .close:hover,
-    .close:focus {
-        color: #000;
-        text-decoration: none;
-        cursor: pointer;
-    }
-    .menu blockquote{
-        margin: 0;
-        padding: 1px;
-        list-style: none;
-        border-top: 1px solid #ddd;
-    }
-</style>
-<div id="myModal" class="modal">
-
-  <!-- Modal content -->
-  <div class="modal-content">
-    <span class="close" onclick="stopScan()">&times;</span>
-    <p>鎵弿涓�</p>
-        <p>Code:<input type="text" id="qrcode"/></p>
-    <video playsinline="true" id="preview" style="width: 100%;z-index: 11;transform: scaleX(-1);margin-top: 10px;"></video>
-  	鎵爜灞ュ巻锛�
-    <ul id="scanedqr" style="list-style-type: none; text-align: center;padding: 0;width: 100%; height: 100px; overflow: auto">
-    </ul>
-  </div>
-
-</div>
-<apex:form id="allForm">
-    <apex:actionFunction name="save" action="{!save}" rerender="allForm" onComplete="unblockUI();checkMessage();resetDetailDivMargintop();" />
-    <apex:actionFunction name="filljsQRAction" action="{!filljsQRAction}" rerender="detail,message" oncomplete="unblockUI();resetDetailDivMargintop();">
-        <apex:param name="firstParam" assignTo="{!ApplyId}" value="" />
-        <apex:param name="secondParam" assignTo="{!CheckedId}" value="" />
-    </apex:actionFunction>
-    <apex:actionRegion >
-        <apex:actionFunction name="deleteDetail" action="{!deleteDetail}" rerender="detail,message" oncomplete="unblockUI();">
-            <apex:param name="firstParam" assignTo="{!UnCheckedId}" value="" />
-        </apex:actionFunction>
-    </apex:actionRegion>
-    <!-- <apex:actionFunction name="Shippment" action="{!Shippment}" /> -->
-    <apex:actionFunction name="searchSlip" action="{!searchSlip}" reRender="allForm" onComplete="unblockUI();fixDeliveryType();resetDetailDivMargintop();" />
-    <apex:actionFunction name="ShippmentDetail" action="{!ShippmentDetail}" reRender="allForm" onComplete="unblockUI();fixDeliveryType();resetDetailDivMargintop();" >
-        <apex:param name="firstParam" assignTo="{!CheckedId}" value="" />
-    </apex:actionFunction>
-    <apex:actionFunction name="ShippmentAdd" action="{!ShippmentAdd}" >
-        <apex:param name="firstParam" assignTo="{!UnCheckedId}" value="" />
-    </apex:actionFunction>
-    <apex:inputHidden value="{!done_flg}" id="done_flg"/>
-    <div id="main">
-        <div id="hander" class="freezehander">
-            <apex:outputPanel id="message">
-                <apex:pageMessages />
-            </apex:outputPanel>
-            <apex:outputPanel layout="none" rendered="{!IF(Step_status='鏄庣粏', true, false)}">
-                <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:outputPanel>
-            <!-- <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;">
-                <colgroup>
-                    <col width="150" />
-                    <col width="170" />
-                </colgroup>
-                <tr>
-                    <!-- 鐘舵�佸垏鎹tn -->
-                    <th colspan="2" style="font-size:20px;text-align: center;width:380px;">
-                        <ul id="Step_tab">
-                            <!-- <apex:outputPanel layout="none" rendered="{!IF(Step_status='杩愯緭鍗�', true, false)}">
-                                <li onclick="javascript:Shippment();return false" class="selected"><span>杩愯緭鍗�</span></li>
-                                <li onclick="javascript:ShippmentDetail();return false"><span>鏄庣粏</span></li>
-                                <li onclick="javascript:ShippmentAdd();return false"><span>杩藉姞</span></li>
-                            </apex:outputPanel> -->
-                            <apex:outputPanel layout="none" rendered="{!IF(Step_status='鏄庣粏', true, false)}">
-                                <li onclick="javascript:ShippmentAddJs();return false"><span class="tabsize">杩藉姞</span></li>
-                                <li class="selected"><span>鏄庣粏</span></li>
-                            </apex:outputPanel>
-                            <apex:outputPanel layout="none" rendered="{!IF(Step_status='杩藉姞', true, false)}">
-                                <li class="selected"><span>杩藉姞</span></li>
-                                <li onclick="javascript:ShippmentDetail();return false"><span class="tabsize">鏄庣粏</span></li>
-                            </apex:outputPanel>
-                        </ul>
-                    </th>
-                </tr>
-                <apex:outputPanel layout="none" rendered="{!IF(Step_status='鏄庣粏', true, false)}" id="slipPanel">
-                    <tr>
-                        <td colspan="2"><apex:outputPanel layout="none" rendered="{!IF(slip.Id=null, true, false)}"><span style="margin-left:30px;font-weight: bold;font-size: 15px;">鏂板缓</span></apex:outputPanel><apex:outputPanel layout="none" rendered="{!IF(slip.Id=null, false, true)}"><span style="margin-left:30px;font-weight: bold;">缂栬緫锛歔{!slip.DeliveryCompany_SlipNo__c}]</span></apex:outputPanel></td>
-                    </tr>
-                    <tr>
-                        <td style="text-align: right;" class="deliveryslip">鍙戣揣-杩愯緭鍗曞彿 锛� </td>
-                        <td align="left">
-                            <!-- 2023-04-23   zyh   lightning鍗囩骇 -->
-                            <apex:inputField value="{!slip.Name}" style="width:100px;float:left" id="SlipNo"/>
-                            <!-- <apex:inputField value="{!slip.Name}" style="width:120px;float:left" id="SlipNo"/> -->
-                            <apex:commandButton styleClass="commandbutton" onclick="blockme();searchSlip();return false;" style="float:left" value="妫�绱�" rerender="dummy"/>
-                            <!-- <apex:commandButton styleClass="commandbutton" onclick="qrsacn(1)" value="鎵繍杈撳崟鍙�" rerender="dummy"/> -->
-                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn(1)" value="鎵繍杈撳崟鍙�" rerender="dummy" style="margin-left:0; "/>
-                            <!-- 2023-04-23   zyh   lightning鍗囩骇 -->
-                        </td>
-                    </tr>
-                    <tr>
-                        <td style="text-align: right" class="deliveryslip">鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryType__c.label} 锛� </td>
-                        <td align="left"><apex:inputField value="{!slip.DeliveryType__c}" style="width:145px;" id="DeliveryType"/></td>
-                    </tr>
-                    <tr>
-                        <td style="text-align: right" class="deliveryslip">鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.Distributor_method__c.label} 锛� </td>
-                        <td align="left"><apex:inputField value="{!slip.Distributor_method__c}" style="width:145px;" id="DistributorMethod"/></td>
-                    </tr>
-                    <tr>
-                        <td style="text-align: right" class="deliveryslip">鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryCompany__c.label} 锛� </td>
-                        <td align="left"><apex:inputField value="{!slip.DeliveryCompany__c}" style="width:145px;" id="DeliveryCompany"/></td>
-                    </tr>
-                    <tr>
-                        <td style="text-align: right" class="deliveryslip">鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.Wh_Staff__c.label} 銆� </td>
-                        <td align="left"><apex:inputField styleClass="hideDropdown" value="{!slip.Wh_Staff__c}" style="width:130px;" /></td>
-                    </tr>
-                    <tr>
-                        <td style="text-align: right" class="deliveryslip">鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.Combine_Pack__c.label} 銆� </td>
-                        <td align="left"><apex:inputField styleClass="hideDropdown" value="{!slip.Combine_Pack__c}" style="width:130px;" /></td>
-                    </tr>
-                    <!-- <tr>
-                        <td colspan="2"><apex:inputField value="{!slip.Wh_Staff__c}" style="width:130px;" /></td>
-                    </tr> -->
-                </apex:outputPanel>
-            </table>
-        
-            <div style="text-align: right">
-                <apex:commandButton styleClass="commandbutton" onclick="qrsacn(0)" value="鎵竴鎵敵璇蜂功" rerender="dummy" rendered="{!IF(Step_status='杩藉姞', true, false)}"/>
-                <apex:commandButton styleClass="commandbutton" onclick="checkAllDetail();return false" value="鍏ㄩ��" rerender="dummy" rendered="{!IF(Step_status='杩藉姞', true, false)}"/>
-                <apex:commandButton styleClass="commandbutton" onclick="addToDetail();return false" value="杩藉姞" rerender="dummy" rendered="{!IF(Step_status='杩藉姞', true, false)}"/>
-            </div>
-        </div>
-        <apex:outputPanel id="detail">
-        <div id="detailDiv" class="detail">
-            <apex:inputHidden value="{!ApplyId}" id="applyId"/>
-            <apex:outputPanel layout="none" rendered="{!IF(Step_status='杩藉姞', true, false)}">
-                <apex:variable var="indexloop" value="{!0}" />
-                <apex:variable var="applychange" value="{!0}" />
-                <apex:variable var="SetName" value="" />
-                <apex:variable var="SetName2" value="" />
-                <apex:repeat value="{!esdList}" var="esdInfo" id="esdList2">
-                    <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
-                    <apex:variable var="indexloop" value="{!indexloop+1}"/>
-                    <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, SetName)}" />
-                    <apex:variable var="SetName2" value="{!IF(SetName2='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, SetName2)}" />
-                    <apex:outputPanel layout="none" rendered="{!IF(SetName2=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id && indexloop != 1, true, false)}">
-                        <br/>
-                    </apex:outputPanel>
-                    
-                    <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, false, true)}">
-                        <hr/>
-                        <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2>
-                        <br/>
-                        <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}" />
-                        <apex:variable var="applychange" value="{!1}" />
-                        <input type="hidden" value="{!esdInfo.rec.Rental_Apply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.Rental_Apply__c}"/>
-                    </apex:outputPanel>
-
-                    <apex:outputPanel layout="none" rendered="{!IF(SetName2=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}">
-                        <apex:outputPanel layout="none" rendered="{!IF(applychange=1, false, true)}">
-                        <hr/>
-                        </apex:outputPanel>
-                        <apex:variable var="applychange" value="{!0}" />
-                        <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Rental_Apply_Equipment_Set__r.Inspection_not_finish__c > 0, false, true)}">
-                        <apex:inputCheckbox value="{!esdInfo.isChecked}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply__c}"/>
-                   	 	</apex:outputPanel>
-                        <!-- 2023-04-26   zyh   lightning鍗囩骇   start -->
-                        <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}锛歿!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h2> -->
-                        <span style="padding: 5px;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}锛歿!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
-                        <!-- 2023-04-26   zyh   lightning鍗囩骇   end -->
-                        <apex:variable var="SetName2" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Id}" />
-                    </apex:outputPanel>
-
-                    <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
-                        <!-- 2023-04-26   zyh   lightning鍗囩骇   start -->
-                        <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2>
-                        <br/> -->
-                        <div style="padding: 5px;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</div>
-                        <!-- 2023-04-26   zyh   lightning鍗囩骇   end -->
-                        <input type="hidden" value="{!esdInfo.rec.Rental_Apply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.Rental_Apply__c}"/>
-                        <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Rental_Apply_Equipment_Set__r.Inspection_not_finish__c > 0, false, true)}">
-                        <apex:inputCheckbox value="{!esdInfo.isChecked}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply__c}"/>
-                    	</apex:outputPanel>
-                        <!-- 2023-04-26   zyh   lightning鍗囩骇   start -->
-                        <span style="padding: 5px; font-weight: blod;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}锛歿!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
-                        <!-- <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> -->
-                        <!-- 2023-04-26   zyh   lightning鍗囩骇   end -->
-                    </apex:outputPanel>
-                    <div class="rtop">
-                        <div class="r1"></div>
-                        <div class="r2"></div>
-                        <div class="r3"></div>
-                        <div class="r4"></div>
-                    </div>
-                    <div class="menu">
-                    <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
-                    </div></h2>
-                    <!-- TODO 鍥炲簱銇疭et鍗樹綅銇с�佹槑绱颁竴銇や竴銇ゃ伄quickCheck瑕併倝銇亜銇屻�丼et銇畄uickCheck瑕併倠锛� -->
-                    <ul>
-                        <li>
-                            <!-- 20210721 ljh 1719 start -->
-                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result__c.label}锛� </span> -->
-                            <span>鍙戣揣鍓�-妫�娴嬬粨鏋滐細 </span> 
-                            <!-- 20210721 ljh 1719 end -->
-                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result__c}" style="margin:3px;width:150px" /></span>
-                        </li>
-                        <li><span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_NG__c.label}锛� </span>
-                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result_NG__c}" style="margin:3px;width:150px" /></span>
-                        </li>
-                        <li><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>
-                        <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>
-                    </ul>
-                    </div>
-                    <div class="rbottom">
-                        <div class="r4"></div>
-                        <div class="r3"></div>
-                        <div class="r2"></div>
-                        <div class="r1"></div>
-                    </div>
-                    </apex:outputPanel>
-                </apex:repeat>
-            </apex:outputPanel>
-            <apex:outputPanel layout="none" rendered="{!IF(Step_status='鏄庣粏', true, false)}">
-                <apex:variable var="indexloop" value="{!0}" />
-                <apex:variable var="SetName" value="" />
-                <apex:repeat value="{!esdList}" var="esdInfo" id="esdList">
-                <apex:outputPanel layout="none" rendered="{!esdInfo.isChecked || esdInfo.hasSended}">
-                    <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/>
-                    </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><apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}"><apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="鍒犻櫎" rerender="dummy"/></apex:outputPanel><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
-                        <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 layout="none" rendered="{!NOT(esdInfo.hasSended)}"><apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="鍒犻櫎" rerender="dummy"/></apex:outputPanel><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
-                    </apex:outputPanel>
-                    <apex:outputPanel layout="none" rendered="{!esdInfo.hasSended}">
-                    <div class="rtopg">
-                        <div class="r1"></div>
-                        <div class="r2"></div>
-                        <div class="r3"></div>
-                        <div class="r4"></div>
-                    </div>
-                    </apex:outputPanel>
-                    <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
-                    <div class="rtop">
-                        <div class="r1"></div>
-                        <div class="r2"></div>
-                        <div class="r3"></div>
-                        <div class="r4"></div>
-                    </div>
-                    </apex:outputPanel>
-                    <div class="menu">
-                    <apex:outputPanel layout="none" rendered="{!esdInfo.hasSended}">
-                    <h2><div class="m_titleg">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;宸插彂閫�</div>
-                    </h2>
-                    </apex:outputPanel>
-                    <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
-                    <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;</div>
-                    </h2>
-                    </apex:outputPanel>
-                    <!-- TODO 鍥炲簱銇疭et鍗樹綅銇с�佹槑绱颁竴銇や竴銇ゃ伄quickCheck瑕併倝銇亜銇屻�丼et銇畄uickCheck瑕併倠锛� -->
-                    <ul>
-                        <li><span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result__c.label}锛� </span>
-                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result__c}" style="margin:3px;width:150px" /></span>
-                        </li>
-                        <li><span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_NG__c.label}锛� </span>
-                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result_NG__c}" style="margin:3px;width:150px" /></span>
-                        </li>
-                        <li><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>
-                        <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>
-                    </ul>
-                    </div>
-                    <div class="rbottom">
-                        <div class="r4"></div>
-                        <div class="r3"></div>
-                        <div class="r2"></div>
-                        <div class="r1"></div>
-                    </div>
-                </apex:outputPanel>
-                <apex:inputCheckbox value="{!esdInfo.isChecked}" style="display: none"/>
-                </apex:repeat>
-            </apex:outputPanel>
-        </div>
-        </apex:outputPanel>
-    </div>
-    <script type="text/javascript">
-        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 ","");
-        let scanner = new Instascan.Scanner({ video: document.getElementById('preview'), scanPeriod: 5 ,mirror: false});
-        scanner.addListener('scan', function (content) {
-          filljsQR(content);
-        });
-        
-        function qrsacn(stype) {
-            scanType = stype;
-            if (!standalone && !safari && ios) {
-                window.location.href="sfqr://scan";
-            } else {
-                j$(".modal").show();
-                Instascan.Camera.getCameras().then(function (cameras) {
-                  if (cameras.length > 0) {
-                    if (ver >= 13) {
-                        scanner.start(cameras[1]);
-                    } else {
-                        scanner.start(cameras[0]);
-                    }
-                  } else {
-                    console.error('No cameras found.');
-                  }
-                }).catch(function (e) {
-                  console.error(e);
+    <apex:page Controller="EquipmentSetShippmentReceived3Controller" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true" title="澶囧搧鍑哄簱鍏ュ簱">
+        <!-- 2023-04-23   zyh   lightning鍗囩骇 -->
+        <head>
+            <meta name="format-detection" content="telephone=no"/>
+        </head>
+        <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+        <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+        <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+        <apex:includeScript value="{!URLFOR($Resource.instascan)}"/>
+        <apex:stylesheet value="{!URLFOR($Resource.EquipmentSetShippmentReceivedcss)}"/>
+        <script type="text/javascript">
+        function savejs() {
+            blockme();
+            save();
+        }
+        function deleteDetailJs(ele) {
+            blockme();
+            deleteDetail(j$(ele).next().val());
+        }
+        var scanType;
+        function filljsQR(qrcode) {
+            if(!qrcode)return;
+            blockme();
+            if(scanType == 1){
+                j$("input[name$='SlipNo']").val(qrcode);
+                unblockUI();
+            }
+            else{
+                var aId = j$(escapeVfId('allPage:allForm:applyId')).val();
+                aId = aId + "," + qrcode;
+                var resdid = '';
+                j$("input[type=checkbox]:checked").each(function() {
+                    resdid += j$(this).next().val()+",";
                 });
+                resdid = resdid.slice(0,-1);
+                filljsQRAction(aId, resdid);
+            }
+            j$("#scanedqr").append("<li>"+qrcode+"</li>");
+            j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
+        }
+        function addToDetail() {
+            blockme();
+            var resdid = '';
+            var warning = false;
+            j$("input[type=checkbox]:checked").each(function() {
+                resdid += j$(this).next().val()+":";
+                var applyid = j$(this).next().next().val();
+                if (!warning) warning = j$("[data-ngnum='"+applyid+"']").val() > 0;
+            });
+            resdid = resdid.slice(0,-1);
+            if (warning) {
+                alert("鐢宠鍗曞唴瀛樺湪涓嶇鍚堝彂璐х姸鎬佺殑閰嶅锛岃璺熻繘瀹屾垚閰嶅鍚庣画鎿嶄綔鎴栧垎鍓茬敵璇峰崟!")
+                unblockUI();
+                return;
+            }
+            ShippmentDetail(resdid);
+            // resetDetailDivMargintop();
+        }
+        function checkAllDetail() {
+            j$('input[type="checkbox"]').prop("checked",true);
+        }
+        function ShippmentAddJs() {
+            // 20230620 ljh start
+            // j$(escapeVfId('allPage:allForm:SlipNo')).prop("disabled", true);
+            // j$(escapeVfId('allPage:allForm:DeliveryType')).prop("disabled", true);
+            // j$(escapeVfId('allPage:allForm:DistributorMethod')).prop("disabled", true);
+            // j$(escapeVfId('allPage:allForm:DeliveryCompany')).prop("disabled", true);
+            j$(escapeVfId('allPage:allForm:newHeader:SlipNo')).prop("disabled", true);
+            j$(escapeVfId('allPage:allForm:newHeader:DeliveryType')).prop("disabled", true);
+            j$(escapeVfId('allPage:allForm:newHeader:DistributorMethod')).prop("disabled", true);
+            j$(escapeVfId('allPage:allForm:newHeader:DeliveryCompany')).prop("disabled", true);
+            // 20230620 ljh end
+            ShippmentAdd();
+            // resetDetailDivMargintop();
+        }
+        function checkMessage() {
+            if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
+                alert("淇濆瓨瀹屼簡");
             }
         }
-
-        function stopScan() {
-            scanner.stop().then(function () {
-                j$(".modal").hide();
-            });
-            j$("#scanedqr").children().remove();
+        
+        function fixDeliveryType() {
+            // 20230620 ljh start
+            // j$(escapeVfId('allPage:allForm:DeliveryType')).children().each(function() {
+            j$(escapeVfId('allPage:allForm:newHeader:DeliveryType')).children().each(function() {
+            // 20230620 ljh end
+                if (this.value == '鍥炲瘎') j$(this).remove();
+            })
         }
-        j$(document).ready(function(){
-        	j$( '#qrcode' ).unbind();
-            j$( '#qrcode' ).keypress( function ( e ) {
-                if ( e.which == 13 ) {
-                    filljsQR(j$( '#qrcode' ).val());
-                    return false;
+        
+        function resetDetailDivMargintop() {
+            var handerHeight = document.getElementById('hander').clientHeight;
+            document.getElementById('detailDiv').style.marginTop = handerHeight + 'px';
+        }
+        
+        window.onload = function hiddenName(){
+            if( document.getElementById('allPage:allForm:CDS_staff_mlktp')){
+                document.getElementById('allPage:allForm:CDS_staff_mlktp').style.visibility="hidden" ;
+                document.getElementById('allPage:allForm:CDS_staff_mlktp').style.width="200px" ;
+            }
+            resetDetailDivMargintop();
+        }
+        
+        </script>
+        <style type="text/css">
+            .hideDropdown select{
+                display: none
+            }
+            .menu div.m_title{
+                /*width: 308px;*//*20230619 ljh*/
+                text-align: left;
+                margin: 0;
+                /* background:#95aee5; */
+                background:#dcdcdc;
+                /*height: 42px;*/
+                padding-left: 0.75rem;/*20230721 ljh  */
+            }
+            .menu div.m_titleg{
+                /*width: 308px;*//*20230619 ljh*/
+                text-align: left;
+                margin: 0;
+                background:#DCDCDC;
+                /*height: 42px;*/
+            }
+            .dateFormat {
+                display: none;
+            }
+            #Step_tab {
+                list-style-type: none;
+                padding: 0;
+                /* 2023-04-23   zyh   lightning鍗囩骇   start */
+                /* height: 25px; */
+                height: 30px;
+                /* 2023-04-23   zyh   lightning鍗囩骇   end */
+                border-bottom: 5px solid #3b5998;
+            }
+            #Step_tab li {
+                position: relative;
+                /* 20230619 ljh*/
+                /* width: 20%; */
+                width: 50%;
+                /* 20230619 ljh*/
+                float: left;
+                margin: 0;
+                padding: 0;
+                text-align: center;
+                cursor: pointer;
+                /*20230620 ljh*/
+                height:30px;
+                line-height: 30px;
+                /*20230620 ljh*/
+            }
+            #Step_tab li span {
+                margin: 0;
+                padding: 15px 0 11px;
+                color: #2daae1;
+                font-size: 12px;
+                font-weight: bold;
+                line-height: 1;
+            }
+            #Step_tab li.selected {
+                background: #3b5998;
+            }
+            #Step_tab li.selected span {
+                color: #fff;
+            }
+            /*20230620 ljh*/
+            /*div#main {
+                width: 320px;
+            }*/
+            /*20230620 ljh*/
+            div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
+            div.rtop div {background:#DCDCDC;}
+            /* div.rtop div {background:#95aee5;} */
+            div.rtopg div {background:#DCDCDC;}
+            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;}
+            div.r1 {margin: 0 5px; background:silver;} 
+            div.r2 {margin: 0 3px; border-width:0 2px;} 
+            div.r3 {margin: 0 2px;}  
+            div.r4 {margin: 0 1px; height: 2px;}
+            hr {
+                border-top: 2px dotted #f00;
+                color: #fff;
+                background-color: #fff;
+                height: 1px;
+                /*20230620 ljh start*/
+                /*width: 90%;*/
+                width: 98%;
+                /*20230620 ljh end*/
+            }
+            .close {
+                color: #aaaaaa;
+                float: right;
+                font-size: 28px;
+                font-weight: bold;
+            }
+            .close:hover,
+            .close:focus {
+                color: #000;
+                text-decoration: none;
+                cursor: pointer;
+            }
+            .menu blockquote{
+                margin: 0;
+                padding: 1px;
+                list-style: none;
+                border-top: 1px solid #ddd;
+            }
+            /*20230621 ljh start*/
+            .lookupInput{
+                display: inline-block;
+                position: relative;
+                width: 145px;
+                padding: 0;
+            }
+            .lookupInput input[type="text"]{
+                padding: 0;
+            }
+            /*20230621 ljh end*/
+        </style>
+        <div id="myModal" class="modal">
+        
+          <!-- Modal content -->
+          <div class="modal-content">
+            <span class="close" onclick="stopScan()">&times;</span>
+            <p>鎵弿涓�</p>
+                <p>Code:<input type="text" id="qrcode"/></p>
+            <video playsinline="true" id="preview" style="width: 100%;z-index: 11;transform: scaleX(-1);margin-top: 10px;"></video>
+              鎵爜灞ュ巻锛�
+            <ul id="scanedqr" style="list-style-type: none; text-align: center;padding: 0;width: 100%; height: 100px; overflow: auto">
+            </ul>
+          </div>
+        
+        </div>
+        <apex:form id="allForm">
+            <!-- 20230721 ljh resetDetailDivMargintop() -->
+            <apex:actionFunction name="save" action="{!save}" rerender="allForm" onComplete="unblockUI();checkMessage();resetDetailDivMargintop();" />
+            <apex:actionFunction name="filljsQRAction" action="{!filljsQRAction}" rerender="detail,message" oncomplete="unblockUI();resetDetailDivMargintop();">
+                <apex:param name="firstParam" assignTo="{!ApplyId}" value="" />
+                <apex:param name="secondParam" assignTo="{!CheckedId}" value="" />
+            </apex:actionFunction>
+            <apex:actionRegion >
+                <apex:actionFunction name="deleteDetail" action="{!deleteDetail}" rerender="detail,message" oncomplete="unblockUI();resetDetailDivMargintop();">
+                    <apex:param name="firstParam" assignTo="{!UnCheckedId}" value="" />
+                </apex:actionFunction>
+            </apex:actionRegion>
+            <!-- <apex:actionFunction name="Shippment" action="{!Shippment}" /> -->
+            <!-- 20230722 ljh -->
+            <apex:actionFunction name="searchSlip" action="{!searchSlip}" reRender="allForm" onComplete="unblockUI();fixDeliveryType();resetDetailDivMargintop();" />
+            <!-- 20230722 ljh -->
+            <apex:actionFunction name="ShippmentDetail" action="{!ShippmentDetail}" reRender="allForm" onComplete="unblockUI();fixDeliveryType();resetDetailDivMargintop();" >
+                <apex:param name="firstParam" assignTo="{!CheckedId}" value="" />
+            </apex:actionFunction>
+            <apex:actionFunction name="ShippmentAdd" action="{!ShippmentAdd}" >
+                <apex:param name="firstParam" assignTo="{!UnCheckedId}" value="" />
+            </apex:actionFunction>
+            <apex:inputHidden value="{!done_flg}" id="done_flg"/>
+            <div id="main">
+                <div id="hander" class="freezehander">
+                    <apex:outputPanel id="message">
+                        <apex:pageMessages />
+                    </apex:outputPanel>
+                    <apex:pageBlock id="newHeader">
+                        <table style="border-collapse: collapse; font-size:13px;">
+                            <colgroup>
+                                <col width="20%" />
+                                <col width="80%" />
+                            </colgroup>
+                            <tr>
+                                <!-- 鐘舵�佸垏鎹tn -->
+                                <th  style="font-size:20px;text-align: center;width:280px;height: 50px;" >
+                                    <ul id="Step_tab" style="margin:0;">
+                                        <apex:outputPanel layout="none" rendered="{!IF(Step_status='鏄庣粏', true, false)}">
+                                            <li onclick="javascript:ShippmentAddJs();return false"><span class="tabsize">杩藉姞</span></li>
+                                            <li class="selected"><span>鏄庣粏</span></li>
+                                        </apex:outputPanel>
+                                        <apex:outputPanel layout="none" rendered="{!IF(Step_status='杩藉姞', true, false)}">
+                                            <li class="selected"><span>杩藉姞</span></li>
+                                            <li onclick="javascript:ShippmentDetail();return false"><span class="tabsize">鏄庣粏</span></li>
+                                        </apex:outputPanel>
+        
+                                    </ul>
+                                </th>
+                                <th width="900px;" style="padding-left:50px;" class="myBtn">
+                                    <apex:commandButton styleClass="commandbutton" onclick="qrsacn(0)" value="鎵竴鎵敵璇蜂功" rerender="dummy" rendered="{!IF(Step_status='杩藉姞', true, false)}"/>
+                                    <apex:commandButton styleClass="commandbutton" onclick="checkAllDetail();return false" value="鍏ㄩ��" rerender="dummy" rendered="{!IF(Step_status='杩藉姞', true, false)}"/>
+                                    <apex:commandButton styleClass="commandbutton" onclick="addToDetail();return false" value="杩藉姞" rerender="dummy" rendered="{!IF(Step_status='杩藉姞', true, false)}"/>
+                                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='鏄庣粏', true, false)}">
+                                        <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="淇濆瓨" rerender="dummy" disabled="{!saveBtnDisabled}"/>
+                                        <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
+                                    </apex:outputPanel>
+                                </th>
+                            </tr>
+                        </table>
+                        <table style="border-collapse: collapse; font-size:13px;" width="80%">
+                            <apex:outputPanel layout="none" rendered="{!IF(Step_status='鏄庣粏', true, false)}" id="slipPanel">
+                                <tr>
+                                    <td colspan="2"><apex:outputPanel layout="none" rendered="{!IF(slip.Id=null, true, false)}"><span style="margin-left:30px;font-weight: bold;font-size: 15px;">鏂板缓</span></apex:outputPanel><apex:outputPanel layout="none" rendered="{!IF(slip.Id=null, false, true)}"><span style="margin-left:30px;font-weight: bold;">缂栬緫锛歔{!slip.DeliveryCompany_SlipNo__c}]</span></apex:outputPanel></td>
+                                </tr>
+                                <tr>
+                                    <td style="text-align: right;" class="deliveryslip">鍙戣揣-杩愯緭鍗曞彿 锛� </td>
+                                    <td align="left">
+                                        <!-- 2023-04-23   zyh   lightning鍗囩骇 -->
+                                        <apex:inputField value="{!slip.Name}" style="width:145px;padding: 0;float:left" id="SlipNo"/>
+                                        <!-- <apex:inputField value="{!slip.Name}" style="width:120px;float:left" id="SlipNo"/> -->
+                                        <apex:commandButton styleClass="commandbutton" onclick="blockme();searchSlip();return false;" style="float:left;" value="妫�绱�" rerender="dummy"/>
+                                        <!-- <apex:commandButton styleClass="commandbutton" onclick="qrsacn(1)" value="鎵繍杈撳崟鍙�" rerender="dummy"/> -->
+                                        <apex:commandButton styleClass="commandbutton" onclick="qrsacn(1)" value="鎵繍杈撳崟鍙�" rerender="dummy" style="margin-left:5px;"/>
+                                        <!-- 2023-04-23   zyh   lightning鍗囩骇 -->
+                                    </td>
+                                
+                                    <td style="text-align: right" class="deliveryslip">鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryType__c.label} 锛� </td>
+                                    <td align="left"><apex:inputField value="{!slip.DeliveryType__c}" style="width:145px;height: 30px;padding: 0;" id="DeliveryType"/></td>
+                                </tr>
+                                <tr>
+                                    <td style="text-align: right" class="deliveryslip">鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.Distributor_method__c.label} 锛� </td>
+                                    <td align="left"><apex:inputField value="{!slip.Distributor_method__c}" style="width:145px;height: 30px;padding: 0;" id="DistributorMethod"/></td>
+                                
+                                    <td style="text-align: right" class="deliveryslip">鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryCompany__c.label} 锛� </td>
+                                    <td align="left"><apex:inputField value="{!slip.DeliveryCompany__c}" style="width:145px;height: 30px;padding: 0;" id="DeliveryCompany"/></td>
+                                </tr>
+                                <tr>
+                                    <td style="text-align: right" class="deliveryslip">鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.Wh_Staff__c.label} 銆� </td>
+                                    <td align="left"><apex:inputField styleClass="hideDropdown" value="{!slip.Wh_Staff__c}" style="width:130px;height: 30px;" /></td>
+                               
+                                    <td style="text-align: right" class="deliveryslip">鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.Combine_Pack__c.label} 銆� </td>
+                                    <td align="left"><apex:inputField styleClass="hideDropdown" value="{!slip.Combine_Pack__c}" style="width:145px;" /></td>
+                                </tr>
+                                <!-- <tr>
+                                    <td colspan="2"><apex:inputField value="{!slip.Wh_Staff__c}" style="width:130px;" /></td>
+                                </tr> -->
+                            </apex:outputPanel>
+                        </table>
+                    </apex:pageBlock>
+                    <!-- 20230620 ljh  -->
+                </div>
+                <apex:outputPanel id="detail">
+                <div id="detailDiv" class="detail">
+                    <apex:inputHidden value="{!ApplyId}" id="applyId"/>
+                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='杩藉姞', true, false)}">
+                        <apex:variable var="indexloop" value="{!0}" />
+                        <apex:variable var="applychange" value="{!0}" />
+                        <apex:variable var="SetName" value="" />
+                        <apex:variable var="SetName2" value="" />
+                        <apex:repeat value="{!esdList}" var="esdInfo" id="esdList2">
+                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
+                            <apex:variable var="indexloop" value="{!indexloop+1}"/>
+                            <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, SetName)}" />
+                            <apex:variable var="SetName2" value="{!IF(SetName2='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, SetName2)}" />
+                            <apex:outputPanel layout="none" rendered="{!IF(SetName2=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id && indexloop != 1, true, false)}">
+                                <!-- <br/> -->
+                                <!-- 20230623 ljh -->
+                            </apex:outputPanel>
+                            
+                            <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, false, true)}">
+                                <hr/>
+                                <!-- 20230620 ljh start -->
+                                <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2> -->
+                                <span style="padding: 5px 0.75rem;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</span>
+                                <br/>
+                                <!-- 20230620 ljh end -->
+                                <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}" />
+                                <apex:variable var="applychange" value="{!1}" />
+                                <input type="hidden" value="{!esdInfo.rec.Rental_Apply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.Rental_Apply__c}"/>
+                            </apex:outputPanel>
+        
+                            <apex:outputPanel layout="none" rendered="{!IF(SetName2=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}">
+                                <apex:outputPanel layout="none" rendered="{!IF(applychange=1, false, true)}">
+                                <hr/>
+                                </apex:outputPanel>
+                                <apex:variable var="applychange" value="{!0}" />
+                                <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Rental_Apply_Equipment_Set__r.Inspection_not_finish__c > 0, false, true)}">
+                                <!-- 20230721 ljh -->
+                                <apex:inputCheckbox value="{!esdInfo.isChecked}"  style="margin:0 0 0 0.75rem;"/>
+                                <input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply__c}"/>
+                                    </apex:outputPanel>
+                                <!-- 2023-04-26   zyh   lightning鍗囩骇   start -->
+                                <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}锛歿!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h2> -->
+                                <span style="padding: 5px;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}锛歿!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
+                                <!-- 2023-04-26   zyh   lightning鍗囩骇   end -->
+                                <apex:variable var="SetName2" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Id}" />
+                            </apex:outputPanel>
+        
+                            <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
+                                <!-- 2023-04-26   zyh   lightning鍗囩骇   start -->
+                                <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2>
+                                <br/> -->
+                                <div style="padding: 5px 0.75rem;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</div>
+                                <!-- 2023-04-26   zyh   lightning鍗囩骇   end -->
+                                <input type="hidden" value="{!esdInfo.rec.Rental_Apply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.Rental_Apply__c}"/>
+                                <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Rental_Apply_Equipment_Set__r.Inspection_not_finish__c > 0, false, true)}">
+                                <!-- 20230721 ljh -->
+                                <apex:inputCheckbox value="{!esdInfo.isChecked}"  style="margin:0 0 0 0.75rem;"/>
+                                <input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply__c}"/>
+                                </apex:outputPanel>
+                                <!-- 2023-04-26   zyh   lightning鍗囩骇   start -->
+                                <span style="padding: 5px; font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}锛歿!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
+                                <!-- <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> -->
+                                <!-- 2023-04-26   zyh   lightning鍗囩骇   end -->
+                            </apex:outputPanel>
+                            <div class="rtop">
+                                <div class="r1"></div>
+                                <div class="r2"></div>
+                                <div class="r3"></div>
+                                <div class="r4"></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 鍥炲簱銇疭et鍗樹綅銇с�佹槑绱颁竴銇や竴銇ゃ伄quickCheck瑕併倝銇亜銇屻�丼et銇畄uickCheck瑕併倠锛� -->
+                            <!-- 20230721 ljh -->
+                            <ul style="padding: 1px 0.75rem;" >
+                                <li>
+                                    <!-- 20210721 ljh 1719 start -->
+                                    <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result__c.label}锛� </span> -->
+                                    <span>鍙戣揣鍓�-妫�娴嬬粨鏋滐細 </span> 
+                                    <!-- 20210721 ljh 1719 end -->
+                                    <span><apex:outputField value="{!esdInfo.rec.Inspection_result__c}" style="margin:3px;width:150px" /></span>
+                                </li>
+                                <li><span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_NG__c.label}锛� </span>
+                                    <span><apex:outputField value="{!esdInfo.rec.Inspection_result_NG__c}" style="margin:3px;width:150px" /></span>
+                                </li>
+                                <li><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>
+                                <!-- 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> -->
+                                <!-- 2023-08-01 zyh 鏈鸿韩缂栫爜鎹綅缃� end -->
+                            </ul>
+                            </div>
+                            <div class="rbottom">
+                                <div class="r4"></div>
+                                <div class="r3"></div>
+                                <div class="r2"></div>
+                                <div class="r1"></div>
+                            </div>
+                            </apex:outputPanel>
+                        </apex:repeat>
+                    </apex:outputPanel>
+                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='鏄庣粏', true, false)}">
+                        <apex:variable var="indexloop" value="{!0}" />
+                        <apex:variable var="SetName" value="" />
+                        <apex:repeat value="{!esdList}" var="esdInfo" id="esdList">
+                        <apex:outputPanel layout="none" rendered="{!esdInfo.isChecked || esdInfo.hasSended}">
+                            <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/> -->
+                                <!-- 20230623 ljh -->
+                            </apex:outputPanel>
+                            <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}">
+                                <hr/>
+                                <!-- 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 layout="none" rendered="{!NOT(esdInfo.hasSended)}"><apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="鍒犻櫎" rerender="dummy"/></apex:outputPanel><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
+                                <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)}">
+                                <!-- 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 layout="none" rendered="{!NOT(esdInfo.hasSended)}"><apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="鍒犻櫎" rerender="dummy"/></apex:outputPanel><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
+                            </apex:outputPanel>
+                            <apex:outputPanel layout="none" rendered="{!esdInfo.hasSended}">
+                            <div class="rtopg">
+                                <div class="r1"></div>
+                                <div class="r2"></div>
+                                <div class="r3"></div>
+                                <div class="r4"></div>
+                            </div>
+                            </apex:outputPanel>
+                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
+                            <div class="rtop">
+                                <div class="r1"></div>
+                                <div class="r2"></div>
+                                <div class="r3"></div>
+                                <div class="r4"></div>
+                            </div>
+                            </apex:outputPanel>
+                            <div class="menu">
+                            <apex:outputPanel layout="none" rendered="{!esdInfo.hasSended}">
+                            <h2><div class="m_titleg">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;宸插彂閫�</div>
+                            </h2>
+                            </apex:outputPanel>
+                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
+                            <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
+                                <!-- 2023-08-01 zyh 鏈鸿韩缂栫爜鎹綅缃� -->
+                                <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)</span>
+                                <!-- 2023-08-01 zyh 鏈鸿韩缂栫爜鎹綅缃� -->
+                                
+                            </div>
+                            </h2>
+                            </apex:outputPanel>
+                            <!-- TODO 鍥炲簱銇疭et鍗樹綅銇с�佹槑绱颁竴銇や竴銇ゃ伄quickCheck瑕併倝銇亜銇屻�丼et銇畄uickCheck瑕併倠锛� -->
+                            <!-- 20230721 ljh -->
+                            <ul style="padding: 1px 0.75rem;">
+                                <li>
+                                    <!-- 20230626 ljh  start-->
+                                    <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result__c.label}锛� </span> -->
+                                    <span>鍙戣揣鍓�-妫�娴嬬粨鏋滐細 </span> 
+                                    <!-- 20230626 ljh  end-->
+                                    <span><apex:outputField value="{!esdInfo.rec.Inspection_result__c}" style="margin:3px;width:150px" /></span>
+                                </li>
+                                <li><span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_NG__c.label}锛� </span>
+                                    <span><apex:outputField value="{!esdInfo.rec.Inspection_result_NG__c}" style="margin:3px;width:150px" /></span>
+                                </li>
+                                <li><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>
+                                <!-- 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> -->
+                                <!-- 2023-08-01 zyh 鏈鸿韩缂栫爜鎹綅缃� end -->
+                            </ul>
+                            </div>
+                            <div class="rbottom">
+                                <div class="r4"></div>
+                                <div class="r3"></div>
+                                <div class="r2"></div>
+                                <div class="r1"></div>
+                            </div>
+                        </apex:outputPanel>
+                        <apex:inputCheckbox value="{!esdInfo.isChecked}" style="display: none"/>
+                        </apex:repeat>
+                    </apex:outputPanel>
+                </div>
+                </apex:outputPanel>
+            </div>
+            <script type="text/javascript">
+                var standalone = window.navigator.standalone,
+                    userAgent = window.navigator.userAgent.toLowerCase(),
+                    safari = /safari/.test( userAgent ),
+                    ios = /iphone|ipod|ipad/.test( userAgent ),
+                    // 20230619 ljh
+                    // 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 ","");
+                    }
+                    // 20230619 ljh
+                let scanner = new Instascan.Scanner({ video: document.getElementById('preview'), scanPeriod: 5 ,mirror: false});
+                scanner.addListener('scan', function (content) {
+                  filljsQR(content);
+                });
+                
+                function qrsacn(stype) {
+                    scanType = stype;
+                    if (!standalone && !safari && ios) {
+                        window.location.href="sfqr://scan";
+                    } else {
+                        j$(".modal").show();
+                        Instascan.Camera.getCameras().then(function (cameras) {
+                          if (cameras.length > 0) {
+                            if (ver >= 13) {
+                                scanner.start(cameras[1]);
+                            } else {
+                                scanner.start(cameras[0]);
+                            }
+                          } else {
+                            console.error('No cameras found.');
+                          }
+                        }).catch(function (e) {
+                          console.error(e);
+                        });
+                    }
                 }
-            });
-        });
-    </script>
-</apex:form>
-</apex:page>
\ No newline at end of file
+        
+                function stopScan() {
+                    scanner.stop().then(function () {
+                        j$(".modal").hide();
+                    });
+                    j$("#scanedqr").children().remove();
+                }
+                j$(document).ready(function(){
+                    j$( '#qrcode' ).unbind();
+                    j$( '#qrcode' ).keypress( function ( e ) {
+                        if ( e.which == 13 ) {
+                            filljsQR(j$( '#qrcode' ).val());
+                            return false;
+                        }
+                    });
+                });
+            </script>
+        </apex:form>
+        </apex:page>
\ No newline at end of file

--
Gitblit v1.9.1