<apex:page Controller="EquipmentSetShippmentReceived5Controller" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="备品出库入库" lightningStylesheets="true">
|
<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:includeScript value="{!URLFOR($Resource.connection20)}"/>
|
<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">
|
var Session_ID = '{!$Api.Session_ID}';
|
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() {
|
j$("select[name$='inspectionResult']").parent().parent().prev().css('color','');
|
var emptyObj = j$("select[name$='inspectionResult']").filter(function() {
|
return !this.value;
|
});
|
var string = '';
|
emptyObj.parent().parent().prev().each(function() {
|
string += '「' + j$(this).find("span").text().trim() + '」\n';
|
})
|
if (emptyObj.size() == 0) {
|
blockme();
|
save();
|
} else {
|
showConfirm(string + "以上明细「检测结果」为空,是否进行下一步操作?", function() {
|
blockme();
|
save();
|
}, function() {
|
emptyObj.parent().parent().prev().css('color', 'red');
|
})
|
}
|
}
|
|
function OpenRentalApplyFault(faultReportFlag, radetailId, radetailName, personId, personName, purpose2, name, hospitalId, hospitalName, serialNumber, fixtureNo, workPlace, deptCategory){
|
if(faultReportFlag == '不存在故障报告单'){
|
window.open("/a5F/e?Name=*" + "&CF00N9D000007hkLN_lKid=" + radetailId + "&CF00N9D000007hkLN=" + radetailName + "&CF00N9D000007jemP_lKid=" + personId + "&CF00N9D000007jemP=" + personName + "&00N9D000007jrE6=" + purpose2 + "&00N9D000007ijyA=" + name + "&CF00N9D000007jrEG_lKid=" + hospitalId + "&CF00N9D000007jrEG=" + hospitalName + "&00N9D000007jrEL=" + serialNumber + "&00N9D000007jrEQ=" + fixtureNo + "&00N9D000007jrEV=" + workPlace + "&00N9D000007jrJW=" + deptCategory);
|
}else{
|
// if(confirm('是否打开或创建新的检测分析报告?')){
|
// if (faultReportFlag == '存在故障报告单'){
|
// window.open("/a5C/e?Name=*" + "&CF00N9D000007hkLN_lKid=" + radetailId + "&CF00N9D000007hkLN=" + radetailName + "&CF00N9D000007jemP_lKid=" + personId + "&CF00N9D000007jemP=" + personName + "&00N9D000007jrE6=" + purpose2 + "&00N9D000007ijyA=" + name + "&CF00N9D000007jrEG_lKid=" + hospitalId + "&CF00N9D000007jrEG=" + hospitalName + "&00N9D000007jrEL=" + serialNumber + "&00N9D000007jrEQ=" + fixtureNo + "&00N9D000007jrEV=" + workPlace + "&00N9D000007jrJW=" + deptCategory);
|
// }else{
|
// window.open("/" + faultReportFlag);
|
// }
|
// }
|
|
if(confirm('已存在检测分析报告')){
|
window.open("/" + faultReportFlag);
|
}
|
}
|
}
|
|
function filljs1() {
|
j$("select[name$='inspectionResult']").val("OK");
|
j$("select[name$='inspectionResultNg']").prop("selectedIndex", 0);
|
j$("select[name$='inspectionResultNg']").prop("disabled", true);
|
j$("select[name$='inspectionResultNg3']").prop("selectedIndex", 0);
|
j$("select[name$='inspectionResultNg3']").prop("disabled", true);
|
|
j$("select[name$='inspectionResult2']").val("OK");
|
j$("select[name$='inspectionResultNg2']").prop("selectedIndex", 0);
|
j$("select[name$='inspectionResultNg2']").prop("disabled", true);
|
j$("select[name$='inspectionResultNg4']").prop("selectedIndex", 0);
|
j$("select[name$='inspectionResultNg4']").prop("disabled", true);
|
}
|
function filljsQR(qrcode) {
|
blockme();
|
var select1 = j$("[data-qr='"+qrcode+"']").children("select");
|
if (select1.size() > 1) {
|
alert("数量管理附属品请手动打勾!");
|
} else {
|
select1.val('OK');
|
var select2 = j$("[data-qr='"+qrcode+"']").next().find("select");
|
select2.children().remove();
|
select2.append(j$("<option></option>").attr("value",'').text('--なし--'));
|
select2.prop("disabled", true);
|
}
|
unblockUI();
|
j$("#scanedqr").append("<li>"+qrcode+"</li>");
|
j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
|
}
|
|
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();
|
}
|
function checkMessage() {
|
if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
|
alert("保存完了");
|
window.location.href = window.location.href + '&done=1';
|
}
|
}
|
</script>
|
<style type="text/css">
|
.menu div.m_title{
|
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: 24%;
|
float: left;
|
margin: 0;
|
padding: 0;
|
text-align: center;
|
cursor: pointer;
|
}
|
#Step_tab li span {
|
margin: 0;
|
padding: 15px 0 11px;
|
color: #2daae1;
|
font-size: 12px;
|
font-weight: bold;
|
line-height: 1;
|
}
|
#Step_tab li.selected {
|
background: #3b5998;
|
}
|
#Step_tab li.selected span {
|
color: #fff;
|
}
|
|
div#main {
|
width: 320px;
|
}
|
|
div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
|
div.rtop div {background:#DCDCDC;}
|
div.r1, div.r2, div.r3, div.r4 {display:block; overflow:hidden;}
|
div.r1, div.r2, div.r3 {height:1px;}
|
div.r2, div.r3, div.r4 {border-left:1px solid silver; border-right:1px solid silver;}
|
div.r1 {margin: 0 5px; background:silver;}
|
div.r2 {margin: 0 3px; border-width:0 2px;}
|
div.r3 {margin: 0 2px;}
|
div.r4 {margin: 0 1px; height: 2px;}
|
hr {
|
border-top: 2px dotted #f00;
|
color: #fff;
|
background-color: #fff;
|
height: 1px;
|
width: 90%;
|
}
|
.close {
|
color: #aaaaaa;
|
float: right;
|
font-size: 28px;
|
font-weight: bold;
|
}
|
.close:hover,
|
.close:focus {
|
color: #000;
|
text-decoration: none;
|
cursor: pointer;
|
}
|
.menu blockquote{
|
margin: 0;
|
padding: 1px;
|
list-style: none;
|
border-top: 1px solid #ddd;
|
}
|
</style>
|
<div id="myModal" class="modal">
|
|
<!-- Modal content -->
|
<div class="modal-content">
|
<span class="close" onclick="stopScan()">×</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">
|
<!-- OCM_OLY-435 追加 window.location.reload(false) 保存后刷新画面 しないと、triggerにて更新した値がVFに反映されない -->
|
<apex:actionFunction name="save" action="{!save}" rerender="detail,message,done_flg" onComplete="checkMessage();unblockUI();resetDetailDivMargintop();resetDetailDivMargintop();" />
|
<apex:actionFunction name="Shippment1" action="{!Shippment1}" />
|
<apex:actionFunction name="Shippment2" action="{!Shippment2}" />
|
<apex:inputHidden value="{!done_flg}" id="done_flg"/>
|
<div id="main">
|
<div id="hander" class="freezehander">
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
<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: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(SR_status='Shippment', true, false)}">
|
<apex:outputPanel layout="none" rendered="{!IF(Step_status='回收后检测', true, false)}">
|
<li onclick="javascript:Shippment1();" class="selected"><span class="tabsize">回收后检测</span></li>
|
<li onclick="javascript:Shippment2();"><span class="tabsize">上架</span></li>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!IF(Step_status='发货', true, false)}">
|
<li onclick="javascript:Shippment1();"><span class="tabsize">回收后检测</span></li>
|
<li onclick="javascript:Shippment2();" class="selected"><span class="tabsize">上架</span></li>
|
</apex:outputPanel>
|
</apex:outputPanel>
|
</ul>
|
</th>
|
</tr>
|
</table>
|
<div style="text-align: right">
|
<apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='回收后检测', true, false)}"/>
|
<apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='回收后检测', true, false)}"/>
|
</div>
|
</div>
|
<apex:outputPanel id="detail">
|
|
<div id="detailDiv" class="detail">
|
<apex:variable var="indexloop" value="{!0}" />
|
<apex:variable var="SetName" value="" />
|
<apex:repeat value="{!esdList}" var="esdInfo" id="esdList" rendered="{!IF(SR_status='Shippment', true, false)}">
|
<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>
|
<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.AssetName__c}" />
|
</div></h2>
|
<!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
|
<ul>
|
<apex:outputPanel layout="none" rendered="{!IF(Step_status='回收后检测', true, false)}">
|
<!-- <div style="position: relative; padding-left: 50px; background:{!IF(esdInfo.quickCheck, '#BBFF66', '')}"> -->
|
<li>
|
<span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Check_lost_Item_F__c.label}: </span><span>
|
<apex:outputField value="{!esdInfo.rec.Check_lost_Item_F__c}" style="margin:3px;width:75px;"/></span>
|
</li>
|
<li>
|
<span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_giveup__c.label}: </span><span>
|
<apex:outputField value="{!esdInfo.rec.Lost_item_giveup__c}" style="margin:3px;width:75px;"/></span>
|
</li>
|
<li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', '', 'display: none;')}" data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" >
|
<!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_F__c.label}: </span> -->
|
<span>检测结果: </span><span>
|
<!-- <apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" /> -->
|
<output style="margin:3px;width:55px;text-align:left;margin-left:3px;margin-top:0px;float: left;">{!esdInfo.rec.Inspection_result_after__c}</output>
|
<apex:commandButton style="margin-top:0px;font-size: 9px !important;" onclick="OpenRentalApplyFault('{!esdInfo.faultReportFlag}', '{!esdInfo.rec.Id}', '{!esdInfo.rec.Name}','{!esdInfo.personInChargeId}','{!esdInfo.personInChargeName}','{!esdInfo.demoPurpose2}','{!esdInfo.raName}','{!esdInfo.hospitalId}','{!esdInfo.hospitalName}','{!esdInfo.rec.SerialNumber_F__c}','{!esdInfo.rec.Fixture_Model_No__c}','{!esdInfo.workPlace}','{!esdInfo.deptCategory}')" value="故障报告" rerender="dummy" rendered="{!esdInfo.showFaultRepor}"/>
|
</span>
|
</li>
|
<li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', '', 'display: none;')}">
|
<!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_NG_F__c.label}: </span> -->
|
<span>检测NG区分: </span><span>
|
<apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG__c}" style="margin:3px;width:75px;"/></span>
|
</li>
|
<li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', '', 'display: none;')}" data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" >
|
<!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_F__c.label}: </span> -->
|
<span>最终检测结果: </span>
|
<apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable, esdInfo.rec.Inspection_result_after_NG__c='维修')}">
|
<apex:inputField id="inspectionResult2" value="{!esdInfo.rec.Inspection_result_after_Final__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 2);" />
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c='维修')}">
|
<span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_Final__c}" style="margin:3px;width:75px;" /></span>
|
</apex:outputPanel>
|
</li>
|
<li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', '', 'display: none;')}">
|
<!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_NG_F__c.label}: </span> -->
|
<span>最终NG区分: </span>
|
<apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable,esdInfo.rec.Inspection_result_after_NG__c='维修')}"><span>
|
<apex:inputField id="inspectionResultNg2" value="{!esdInfo.rec.Inspection_result_after_NG_Final__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 2);" /></span>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c='维修')}">
|
<span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG_Final__c}" style="margin:3px;width:75px;" /></span>
|
</apex:outputPanel>
|
</li>
|
<li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', '', 'display: none;')}">
|
<span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_NG_abord_reason__c.label}:</span>
|
<apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable,esdInfo.rec.Inspection_result_after_NG__c='维修')}">
|
<span>
|
<apex:inputField id="inspectionResultNg4" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" />
|
</span>
|
<script>
|
disabledShowNg4();
|
function disabledShowNg4() {
|
var result_after_NG_Final = '{!esdInfo.rec.Inspection_result_after_NG_Final__c}';
|
if (result_after_NG_Final != "废弃") {
|
j$(escapeVfId('allPage:allForm:esdList:' + ('{!indexloop}' - 1) + ':inspectionResultNg4')).prop("disabled", true);
|
}
|
}
|
</script>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c='维修')}">
|
<span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" /></span>
|
</apex:outputPanel>
|
</li>
|
<li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', 'display: none;', '')}" data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" >
|
<!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_F__c.label}: </span> -->
|
<span>检测结果: </span>
|
<apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable, esdInfo.rec.Inspection_result_after_NG__c!='维修')}">
|
<apex:inputField id="inspectionResult" value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 1)" />
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c!='维修')}">
|
<output style="margin:3px;width:55px;text-align:left;margin-left:3px;margin-top:0px;float: left;">{!esdInfo.rec.Inspection_result_after__c}</output>
|
</apex:outputPanel>
|
<apex:commandButton style="margin-top:0px;font-size: 9px !important;" onclick="OpenRentalApplyFault('{!esdInfo.faultReportFlag}', '{!esdInfo.rec.Id}', '{!esdInfo.rec.Name}','{!esdInfo.personInChargeId}','{!esdInfo.personInChargeName}','{!esdInfo.demoPurpose2}','{!esdInfo.raName}','{!esdInfo.hospitalId}','{!esdInfo.hospitalName}','{!esdInfo.rec.SerialNumber_F__c}','{!esdInfo.rec.Fixture_Model_No__c}','{!esdInfo.workPlace}','{!esdInfo.deptCategory}')" value="故障报告" rerender="dummy" rendered="{!esdInfo.showFaultRepor}"/>
|
</li>
|
<li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', 'display: none;', '')}">
|
<!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_NG_F__c.label}: </span> -->
|
<span>检测NG区分: </span>
|
<apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable, esdInfo.rec.Inspection_result_after_NG__c!='维修')}"><span>
|
<apex:inputField id="inspectionResultNg" value="{!esdInfo.rec.Inspection_result_after_NG__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 1)" /></span>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c!='维修')}">
|
<span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG__c}" style="margin:3px;width:75px;" /></span>
|
</apex:outputPanel>
|
</li>
|
<li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', 'display: none;', '')}">
|
<span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_NG_abord_reason__c.label}:</span>
|
<apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable, esdInfo.rec.Inspection_result_after_NG__c!='维修')}">
|
<span>
|
<apex:inputField id="inspectionResultNg3" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;"/>
|
</span>
|
<script>
|
disabledShowNg3();
|
function disabledShowNg3() {
|
var result_after_NG = '{!esdInfo.rec.Inspection_result_after_NG__c}';
|
if (result_after_NG != "废弃") {
|
j$(escapeVfId('allPage:allForm:esdList:' + ('{!indexloop}' - 1) + ':inspectionResultNg3')).prop("disabled", true);
|
}
|
}
|
</script>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c!='维修')}">
|
<span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" /></span>
|
</apex:outputPanel>
|
</li>
|
<li>
|
<span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_Comment__c.label}: </span>
|
<apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}"><span>
|
<apex:inputField value="{!esdInfo.rec.Inspection_Comment__c}" style="margin:3px;width:90%;float:left;"/></span>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable))}">
|
<span><apex:outputField value="{!esdInfo.rec.Inspection_Comment__c}" style="margin:3px;width:90%;float:left;"/></span>
|
</apex:outputPanel>
|
</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> -->
|
<span><apex:outputLink value="/{!esdInfo.rec.Asset__c}" target="_blank" id="assetLink" style="margin:3px;width:140px;float: left;text-align:left;margin-left:3px;margin-top:0px;">{!esdInfo.rec.SerialNumber_F__c}</apex:outputLink></span>
|
</li>
|
<!-- </div> -->
|
|
<script>
|
function changeResultNg(index, kubun) {
|
var num = index - 1;
|
if (kubun==1) {
|
var resultNgStr = document.getElementById('allPage:allForm:esdList:' + num + ':inspectionResultNg').value;
|
var resultStr = document.getElementById('allPage:allForm:esdList:' + num + ':inspectionResult').value;
|
if (resultNgStr != "废弃" || resultStr != "NG") {
|
j$(escapeVfId('allPage:allForm:esdList:' + num + ':inspectionResultNg3')).prop("selectedIndex", 0);
|
j$(escapeVfId('allPage:allForm:esdList:' + num + ':inspectionResultNg3')).prop("disabled", true);
|
} else {
|
j$(escapeVfId('allPage:allForm:esdList:' + num + ':inspectionResultNg3')).prop("selectedIndex", 0);
|
j$(escapeVfId('allPage:allForm:esdList:' + num + ':inspectionResultNg3')).prop("disabled", false);
|
}
|
} else if (kubun==2) {
|
var resultNg2Str = document.getElementById('allPage:allForm:esdList:' + num + ':inspectionResultNg2').value;
|
var result2Str = document.getElementById('allPage:allForm:esdList:' + num + ':inspectionResult2').value;
|
if (resultNg2Str != "废弃" || result2Str != "NG") {
|
j$(escapeVfId('allPage:allForm:esdList:' + num + ':inspectionResultNg4')).prop("selectedIndex", 0);
|
j$(escapeVfId('allPage:allForm:esdList:' + num + ':inspectionResultNg4')).prop("disabled", true);
|
} else {
|
j$(escapeVfId('allPage:allForm:esdList:' + num + ':inspectionResultNg4')).prop("selectedIndex", 0);
|
j$(escapeVfId('allPage:allForm:esdList:' + num + ':inspectionResultNg4')).prop("disabled", false);
|
}
|
}
|
}
|
</script>
|
</apex:outputPanel>
|
</ul>
|
</div>
|
<div class="rbottom">
|
<div class="r4"></div>
|
<div class="r3"></div>
|
<div class="r2"></div>
|
<div class="r1"></div>
|
</div>
|
|
</apex:repeat>
|
</div>
|
</apex:outputPanel>
|
</div>
|
<script type="text/javascript">
|
var standalone = window.navigator.standalone,
|
userAgent = window.navigator.userAgent.toLowerCase(),
|
safari = /safari/.test( userAgent ),
|
ios = /iphone|ipod|ipad/.test( userAgent ),
|
ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
|
let scanner = new Instascan.Scanner({ video: document.getElementById('preview'), scanPeriod: 5 ,mirror: false});
|
scanner.addListener('scan', function (content) {
|
filljsQR(content);
|
});
|
|
function qrsacn() {
|
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>
|