function saveJs() { 
 | 
    var x = j$(escapeVfId('allPage:allForm:allBlock:Editable:SummonsForDirction__c')).value(); 
 | 
    if (x != '互相调货') { 
 | 
        var agencytext = j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).value(); 
 | 
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerTextHidden')).val(agencytext); 
 | 
    } 
 | 
    blockme(); 
 | 
    save(); 
 | 
} 
 | 
  
 | 
function SortLimitedJs(key) { 
 | 
    blockme(); 
 | 
    SortLimited(key); 
 | 
} 
 | 
  
 | 
  
 | 
//库存排序 
 | 
function SortStoreJs(key){ 
 | 
    blockme(); 
 | 
    SortStore(key); 
 | 
} 
 | 
  
 | 
function searchProductJs() { 
 | 
    blockme(); 
 | 
    searchConsumableorderdetails(); 
 | 
} 
 | 
function setDisabled() { 
 | 
    var productCount = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:consumableorderdetailsCount')).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 checkAll() { 
 | 
    var productCount = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:consumableorderdetailsCount')).value(); 
 | 
    if (j$(escapeVfId('checker')).attr('checked') == 'checked') { 
 | 
        for (var i = 0; i < productCount; i++) { 
 | 
            j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableinfo' + ':consumablesCountproRowCheckbox')).attr('checked',true); 
 | 
        } 
 | 
    } else { 
 | 
        for (var i = 0; i < productCount; i++) { 
 | 
            j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableinfo' + ':consumablesCountproRowCheckbox')).attr('checked',false); 
 | 
        } 
 | 
    } 
 | 
} 
 | 
  
 | 
  
 | 
//2016-03-07 页面金额测试用:Js验证 
 | 
//追加总金额计算 
 | 
//要求多向联动 
 | 
function SumCompute(){ 
 | 
    var SumPrice = 0; 
 | 
    var consumablesCounttestPriceJList = j$("span[Id$='variableAllprice:consumablesCounttestPrice']").value(); 
 | 
    //判断是否为数组 为数组时去掉空值计算 
 | 
    if (consumablesCounttestPriceJList.constructor == Array) { 
 | 
        for (var i = 0; i < consumablesCounttestPriceJList.length; i++) { 
 | 
            var outer = consumablesCounttestPriceJList[i]; 
 | 
            if (isNaN(parseFloat(consumablesCounttestPriceJList[i]))) { 
 | 
                consumablesCounttestPriceJList.splice(i,1); 
 | 
                i= i-1; 
 | 
            } 
 | 
        } 
 | 
        var str=consumablesCounttestPriceJList.join("+"); 
 | 
        var SumPrice =eval(str); 
 | 
    }else{ 
 | 
        var SumPrice = consumablesCounttestPriceJList; 
 | 
    } 
 | 
    SumPrice = parseFloat(SumPrice).toFixed(2); 
 | 
    SumPrice = number_format_common (SumPrice,2,'.',','); 
 | 
    document.getElementById("allPage:allForm:allBlock:Editable:sumPrice_buttom").innerHTML = SumPrice;  
 | 
} 
 | 
function ComputePrice(j) { // FIXME lineNo にしてください 
 | 
    var z,x,c; 
 | 
    var a = j.id; 
 | 
    var i=a.substring(0,a.lastIndexOf(':')); 
 | 
    var a=document.getElementById (i+"Allprice:consumablesCounttestPrice"); 
 | 
    z  =  parseFloat(j$(escapeVfId(i+':consumablesCount')).value()); 
 | 
    //z= z.replace(/,/g,'');; 
 | 
    if(isNaN(z)){z=0.00;} 
 | 
    if(z!=null&&z!=0&&z!=''){ 
 | 
        j$(escapeVfId(i+'info:consumablesCountproRowCheckbox')).attr('checked',true); 
 | 
    }else{ 
 | 
        j$(escapeVfId(i+'info:consumablesCountproRowCheckbox')).attr('checked',false); 
 | 
    } 
 | 
    x = j$(escapeVfId(i+'Moneyinfo:productOrderMoneyinfo')).value().replace(/,/g,''); 
 | 
    c = parseFloat(z * x).toFixed(2); 
 | 
    //c = number_format_common (c,2,'.',','); 
 | 
    a.innerHTML = c; 
 | 
    SumCompute(); 
 | 
} 
 | 
  
 | 
function calonLoad() { 
 | 
} 
 | 
  
 | 
function EditConsumable(){ 
 | 
    //解除不可写状态 
 | 
    setEditAble(); 
 | 
    //alert("statusEdit"+'{!statusEdit}'); 
 | 
} 
 | 
function DeleteConsumable(){ 
 | 
    //删除这一单 
 | 
    if(window.confirm('删除是不可恢复的,你确认要删除吗?')){ 
 | 
        DelConsumable(); 
 | 
    } 
 | 
} 
 | 
  
 | 
function GoodsDeliveryJs(){ 
 | 
    //出货 
 | 
    blockme(); 
 | 
    GoodsDelivery(); 
 | 
} 
 | 
function ClearJs(){ 
 | 
    blockme(); 
 | 
    document.getElementById("allPage:allForm:allBlock:searchBlock:category3Search").value = ""; 
 | 
    document.getElementById("allPage:allForm:allBlock:searchBlock:category4Search").value = ""; 
 | 
    document.getElementById("allPage:allForm:allBlock:searchBlock:category5Search").value = ""; 
 | 
    document.getElementById("allPage:allForm:allBlock:searchBlock:OrderDateSearch").value = ""; 
 | 
    searchConsumableorderdetails(); 
 | 
} 
 | 
  
 | 
window.sfdcPage.appendToOnloadQueue(function() { calonLoad() }); 
 |