<!--仿EquipmentSetSRList2.page-->
|
<apex:page Controller="ReceivingNoteListController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="收货清单配套一览">
|
<head>
|
<meta name="format-detection" content="telephone=no"/>
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
</head>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<script>
|
var standalone = window.navigator.standalone,
|
userAgent = window.navigator.userAgent.toLowerCase(),
|
safari = /safari/.test( userAgent ),
|
ios = /iphone|ipod|ipad/.test( userAgent );
|
|
function checkAll(ele) {
|
var ckd = j$(ele).attr("checked") ? true : false;
|
j$('input[type="checkbox"]:not(:disabled)').prop("checked", ckd);
|
}
|
function checkOK() {
|
j$('input[name$="summarycheck"]:checked').each(function() {
|
j$(this).parent().parent().find('select[name$="packageStatus"]').val("OK");
|
});
|
}
|
function go() {
|
var type = j$(escapeVfId('allPage:allForm:allBlock:type')).value();
|
var typeStr = j$(escapeVfId('allPage:allForm:allBlock:type')).children(':selected').text();
|
var raesIds = j$('input[type="checkbox"]:checked').next().map(function() { return j$(this).val(); } ).get();
|
|
var hasgrey = j$('input[type="checkbox"]:checked').parent().parent().toArray().some(function(x) {return j$(x).css('background-color') == 'rgb(169, 169, 169)'});
|
|
var raesIdsStr = raesIds.join(',');
|
if (raesIdsStr == '') {
|
alert('请选择至少一条收货清单配套一览');
|
return;
|
}
|
if (type == '无') {
|
alert('请选择一种方式');
|
} else if(hasgrey && (type == '清点' || type == '验收' || type == '入库')) {
|
alert('收货确认NG的一览不能操作');
|
} else {
|
setType();
|
}
|
}
|
var photoType, photoId;
|
function goPhoto(type, pid) {
|
photoType = type;
|
photoId = pid;
|
setType();
|
}
|
|
function openLink(linkStr) {
|
if (!standalone && !safari && ios) {
|
window.location.href = linkStr;
|
} else {
|
window.open(linkStr,'id');
|
}
|
}
|
function changePage() {
|
if (photoType != null) {
|
window.location.href = '/'+photoType+'?id='+photoId+'&no='+j$('input[name$="receiving_note_no"]').val();
|
photoType = null;
|
photoId = null;
|
return;
|
}
|
var type = j$(escapeVfId('allPage:allForm:allBlock:type')).value();
|
var typeStr = j$(escapeVfId('allPage:allForm:allBlock:type')).children(':selected').text();
|
var rndIdList = j$('input[type="checkbox"]:checked').next().map(function() { return j$(this).val(); } ).get();
|
var rndIdsStr = rndIdList.join(',');
|
var url = '';
|
if (typeStr == '清点') {
|
page = 'ReceivingNoteAcceptance';
|
openLink("/apex/"+page+"?id=" + rndIdsStr);
|
}
|
else if(typeStr == '验收'){
|
page = 'ReceivingNoteExamination';
|
openLink("/apex/"+page+"?id=" + rndIdsStr);
|
}
|
else if(typeStr == '入库'){
|
page = 'ReceivingNoteStockIn';
|
openLink("/apex/"+page+"?id=" + rndIdsStr);
|
}
|
else if (typeStr == '收货确认'){
|
receivedConfirm();
|
}
|
else if (typeStr == '取消收货确认'){
|
receivedConfirm();
|
}
|
}
|
|
</script>
|
<style type="text/css">
|
.mainTitle {
|
font-size: 23px !important;
|
}
|
th,td{
|
text-align: left;
|
}
|
.pbButton {
|
display: none;
|
}
|
|
</style>
|
<apex:form id="allForm">
|
<apex:pageBlock title="收货清单配套一览" id="allBlock" rendered="true">
|
<apex:actionFunction name="setType" action="{!setType}" oncomplete="changePage();"/>
|
<apex:actionFunction action="{!receivedConfirm}" name="receivedConfirm" reRender="allForm" oncomplete="if({!doneFlg}) {alert('{!selectedType}' == '收货确认' ?'收货确认成功':'取消收货确认成功');location.reload();}"/>
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
<!-- 20210331 you WLIG-BV8CHF start-->
|
<div style="font-size: 18px;">
|
<label>收货清单No. {!receiving_note_no}</label>
|
<apex:inputHidden value="{!receiving_note_no}" id="receiving_note_no"/>
|
|
<label>操作 </label>
|
<apex:selectList id="type" value="{!selectedType}" size="1" style="height: 35px; font-size: 18px;">
|
<apex:actionSupport event="onchange" action="{!checkckb}" rerender="allForm"/>
|
<apex:selectOptions value="{!typeList}"/>
|
</apex:selectList>
|
<apex:outputPanel layout="none" rendered="{!IF(selectedType = '收货确认' || selectedType = '取消收货确认' , TRUE, FALSE)}" >
|
<apex:commandButton style="font-size: 18px; margin-left: 2%" value="全部OK" onclick="checkOK(); return false;"/>
|
<apex:commandButton style="font-size: 18px; margin-left: 2%" value="保存" onclick="go(); return false;"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!IF(selectedType = '收货确认' || selectedType = '取消收货确认', FALSE, TRUE)}" >
|
<apex:commandButton style="font-size: 18px; margin-left: 2%" value="确定" onclick="go(); return false;"/>
|
<apex:commandButton style="font-size: 18px; margin-left: 2%;" value="拍照随货同行单" onclick="goPhoto('ReceivingPhoto','{!rnId}'); return false;"/>
|
</apex:outputPanel>
|
|
</div>
|
<!-- 20210331 you WLIG-BV8CHF end-->
|
<table border="1" style="border-collapse: collapse; font-size:18px;">
|
<tr>
|
<th style="text-align:center;"><input type="checkbox" onchange="checkAll(this)" />全选</th>
|
<!--一览编号 -->
|
<th style="text-align:center;white-space: normal;">收货清单配套一览No.</th>
|
<!--备品配套明细型号-->
|
<th style="text-align:center;white-space: normal;">备品配套明细型号</th>
|
<!--机身编码-->
|
<th style="text-align:center;">机身编码</th>
|
<!--QRCODE-->
|
<!-- <th style="text-align:center;white-space: normal;">备品QRCode/二维码</th> -->
|
<!--备品类别-->
|
<th style="text-align:center;">备品类别</th>
|
<apex:outputPanel layout="none" rendered="{!IF(selectedType = '收货确认', TRUE, FALSE)}" >
|
<!--外包装是否完好-->
|
<th style="text-align:center;white-space: normal;">外包装是否完好</th>
|
<!--外包装情况备注-->
|
<th style="text-align:center;white-space: normal;">外包装情况备注</th>
|
<th style="text-align:center;">照片</th>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!IF(selectedType = '收货确认', FALSE, TRUE)}" >
|
<!--一览状态-->
|
<th style="text-align:center;white-space: normal;">收货清单配套一览状态</th>
|
</apex:outputPanel>
|
</tr>
|
<apex:repeat value="{!summaryInfoList}" var="summaryInfo">
|
<tr style="word-break: break-all;{!IF(summaryInfo.rns.Package_Status__c == 'NG', 'background-color: rgb(169, 169, 169);', '')}" >
|
<td><apex:inputCheckbox disabled="{!summaryInfo.canChange==false && contains(selectedType,'收货确认')}" value="{!summaryInfo.isChecked}" id="summarycheck"/><input type="hidden" value="{!summaryInfo.rns.Id}"/></td>
|
<!--一览.一览编号-->
|
<td><a href="openSafri?id={!summaryInfo.rns.Id}">{!summaryInfo.rns.ReceivingNoteSummaryNo__c}</a></td>
|
<!--一览.备品配套明细型号-->
|
<td>{!summaryInfo.rns.Fixture_Model_No_F__c}</td>
|
<!--一览.首条明细.机身编码-->
|
<td>{!summaryInfo.rns.First_RND__r.SerialNumber_F__c}</td>
|
<!--一览.清单.备品类别-->
|
<td>{!summaryInfo.rns.ReceivingNote__r.Asset_loaner_category__c}</td>
|
<apex:outputPanel layout="none" rendered="{!IF(selectedType = '收货确认', TRUE, FALSE)}" >
|
<apex:outputPanel layout="none" rendered="{!summaryInfo.canChange==true}">
|
<!--一览.外包装是否完好-->
|
<td><apex:inputField id="packageStatus" value="{!summaryInfo.rns.Package_Status__c}"/></td>
|
<!--一览.外包装情况备注-->
|
<td><apex:inputField value="{!summaryInfo.rns.Package_Status_Memo__c}"/></td>
|
<td>{!summaryInfo.fileCnt}张已上传<br/><a onclick="goPhoto('ReceivingSummaryPhoto','{!summaryInfo.rns.Id}'); return false;" href="#">追加</a></td>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!summaryInfo.canChange==false}">
|
<!--一览.外包装是否完好-->
|
<td><apex:outputField value="{!summaryInfo.rns.Package_Status__c}"/></td>
|
<!--一览.外包装情况备注-->
|
<td><apex:outputField value="{!summaryInfo.rns.Package_Status_Memo__c}"/></td>
|
<td>{!summaryInfo.fileCnt}张已上传</td>
|
</apex:outputPanel>
|
</apex:outputPanel>
|
<!--一览.首条明细.二维码-->
|
<!-- <td>{!summaryInfo.rns.First_RND__r.Fixture_QRCode_F__c}</td> -->
|
<!--一览.状态-->
|
<apex:outputPanel layout="none" rendered="{!IF(selectedType = '收货确认', FALSE, TRUE)}" >
|
<td>{!summaryInfo.rns.RNS_Status__c}</td>
|
</apex:outputPanel>
|
</tr>
|
</apex:repeat>
|
</table>
|
</apex:pageBlock>
|
</apex:form>
|
<apex:relatedList subject="{!relatedNote}" list="AttachedContentDocuments"/>
|
</apex:page>
|