<apex:page controller="SI_NewQuoteEntryController" sidebar="false" action="{!init}" id="Page">
<!-- <apex:page standardController="Quote" extensions="SI_NewQuoteEntryController" sidebar="false" action="{!init}" id="Page" > -->
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{!URLFOR($Resource.NewQuoteEntryJS)}"/>
    <apex:includeScript value="{!URLFOR($Resource.clipboardminjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
    <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
    <script type="text/javascript">
    //添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 start
        //dialog 弹窗 start 
        var popupBox;
            popupBox = new SimpleDialog("SpeedDialogId", false);  // 不可拖动
            popupBox.createDialog();
        //精琢技术 2021/02/08 start
        function openAddMultipleRow(){
            popupBox.setTitle("请输入需要增加的行号！");
            popupBox.importContentNode(document.getElementById("speedDiv"));
            popupBox.show(document.getElementById("speedDiv"));
            document.getElementById("speedDiv").style.display = 'block';
            
        }
        //dialog 弹窗 end 
        // 添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 end 

        var QuoteEntryMaxLine = {!QuoteEntryMaxLine};
        var trade = '{!oppInfo.Trade}';
        var displayCost = '{!displayCost}';
        var quoid = '{!quoid}';
        var Session_ID = '{!$Api.Session_ID}';
        var Price_Valid_Period = '{!$Label.Price_Valid_Period}';
        var Message_001 = '{!$Label.Message_001}';
        var Message_Please_Save_Quote = '{!$Label.Please_Save_Quote}';
        var Message_Check_Your_Clipboard = '{!$Label.Check_Your_Clipboard}';
        var Error_Message3 = '{!$Label.Error_Message3}';
        var Error_Message11 = '{!$Label.Error_Message11}';
        var Error_Message29 = '{!$Label.Error_Message29}';
        var Error_Message33 = '{!$Label.Error_Message33}';
        var Error_Message34 = '{!$Label.Error_Message34}';
        var Error_Message35 = '{!$Label.Error_Message35}';
        var Error_Message36 = '{!$Label.Error_Message36}';
        var Error_Message40 = '{!$Label.Error_Message40}';
        var Confirm_ChangedAfterPrint = '打印后行信息有变化，是否继续操作（报价编码会变新）？';
        var Confirm_ChangedAfterBid = '该报价已成为false传票，是否继续操作（将会做出一个新的报价）？';
        var Confirm_PriceRefresh = '报价作成后{!$Label.Price_Valid_Period}天,还没有更新过价格，需要执行{!$Label.Status_Update}？';
        window.sfdcPage.appendToOnloadQueue(function() { calonLoad() });
        var openQuoteExcelImportWindow = null;
        
        function selectAll() {
            var checklist = j$("input[name='checklist']");
            var all = j$(escapeVfId("checkAll"));
            for(var i = 0; i < checklist.length; i++){
                if (all[0].checked == true) {
                    checklist[i].checked = true;
                } else {
                    checklist[i].checked = false;
                }
            }
        }
        // xudan 20140627 削除後のチェック外すロジック
        function clearAllCheck() {
            j$(escapeVfId("checkAll"))[0].checked = false;
            var checklist = j$("input[name='checklist']");
            for(var i = 0; i < checklist.length; i++){
                checklist[i].checked = false;
            }
        }
	// 报价试算
        function JumpJs() {
            // console.log(ApexPages.currentPage().getParameters().get('core.apexpages.request.devconsole'));
            // var t = '{!quoId}';
            // window.open('/apex/test02?Id=' + t);
            blockme();
            Jump.call();
            return true;
        }
        function DownloadCsvGet(){
            DownloadCsv();
        }
        function DownloadCsvJs(){
            var a =  j$(escapeVfId("Page:mainForm:oppoidforCSV")).val();
            var b = '{!oppId}';
            //window.open('/apex/SI_CsvModel?'+(a==''?'':'id='+a)+'&'+(a==''?'':'oppId='+b)+'','name','features','replace');
            window.open('/apex/SI_CsvModel?id='+encodeURI(a),'name','features','replace');
        }
        function QuoteConfirmJs() {
            // body...
            blockme();
            //SWAG-C5DBAL  【委托】 [紧急]SI询价肖寒无法修改报价单 精琢技术 2021/07/30 start 
            //获取当前登录人简档
            var profileId = '{!$User.profileId}';
            //获取自定义标签 系统管理员简档
            var adminId = '{!$Label.ProfileId_SystemAdmin}';
            //只有系统管理员可以点击
            if(profileId!=adminId){
                alert('只有系统管理员有权限确认报价！');
                unblockUI();
            }else{
                QuoteConfirm();
            }
            //SWAG-C5DBAL  【委托】 [紧急]SI询价肖寒无法修改报价单 精琢技术 2021/07/30 end
            // QuoteConfirm();
        }
        function ReloadPage() {
            // body...
            window.location.reload();
        }
        function submitOppoApplyStockJs(){
            // SI询价修改 update by vivek start 20191129
            var Save_button1 = '{!Save_button1}';
            console.log(Save_button1);
            if(Save_button1 == '111'){
                alert('1、联系SI本部做配置建议。\n2、请营业本部做配置建议反馈。\n3、请SI本部做配置文件检查。');
            }else if(Save_button1 == '211'){
                alert('1、请营业本部做配置建议反馈。\n2、请SI本部做配置文件检查。');
            }else if(Save_button1 == '221'){
                alert('1、请SI本部做配置文件检查。');
            }else if(Save_button1 == '1'){
                alert('1、请SI本部做配置文件检查。');
            }else if(Save_button1 == '112'){
                alert('1、联系SI本部做配置建议。\n2、请营业本部做配置建议反馈。');
            }else if(Save_button1 == '212'){
                alert('1、请营业本部做配置建议反馈。');
            }else{
                blockme();
                submitOppoApplyStock();
            }
            // SI询价修改 update by vivek end 20191129
            // blockme();
            // submitOppoApplyStock();
        }
        // SI业务系统流程改善和提升项目2019-10-28 by vivek start
        function IfRadioChecker2(){
            var msg = "不能删除，如果删除可能影响设备安装。\n\n请确认！";
            if(confirm(msg)==true){
                radioChecker2('del');
            }
        }
        // SI业务系统流程改善和提升项目2019-10-28 by vivek end
    </script>
    <style type="text/css">
        div#iframelike {
            color: #fff;
            height: 300px;
            overflow-y: auto;
            overflow-x: hidden;
            width: 1600px;
        }
        div#iframelikeheader {
            color: #fff;
            height: 23px;
            overflow: auto;
        }
        input {
            font-size: 10.5px;
        }
        body {
            font-size: 10.5px;
        }
        /* 添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 start */
        /* 这里不考虑浏览器的兼容性 */
        input[type="range"] {
            width: 100%;
            -webkit-appearance: none;
            height: 8px;
            border-radius: 4px;
            background: -webkit-linear-gradient(#ffa200, #ffa200) no-repeat white;
            background-size: 50% 100%; /* 因为周期默认value=0.50正好占50% */
        }
        /* -webkit-slider-thumb仅对谷歌浏览器有效 */
        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            background-color: #aaa;
            width: 8px;
            height: 20px;
            border-radius: 4px;
            cursor: pointer;
        }
        input[type="range"]::-webkit-slider-thumb:hover {
            background: #666;
        }
        /* 左侧渐变色的写法,默认滑块在最左侧所以下面white为0% */
        #speed {
            background: linear-gradient(to right, #ffa200, white 0%, white);
            background-size: 100% 100%;
        }

        /*弹窗中的input样式*/
        .diaInput{
            font-size:10.5px;
             /* 设置输入框中字体的大小 */

            height:20px; 
            /* 设置输入框的高度 */

            border-radius:4px; 
            /* 设置输入框的圆角的大小 */

            border:1px solid #c8cccf;
            /* 设置输入框边框的粗细和颜色 */

            color:#986655; 
            /* 设置输入框中文字的颜色 */

            outline:0; 
            /* 将输入框点击的时候出现的边框去掉 */

            text-align:left; 
            /* 设置输入框中文字的位置 */

            padding-left: 10px;

            display:block; 
            /* 将输入框设置为块级元素 */

            cursor: pointer;

             box-shadow: 2px 2px 5px 1px #ccc;
        }
        .diaInput::-webkit-input-placeholder{
             color: #986655;
             font-size: 12px;
         }
         /*弹窗中的p标签样式*/
        .diap{
            font-family: "宋体",sans-serif;
            color: red;
            opacity: 0.5;
        }
        /* 添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 end */
    </style>

    <apex:form id="mainForm">
        <apex:outputText id="hiddenQuoid" value="{!quoid}" style="display:none;"/>
        <apex:inputHidden id="oppoidforCSV" value="{!oppoidforCSV}"/>
        <apex:inputHidden id="changedAfterPrint" value="{!changedAfterPrint}"/>
        <apex:inputHidden id="changedAfterBid" value="{!changedAfterBid}"/>
        <apex:inputHidden id="productStatusUpdated" value="{!productStatusUpdated}"/>
        <!-- 20211011 lt add MarkRed();-->
        <apex:actionFunction action="{!setProductEntry}" name="setProductEntry" reRender="mainForm" oncomplete="unblockUI();calPriceAll();MarkRed();">
            <apex:param assignTo="{!setProduct_text}" name="setProduct_text" value=""/>
        </apex:actionFunction>
        <!-- 20211011 lt add MarkRed();-->
        <apex:actionFunction action="{!excelImport}" name="excelImport" reRender="mainForm" oncomplete="unblockUI();calPriceAll();MarkRed();">
            <apex:param assignTo="{!excel_text}" name="select_index" value=""/>
        </apex:actionFunction>
        <apex:actionFunction action="{!addRow}" name="addRow" reRender="mainForm" oncomplete="unblockUI();calPriceAll();">
            <apex:param assignTo="{!rowIdx}" name="rowIdx" value=""/>
        </apex:actionFunction>
        <!-- 添加行 -->
        <apex:actionFunction action="{!addMultipleRow}" name="addMultipleRow" reRender="mainForm" oncomplete="unblockUI();calPriceAll();">
        <apex:param assignTo="{!rowIdx}" name="rowIdx" value=""/>
        </apex:actionFunction>
        <apex:actionFunction action="{!DownloadCsv}" name="DownloadCsv" reRender="oppoidforCSV" oncomplete="DownloadCsvJs();"/>
        <apex:actionFunction action="{!submitOppoApplyStock}" name="submitOppoApplyStock" reRender="mainForm,message1" oncomplete="unblockUI();"/>
        <apex:actionFunction action="{!QuoteConfirm}" name="QuoteConfirm" reRender="mainForm" oncomplete="unblockUI();ReloadPage();"/>
        <apex:actionFunction action="{!getSalesId1}" name="getSalesId1" reRender="mainForm"/>
        <apex:actionFunction action="{!getSalesId2}" name="getSalesId2" reRender="mainForm"/>
          <!--    2018/09/28 CHAN-B4YAB8 经销商单价计算 start -->
        <apex:actionFunction action="{!PriceStatusUpdate}" name="PriceStatusUpdate" reRender="listsTable" oncomplete="unblockUI();calPriceAll();alert('更新完毕！');quoteAgencyTotalPriceAction();"/>
            <!--    2018/09/28 CHAN-B4YAB8 经销商单价计算 end -->
        <!-- CHAN-B8RCU9 start -->
        <apex:actionFunction action="{!QuoteDecision}" name="QuoteDecision" reRender="mainForm" oncomplete="unblockUI();alertUpdatewhenDecide();"/>
        <!-- CHAN-B8RCU9 start -->

        <!-- 停止预警  20210930  lt  add  MarkRed(); -->
        <apex:actionFunction action="{!Save}" name="Save" reRender="mainForm,message1" oncomplete="unblockUI();MarkRed();"/>
        <!-- 报价试算 -->
        <apex:actionFunction action="{!Jump}" name="Jump" reRender="mainForm" oncomplete="unblockUI();" />
        <apex:actionFunction action="{!OppReflection}" name="OppReflection" reRender="mainForm" oncomplete="unblockUI();"/>
        <apex:actionFunction action="{!Print}" name="Print" reRender="mainForm" oncomplete="openQuotePage('{!quo.Contract__c}','{!errorflg}','{!quoid}');unblockUI();"/>
        <apex:pageBlock id="block">
            <apex:inputHidden value="{!oppInfo.Direct_Separate}" id="Direct_Separate"/>
            <apex:inputHidden value="{!oppInfo.Trade}" id="Trade"/>
            <apex:inputHidden value="{!oppId}" id="oppId"/>
            <apex:inputHidden value="{!SalesId1}" id="SalesId1"/>
            <apex:inputHidden value="{!qb.PriceRefreshPeriod}" id="hidden_PriceRefreshPeriod"/>
            <apex:inputHidden value="{!qb.Estimation_List_Price}" id="hidden_Estimation_List" rendered="{!displayFlg}"/>
            <apex:inputHidden value="{!DisCalculation}" id="DisCalculationvalue" rendered="{!displayFlg}"/>
            <apex:inputHidden value="{!DisAmount}" id="hidden_DisAmountvalue" rendered="{!displayFlg}"/>
            <apex:inputHidden value="{!Salesprofit1}" id="Salesprofit1value" rendered="{!displayFlg}"/>
            <!--    2018/09/28 CHAN-B4YAB8 经销商折扣 start -->
            <apex:inputHidden value="{!AgencyDiscount}" id="AgencyDiscountValue" rendered="{!displayFlg}"/>
            <!--    2018/09/28 CHAN-B4YAB8 经销商折扣 end -->  
            <apex:inputHidden value="{!Salesprofit2}" id="Salesprofit2value" rendered="{!displayFlg}"/>
            <apex:inputHidden value="{!qb.SalesCalculation1}" id="SalesCalculation1value" rendered="{!displayFlg}"/>
            <apex:inputHidden value="{!qb.SalesCalculation2}" id="SalesCalculation2value" rendered="{!displayFlg}"/>
            <apex:inputHidden value="{!quoStocking_Price_c}" id="hidden_Stocking_Price" rendered="{!displayFlg}"/>
            <apex:inputHidden value="{!oppInfo.Wholesale_Price}" id="hidden_Wholesale_Price" rendered="{!displayFlg}"/>
            <!-- 多年保修 start -->
            <apex:inputHidden id="hidden_MultiYearWarrantyTotalPrice" value="{!quo.MultiYearWarrantyTotalPrice__c}"/>
            <!-- 多年保修 end -->
            <apex:inputHidden value="{!enableSales}" id="SalesRoot_Flg"/>
            <apex:inputHidden value="{!oppInfo.CurrencyIsoCode}" id="CurrencyIsoCode"/>
            <apex:inputHidden value="{!baseUrl}" id="baseUrl"/>
            <apex:inputHidden value="{!WinOrDecideAlert}" id="SFDA_Flg"/>
            <!-- LHJ Start -->
            <apex:inputHidden value="{!oppInfo.Authorized_DB_No}" id="Authorized_DB_No" rendered="{!displayFlg}"/>
            <apex:inputHidden value="{!oppInfo.If_Need_Authorize}" id="If_Need_Authorize" rendered="{!displayFlg}"/>
            <!-- LHJ End -->
            <apex:outputPanel id="message1">
                <apex:messages styleClass="editListError"/>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!errorflg}" >
                <table width="100%">
                    <tr>
                        <td align="left"><div class="errorMsg">{!errorMessage}</div></td>
                    </tr>
                </table>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!errorflg}" >
                <table width="100%">
                    <tr>
                        <td align="left"><div style="font-size:22px" class="errorMsg">{!errorMessagechack}</div></td>
                    </tr>
                </table>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!Messageflg}" >
                <table width="100%">
                    <tr>
                        <td align="left">{!Message}</td>
                    </tr>
                </table>
            </apex:outputPanel>
            <div>
                <table border="0">
                    <tr>
                        <th style="text-align:right;width:90px;">{!$Label.Quoto_No}</th>
                        <td style="text-align:right;width:130px;"><apex:outputLabel value="{!quo.Quote_No__c}"/></td>
                        <th style="text-align:right;width:80px;">{!$Label.Quoto_Name}</th>
                        <td style="width:110px;"><div class="requiredInput"><div class="requiredBlock"></div><apex:inputField value="{!quo.QuoteName__c}"/></div></td>
                        <th style="text-align:right;width:100px;">{!$Label.HP_Name}</th>
                        <td style="width:180px;"><apex:outputLabel value="{!oppInfo.HP_Name}"/></td>
                        <th style="text-align:right;width:100px;">{!$Label.Department_Name}</th>
                        <td style="width:130px;"><apex:outputLabel value="{!oppInfo.Department_Name}"/></td>
                        <th style="text-align:right;width:90px;">{!$Label.Currency}</th>
                        <td style="width:80px;"><apex:outputLabel value="{!oppInfo.CurrencyIsoCode}"/></td>
                    </tr>
                    <tr>
                        <th style="text-align:right">{!IF(displayFlg,$Label.Total_ListPrice,'')}</th>
                        <td style="text-align:right;"><apex:outputText id="Estimation_List_Price" style="display:{!IF(displayFlg, '', 'none')}" value="{0, number, ###,##0.00}"><apex:param value="{!qb.Estimation_List_Price}" /></apex:outputText></td>
                        <th style="text-align:right;">{!IF(displayFlg,$Label.Total_Price,'')}</th>
                        <td><apex:inputField id="quoTotalPrice" value="{!quo.QuoteTotal_Page__c}" style="text-align:right;" rendered="{!displayFlg}" onchange="quoteTotalPriceAction()"/></td>
                        <th style="text-align:right;">{!IF(displayFlg,$Label.Contact_Price,'')}</th>

                            <!--    2018/09/28 CHAN-B4YAB8 经销商单价计算 start -->
                        <td><div class="requiredInput"><div class="requiredBlock"></div><apex:inputField id="Dealer_Final_Price" value="{!quo.Dealer_Final_Price_Page__c}" style="text-align:right;" rendered="{!displayFlg}" onChange="calFromContactPrice();setOCMAmount();quoteAgencyTotalPriceAction1('OCM直接销售');"/></div></td>
                            <!--    2018/09/28 CHAN-B4YAB8 经销商单价计算 end -->

                        <th style="text-align:right;">{!IF(displayFlg,$Label.Forecast_Amounts,'')}</th>
                        <td style="text-align:right;"><apex:outputLabel id="Wholesale_Price" value="{!oppInfo.Wholesale_Price}" style="display:{!IF(displayFlg, '', 'none')}"/></td>
                        <th style="text-align:right">{!$Label.Sales_Root}</th>
                        <td><apex:outputLabel id="Sales_Root" value="{!oppInfo.Sales_Root}"/></td>
                    </tr>
                </table>
                <table border="0">
                    <tr>
                        <!-- SWAG-C3BAVY 【委托】询价新旧code 替换 精琢技术 wql 20210607 start -->
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <td style="text-align:right;width:110px;"><apex:commandButton onclick="productCompare();return false;" value="{!$Label.Status_Update}" style="width:110px;" rerender="dummy"/></td>
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <td style="text-align:right;width:100px;"><apex:commandButton onclick="updateOtcode();" value="替换产品otcode" style="width:97px;" oncomplete="unblockUI();"/></td>
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <!-- SWAG-C3BAVY 【委托】询价新旧code 替换 精琢技术 wql 20210607 end -->
                        <td style="width:110px;"><apex:commandButton id="SetProduct" onclick="searchSetProductSI();return false;" value="{!$Label.Set_Product}" rerender="dummy"/></td>
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <td style="width:130px;"><apex:commandButton onclick="openQuoteExcelImport(event);return false;" value="{!$Label.Excel_Import}" style="width:110px;" rerender="dummy"/></td>
                        <!-- SI业务系统流程改善和提升项目2019-10-28 by vivek  start -->
                        <!-- <td style="text-align:right;width:50px;"><apex:commandButton rerender="dummy" id="Btn_RowDelete" onclick="radioChecker2('del');return false;" value="{!$Label.deleteLabel}" style="width:60px;"/></td> -->
                        <td style="text-align:right;width:50px;"><apex:commandButton rerender="dummy" id="Btn_RowDelete" onclick="IfRadioChecker2('del');return false;" value="{!$Label.deleteLabel}" style="width:60px;"/></td>
                        <!-- SI业务系统流程改善和提升项目2019-10-28 by vivek  end -->
                        <!-- 添加行 -->
                        <td width="40px;">
                            <!-- 添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 end -->
                            <apex:commandButton onclick="openAddMultipleRow(); return false;" value="增加行" rerender="{!displayFlg}"/>
                            </td>
                        <td style="width:130px;">
                            <apex:commandButton rerender="dummy" id="Btn_RowUp" onclick="radioChecker2('up');return false;" value="{!$Label.Row_Up}" style="width:60px;"/>
                            <apex:commandButton rerender="dummy" id="Btn_RowDown" onclick="radioChecker2('down');return false;" value="{!$Label.Row_Down}" style="width:60px;"/>
                        </td>
                        <th style="text-align:right;width:100px;">主机装机地点</th>
                        <td><apex:inputField value="{!quo.Installation_location__c}" /></td>
                        <th style="text-align:right;width:90px;">{!IF(AND(displayCost,displayFlg),$Label.Cost,'')}</th>
                        <td style="text-align:right;width:80px;"><apex:outputtext id="Stocking_Price" value="{0, number, ###,##0.00}" rendered="{!IF(AND(displayCost,displayFlg),true,false)}"><apex:param value="{!quoStocking_Price_c}"/></apex:outputtext></td>
                    
                    </tr>
                </table>
            </div>
             <!-- 多年保修 start -->
              <!--  原代码 start
            <table>
                <tr>
                    <td>&nbsp;</td>
                </tr>
            </table>
            -->
            <!-- 原代码 end -->
            <table>
                <tr>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <th style="text-align:right;width:30px;">&nbsp;</th>
                    <th style="text-align:right;width:50px;">合同保修期（年）:&nbsp;</th>
                    <td style="width:190px;"><apex:inputField id="AllGurantee_Period" value="{!quo.Gurantee_Period__c}" onchange="calGuranteePeriod();" style="width:50px; text-align:right;" />
                        <apex:inputHidden id="Gurantee_Period__c" value="{!quo.Gurantee_Period__c}"/>
                    </td>
                    <!-- 外贸多年保 取消nodiscount 合计 隐藏 精琢技术 wql 2021/01/28 start -->
                    <apex:variable id="contractWarranty" value="{!1}" var="abc">
                    <th style="text-align:right;width:50px;">
                        {!$ObjectType.Quote.fields.MultiYearWarrantyTotalPrice__c.label}
                    :&nbsp;</th>
                    <td style="width:470px;">
                        <apex:outputtext id="MultiYearWarrantyTotalPrice_out" value="{0, number, ###,##0.00}" 
                        style="text-align:right;width:180px;">
                            <apex:param value="{!quo.MultiYearWarrantyTotalPrice__c}"/>
                        </apex:outputtext>
                    </td>
                    <th style="text-align:right;width:50px;">
                        {!$ObjectType.Quote.fields.multiYearWarranty__c.label}
                    :&nbsp;</th>
                    <td style="width:200px;"><apex:inputField id="multiYearWarranty" value="{!quo.multiYearWarranty__c}" onchange="callFromCancelgurantee_MD();" style="text-align:right;width:30px;" /></td>
                    </apex:variable>
                    <!-- 外贸多年保 取消nodiscount 合计 隐藏 精琢技术 wql 2021/01/28 end -->
                </tr>
                <!-- 添加行 放在外面 因为内外贸不同-->
                    <!-- <th style="text-align:right;width:50px;">
                        添加行
                    :&nbsp;</th> -->
                    <!-- 添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 start -->
                    <!-- 只能输入正整数 输入其它会强制清空 -->
                    <td style="width:200px;display: none;">
                        <div class="" id="speedDiv" style="">
                        <!--  <p>周期</p>
                        <input type="range" id="dur" value="0.50" min="0" max="1.00" step="0.01" onchange="changeV()"/>
                        <p>速度</p> -->
                        <p class="diap">①滑动选择行数!</p>
                        <!-- 滑条 -->
                        <input type="range" id="speed" value="50" min="0" max="100" step="1" onchange="changeV()" style="background: linear-gradient(to right, rgb(255, 162, 0), white 50%, white);" />
                        <p class="diap">②输入选择行数!</p>
                        <!-- 输入框 -->
                        <input id="addMultipleRow" value="50" style="text-align:right;width: 30px;" rendered="{!displayFlg}" class="diaInput" onchange="changeI();" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" 
                        onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'0')}else{this.value=this.value.replace(/\D/g,'')}"/>

                        <center>
                            <apex:commandButton value="确认" onclick="addMultipleRowJS(); return false;" style="width: 20%; margin: 20px 10px 0px 10px" />
                            <apex:commandButton value="取消" onclick="popupBox.hide();" style="width: 20%; margin: 20px 10px 0px 10px" />
                        </center>
                    </div>
                    </td>
                <tr>
                    <td>&nbsp;</td>
                </tr>
            </table>
            <!-- 多年保修 end -->
            <div style="width:1260px;">
                <div style="overflow-x: auto;">
                    <!-- 外贸多年保 内外贸表格长度一致 原1635px 精琢技术 wql 2021/01/28 start -->
                    <table style="width:1935px;" border="0">
                    <!-- 外贸多年保 内外贸表格长度一致  精琢技术 wql 2021/01/28 end -->
                        <tr>
                            <th style="text-align:center;width:20px;">&nbsp;<input type="checkbox" id="checkAll" onclick="selectAll()" style="width:10px;"/></th>
                            <th style="text-align:center;width:15px;">No</th>
                            <th style="text-align:center;width:150px;">{!$Label.Asset_No}</th>
                            <th style="text-align:center;width:100px;">{!$Label.SFDA_Status}</th>
                            <th style="text-align:center;width:100px;">{!$ObjectType.product2.fields.VenderName__c.label}</th>
                           
                            <th style="text-align:center;width:85px;">{!$Label.ListPrice}</th>
                            <th style="text-align:center;width:100px;">{!$Label.Quantity}</th>
                            <th style="text-align:center;width:50px;">{!$Label.Specifications}</th>
                            <th style="text-align:center;width:100px;">医院单价</th>
                            <th style="text-align:center;width:100px;">医院小计</th>
                            <!-- 
                            <th style="text-align:center;width:50px;">{!$Label.Present}</th>
                            --Savebutton-->

                            <!--    2018/09/28 CHAN-B4YAB8 赠送、经销商价格和小计 end -->
                            <!-- 多年保修 start -->
                            <!-- 外贸多年保 取消多年保修 保修 隐藏 精琢技术 wql 2021/01/28 start -->
                            <apex:variable value="{!1}" var="abc" >
                                <th style="text-align:center;width:50px;">
                                    {!$ObjectType.QuoteLineItem.fields.multiYearWarranty__c.label}
                                </th>
                                <th style="text-align:center;width:150px;">
                                    {!$ObjectType.QuoteLineItem.fields.warrantyType__c.label}
                                </th>
                                
                            </apex:variable>
                            <!-- 外贸多年保 取消多年保修 保修 隐藏 精琢技术 wql 2021/01/28 end -->
                            <th style="text-align:center;width:50px;">
                                {!$ObjectType.QuoteLineItem.fields.GuaranteePeriod__c.label}</th>
                            <!-- 多年保修 end -->
                            <!-- 新加的 -->

                            <!-- SFDC停止预警（预计消耗到期日） lt 20210924 add start -->
                            <th style="text-align:center;width:130px;">{!$ObjectType.product2.fields.Estimated_ConsumptionDueDate__c.label}</th>
                            <!-- SFDC停止预警（预计消耗到期日） lt 20210924 add end -->

                            <th style="text-align:center;width:100px;">库存状态</th>
                            <th style="text-align:center;width:100px;">产品配套</th>
                            <th style="text-align:center;width:350px;">{!$Label.Product_Name}</th>
                            
                            <th style="text-align:center;width:100px;" hidden="hidden">{!$Label.AgencyPrice}</th>
                            <th style="text-align:center;width:100px;" hidden="hidden">{!$Label.AgencySum_Total}</th>
                            <!-- 外贸多年保 取消nodiscount隐藏 精琢技术 wql 2021/01/28 start -->
                            <apex:variable value="{!1}" var="abc" >
                                <th style="text-align:center;width:100px;" hidden="hidden">
                                    {!$ObjectType.QuoteLineItem.fields.NoDiscountTotal__c.label}
                                </th>
                            </apex:variable>
                            <!-- 外贸多年保 取消nodiscount隐藏 精琢技术 wql 2021/01/28 end -->
                            <th style="text-align:center;width:20px;"><apex:image id="plusicon" value="{!$Resource.plusicon}" onclick="addRowJs(0);"/></th>
                        </tr>
                    </table>
                    <!-- 外贸多年保 内外贸table一致 精琢技术 wql 2021/01/28 start -->
                    <div id="iframelike" style="width:1960px;">
                        <input type="hidden" id="ListPriceTotal" value="0" />
                        <input type="hidden" id="UnitPriceTotal" value="0" />
                        <apex:outputPanel id="listsTable">
                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;width:1938px;" border="">
                    <!-- 外贸多年保 内外贸table一致 精琢技术 wql 2021/01/28 end -->
                            <apex:variable value="{!1}" var="cnt" />
                            <apex:variable value="{!0}" var="CntIndex" />
                            <colgroup span="11"></colgroup>
                            <apex:repeat value="{!activities}" var="s" id="lists">
                                <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
                                    <td class="dataCell" style="width:20px;">
                                        <input type="checkbox" name="checklist" value="{!s.lineNo}" style="width:10px;"/>
                                    </td>
                                    <td class="dataCell" style="width:15px;text-align:right;">
                                        <apex:outputLabel id="indexNo" value="{!IF(s.PageObject.Id__c==null,null,s.lineNo + 1)}" style="width:10px;"/>
                                    </td>
                                    <td class="dataCell" style="text-align:center;width:150px;">
                                        <apex:inputText id="Assert" style="width:120px;" value="{!s.Asset_Model}" onclick="searchProduct('{!s.lineNo}',this.value)" />
                                    </td>
                                    <td class="dataCell" id="{!Text(cnt-1)}:td_Status__c" style="width:100px;">
                                        <apex:outputField style="width:75px;" id="Status__c" value="{!s.PageObject.SFDA_Status__c}"/>
                                        <apex:inputHidden id="SFDA" value="{!s.PageObject.SFDA_Status__c}"/>
                                        <apex:outputPanel layout="none" rendered="{!IF(ISBLANK(s.PageObject.Product_Sales_Possibility__c) || s.PageObject.Product_Sales_Possibility__c == '○', false, true)}">
                                        <script type="text/javascript">
                                        //alert(j$(escapeVfId('{!Text(cnt-1)}' + ':td_Status__c')).size());
                                        j$(escapeVfId('{!Text(cnt-1)}' + ':td_Status__c')).css({"color":"red"});
                                        </script>
                                        </apex:outputPanel>
                                        <apex:outputPanel layout="none" rendered="{!IF(s.haveno_Register == true, true, false)}">
                                        <script type="text/javascript">
                                            j$(escapeVfId('{!Text(cnt-1)}' + ':td_Status__c')).css({"color":"red"});
                                        </script>
                                    </apex:outputPanel>
                                    </td>
                                    <td class="dataCell" style="width:100px;">
                                        <apex:outputText id="VenderName" value="{!s.VenderName}" />
                                        <apex:inputHidden id="VenderName__c" value="{!s.VenderName}" />
                                        <!-- 产品主数据增加“不可取消多年保” 2020/08/28 精琢技术 wql start -->
                                        <apex:inputHidden id="CanNotCancelledGurantee__c" value="{!s.CanNotCancelledGurantee}" />
                                        <!-- 产品主数据增加“不可取消多年保” 2020/08/28 精琢技术 wql end -->
                                    </td>
                                   
                                    <td class="dataCell" style="width:85px;text-align:right;">
                                        <apex:outputText style="width:85px;display:{!IF(displayFlg, '', 'none')}" id="ListPricetext" value="{0, number, ###,##0.00}">
                                            <apex:param value="{!s.ListPrice_Page}" />
                                        </apex:outputText>
                                        <apex:inputHidden id="ListPrice" rendered="{!displayFlg}" value="{!s.ListPrice_Page}"/>
                                    </td>
                                    <td class="dataCell" style="text-align:center;width:100px;">
                                            <!--    2018/09/28 CHAN-B4YAB8 经销商单价计算 start -->
                                         <apex:inputField id="Quantity" style="width:30px;text-align:right;" value="{!s.PageObject.Quantity__c}" onChange="calPrice('{!s.lineNo}');quoteAgencyTotalPriceAction();AgencyDiscountCalculation1();"/>
                                            <!--    2018/09/28 CHAN-B4YAB8 经销商单价计算 end -->
                                    </td>

                                    <td class="dataCell" style="width:50px;text-align:center">
                                        <apex:outputText style="width:40px;text-align:center;" id="Specifications" value="{!if(s.latestInfo.Specifications=0||s.latestInfo.Specifications=null,'',s.latestInfo.Specifications)}"/>
                                    </td>

                                    <td class="dataCell" style="text-align:center;width:100px;">
                                        <apex:inputField id="UnitPrice" style="width:80px;text-align:right;" rendered="{!displayFlg}" value="{!s.PageObject.UnitPrice_Page__c}" onChange="calPrice('{!s.lineNo}')"/>
                                        <!-- &&IF(s.VenderName!='OSH',false,true) -->
                                        <script type="text/javascript">
                                        var isOSH = j$(escapeVfId('Page:mainForm:block:lists:'+{!CntIndex}+':VenderName')).value();
                                        if(isOSH != 'OSH'&&isOSH != ''){
                                             j$(escapeVfId('Page:mainForm:block:lists:'+{!CntIndex}+':UnitPrice')).attr('disabled','disabled');
                                        }
                                        </script>
                                        <apex:variable value="{!CntIndex + 1}" var="CntIndex" />
                                    </td>

                                    <td class="dataCell" style="width:100px;text-align:right;">
                                        <apex:outputText style="width:80px;display:{!IF(displayFlg, '', 'none')}" id="TotalPrice" value="{0, number, ###,##0.00}">
                                            <apex:param value="{!s.PageObject.Subtotal__c}" />
                                        </apex:outputText>
                                        <apex:inputHidden id="Subtotal__c" value="{!s.PageObject.Subtotal__c}"  rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="NameCode" value="{!s.latestInfo.ProductCode}"/>
                                        <apex:inputHidden id="Product_Name" value="{!s.latestInfo.ProductName}"/>
                                        <apex:inputHidden id="Product_SFDA" value="{!s.latestInfo.SFDA_Status}"/>
                                        <apex:inputHidden id="Product_Specifications" value="{!s.latestInfo.Specifications}"/>
                                        <apex:inputHidden id="Sales_Possibility" value="{!s.latestInfo.Sales_Possibility}"/>
                                        <apex:inputHidden id="Product_ListPrice" value="{!s.latestInfo.ListPrice}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="Product_Cost" value="{!s.latestInfo.Cost}"/>
                                        <apex:inputHidden id="Cost" value="{!s.Cost_c}"/>
                                        <apex:inputHidden id="CostSubTotal" value="{!s.Cost_Subtotal_c}"/>
                                        <apex:inputHidden id="Bsscategory" value="{!s.PageObject.BSS_Category__c}"/>
                                        <apex:inputHidden id="Product_Id" value="{!s.PageObject.Id__c}"/>
                                        <apex:inputHidden id="PricebookEntryId" value="{!s.pageObject.PricebookEntryId}"/>
                                        <apex:inputHidden id="lineNo" value="{!s.lineNo}"/>
                                    </td>

                                    <!-- CHAN-B4YAB8 2018/9/28 经销商单价和小计 start -->
                                    <!-- <td class="dataCell" style="width:15px;">
                                        <apex:inputField id="Present__c" style="width:10px;" value="{!s.PageObject.Present__c}"
                                        onChange="quoteAgencyTotalPriceAction();AgencyDiscountCalculation1();" />
                                    </td> -->

                                    <!-- CHAN-B4YAB8 2018/9/28 经销商单价和小计 end -->
                                    <!-- 多年保修 start -->
                                    <!-- 外贸多年保 取消多年保修 保修的隐藏 精琢技术 wql 2021/01/28 start rendered="{!IF(trade  == '内貿',true,false)}"-->
                                    <apex:variable value="{!1}" id="warranty" var="abc" >
                                        <td class="dataCell" style="width:50px;text-align:center;">
                                          <apex:inputField style="width:30px; text-align:center; display:{!IF(displayFlg, '', 'none')}" id="itemMultiYearWarranty" html-disabled="true" value="{!s.PageObject.multiYearWarranty__c}" />
                                        </td>
                                        <td class="dataCell" style="width:150px;text-align:center;">
                                          <apex:inputField style="width:120px; text-align:center; display:{!IF(displayFlg, '', 'none')}" id="warrantyType" html-disabled="true" value="{!s.PageObject.warrantyType__c}" />
                                        </td>

                                    </apex:variable>
                                    <!-- 外贸多年保 取消多年保修 保修的隐藏 精琢技术 wql 2021/01/28 end rendered="{!IF(trade  == '内貿',true,false)}"-->

                                    <td class="dataCell" style="width:50px;text-align:center;">
                                        <apex:outputField style="width:30px; text-align:center; display:{!IF(displayFlg, '', 'none')}" id="itemGuaranteePeriod" value="{!s.PageObject.GuaranteePeriod__c}" />
                                    </td>
                                    <!-- 多年保修 end -->

                                    <!-- SFDC停止预警（预计消耗到期日） lt 20210924 add start -->
                                    <td class="dataCell" style="width:130px;text-align: center;">
                                        <apex:outputText id="Estimated_ConsumptionDueDate" value="{!s.Estimated_ConsumptionDueDate}" />
                                        <apex:inputHidden id="Estimated_ConsumptionDueDate1" value="{!s.Estimated_ConsumptionDueDate}" />
                                    </td>   
                                    <!-- SFDC停止预警（预计消耗到期日） lt 20210924 add end -->

                                    <!-- 新加的 -->
                                    <td class="dataCell" style="width:100px;text-align:center;">
                                        <apex:outputLabel id="Storagestatustext" value="{!s.StorageStatus}"/>
                                        <apex:inputHidden id="Storagestatus" rendered="{!displayFlg}" value="{!s.StorageStatus}"/>
                                    </td>
                                    <td class="dataCell" style="width:100px;">
                                        <apex:inputHidden id="Product_Set_Name__c" value="{!s.Product_Set_Name}" />
                                        <apex:outputText id="Product_Set_Name" value="{!s.Product_Set_Name}" />
                                    </td>
                                    <td class="dataCell" id="{!Text(cnt-1)}:td_Name__c" style="width:350px;">
                                        <div id="Page:mainForm:block:lists:{!s.lineNo}:NameLink"><apex:outputLink style="width:300px;" value="{!baseUrl}/{!s.PageObject.Id__c}" id="Nametext1" target="_blank">{!s.PageObject.Name__c}</apex:outputLink></div>
                                        <apex:inputHidden id="Name__c" value="{!s.PageObject.Name__c}"/>
                                        <apex:outputPanel layout="none" rendered="{!IF(s.wrong_Register == true, true, false)}">
                                        <script type="text/javascript">
                                            j$(escapeVfId('Page:mainForm:block:lists:{!Text(cnt-1)}' + ':Nametext1')).css({"color":"red"});
                                        </script>
                                    </apex:outputPanel>
                                    </td>

                                    <!-- 报价试算 注释 -->
                                    <td class="dataCell" style="text-align:center;width:100px;" hidden="hidden">
                                        <apex:inputField id="Agency_UnitPrice" html-disabled="true" style="width:80px;text-align:right;" rendered="{!displayFlg}" value="{!s.PageObject.AgencyUnitPrice__c}" onChange="calAgencyPrice('{!s.lineNo}')"/>
                                    </td>
                                    <!-- 报价试算 注释 -->
                                    <td class="dataCell" style="width:100px;text-align:right;" hidden="hidden">
                                        <apex:outputText style="width:80px;display:{!IF(displayFlg, '', 'none')}" id="Agency_TotalPrice" value="{0, number, ###,##0.0}">
                                            <apex:param value="{!IF(s.PageObject.Id__c==null,null,s.PageObject.AgencySubtotal__c)}"/>
                                        </apex:outputText>
                                         <apex:inputHidden id="AgencySubtotal__c" value="{!s.PageObject.AgencySubtotal__c}" rendered="{!displayFlg}"/>

                                        <!-- 多年保修 start -->
                                        <apex:inputHidden id="GuaranteePeriod__c" value="{!s.PageObject.GuaranteePeriod__c}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="provistonPeriod__c" value="{!s.PageObject.provistonPeriod__c}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="If_Cancel_Guarantee__c" value="{!s.PageObject.If_Cancel_Guarantee__c}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="ServicePrice__c" value="{!s.PageObject.ServicePrice__c}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="GuranteePrice__c" value="{!s.GuranteePrice}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="Maintenance_Price_Year__c" value="{!s.Maintenance_Price_Year}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="GuranteeType" value="{!s.PageObject.GuranteeType__c}" rendered="{!displayFlg}"/>

                                        <apex:inputHidden id="ProductEntend_gurantee_period_all__c" value="{!s.PageObject.ProductEntend_gurantee_period_all__c}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="ProductGuranteePrice__c" value="{!s.ProductGuranteePrice}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="productServicePrice__c" value="{!s.PageObject.productServicePrice__c}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="latestGuranteeType"
                                        value="{!s.latestInfo.GuranteeType}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="latestMaintenance_Price_Year" value="{!s.latestInfo.Maintenance_Price_Year}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="latestIntra_Trade_Gurantee"
                                        value="{!s.latestInfo.Intra_Trade_Gurantee}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="latestProductEntend_gurantee_period_all"
                                        value="{!s.latestInfo.ProductEntend_gurantee_period_all}" rendered="{!displayFlg}"/>
                                        <apex:inputHidden id="latestProductIntra_Trade_Service"
                                        value="{!s.latestInfo.Intra_Trade_Service}" rendered="{!displayFlg}"/>
                                        <!-- 多年保修 end -->
                                    </td>
                                    <!-- 外贸多年保 取消nodiscount隐藏 精琢技术 wql 2021/01/28 start rendered="{!IF(trade  == '内貿',true,false)}"-->
                                    <!--报价试算 注释  -->
                                    <apex:variable value="{!1}" id="warranty2" var="abc" >
                                        <td class="dataCell" style="width:100px;text-align:right;" hidden="hidden">
                                            <apex:inputField style="width:80px;display:{!IF(displayFlg, '', 'none')}" html-disabled="true" id="NoDiscountTotal" value="{!s.PageObject.NoDiscountTotal__c}"/>
                                        </td>
                                    </apex:variable>
                                    <!-- 外贸多年保 取消nodiscount隐藏 精琢技术 wql 2021/01/28 end -->
                                    <td class="dataCell" style="width:15px;" >
                                        <apex:outputPanel rendered="{!s.lineNo < 149}" layout="none">
                                            <apex:image id="plusicon" value="{!$Resource.plusicon}" onclick="addRowJs({!s.lineNo + 1});"/>
                                        </apex:outputPanel>
                                    </td>
                                </tr>
                        <apex:variable value="{!cnt + 1}" var="cnt" />
                        </apex:repeat>
                        </table>  <!-- /table class="list" -->
                        </apex:outputPanel>
                    </div>
                </div>
            </div>
            <BR></BR>
            <div>
                <table border="0">
                    <tr>
                        <td>
                             <!--多年保修 增加宽度 start -->
                            <table border="0" style="background-color:#ffd6c1; width: 878px;">
                                <!--多年保修 end -->
                                <tr>
                                    <th style="width:100px;">&nbsp;</th>
                                    <th style="width:140px;text-align:center;" bgcolor="#ffd6c1">{!$Label.Calculate}</th>
                                    <!-- CHAN-B6H4MH  20181114UpdateStart-->
                                    <th style="width:120px;text-align:center;" bgcolor="#ffd6c1">{!$Label.AdjustAmount}</th>
                                    <!-- <th style="width:120px;" bgcolor="#ffd6c1">&nbsp;</th>
                                    <th style="width:120px;" bgcolor="#ffd6c1">&nbsp;</th>
                                    <th style="width:120px;text-align:center;" bgcolor="#ffd6c1">{!$Label.Calculate}</th>
                                    <th style="width:120px;text-align:center;" bgcolor="#ffd6c1">{!$Label.Amount}</th> -->
                                    <!-- CHAN-B6H4MH  20181114UpdateEnd-->
                                </tr>
                                <tr>
                                    <th style="width:100px;text-align:right">{!$Label.Quote_Adjustment}</th>
                                    <td style="width:140px;"><apex:inputText style="width:110px;text-align:right" id="QuoCalculation" rendered="{!displayFlg}" value="{!qb.Quote_Adjust_Calculate}" onchange="UnitPriceUpdate();"/></td>
                                    <td style="width:120px;"><apex:inputField style="width:110px;text-align:right" id="QuoAmount" rendered="{!displayFlg}" value="{!quo.Quote_Adjust_Amount_Page__c}" onchange="calFromQuoAmont();"/></td>
                                    <!-- CHAN-B6H4MH  20181114UpdateStart-->
                                    <!-- <th style="width:120px;" bgcolor="#ffd6c1">&nbsp;</th>
                                    <th style="width:120px;text-align:center">{!$Label.Discount_Amount}</th>
                                    <td style="width:120px;text-align:right"><apex:outputLabel style="width:110px;display:{!IF(displayFlg, '', 'none')}" id="DisCalculation" value="{!DisCalculation}"/></td>
                                    <td style="width:120px;text-align:right"><apex:outputText style="width:110px;display:{!IF(displayFlg, '', 'none')}" id="DisAmount" value="{0, number, ###,##0.00}"><apex:param value="{!DisAmount}"/></apex:outputText></td> -->
                                    <!-- CHAN-B6H4MH  20181114UpdateEnd-->
                                    <th style="width:120px;text-align:center;"></th>
                                    <td style="width:120px;" align="center">
                                        <!-- <apex:commandButton action="{!Jump}" rerender="hiddenQuoid" value="跳转" style="width:90px;"
                                        /> -->
                                        <apex:commandButton onclick="JumpJs();return false;"  style="width:90px;" value="报价计算"
                                        />
                                    </td>
                                    <th style="width:100px;" bgcolor="#ffd6c1">
                                        <!-- 用这个 disabled 颜色太暗 -->
                                        是否进行过报价计算：<apex:inputField style="width:20px;text-align:right" id="IsQuoteTrial" rendered="{!displayFlg}" value="{!quo.IsQuoteTrial__c}"  onclick="return false;" />
                                    </th>
                                </tr>
                                <tr><!-- style="display:{!IF(oppInfo.Account_RecordType_DeveloperName!='AgencyContract','table-row','none')};" -->
                                    <th style="width:100px;">&nbsp;</th>
                                    <th colspan="2" style="width:260px;text-align:center;">{!$Label.Sales_Name}</th>
                                    <!-- 报价试算注释 -->
                                    <!-- <th style="width:120px;text-align:center;">{!$Label.Sales_Div}</th> -->
                                    <th style="width:120px;text-align:center;"></th>
                                    <th style="width:120px;text-align:center;">{!$Label.Amount}</th>
                                    <th style="width:120px;text-align:center;">{!$Label.Sales_Profit}</th>
                                    <th style="width:120px;text-align:center;">{!$Label.Percent}</th>
                                </tr>
                                <tr>
                                    <th style="width:100px;text-align:right;">{!$Label.Sales_Name1}</th>
                                     <!--    2018/09/28 CHAN-B4YAB8 去掉onchange function getID1(); start -->
                                    <td colspan="2" style="width:260px;"><apex:inputField style="width:230px;" id="SalesName1" value="{!quo.Agency1__c}"/></td>
                                     <!--    2018/09/28 CHAN-B4YAB8 去掉onchange function getID1(); end -->
                                    <!-- 多年保修注释    2018/09/28 CHAN-B4YAB8 经销商折扣 start -->
                                    <!--<td style="width:120px;text-align:center">
                                        <apex:outputText style="width:110px;text-align:right" id="AgencyDiscount" value="{!AgencyDiscount}"/>
                                    </td> -->
                                    <!-- 多年保修 第一经销商 折扣变为 可输入 start -->
                                    <td style="width:120px;text-align:center" hidden="hidden">
                                        <apex:inputText style="width:50px;text-align:right" id="AgencyDiscount" value="{!AgencyDiscount}" onchange="callFromAgencyDiscount();"/>
                                    </td>
                                    <td style="width:120px;text-align:center" >
                                    </td>
                                    <!-- 多年保修 第一经销商 折扣变为 可输入 end -->
                                    <td style="width:120px;"><apex:inputField style="width:110px;text-align:right" id="SalesAmount1" value="{!quo.OCM_Agent1_Price_Page__c}" rendered="{!displayFlg}" onchange="salesProfit1();setOCMAmount();quoteAgencyTotalPriceAction1('经销商');AgencyDiscountCalculation1();"/></td>
                                    <!--    2018/09/28 CHAN-B4YAB8 经销商折扣 end -->  
                                    <td style="width:120px;text-align:right"><apex:outputLabel style="width:110px;display:{!IF(displayFlg, '', 'none')}" id="Salesprofit1" value="{!Salesprofit1}"/></td>
                                    <td style="width:120px;text-align:right"><apex:outputLabel style="width:110px;display:{!IF(displayFlg, '', 'none')}" id="SalesCalculation1" value="{!qb.SalesCalculation1}" /></td>
                                </tr>
                                <tr>
                                    <th style="width:100px;text-align:right;">{!$Label.Sales_Name2}</th>
                                    <td colspan="2" style="width:260px;"><apex:inputField style="width:230px;" id="SalesName2" value="{!quo.Agency2__c}" onChange="getId2();"/></td>
                                    <td style="width:120px;"><apex:outputLabel style="width:110px;text-align:right;" id="SalesShopClass2" value="{!SalesShopClass2}" /></td>
                                    <td style="width:120px;"><apex:inputField style="width:110px;text-align:right;" id="SalesAmount2" value="{!quo.Agent1_Agent2_Price_Page__c}" rendered="{!displayFlg}" onchange="salesProfit2();"/></td>
                                    <td style="width:120px;text-align:right;"><apex:outputLabel style="width:110px;display:{!IF(displayFlg, '', 'none')}" id="Salesprofit2" value="{!Salesprofit2}" /></td>
                                    <td style="width:120px;text-align:right;"><apex:outputLabel style="width:110px;display:{!IF(displayFlg, '', 'none')}" id="SalesCalculation2" value="{!qb.SalesCalculation2}" /></td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            <table border="0" style="display:{!IF(hiddenSaveBtn, 'none', '')}">
                                <!-- SI业务系统流程改善和提升项目2019-10-28  by vivek start -->
                                <tr>
                                    <td style="width:150px;" align="right"><apex:commandButton onclick="QuoteConfirmJs();return false;"  rendered="{!UnConfirmQuote}" value="确认报价" style="width:90px;"  /></td>
                                </tr>
                                <!-- SI业务系统流程改善和提升项目2019-10-28 by vivek end -->
                                <tr>
                                    <th style="width:150px;" align="right">&nbsp;</th>
                                </tr>
                                <tr>
                                    <td style="width:150px;" align="right"><apex:commandButton onclick="save2btn();return false;" rerender="hiddenQuoid,SFDA_Flg" value="{!$Label.Save_Button}" style="width:90px;" disabled="{!Save_button}" /></td>
                                </tr>
                                <tr>
                                    <!-- SI业务系统流程改善和提升项目2019-10-28 by vivek start -->
                                    <td style="width:150px;" align="right"><apex:commandButton onclick="submitOppoApplyStockJs();return false;" rerender="hiddenQuoid,SFDA_Flg" value="备货确认申请" style="width:90px;" disabled="{!Save_button}" /></td>
                                    <!-- <td style="width:150px;" align="right"><apex:commandButton onclick="submitOppoApplyStockJs();return false;" rerender="hiddenQuoid,SFDA_Flg" value="备货确认申请" style="width:90px;" disabled="{!Save_button1}" /></td> -->
                                    <!-- SI业务系统流程改善和提升项目2019-10-28 by vivek end -->
                                </tr>
                                <tr>
                                    <td style="width:150px;" align="right"><apex:commandButton onclick="oppReflection2btn();return false;" rerender="hiddenQuoid" value="{!$Label.Opp_Button}" style="width:90px;" disabled="{!Save_button}"/></td>
                                </tr>
                                <tr>
                                    <!-- 20211029 lt SFDC停止预警 add oncomplete="MarkRed();" -->
                                    <td style="width:150px;" align="right"><apex:commandButton onclick="decision2btn();return false;" rerender="errorMsg,hiddenQuoid,SFDA_Flg" value="{!$Label.QuoteDecision_Button}" style="width:90px;" disabled="{!Decision_button}" oncomplete="MarkRed();"/></td>
                                    <!--{!Decision_button} --> 
                                </tr>
                                <tr>
                                    <!--    2018/09/28 CHAN-B4YAB8 复制粘贴板 start -->
                                    <td style="width:150px;" align="right"><apex:commandButton onClick="copyToClipboardNewQuoteEntry(event, displayCost, document.getElementById( 'Page:mainForm:hiddenQuoid').innerHTML, '{!oppInfo.CurrencyIsoCode}');return false;" value="{!$Label.Copy_Detail}" style="width:90px;" rendered="{!displayFlg}" rerender="dummy"/></td>
                                    <!--    2018/09/28 CHAN-B4YAB8 复制粘贴板 end -->
                                </tr>
                                <tr>
                                    <td style="width:150px;" align="right">
                                        <apex:commandButton onclick="DownloadCsvGet()" disabled="{!IF(quoId!=null,false,true)}" value="CSV下载" style="width:90px;" reRender="dummy"/>
                                    </td>
                                </tr>
                            </table>
                            <table border="0" >
                                <tr>
                                    <td style="width:150px;" align="right"><apex:commandButton action="{!Back}" rerender="hiddenQuoid" value="返回询价" style="width:90px;" /></td>
                                </tr>
                                <!-- 报价试算 -->
                                <!-- <tr>
                                    <td style="width:150px;" align="right">
                                        
                                        <apex:commandButton onclick="JumpJs();return false;"  style="width:90px;" value="报价试算"
                                        />
                                    </td>
                                </tr> -->
                            </table>
                        </td>
                    </tr>
                    </table>
                <br></br>
                 <!--多年保修 增加宽度 start -->
                <table border="0" style="background-color:#ffd6c1; width: 878px;">
                 <!--多年保修 增加宽度 end -->
                    <tr>
                        <th style="text-align:right;width:80px;">{!$Label.Quote_Print}</th>
                        <td style="text-align:center;width:80px;"><apex:inputCheckbox value="{!quo.Unit_Price__c}"/>{!$Label.Detail_Price}</td>
                        <td style="text-align:center;width:80px;"><apex:inputCheckbox value="{!quo.Offer_Amount__c}"/>{!$Label.Detail_Sum}</td>
                        <td style="text-align:center;width:80px;"><apex:inputCheckbox value="{!quo.TOTAL__c}"/>{!$Label.Total_Price}</td>
                        <td style="text-align:center;width:80px;"><apex:inputCheckbox value="{!quo.Discount__c}"/>{!$Label.Total_Discount_Percent}</td>
                        <td style="text-align:center;width:80px;"><apex:inputCheckbox value="{!quo.Pricing__c}"/>{!$Label.Total_Discount_Amount}</td>
                        <td style="text-align:center;"><apex:inputCheckbox value="{!quo.Preferential_Trading_Price__c}"/>{!$Label.Row_Total_Sum}</td>
                        <!-- 多年保修 start -->
                        <td style="text-align:center;width:80px;"><apex:inputCheckbox value="{!quo.Preferential_Gurantee_Period__c}"/>{!$ObjectType.Quote.fields.Preferential_Gurantee_Period__c.label}</td>
                        <!-- 多年保修 end -->
                        <td style="width:120px;text-align:right" colspan="2"><apex:inputCheckbox value="{!quo.Contract__c}" rendered="{!enableContract}"/>{!$Label.Contract_Breakdown}</td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:100px;">{!$Label.Print_HPName}</th>
                        <td colspan="6">
                            <apex:selectList id="selection_hp" value="{!selection_hp}" style="width:400px;" size="1">
                                <apex:selectOptions value="{!options_hp}"/>
                            </apex:selectList>
                        </td>
                        <td  colspan="2" align="right" style="display:{!IF(hiddenSaveBtn, 'none', '')}"><apex:commandButton onclick="print2btn();return false;" value="{!$Label.Print_Button}" style="width:90px;" disabled="{!print_button}" rendered="{!displayFlg}" rerender="dummy"/></td>
                    </tr>
                </table>
            </div>
        </apex:pageBlock>
    </apex:form>
    <!-- 添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 start -->
    <script type="text/javascript">
        //const duration = document.getElementById('dur');
        
        function changeV() {
            var speed = document.getElementById('speed');
            //durVal = parseFloat(duration.value);
            spdVal = parseFloat(speed.value);
            //const durationPercent = parseFloat(durVal, 2) * 100
            const speedPercent = parseFloat((spdVal / 100), 2)*100;
            //duration.style.backgroundSize = `${durationPercent}%, 100%`
            speed.style.background = `linear-gradient(to right, #ffa200, white ${speedPercent}%, white`
            document.getElementById("addMultipleRow").value= speed.value;
            
        };
        function changeI() {
            var speed = document.getElementById('speed');
            //durVal = parseFloat(duration.value);
            spdVal = parseFloat(document.getElementById("addMultipleRow").value);
            //const durationPercent = parseFloat(durVal, 2) * 100
            const speedPercent = parseFloat((spdVal / 100), 2)*100;
            //duration.style.backgroundSize = `${durationPercent}%, 100%`
            speed.style.background = `linear-gradient(to right, #ffa200, white ${speedPercent}%, white`
            speed.value = document.getElementById("addMultipleRow").value;

            
        };

        //SFDC停止预警（预计消耗到期日标红） lt 20210928 add start
        MarkRed();
        //SFDC停止预警（预计消耗到期日标红） lt 20210928 add end
        
    </script>
    <!-- //添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 end -->
</apex:page>