<apex:page controller="TransferAgencyReceivedController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="办事处到货确认/CDS/回库">
|
<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:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
|
<style type="text/css">
|
.hideDropdown select{
|
display: none
|
}
|
.modal {
|
display:none;
|
position: fixed; /* Stay in place */
|
z-index: 10; /* Sit on top */
|
left: 0;
|
top: 0;
|
width: 100%; /* Full width */
|
height: 100%; /* Full height */
|
overflow: auto; /* Enable scroll if needed */
|
background-color: rgb(0,0,0); /* Fallback color */
|
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
}
|
|
/* Modal Content/Box */
|
.modal-content {
|
background-color: #fefefe;
|
margin-left: -100px;
|
margin-top: 100px;
|
padding: 20px;
|
border: 1px solid #888;
|
left: 50%;
|
position: absolute;
|
width: 200px;
|
}
|
table.list td{
|
width:100px;
|
border-width: 1px;
|
}
|
table.list td.col_chk {
|
width:30px;
|
}
|
body .pbBody table.list tr.headerRow td, body .pbBody table.list tr.headerRow th {
|
border-width: 1px;
|
}
|
</style>
|
<script type="text/javascript">
|
function checkMessage() {
|
if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
|
alert("保存成功");
|
}
|
}
|
var scanType = 0;
|
function filljsQR(qrcode) {
|
if(!qrcode) return;
|
blockme();
|
if(scanType == 1){
|
j$("input[name$='SlipNo']").val(qrcode);
|
}
|
else{
|
var qrtag = j$("input[name=qrcode][value='"+qrcode+"']");
|
var qrtag1 = j$("input[name=qrcode][value='ArrivalResult" + qrcode+"']");
|
// var checke = j$("input[name=qrcode][value="+qrcode+"]").parent().parent().children("td.col_Arrival_in_wh__c").children("input[type=checkbox]");
|
// var checke1 = j$("input[name=qrcode][value="+qrcode+"]").parent().parent().children("td.col_Arrival_in_wh__c").children("input[type=hidden]");
|
var b3 = j$("input[name=qrcode][value='"+qrcode+"']").parent().parent().children("td.onetoone").find("span")[0];
|
if(qrtag == undefined) {
|
return;
|
}
|
if(qrtag.size() > 1) {
|
alert("数量管理附属品请手动打勾!");
|
}
|
else if(qrtag.size() == 1) {
|
box = qrtag.siblings("input[type=checkbox]")[0];
|
box1 = qrtag.siblings("input[type=hidden]")[0];
|
box.disabled = false;
|
// checke[0].disabled = false;
|
box.checked = true;
|
box1.value = true;
|
select = qrtag1.siblings("select")[0];
|
select.value = 'OK';
|
//20210517 ljh 1832 add
|
//console.log(qrtag1);
|
var b4 = qrtag1.parent().parent().children("td.col_Arrival_NG_Comment__c").find("input[type='text']")[0];
|
console.log(b4);
|
b4.value = '';
|
b4.disabled = true;
|
//20210517 ljh 1832 add end
|
// checke[0].checked = true;
|
// checke1.value = true;
|
b3.style.display = "block";
|
var bb = j$(box).parent().parent().children("td.col_chk").children("input[type=checkbox]")[0];
|
bb.checked=true;
|
checkOnetoOne(bb);
|
}
|
}
|
j$("#scanedqr").append("<li>"+qrcode+"</li>");
|
j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
|
unblockUI();
|
}
|
function savejs() {
|
// blockme();
|
var saveable = true;
|
j$("input[name=qrcode]").each(function() {
|
j$(this).parent().children("input[type=checkbox]:checked").each(function() {
|
j$(this).parent().parent().children(".col_Arrival_in_wh__c").children("input[type=checkbox]")[0].checked = true;
|
j$(this).parent().parent().children(".col_chk").children("input[type=checkbox]")[0].checked = true;
|
});
|
});
|
if (saveable) {
|
// stockup();
|
j$("input#checker").attr('checked',false)
|
} else {
|
alert("一对一分配附属品不能单独回库!")
|
unblockUI();
|
}
|
}
|
|
function setArrivalResult(sele) {
|
// blockme();
|
var saveable = true;
|
j$("table td.col_chk input[type=checkbox]:checked").each(function(){
|
var bx = j$(this).parent().siblings("td.col_ArrivalResult__c").find("select")[0];
|
bx.value = sele;
|
var b1 = j$(this).parent().siblings("td.col_CDS_complete__c").find("input[type='checkbox']")[0];
|
var b11 = j$(this).parent().siblings("td.col_CDS_complete__c").find("input[type='hidden']")[1];
|
var b2 = j$(this).parent().siblings("td.col_Arrival_in_wh__c").find("input[type='checkbox']")[0];
|
var b21 = j$(this).parent().siblings("td.col_Arrival_in_wh__c").find("input[type='hidden']")[0];
|
var b3 = j$(this).parent().siblings("td.onetoone").find("span")[0];
|
var b4 = j$(this).parent().siblings("td.col_Arrival_NG_Comment__c").find("input[type='text']")[0];//20210426 ljh 1832 add
|
var b41 = j$(this).parent().parent().children("td.col_Arrival_NG_Comment__c").find("span")[0];//20210517 ljh 1832 add
|
if (sele == '欠品' || sele == '无' || sele == 'NG') {
|
b1.checked = false;
|
b11.value = false;
|
b2.checked = false;
|
b1.disabled = true;
|
b2.disabled = true;
|
b21.value = false;
|
b3.style.display = "none";
|
//20210517 ljh 1832 add start
|
if(sele == 'NG'){
|
b41.style.display = "block";
|
b4.disabled = false;
|
}else{
|
b4.value = '';
|
b4.disabled = true;
|
}
|
//20210517 ljh 1832 add ene
|
}
|
else if (sele == 'OK') {
|
b1.disabled = false;
|
b2.disabled = false;
|
b3.style.display = "block";
|
b1.checked = true;
|
b11.value = true;
|
b2.checked = true;
|
b21.value = true;
|
//20210517 ljh 1832 add start
|
console.log(b4);
|
console.log(b41);
|
b4.value = '';
|
b4.disabled = true;
|
b41.style.display = "none";
|
//20210517 ljh 1832 add end
|
}
|
});
|
stopScan();
|
}
|
|
function checkAll() {
|
j$("table#tableData_L td.col_chk input[type=checkbox]:enabled").each(function(){
|
if(!this.disabled) {
|
this.checked = j$("input#checker").prop('checked');
|
checkOnetoOne(this);
|
}
|
})
|
}
|
var globalChecked = false;
|
function checkGlobal() {
|
globalChecked = !globalChecked;
|
j$("table td.col_chk input[type=checkbox]:enabled").each(function(){
|
this.checked = globalChecked;
|
if (this.id != 'checker') {
|
checkOnetoOne(this);
|
}
|
})
|
}
|
function checkOnetoOne(box) {
|
// var tasIdTag = j$(box).siblings("input[name=onetoone_main]");
|
// if(tasIdTag.size()>0) {
|
// var tasId = tasIdTag.val();
|
// // 同一个一览下的一对一附属品下架打勾
|
// j$("input[type=hidden][value="+tasId+"]").each(function(){
|
// j$(this).siblings("input[type='checkbox']").prop('checked', box.checked);
|
// });
|
// }
|
if (j$(box).parent().hasClass('col_ArrivalResult__c')) {
|
console.log('10');
|
var b1 = j$(box).parent().siblings("td.col_CDS_complete__c").find("input[type='checkbox']")[0];
|
var b11 = j$(box).parent().siblings("td.col_CDS_complete__c").find("input[type='hidden']")[1];
|
var b2 = j$(box).parent().siblings("td.col_Arrival_in_wh__c").find("input[type='checkbox']")[0];
|
var b21 = j$(box).parent().siblings("td.col_Arrival_in_wh__c").find("input[type='hidden']")[0];
|
var b3 = j$(box).parent().siblings("td.onetoone").find("span")[0];
|
var cds = j$(box).parent().siblings("td.col_CDS_complete__c").find("span[name='CDS_complete']")[0];
|
var b4 = j$(box).parent().siblings("td.col_Arrival_NG_Comment__c").find("input[type='text']")[0];//20210426 ljh 1832 add
|
var b41 = j$(box).parent().parent().children("td.col_Arrival_NG_Comment__c").find("span")[0];//20210517 ljh 1832 add
|
var cdsVal = cds.innerText.replace(/\s+/g,"");
|
var canReturn = j$(box).parent().parent().attr("canReturn");
|
var editable = j$(box).parent().parent().attr("editable");
|
if (j$(box).val() == '欠品' || j$(box).val() == '无' || j$(box).val() == 'NG' || j$(box).val() == '') {
|
b1.checked = false;
|
b11.value = false;
|
if(editable == "true" && canReturn == "false"){
|
b2.checked = false;
|
b2.disabled = true;
|
}
|
b1.disabled = true;
|
b21.value = false;
|
b3.style.display = "none";
|
//20210426 ljh 1832 add start
|
if(j$(box).val() == 'NG'){
|
b41.style.display = "block";
|
b4.disabled = false;
|
// b41.style.display = "none";
|
}else{
|
b4.value = '';
|
b4.disabled = true;
|
}
|
//20210426 ljh 1832 add end
|
}
|
else if (j$(box).val() == 'OK') {
|
b1.disabled = false;
|
// b2.disabled = false;
|
// b3.style.display = "block";
|
b1.checked = true;
|
b11.value = true;
|
// b2.checked = true;
|
// b21.value = true;
|
if ( cdsVal == "true" && canReturn == "false") {
|
b2.disabled = false;
|
b3.style.display = "block";
|
b2.checked = true;
|
b21.value = true;
|
}
|
//20210426 ljh 1832 add start
|
b4.value = '';
|
b4.disabled = true;
|
//20210426 ljh 1832 add end
|
}
|
}
|
else if (j$(box).parent().hasClass('col_CDS_complete__c')) {
|
var b1 = j$(box).parent().parent().children("td.col_CDS_complete__c").find("input[type='checkbox']")[0];
|
var b2 = j$(box).parent().parent().children("td.col_Arrival_in_wh__c").find("input[type='checkbox']")[0];
|
var b21 = j$(box).parent().siblings("td.col_Arrival_in_wh__c").find("input[type='hidden']")[0];
|
var b3 = j$(box).parent().parent().children("td.onetoone").find("span")[0];
|
var ArrivalResult = j$(box).parent().parent().children("td.col_ArrivalResult__c").find("select")[0];
|
var cds = j$(box).parent().parent().children("td.col_CDS_complete__c").find("span[name='CDS_complete']")[0];
|
var cdsVal = cds.innerText.replace(/\s+/g,"");
|
var canReturn = j$(box).parent().parent().attr("canReturn");
|
if (b1.checked) {
|
if ( ArrivalResult.value == 'OK' && cdsVal == 'true' && canReturn == 'false') {
|
b2.disabled = false;
|
b21.value = false;
|
}
|
}
|
else {
|
b2.disabled = true;
|
b2.checked = false;
|
b21.value = false;
|
b3.style.display = "none";
|
}
|
}
|
else if (j$(box).parent().hasClass('col_Arrival_in_wh__c')) {
|
var b2 = j$(box).parent().parent().children("td.col_Arrival_in_wh__c").find("input[type='checkbox']")[0];
|
var b3 = j$(box).parent().parent().children("td.onetoone").find("span")[0];
|
if (b2.checked == true) {
|
b3.style.display = "block";
|
}
|
else {
|
b3.style.display = "none";
|
}
|
}
|
else if (j$(box).parent().hasClass('col_chk')) {
|
if ((j$(box).parent().parent().children("td.col_ArrivalResult__c").find("select")[0].value== ''
|
|| j$(box).parent().parent().children("td.col_ArrivalResult__c").find("select")[0].value== null)) {
|
j$(box).parent().parent().children("td.col_ArrivalResult__c").find("select")[0].value="OK";
|
var b1 = j$(box).parent().siblings("td.col_CDS_complete__c").find("input[type='checkbox']")[0];
|
var b11 = j$(box).parent().siblings("td.col_CDS_complete__c").find("input[type='hidden']")[1];
|
b1.disabled = false;
|
b1.checked = true;
|
b11.value = true;
|
}
|
var cds = j$(box).parent().parent().children("td.col_CDS_complete__c").find("span[name='CDS_complete']")[0];
|
var arrival = j$(box).parent().parent().children("td.col_Arrival_in_wh__c").find("input[type='checkbox']")[0];
|
var arrival1 = j$(box).parent().parent().children("td.col_Arrival_in_wh__c").find("input[type='hidden']")[0];
|
var canReturn = j$(box).parent().parent().attr("canReturn");
|
var cdsVal = cds.innerText.replace(/\s+/g,"");
|
if (cdsVal == "true" && canReturn == "false") {
|
var b21 = j$(box).parent().siblings("td.col_Arrival_in_wh__c").find("input[type='hidden']")[0];
|
if (arrival != null && arrival.disabled != true) {
|
arrival.checked = true;
|
b21.value = true;
|
}
|
}
|
var b3 = j$(box).parent().parent().children("td.onetoone").find("span")[0];
|
if ((arrival != null && arrival.checked == true && canReturn == 'false' ) || (arrival1 != null && arrival1.checked == true && canReturn == 'false')) {
|
b3.style.display = "block";
|
}
|
else {
|
b3.style.display = "none";
|
}
|
}
|
|
if (j$(box).parent().hasClass('col_chk') == false) {
|
j$(box).parent().siblings("td.col_chk").find("input")[0].checked = true;
|
}
|
}
|
|
function checkorce() {
|
if (j$(escapeVfId('allPage:allForm:needforceSave')).val() == 'true') {
|
if (window.confirm('有未补全附属品,是否需要拆分上架')) {
|
j$(escapeVfId('allPage:allForm:forceSave')).val('true');
|
setTimeout(function() {
|
blockme();
|
saveRecord();
|
});
|
}
|
}
|
}
|
function cdsSaveJs(){
|
cdsSave();
|
}
|
</script>
|
<div id="myModal" class="modal">
|
<!-- Modal content -->
|
<div class="modal-content">
|
<span class="close" onclick="stopScan()">×</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>
|
|
<div id="cancelModal" class="modal">
|
<div class="modal-content">
|
<span class="close" onclick="stopScan()">×</span>
|
<div>
|
调拨到货确认结果:
|
<select id="allselect">
|
<option>无</option>
|
<option>OK</option>
|
<option>NG</option>
|
<option>欠品</option>
|
</select>
|
<button value="确认" onclick="setArrivalResult(document.getElementById('allselect').value);" >确认</button>
|
</div>
|
</div>
|
</div>
|
|
<apex:form id="allForm" styleclass="pbBody">
|
<apex:actionFunction name="saveRecord" action="{!saveRecord}" rerender="detail,message,done_flg, forceSave, needforceSave" oncomplete="unblockUI();checkMessage();checEventFrame();"/>
|
<apex:actionFunction name="searchSlip" action="{!searchSlip}" reRender="allForm" onComplete="unblockUI();checkMessage();checEventFrame();" />
|
<apex:inputHidden value="{!done_flg}" id="done_flg"/>
|
<apex:inputHidden value="{!forceSave}" id="forceSave"/>
|
<apex:inputHidden value="{!needforceSave}" id="needforceSave"/>
|
<apex:inputHidden value="{!readOnly}" id="readOnly"/>
|
<apex:pageBlock id="searchBlock" tabStyle="Report" title="到货确认/CDS/回库">
|
<apex:pageBlockButtons location="top">
|
<apex:commandButton value="全选/取消全选" onclick="checkGlobal(); return false;" disabled="{!readOnly}"/>
|
<apex:commandButton value="扫一扫" onclick="qrscan(0);return false;" disabled="{!readOnly}"/>
|
<apex:commandButton value="到货确认&CDS" onclick="blockme();" action="{!cdsSave}" rerender="allForm, message" oncomplete="unblockUI();checkMessage();checEventFrame();" disabled="{!readOnly}"/>
|
<apex:commandButton value="回库" onclick="blockme();" action="{!arrival_in_whSave}" rerender="allForm, done_flg, message" oncomplete="unblockUI();checkMessage();checEventFrame();" disabled="{!readOnly}"/>
|
<apex:commandButton value="回寄" action="{!saveSlip}" onclick="blockme();" rerender="allForm, message" disabled="{!readOnly}" oncomplete="unblockUI();checkMessage();checEventFrame();"/>
|
<!-- <apex:commandButton value="保存" action="{!stockup}" onclick="blockme();" reRender="allForm, message" disabled="{!readOnly}" oncomplete="unblockUI();checkMessage();checEventFrame();checkorce();"/> -->
|
</apex:pageBlockButtons>
|
<apex:pageBlockSection >
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.TransferApply__c.fields.Name.Label}"/>
|
<apex:outputText value="{!apply_no}"/>
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem />
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="回寄-{!$ObjectType.FixtureDeliverySlip__c.fields.Name.Label}"/>
|
<apex:outputPanel >
|
<apex:inputField value="{!slip.Name}" id="SlipNo"/>
|
<apex:commandButton value="扫运输单" onclick="qrscan(1);return false;" disabled="{!readOnly}"/>
|
<apex:commandButton value="检索" onclick="blockme();searchSlip(); return false;" disabled="{!readOnly}"/>
|
</apex:outputPanel>
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="回寄-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryType__c.Label}"/>
|
<apex:inputField value="{!slip.DeliveryType__c}" id="deliveryType"/>
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="回寄-{!$ObjectType.FixtureDeliverySlip__c.fields.Distributor_method__c.Label}"/>
|
<apex:inputField value="{!slip.Distributor_method__c}" id="distributorMethod"/>
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="回寄-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryCompany__c.Label}"/>
|
<apex:inputField value="{!slip.DeliveryCompany__c}" id="deliveryCompany"/>
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="回寄-{!$ObjectType.FixtureDeliverySlip__c.fields.Wh_Staff__c.Label}"/>
|
<apex:outputPanel layout="none">
|
<apex:outputPanel layout="none" rendered="{!readOnly}">
|
<apex:outputField value="{!slip.Wh_Staff__c}" styleClass="hideDropdown"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!readOnly == false}">
|
<apex:inputField value="{!slip.Wh_Staff__c}" styleClass="hideDropdown"/>
|
</apex:outputPanel>
|
</apex:outputPanel>
|
</apex:pageBlockSectionItem>
|
</apex:pageBlockSection>
|
</apex:pageBlock>
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
<div id="out_Div_L">
|
<table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
|
<tr class="headerRow" height="30px">
|
<td class="col_chk" align="center">
|
<input type='checkbox' onClick='checkAll();' id="checker"/>
|
</td>
|
<apex:repeat value="{!outputFieldList}" var="info">
|
<td class="col_{!info.value}">
|
<!-- {!IF(info.label=='到货确认结果', '调拨到货确认结果', '到货确认结果')}{!IF(info.label=='下架','结果','')} -->
|
{!info.label}
|
</td>
|
</apex:repeat>
|
<td class="Arrival_NG_Comment__c">
|
到货NG结果备注
|
</td>
|
<td class="col_CDS_complete__c">
|
调拨CDS结果
|
</td>
|
<td class="col_Arrival_in_wh__c">
|
调拨回库结果
|
</td>
|
<td style="width: 110px;" class="onetoone">
|
一对一主体
|
</td>
|
<td style="width: 110px;">
|
调拨单明细状态
|
</td>
|
</tr>
|
</table>
|
</div>
|
<apex:outputPanel id="detail">
|
<div id="in_Div_L">
|
<table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
|
<apex:variable value="{!0}" var="Cnt" />
|
<apex:repeat id="dataline_L" value="{!esdList}" var="esdInfo">
|
<tr style="{!IF(esdInfo.needColor, 'background-color: #cfeef9', '')}" class="" id="tableData_L_{!Cnt}" editable="{!esdInfo.editable}" canReturn = "{!esdInfo.canReturn}">
|
<td class="dataCellBorder1 col_chk" align="center">
|
<apex:inputCheckbox onclick="if(this.checked) {checkOnetoOne(this)}" styleClass="rowchkcls" value="{!esdInfo.checked}" id="rowCheck" disabled="{!!esdInfo.editable}"/>
|
</td>
|
<apex:repeat value="{!outputFieldList}" var="info">
|
<td class="dataCellBorder1 {!'col_' + info.value}">
|
<apex:outputPanel layout="none" rendered="{!!esdInfo.editable}">
|
<apex:outputField value="{!esdInfo.rec[info.value]}" />
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
|
<apex:outputPanel layout="none" rendered="{!info.value == 'CDS_complete__c'}">
|
<input type="hidden" name="qrcode" value="{!esdInfo.rec.Fixture_QRCode_F__c}"/>
|
<apex:inputField onclick="checkOnetoOne(this);" id="inspectionResult" value="{!esdInfo.rec[info.value]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!info.value != 'CDS_complete__c'}">
|
<apex:inputField onchange="checkOnetoOne(this);" value="{!esdInfo.rec[info.value]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!info.value == 'ArrivalResult__c'}">
|
<input type="hidden" name="qrcode" value="{!'ArrivalResult' + esdInfo.rec.Fixture_QRCode_F__c}"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!esdInfo.rec.Main_OneToOne__c}">
|
<input type="hidden" name="onetoone_main" value="{!esdInfo.rec.TransferApplySummary__c}"/>
|
<input type="hidden" name="onetoone_main_CDS" value="{!esdInfo.rec.CDS_complete__c}"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!esdInfo.rec.OneToOneAccessory__c}">
|
<input type="hidden" name="onetoone" value="{!esdInfo.rec.TransferApplySummary__c}"/>
|
</apex:outputPanel>
|
</apex:outputPanel>
|
</td>
|
</apex:repeat>
|
<!-- 20210423 ljh 1832 add start-->
|
<td class="dataCellBorder1 col_Arrival_NG_Comment__c">
|
<span name="asset" style="display: {!IF(esdInfo.rec.ArrivalResult__c == 'NG', 'block', 'none')}">
|
<apex:InputField value="{!esdInfo.rec.Arrival_NG_Comment__c}" style="width:90px;" rendered="{!esdInfo.editable}" />
|
</span>
|
</td>
|
<!-- 20210423 ljh 1832 add end-->
|
<td class="dataCellBorder1 col_CDS_complete__c">
|
<apex:outputPanel layout="none" rendered="{!!esdInfo.editable}">
|
<apex:outputField value="{!esdInfo.rec.CDS_complete__c}" />
|
<input type="hidden" checked="{!esdInfo.rec.CDS_complete__c}"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
|
<input type="hidden" name="qrcode" value="{!esdInfo.rec.Fixture_QRCode_F__c}"/>
|
<apex:inputCheckbox disabled="{!esdInfo.rec.ArrivalResult__c != 'OK'}" onclick="document.getElementById('{!$Component.CDS_complete__c}').value = this.checked;checkOnetoOne(this);" id="inspectionResult" value="{!esdInfo.rec.CDS_complete__c}"/>
|
<apex:inputHidden id="CDS_complete__c" value="{!esdInfo.rec.CDS_complete__c}"/>
|
</apex:outputPanel>
|
<span name="CDS_complete" style="display: none">
|
{!esdInfo.rec.CDS_complete__c}
|
</span>
|
</td>
|
<td class="dataCellBorder1 col_Arrival_in_wh__c">
|
<apex:outputPanel layout="none" rendered="{!OR(!esdInfo.editable || esdInfo.canReturn)}">
|
<apex:outputField value="{!esdInfo.rec.Arrival_in_wh__c}" />
|
<input type="hidden" checked="{!esdInfo.rec.Arrival_in_wh__c}" />
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable, !esdInfo.canReturn)}">
|
<apex:inputCheckbox disabled="{!esdInfo.rec.CDS_complete__c == false}" onclick="document.getElementById('{!$Component.Arrival_in_wh__c}').value = this.checked; checkOnetoOne(this);" value="{!esdInfo.rec.Arrival_in_wh__c}" />
|
<apex:inputHidden id="Arrival_in_wh__c" value="{!esdInfo.rec.Arrival_in_wh__c}"/>
|
</apex:outputPanel>
|
</td>
|
<td style="width: 110px;" class="onetoone">
|
<span name="asset" style="display: {!IF(esdInfo.rec.Arrival_in_wh__c, 'block', 'none')}">
|
<apex:inputField rendered="{!esdInfo.needsetone}" style="width: 80px;" onclick="checkOnetoOne(this);" id="mainAsset" value="{!esdInfo.rec.OneToOneAsset__c}"/>
|
</span>
|
<apex:outputPanel layout="none" rendered="{!esdInfo.rec.Arrival_in_wh__c && esdInfo.checked == false}">
|
<apex:outputField rendered="{!esdInfo.needsetone}" style="width: 80px;" value="{!esdInfo.rec.OneToOneAsset__c}"/>
|
</apex:outputPanel>
|
</td>
|
<td style="width: 110px;" class="TAESD_Status">
|
<apex:outputField value="{!esdInfo.rec.TAESD_Status__c}"/>
|
</td>
|
</tr>
|
<apex:variable value="{!Cnt+1}" var="Cnt" />
|
</apex:repeat>
|
</table>
|
</div>
|
</apex:outputPanel>
|
<apex:outputPanel id="checEventFrame">
|
<script>
|
|
|
</script>
|
</apex:outputPanel>
|
</apex:form>
|
<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 = '';
|
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);
|
});
|
|
function qrscan(stype) {
|
scanType = stype;
|
if (!standalone && !safari && ios) {
|
window.location.href="sfqr://scan";
|
} else {
|
j$("#myModal").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);
|
});
|
}
|
}
|
|
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;
|
}
|
});
|
});
|
function checEventFrame() {
|
j$('select[name$="deliveryType"]').val('回寄');
|
j$('select[name$="deliveryType"]').prop('disabled', true);
|
// j$("input[name=onetoone]").siblings("input[type=checkbox]").each(function(){
|
// this.disabled = true;
|
// })
|
if (j$(escapeVfId('allPage:allForm:readOnly')).val() == 'true') {
|
j$("input#checker").attr('disabled', 'disabled');
|
}
|
else {
|
j$("input#checker").removeAttr('disabled');
|
}
|
setTimeout(function() {
|
j$('select[name$="distributorMethod"]').children('option[value="空运"]').remove();
|
j$('select[name$="deliveryCompany"]').children('option[value="莱比特"],option[value="嘉里大通"]').remove();
|
if (j$(escapeVfId('allPage:allForm:readOnly')).val() == 'true') {
|
j$("input[type=text],select").each(function(){
|
this.disabled = true;
|
})
|
}
|
}, 500);
|
|
}
|
checEventFrame();
|
</script>
|
</apex:page>
|