<apex:page Controller="EquipmentSetShippmentReceived4Controller" 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.EquipmentSetShippmentReceivedcss)}"/>
|
<apex:stylesheet value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.css')}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.js')}"/>
|
<script type="text/javascript">
|
function getQueryVariable(variable)
|
{
|
var query = window.location.search.substring(1);
|
var vars = query.split("&");
|
for (var i=0;i<vars.length;i++) {
|
var pair = vars[i].split("=");
|
if(pair[0] == variable){return pair[1];}
|
}
|
return(false);
|
}
|
if('{!crossRegion}' != '' && '{!Step_status}' != '追加' && getQueryVariable('done') != '1') {
|
alert('此备品存放地为 {!crossRegion}');
|
}
|
function showConfirm(message, okhandler, errorhandler) {
|
j$.confirm({
|
title: '确认',
|
content: message,
|
boxWidth: '50%',
|
useBootstrap: false,
|
buttons: {
|
OK: function () {
|
okhandler();
|
},
|
cancel: {
|
text: '取消', // With spaces and symbols
|
action: function () {
|
errorhandler();
|
}
|
}
|
}
|
});
|
}
|
function savejs() {
|
blockme();
|
save();
|
}
|
function deleteDetailJs(ele) {
|
blockme();
|
deleteDetail(j$(ele).next().val());
|
}
|
function changeCheckLost(ele) {
|
var ele1 = j$(ele).parent().parent().find('[name$="checkboxCDS"]');
|
var ele2 = j$(ele).parent().parent().find('[name$="checkboxGiveUp"]');
|
var ele3 = j$(ele).parent().parent().find('select[id$="checkLost"]');
|
var ele4 = j$(ele).parent().parent().find('span[id$="checkLost3"]');
|
var ele5 = j$(ele).parent().parent().find('input[id$="lostMemo"]');
|
var ele6 = j$(ele).parent().parent().find('input[id$="lostMemo2"]');
|
var lastken = ele3.val() == '欠品' || ele4.text() == '欠品';
|
ele5.prop('disabled', true);
|
ele6.prop('disabled', true);
|
if (j$(ele).val() == '欠品' || j$(ele).val() == '消耗') {
|
ele1.prop('checked', false);
|
ele1.prop('disabled', true);
|
changeCheckCds(ele1);
|
if (j$(ele).val() == '欠品') {
|
ele2.prop('disabled', false);
|
ele5.prop('disabled', false);
|
ele6.prop('disabled', false);
|
} else {
|
ele2.prop('checked', false);
|
ele2.prop('disabled', true);
|
}
|
} else if (j$(ele).val() == 'OK') {
|
ele1.prop('checked', true);
|
ele1.prop('disabled', false);
|
ele2.prop('checked', false);
|
ele2.prop('disabled', true);
|
changeCheckCds(ele1);
|
} else {
|
if (!lastken) {
|
ele1.prop('checked', false);
|
ele1.prop('disabled', !ele3.val() && !ele4.text());
|
ele2.prop('checked', false);
|
ele2.prop('disabled', true);
|
changeCheckCds(ele1);
|
} else {
|
ele2.prop('disabled', false);
|
ele2.prop('checked', false);
|
ele1.prop('disabled', true);
|
ele1.prop('checked', false);
|
changeCheckCds(ele1);
|
}
|
}
|
}
|
|
function changeCheckCds(ele) {
|
var ele1 = j$(ele).parent().parent().find('[name$="CDSChargement"]');
|
var ele2 = j$(ele).parent().parent().find('[name$="CDSType"]');
|
if (ele1 != null && ele2 != null) {
|
if (j$(ele).prop("checked") == true) {
|
ele1.prop('disabled', false);
|
ele2.prop('disabled', false);
|
} else {
|
ele1.val('');
|
ele2.val('');
|
ele1.prop('disabled', true);
|
ele2.prop('disabled', true);
|
}
|
}
|
}
|
|
function checkDetail(ele, resid) {
|
if (j$(ele).prop("checked")) {
|
var el = j$("input[data-resid='" + resid + "']");
|
el = el.filter(function(index,element){
|
var rid = j$(element).last().prev().attr('id');
|
rid = rid.substring(0, rid.lastIndexOf(":"));
|
j$("input[name^='"+rid+"']").prop("disabled", false);
|
return j$("input[name^='"+rid+"']").prop("checked") === false
|
})
|
el.prop("checked", true);
|
el.each(function(index, val) {
|
// j$(val).parent().parent().parent().find('input[id$="noitem"]').prop("disabled", false);
|
if (j$(val).data('lost')) {
|
j$(val).prop("disabled", false);
|
} else {
|
j$(val).prop("disabled", true);
|
}
|
})
|
} else {
|
j$("input[data-resid='" + resid + "']").prop("disabled", true);
|
j$("input[data-resid='" + resid + "']").parent().parent().parent().find('input[id$="noitem"]').prop("disabled", true);
|
j$("input[data-resid='" + resid + "']").parent().parent().parent().find('input[id$="noitem"]').prop("checked", false);
|
j$("input[data-resid='" + resid + "']").prop("checked", false);
|
}
|
|
}
|
function checkNoItem(ele, resdid) {
|
if (j$(ele).prop("checked")) {
|
j$("input[value='" + resdid + "']").prop("disabled", true);
|
j$("input[value='" + resdid + "']").prop("checked", false);
|
} else {
|
var resid = j$("input[value='" + resdid + "']").data("resid");
|
if (j$("input[data-resid2='" + resid + "']").prop("checked")) {
|
j$("input[value='" + resdid + "']").each(function(index, val) {
|
if (j$(val).data('lost')) {
|
j$(val).prop("disabled", false);
|
} else {
|
j$(val).prop("disabled", true);
|
j$(val).prop("checked", true);
|
}
|
})
|
// j$("input[value='" + resdid + "']").prop("disabled", true);
|
}
|
}
|
}
|
function filljsQR1(qrcode) {
|
if(!qrcode)return;
|
blockme();
|
var aId = j$(escapeVfId('allPage:allForm:applyId')).val();
|
aId = aId + "," + qrcode;
|
var resdid = '';
|
filljsQRAction(aId, resdid);
|
j$("#scanedqr").append("<li>"+qrcode+"</li>");
|
j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
|
}
|
function filljsQR2(qrcode) {
|
blockme();
|
if (j$("[data-qr='"+qrcode+"']").size() > 1) {
|
alert("数量管理附属品请手动打勾!");
|
} else {
|
j$("[data-qr='"+qrcode+"']").find('select').val('OK')
|
var cds = j$("[data-qr='"+qrcode+"']").children("input[name$='checkboxCDS']")
|
cds.prop('disabled', false).prop('checked',true)
|
changeCheckCds(cds);
|
}
|
unblockUI();
|
j$("#scanedqr").append("<li>"+qrcode+"</li>");
|
j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
|
}
|
var checked_raes = ''
|
var checked_raesd = ''
|
function addToDetail() {
|
blockme();
|
if (j$("input[name$='raesCheck']:checked").length <= 0) {
|
alert("请勾选要回寄的配套");
|
unblockUI();
|
} else {
|
//收集选中的一览Id
|
var needcheck = false;
|
j$("input[name$='raesCheck']:checked").each(function(){
|
checked_raes += j$(this).data('resid2')+',';
|
if (j$(this).next().val() == 'true') needcheck = true;
|
});
|
j$("input[name$='raesdCheck']:checked").each(function(){
|
if (j$(this).data('lost')) checked_raesd += j$(this).val()+',';
|
});
|
checked_raes.slice(0,-1);
|
checked_raesd.slice(0,-1);
|
var warning = false;
|
j$("input[name$='raesCheck']:not(:checked)").each(function() {
|
warning = warning ? warning : (j$(this).next().val() == 'true');
|
});
|
if (!needcheck || !warning) {
|
var resdid = '';
|
j$("input[name$='raesdCheck']:checked").each(function() {
|
resdid += j$(this).val()+":";
|
});
|
resdid = resdid.slice(0,-1);
|
// ShippmentDetail(resdid);
|
ShippmentDetailAdd(resdid);
|
} else {
|
showConfirm("注意整单归还备品,否则将按现场转借记违规3点", function() {
|
var resdid = '';
|
j$("input[name$='raesdCheck']:checked").each(function() {
|
resdid += j$(this).val()+":";
|
});
|
resdid = resdid.slice(0,-1);
|
// ShippmentDetail(resdid);
|
ShippmentDetailAdd(resdid);
|
}, function() {
|
unblockUI();
|
})
|
|
}
|
}
|
}
|
function checkAllDetail() {
|
// j$('select[name$=checkLost]').val('OK')
|
j$("input[name$='raesCheck']").prop("checked",true);
|
j$("input[name$='raesCheck']").trigger("change");
|
// j$('select[name$="checkLost"]').val("Add");
|
}
|
function checkAllDetail2() {
|
j$('select[name$="checkLost"]').val("OK");
|
j$('select[name$="checkLost2"]').val("OK");
|
// j$("input[name$='checkboxCDS']");
|
var cds = j$("input[name$='checkboxCDS']");
|
cds.prop('disabled', false).prop('checked',true);
|
changeCheckCds(cds);
|
}
|
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 ShippmentDetailJs() {
|
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);
|
ShippmentDetail();
|
}
|
|
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" ;
|
}
|
fixDeliveryType();
|
resetDetailDivMargintop();
|
// if ('{!Step_status}' == '追加') {
|
// j$('select[name$="checkLost"]').children().remove();
|
// j$('select[name$="checkLost"]').append(new Option("--なし--"))
|
// j$('select[name$="checkLost"]').append(new Option("回寄", "Add"))
|
// j$('select[name$="checkLost"]').append(new Option("欠品", "欠品"))
|
// } else {
|
// j$('select[name$="checkLost"]').children().each(function(){if (j$(this).val()=="欠品") j$(this).remove()})
|
// }
|
}
|
|
function fixDeliveryType() {
|
j$(escapeVfId('allPage:allForm:DeliveryType')).children().each(function() {
|
if (this.value == '发货') j$(this).remove();
|
})
|
|
j$("input[name='noSlip']").prev().children().each(function() {
|
j$(this).children().each(function() {
|
if (this.value == 'OK') j$(this).remove();
|
})
|
})
|
|
j$("input[name='noSlip']").parent().find('select').children().each(function() {
|
if (this.value == 'OK') j$(this).remove();
|
})
|
|
j$('[name$="checkboxGiveUp"]').prop('disabled',true)
|
|
// j$("select[name$='checkLost2']").trigger('change');
|
// j$("select[name$='checkLost']").trigger('change');
|
|
j$("select[name$='checkLost2']").each(function() {
|
if (j$(this).val() == '欠品' || j$(this).val() == '消耗' || j$(this).val() == '' ) {
|
j$(this).parent().parent().find('[name$="checkboxCDS"]').prop('disabled',true);
|
j$(this).parent().parent().find('[name$="CDSChargement"]').prop('disabled',true);
|
j$(this).parent().parent().find('[name$="CDSType"]').prop('disabled',true);
|
}
|
if (j$(this).val() == '欠品' ) {
|
j$(this).parent().parent().find('input[id$="lostMemo2"]').prop('disabled',false);
|
} else {
|
j$(this).parent().parent().find('input[id$="lostMemo2"]').prop('disabled',true);
|
}
|
})
|
j$("select[name$='checkLost']").each(function() {
|
if (j$(this).val() == '欠品' || j$(this).val() == '消耗' || j$(this).val() == '' ) {
|
j$(this).parent().parent().find('[name$="checkboxCDS"]').prop('disabled',true);
|
j$(this).parent().parent().find('[name$="CDSChargement"]').prop('disabled',true);
|
j$(this).parent().parent().find('[name$="CDSType"]').prop('disabled',true);
|
}
|
if (j$(this).val() == '欠品' ) {
|
j$(this).parent().parent().find('input[id$="lostMemo"]').prop('disabled',false);
|
} else {
|
j$(this).parent().parent().find('input[id$="lostMemo"]').prop('disabled',true);
|
}
|
})
|
|
j$('span[id$="checkLost3"]').each(function() {
|
if (j$(this).text() == '欠品') {
|
j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
|
}
|
j$(this).parent().find('[name$="lostMemo"]').prop('disabled',true)
|
j$(this).parent().find('[name$="lostMemo"]').hide()
|
})
|
j$('select[id$="checkLost"]').each(function() {
|
if (j$(this).val() == '欠品') {
|
j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
|
}
|
})
|
|
j$('span[id$="checkLost"]').each(function() {
|
if (j$(this).children().text() == '欠品') {
|
j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
|
}
|
})
|
|
j$('span[id$="checkLost4"]').each(function() {
|
if (j$(this).text() == '欠品') {
|
j$(this).parent().find('input[id$="lostMemo2"]').prop('disabled',false);
|
j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
|
} else if (j$(this).text() != '') {
|
j$(this).parent().find('input[id$="lostMemo2"]').prop('disabled',true);
|
j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',true)
|
}
|
})
|
|
j$('span[id$="checkLost2"]').each(function() {
|
if (j$(this).children().text() == '欠品') {
|
j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
|
} else if (j$.trim(j$(this).text()) != '') {
|
j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',true)
|
}
|
})
|
|
j$('select[id$="checkLost2"]').each(function() {
|
if (j$(this).val() == '欠品') {
|
j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
|
} else if (j$(this).val() != '') {
|
j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',true)
|
}
|
})
|
|
j$('img[alt="チェック"]').each(function() {
|
j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
|
})
|
|
j$('input[id$="noitem"]').prop('disabled', true);
|
}
|
|
function checkMessage(need_redirect) {
|
fixDeliveryType();
|
if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
|
alert("保存完了");
|
if (need_redirect){
|
window.location.href = window.location.href + '&done=1';
|
}
|
} else if (checked_raes) {
|
var carray = checked_raes.split(",");
|
|
carray.forEach(function(element) {
|
j$("input[data-resid2='" + element + "']").prop('checked', true);
|
j$("input[data-resid2='" + element + "']").trigger('change');
|
});
|
checked_raes = '';
|
|
if (checked_raesd) {
|
var darray = checked_raesd.split(",")
|
j$("input[name$='raesdCheck']:checked").each(function(){
|
if (checked_raesd.indexOf(j$(this).val()) == -1) {
|
j$(this).prop('checked', false);
|
}
|
});
|
checked_raesd = '';
|
}
|
}
|
// j$("[name$='checkLost']").each(function() {
|
// changeCheckLost(this);
|
// });
|
|
|
}
|
|
</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;
|
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;
|
}
|
|
div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
|
div.rtopg div {background:#DCDCDC;}
|
div.rtop div {background:#95aee5;}
|
div.r1, div.r2, div.r3, div.r4 {display:block; overflow:hidden;}
|
div.r1, div.r2, div.r3 {height:1px;}
|
div.r2, div.r3, div.r4 {border-left:1px solid silver; border-right:1px solid silver;}
|
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;
|
}
|
#alertoverlay{display: none;
|
opacity: .8;
|
z-index: 20;
|
position: fixed;
|
top: 0px;
|
left: 0px;
|
background: #FFF;
|
width: 100%;}
|
|
#alertbox{display: none;
|
position: fixed;
|
background: white;
|
z-index: 21;
|
border: 1px solid black;
|
font-size:18px;}
|
|
#alertbox > div > #alertboxhead{background:white; padding:3px; color:black;}
|
#alertbox > div > #alertboxbody{ background:white; padding:10px; color:red; }
|
#alertbox > div > #alertboxbody1{ background:white; padding:10px; color:blue; }
|
#alertbox > div > #alertboxfoot{ background:white; padding:3px; text-align:right; }
|
</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>
|
|
<div id="alertoverlay"></div>
|
<div id="alertbox">
|
<div>
|
<div id="alertboxhead"></div>
|
<div id="alertboxbody"></div>
|
<div id="alertboxbody1"></div>
|
<div id="alertboxfoot"></div>
|
</div>
|
</div>
|
|
<apex:form id="allForm">
|
<!-- OCM_OLY-435 追加 window.location.reload(false) 保存后刷新画面 しないと、triggerにて更新した値がVFに反映されない -->
|
<apex:actionFunction name="save" action="{!save}" rerender="allForm" onComplete="checkMessage(true);unblockUI();resetDetailDivMargintop();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="saveToSlip" action="{!ShippmentDetail}" />
|
<apex:actionFunction name="ShippmentDetail" action="{!ShippmentDetail}" />
|
<apex:actionFunction name="ShippmentDetailAdd" action="{!ShippmentDetailAdd}" rerender="allForm" onComplete="unblockUI();checkMessage(false);resetDetailDivMargintop();">
|
<apex:param name="firstParam" assignTo="{!CheckedSetId}" value="" />
|
</apex:actionFunction>
|
<apex:actionFunction name="ShippmentAdd" action="{!ShippmentAdd}" />
|
<apex:actionFunction name="redirectPag" action="{!redirectPag}"/>
|
<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();return false;" value="保存"/>
|
</div>
|
<apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
|
</apex:outputPanel>
|
<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:ShippmentAddJs();return false"><span class="tabsize">回寄</span></li>
|
<li class="selected"><span class="tabsize">欠品</span></li>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!IF(Step_status='追加', true, false)}">
|
<li class="selected"><span class="tabsize">回寄</span></li>
|
<apex:outputPanel layout="none" rendered="{!showTab2}">
|
<li onclick="javascript:ShippmentDetailJs();return false"><span class="tabsize">欠品</span></li>
|
</apex:outputPanel>
|
</apex:outputPanel>
|
</ul>
|
</th>
|
</tr>
|
<apex:outputPanel layout="none" rendered="{!Step_status='追加' && !isSameCity }" 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;">新建</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>
|
<apex:actionRegion >
|
<tr>
|
<td style="text-align: right">回寄-运输单号 : </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="检索"/></td>
|
<apex:actionFunction name="searchSlip" action="{!searchSlip}" reRender="allForm" onComplete="unblockUI();fixDeliveryType();resetDetailDivMargintop();" />
|
|
</tr>
|
<tr>
|
<td style="text-align: right">回寄-{!$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">回寄-{!$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">回寄-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryCompany__c.label} : </td>
|
<td align="left"><apex:inputField value="{!slip.DeliveryCompany__c}" style="width:145px;" id="DeliveryCompany"/></td>
|
</tr>
|
</apex:actionRegion>
|
<tr>
|
<td style="text-align: right">回寄-{!$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>
|
</apex:outputPanel>
|
</table>
|
|
<apex:outputPanel style="float: right;" rendered="{!Step_status='追加' && !isSameCity}">
|
<apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫申请书" rerender="dummy" />
|
<apex:commandButton styleClass="commandbutton" onclick="checkAllDetail();return false" value="全选" rerender="dummy" rendered="{! (!showTab2 || isEquipmentCenter)}"/>
|
<apex:commandButton styleClass="commandbutton" onclick="addToDetail();return false" value="保存" rerender="dummy" rendered="{! (!showTab2 || isEquipmentCenter)}"/>
|
</apex:outputPanel>
|
<apex:outputPanel style="float: right;" rendered="{!Step_status!='追加'}">
|
<apex:commandButton styleClass="commandbutton" onclick="qrsacnDetail()" value="扫一扫备品" rerender="dummy" />
|
<apex:commandButton styleClass="commandbutton" onclick="checkAllDetail2();return false" value="全部OK" rerender="dummy" />
|
</apex:outputPanel>
|
<input type="hidden" id="QRType" value="1"/>
|
</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>
|
<apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}" />
|
<apex:variable var="applychange" value="{!1}" />
|
</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="{!esdInfo.showRaesCheck && !isSameCity}">
|
<input type="checkbox" name="raesCheck" data-resid2="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}" onchange="checkDetail(this, '{!esdInfo.rec.Rental_Apply_Equipment_Set__c}')" /><input type="hidden" value="{!esdInfo.overtime}"/>
|
</apex:outputPanel>
|
<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>
|
<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)}">
|
<h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2>
|
<br/>
|
<apex:outputPanel layout="none" rendered="{!esdInfo.showRaesCheck && !isSameCity}">
|
<input type="checkbox" name="raesCheck" data-resid2="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}" onchange="checkDetail(this, '{!esdInfo.rec.Rental_Apply_Equipment_Set__c}')"/><input type="hidden" value="{!esdInfo.overtime}"/>
|
</apex:outputPanel>
|
<h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
|
</apex:outputPanel>
|
<div class="rtop">
|
<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"> <apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />
|
<apex:outputPanel layout="none" rendered="{!esdInfo.rec.Return_DeliverySlip__c == null && esdInfo.rec.Lost_item_giveup__c == false && esdInfo.rec.Check_lost_Item_F__c != '消耗'}">
|
<input disabled="disabled" type="checkbox" data-resid="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}" name="raesdCheck" value="{!esdInfo.rec.Id}" data-lost="{!esdInfo.rec.Check_lost_Item_Final__c == '欠品' || esdInfo.rec.Check_lost_Item__c == '欠品'}" style="float: right;"/>
|
</apex:outputPanel>
|
</div></h2>
|
<!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
|
<ul>
|
<li><span>{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Received_Confirm__c.label}: </span>
|
<span><apex:outputField value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Received_Confirm__c}" style="margin:3px;width:150px" /></span>
|
</li>
|
<apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Rental_Apply_Equipment_Set__r.Received_Confirm__c == 'NG', true, false)}">
|
<li><span>{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Received_ng_detail__c.label}: </span>
|
<span><apex:outputField value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Received_ng_detail__c}" style="margin:3px;width:150px" /></span>
|
</li>
|
</apex:outputPanel>
|
<li>
|
<span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
|
<span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
|
</li>
|
<li>
|
<span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.NoItemReturn__c.label}: </span>
|
<apex:inputField rendered="{!NOT(esdInfo.rec.Return_DeliverySlip__c != null)}" id="noitem" value="{!esdInfo.rec.NoItemReturn__c}" style="margin:3px;width:75px;" onchange="checkNoItem(this, '{!esdInfo.rec.Id}')"/>
|
<span><apex:outputField rendered="{!esdInfo.rec.Return_DeliverySlip__c != null}" value="{!esdInfo.rec.NoItemReturn__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: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>
|
<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>
|
<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>
|
<div class="menu">
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
|
<h2><div class="m_title"> <apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" /> <!-- <apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="删除" rerender="dummy"/><input type="hidden" value="{!esdInfo.rec.Id}"/> --></div>
|
</h2>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!esdInfo.hasSended}">
|
<h2><div class="m_titleg"> <apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" /> <!-- <apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="删除" rerender="dummy"/><input type="hidden" value="{!esdInfo.rec.Id}"/>已回收 --></div>
|
</h2>
|
</apex:outputPanel>
|
<!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
|
<ul data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" style="font-size:14px;">
|
<apex:inputField value="{!esdInfo.rec.Loaner_accsessary__c}" style="display:none"/>
|
<apex:outputPanel layout="none" rendered="{!IF(OR(esdInfo.rec.Check_lost_Item__c='OK',esdInfo.rec.Check_lost_Item__c=''), true, false)}">
|
<span> {!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Check_lost_Item__c.label} : </span>
|
<apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}"><apex:inputField id="checkLost" value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;width:75px" onchange="changeCheckLost(this)"/></apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable))}"><apex:outputField value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;width:75px" /></apex:outputPanel>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!IF(OR(esdInfo.rec.Check_lost_Item__c='OK',esdInfo.rec.Check_lost_Item__c=''), false, true )}">
|
<span> {!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Check_lost_Item__c.label} : </span>
|
<apex:outputField id="checkLost3" value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;width:75px"/><br/>
|
<span> {!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Check_lost_Item_Final__c.label} : </span>
|
<apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="checkLost2" value="{!esdInfo.rec.Check_lost_Item_Final__c}" style="margin:3px;width:75px" onchange="changeCheckLost(this)"/></apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField id="checkLost4" value="{!esdInfo.rec.Check_lost_Item_Final__c}" style="margin:3px;width:75px" /></apex:outputPanel>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Return_DeliverySlip__c=null, true, false)}">
|
<input type="hidden" name="noSlip" value="1"/>
|
</apex:outputPanel>
|
<br/>
|
<span> {!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.NoItemReturn__c.label}: </span>
|
<apex:outputField value="{!esdInfo.rec.NoItemReturn__c}" style="margin:3px;width:75px;"/>
|
<br/>
|
<span> {!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_Memo__c.label}: </span>
|
<apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
|
<apex:inputField id="lostMemo" value="{!esdInfo.rec.Lost_item_Memo__c}" style="margin:3px;width:75px;"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || (esdInfo.rec.Check_lost_Item__c != null && esdInfo.rec.Check_lost_Item__c != 'OK'))}">
|
<apex:outputField value="{!esdInfo.rec.Lost_item_Memo__c}" style="margin:3px;width:75px;"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!esdInfo.rec.Check_lost_Item__c != null && esdInfo.rec.Check_lost_Item__c != 'OK' }">
|
<br/>
|
<span> {!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_Memo_Final__c.label}: </span>
|
<apex:outputPanel layout="none" rendered="{!esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗'}">
|
<apex:inputField id="lostMemo2" value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="margin:3px;width:75px;"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗'}">
|
<apex:outputField value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="margin:3px;width:75px;"/>
|
</apex:outputPanel>
|
</apex:outputPanel>
|
<br/>
|
<apex:outputPanel layout="none" rendered="{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_giveup__c.accessible}">
|
{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_giveup__c.label} : <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && NOT(esdInfo.rec.Lost_item_giveup__c) && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="checkboxGiveUp" value="{!esdInfo.rec.Lost_item_giveup__c}"/></apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Lost_item_giveup__c || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField value="{!esdInfo.rec.Lost_item_giveup__c}"/></apex:outputPanel>
|
<br/>
|
</apex:outputPanel>
|
<span> {!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.CDS_complete__c.label} : </span>
|
<apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Return_DeliverySlip__c=null, false, true)}">
|
<apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="checkboxCDS" value="{!esdInfo.rec.CDS_complete__c}" onchange="changeCheckCds(this);"/></apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField value="{!esdInfo.rec.CDS_complete__c}"/></apex:outputPanel>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Return_DeliverySlip__c=null, false, esdInfo.rec.Is_Body__c)}">
|
<br/>
|
<span> {!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.CDSChargement__c.label} : </span>
|
<apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="CDSChargement" value="{!esdInfo.rec.CDSChargement__c}"/></apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField value="{!esdInfo.rec.CDSChargement__c}"/></apex:outputPanel>
|
<br/>
|
<span> {!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.CDSType__c.label} : </span>
|
<apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="CDSType" value="{!esdInfo.rec.CDSType__c}"/></apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField value="{!esdInfo.rec.CDSType__c}"/></apex:outputPanel>
|
</apex:outputPanel>
|
<br/>
|
<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>
|
</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 Id="bbbaaa" value="{!esdInfo.isChecked}" style="display: none"/>
|
</apex:repeat>
|
</apex:outputPanel>
|
</div>
|
</apex:outputPanel>
|
</div>
|
</apex:form>
|
<script type="text/javascript">
|
|
function CustomAlert(){
|
this.on = function(alert){
|
var winW = window.innerWidth;
|
var winH = window.innerHeight;
|
|
alertoverlay.style.display = "block";
|
alertoverlay.style.height = window.innerHeight+"px";
|
alertbox.style.left = (window.innerWidth/3.5)+"pt";
|
alertbox.style.right = (window.innerWidth/3.5)+"pt"; // remove this if you don't want to have your alertbox to have a standard size but after you remove modify this line : alertbox.style.left=(window.inner.Width/4);
|
alertbox.style.top = (window.innerHeight/10)+"pt";
|
alertbox.style.display = "block";
|
document.getElementById('alertboxhead').innerHTML = "提示";
|
document.getElementById('alertboxbody').innerHTML = alert;
|
//20210729 SFDC-C5CC5S you
|
if(null!="{!BPRegion}" && "{!BPRegion}"=="上海 备品中心"){
|
document.getElementById('alertboxbody1').innerHTML = "8月13日开始请寄备品中心新地址:<br/>上海市浦东新区金吉路778号3号楼1F";
|
}
|
document.getElementById('alertboxfoot').innerHTML = '<button onclick="Alert.off()">确定</button>';
|
}
|
this.off = function(){
|
document.getElementById('alertbox').style.display = "none";
|
document.getElementById('alertoverlay').style.display = "none";
|
}
|
}
|
var Alert = new CustomAlert();
|
j$(document).ready(function(){
|
j$( '#qrcode' ).unbind();
|
j$( '#qrcode' ).keypress( function ( e ) {
|
if ( e.which == 13 ) {
|
filljsQR(j$( '#qrcode' ).val());
|
return false;
|
}
|
});
|
if (!{!showTab2}) {
|
if({!isSameCity}) {
|
Alert.on("当前备品无需操作回寄。谢谢!");
|
} else {
|
//wangweipeng 2021/09/09 SFDC-C4H4BM start
|
var falg = true;
|
var isMainReceivedSignRich = {!isMainReceivedSignRich};//当前签收单是否上传 true 为没有上传
|
if({!isMainReceivedSignRich}){
|
var hintContent = '';
|
var isAdvocateFollow = {!isAdvocateFollow};
|
if(isAdvocateFollow){
|
hintContent = '申请单尚未上传签收单,是否继续';
|
}else{
|
hintContent = '主单尚未上传签收单,是否继续';
|
}
|
if(!confirm(hintContent)){
|
falg = false;
|
redirectPag();
|
}
|
}
|
if(falg){
|
Alert.on("请将备品回寄至{!BPRegion}。谢谢!");
|
}
|
//wangweipeng 2021/09/09 SFDC-C4H4BM end
|
}
|
}
|
});
|
|
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});
|
|
function filljsQR(content) {
|
if (j$("#QRType").val() == 2) {
|
filljsQR2(content);
|
} else {
|
filljsQR1(content);
|
}
|
}
|
|
scanner.addListener('scan', function (content) {
|
filljsQR(content)
|
});
|
|
function qrsacn() {
|
j$("#QRType").val(1);
|
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 qrsacnDetail() {
|
j$("#QRType").val(2);
|
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() {
|
try{
|
scanner.stop().then(function () {
|
j$(".modal").hide();
|
});
|
j$("#scanedqr").children().remove();
|
} catch (error) {
|
j$(".modal").hide();
|
j$("#scanedqr").children().remove();
|
}
|
}
|
</script>
|
</apex:page>
|