涂煌豪
2022-04-24 e38a0e2aa1542aa51a3eaaca977542ad39eac482
force-app/main/default/pages/SelectAssetEstimateVM.page
@@ -57,7 +57,17 @@
            return false;  
        }
    }
        return true;
    // 先款后修-提交报价时如果是先款对象进行提示 thh 20220408 start
    var FirstParagraphEnd = j$(escapeVfId('allPage:allForm:allBlock:contract:FirstParagraphEnd'))[0].checked;
    if(FirstParagraphEnd){
        if (confirm('本次签约经销商是先款对象,请确认是否提交报价?')) {
         return true;
        }else{
            return false;
        }
    }
    // 先款后修-提交报价时如果是先款对象进行提示 thh 20220408 end
    return true;
}
//add by gwy 2021-01-27 end 提交时的提示框
@@ -346,6 +356,10 @@
    var newCon = true;
    var contractStartDate = new Date(j$(escapeVfId('allPage:allForm:contractstartdate')).value());
    //多年保续签合同数量 thh 20220316 start
    var GuranteeCount = 0;
    //多年保续签合同数量 thh 20220316 end
    // 预定开始日
    var startdate = new Date(j$(escapeVfId('allPage:allForm:allBlock:contract:startdate')).value());
@@ -422,6 +436,10 @@
                    var lastContRange = 0;
                    if(LastMContractRecord == 'VM_Contract'){
                        newCount++;
                        //多年保续签合同数量,多年保续签到服务合同时视为首签设备 thh 20220316 start
                        GuranteeCount++;
                        newCon = false;
                        //多年保续签合同数量,多年保续签到服务合同时视为首签设备 thh 20220316 end
                        lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':endDateGurantee_Text')).value());
                        lastContRange = 36;
                    }else{
@@ -526,6 +544,10 @@
                var lastContRange = 0;
                if(LastMContractRecord == 'VM_Contract'){
                    newCount++;
                    //多年保续签合同数量,多年保续签到服务合同时视为首签设备 thh 20220316 start
                    GuranteeCount++;
                    newCon = false;
                    //多年保续签合同数量,多年保续签到服务合同时视为首签设备 thh 20220316 end
                    lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':endDateGurantee_Text')).value());
                    lastContRange = 36;
                }else{
@@ -615,8 +637,11 @@
    var result = '';
    if (allcount == 0) {
        result = null;
    }else
    if (newCount > 0 && newCount == allcount && newCon == true) {
    //如果所有设备的上期合同都是多年保合同,则合同种类为市场多年保续签合同 thh 20220315 start
    }else if(GuranteeCount > 0 && GuranteeCount == allcount){
        result = '市场多年保续签合同';
    //如果所有设备的上期合同都是多年保合同,则合同种类为市场多年保续签合同 thh 20220315 end
    }else if (newCount > 0 && newCount == allcount && newCon == true) {
        result = '新品合同';
    }else if (((newCount > 0 && newCount == allcount) ||(newCount + firstCCount == allcount)) && newCon == false) {
        result = '首签合同';