<!--仿EquipmentSetShippmentReceived6.page-->
|
<apex:page Controller="ReceivingNoteExaminationController" 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 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("h2").text().trim() + '」<br/>';
|
})
|
if (emptyObj.size() == 0) {
|
blockme();
|
save();
|
} else {
|
j$.confirm({
|
title: '确认',
|
content: string + "以上明细「验收结果」为空,是否进行下一步操作?",
|
boxWidth: '50%',
|
useBootstrap: false,
|
buttons: {
|
OK: function () {
|
blockme();
|
save();
|
},
|
cancel: {
|
text: '取消', // With spaces and symbols
|
action: function () {
|
emptyObj.parent().parent().prev().css('color', 'red');
|
}
|
}
|
}
|
});
|
}
|
}
|
|
function checkAll() {
|
j$('input[name$="summaryCheck"]').prop("checked",true);
|
j$('input[name$="summaryCheckS"]').prop("checked",true);
|
}
|
|
function filljs1() {
|
// j$("select[name$='inspectionResult']").val("OK");
|
j$('input:checkbox:checked').each(function(){
|
j$('select[data-sumId="'+j$(this).data("sumid")+'"]').val('OK');
|
})
|
}
|
|
function filljsQR(qrcode) {
|
blockme();
|
if (qrcode.substr(-8,3) == '250') qrcode = qrcode.slice(0,-8);
|
var select1 = j$("[data-qr='"+qrcode+"'],[data-bar^='"+qrcode+"']").data('sumid');
|
j$('input:checkbox[data-sumId="'+select1+'"]').prop("checked",true);
|
// 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.reload(false);
|
}
|
}
|
|
</script>
|
<style type="text/css">
|
.menu div.m_title{
|
border-top-left-radius:10px;
|
border-top-right-radius:10px;
|
text-align: left;
|
margin: 0;
|
padding: 1%;
|
width: 98%;
|
background:#DCDCDC;
|
position: relative;
|
}
|
.checkintitle{
|
position:absolute;
|
right:10px;
|
}
|
.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;
|
}
|
div.detail {
|
margin-left: 5px;
|
width: 400px;
|
}
|
#Step_tab li.selected {
|
background: #3b5998;
|
}
|
#Step_tab li.selected span {
|
color: #fff;
|
}
|
div.menu{
|
margin-bottom: 20px;
|
width: 490px;
|
}
|
|
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;
|
|
}
|
.menu{
|
border:1px solid #a1a1a1;
|
border-radius:10px;
|
width: 400px;
|
}
|
.menu li .fieldname {
|
width: 30%;
|
text-align: right;
|
float: left;
|
}
|
.menu li .fieldvalue{
|
width: 45%;
|
text-align: left;
|
margin-left: 10px;
|
|
}
|
.menu li {
|
vertical-align: middle;
|
margin: 5px 0;
|
}
|
.commandbutton{
|
width: 100px !important;
|
margin-left: 20px !important;
|
}
|
div.freezehander{
|
width:500px;
|
}
|
</style>
|
|
<div id="myModal" class="modal">
|
|
<!-- Modal content -->
|
<div class="modal-content">
|
<span class="close" onclick="stopScan()">×</span>
|
<p>扫描中</p>
|
<p>Code:<input type="text" id="qrcode"/></p>
|
<video playsinline="true" id="preview" style="width: 100%;z-index: 11;transform: scaleX(-1);margin-top: 10px;"></video>
|
扫码履历:
|
<ul id="scanedqr" style="list-style-type: none; text-align: center;padding: 0;width: 100%; height: 100px; overflow: auto">
|
</ul>
|
|
</div>
|
|
</div>
|
<apex:form id="allForm">
|
<apex:actionFunction name="save" action="{!save}" rerender="detail,message,done_flg" onComplete="checkMessage();unblockUI();resetDetailDivMargintop();resetDetailDivMargintop();" />
|
<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:500px;">
|
<ul id="Step_tab">
|
<li class="selected"><span class="tabsize">验收</span></li>
|
</ul>
|
</th>
|
</tr>
|
</table>
|
<div style="text-align: right;margin-bottom: 20px;">
|
<apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" />
|
<apex:commandButton styleClass="commandbutton" onclick="checkAll();" value="全选" rerender="dummy" />
|
<apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" />
|
</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="true">
|
|
<apex:variable var="indexloop" value="{!indexloop+1}"/>
|
<apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rnd.ReceivingNoteSummary__r.Id, SetName)}" />
|
|
<apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rnd.ReceivingNoteSummary__r.Id && indexloop != 1, true, false)}">
|
<br/>
|
</apex:outputPanel>
|
|
<apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rnd.ReceivingNoteSummary__r.Id, false, true)}">
|
<hr/>
|
<apex:inputCheckbox id="summaryCheck" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.isChecked}"/><h3 style="padding: 5px;" class="detailtab">{!esdInfo.rnd.ReceivingNoteSummary__r.ReceivingNoteSummaryNo__c}:{!esdInfo.rnd.ReceivingNoteSummary__r.Fixture_Set__r.Name}<br/> 到货日期: <apex:outputtext value="{0, date, yyyy/MM/dd}"><apex:param value="{!esdInfo.rnd.ReceivingNoteSummary__r.Received_Confirm_Date__c}" /></apex:outputtext> 汇总结果: {!esdInfo.rnd.ReceivingNoteSummary__r.Inspection_result_F__c}</h3>
|
<apex:variable var="SetName" value="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" />
|
</apex:outputPanel>
|
|
<apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}" >
|
<apex:inputCheckbox id="summaryCheckS" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.isChecked}"/><h3 style="padding: 5px;" class="detailtab">{!esdInfo.rnd.ReceivingNoteSummary__r.ReceivingNoteSummaryNo__c}:{!esdInfo.rnd.ReceivingNoteSummary__r.Fixture_Set__r.Name}<br/> 到货日期: <apex:outputtext value="{0, date, yyyy/MM/dd}"><apex:param value="{!esdInfo.rnd.ReceivingNoteSummary__r.Received_Confirm_Date__c}" /></apex:outputtext> 汇总结果: {!esdInfo.rnd.ReceivingNoteSummary__r.Inspection_result_F__c}</h3>
|
</apex:outputPanel>
|
|
<div class="menu">
|
<div class="m_title">
|
<apex:outputPanel layout="none" rendered="{!IF(esdInfo.rnd.ReceivingNoteSummary__r.First_RND__c = esdInfo.rnd.id, true, false)}" >
|
<h2>{!esdInfo.rnd.Product_Name_F__c} 汇总结果:{!esdInfo.rnd.Check_Result_Sum__c}</h2>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!IF(esdInfo.rnd.ReceivingNoteSummary__r.First_RND__c = esdInfo.rnd.id, false, true)}" >
|
<h2>{!esdInfo.rnd.Product_Name_F__c}</h2>
|
</apex:outputPanel>
|
</div>
|
<ul style="{!IF(esdInfo.rnd.AcceptanceResult__c == 'NG', 'background-color: rgb(169, 169, 169);', '')}">
|
<li>
|
<span class="fieldname">明细No.</span>
|
<span class="fieldvalue">{!esdInfo.rnd.ReceivingNoteDetailNo__c}</span>
|
</li>
|
<li style="{!IF(ISBLANK(esdInfo.rnd.Fixture_Arrival_Process__c),'display: none;','')}">
|
<span class="fieldname">备品入库处理</span>
|
<span class="fieldvalue" style="width: 65%;">{!esdInfo.rnd.Fixture_Arrival_Process__c}</span>
|
</li>
|
<li style="{!IF(esdInfo.rnd.Fixture_Arrival_Process__c == '变体','','display: none;')}">
|
<span class="fieldname">备品入库产品</span>
|
<span class="fieldvalue" style="width: 65%;">{!esdInfo.rnd.Fixture_Arrival_Product__r.Name}</span>
|
</li>
|
<li>
|
<span class="fieldname">规格</span>
|
<span class="fieldvalue">{!esdInfo.rnd.Packing_list_Fixture_F__c}</span>
|
</li>
|
<li style="{!IF(esdInfo.rnd.ReceivingNoteSummary__r.First_RND__c = esdInfo.rnd.id,'display: none;','')}">
|
<span class="fieldname">使用期限</span>
|
<span class="fieldvalue"> <apex:outputField value="{!esdInfo.rnd.PeriodOfUse__c}"/> </span>
|
</li>
|
|
<li style="{!IF(esdInfo.rnd.ReceivingNoteSummary__r.First_RND__c = esdInfo.rnd.id,'','display: none;')}">
|
<span class="fieldname">医疗器械名称</span>
|
<span class="fieldvalue">{!esdInfo.rnd.RNDAssert__r.Product_Name__c}</span>
|
<apex:inputField rendered="{!esdInfo.editable}" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.rnd.Product_Name_Check__c}"/>
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
|
<span style="width: 0" id="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}">{!IF(esdInfo.rnd.Product_Name_Check__c=='','无',esdInfo.rnd.Product_Name_Check__c)}</span>
|
</apex:outputPanel>
|
</li>
|
<li style="{!IF(esdInfo.rnd.ReceivingNoteSummary__r.First_RND__c = esdInfo.rnd.id,'','display: none;')}">
|
<span class="fieldname">规格(型号)</span>
|
<span class="fieldvalue">{!esdInfo.rnd.RNDAssert__r.Fixture_Model_No_F__c}</span>
|
<apex:inputField rendered="{!esdInfo.editable}" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.rnd.Model_Check__c}"/>
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
|
<span style="width: 0" id="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}">{!IF(esdInfo.rnd.Model_Check__c=='','无',esdInfo.rnd.Model_Check__c)}</span>
|
</apex:outputPanel>
|
</li>
|
<li style="{!IF(esdInfo.rnd.ReceivingNoteSummary__r.First_RND__c = esdInfo.rnd.id,'','display: none;')}">
|
<span class="fieldname">机身编码</span>
|
<span class="fieldvalue">{!esdInfo.rnd.SerialNumber_F__c}</span>
|
</li>
|
<li style="{!IF(esdInfo.rnd.ReceivingNoteSummary__r.First_RND__c = esdInfo.rnd.id,'','display: none;')}">
|
<span class="fieldname">注册证号或备案凭证编号</span>
|
<span class="fieldvalue">{!esdInfo.rnd.RNDAssert__r.NMPA_Approbation_No__c}</span>
|
<apex:inputField rendered="{!esdInfo.editable}" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.rnd.NMPA_Approbation_No_Check__c}"/>
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
|
<span style="width: 0" id="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}">{!IF(esdInfo.rnd.NMPA_Approbation_No_Check__c=='','无',esdInfo.rnd.NMPA_Approbation_No_Check__c)}</span>
|
</apex:outputPanel>
|
</li>
|
<li style="{!IF(esdInfo.rnd.ReceivingNoteSummary__r.First_RND__c = esdInfo.rnd.id,'','display: none;')}">
|
<span class="fieldname">生产日期</span>
|
<span class="fieldvalue">
|
<apex:outputtext value="{0, date, yyyy/MM/dd}">
|
<apex:param value="{!esdInfo.rnd.RNDAssert__r.ProductionDate__c}"></apex:param>
|
</apex:outputtext>
|
</span>
|
<apex:inputField rendered="{!esdInfo.editable}" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.rnd.Production_Date_Check__c}"/>
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
|
<span style="width: 0" id="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}">{!IF(esdInfo.rnd.Production_Date_Check__c=='','无',esdInfo.rnd.Production_Date_Check__c)}</span>
|
</apex:outputPanel>
|
</li>
|
<li style="{!IF(esdInfo.rnd.ReceivingNoteSummary__r.First_RND__c = esdInfo.rnd.id,'','display: none;')}">
|
<span class="fieldname">有效期(或者失效期)</span>
|
<span class="fieldvalue">
|
<apex:outputtext value="{0, date, yyyy/MM/dd}">
|
<apex:param value="{!esdInfo.rnd.PeriodOfUse__c}"></apex:param>
|
</apex:outputtext>
|
</span>
|
<apex:inputField rendered="{!esdInfo.editable}" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.rnd.Guarantee_End_Check__c}"/>
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
|
<span style="width: 0" id="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}">{!IF(esdInfo.rnd.Guarantee_End_Check__c=='','无',esdInfo.rnd.Guarantee_End_Check__c)}</span>
|
</apex:outputPanel>
|
</li>
|
<li style="{!IF(esdInfo.rnd.ReceivingNoteSummary__r.First_RND__c = esdInfo.rnd.id,'','display: none;')}">
|
<span class="fieldname">生产企业</span>
|
<span class="fieldvalue">{!esdInfo.rnd.RNDAssert__r.ProduceCompany__c}</span>
|
<apex:inputField rendered="{!esdInfo.editable}" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.rnd.Produce_Company_Check__c}"/>
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
|
<span style="width: 0" id="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}">{!IF(esdInfo.rnd.Produce_Company_Check__c=='','无',esdInfo.rnd.Produce_Company_Check__c)}</span>
|
</apex:outputPanel>
|
</li>
|
<li style="{!IF(esdInfo.rnd.ReceivingNoteSummary__r.First_RND__c = esdInfo.rnd.id,'','display: none;')}">
|
<span class="fieldname">供货者</span>
|
<span class="fieldvalue">{!esdInfo.rnd.RNDAssert__r.Product2.VenderNameFormal__c}</span>
|
<apex:inputField rendered="{!esdInfo.editable}" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.rnd.Vender_Check__c}"/>
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
|
<span style="width: 0" id="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}">{!IF(esdInfo.rnd.Vender_Check__c=='','无',esdInfo.rnd.Vender_Check__c)}</span>
|
</apex:outputPanel>
|
</li>
|
<li style="{!IF(esdInfo.rnd.ReceivingNoteSummary__r.First_RND__c = esdInfo.rnd.id,'display: none;','')}">
|
<span class="fieldname">机身编码</span>
|
<span class="fieldvalue">{!esdInfo.rnd.SerialNumber_F__c}</span>
|
</li>
|
<li data-qr="{!esdInfo.rnd.Fixture_QRCode_F__c}" data-bar="{!esdInfo.rnd.Barcode_F__c}" data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" >
|
<span class="fieldname">验收结果</span>
|
<apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}">
|
<apex:inputField html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" id="inspectionResult" value="{!esdInfo.rnd.Inspection_result_after__c}" styleClass="fieldvalue" />
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
|
<span class="fieldvalue" >{!esdInfo.rnd.Inspection_result_after__c}</span>
|
</apex:outputPanel>
|
</li>
|
<li>
|
<span class="fieldname">验收备注</span>
|
<apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}">
|
<apex:inputField id="inspectionResult2" value="{!esdInfo.rnd.Inspection_Comment__c}" styleClass="fieldvalue" />
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
|
<span class="fieldvalue" >{!esdInfo.rnd.Inspection_Comment__c}</span>
|
</apex:outputPanel>
|
</li>
|
</ul>
|
</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>
|