<apex:page Controller="InventoryViewController" showHeader="true" tabStyle="InventoryView__tab" 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)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
|
<script>
|
function ClearJs(){
|
blockme();
|
//document.getElementById("allPage:allForm:allBlock:searchBlock:OrderCodeSearch").value = "";
|
document.getElementById("allPage:allForm:allBlock:searchBlock:OrderDateSearch").value = "";
|
document.getElementById("allPage:allForm:allBlock:searchBlock:category3Search").value = "";
|
document.getElementById("allPage:allForm:allBlock:searchBlock:category4Search").value = "";
|
document.getElementById("allPage:allForm:allBlock:searchBlock:category5Search").value = "";
|
//j$(escapeVfId("allPage:allForm:allBlock:editAble:OrderDircteion")).attr('disabled',false);
|
//j$(escapeVfId("allPage:allForm:allBlock:editAble:OrderExpectDate")).attr('disabled',false);
|
searchConsumableorderdetails();
|
}
|
function InventoryJs(){
|
window.open("/customer/Inventory");
|
}
|
// 过期库存销存
|
function OverdueStockJs(){
|
window.open("/customer/OverdueStock");
|
}
|
function RemoveBoxJs(){
|
window.open("/customer/RemoveBox");
|
}
|
function CancelRemoveBoxJs(){
|
window.open("/customer/CancelRemoveBox");
|
}
|
//function DownPageJs(){
|
// blockme();
|
//DownPage();
|
//}
|
//function UpPageJs(){
|
// blockme();
|
//UpPage();
|
//}
|
function searchProductJs() {
|
blockme();
|
searchConsumableorderdetails();
|
}
|
|
function showCate() {
|
//var productCount = j$(escapeVfId('allPage:allForm:allBlock:searchBlock:category3Search')).value();
|
categoryload();
|
}
|
|
function showAllCate() {
|
//var productCount = j$(escapeVfId('allPage:allForm:allBlock:searchBlock:category3Search')).value();
|
categoryAllload();
|
}
|
|
function refreshPageSizeJs() {
|
refreshPageSize();
|
}
|
|
//正常排序
|
function SortLimitedJs(key){
|
blockme();
|
SortLimited(key);
|
}
|
|
//库存排序
|
function SortStoreJs(key){
|
blockme();
|
SortStore(key);
|
}
|
|
//库存排序
|
//function popSortJs(key){
|
// blockme();
|
// popSort(key);
|
//}
|
|
|
function setDisabled() {
|
var productCount = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCnt')).value();
|
for (var i = 0; i < productCount; i++) {
|
var canselect = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':canSelect')).value();
|
if (canselect == 'false') {
|
j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':shelfnumber')).attr('disabled',true);
|
}
|
}
|
}
|
|
function calonLoad() {
|
}
|
window.sfdcPage.appendToOnloadQueue(function() { calonLoad() });
|
</script>
|
<style>
|
.dateFormat {
|
display: none;
|
}
|
tr.dataRow {
|
background-color:white;
|
}
|
td.dataRowCFDA {
|
background-color:red;
|
}
|
td.columuslowercolour {
|
background-color:red;
|
text-align: right;
|
}
|
td.columuscuperolour {
|
background-color: yellow;
|
text-align: right;
|
}
|
tr.dataRow:hover {
|
background-color: #e3f3ff;
|
};
|
</style>
|
<apex:form id="allForm">
|
<apex:actionFunction name="categoryAllload" action="{!categoryAllload}" rerender="searchBlock" onComplete="unblockUI();">
|
</apex:actionFunction>
|
<apex:actionFunction name="categoryload" action="{!categoryload}" rerender="searchBlock" onComplete="unblockUI();">
|
</apex:actionFunction>
|
<apex:actionFunction name="searchConsumableorderdetails" action="{!searchConsumableorderdetails}" rerender="ConsumableorderdetailsSection,ConsumableorderdetailsUnSection,searchBlock" onComplete="unblockUI();">
|
</apex:actionFunction>
|
<apex:actionFunction name="SortStore" action="{!SortStore}" rerender="allBlock" onComplete="unblockUI();">
|
<apex:param name="firstParam" assignTo="{!sortKey}" value="" />
|
</apex:actionFunction>
|
<apex:actionFunction name="SortLimited" action="{!SortLimited}" rerender="allBlock" onComplete="unblockUI();">
|
<apex:param name="firstParam" assignTo="{!sortKey}" value="" />
|
</apex:actionFunction>
|
<apex:actionFunction name="refreshPageSize" action="{!refreshPageSize}" status="fetchStatus" reRender="ConsumableorderdetailsSection,message"/>
|
<apex:outputPanel id="allPanel">
|
<apex:pageBlock id="allBlock" title="库存管理">
|
<apex:pageBlock id="newBlock">
|
<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"></td>
|
<td><apex:commandButton onclick="InventoryJs()" value="库存盘点" style="width:150px" rerender="dummy" /></td>
|
<td/>
|
<td align="right"></td>
|
<td><apex:commandButton onclick="OverdueStockJs();" value="过期库存销存" style="width:150px" rerender="dummy" /></td>
|
<td/>
|
<td align="right"></td>
|
<td><apex:commandButton onclick="RemoveBoxJs();" value="拆盒" style="width:150px" rerender="dummy" /></td>
|
<td/>
|
<td align="right"></td>
|
<td><apex:commandButton onclick="CancelRemoveBoxJs();" value="取消拆盒" style="width:150px" rerender="dummy" /></td>
|
<td/>
|
</tr>
|
</table>
|
</apex:pageBlock>
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
|
<apex:pageBlock id="searchBlock" >
|
<table>
|
<colgroup>
|
<col width="10px"/>
|
<col width="10px"/>
|
<col width="60px"/>
|
<col width="220px"/>
|
<col width="60px"/>
|
<col width="60px"/>
|
<col width="180px"/>
|
<col width="60px"/>
|
<col width="60px"/>
|
<col width="180px"/>
|
<col width="60px"/>
|
<col width="60px"/>
|
<col width="180px"/>
|
<col width="60px"/>
|
<col width="80px"/>
|
<col width="80px"/>
|
<col width="80px"/>
|
<col width="35px"/>
|
<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"></td>
|
<td></td>
|
<td/>
|
<td align="right">消耗品名称</td>
|
<td><apex:inputText id="OrderDateSearch" value="{!category1}" style="width:100px"/></td>
|
<td/>
|
<td align="right">第3分类</td>
|
<td>
|
<apex:selectList id="category3Search" value="{!category3}" style="width:100px" size="1" onchange="showAllCate();">
|
<apex:selectOptions value="{!categoryOptionList}"/>
|
</apex:selectList>
|
</td>
|
<td/>
|
<td align="right">第4分类</td>
|
<td>
|
<apex:selectList id="category4Search" value="{!category4}" style="width:100px" size="1" onchange="showCate();">
|
<apex:selectOptions value="{!category4OptionList}"/>
|
</apex:selectList>
|
</td>
|
<td/>
|
<td align="right">第5分类</td>
|
<td>
|
<apex:selectList id="category5Search" value="{!category5}" style="width:100px" size="1">
|
<apex:selectOptions value="{!category5OptionList}"/>
|
</apex:selectList>
|
</td>
|
<td/>
|
|
<td align="right"></td>
|
<td><apex:commandButton value="消耗品搜索" style="width: 100px;" onclick="searchProductJs();return false;" /></td>
|
<td><input type="button" value="清空" style="width: 100px;" onclick="ClearJs();" class="btn"/></td>
|
<td/>
|
</tr>
|
<tr>
|
<td></td>
|
</tr>
|
</table>
|
</apex:pageBlock>
|
|
|
<apex:pageBlock title="库存详情" id="ConsumableorderdetailsSection">
|
<table class="list" border="0" cellpadding="0" cellspacing="0">
|
<tr class="headerRow">
|
<th><a href="#" onclick="SortLimitedJs('0');return false;" style="text-decoration: underline;">消耗品名称</a>{!sortOrder[0]}</th>
|
<th><a href="#" onclick="SortLimitedJs('3');return false;" style="text-decoration: underline;">第3分类</a>{!sortOrder[3]}</th>
|
<th><a href="#" onclick="SortLimitedJs('4');return false;" style="text-decoration: underline;">第4分类</a>{!sortOrder[4]}</th>
|
<th><a href="#" onclick="SortLimitedJs('5');return false;" style="text-decoration: underline;">第5分类</a>{!sortOrder[5]}</th>
|
<th>规格</th>
|
<th>单位</th>
|
<th>注册证编码号</th>
|
<th>注册证效期</th>
|
<th>CFDA状态</th>
|
<!-- <th><a href="#" onclick="SortLimitedJs('1');return false;" style="text-decoration: underline;">产品型号</a>{!sortOrder[1]}</th>-->
|
<!-- <th>产品数量下限</th> -->
|
<!-- <th>产品数量上限</th>-->
|
<th>使用期限</th>
|
|
<!-- <th>{!$ObjectType.Product2__c.fields.SFDA_Status__c.label}</th> -->
|
<th><a href="#" onclick="SortStoreJs('6');return false;" style="text-decoration: underline;">有效期内库存</a>{!sortOrder[6]}</th>
|
<th>过期库存</th>
|
<!-- <th><a href="#" onclick="popSortJs('2');return false;" style="text-decoration: underline;">库存</a>{!sortOrder[2]}</th>-->
|
<!-- //add by rentx 2020-12-09 -->
|
<apex:detail rendered="{!hasHos}">
|
<th>医院特价</th>
|
</apex:detail>
|
<!-- //add by rentx 2020-12-09 -->
|
|
</tr>
|
<apex:repeat value="{!pageRecords}" var="m" id="theRepeat">
|
<tr class="dataRow">
|
<td Class="dataCell">{!m.Prod.Name__c}</td>
|
<td class="dataCell">{!m.Prod.Category3__c}</td>
|
<td class="dataCell">{!m.Prod.Category4__c}</td>
|
<td class="dataCell">{!m.Prod.Category5__c}</td>
|
<td class="dataCell" style="text-align: center;">{!m.packing_list}</td>
|
<td class="dataCell">{!m.BoxPiece}</td>
|
<td class="dataCell">{!m.approbation_No}</td>
|
<td class="dataCell">
|
<apex:outputText value="{0, date, yyyy/MM/dd}">
|
<apex:param value="{!m.expiration_Date}" />
|
</apex:outputText>
|
</td>
|
<td class="dataCell">{!m.Prod.SFDA_Status__c}</td>
|
<!-- <td class="dataCell">{!m.Prod.Asset_Model_No__c}</td>-->
|
<!-- <td class="dataCell" style="text-align: right;">{!m.lowerlimit}</td> -->
|
<!-- <td class="dataCell" style="text-align: right;">{!m.upperlimit}</td>-->
|
<td class="dataCell">
|
<apex:outputText value="{0, date, yyyy/MM/dd}">
|
<apex:param value="{!m.guaranteeperiod}" />
|
</apex:outputText></td>
|
|
<!-- <td class="dataCell">{!m.Prod.SFDA_Status__c}</td> -->
|
<td Class="{!IF(m.upperlimit != null && m.upperlimit != null && m.BoxPiece=='盒',IF(m.limitCount > m.upperlimit,'columuscuperolour', IF(m.limitCount < m.lowerlimit,'columuslowercolour', 'dataCell')), '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.allnumber}</td> -->
|
<!-- add by rentx 2020-11-26 start -->
|
<td class="dataCell" >
|
<apex:detail rendered="{!m.hospitalSpecialOffer}">
|
√
|
</apex:detail>
|
<!-- <apex:detail rendered="{!!m.hospitalSpecialOffer}">
|
×
|
</apex:detail> -->
|
</td>
|
<!-- add by rentx 2020-11-26 end -->
|
</tr>
|
</apex:repeat>
|
</table>
|
<table style="width: 100%">
|
<tr>
|
<td>
|
<!-- Page X of Y -->
|
<!-- PageNumber:当前页面所在位置,ResultSize:记录总条数,PageSize:每页记录条数 -->
|
<apex:outputText value="{!(currentpage * pagesize)+1-pagesize}-{!IF((currentpage * pagesize)>totalcount, totalcount,
|
(currentpage * pagesize))} 共 {!totalcount} 个" />
|
</td>
|
<td align="center">
|
<div class="paginator line1">
|
<span class="prevNextLinks">
|
<span class="prevNext">
|
<apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!moveToFirst}" oncomplete="refreshPageSizeJs();" title="首页" >
|
<img src="/s.gif" title="首页" alt="首页" class="{!if((hasPrevious),'first','firstoff')}"/>
|
</apex:commandLink>
|
</span>
|
<span class="prevNext">
|
<apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!moveToPrevious}" oncomplete="refreshPageSizeJs();" title="上一页">
|
<img src="/s.gif" title="上一页" alt="上一页" class="{!if((hasPrevious),'prev','prevoff')}"/>上一页
|
</apex:commandLink>
|
</span>
|
<span class="prevNext">
|
<apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!moveToNext}" oncomplete="refreshPageSizeJs();" title="下一页">下一页
|
<img src="/s.gif" title="下一页" alt="下一页" class="{!if((hasNext),'next','nextoff')}"/>
|
</apex:commandLink>
|
</span>
|
<span class="prevNext">
|
<apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!moveToLast}" oncomplete="refreshPageSizeJs();" title="尾页">
|
<img src="/s.gif" title="尾页" alt="尾页" class="{!if((hasNext),'last','lastoff')}"/>
|
</apex:commandLink>
|
</span>
|
</span>
|
</div>
|
</td>
|
<td align="right" width="20%">
|
<!-- Records per page -->
|
<!--
|
每页记录数:
|
<apex:selectList value="{!size}" multiselect="false" size="1" onchange="refreshPageSize();">
|
<apex:selectOptions value="{!paginationSizeOptions}"/>
|
</apex:selectList> -->
|
</td>
|
</tr>
|
</table>
|
</apex:pageBlock>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
|
</apex:form>
|
<script>
|
|
</script>
|
</apex:page>
|