<apex:page Controller="TopPageController" showHeader="true" tabStyle="TopPage__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)}"/>
|
<script>
|
function notArrDetJs(id){
|
window.open('/customer/ConsumableNotArrDet?Id=' + id, 'setsearch','width=800,height=600,scrollbars=yes', true);
|
}
|
// 首页未到货汇总 start by vivek 2019-02-11
|
function allDetJs(id){
|
window.open('/customer/ConsumableAllDet?Id=' + id, 'setsearch','width=800,height=600,scrollbars=yes', true);
|
}
|
function allArrDetJs(){
|
window.open('/customer/ConsumableAllArrDet', 'setsearch','width=800,height=600,scrollbars=yes', true);
|
}
|
function allNotArrDetJs(){
|
window.open('/customer/ConsumableAllNotArrDet', 'setsearch','width=800,height=600,scrollbars=yes', true);
|
}
|
function allOtherDetJs(){
|
window.open('/customer/ConsumableAllOtherDet', 'setsearch','width=800,height=600,scrollbars=yes', true);
|
}
|
|
// 首页未到货汇总 end by vivek 2019-02-11
|
// update start by vivek2019-7-12
|
//20200916 ljh update start
|
/*function arrDetJs(id){
|
window.open('/customer/ConsumableAllDet?Id=' + id, 'setsearch','width=800,height=600,scrollbars=yes', true);
|
}*/
|
function arrDetJs(id){
|
window.open('/customer/ConsumableArrDet?Id=' + id, 'setsearch','width=800,height=600,scrollbars=yes', true);
|
}
|
//20200916 ljh update end
|
// update end by vivek2019-7-12
|
|
// update start by vivek2019-8-14
|
function otherArrDetJs(id){
|
window.open('/customer/ConsumableOtherArrDet?Id=' + id, 'setsearch','width=800,height=600,scrollbars=yes', true);
|
}
|
// update end by vivek2019-8-14
|
|
function Morethan7days(id){
|
window.open('/customer/Morethan7days?Id=' + id, 'setsearch','width=800,height=600,scrollbars=yes', true);
|
}
|
function Morethan7Alldays(){
|
window.open('/customer/Morethan7daysAll', 'setsearch','width=800,height=600,scrollbars=yes', true);
|
}
|
function productLimitTableJs(){
|
var a=document.getElementById ("result_div");
|
var csv_data = productlist('{!product_Limit}');
|
var table = '<table border="0" cellpadding="0" cellspacing="0" class="list" Id = "tab1"><tr class="headerRow"><th>产品型号</th><th>库存下限</th><th>库存上限</th></tr>';
|
for (var i = 0; i < csv_data.length; i++) {
|
table = table + '<tr class="dataRow">';
|
var row = csv_data[i];
|
for (var j = 0; j < row.length; j++) {
|
// if (j == 0) {
|
table = table + '<td class="dataCell" style="text-align: center" id = "input' + j +'">';
|
// }else{
|
// table = table + '<td style="text-align: right;>';
|
// }
|
var colu = row[j];
|
table = table + colu + '</td>';
|
}
|
table = table + '</tr>';
|
}
|
var table = table + '</table>';
|
a.innerHTML = table;
|
}
|
|
function productlist(text_data) {
|
var records = new Array();
|
var record = new Array();
|
var column = new Array();
|
|
var quot_flg = false;
|
|
for (i = 0; i < text_data.length; i++) {
|
var ch = text_data.charAt(i);
|
if (ch == ',') {
|
if (quot_flg) {
|
column.push(',');
|
} else {
|
record.push(column.join(''));
|
column = new Array();
|
records.push(record);
|
record = new Array();
|
}
|
} else if (ch == '|') {
|
if (quot_flg) {
|
column.push('|');
|
} else {
|
record.push(column.join(''));
|
column = new Array();
|
}
|
} else if (ch == '"') {
|
if (quot_flg) {
|
if ((i + 1) < text_data.length && text_data.charAt((i + 1)) == '"') {
|
i++;
|
column.push('"');
|
} else {
|
quot_flg = false;
|
}
|
} else {
|
quot_flg = true;
|
}
|
} else {
|
column.push(ch);
|
}
|
}
|
|
if (record.length != 0) {
|
record.push(column.join(''));
|
records.push(record);
|
}
|
|
return records;
|
}
|
|
function refreshPageSizeJs() {
|
refreshPageSize();
|
}
|
|
//正常排序
|
function SortLimitedJs(key){
|
blockme();
|
SortLimited(key);
|
|
}
|
|
function EditProductLimitJs(){
|
//--------UpdateStart-----XHL--------------20180929-------------
|
window.open("/customer/ProductLimitEdit?accountid="+'{!URLENCODE(accountid)}'+'&userPro_Type=' + '{!URLENCODE(userPro_Type)}' );
|
//--------UpdateEnd-----XHL--------------20180929-------------
|
}
|
|
function ProfilterJs(){
|
//--------UpdateStart-----XHL--------------20180929-------------
|
window.open("/customer/ConsumableProfilter");
|
//--------UpdateEnd-----XHL--------------20180929-------------
|
}
|
|
window.sfdcPage.appendToOnloadQueue(function() { productLimitTableJs() });
|
</script>
|
<style>
|
tr.dataRow {
|
background-color:white;
|
}
|
td.dataRowCFDA {
|
background-color:red;
|
}
|
td.columus {
|
background-color:white;
|
text-align: right;
|
}
|
td.columuslowercolour {
|
background-color:red;
|
text-align: right;
|
}
|
td.columuscuperolour {
|
background-color: yellow;
|
text-align: right;
|
}
|
tr.dataRow:hover {
|
background-color: #e3f3ff;
|
}
|
td#input1{
|
text-align: right;
|
}
|
td#input2{
|
text-align: right;
|
}
|
</style>
|
<apex:form id="allForm">
|
<apex:actionFunction name="SortLimited" action="{!SortLimited}" rerender="ConsumableorderdetailsSection, message" 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="searchdetails" title="未全部发货订单明细" rendered="{!over_view}">
|
<table class="list" border="1" style="border-collapse:collapse;table-layout:fixed;border: 1px solid #e0e3e5;border-spacing:0;width:100%">
|
<tr style="background-color:#DCDCDC;text-align: center;" class="headerRow">
|
<apex:repeat value="{!title}" var="t">
|
<td><apex:outputText value="{!t}"/></td>
|
</apex:repeat>
|
</tr>
|
<apex:repeat id="dataline" value="{!raesList}" var="raesInfo">
|
<tr>
|
<apex:repeat value="{!columns}" var="c">
|
<td style="{!IF(c[0]='Total_num__c' || c[0]='OrderNumber_arrived__c' ||
|
c[0]='Delivery_detail_count__c' || c[0]='OrderNumber_notarrive__c' || c[0]='More_than_seven_days__c','text-align: center','')}" class="dataCell">
|
<apex:outputPanel rendered="{!(c.size==1)}" layout="none">
|
<apex:outputPanel rendered="{!c[0]=='Name'}" layout="none">
|
<!-- update start by vivek2019-7-12 -->
|
<apex:outputLink value="/ArriveGoods?ESetid={!raesInfo.Id}" target="LINK_{!raesInfo.Id}"><apex:outputField value="{!raesInfo[c[0]]}"/></apex:outputLink>
|
</apex:outputPanel>
|
|
<apex:outputPanel rendered="{!c[0]=='Delivery_detail_count__c'}" layout="none">
|
<apex:outputLink onclick="notArrDetJs('{!raesInfo.Id}'); return false;"><apex:outputField value="{!raesInfo[c[0]]}"/></apex:outputLink>
|
</apex:outputPanel>
|
<!-- update start by vivek2019-7-12 -->
|
<apex:outputPanel rendered="{!c[0]=='Total_num__c'}" layout="none">
|
<apex:outputLink onclick="allDetJs('{!raesInfo.Id}'); return false;"><apex:outputField value="{!raesInfo[c[0]]}"/></apex:outputLink>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!c[0]=='OrderNumber_arrived__c'}" layout="none">
|
<apex:outputLink onclick="arrDetJs('{!raesInfo.Id}'); return false;"><apex:outputField value="{!raesInfo[c[0]]}"/></apex:outputLink>
|
</apex:outputPanel>
|
<!-- update end by vivek2019-7-12 -->
|
<!-- update start by vivek2019-7-12 -->
|
<!-- <apex:outputPanel rendered="{!(c[0]<>'Name' && c[0]<>'Delivery_detail_count__c')}" layout="none"> -->
|
<apex:outputPanel rendered="{!c[0]=='OrderNumber_notarrive__c' && raesInfo[c[0]] > 0 }" layout="none">
|
<apex:outputLink onclick="otherArrDetJs('{!raesInfo.Id}'); return false;"><apex:outputField value="{!raesInfo[c[0]]}"/></apex:outputLink>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!c[0]=='OrderNumber_notarrive__c' && raesInfo[c[0]] <= 0 }" layout="none">
|
<apex:outputField value="{!raesInfo[c[0]]}"/>
|
</apex:outputPanel>
|
|
<apex:outputPanel rendered="{!c[0]=='More_than_seven_days__c' && raesInfo[c[0]] > 0 }" layout="none">
|
<apex:outputLink onclick="Morethan7days('{!raesInfo.Id}'); return false;"><apex:outputField value="{!raesInfo[c[0]]}"/></apex:outputLink>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!c[0]=='More_than_seven_days__c' && raesInfo[c[0]] <= 0 }" layout="none">
|
<apex:outputField value="{!raesInfo[c[0]]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c[0]<>'Name' && c[0]<>'Delivery_detail_count__c' && c[0]<>'OrderNumber_arrived__c' && c[0]<>'OrderNumber_notarrive__c' && c[0]<>'Total_num__c' && c[0]<>'More_than_seven_days__c') }" layout="none">
|
<!-- <apex:outputLink onclick="otherArrDetJs('{!raesInfo.Id}'); return false;"> -->
|
<apex:outputField value="{!raesInfo[c[0]]}"/>
|
<!-- </apex:outputLink> -->
|
<!-- update end by vivek2019-7-12 -->
|
</apex:outputPanel>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==2)}" layout="none">
|
<apex:outputField value="{!raesInfo[c[0]][0][c[1]]}"/>
|
</apex:outputPanel>
|
</td>
|
</apex:repeat>
|
</tr>
|
</apex:repeat>
|
<!-- update end by vivek2020-01-15 -->
|
<tr>
|
<td style="text-align: center;" class="dataCell"><apex:outputText value="待操作入库订单汇总"/></td>
|
<td style="text-align: center;" class="dataCell"></td>
|
<td style="text-align: center;" class="dataCell">
|
<apex:outputPanel rendered="{!Total_num>0 }" layout="none">
|
<apex:outputLink onclick="allDetJs('1'); return false;">
|
<apex:outputText value="{!Total_num}"/>
|
</apex:outputLink>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!Total_num<=0 }" layout="none">
|
<apex:outputText value="{!Total_num}"/>
|
</apex:outputPanel>
|
</td>
|
<td style="text-align: center;" class="dataCell">
|
<apex:outputPanel rendered="{!OrderNumber_arrived>0 }" layout="none">
|
<apex:outputLink onclick="allArrDetJs(); return false;">
|
<apex:outputText value="{!OrderNumber_arrived}"/>
|
</apex:outputLink>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!OrderNumber_arrived<=0 }" layout="none">
|
<apex:outputText value="{!OrderNumber_arrived}"/>
|
</apex:outputPanel>
|
</td>
|
<td style="text-align: center;" class="dataCell">
|
<apex:outputPanel rendered="{!Delivery_detail_count>0 }" layout="none">
|
<apex:outputLink onclick="allNotArrDetJs(); return false;">
|
<apex:outputText value="{!Delivery_detail_count}"/>
|
</apex:outputLink>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!Delivery_detail_count<=0 }" layout="none">
|
<apex:outputText value="{!Delivery_detail_count}"/>
|
</apex:outputPanel>
|
|
</td>
|
<td style="text-align: center;" class="dataCell">
|
<apex:outputPanel rendered="{!OrderNumber_notarrive>0 }" layout="none">
|
<apex:outputLink onclick="allOtherDetJs(); return false;">
|
<apex:outputText value="{!OrderNumber_notarrive}"/>
|
</apex:outputLink>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!OrderNumber_notarrive <= 0 }" layout="none">
|
<apex:outputText value="{!OrderNumber_notarrive}"/>
|
</apex:outputPanel>
|
</td>
|
|
<td style="text-align: center;" class="dataCell">
|
<apex:outputPanel rendered="{!More_than_seven_days>0 }" layout="none">
|
<apex:outputLink onclick="Morethan7Alldays(); return false;">
|
<apex:outputText value="{!More_than_seven_days}"/>
|
</apex:outputLink>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!More_than_seven_days<=0 }" layout="none">
|
<apex:outputText value="{!More_than_seven_days}"/>
|
</apex:outputPanel>
|
</td>
|
|
<td style="text-align: center;" class="dataCell"><apex:outputText value=""/></td>
|
</tr>
|
<!-- update end by vivek2020-01-15 -->
|
</table>
|
</apex:pageBlock>
|
<apex:pageBlock title="使用期限小于一年的产品" rendered="{!overlimit}">
|
<table class="list" border="0" style="border-collapse:collapse;table-layout:fixed;border: 1px solid #e0e3e5;border-spacing:0;width:100%" >
|
<tr class="headerRow">
|
<th>产品型号</th>
|
<th style="text-align: center;">数量</th>
|
<th>单位</th>
|
</tr>
|
<apex:repeat var="cases" value="{!overlimitdateorderdetails}" >
|
<tr>
|
<td class="dataCell" style="width: 300px;">{!cases.prodName}</td>
|
<td class="dataCell" style="text-align: center;width: 100px;">{!cases.countid}</td>
|
<td class="dataCell" style="width: 300px;">{!cases.BoxPiece}</td>
|
</tr>
|
</apex:repeat>
|
</table>
|
</apex:pageBlock>
|
<apex:pageBlock title="经销商信息">
|
<apex:pageblocksection columns="2" title="经销商详细信息">
|
<apex:outputField value="{!accountInfo.Management_Code__c}"/>
|
<apex:outputField value="{!accountInfo.Name}"/>
|
<apex:outputField value="{!accountInfo.Ban_On_Use_Date__c}"/>
|
<apex:outputField value="{!accountInfo.Ban_On_Use_Reason__c}"/>
|
<!-- CHAN-BJZBED 系统中保障金额始终未0,没变过 20191220 by vivek start -->
|
<!-- <apex:outputField value="{!accountInfo.Deposit_Price__c}"/> -->
|
<!-- CHAN-BJZBED 系统中保障金额始终未0,没变过 20191220 by vivek start -->
|
<apex:outputField value="{!accountInfo.Dealer_discount__c}"/>
|
<apex:outputField value="{!accountInfo.Sales_Shop_Class__c}"/>
|
<apex:outputField value="{!accountInfo.Deposit_Receipt_Finished__c}"/>
|
<apex:outputField value="{!accountInfo.Deposit_Receipt_Completion_Day__c}"/>
|
</apex:pageblocksection>
|
<apex:pageblocksection columns="2" title="营业许可证书状况">
|
<apex:outputField value="{!accountInfo.Business_Authorization_No__c}"/>
|
<apex:outputField value="{!accountInfo.Business_Paper_Expiration_Date__c}"/>
|
<apex:outputField value="{!accountInfo.Tax_Practice_No__c}"/>
|
<apex:outputField value="{!accountInfo.Tax_Practice_Expiration_Date__c}"/>
|
<apex:outputField value="{!accountInfo.Medical_Equipment_Num__c}"/>
|
<apex:outputField value="{!accountInfo.Medical_Equipment_Expiration_Date__c}"/>
|
</apex:pageblocksection>
|
<apex:pageblocksection columns="2" title="地址信息">
|
<apex:outputField value="{!accountInfo.Postal_Code__c}"/>
|
<apex:outputField value="{!accountInfo.Phone}"/>
|
<apex:outputField value="{!accountInfo.Address_Together__c}"/>
|
<apex:outputField value="{!accountInfo.Fax}"/>
|
</apex:pageblocksection>
|
</apex:pageBlock>
|
<!--TODO GAOzw Product_Limit_Date__c 换行 -->
|
<apex:pageBlock title="经销商库存上下限">
|
<div id="result_div" class=""></div>
|
<div draggable="false" >
|
<apex:commandButton value="经销商产品上下限编辑" style="width: 200px;" onclick="EditProductLimitJs(); return false;" />
|
<apex:commandButton value="查询重复的产品" style="width: 200px;" onclick="ProfilterJs(); return false;" rendered="false" />
|
</div>
|
</apex:pageBlock>
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
|
<apex:pageBlock title="在库商品库存一览" id="ConsumableorderdetailsSection">
|
<table class="list" border="0" cellpadding="0" cellspacing="0" id="example">
|
<tr class="headerRow">
|
<th><a href="#" onclick="SortLimitedJs('0');return false;" style="text-decoration: underline;">消耗品名称</a>{!sortOrder[0]}</th>
|
<th>规格</th>
|
<!-- <th>产品型号</th>-->
|
<th>{!$ObjectType.Product2__c.fields.Category3__c.label}</th>
|
<th>{!$ObjectType.Product2__c.fields.Category4__c.label}</th>
|
<th>{!$ObjectType.Product2__c.fields.Category5__c.label}</th>
|
<!--TODO GAOzw 上限、下限显示 库存颜色 change -->
|
<th>CFDA状态</th>
|
<th>注册证编码号</th>
|
<th>注册证效期</th>
|
<th>产品数量下限</th>
|
<!-- <th>产品数量上限</th>-->
|
<th>使用期限</th>
|
<!-- <th>{!$ObjectType.Product2__c.fields.SFDA_Status__c.label}</th> -->
|
<th>有效期内库存</th>
|
<th>过期库存</th>
|
<th>单位</th>
|
<!-- <th>库存</th>-->
|
<!-- add by rentx 2020-11-26 start -->
|
<apex:detail rendered="{!hasHos}">
|
<th>医院特价</th>
|
</apex:detail>
|
<!-- add by rentx 2020-11-26 end -->
|
</tr>
|
<apex:repeat value="{!pageRecords}" var="m" id="theRepeat">
|
<tr class="dataRow">
|
<td Class="dataCell">{!m.Prod.Name__c}</td>
|
<td class="dataCell" style="text-align: center;">{!m.packing_list}</td>
|
<!-- <td class="dataCell">{!m.Prod.Asset_Model_No__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">{!m.Prod.SFDA_Status__c}</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" style="text-align: center;">{!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" >{!m.BoxPiece}</td>
|
<!-- <td Class="{!IF(m.upperlimit != null && m.upperlimit != null,IF(m.allnumber > m.upperlimit,'columuscuperolour', IF(m.allnumber < m.lowerlimit,'columuslowercolour', 'dataCell')), 'dataCell')}" style="text-align: right;">{!m.allnumber}</td> -->
|
<!-- add by rentx 2020-11-26 start -->
|
<!-- //add by rentx 2021-3-10 -->
|
<apex:detail rendered="{!hasHos}">
|
<td class="dataCell" >
|
<apex:detail rendered="{!m.hospitalSpecialOffer}">
|
√
|
</apex:detail>
|
<!-- <apex:detail rendered="{!!m.hospitalSpecialOffer}">
|
×
|
</apex:detail> -->
|
</td>
|
</apex:detail>
|
<!-- 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%">
|
</td>
|
</tr>
|
</table>
|
</apex:pageBlock>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
</apex:form>
|
<script>
|
|
</script>
|
</apex:page>
|