<apex:page Controller="InventoryController" tabStyle="InventoryView__tab" showHeader="true"
|
sidebar="true" id="allPage" action="{!init}" title="盘点" >
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}" />
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}" />
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}" />
|
|
<script>
|
function checkAll() {
|
var productCount = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCnt')).value();
|
if (j$(escapeVfId('checker')).attr('checked') == 'checked') {
|
var outer = 0;
|
for (var i = 0; i < productCount; i++) {
|
outer = Math.floor(i / 1000);
|
j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTableOuter:' + outer + ':ConsumableorderdetailsTable:' + (i-(1000*outer)) + ':proRowCheckbox')).attr('checked',true);
|
}
|
} else {
|
var outer = 0;
|
for (var i = 0; i < productCount; i++) {
|
outer = Math.floor(i / 1000);
|
j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTableOuter:' + outer + ':ConsumableorderdetailsTable:' + (i-(1000*outer)) + ':proRowCheckbox')).attr('checked',false);
|
}
|
}
|
}
|
|
function refreshPageSizeJs() {
|
refreshPageSize();
|
}
|
|
//function sortTableJs(key) {
|
// blockme();
|
// SortStore(key);
|
//}
|
function PraseToCSVJs(){
|
//打印成csv、
|
|
window.open("/customer/InventoryCSV");
|
}
|
|
function saveJs() {
|
blockme();
|
save();
|
}
|
|
function searchProductJs() {
|
blockme();
|
searchConsumableorderdetails();
|
}
|
|
function setDisabled() {
|
var productCount = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCnt')).value();
|
var outer = 0;
|
for (var i = 0; i < productCount; i++) {
|
outer = Math.floor(i / 1000);
|
var canselect = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTableOuter:' + outer + ':ConsumableorderdetailsTable:' + i + ':canSelect')).value();
|
if (canselect == 'false') {
|
j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTableOuter:' + outer + ':ConsumableorderdetailsTable:' + i + ':shelfnumber')).attr('disabled',true);
|
}
|
}
|
}
|
function calonLoad() {
|
}
|
window.sfdcPage.appendToOnloadQueue(function() { calonLoad() });
|
</script>
|
<style>
|
.dateFormat {
|
display: none;
|
}
|
td.dataRowCFDA {
|
background-color:red;
|
}
|
</style>
|
<apex:form id="allForm">
|
<apex:actionFunction name="refreshPageSize" action="{!refreshPageSize}" status="fetchStatus" reRender="ConsumableorderdetailsSection1" />
|
<apex:actionFunction name="save" action="{!save}"
|
rerender="ConsumableorderdetailsSection,ConsumableorderdetailsSection1, message"
|
onComplete="unblockUI();">
|
</apex:actionFunction>
|
<!--<apex:actionFunction name="SortStore" action="{!SortStore}"
|
rerender="ConsumableorderdetailsSection,ConsumableorderdetailsSection1, message"
|
onComplete="unblockUI();">
|
</apex:actionFunction>-->
|
<apex:actionFunction name="saveAndSearch" action="{!save}"
|
rerender="ConsumableorderdetailsSection,ConsumableorderdetailsSection1, message"
|
onComplete="unblockUI();">
|
<apex:param name="firstParam" assignTo="{!saveType}" value="" />
|
</apex:actionFunction>
|
<apex:actionFunction name="saveAndSort" action="{!save}"
|
rerender="ConsumableorderdetailsSection,ConsumableorderdetailsSection1, message"
|
onComplete="unblockUI();">
|
<apex:param name="firstParam" assignTo="{!saveType}" value="" />
|
<apex:param name="secondParam" assignTo="{!sortKey}" value="" />
|
</apex:actionFunction>
|
<apex:actionFunction name="searchConsumableorderdetails"
|
action="{!searchConsumableorderdetails}"
|
rerender="ConsumableorderdetailsSection,ConsumableorderdetailsSection1,ConsumableorderdetailsSection2, message"
|
onComplete="unblockUI();">
|
</apex:actionFunction>
|
<apex:outputPanel id="allPanel">
|
<apex:pageBlock title="库存盘点" id="allBlock">
|
<apex:pageBlockButtons location="top">
|
<apex:commandButton onclick="saveJs();" value="盘点确认" rerender="dummy" style="width: 150px;" />
|
</apex:pageBlockButtons>
|
<apex:pageBlock id="searchBlock">
|
<table>
|
<colgroup>
|
<col width="160px" />
|
<col width="100px" />
|
<col width="10px" />
|
<col width="70px" />
|
<col width="100px" />
|
<col width="10px" />
|
<col width="90px" />
|
<col width="100px" />
|
<col width="10px" />
|
<col width="85px" />
|
<col width="100px" />
|
<col width="10px" />
|
<col width="70px" />
|
<col width="100px" />
|
</colgroup>
|
<tr>
|
<td align="right">Barcode</td>
|
<td><apex:inputTextarea value="{!barcode}" style="width:600px" /></td>
|
<td />
|
<td align="right"></td>
|
<td><apex:commandButton value="BarCode录入" style="width: 150px;"
|
onclick="searchProductJs(); return false;" /></td>
|
<td />
|
</tr>
|
<tr>
|
<td></td>
|
</tr>
|
</table>
|
</apex:pageBlock>
|
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
<apex:pageBlock title="在库商品库存一览" id="ConsumableorderdetailsSection">
|
<input type="hidden" id="allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCnt" value="{!consumableorderdetailsCount}" />
|
<table class="list" border="0" cellpadding="0" cellspacing="0" >
|
<!--<apex:inputHidden id="ConsumableorderdetailsCnt" value="{!ConsumableorderdetailsCount}" />-->
|
<tr class="headerRow">
|
<th><input type='checkbox' onClick='checkAll()' id='checker'/>是否盘点</th>
|
<th>消耗品名称</th>
|
<th>规格</th>
|
<th>单位</th>
|
<th>有效期内库存</th>
|
<th>过期库存</th>
|
<!-- <th><a href="#" onclick="sortTableJs('1');return false;" style="text-decoration: underline;">库存</a>{!sortOrder[1]}</th>-->
|
<th>盘点</th>
|
<th>丢失</th>
|
<th>寻回</th>
|
<th>差异原因</th>
|
</tr>
|
<apex:repeat value="{!ConsumableorderdetailsRecordsview}" var="records" id="ConsumableorderdetailsTableOuter" >
|
<apex:repeat value="{!records}" var="m" id="ConsumableorderdetailsTable">
|
<tr class="dataRow">
|
<td>
|
<apex:inputCheckbox value="{!m.check}" id="proRowCheckbox" styleClass="proRowCheckbox"/>
|
</td>
|
<td Class="dataCell">{!m.Prod.Name__c}</td>
|
<td class="dataCell" style="text-align: center;">{!m.Prod.Packing_list_manual__c}</td>
|
<td class="dataCell">{!m.boxPiece}</td>
|
<td class="dataCell" style="text-align: center;">{!m.limitCount}</td>
|
<td class="dataCell" style="text-align: center;">{!m.overlimitCount}</td>
|
<!-- <td class="dataCell" style="text-align: right;">{!m.Countid}</td>-->
|
<td class="dataCell" style="text-align: center;">{!m.Pandian}</td>
|
<td class="dataCell" style="text-align: center;">{!m.Diff}</td>
|
<td class="dataCell" style="text-align: center;">{!m.refind}</td>
|
<td><apex:inputText value="{!m.DiffReason}" /></td>
|
</tr>
|
</apex:repeat>
|
</apex:repeat>
|
</table>
|
</apex:pageBlock>
|
<apex:pageBlock id="ConsumableorderdetailsSection1" title="调整明细">
|
<apex:pageBlockButtons location="top" rendered="{!done}">
|
<apex:commandButton value="下载本次盘点库存变化明细" style="width: 200px;" action="{!doClick}" />
|
</apex:pageBlockButtons>
|
<apex:pageblocktable value="{!codPageRecords}" var="records" id="ConsumableorderdetailsTable1">
|
<apex:column width="80">
|
<apex:facet name="header">消耗品名称</apex:facet>
|
<apex:outputField value="{!records.Prod.Name__c}"/>
|
</apex:column>
|
<apex:column width="80">
|
<apex:facet name="header">单位</apex:facet>
|
<apex:outputField value="{!records.orderdetails2.Box_Piece__c}" />
|
</apex:column>
|
<apex:column width="80">
|
<apex:facet name="header">BarCode</apex:facet>
|
<apex:outputField value="{!records.orderdetails2.Bar_Code__c}"/>
|
</apex:column>
|
<apex:column width="80">
|
<apex:facet name="header">调整原因</apex:facet>
|
<apex:outputText value="{!records.DiffReason}" />
|
</apex:column>
|
</apex:pageblocktable>
|
<table style="width: 100%">
|
<tr>
|
<td>
|
<!-- Page X of Y -->
|
<!-- PageNumber:当前页面所在位置,ResultSize:记录总条数,PageSize:每页记录条数 -->
|
<apex:outputText value="{!(setCon.pageNumber * size)+1-size}-{!IF((setCon.pageNumber * size)>noOfRecords, noOfRecords,
|
(setCon.pageNumber * size))} 共 {!noOfRecords} 个" />
|
<!--<apex:outputPanel >
|
<apex:actionStatus id="fetchStatus" >
|
<apex:facet name="start" >
|
<img src="/img/loading.gif" />
|
</apex:facet>
|
</apex:actionStatus>
|
</apex:outputPanel>-->
|
</td>
|
<td align="center">
|
<div class="paginator line1">
|
<span class="prevNextLinks">
|
<span class="prevNext">
|
<apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!setCon.first}" oncomplete="refreshPageSizeJs();" title="首页" >
|
<img src="/s.gif" title="首页" alt="首页" class="{!if((setCon.hasPrevious),'first','firstoff')}"/>
|
</apex:commandLink>
|
</span>
|
<span class="prevNext">
|
<apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!setCon.previous}" oncomplete="refreshPageSizeJs();" title="上一页">
|
<img src="/s.gif" title="上一页" alt="上一页" class="{!if((setCon.hasPrevious),'prev','prevoff')}"/>上一页
|
</apex:commandLink>
|
</span>
|
<span class="prevNext">
|
<apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!setCon.next}" oncomplete="refreshPageSizeJs();" title="下一页">下一页
|
<img src="/s.gif" title="下一页" alt="下一页" class="{!if((setCon.hasNext),'next','nextoff')}"/>
|
</apex:commandLink>
|
</span>
|
<span class="prevNext">
|
<apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!setCon.last}" oncomplete="refreshPageSizeJs();" title="尾页">
|
<img src="/s.gif" title="尾页" alt="尾页" class="{!if((setCon.hasNext),'last','lastoff')}"/>
|
</apex:commandLink>
|
</span>
|
</span>
|
</div>
|
</td>
|
<td align="right" width="20%">
|
</td>
|
</tr>
|
</table>
|
</apex:pageBlock>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
</apex:form>
|
</apex:page>
|