111
沙世明
2022-11-22 928399eceec50e3d37ea08669a12789a9410a9d2
force-app/main/default/staticresources/NewQuoteIraiJS.js
@@ -103,6 +103,7 @@
    quoteTotalPrice.call();
    setOCMAmount.call();
    checkProductStatusValidPeriod();
    // checkQuoteIrai_Status(true);
}
function number_format() {
    for(var i=0; i<QuoteEntryMaxLine; i++){
@@ -130,6 +131,11 @@
    j$(escapeVfId( 'ListPriceTotal')).val(ListPriceTotal);
    j$(escapeVfId( 'UnitPriceTotal')).val(unitPriceTotal);
}
// function ObsapUsersChange(){
//     var ObsapUsersId = j$(escapeVfId('Page:mainForm:block:j_id45:ObsapUsersId')).value();
//     debugger
//     j$(escapeVfId('Page:mainForm:block:IraiUser')).val(ObsapUsersId);
// }
function calPrice(i){
    var x,y,z,c,d,e;
    x = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Quantity')).value();
@@ -1027,6 +1033,7 @@
    }
}
function save2btn() {
    debugger
    checkchangedAfterPrint();
    var changedAfterPrint = j$(escapeVfId('Page:mainForm:changedAfterPrint')).value();
    if (changedAfterPrint == 'true') {
@@ -1037,9 +1044,24 @@
            unblockUI();
        }
    } else {
        var username = j$(escapeVfId("Page:mainForm:block:IraiUser")).val();
        var userid = j$(escapeVfId("Page:mainForm:block:IraiUser_lkid")).val();
        if (userid != null && userid != '000000000000000' && userid.length > 0) {
        // var username = j$(escapeVfId("Page:mainForm:block:IraiUser")).val();
        debugger
        var username1 = j$(escapeVfId("Page:mainForm:block:j_id43:IraiUser")).val();
        var userid = j$(escapeVfId("Page:mainForm:block:j_id43:IraiUser_lkid")).val();
        var username2 = j$(escapeVfId("Page:mainForm:block:j_id46:IraiUser")).val();
        if(username1!=undefined){
            username=username1;
        }else{
            username=username2
        }
        if (userid != null&&userid != '000000000000000' && userid.length > 0) {
            if (confirm(Confirm_saveBtn)) {
                Save.call();
                return true;
            } else {
                unblockUI();
            }
        } else if(username2){
            if (confirm(Confirm_saveBtn)) {
                Save.call();
                return true;
@@ -1424,4 +1446,21 @@
function excelImportGateway(str) {
    blockme();
    excelImport(str);
}
}
// function checkQuoteIrai_Status(flag) {
//     debugger
//     var QuoteIrai_Statusvalue = j$(escapeVfId('Page:mainForm:block:j_id32')).value();
//     var Statusflg=true;
//     if(flag){
//         if(QuoteIrai_Statusvalue == '草案中'){
//             Statusflg = false;
//         }
//     }
//     if(Statusflg){
//         j$(escapeVfId('Page:mainForm:block:QuoteIraiBtn')).attr('disabled',false);
//         j$(escapeVfId('Page:mainForm:block:j_id85')).attr('disabled',false);
//         j$(escapeVfId('Page:mainForm:block:j_id87')).attr('disabled',false);
//     }
//     return true;
// }