public with sharing class Consumable_order_AlertController {
|
public String idl {get; set;}
|
public boolean IS_Alert_Price_Apply {get; set;}
|
public ID userid {get; set;}
|
public Consumable_order_AlertController() {
|
idl = ApexPages.currentPage().getParameters().get('id');
|
|
}
|
public Consumable_order_AlertController(ApexPages.StandardController controller) {
|
idl = ApexPages.currentPage().getParameters().get('id');
|
|
}
|
public void init() {
|
list<Consumable_order__c> COList =
|
[select id, SalesManager__c,RecordTypeId, Order_type__c, Order_status__c
|
from Consumable_order__c where id =:idl];
|
if(COList!=null && COList.size() > 0){
|
IS_Alert_Price_Apply = false;
|
userid = UserInfo.getUserId();
|
if( COList[0].SalesManager__c != null
|
&& COList[0].SalesManager__c == userid
|
&& COList[0].RecordTypeId.equals(System.label.consumable_1)
|
&& COList[0].Order_type__c.equals('订单')
|
&& COList[0].Order_status__c.equals('已提交')){
|
IS_Alert_Price_Apply = true;
|
|
}
|
//IS_Alert_Price_Apply = true;
|
}
|
|
}
|
}
|