buli
2022-05-09 248433c920f935ffcaee52b240f0c162decc1564
force-app/main/default/pages/NewQuoteEntry.page
@@ -1,101 +1,333 @@
<!--<apex:page standardController="Quote" extensions="NewQuoteEntryController" sidebar="false" action="{!init}" id="Page">
-->
<apex:page controller="NewQuoteEntryController" sidebar="false" action="{!init}" id="Page">
<apex:page standardController="Quote" extensions="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.connection20)}"/>
    <apex:includeScript value="{!URLFOR($Resource.clipboardminjs)}"/>
    <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';
        }
        // function decision2btns(){
        //     ReservedProductVerification();
        //     debugger
        //     var filg=j$(escapeVfId('Page:mainForm:filg')).value();
        //     // var filg={!filg};
        //     console.warn(filg);
        //     if(filg == 'true'){
        //         console.warn('成功');
        //         // decision2btn();
        //     }else{
        //         alert('产品数量不可超过产品预留数量');
        //     }
        // }
        //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}?';
        var QuoteDecide = {!QuoteDecide};
        window.sfdcPage.appendToOnloadQueue(function() { calonLoad() });
        var oppId = '{!oppId}';
        var openQuoteExcelImportWindow = null;
        var baseUrl = '{!baseUrl}';
        function searchProduct(i,str,setStr){
            // CNY USDを取得
            //j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ProductName')).attr('readonly',true);
        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;
            openPopup(baseUrl + '/apex/SearchProduct?lineno=' + i + '&val=' + encodeURIComponent(str) + '&set=' + encodeURIComponent(setStr) +'&oppId=' + encodeURIComponent(oppId), 'setsearch', 950, 450, 'width=950,height=450,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true);
        }
        function openQuoteExcelImport(e) {
            if ( openQuoteExcelImportWindow == null || openQuoteExcelImportWindow.closed) {
                openQuoteExcelImportWindow = window.open(baseUrl + '/apex/QuoteExcelImport', 'xlsdoc', 'width=450,height=210');
            }
            else {
                openQuoteExcelImportWindow.focus();
            }
        }
        function getLastLineNoNext(doc) {
            var hasRecordFlg = false;
            var lastLineNo = 0;
            for(var i=99; i>=0; i--){
                if (j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ProductName')).value() != ''){
                    if (!hasRecordFlg) {
                        lastLineNo = i;
                    }
                    hasRecordFlg = true;
                }
                if (hasRecordFlg == true) {
                    if (j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ProductName')).value() == ''){
                        var moveCheckbox = true;
                        //deletelist(i, doc, moveCheckbox);
                        lastLineNo = i;
                    }
                }
            }
            if (hasRecordFlg) {
                lastLineNo = lastLineNo + 1;
            }
            return lastLineNo;
        }
        function save2btn() {
            //checkchangedAfterPrint();
            //var changedAfterPrint = j$(escapeVfId('Page:mainForm:changedAfterPrint')).value();
            //var changedAfterBid = j$(escapeVfId('Page:mainForm:changedAfterBid')).value();
            var changedAfterPrint = false;
            var changedAfterBid = false;
            if (changedAfterBid == 'true') {
                if (confirm(Confirm_ChangedAfterBid)) {
                    blockme();
                    Save.call();
                    return;
                }
            } else if (changedAfterPrint == 'true') {
                if (confirm(Confirm_ChangedAfterPrint)) {
                    blockme();
                    Save.call();
                    return true;
                }
            } else {
                blockme();
                Save.call();
                return true;
            }
        }
        function doRefresh() {
            blockme();
            Refresh.call();
            return true;
        }
        function oppReflection2btn() {
            var changedAfterPrint = false;
            if (changedAfterPrint == 'true') {
                if (confirm(Confirm_ChangedAfterPrint)) {
                    blockme();
                    OppReflection.call();
                    return true;
                }
            } else {
                blockme();
                OppReflection.call();
                return true;
            }
        }
        function decidebtn() {
            if (confirm('报价决定后,询价不能同步其他报价,是否决定报价?') == false) {
                return;
            }
            blockme();
            Decide.call();
            return true;
        }
        function undecidebtn() {
            if (confirm('是否取消决定?') == false) {
                return;
            }
            blockme();
            unDecide.call();
            return true;
        }
        function backbtn() {
            BackBtn.call();
            return true;
        }
        function excelImportGateway(str) {
            blockme();
            excelImport(str);
        }
        function printPDF() {
            var quoid = j$(escapeVfId('quoid')).value();
            var printPrice = j$(escapeVfId('isPrintPrice')).prop('checked');
            var baseUrl = '{!baseUrl}';
            window.open(baseUrl + '/apex/QuotePDF?id=' + encodeURIComponent(quoid) + '&printprice=' + printPrice);
        }
        function setall() {
            var discount = j$(escapeVfId('Page:mainForm:block:discount')).value();
            if (isNaN(discount) == true) {
                alert('请输入数字。');
                return false;
            }
            var quoteEntryMaxLine = {!quoteEntryMaxLine};
            for (var i = 0; i < quoteEntryMaxLine; i++) {
                var SingleProduct = j$(escapeVfId("Page:mainForm:block:lists:"+i+":SingleProduct")).value();
                if (j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ProductName')).value() != '' && SingleProduct == 'true') {
                    j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Discount')).val(discount);
                }
                setTotalPrice(i,true);
            }
        }
        function setPrice(i) {
            var distingush = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Distingush')).value();
            if (distingush == 'A') {
                var price = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':price1')).value();
                j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).val(price);
            } else if (distingush == 'B') {
                var price = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':price2')).value();
                j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).val(price);
            } else if (distingush == 'C') {
                var price = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':price3')).value();
                j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).val(price);
            } else {
                var price = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':price0')).value();
                j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).val(price);
            }
        }
        function setTotalPrice(i,Discountflag) {
            //var discount_n = j$(escapeVfId('Page:mainForm:block:discount_n')).value();
            if (j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ProductName')).value() != '') {
                var quantity = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Quantity')).value();
                var unitprice = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).value();
                var discount = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Discount')).value();
                var totalprice = Math.round(quantity * unitprice * (100 - discount)) / 100;
                //var discountF = discount_n * (1 - discount / 100);
                //var totalprice = Math.round(quantity * unitprice * discountF);
                j$(escapeVfId('Page:mainForm:block:lists:' + i + ':TotalPrice')).text(totalprice);
                //XHL-20190515-AddStart
                var SingleProduct = j$(escapeVfId("Page:mainForm:block:lists:"+i+":SingleProduct")).value();
                var QuantityReference = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':QuantityReference')).value();
                var DiscountReference = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':DiscountReference')).value();
                if (SingleProduct == 'false' && quantity != QuantityReference) {
                    alert('套装产品的数量不可更改');
                    j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Quantity')).val(QuantityReference);
                    var totalprice = Math.round(QuantityReference * unitprice * (100 - discount)) / 100;
                    j$(escapeVfId('Page:mainForm:block:lists:' + i + ':TotalPrice')).text(totalprice);
                }
                if (SingleProduct == 'false' && discount != DiscountReference && Discountflag == false) {
                    alert('套装产品的折扣不可更改');
                    j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Discount')).val(DiscountReference);
                    var totalprice = Math.round(quantity * unitprice * (100 - DiscountReference)) / 100;
                    j$(escapeVfId('Page:mainForm:block:lists:' + i + ':TotalPrice')).text(totalprice);
                }
                //XHL-20190515-AddEnd
            }
        }
        function changeLimit(i) {
            if (j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ProductName')).value() != '') {
                var unitprice = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).value();
                var salesprice = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':price0')).value();
                var ispm = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':isProductModel')).value();
                var isPartsdirect = j$(escapeVfId('isPartsdirect')).value();
                var isHiddenUser = j$(escapeVfId('isHiddenUser')).value();
                var specialDealer = j$(escapeVfId('specialDealer')).value();
                var isDealerUser = j$(escapeVfId('isDealerUser')).value();
                var hiddenflg = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':hiddenflg')).value();
                if (isPartsdirect == 'true' || ispm == 'true') {
                    setTotalPrice(i,false);
                } else {
                    checklist[i].checked = false;
                    alert("不能手动修改销售价格。");
                    if (specialDealer == 'true' ||isHiddenUser == 'true' || isDealerUser == 'true' && hiddenflg == 'true') {
                        j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).val(0);
                    } else {
                        j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).val(salesprice);
                    }
                }
            }
        }
        // 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 setCPD() {
            var quoteEntryMaxLine = {!quoteEntryMaxLine};
            var total = 0;
            var cnt = 0;
            for (var i = 0; i < quoteEntryMaxLine; i++) {
                if (j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ProductName')).value() != '') {
                    //var line = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':TotalPrice')).text();
                    var quantity = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Quantity')).value();
                    var unitprice = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':price0')).value();
                    var discount = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Discount')).value();
                    var line = Math.round(quantity * unitprice * (100 - discount)) / 100;
                    total += localParseFloat(line);
                    cnt += localParseFloat(1);
                }
            }
            var totalCP = j$(escapeVfId('Page:mainForm:block:totalCustomPrice')).value();
            j$(escapeVfId('Page:mainForm:block:totalCustomPrice')).val(toNum(totalCP));
            totalCP = localParseFloat(totalCP);
            var isHiddenUser = j$(escapeVfId('isHiddenUser')).value();
            var isDealerUser = j$(escapeVfId('isDealerUser')).value();
            var specialDealer = j$(escapeVfId('specialDealer')).value();
            var totalCPD = 0;
            for (var i = 0; i < cnt - 1; i++) {
                var hiddenflg = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':hiddenflg')).value();
                //var line = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':TotalPrice')).text();
                var quantity = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Quantity')).value();
                var unitprice = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':price0')).value();
                var discount = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Discount')).value();
                var line = Math.round(quantity * unitprice * (100 - discount)) / 100;
                line = localParseFloat(line);
                var lineCP = line / total * totalCP;
                lineCP = lineCP.toFixed(0);
                totalCPD += localParseFloat(lineCP);
                if (specialDealer == 'true' || isHiddenUser == 'true' || isDealerUser == 'true' && hiddenflg == 'true' ) {
                    // alert('11111('+i+')11111');
                    j$(escapeVfId('Page:mainForm:block:lists:' + i + ':CustomPrice')).val(toNum(0));
                    j$(escapeVfId('Page:mainForm:block:lists:' + i + ':CustomPriceHidden')).val(toNum(lineCP));
                } else {
                    // alert('22222('+i+')22222_' + toNum(lineCP));
                    j$(escapeVfId('Page:mainForm:block:lists:' + i + ':CustomPrice')).val(toNum(lineCP));
                    j$(escapeVfId('Page:mainForm:block:lists:' + i + ':CustomPriceHidden')).val(toNum(lineCP));
                }
            }
            var hiddenflg = j$(escapeVfId('Page:mainForm:block:lists:' + (cnt - 1) + ':hiddenflg')).value();
            if ( specialDealer == 'true' || isHiddenUser == 'true' || isDealerUser == 'true' && hiddenflg == 'true') {
                // alert('3333333333' +toNum(totalCP - totalCPD) );
                j$(escapeVfId('Page:mainForm:block:lists:' + (cnt - 1) + ':CustomPrice')).val(toNum(0));
                j$(escapeVfId('Page:mainForm:block:lists:' + (cnt - 1) + ':CustomPriceHidden')).val(toNum(totalCP - totalCPD));
            } else {
                // alert('4444444444' + toNum(totalCP - totalCPD));
                j$(escapeVfId('Page:mainForm:block:lists:' + (cnt - 1) + ':CustomPrice')).val(toNum(totalCP - totalCPD));
                j$(escapeVfId('Page:mainForm:block:lists:' + (cnt - 1) + ':CustomPriceHidden')).val(toNum(totalCP - totalCPD));
            }
        }
        // 报价试算
        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 doReroadJs(line) {
            var pname = j$(escapeVfId('Page:mainForm:block:lists:' + line + ':ProductName')).value();
            //XHL-20190515-AddStart
            var ProductNameReference = j$(escapeVfId('Page:mainForm:block:lists:' + line + ':ProductNameReference')).value();
            var SingleProduct = j$(escapeVfId("Page:mainForm:block:lists:"+line+":SingleProduct")).value();
            var hidSet = j$(escapeVfId("Page:mainForm:block:lists:"+line+":hidSet")).value();
            if (SingleProduct == 'false' && pname != ProductNameReference && hidSet != '') {
                alert('套装产品的产品名称不可更改');
                j$(escapeVfId('Page:mainForm:block:lists:' + line + ':ProductName')).val(ProductNameReference);
            }
            //XHL-20190515-AddEnd
            if (pname == null || pname == '') {
                doReroad();
            } else {
                return;
            }
        }
    // 2018/09/28 CHAN-B4YAB8 初始化时更新经销商折扣 start
    //AgencyDiscountCalculation1();
    // 2018/09/28 CHAN-B4YAB8 初始化时更新经销商折扣 end
        function doReroad() {
            var quoteEntryMaxLine = {!quoteEntryMaxLine};
            var isHiddenAll = j$(escapeVfId('isHiddenAll')).value();
            var tmp = "false";
            for (var i = 0; i < quoteEntryMaxLine; i++) {
                var pname = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ProductName')).value();
                var phidden = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':hiddenflg')).value();
                if (pname != '' && phidden == "true") {
                    tmp = "true";
                    break;
                }
            }
            if (isHiddenAll != tmp) {
                blockme();
                reloadPage(tmp);
            }
        }
        function dummy(){
            dummy1();
            document.getElementById('hid').style.visibility="hidden";
           /* var hid = document.getElementById('hid');
            hid.style.display = 'none';*/
        }
    </script>
    <style type="text/css">
        div#iframelike {
            color: #fff;
@@ -113,168 +345,70 @@
        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%;
        hr {
            height: 15px;
            color: #fff;
            margin: 0px;
            padding: 0px;
            border: 0px;
        }
        /*弹窗中的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="changedAfterPrint" value="{!changedAfterPrint}"/>
        <apex:inputHidden id="changedAfterBid" value="{!changedAfterBid}"/>
        <apex:inputHidden id="filg" value="{!filg}" />
        <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:actionFunction action="{!Refresh}" name="Refresh" reRender="mainForm,message1" oncomplete="unblockUI();"/>
        <apex:actionFunction action="{!excelImport}" name="excelImport" reRender="mainForm" oncomplete="unblockUI();">
            <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="{!dummy2}" name="dummy1" reRender="message1"/>
        <apex:actionFunction action="{!getSalesId1}" name="getSalesId1" reRender="mainForm"/>
        <apex:actionFunction action="{!getSalesId2}" name="getSalesId2" reRender="mainForm"/>
        <apex:actionFunction action="{!Save}" name="Save" reRender="mainForm,message1" oncomplete="unblockUI();"/>
        <!--    2018/09/28 CHAN-B4YAB8 经销商单价计算 start -->
        <apex:actionFunction action="{!PriceStatusUpdate}" name="PriceStatusUpdate" reRender="listsTable" oncomplete="unblockUI();calPriceAll();alert('更新完毕!');"/>
        <!--    2018/09/28 CHAN-B4YAB8 经销商单价计算 end -->
        <!-- CHAN-B8RCU9 start -->
        <apex:actionFunction action="{!QuoteDecision}" name="QuoteDecision" reRender="mainForm" oncomplete="EstimationListPrice();unblockUI(); alertUpdatewhenDecide();"/>
         <!-- CHAN-B8RCU9 start -->
         <!-- 停止预警  20210930  lt  add  MarkRed(); -->
        <apex:actionFunction action="{!Save}" name="Save" reRender="mainForm" oncomplete="unblockUI();MarkRed();"/>
        <!-- 报价试算 -->
        <!-- <apex:actionFunction action="{!ReservedProductVerification}" name="ReservedProductVerification" reRender="mainForm" /> -->
        <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:actionFunction action="{!Decide}" name="Decide" reRender="mainForm" oncomplete="unblockUI();"/>
        <apex:actionFunction action="{!UnDecide}" name="unDecide" reRender="mainForm" oncomplete="unblockUI();"/>
        <apex:actionFunction action="{!BackBtn}" name="BackBtn" reRender="mainForm,message1" />
        <apex:actionFunction action="{!reloadPage}" name="reloadPage" reRender="mainForm" oncomplete="unblockUI();">
            <apex:param assignTo="{!is_hidden_all}" name="firstparam" value=""/>
        </apex:actionFunction>
        <apex:actionFunction action="{!setProductEntry}" name="setProductEntry" reRender="mainForm" oncomplete="unblockUI();">
            <apex:param assignTo="{!setProduct_text}" name="setProduct_text" value=""/>
        </apex:actionFunction>
        <!-- <apex:actionFunction action="{!emptyData}" name="emptyData" reRender="mainForm" >
            <apex:param assignTo="{!setProduct_text}" name="setProduct_text" value=""/>
        </apex:actionFunction> -->
        <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:inputHidden value="{!pricebook2Id}" id="pricebook2Id"/>
            <input type="hidden" value="{!quoId}" id="quoid"/>
            <input type="hidden" value="{!is_Parts_direct}" id="isPartsdirect"/>
            <input type="hidden" value="{!is_hidden_user}" id="isHiddenUser"/>
            <input type="hidden" value="{!specialDealer}" id="specialDealer"/>
            <input type="hidden" value="{!is_dealer_user}" id="isDealerUser"/>
            <input type="hidden" value="{!is_hidden_all}" id="isHiddenAll"/>
            <input type="hidden" id="activitiesSize" value="{!activitiesSize}" />
            <input type="hidden" id="quoteLineSetNameDiscountJson" value="{!quoteLineSetNameDiscountJson}" />
            <apex:outputPanel id="message1">
                <apex:messages styleClass="editListError"/>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!errorflg}" >
                <table width="100%">
                    <tr>
                        <td align="left"><div style="font-size:22px" class="errorMsg">{!errorMessage}</div></td>
                        <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>
@@ -282,568 +416,694 @@
                    </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>
                        <th style="text-align:right;width:90px;">{!$ObjectType.Quote.fields.QuoteNumber.label}</th>
                        <td style="text-align:right;width:130px;"><apex:outputLabel value="{!quo.QuoteNumber}"/></td>
                        <th style="text-align:right;width:90px;">{!$ObjectType.Quote.fields.Name.label}</th>
                        <td style="width:130px;"><apex:inputField value="{!quo.Name}"/></td>
                        <th style="text-align:right;width:90px;">{!$ObjectType.Account.fields.name.label}</th>
                        <td style="text-align:right;width:130px;" colspan="2"><apex:outputLabel value="{!quo.Account.name}"/></td>
                        <td style="text-align:right;width:90px;">&nbsp;</td>
                        <td style="text-align:right;width:130px;">&nbsp;</td>
                        <td style="text-align:right;width:50px;">&nbsp;</td>
                        <td style="text-align:right;width:110px;">&nbsp;</td>
                    </tr>
                    <BR></BR>
                    <tr>
                        <th style="text-align:right;width:90px;">{!$ObjectType.Quote.fields.Discount_Normal__c.label}</th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputPanel rendered="{!is_hidden_all}" layout="none">
                                &nbsp;
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                                <apex:outputText style="width:90%;" id="discount_n" value="{0,number,###,###,##0.00}">
                                    <apex:param value="{!dealer_coefficient}"/>
                                </apex:outputText>%
                            </apex:outputPanel>
                        </td>
                        <td style="text-align:right;width:90px;">{!$ObjectType.Quote.fields.Discount_Special__c.label}</td>
                        <td style="text-align:right;width:130px;">
                            <apex:outputPanel rendered="{!is_hidden_all}" layout="none">
                                &nbsp;
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                                <apex:outputField id="discount_s" value="{!quo.Discount_Special__c}"/>
                            </apex:outputPanel>
                        </td>
                        <td style="text-align:right;width:90px;">&nbsp;</td>
                        <td style="text-align:right;width:130px;">&nbsp;</td>
                        <td style="text-align:right;width:90px;">&nbsp;</td>
                        <td style="text-align:right;width:130px;">&nbsp;</td>
                        <td style="text-align:right;width:50px;">&nbsp;</td>
                        <td style="text-align:right;width:110px;">&nbsp;</td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">{!$ObjectType.Quote.fields.Subtotal.label}</th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputPanel rendered="{!is_hidden_all}" layout="none">
                                &nbsp;
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                                {!quo.currencyISOCode}&nbsp;<apex:outputText value="{0,number,###,###,##0.00}"><apex:param value="{!quo.Subtotal}"/></apex:outputText>
                            </apex:outputPanel>
                        </td>
                        <th style="text-align:right;width:90px;">{!$ObjectType.Quote.fields.Discount.label}</th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputPanel rendered="{!is_hidden_all}" layout="none">
                                &nbsp;
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                                <apex:outputField value="{!quo.Discount}"/>
                            </apex:outputPanel>
                        </td>
                        <th style="text-align:right;width:90px;">{!$ObjectType.Quote.fields.TotalPrice.label}</th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputPanel rendered="{!is_hidden_all}" layout="none">
                                &nbsp;
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                                {!quo.currencyISOCode}&nbsp;<apex:outputText value="{0,number,###,###,##0.00}"><apex:param value="{!quo.TotalPrice}"/></apex:outputText>
                            </apex:outputPanel>
                        </td>
                        <td style="text-align:right;width:90px;">&nbsp;</td>
                        <td style="text-align:right;width:130px;">&nbsp;</td>
                        <td style="text-align:right;width:50px;">&nbsp;</td>
                        <td style="text-align:right;width:110px;">&nbsp;</td>
                    </tr>
                    <apex:outputPanel layout="none" rendered="{!IF(productSegment = 'IE' || productSegment = 'RVI', true, false)}">
                    <tr>
                        <td style="text-align:right;width:90px;">&nbsp;</td>
                        <td style="text-align:right;width:130px;">&nbsp;</td>
                        <th style="text-align:right;width:90px;">运保费</th>
                        <td style="text-align:right;width:130px;"><apex:inputField value="{!quo.ShippingHandling}"/></td>
                        <th style="text-align:right;width:90px;">{!$ObjectType.Quote.fields.GrandTotal.label}</th>
                        <td style="text-align:right;width:130px;">{!quo.currencyISOCode}&nbsp;<apex:outputText value="{0,number,###,###,##0.00}"><apex:param value="{!quo.GrandTotal}"/></apex:outputText></td>
                        <td style="text-align:right;width:90px;">&nbsp;</td>
                        <td style="text-align:right;width:130px;">&nbsp;</td>
                        <td style="text-align:right;width:50px;">&nbsp;</td>
                        <td style="text-align:right;width:110px;">&nbsp;</td>
                    </tr>
                    </apex:outputPanel>
                    <BR></BR>
                    <tr>
                        <th style="text-align:right;width:90px;">{!$ObjectType.Quote.fields.PaymentTerms__c.label}</th>
                        <td style="text-align:left;" colspan="3"><apex:inputField value="{!quo.PaymentTerms__c}" style="width: 99%"/></td>
                        <td style="text-align:right;width:90px;">{!$ObjectType.Quote.fields.Shipment_Term__c.label}</td>
                        <td style="text-align:left;width:130px;"><apex:inputField value="{!quo.Shipment_Term__c}"/></td>
                        <td style="text-align:right;width:110px;">{!$ObjectType.Quote.fields.Shipment_Term2__c.label}</td>
                        <td style="text-align:left;width:130px;"><apex:inputField value="{!quo.Shipment_Term2__c}"/></td>
                        <td style="text-align:left;width:50px;">AIRPORT</td>
                        <td style="text-align:right;width:110px;">&nbsp;</td>
                        <td style="text-align:right;width:50px;">&nbsp;</td>
                        <td style="text-align:right;width:110px;">&nbsp;</td>
                    </tr>
                    <tr>
                        <th style="text-align:right">{!IF(displayFlg,'产品标准定价总额','')}</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>
                        <th style="text-align:right;width:90px;">{!$ObjectType.Quote.fields.DeliveryLeadTime__c.label}</th>
                        <td style="text-align:right;width:130px;"><apex:inputField value="{!quo.DeliveryLeadTime__c}"/></td>
                        <th style="text-align:right;width:90px;">{!$ObjectType.Quote.fields.Warranty__c.label}</th>
                        <td style="text-align:right;width:130px;"><apex:inputField value="{!quo.Warranty__c}"/></td>
                        <th style="text-align:right;width:90px;">报价到期日期</th>
                        <td style="text-align:left;width:130px;" colspan="2"><apex:inputField value="{!quo.ExpirationDate}"/></td>
                        <td style="text-align:right;width:90px;">&nbsp;</td>
                        <td style="text-align:right;width:130px;">&nbsp;</td>
                        <td style="text-align:right;width:50px;">&nbsp;</td>
                        <td style="text-align:right;width:110px;">&nbsp;</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="searchSetProduct();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>
                        <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 width="40px;">
                        <!-- 添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 end -->
                        <apex:commandButton onclick="openAddMultipleRow(); return false;" value="增加行" rerender="{!displayFlg}"/>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName1__c.label}" rendered="{!hidFlg[0]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName1__c}" rendered="{!hidFlg[0]}" id="SetName1"/>
                        </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;"/>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty1__c.label}" rendered="{!hidFlg[0]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty1__c}" rendered="{!hidFlg[0]}" id="SetQty1"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName2__c.label}" rendered="{!hidFlg[1]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName2__c}" rendered="{!hidFlg[1]}" id="SetName2"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty2__c.label}" rendered="{!hidFlg[1]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty2__c}" rendered="{!hidFlg[1]}" id="SetQty2"/>
                        </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>
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <td style="text-align:right;width:110px;"><apex:commandButton onclick="doRefresh();return false;" value="{!$Label.Status_Update}" style="width:110px;" rerender="dummy"/></td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName3__c.label}" rendered="{!hidFlg[2]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName3__c}" rendered="{!hidFlg[2]}" id="SetName3"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty3__c.label}" rendered="{!hidFlg[2]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty3__c}" rendered="{!hidFlg[2]}" id="SetQty3"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName4__c.label}" rendered="{!hidFlg[3]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName4__c}" rendered="{!hidFlg[3]}" id="SetName4"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty4__c.label}" rendered="{!hidFlg[3]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty4__c}" rendered="{!hidFlg[3]}" id="SetQty4"/>
                        </td>
                        <td style="text-align:right;width:50px;">&nbsp;</td>
                        <td style="text-align:right;width:110px;">&nbsp;</td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName5__c.label}" rendered="{!hidFlg[4]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName5__c}" rendered="{!hidFlg[4]}" id="SetName5"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty5__c.label}" rendered="{!hidFlg[4]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty5__c}" rendered="{!hidFlg[4]}" id="SetQty5"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName6__c.label}" rendered="{!hidFlg[5]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName6__c}" rendered="{!hidFlg[5]}" id="SetName6"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty6__c.label}" rendered="{!hidFlg[5]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty6__c}" rendered="{!hidFlg[5]}" id="SetQty6"/>
                        </td>
                        <th style="text-align:right;width:50px;">文件名:</th>
                        <td style="text-align:right;width:110px;"><apex:inputText value="{!fileName}" /><!-- <apex:commandButton onclick="openQuoteExcelImport(event);return false;"  value="{!$Label.Excel_Import}" style="width:110px;" rerender="dummy"/> --></td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName7__c.label}" rendered="{!hidFlg[6]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName7__c}" rendered="{!hidFlg[6]}" id="SetName7"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty7__c.label}" rendered="{!hidFlg[6]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty7__c}" rendered="{!hidFlg[6]}" id="SetQty7"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName8__c.label}" rendered="{!hidFlg[7]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName8__c}" rendered="{!hidFlg[7]}" id="SetName8"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty8__c.label}" rendered="{!hidFlg[7]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty8__c}" rendered="{!hidFlg[7]}" id="SetQty8"/>
                        </td>
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <td style="text-align:right;width:110px;"><apex:commandButton action="{!csvExport}" value="配置导出" /></td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName9__c.label}" rendered="{!hidFlg[8]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName9__c}" rendered="{!hidFlg[8]}" id="SetName9"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty9__c.label}" rendered="{!hidFlg[8]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty9__c}" rendered="{!hidFlg[8]}" id="SetQty9"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName10__c.label}" rendered="{!hidFlg[9]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName10__c}" rendered="{!hidFlg[9]}" id="SetName10"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty10__c.label}" rendered="{!hidFlg[9]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty10__c}" rendered="{!hidFlg[9]}" id="SetQty10"/>
                        </td>
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <td style="text-align:right;width:110px;">&nbsp;</td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName11__c.label}" rendered="{!hidFlg[10]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName11__c}" rendered="{!hidFlg[10]}" id="SetName11"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty11__c.label}" rendered="{!hidFlg[10]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty11__c}" rendered="{!hidFlg[10]}" id="SetQty11"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName12__c.label}" rendered="{!hidFlg[11]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName12__c}" rendered="{!hidFlg[11]}" id="SetName12"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty12__c.label}" rendered="{!hidFlg[11]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty12__c}" rendered="{!hidFlg[11]}" id="SetQty12"/>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName13__c.label}" rendered="{!hidFlg[12]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName13__c}" rendered="{!hidFlg[12]}" id="SetName13"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty13__c.label}" rendered="{!hidFlg[12]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty13__c}" rendered="{!hidFlg[12]}" id="SetQty13"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName14__c.label}" rendered="{!hidFlg[13]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName14__c}" rendered="{!hidFlg[13]}" id="SetName14"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty14__c.label}" rendered="{!hidFlg[13]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty14__c}" rendered="{!hidFlg[13]}" id="SetQty14"/>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName15__c.label}" rendered="{!hidFlg[14]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName15__c}" rendered="{!hidFlg[14]}" id="SetName15"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty15__c.label}" rendered="{!hidFlg[14]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty15__c}" rendered="{!hidFlg[14]}" id="SetQty15"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName16__c.label}" rendered="{!hidFlg[15]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName16__c}" rendered="{!hidFlg[15]}" id="SetName16"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty16__c.label}" rendered="{!hidFlg[15]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty16__c}" rendered="{!hidFlg[15]}" id="SetQty16"/>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName17__c.label}" rendered="{!hidFlg[16]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName17__c}" rendered="{!hidFlg[16]}" id="SetName17"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty17__c.label}" rendered="{!hidFlg[16]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty17__c}" rendered="{!hidFlg[16]}" id="SetQty17"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName18__c.label}" rendered="{!hidFlg[17]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName18__c}" rendered="{!hidFlg[17]}" id="SetName18"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty18__c.label}" rendered="{!hidFlg[17]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty18__c}" rendered="{!hidFlg[17]}" id="SetQty18"/>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName19__c.label}" rendered="{!hidFlg[18]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName19__c}" rendered="{!hidFlg[18]}" id="SetName19"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty19__c.label}" rendered="{!hidFlg[18]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty19__c}" rendered="{!hidFlg[18]}" id="SetQty19"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName20__c.label}" rendered="{!hidFlg[19]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName20__c}" rendered="{!hidFlg[19]}" id="SetName20"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty20__c.label}" rendered="{!hidFlg[19]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty20__c}" rendered="{!hidFlg[19]}" id="SetQty20"/>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName21__c.label}" rendered="{!hidFlg[20]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName21__c}" rendered="{!hidFlg[20]}" id="SetName21"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty21__c.label}" rendered="{!hidFlg[20]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty21__c}" rendered="{!hidFlg[20]}" id="SetQty21"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName22__c.label}" rendered="{!hidFlg[21]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName22__c}" rendered="{!hidFlg[21]}" id="SetName22"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty22__c.label}" rendered="{!hidFlg[21]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty22__c}" rendered="{!hidFlg[21]}" id="SetQty22"/>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName23__c.label}" rendered="{!hidFlg[22]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName23__c}" rendered="{!hidFlg[22]}" id="SetName23"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty23__c.label}" rendered="{!hidFlg[22]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty23__c}" rendered="{!hidFlg[22]}" id="SetQty23"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName24__c.label}" rendered="{!hidFlg[23]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName24__c}" rendered="{!hidFlg[23]}" id="SetName24"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty24__c.label}" rendered="{!hidFlg[23]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty24__c}" rendered="{!hidFlg[23]}" id="SetQty24"/>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName25__c.label}" rendered="{!hidFlg[24]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName25__c}" rendered="{!hidFlg[24]}" id="SetName25"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty25__c.label}" rendered="{!hidFlg[24]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty25__c}" rendered="{!hidFlg[24]}" id="SetQty25"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName26__c.label}" rendered="{!hidFlg[25]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName26__c}" rendered="{!hidFlg[25]}" id="SetName26"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty26__c.label}" rendered="{!hidFlg[25]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty26__c}" rendered="{!hidFlg[25]}" id="SetQty26"/>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName27__c.label}" rendered="{!hidFlg[26]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName27__c}" rendered="{!hidFlg[26]}" id="SetName27"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty27__c.label}" rendered="{!hidFlg[26]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty27__c}" rendered="{!hidFlg[26]}" id="SetQty27"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName28__c.label}" rendered="{!hidFlg[27]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName28__c}" rendered="{!hidFlg[27]}" id="SetName28"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty28__c.label}" rendered="{!hidFlg[27]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty28__c}" rendered="{!hidFlg[27]}" id="SetQty28"/>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName29__c.label}" rendered="{!hidFlg[28]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName29__c}" rendered="{!hidFlg[28]}" id="SetName29"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty29__c.label}" rendered="{!hidFlg[28]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty29__c}" rendered="{!hidFlg[28]}" id="SetQty29"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetName30__c.label}" rendered="{!hidFlg[29]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetName30__c}" rendered="{!hidFlg[29]}" id="SetName30"/>
                        </td>
                        <th style="text-align:right;width:90px;">
                            <apex:outputLabel value="{!$ObjectType.Quote.fields.SetQty30__c.label}" rendered="{!hidFlg[29]}"/></th>
                        <td style="text-align:right;width:130px;">
                            <apex:outputField value="{!quo.SetQty30__c}" rendered="{!hidFlg[29]}" id="SetQty30"/>
                        </td>
                    </tr>
                </table>
            </div>
            <!-- 多年保修 start -->
            <!--  原代码 start
                <table>
                        <tr>
                            <td>&nbsp;</td>
                        </tr>
                </table>
            -->
            <!-- 原代码 end -->
            <table>
            <table style="width:1200px;" border="0">
                <tr>
                    <td>&nbsp;</td>
                    <th style="text-align:right;width:20px;">&nbsp;</th>
                    <th style="text-align:center;width:80px;">&nbsp;</th>
                    <th style="text-align:center;width:190px;">&nbsp;</th>
                    <th style="text-align:center;width:80px;">&nbsp;</th>
                    <th style="text-align:center;width:80px;">&nbsp;</th>
                    <th style="text-align:center;width:110px;">&nbsp;</th>
                    <th style="text-align:right;width:70px;">
                    <apex:outputPanel rendered="{!is_hidden_all}" layout="none">
                        {!$ObjectType.QuoteLineItem.fields.TotalPrice.label}
                    </apex:outputPanel>
                    <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                        {!$ObjectType.QuoteLineItem.fields.Discount.label}
                        <!-- {!$ObjectType.Quote.fields.Discount_Special__c.label} -->
                    </apex:outputPanel>
                    </th>
                    <th style="text-align:center;width:120px;">
                        <apex:inputText id="discount" value="{!discount}" style="width: 105px;text-align: right;"/>
                    </th>
                    <th style="text-align:right;width:110px;">
                    <apex:outputPanel rendered="{!is_hidden_all}" layout="none">
                        &nbsp;&nbsp;&nbsp;&nbsp;客户总价
                    </apex:outputPanel>
                    <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                        % <input type="button" value="适用" onclick="setall();"/>&nbsp;&nbsp;&nbsp;&nbsp;客户总价
                    </apex:outputPanel>
                    </th>
                    <th style="text-align:center;width:120px;"><apex:inputField id="totalCustomPrice" value="{!quo.Custom_Price_Total_Text__c}" style="width: 105px;text-align: right;"/></th>
                    <th style="text-align:left;width:220px;">
                    <apex:outputPanel rendered="{!is_hidden_all}" layout="none">
                        &nbsp;
                    </apex:outputPanel>
                    <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                         <input type="button" value="确定" onclick="setCPD();"/>
                    </apex:outputPanel>
                    <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                        <input type="button" value="产品配套搜索" onclick="searchSetProduct();"/>
                    </apex:outputPanel>
                    </th>
                </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/18 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;">
                        添加行
                    :&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>
                    <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/18 end -->
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <th style="text-align:right;">No</th>
                    <th style="text-align:center;">{!$ObjectType.QuoteLineItem.fields.Set__c.label}</th>
                    <th style="text-align:center;">{!$ObjectType.Product2.fields.name.label}</th>
                    <th style="text-align:center;">{!$ObjectType.Product2.fields.ProductCode.label}</th>
                    <th style="text-align:center;">{!$ObjectType.Product2.fields.Product_ECCode__c.label}</th>
                    <th style="text-align:center;">{!$ObjectType.QuoteLineItem.fields.UnitPrice.label}</th>
                    <th style="text-align:center;">{!$ObjectType.QuoteLineItem.fields.Quantity.label}</th>
                    <th style="text-align:center;">{!$ObjectType.QuoteLineItem.fields.Discount.label} %</th>
                    <th style="text-align:center;">{!$ObjectType.QuoteLineItem.fields.TotalPrice.label}</th>
                    <th style="text-align:center;">{!$ObjectType.QuoteLineItem.fields.Custom_Price__c.label}</th>
                    <th style="text-align:center;">{!$ObjectType.QuoteLineItem.fields.Description.label}</th>
                </tr>
            </table>
             <!-- 多年保修 end -->
            <DIV style="OVERFLOW-Y: hidden; OVERFLOW-X:auto;width:1260px">
            <!-- 多年保修  start -->
            <!-- 外贸多年保 内外贸表格长度一致  精琢技术 wql 2021/01/28 start -->
            <table style="width:1640px;" border="0">
            <!-- 外贸多年保 内外贸表格长度一致  精琢技术 wql 2021/01/28 end -->
              <!-- 多年保修 end -->
                <tr>
                     <th style="text-align:center;width:15px;">&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:125px;">{!$Label.Asset_No}</th>
                    <th style="text-align:center;width:70px;">{!$Label.SFDA_Status}</th>
                    <th style="text-align:center;width:100px;">{!$ObjectType.product2.fields.VenderName__c.label}</th>
                    <th style="text-align:center;width:100px;">{!$Label.ListPrice}</th>
                    <th style="text-align:center;width:50px;">{!$Label.Quantity}</th>
                    <th style="text-align:center;width:20px;">{!$Label.Specifications}</th>
                    <th style="text-align:center;width:100px;">医院单价</th>
                    <th style="text-align:center;width:100px;">医院小计</th>
                    <!-- 新加的 -->
                    <!--    2018/09/28 CHAN-B4YAB8 赠送、经销商价格和小计 start -->
                    <!-- <th style="text-align:center;width:50px;">{!$Label.Present}</th>  -->
                    <!--    2018/09/28 CHAN-B4YAB8 赠送、经销商价格和小计 start -->
                    <!-- 多年保修 start -->
                    <!-- 外贸多年保 取消多年保修 保修 隐藏 精琢技术 wql 2021/01/18 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/18 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:350px;">{!$Label.Product_Name}</th>
                    <th style="text-align:center;width:110px;" hidden="hidden">{!$Label.AgencyPrice}</th>
                    <th style="text-align:center;width:110px;" hidden="hidden">{!$Label.AgencySum_Total}</th>
                    <!-- 外贸多年保 取消nodiscount隐藏 精琢技术 wql 2021/01/18 start -->
                    <!-- <apex:variable value="{!1}" var="abc" rendered="{!IF(trade   == '内貿',true,false)}"> -->
                        <th style="text-align:center;width:100px;" hidden="hidden">
                            {!$ObjectType.QuoteLineItem.fields.NoDiscountTotal__c.label}
                        </th>
                    <!-- </apex:variable> -->
                    <!-- 外贸多年保 取消nodiscount隐藏 精琢技术 wql 2021/01/18 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:1688px;overflow-x: hidden;">
                <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:1640px;" border="">
            <!-- 外贸多年保 内外贸table一致 精琢技术 wql 2021/01/28 end -->
            <div id="iframelike" style="width:1218px;">
                <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0; width:1200px; border-collapse: collapse; table-layout: fixed;" border="0">
                    <apex:variable value="{!1}" var="cnt" />
                    <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:15px;">
                        <input type="checkbox" name="checklist" value="{!s.lineNo}" style="width:10px;"/>
                    </td>
                    <td class="dataCell" style="width:15px;text-align:center;">
                        <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:125px;">
                        <apex:inputText id="Assert" style="width:95%;" value="{!s.Asset_Model}" onclick="searchProduct('{!s.lineNo}',this.value)" />
                    </td>
                    <td class="dataCell" id="{!Text(cnt-1)}:td_Status__c" style="width:70px;text-align: center;">
                        <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 == '○') && s.changed_sfda == false, 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">
                                //alert(j$(escapeVfId('{!Text(cnt-1)}' + ':td_Status__c')).size());
                                j$(escapeVfId('{!Text(cnt-1)}' + ':td_Status__c')).css({"color":"red"});
                            </script>
                        </apex:outputPanel>
                    </td>
                    <!-- CHAN-BKU3XH 检查是否存在不是同一个供销商名称 精琢技术 2020/02/17 Start -->
                    <td class="dataCell" style="width:100px;text-align: center;">
                            <apex:outputText id="VenderName" value="{!s.VenderName}" />
                            <apex:inputHidden id="VenderName__c" value="{!s.VenderName}" />
                    <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:10px;text-align:left;">
                                <apex:inputHidden id="PbeId" value="{!s.pageObject.PricebookEntryId}"/>
                                <apex:inputHidden id="ProId" value="{!s.pageObject.Product2Id}"/>
                                <apex:inputHidden id="price0" value="{!s.salesPrice}"/>
                                <apex:inputHidden id="price1" value="{!s.salesPriceA}"/>
                                <apex:inputHidden id="price2" value="{!s.salesPriceB}"/>
                                <apex:inputHidden id="price3" value="{!s.salesPriceC}"/>
                                <apex:inputHidden id="hidSet" value="{!s.pageObject.Set__c}"/>
                                <apex:inputHidden id="hiddenflg" value="{!s.hiddenflg}"/>
                                <apex:outputLabel id="indexNo" value="{!IF(s.productName==null,null,s.lineNo + 1)}" style="width:90%;text-align:center;"/>
                                <!-- XHL-20190515-AddStart -->
                                <apex:inputHidden id="QuantityReference" value="{!s.pageObject.Quantity}"/>
                                <apex:inputHidden id="ProductNameReference" value="{!s.productName}"/>
                                <apex:inputHidden id="DiscountReference" value="{!s.pageObject.Discount}"/>
                                <apex:inputHidden id="SingleProduct" value="{!s.pageObject.SingleProduct__c}"/>
                                <!-- XHL-20190515-AddEnd -->
                            </td>
                            <td class="dataCell" style="text-align:center;width:70px;">
                                <apex:outputText id="Set" style="width:90%;text-align:right;" value="{!s.setName}"/>
                                <apex:inputHidden id="SetName" value="{!s.setName}"/>
                                <!-- XHL-20190426-AddStart -->
                                <!-- <apex:inputHidden id="SingleProduct" value="{!s.pageObject.SingleProduct__c}"/> -->
                                <!-- XHL-20190426-AddEnd -->
                            </td>
                            <!-- 产品主数据增加“不可取消多年保” 2020/08/28 精琢技术 wql start -->
                            <apex:inputHidden id="CanNotCancelledGurantee__c" value="{!s.CanNotCancelledGurantee}" />
                            <!-- 产品主数据增加“不可取消多年保” 2020/08/28 精琢技术 wql end -->
                            <!-- 阿西赛多 2020/09/10 精琢技术 wql start -->
                            <apex:inputHidden id="Is_DangerousChemicals__c" value="{!s.Is_DangerousChemicals}" />
                            <!-- 阿西赛多 2020/09/10 精琢技术 wql end -->
                    </td>
                    <!-- CHAN-BKU3XH 检查是否存在不是同一个供销商名称 精琢技术 2020/02/17 end -->
                    <td class="dataCell" id="{!Text(cnt-1)}:td_ListPrice" style="width:100px;text-align: center;">
                        <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}"/>
                        <apex:outputPanel layout="none" rendered="{!IF(s.changed_list == true, true, false)}">
                            <script type="text/javascript">
                                j$(escapeVfId('{!Text(cnt-1)}' + ':td_ListPrice')).css({"color":"red"});
                            </script>
                        </apex:outputPanel>
                    </td>
                    <td class="dataCell" style="text-align: center;width:50px;">
                        <!--    2018/09/28 CHAN-B4YAB8 经销商单价计算 start -->
                        <apex:inputField id="Quantity" style="width:30px;text-align:center;" value="{!s.PageObject.Quantity__c}" onChange="calPrice('{!s.lineNo}');quoteAgencyTotalPriceAction();AgencyDiscountCalculation1();"/>
                        <!--    2018/09/28 CHAN-B4YAB8 经销商单价计算 end -->
                    </td>
                    <td class="dataCell" style="width:20px;text-align: center;">
                        <apex:outputText style="width:15px;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:center;" rendered="{!displayFlg}" value="{!s.PageObject.UnitPrice_Page__c}" onChange="calPrice('{!s.lineNo}')"/>
                    </td>
                            <td class="dataCell" style="text-align:center;width:170px;">
                                <apex:inputText id="ProductName" style="width:90%;" value="{!s.productName}" onclick="searchProduct('{!s.lineNo}',this.value,'{!s.pageObject.Set__c}')" onchange="doReroadJs('{!s.lineNo}');" />
                            </td>
                    <td class="dataCell" style="width:100px;text-align:center;">
                        <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>
                            <td class="dataCell" style="text-align:center;width:70px;">
                                <apex:outputText id="ProductCode" style="width:90%;text-align:right;" value="{!s.productCode}" />
                                <apex:inputHidden id="ProductCodeHidden" value="{!s.productCode}"/>
                            </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> -->
                            <td class="dataCell" style="text-align:center;width:70px;">
                                <apex:outputText id="ProductEC" style="width:90%;text-align:right;" value="{!s.productEC}"/>
                                <apex:inputHidden id="ProductECHidden" value="{!s.productEC}"/>
                            </td>
                    <!-- CHAN-B4YAB8 2018/9/28 经销商单价和小计 end -->
                    <!-- 多年保修 start -->
                    <!-- 外贸多年保 取消多年保修 保修的隐藏 精琢技术 wql 2021/01/18 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:90%; text-align:center; display:{!IF(displayFlg, '', 'none')}" id="warrantyType" html-disabled="true" value="{!s.PageObject.warrantyType__c}" />
                        </td>
                    </apex:variable>
                    <!-- 外贸多年保 取消多年保修 保修的隐藏 精琢技术 wql 2021/01/18 end -->
                    <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 -->
                            <td class="dataCell" style="text-align:center;width:100px;">
                            <apex:outputPanel rendered="{!is_hidden_all}" layout="none">
                                &nbsp;
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                                <apex:inputText id="UnitPrice" style="width:90%;text-align:right;" value="{!s.pageObject.UnitPrice}" onchange="changeLimit({!cnt-1});"/>
                            </apex:outputPanel>
                                <apex:inputHidden id="isProductModel" value="{!s.isProductModel}"/>
                            </td>
                    <!-- 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="text-align:center;width:60px;">
                                <apex:inputText id="Quantity" style="width:90%;text-align:right;" value="{!s.pageObject.Quantity}" onchange="setTotalPrice({!cnt-1},false)"/>
                                <!-- <apex:inputHidden id="QuantityReference" value="{!s.pageObject.Quantity}"/> -->
                            </td>
                    <!-- 新加的 -->
                    <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" 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.changed_name == true || 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:110px;">
                            <apex:outputPanel rendered="{!is_hidden_all}" layout="none">
                                &nbsp;
                            </apex:outputPanel>
                    <!-- 报价试算 注释 -->
                    <td class="dataCell" style="text-align:center;width:100px;" hidden="hidden">
                        <apex:inputField id="Agency_UnitPrice" html-disabled="true" style="width:80%;text-align:center;" rendered="{!displayFlg}" value="{!s.PageObject.AgencyUnitPrice__c}" onChange="calAgencyPrice('{!s.lineNo}')"/>
                    </td>
                    <!-- 报价试算 注释 -->
                    <td class="dataCell" style="width:100px;text-align:center;" hidden="hidden">
                        <apex:outputText style="width:80px; text-align:center; 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>
                        <!-- CHAN-B4YAB8 2018/9/28 经销商小计 start  -->
                        <apex:inputHidden id="AgencySubtotal__c" value="{!s.PageObject.AgencySubtotal__c}" rendered="{!displayFlg}"/>
                        <!-- CHAN-B4YAB8 2018/9/28 经销商小计 end  -->
                        <!-- 多年保修 start -->
                        <apex:inputHidden id="GuaranteePeriod__c" value="{!s.PageObject.GuaranteePeriod__c}" rendered="{!displayFlg}"/>
                            <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                                <apex:inputText id="Discount" style="width:90%;text-align:right;" value="{!s.pageObject.Discount}" onchange="setTotalPrice({!cnt-1},false)" />
                                <!-- <apex:inputText id="Discount" style="width:90%;text-align:right;" value="{!s.Discount}" onchange="setTotalPrice({!cnt-1})"/> -->
                            </apex:outputPanel>
                            </td>
                        <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}"/>
                            <td class="dataCell" style="text-align:center;width:100px;">
                            <apex:outputPanel rendered="{!is_hidden_all}" layout="none">
                                &nbsp;
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                                <apex:outputText id="TotalPrice" style="width:90%;text-align:right;" value="{0, number, ###,##0.00}">
                                    <apex:param value="{!s.totalPrice}" />
                                </apex:outputText>
                            </apex:outputPanel>
                            </td>
                        <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}"/>
                            <td class="dataCell" style="text-align:center;width:110px;">
                            <apex:outputPanel rendered="{!is_hidden_all}" layout="none">
                                &nbsp;
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!!is_hidden_all}" layout="none">
                                <apex:inputText id="CustomPrice" style="width:90%;text-align:right;" value="{!s.customPrice}"/>
                            </apex:outputPanel>
                                <apex:inputHidden id="CustomPriceHidden" value="{!s.pageObject.Custom_Price__c}"/>
                            </td>
                        <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/18 start -->
                    <!-- <apex:variable value="{!1}" id="warranty2" var="abc" rendered="{!IF(trade  == '内貿',true,false)}"> -->
                     <!--报价试算 注释  -->
                    <apex:variable value="{!1}" id="warranty2" var="abc" >
                        <td class="dataCell" style="width:100px;text-align:center;" hidden="hidden">
                            <apex:inputField style="width:80px;display:{!IF(displayFlg, '', 'none')}" html-disabled="true" id="NoDiscountTotal" value="{!s.PageObject.NoDiscountTotal__c}"/>
                        </td>
                    </apex:variable>
                    <!-- </apex:variable> -->
                    <!-- 外贸多年保 取消nodiscount隐藏 精琢技术 wql 2021/01/18 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>
                            <td class="dataCell" style="text-align:center;width:200px;">
                                <apex:inputText id="Description" style="width:90%;text-align:left;" value="{!s.pageObject.Description}"/>
                            </td>
                        </tr>
                        <apex:variable value="{!cnt + 1}" var="cnt" />
                    </apex:repeat>
                </table>
            </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>
                                    <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> -->
                                </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>
                                    <!-- <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> -->
                                    <th style="width:100px;" bgcolor="#ffd6c1">
                                    </th>
                                    <td style="width:120px;display:{!IF(hiddenSaveBtn, 'none', '')}" align="center" >
                                        <!-- <apex:commandButton action="{!Jump}" rerender="hiddenQuoid" value="跳转" style="width:90px;"
                                        /> -->
                                        <!-- <apex:commandButton onclick="JumpJs();return false;"  style="width:90px;" value="报价计算" disabled="{!Save_button}"
                                        /> -->
                                        <apex:commandButton onclick="JumpJs();return false;"  style="width:90px;" value="报价计算"
                                        />
                                    </td>
                                    <th style="width:100px;display:{!IF(hiddenSaveBtn, 'none', '')}" 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;text-align:right;"><apex:inputField style="width:230px;" id="SalesName1" value="{!quo.Agency1__c}" onChange=""/></td>
                                     <!--    2018/09/28 CHAN-B4YAB8  去掉onchange function getID1(); end -->
                                    <!--    2018/09/28 CHAN-B4YAB8 经销商折扣 start -->
                                    <!-- 多年保修 第一经销商 折扣变为 可输入 start -->
                                    <td style="width:120px;text-align:center">
                                        <!-- <apex:inputText style="width:50px;text-align:right" id="AgencyDiscount" value="{!AgencyDiscount}" onchange="callFromAgencyDiscount();"/> -->
                                    </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', '')}">
                                <tr>
                                    <th style="width:150px;" align="right">&nbsp;</th>
                                </tr>
                                <tr>
                                    <td style="width:150px;" align="right"><apex:commandButton onclick="save2btn();return false;" value="{!$Label.Save_Button}" style="width:90px;" disabled="{!Save_button}" /></td>
                                </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="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>
                            </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>
                        <td colspan="1">&nbsp;</td>
                        <th colspan="7">{!$ObjectType.Quote.fields.Comment__c.label}</th>
                        <td colspan="3">&nbsp;</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>
                        <td colspan="1">&nbsp;</td>
                        <td colspan="7"><apex:inputTextarea id="comment" value="{!quo.Comment__c}" rows="5" style="width: 100%;resize: none;"/></td>
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <td colspan="2"><apex:commandButton onclick="undecidebtn();" value="{!$Label.UnDecide_Button}" style="width:110px;" rerender="dummy" disabled="{!!isdecide || !isAdmin}" rendered="{!isAdmin}"/></td>
                    </tr>
                    <tr>
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <td style="text-align:right;width:110px;"><apex:commandButton onclick="save2btn();return false;" value="{!$Label.Save_Button}" style="width:110px;" rerender="dummy" disabled="{!isdecide}"/></td>
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <td style="text-align:right;width:110px;"><apex:commandButton onclick="oppReflection2btn();" value="{!$Label.Save_Close_Button}" style="width:110px;" rerender="dummy" disabled="{!isdecide}"/></td>
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <td style="text-align:right;width:110px;"><apex:commandButton onclick="decidebtn();" value="{!$Label.Decide_Button}" style="width:110px;" rerender="dummy" disabled="{!decideFlg || isdecide}"/></td>
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <td style="width:110px;" align="right"><apex:commandButton onclick="backbtn();" value="{!$Label.NoSave_Return_Button}" style="width:90px;" rerender="dummy"/></td>
                        <th style="text-align:right;width:50px;">&nbsp;</th>
                        <td style="width:110px;" align="right"><apex:commandButton onclick="printPDF();" value="打印PDF" style="width:110px;" rerender="dummy" disabled="{!!printFlg}"/></td>
                        <td width="120px">打印明细价格&nbsp;<input type="checkbox" id="isPrintPrice"/></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;
             <!--  <hr id="hid" onmouseout="dummy();" /> -->
    </apex:form>
        };
        //SFDC停止预警(预计消耗到期日标红) lt 20210928 add start
        MarkRed();
        //SFDC停止预警(预计消耗到期日标红) lt 20210928 add end
    </script>
    <!-- //添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 end -->
    <apex:form id="fileForm">
        <table border="0">
            <tr>
                <th>报价导入:</th>
                <th>1.<apex:inputFile value="{!contentFile}" filename="{!nameFile}" /></th>
            </tr>
            <tr>
                <th>&nbsp;</th>
                <th>2.&nbsp;<apex:commandButton action="{!csvRead}"  value="读取CSV"/></th>
                <!-- <th>2.&nbsp;<apex:commandButton onclick="dummy1();" value="读取CSV"/></th>-->
            </tr>
        </table>
    </apex:form>
</apex:page>