<!-- 20230524 ljh lightning -->
|
<!-- <apex:page controller="RentalFixtureSetAssignAgencyController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="办事处分配/发货"> -->
|
<apex:page controller="RentalFixtureSetAssignAgencyController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="办事处分配/发货" lightningStylesheets="true">
|
<!-- 20210624 ljh update SFDC-C448GR --><!-- title="办事处分配/下架/发货" -->
|
<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)}"/>
|
<!-- 标准控件弹出页面修改 start -->
|
<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/>
|
<!-- 标准控件弹出页面修改 end -->
|
<apex:stylesheet value="{!URLFOR($Resource.sldsMy)}"/><!-- 20230619 ljh lightning -->
|
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230525 ljh lightning -->
|
<style type="text/css">
|
.pbTitle{
|
display: none
|
}
|
.pbButton{
|
text-align: right !important;
|
}
|
.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 */
|
}
|
span.dateFormat {
|
display: none;
|
}
|
|
/* Modal Content/Box */
|
.modal-content {
|
background-color: #fefefe;
|
margin-left: 6px;
|
margin-top: 100px;
|
padding: 20px;
|
border: 1px solid #888;
|
right: 5%;
|
position: absolute;
|
/* 20230628 ljh */
|
/* width: 200px; */
|
width: 300px;
|
}
|
.modal-content-cancel {
|
background-color: #fefefe;
|
margin-left: -150px;
|
margin-top: 100px;
|
padding: 20px;
|
border: 1px solid #888;
|
left: 50%;
|
position: absolute;
|
width: 310px;
|
}
|
table.list td{
|
width:100px;
|
border-width: 1px;
|
}
|
table.list td.col_chk {
|
width:30px;
|
}
|
/* 20230524 ljh lightning start */
|
/* body .pbBody table.list tr.headerRow td, body .pbBody table.list tr.headerRow th {
|
border-width: 1px;
|
} */
|
/* 20230524 ljh lightning end */
|
/* 20230927 zq*/
|
.modal-content-cancel select {
|
margin-bottom: 8px;
|
}
|
.modal-content-trade {
|
background-color: #fefefe;
|
margin-left: -150px;
|
margin-top: 100px;
|
padding: 20px;
|
border: 1px solid #888;
|
left: 50%;
|
position: absolute;
|
width: 310px;
|
}
|
/* body .labelCol .vfLabelColTextWrap{
|
vertical-align: initial !important;
|
} */
|
body .bPageBlock .detailList .labelCol .vfLabelColTextWrap{
|
vertical-align: initial !important;
|
}
|
.hideDropdown select{
|
display:none;
|
}
|
</style>
|
<script type="text/javascript">
|
function checkMessage() {
|
if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
|
alert("保存成功");
|
}
|
}
|
var clickType = '无'; //20240109 sx 判断贸易合规标识
|
function checkMessage2(type) {
|
clickType = type; //20240109 sx 判断贸易合规标识
|
// if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
|
// alert("保存成功");
|
// }
|
//20240109 sx 判断贸易合规标识 true时 弹出弹窗,false时 走原来的逻辑 start
|
console.log('type===='+type);
|
console.log('trade_fag==='+ j$(escapeVfId('allPage:allForm:trade_fag')).val());
|
if(type && j$(escapeVfId('allPage:allForm:trade_fag')).val() == 'true'){
|
j$('#tradeComplianceTWOModal').show();
|
}else{
|
blockme();
|
if(type == '分配'){
|
assign();
|
}else if(type == '发货'){
|
shipment();
|
}
|
}
|
//20240109 sx 判断贸易合规标识 true时 弹出弹窗,false时 走原来的逻辑 end
|
}
|
function filljsQR(qrcode) {
|
if(!qrcode) return;
|
blockme();
|
if(scanType == '1'){
|
j$("input[name$='SlipNo']").val(qrcode);
|
}
|
//20210513 ljh 1829 add start
|
else if(scanType.indexOf('2;') != -1){
|
scanAndMatch(qrcode+';'+scanType);
|
}
|
//20210513 ljh 1829 add end
|
else{
|
scanAndMatch(qrcode);
|
}
|
j$("#scanedqr").append("<li>"+qrcode+"</li>");
|
j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
|
unblockUI();
|
}
|
function checkAll() {
|
j$("table td.dataCellBorder1.col_chk input").each(function(){
|
if(!this.disabled) {
|
this.checked = j$("input#checker").prop('checked');
|
}
|
})
|
}
|
var globalChecked = false;
|
function checkGlobal() {
|
globalChecked = !globalChecked;
|
j$("table td.col_chk input[type=checkbox]:enabled").each(function(){
|
this.checked = globalChecked;
|
})
|
}
|
/**
|
20210707 SFDC-C448KZ you start
|
function cancelModalConfirm() {
|
//检查取消理由和取消理由备注
|
var reason = j$.trim(j$("select[name$=cancelReason]").val());
|
var remark = j$.trim(j$("input[name$=cancelReasonRemark]").val());
|
//20210420 ljh 1711 update start
|
//if(reason == "" || remark == "") {
|
if(reason == "" && remark == "") {
|
j$("#errormessage span").html('取消理由和取消理由备注不可为空!');
|
j$("#errormessage").css('display', '');
|
}
|
else if(reason == "") {
|
j$("#errormessage span").html('取消理由不可为空!');
|
j$("#errormessage").css('display', '');
|
}
|
else if(remark == "") {
|
j$("#errormessage span").html('取消理由备注不可为空!');
|
j$("#errormessage").css('display', '');
|
}
|
//20210420 ljh 1711 update end
|
else {
|
j$("#errormessage").css('display', 'none');
|
blockme();
|
cancelSet();
|
}
|
}
|
**/
|
function cancelModalConfirm() {
|
//检查取消理由和取消理由备注 cancle Reason Lcr
|
var reason = j$(escapeVfId('allPage:allForm:Cancel_Reason')).value();
|
var remark = j$(escapeVfId('allPage:allForm:Loaner_cancel_reason')).value();
|
var Lcr = j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).value();
|
if(reason == "" && remark == "") {
|
j$("#errormessage span").html('取消理由和备品申请取消理由不可为空!');
|
j$("#errormessage").css('display', '');
|
}
|
else if(reason == "") {
|
j$("#errormessage span").html('取消理由不可为空!');
|
j$("#errormessage").css('display', '');
|
}
|
else if(remark == "") {
|
j$("#errormessage span").html('一览取消理由不可为空!');
|
j$("#errormessage").css('display', '');
|
}else if(remark == "其他" && Lcr =="") {
|
j$("#errormessage span").html('取消理由备注不可为空!');
|
j$("#errormessage").css('display', '');
|
}
|
else {
|
j$("#errormessage").css('display', 'none');
|
blockme();
|
cancelSet();
|
}
|
}
|
/**20210707 SFDC-C448KZ you end**/
|
|
|
// 20231127 sx 贸易合规二期 add 弹窗提醒 start
|
function showModal(){
|
|
console.log('showModal====' + j$(escapeVfId('allPage:allForm:trade_fag')).val());
|
//贸易合规二期 ax add
|
|
// if(j$(escapeVfId('allPage:allForm:trade_fag')).val() == 'true'){
|
if(true) {
|
//打开弹窗
|
j$('#tradeComplianceTWOModal').show();
|
|
}else{
|
//如果合规直接走保存(原有逻辑)
|
assign();
|
}
|
}
|
function closeTradeModal(){
|
j$('#tradeComplianceTWOModal').hide();
|
//清空合规状态
|
j$(escapeVfId('allPage:allForm:trade_fag')).val(false);
|
}
|
function tradeModalConfirm(){
|
//贸易合规二期 弹窗确认 点击确认就调原来的保存方法 点取消就不进行保存逻辑
|
// j$(escapeVfId('allPage:allForm:pageContuine')).val() = true;
|
j$('#tradeComplianceTWOModal').hide();
|
console.log('clickType===' + clickType);
|
if(clickType == '分配'){
|
blockme();
|
assign();
|
}else if(clickType == '发货'){
|
blockme();
|
shipment();
|
}
|
}
|
|
//清除合规状态
|
function clearTradeStatus(){
|
console.log('clearTradeStatus====false');
|
j$(escapeVfId('allPage:allForm:trade_fag')).val(false);
|
}
|
// 20231127 sx 贸易合规二期 add 弹窗提醒 end
|
|
function showCancelModal() {
|
var hasChecked = false;
|
|
j$("table td.dataCellBorder1.col_chk input").each(function(){
|
if(this.checked) {
|
hasChecked = true;
|
}
|
})
|
if(!hasChecked) {
|
alert('未选择取消的一览!');
|
return;
|
}
|
j$('#cancelModal').show();
|
j$('#searchBlock1').show();
|
|
}
|
/** 20210707 SFDC-C448KZ you start**/
|
function changeCancleReasonJs(){
|
var Cancel_Reason = j$(escapeVfId('allPage:allForm:Cancel_Reason')).value();
|
if(Cancel_Reason != '被动取消'){
|
j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).val('');
|
j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).attr('disabled',true);
|
}
|
}
|
function changeReasonJs(){
|
var reason = j$(escapeVfId('allPage:allForm:Loaner_cancel_reason')).value();
|
if(reason != null && reason == '其他'){
|
j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).attr('disabled',false);
|
}else{
|
j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).val('');
|
j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).attr('disabled',true);
|
}
|
}
|
/** 20210707 SFDC-C448KZ you end**/
|
</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: 60px; overflow: auto">
|
</ul>
|
</div>
|
</div>
|
|
<apex:form id="allForm" styleclass="pbBody">
|
<!-- 20210624 ljh update SFDC-C448GR -->
|
<!-- <apex:actionFunction name="stockDown" action="{!stockDown}" rerender="detail,message,done_flg" oncomplete="unblockUI();checkMessage();checEventFrame();"/> -->
|
<apex:actionFunction name="scanAndMatch" action="{!scanAndMatch}" rerender="detail,message,done_flg" oncomplete="unblockUI();checkMessage();checEventFrame();">
|
<apex:param name="firstParam" assignTo="{!qrcode}" value="" />
|
</apex:actionFunction>
|
<apex:actionFunction name="cancelSet" action="{!cancelSet}" rerender="allForm" oncomplete="unblockUI();checkMessage();checEventFrame();j$('#cancelModal').hide();"/>
|
<apex:actionFunction name="changeStep" rerender="allForm" oncomplete="unblockUI();"/>
|
<!-- 20231207 sx 贸易合规二期 add start-->
|
<apex:actionFunction name="tradeComplianceTWO" action="{!tradeComplianceTWO}" rerender="trade_fag" />
|
<apex:inputHidden value="{!trade_fag}" id="trade_fag"/>
|
<apex:inputHidden value="{!trade_String}" id="trade_String"/>
|
<apex:actionFunction name="assign" action="{!assign}" rerender="allForm" oncomplete="unblockUI();checkMessage();checEventFrame();"/>
|
<apex:actionFunction name="shipment" action="{!shipment}" rerender="allForm" oncomplete="unblockUI();checkMessage();checEventFrame();"/>
|
<!-- <apex:inputHidden value="{!pageContuine}" id="pageContuine"/> -->
|
<!-- 20231207 sx 贸易合规二期 add end-->
|
<apex:inputHidden value="{!done_flg}" id="done_flg"/>
|
<apex:inputHidden value="{!readOnly}" id="readOnly"/>
|
<div id="cancelModal" class="modal">
|
<div class="modal-content-cancel">
|
<table>
|
<tr>
|
<td colspan="2" align="center">
|
<apex:commandButton style="margin: 8px 20px;" value="确定" onclick="cancelModalConfirm(); return false;" />
|
<apex:commandButton style="margin: 8px 20px;" value="取消" onclick="j$('#errormessage').css('display', 'none');j$('#cancelModal').hide();return false;"/>
|
<!-- <apex:commandButton style="margin: 0 20px;" value="取消" onclick="j$('#errormessage').css('display', 'none');j$('#cancelModal').hide();return false;"/> -->
|
</td>
|
</tr>
|
<tr style="display: none;" id="errormessage">
|
<td colspan="2">
|
<span style="color: #F00; font-weight:bold"></span>
|
</td>
|
</tr>
|
<!--
|
<tr>
|
<td>
|
<apex:outputLabel value="取消理由"/>
|
</td>
|
<td>
|
<apex:selectList id="cancelReason" size="1" value="{!cancelReason}">
|
<apex:selectOption itemValue="" itemLabel="--无--"/>
|
<apex:selectOption itemValue="主动取消" itemLabel="主动取消"/>
|
<apex:selectOption itemValue="被动取消" itemLabel="被动取消"/>
|
</apex:selectList>
|
</td>
|
</tr>
|
<tr>
|
<td>
|
<apex:outputLabel value="取消理由备注"/>
|
</td>
|
<td>
|
<apex:inputText id="cancelReasonRemark" value="{!cancelReasonRemark}"/>
|
</td>
|
</tr>
|
-->
|
<!-- 20210707 SFDC-C448KZ you start-->
|
<tr>
|
<td>
|
<apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Cancel_Reason__c.label}" />
|
</td>
|
<td>
|
<apex:inputField value="{!parentObj.Cancel_Reason__c}" id="Cancel_Reason" onchange="changeCancleReasonJs();"/>
|
</td>
|
</tr>
|
<tr rendered="true">
|
<td>
|
<apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_reason__c.label}" for="Loaner_cancel_reason"/>
|
</td>
|
<td>
|
<apex:inputField value="{!parentObj.Loaner_cancel_reason__c}" id="Loaner_cancel_reason" onchange="changeReasonJs();"/>
|
</td>
|
</tr>
|
<tr>
|
<td>
|
<apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_Remarks__c.label}" for="Loaner_cancel_request"/>
|
</td>
|
<td>
|
<apex:inputField value="{!parentObj.Loaner_cancel_request__c}" id="Loaner_cancel_request" html-disabled="true"/>
|
</td>
|
</tr>
|
<!-- 20210707 SFDC-C448KZ you end-->
|
<!--<tr> 20210707 SFDC-C448KZ you start-->
|
<!-- <apex:pageBlock id="searchBlock1" tabStyle="Report">
|
<apex:pageBlockSection title="备品借出申请一览取消" collapsible="false" id="cancle">
|
<apex:pageBlockSectionItem id="CR">
|
<apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Cancel_Reason__c.label}" />
|
<apex:inputField value="{!parentObj.Cancel_Reason__c}" id="Cancel_Reason" onchange="changeCancleReasonJs();"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem rendered="true" id="Reason">
|
<apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_reason__c.label}" for="Loaner_cancel_reason"/>
|
<apex:inputField value="{!parentObj.Loaner_cancel_reason__c}" id="Loaner_cancel_reason" onchange="changeReasonJs();"/>
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem id="Lcr">
|
<apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_Remarks__c.label}" for="Loaner_cancel_request"/>
|
<apex:inputField value="{!parentObj.Loaner_cancel_request__c}" id="Loaner_cancel_request" html-disabled="true"/>
|
</apex:pageBlockSectionItem>
|
</apex:pageBlockSection>
|
</apex:pageBlock> -->
|
<!-- 20210707 SFDC-C448KZ you end
|
</tr>-->
|
</table>
|
</div>
|
</div>
|
<!-- 20231127 sx add 贸易合规二期 弹窗提醒 start -->
|
<div id="tradeComplianceTWOModal" class="modal">
|
<div class="modal-content-trade">
|
<table>
|
<tr>
|
<td>
|
<apex:outputText styleClass="title" value="您此次申请的业务可能存在贸易合规风险,是否继续{!stepName},{!$Label.IFTradeComplianceAlert2},(一般需5-10个工作日)。"/>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="2" test-align="center" style="padding-left: 30px;">
|
<apex:commandButton style="margin: 8px 20px;" value="确定" onclick="tradeModalConfirm(); return false;"/>
|
<apex:commandButton style="margin: 8px 20px;" value="取消" onclick="closeTradeModal();"/>
|
</td>
|
</tr>
|
</table>
|
</div>
|
</div>
|
<!-- 20231127 sx add 贸易合规二期 弹窗提醒 end -->
|
|
<apex:pageBlock id="searchBlock" tabStyle="Report">
|
<apex:pageBlockButtons location="top">
|
预计出货日
|
<input type="hidden" name="hide"/>
|
<apex:inputField id="rentalStartDate" value="{!parentObj.Asset_loaner_start_day__c}"/>
|
<!--添加 style="padding-top: 0px;padding-bottom: 0px;margin-bottom: 4px;" -->
|
<apex:commandButton value="适用" style="padding-top: 0px;padding-bottom: 0px;margin-bottom: 4px;"
|
action="{!applyDate}" onclick="blockme();" reRender="allForm" disabled="{!readOnly}" oncomplete="unblockUI();checkMessage();checEventFrame();"/>
|
|
出库
|
<apex:selectList size="1" value="{!stepName}" onchange="blockme();changeStep();return false;">
|
<apex:selectOption itemValue="无" itemLabel="无"/>
|
<apex:selectOption itemValue="分配" itemLabel="分配"/>
|
<!-- 20210624 ljh update SFDC-C448GR -->
|
<!-- <apex:selectOption itemValue="下架" itemLabel="下架"/> -->
|
<apex:selectOption itemValue="发货" itemLabel="发货"/>
|
</apex:selectList>
|
|
<!-- 20210517 ljh update 1829 start -->
|
<!-- <apex:commandButton value="扫一扫" onclick="qrscan();return false;" disabled="{!readOnly || stepName!='分配'}"/> -->
|
<apex:commandButton value="扫一扫" onclick="qrscan(0);return false;" disabled="{!readOnly || stepName!='分配'}"/>
|
<!-- 20210517 ljh update 1829 end -->
|
<!-- 20240108 sx 贸易合规二期 分配增加合规提醒 -->
|
<!-- <apex:commandButton value="分配" style="padding-top: 0px;padding-bottom: 0px;"
|
action="{!assign}" onclick="blockme();" reRender="allForm,trade_fag" disabled="{!readOnly || stepName!='分配'}" oncomplete="unblockUI();checkMessage('分配');checEventFrame();"/> -->
|
<apex:commandButton value="分配" style="padding-top: 0px;padding-bottom: 0px;"
|
action="{!tradeComplianceTWO}" onclick="blockme();" reRender="allForm,trade_fag" disabled="{!readOnly || stepName!='分配'}" oncomplete="checkMessage2('分配');unblockUI();checkMessage();checEventFrame();"/>
|
<!-- 20240108 sx 贸易合规二期 分配增加合规提醒 -->
|
<!-- 20210624 ljh update SFDC-C448GR -->
|
<!-- <apex:commandButton value="下架" action="{!stockdown}" onclick="blockme();" reRender="allForm" disabled="{!readOnly || stepName!='下架'}" oncomplete="unblockUI();checkMessage();checEventFrame();"/> -->
|
<!-- 20231207 sx 贸易合规二期 修改 start -->
|
<!-- <apex:commandButton value="发货" style="padding-top: 0px;padding-bottom: 0px;"
|
action="{!shipment}" onclick="blockme();" reRender="allForm" disabled="{!readOnly || stepName!='发货'}" oncomplete="unblockUI();checkMessage('发货');checEventFrame();"/> -->
|
<apex:commandButton value="发货" style="padding-top: 0px;padding-bottom: 0px;"
|
action="{!tradeComplianceTWO}" onclick="blockme();" reRender="allForm,trade_fag" disabled="{!readOnly || stepName!='发货'}" oncomplete="checkMessage2('发货');unblockUI();checkMessage();checEventFrame();"/>
|
<!-- 20231207 sx 贸易合规二期 修改 end -->
|
|
<apex:commandButton value="全选/取消全选" onclick="checkGlobal(); return false;" disabled="{!readOnly}"/>
|
<apex:commandButton value="取消" onclick="showCancelModal(); return false;" disabled="{!readOnly}"/>
|
</apex:pageBlockButtons>
|
<apex:pageBlockSection title="办事处分配" id="searchBlockPage">
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Name.Label}"/>
|
<apex:outputField value="{!parentObj.Name}"/>
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="主单预计出货日"/>
|
<apex:outputText value="{0,date, yyyy/MM/dd}">
|
<apex:param value="{!masterDate}"/>
|
</apex:outputText>
|
</apex:pageBlockSectionItem>
|
<!-- 20210508 ljh add 1672 start -->
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.demo_purpose2__c.Label}"/>
|
<apex:outputField value="{!parentObj.demo_purpose2__c}"/>
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem >
|
|
</apex:pageBlockSectionItem>
|
<!-- 20210508 ljh add 1672 end -->
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel style="vertical-align: initial !important;" value="发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Name.Label}"/>
|
<apex:outputPanel >
|
<apex:inputField value="{!slip.Name}" id="SlipNo" rendered="{!slipEnabled && stepName == '发货'}"/>
|
<apex:outputField value="{!slip.Name}" rendered="{!NOT(slipEnabled && stepName == '发货')}"/>
|
<br />
|
<span>
|
<input type="hidden" name="hide"/>
|
<apex:commandButton value="扫运输单" onclick="qrscan(1);return false;" disabled="{!NOT(slipEnabled && stepName == '发货')}"/>
|
<apex:commandButton value="检索" style="padding-top: 0px;padding-bottom: 0px;"
|
action="{!searchSlip}" onclick="blockme();" reRender="allForm" disabled="{!NOT(slipEnabled && stepName == '发货')}" oncomplete="unblockUI();checEventFrame();"/>
|
</span>
|
</apex:outputPanel>
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="发货-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryType__c.Label}"/>
|
<apex:outputPanel >
|
<apex:inputField value="{!slip.DeliveryType__c}" id="deliveryType" rendered="{!slipEnabled && stepName == '发货'}"/>
|
<apex:outputField value="{!slip.DeliveryType__c}" rendered="{!NOT(slipEnabled && stepName == '发货')}"/>
|
</apex:outputPanel>
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Distributor_method__c.Label}"/>
|
<apex:outputPanel >
|
<apex:inputField value="{!slip.Distributor_method__c}" id="distributorMethod" rendered="{!slipEnabled && stepName == '发货'}"/>
|
<apex:outputField value="{!slip.Distributor_method__c}" rendered="{!NOT(slipEnabled && stepName == '发货')}"/>
|
</apex:outputPanel>
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="发货-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryCompany__c.Label}"/>
|
<apex:outputPanel >
|
<apex:inputField value="{!slip.DeliveryCompany__c}" id="deliveryCompany" rendered="{!slipEnabled && stepName == '发货'}"/>
|
<apex:outputField value="{!slip.DeliveryCompany__c}" rendered="{!NOT(slipEnabled && stepName == '发货')}"/>
|
</apex:outputPanel>
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem id="whStaffBlock">
|
<apex:outputLabel value="发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Wh_Staff__c.Label}"/>
|
<apex:outputPanel >
|
<apex:inputField value="{!slip.Wh_Staff__c}" id="whStaff" styleClass="hideDropdown" rendered="{!slipEnabled && stepName == '发货'}"/>
|
<apex:outputField value="{!slip.Wh_Staff__c}" rendered="{!NOT(slipEnabled && stepName == '发货')}"/>
|
</apex:outputPanel>
|
</apex:pageBlockSectionItem>
|
<!-- 20201209 ljh add start-->
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Delivery_Agency__c.Label}"/>
|
<!-- 20210624 ljh update SFDC-C448GR start-->
|
<!-- <apex:outputPanel >
|
<apex:inputField value="{!parentObj.Delivery_Agency__c}" styleClass="hideDropdown" rendered="{!parentObj.StockDown_ng_num__c == 0 && stepName == '发货'}" />
|
<apex:outputField value="{!parentObj.Delivery_Agency__c}" rendered="{!NOT(parentObj.StockDown_ng_num__c == 0 && stepName == '发货')}"/>
|
</apex:outputPanel> -->
|
<apex:outputPanel >
|
<apex:inputField value="{!parentObj.Delivery_Agency__c}" styleClass="hideDropdown" rendered="{!parentObj.Wei_Assigned_Cnt__c == 0 && stepName == '发货'}" />
|
<apex:outputField value="{!parentObj.Delivery_Agency__c}" rendered="{!NOT(parentObj.Wei_Assigned_Cnt__c == 0 && stepName == '发货')}"/>
|
</apex:outputPanel>
|
<!-- 20210624 ljh update SFDC-C448GR end-->
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem html-style="display: none;">
|
<apex:inputField value="{!parentObj.SalesdeptSelect__c}" style="display: none;" />
|
</apex:pageBlockSectionItem>
|
<!-- 20201209 ljh add end-->
|
</apex:pageBlockSection>
|
</apex:pageBlock>
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
|
<apex:outputPanel id="detail">
|
<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>
|
<td> 申请型号 </td>
|
<td> 存放地 </td>
|
<td> 固定资产编号(Key) </td>
|
<td> 机身编号 </td>
|
<td> 预计出货日 </td>
|
<td style="{!IF(stepName='分配','background-color: #cfeef9','')}"> 分配 </td>
|
<!-- 20210624 ljh update SFDC-C448GR -->
|
<!-- <td style="{!IF(stepName='下架','background-color: #cfeef9','')}"> 下架 </td> -->
|
<td> 借出备品一览明细状态 </td>
|
<td> 备品分类 </td><!-- 20210508 ljh add 1672 -->
|
<td> 操作 </td>
|
<!-- 20210510 ljh add 1829 -->
|
</tr>
|
<apex:variable value="{!0}" var="Cnt" />
|
<apex:repeat id="dataline_L" value="{!esdList}" var="esdInfo">
|
<tr class="" id="tableData_L_{!Cnt}" style="{!IF(esdInfo.rec.AgencyTempCancel__c, 'display: none','')}">
|
<td class="dataCellBorder1 col_chk" align="center">
|
<apex:inputCheckbox styleClass="rowchkcls" rendered="{!esdInfo.rec.Is_Body__c}" value="{!esdInfo.checked}" id="rowCheck" disabled="{!!esdInfo.editable}" html-qrscan="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
|
<!-- 20210514 ljh 1829 add html-qrscan -->
|
</td>
|
<td> <apex:outputText value="{!esdInfo.tempModel}"/> </td>
|
<td> {!esdInfo.tempLocation} </td>
|
<td> {!esdInfo.tempKey}</td>
|
<td> {!esdInfo.tempSerial} </td>
|
<td>
|
<apex:inputField value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Start_Date__c}" rendered="{!esdInfo.editable && stepName=='分配'}"/>
|
<apex:outputText value="{0,date, yyyy/MM/dd}" rendered="{!NOT(esdInfo.editable && stepName=='分配')}">
|
<apex:param value="{!esdInfo.tempDate}"/>
|
</apex:outputText>
|
</td>
|
<td style="{!IF(stepName='分配','background-color: #cfeef9','')}">
|
{!esdInfo.tempStatus}
|
</td>
|
<!-- 20210624 ljh update SFDC-C448GR -->
|
<!-- <td style="{!IF(stepName='下架','background-color: #cfeef9','')}">
|
<apex:outputField value="{!esdInfo.rec.StockDown__c}"/>
|
</td> -->
|
<td> <apex:outputText value="{!esdInfo.tempDetailStatus}"/> </td>
|
<td> {!esdInfo.tempEquipmentType}</td>
|
<!-- 20210508 ljh add 1672 -->
|
<td>
|
<apex:commandButton rendered="{!esdInfo.rec.Is_Body__c}" style="padding-left: 5px;padding-right: 5px;"
|
value="分配代替品" onclick="qrscan('2;{!esdInfo.rec.Rental_Apply_Equipment_Set__c}');return false;" disabled="{!readOnly || esdInfo.IsCanSub || stepName != '分配'}"/>
|
</td>
|
<!-- 20210508 ljh add 1829 -->
|
</tr>
|
<apex:variable value="{!Cnt+1}" var="Cnt" />
|
</apex:repeat>
|
</table>
|
</div>
|
</apex:outputPanel>
|
<apex:outputPanel id="checEventFrame">
|
<script>
|
checEventFrame();
|
</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.toString();//20210518 ljh update toString 1829
|
//20210514 ljh add 1829 start
|
//console.log(scanType+':~'+scanType.indexOf('2;'));
|
if(scanType.indexOf('2;') != -1){
|
j$("input[type=checkbox][qrscan='"+scanType.split('2;')[1]+"']").prop("checked", true);
|
}
|
//20210514 ljh add 1829 end
|
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]);
|
// 20231105 zq 设置摄像头 start
|
if(cameras.length > 1){
|
scanner.start(cameras[1]);
|
}else{
|
scanner.start(cameras[0]);
|
}
|
// 20231105 zq 设置摄像头 end
|
}
|
} else {
|
console.error('No cameras found.');
|
}
|
}).catch(function (e) {
|
console.error(e);
|
});
|
}
|
}
|
|
function stopScan() {
|
scanner.stop().then(function () {
|
j$("#myModal").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();
|
//标准控件弹出页面修改 start
|
//查询参数列表
|
let SelectFieldParamList=[
|
//
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId : 'allPage:allForm:searchBlock:searchBlockPage:whStaffBlock:whStaff',
|
//查找字段所在对象
|
ObjectType : 'FixtureDeliverySlip__c',
|
//查找字段的api名称
|
QueryFieldApiName : 'Wh_Staff__c',
|
//查找字段的查找对象
|
SelectObj : 'User',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
}
|
]
|
//初始化
|
resetOpenPage(SelectFieldParamList);
|
|
|
function unblockUI(){
|
j$("#sbArea").fadeOut(500, function(){
|
j$("#sbArea").remove();
|
});
|
try{
|
resetOpenPage(SelectFieldParamList);
|
}catch(e){
|
console.log('e==='+e);
|
}
|
|
}
|
//标准控件弹出页面修改 end
|
</script>
|
</apex:page>
|