<apex:page Controller="TransferShippmentReceived3Controller" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="调拨出库入库">
|
<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.TransferShippmentReceivedcss)}"/>
|
<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;
|
border-radius:8px 8px 0 0;
|
}
|
.menu div.m_titleg{
|
width: 308px;
|
text-align: left;
|
margin: 0;
|
background:#DCDCDC;
|
/*height: 42px;*/
|
}
|
.menu {
|
border-radius:8px;
|
border:1px solid #D1D1D1;
|
}
|
.dateFormat {
|
display: none;
|
}
|
#Step_tab {
|
list-style-type: none;
|
padding: 0;
|
height: 25px;
|
border-bottom: 5px solid #3b5998;
|
}
|
#Step_tab li {
|
position: relative;
|
width: 20%;
|
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;
|
}
|
|
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()">×</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>
|
<!-- 状态切换btn -->
|
<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">
|
<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"/>
|
</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.TransferApply__r.Name, SetName)}" />
|
<apex:variable var="SetName2" value="{!IF(SetName2='', esdInfo.rec.TransferApplySummary__c, SetName2)}" />
|
<apex:outputPanel layout="none" rendered="{!IF(SetName2=esdInfo.rec.TransferApplySummary__c && indexloop != 1, true, false)}">
|
<br/>
|
</apex:outputPanel>
|
|
<apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.TransferApply__r.Name, false, true)}">
|
<hr/>
|
<h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.TransferApply__r.Name}</h2>
|
<br/>
|
<apex:variable var="SetName" value="{!esdInfo.rec.TransferApply__r.Name}" />
|
<apex:variable var="applychange" value="{!1}" />
|
<input type="hidden" value="{!esdInfo.rec.TransferApply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.TransferApply__c}"/>
|
</apex:outputPanel>
|
|
<apex:outputPanel layout="none" rendered="{!IF(SetName2=esdInfo.rec.TransferApplySummary__c, 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="{!esdInfo.inspectionFinished}">
|
<apex:inputCheckbox value="{!esdInfo.isChecked}"/><input type="hidden" value="{!esdInfo.rec.TransferApplySummary__c}"/><input type="hidden" value="{!esdInfo.rec.TransferApply__c}"/>
|
</apex:outputPanel>
|
<h2 style="padding: 5px;" class="detailtab">{!esdInfo.fsName}</h2>
|
<apex:variable var="SetName2" value="{!esdInfo.rec.TransferApplySummary__c}" />
|
</apex:outputPanel>
|
|
<apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
|
<h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.TransferApply__r.Name}</h2>
|
<br/>
|
<input type="hidden" value="{!esdInfo.rec.TransferApply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.TransferApply__c}"/>
|
<apex:outputPanel layout="none" rendered="{!esdInfo.inspectionFinished}">
|
<apex:inputCheckbox value="{!esdInfo.isChecked}"/><input type="hidden" value="{!esdInfo.rec.TransferApplySummary__c}"/><input type="hidden" value="{!esdInfo.rec.TransferApply__c}"/>
|
</apex:outputPanel>
|
<h3 style="padding: 5px;" class="detailtab">{!esdInfo.fsName}</h3>
|
</apex:outputPanel>
|
<div class="menu">
|
<h2><div class="m_title"> <apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />
|
</div></h2>
|
<!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
|
<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_TAES_Detail__c==null, false, true)}" value="{!esdInfo.rec.Asset__r.Pre_Reserve_TAES_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>
|
</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.TransferApplySummary__c, SetName)}" />
|
<apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.TransferApplySummary__c && indexloop != 1, true, false)}">
|
<br/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.TransferApplySummary__c, false, true)}">
|
<hr/>
|
<h3 style="padding: 5px;" class="detailtab">{!esdInfo.fsName}</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.TransferApplySummary__c}"/>
|
<apex:variable var="SetName" value="{!esdInfo.rec.TransferApplySummary__c}" />
|
</apex:outputPanel>
|
|
<apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
|
<h3 style="padding: 5px;" class="detailtab">{!esdInfo.fsName}</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.TransferApplySummary__c}"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!esdInfo.hasSended}">
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
|
</apex:outputPanel>
|
<div class="menu">
|
<apex:outputPanel layout="none" rendered="{!esdInfo.hasSended}">
|
<h2><div class="m_titleg"> <apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" /> 已发送</div>
|
</h2>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
|
<h2><div class="m_title"> <apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" /> </div>
|
</h2>
|
</apex:outputPanel>
|
<!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
|
<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_TAES_Detail__c==null, false, true)}" value="{!esdInfo.rec.Asset__r.Pre_Reserve_TAES_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>
|
</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 = '';
|
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 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);
|
});
|
}
|
}
|
|
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>
|