binxie
2023-07-11 be102ae06e8f986bd9d1a544cd2752e5fa94231a
force-app/main/default/pages/NewQuoteIrai.page
@@ -50,7 +50,16 @@
        function vpClear2(){
          resetValue('Page:mainForm:block:idVisitorPlace');
        }
        function show(s){
            console.log(s);
            console.log(j$(escapeVfId('Page:mainForm:block:lists:' + 0 + ':Name__c')).value());
            console.log(j$(escapeVfId('Page:mainForm:block:lists:' + 0 + ':url__c')).value());
            let a=j$(escapeVfId('Page:mainForm:block:lists:' + 0 + ':Name__c')).value();
            let linkElement=document.getElementById("Page:mainForm:block:lists:0:NameLink");
            console.log(linkElement);
            let b=linkElement.getAttribute('href');
            console.log(b);
        }
        //訪問場所インスタント検索
        function setVisitorPlace(){
            try{
@@ -195,12 +204,10 @@
    </script>
    <style type="text/css">
        div#iframelike {
            color: #fff;
            height: 300px;
            overflow: auto;
        }
        div#iframelikeheader {
            color: #fff;
            height: 23px;
            overflow: auto;
        }
@@ -272,25 +279,25 @@
                    </tr>
                </table>
            </apex:outputPanel>
            <div>
            <div style="background:rgb(240 238 238);white-space:nowrap;padding:10px">
                <table border="0">
                    <tr>
                        <th style="text-align:right;width:60px;">{!$ObjectType.QuoteIrai__c.fields.IraiSubject__c.Label}</th>
                        <td style="text-align:left;width:220px;">
                        <th style="text-align:right;width:60px;margin:10px;">{!$ObjectType.QuoteIrai__c.fields.IraiSubject__c.Label}</th>
                        <td style="text-align:left;width:220px;margin:10px">
                            <div class="requiredInput"><div class="requiredBlock"></div><apex:inputField id="idVisitorPlace" value="{!quo.IraiSubject__c}" onblur="vpClear2_delay();" onfocus="setVisitorPlace();" style="width:210px;"/></div>
                            <apex:inputHidden id="idVisitorPlaceId" value="{!quo.Account__c}"/>
                            <apex:inputHidden id="idVisitorPlaceHidden" value="{!quo.IraiSubject__c}" />
                            <apex:inputHidden id="idVisitorPlaceHiddenId" value="{!quo.Account__c}" />                    
                        </td>
                        <th style="text-align:right;width:60px;">{!$ObjectType.QuoteIrai__c.fields.IraiName__c.Label}</th>
                        <td style="text-align:left;width:220px;"><apex:inputField value="{!quo.IraiName__c}" style="width:220px;"/></td>
                        <th style="text-align:right;width:60px;">{!$ObjectType.QuoteIrai__c.fields.IraiComment__c.Label}</th>
                        <td style="text-align:left;width:220px;"><apex:inputField value="{!quo.IraiComment__c}" style="width:220px;"/></td>
                        <th style="text-align:right;width:60px;">{!$ObjectType.QuoteIrai__c.fields.QuoteProportion__c.Label}</th>
                        <td style="text-align:left;width:60px;"><apex:inputField value="{!quo.QuoteProportion__c}" style="width:50px;text-align:right;"/></td>
                        <th style="text-align:left;width:20px;">%</th>
                        <th style="text-align:right;width:60px;">{!$ObjectType.QuoteIrai__c.fields.QuoteIrai_Status__c.Label}</th>
                        <td style="text-align:left;width:80px;"><apex:outputField value="{!quo.QuoteIrai_Status__c}" style="width:80px;"/></td>
                        <th style="text-align:right;width:60px;margin:10px;">{!$ObjectType.QuoteIrai__c.fields.IraiName__c.Label}</th>
                        <td style="text-align:left;width:220px;margin:10px;"><apex:inputField value="{!quo.IraiName__c}" style="width:220px;"/></td>
                        <th style="text-align:right;width:60px;margin:10px;">{!$ObjectType.QuoteIrai__c.fields.IraiComment__c.Label}</th>
                        <td style="text-align:left;width:220px;margin:10px;"><apex:inputField value="{!quo.IraiComment__c}" style="width:220px;"/></td>
                        <th style="text-align:right;width:60px;margin:10px;">{!$ObjectType.QuoteIrai__c.fields.QuoteProportion__c.Label}</th>
                        <td style="text-align:left;width:60px;margin:10px;"><apex:inputField value="{!quo.QuoteProportion__c}" style="width:70px;text-align:right;"/></td>
                        <th style="text-align:left;width:20px;margin:10px;">%</th>
                        <th style="text-align:right;width:60px;margin:10px;">{!$ObjectType.QuoteIrai__c.fields.QuoteIrai_Status__c.Label}</th>
                        <td style="text-align:left;width:80px;margin:10px;"><apex:outputField value="{!quo.QuoteIrai_Status__c}" style="width:80px;"/></td>
                    </tr>
                </table>
                 <!-- CHAN-BJQ4VZ 精琢技术 2019/12/10 Start -->
@@ -298,16 +305,16 @@
                    <tr>
                        <td>&nbsp;</td>
                        <!-- <th style="text-align:right">{!IF(displayFlg,'产品标准定价总额','')}</th> -->
                        <th style="text-align:right;width:50px;">产品标准定价总额 :&nbsp;</th>
                        <td style="width:176px;">
                        <th style="text-align:right;width:50px;white-space:nowrap;padding:20px;">产品标准定价总额 :&nbsp;</th>
                        <td style="width:176px;padding:10px;">
                            <apex:outputText id="Estimation_Price"  value="{0, number, ###,##0.00}"
                            style="text-align:right;width:100px;">
                                <apex:param value="{!qb.Estimation_List_Price}" />
                            </apex:outputText>
                        </td>
                        <th style="text-align:right;width:50px;">报价总额 :&nbsp;</th>
                        <th style="text-align:right;width:100px;white-space:nowrap;padding:10px;">报价总额 :&nbsp;</th>
                       <!--  <th style="text-align:right;">{!IF(displayFlg,$Label.Total_Price,'')}</th> -->
                        <td style="width:180px;">
                        <td style="width:180px;margin:10px;">
                            <apex:outputtext id="quoTotalPrice" value="{0, number, ###,##0.00}" 
                            style="text-align:right;width:100px;">
                                <apex:param value="{!qb.QuoteTotal_Page}"/>
@@ -319,29 +326,29 @@
                <!-- CHAN-BJQ4VZ 精琢技术 2019/12/10 End -->
                <table border="0">
                    <tr>
                        <th style="width:50px;">&nbsp;</th>
                        <th style="width:50px;margin:10px;">&nbsp;</th>
                        <!-- 产品配套检索按钮 -->
                        <td style="width:100px;"><apex:commandButton id="SetProduct" onclick="searchSetProduct();return false;" value="{!$Label.Set_Product}" rerender="dummy"/></td>
                        <td style="width:150px;margin:10px;"><apex:commandButton id="SetProduct" onclick="searchSetProduct();return false;" value="{!$Label.Set_Product}" rerender="dummy"/></td>
                        <!-- excel 导出按钮 -->
                        <td style="width:100px;"><apex:commandButton onclick="openQuoteExcelImport(event);return false;" value="{!$Label.Excel_Import}" rerender="dummy"/></td>
                        <td style="text-align:right;width:80px;"><apex:commandButton rerender="dummy" id="Btn_RowDelete" onclick="radioChecker2('del');return false;" value="{!$Label.deleteLabel}" style="width:60px;"/></td>
                        <td style="width:150px;">
                            <apex:commandButton rerender="dummy" id="Btn_RowUp" onclick="radioChecker2('up');return false;" value="{!$Label.Row_Up}" style="width:60px;"/>
                            <apex:commandButton rerender="dummy" id="Btn_RowDown" onclick="radioChecker2('down');return false;" value="{!$Label.Row_Down}" style="width:60px;"/>
                        <td style="width:150px;margin:10px;"><apex:commandButton onclick="openQuoteExcelImport(event);return false;" value="{!$Label.Excel_Import}" rerender="dummy"/></td>
                        <td style="text-align:right;width:80px;margin:10px;"><apex:commandButton rerender="dummy" id="Btn_RowDelete" onclick="radioChecker2('del');return false;" value="{!$Label.deleteLabel}" style="width:60px;"/></td>
                        <td style="width:300px;margin:10px;">
                            <apex:commandButton rerender="dummy" id="Btn_RowUp" onclick="radioChecker2('up');return false;" value="{!$Label.Row_Up}" style="width:100px;"/>
                            <apex:commandButton rerender="dummy" id="Btn_RowDown" onclick="radioChecker2('down');return false;" value="{!$Label.Row_Down}" style="width:100px;"/>
                        </td>
                        <th style="text-align:right;width:80px;">{!$ObjectType.QuoteIrai__c.fields.IraiUser__c.Label}</th>
                        <th style="text-align:right;width:80px;margin:10px;">{!$ObjectType.QuoteIrai__c.fields.IraiUser__c.Label}</th>
                        <!-- fy 20220512 -->
                        <!-- <apex:variable value="identif1" var="identif1" rendered="{!!(loginUser !=null&&loginUser.Salesdepartment_text__c != null&&loginUser.Salesdepartment_text__c != ''&&(loginUser.Salesdepartment_text__c == '5.华东' || loginUser.Salesdepartment_text__c == '6.华南'))}"  > -->
                        <apex:variable value="identif1" var="identif1" rendered="{!!(loginUser !=null&&loginUser.Salesdepartment_text__c != null&&loginUser.Salesdepartment_text__c != ''&& obsflag)}"  >
                        <td style="width:150px;"><apex:outputPanel id="IraiUserId"><apex:inputField id="IraiUser" value="{!quo.IraiUser__c}"/></apex:outputPanel></td>
                        <td style="width:150px;margin:10px;"><apex:outputPanel id="IraiUserId"><apex:inputField id="IraiUser" value="{!quo.IraiUser__c}"/></apex:outputPanel></td>
                        </apex:variable>
                        <!-- fy 20220512 -->
                        <!-- <apex:variable value="identif" var="identif" rendered="{!loginUser !=null&&loginUser.Salesdepartment_text__c != null&&loginUser.Salesdepartment_text__c != ''&&(loginUser.Salesdepartment_text__c == '5.华东' || loginUser.Salesdepartment_text__c == '6.华南')}"  > -->
                        <apex:variable value="identif" var="identif" rendered="{!loginUser !=null&&loginUser.Salesdepartment_text__c != null&&loginUser.Salesdepartment_text__c != ''&& obsflag}"  >
                        <!-- <th style="text-align:right;width:20px;">obsap人员</th> -->
                        <td style="text-align:center;width:20px;"><apex:selectList value="{!quo.IraiUser__c}" size="1" style="width:120px" id="IraiUser" onchange="ObsapUsersChange()"><apex:selectOptions value="{!ObsapUsers}" id="obsapUsersList"/></apex:selectList></td>
                        <td style="text-align:center;width:20px;margin:10px;"><apex:selectList value="{!quo.IraiUser__c}" size="1" style="width:120px" id="IraiUser" onchange="ObsapUsersChange()"><apex:selectOptions value="{!ObsapUsers}" id="obsapUsersList"/></apex:selectList></td>
                        </apex:variable>
                        <!-- 20230104 lt DB202212427301 start-->
@@ -350,8 +357,8 @@
                        <!-- 20230104 lt DB202212427301 end-->
                        <!-- 20230104 lt DB202212427301 start-->
                        <th style="text-align:right;width:190px;">紧急:</th>
                        <td style="text-align:center;width:10px;"><apex:inputField id="Urgent" value="{!quo.Urgent__c}"/></td>
                        <th style="text-align:right;width:190px;margin:10px;">紧急:</th>
                        <td style="text-align:center;width:10px;margin:10px;"><apex:inputField id="Urgent" value="{!quo.Urgent__c}"/></td>
                        <!-- 20230104 lt DB202212427301 end-->
                        <!-- 2020/02/18  精琢技术  韩部长提出先隐藏 没必要  Start-->
@@ -369,13 +376,13 @@
                    <td>&nbsp;&nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align:right;width:50px;"></td>
                    <th style="text-align:right;width:50px;" rowspan="2">
                    <td style="text-align:right;width:50px;margin:10px;"></td>
                    <th style="text-align:right;width:50px;margin:10px;" rowspan="3">
                       {!$ObjectType.QuoteIrai__c.fields.MultiYearWarrantyTotalPrice__c.Label}
                   :&nbsp;</th>
                   <!-- <td style="width:470px;"> -->
                       <!--obsap 新增经销商1字段 fy start-->
                   <td style="width:100px;" rowspan="2">
                   <td style="width:100px;" rowspan="3">
                       <!--obsap 新增经销商1字段 fy end-->
                       <apex:outputtext style="width: :100px" id="MultiYearWarrantyTotalPrice_out" value="{0, number, ###,##0.00}" 
                       >
@@ -423,6 +430,17 @@
                <!-- SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy end -->
                </tr>
                <!--obsap 新增经销商1字段 fy end-->
                <!--DB202302464682【报价委托】报价委托改善224 fy start-->
               <tr>
                <td ></td>
                <td ></td>
                <td ></td>
                <th style="width:100px;text-align:right;margin:10px;">{!$Label.Sales_Name2}</th>
                <td colspan="2" style="width:260px;text-align:right;"><apex:inputField style="width:230px;" id="SalesName2"  value="{!quo.Agency2_entrust__c}"   onChange=""/></td>
                <th style="width:100px;text-align:right;margin:10px;"></th>
                <td colspan="2" style="width:120px;text-align:left;margin:10px;"></td>
               </tr>
                <!--DB202302464682【报价委托】报价委托改善224 fy end-->
                <tr>
                    <td>&nbsp;</td>
                </tr>
@@ -434,7 +452,7 @@
                    <td>&nbsp;</td>
                </tr>
            </table>
            <table style="width:1165px;" border="0">
            <table style="width:1165px;background:rgb(240 238 238);" border="0">
                <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>
@@ -457,11 +475,11 @@
                <input type="hidden" id="UnitPriceTotal" value="0" />
                <apex:pageblocktable value="{!activities}" var="s" id="lists" style="width:1165px;">
                    
                    <apex:column style="width:15px;" >
                    <apex:column style="width:20px;" >
                        <input type="checkbox" name="checklist" value="{!s.lineNo}" style="width:10px;"/>
                    </apex:column>
                    <!-- No -->
                    <apex:column style="width:15px;text-align:right;" >
                    <apex:column style="width:20px;text-align:right;" >
                        <apex:outputLabel id="indexNo" value="{!IF(s.PageObject.Product2__c==null,null,s.lineNo + 1)}" style="width:10px;"/>
                    </apex:column>
                    <!-- 产品编号-->
@@ -478,12 +496,15 @@
                    </apex:column>
                    <!-- 产品名称 -->
                    <apex:column style="width:300px;">
                        <div id="Page:mainForm:block:lists:{!s.lineNo}:NameLink"><apex:outputLink style="width:300px;" value="{!baseUrl}/{!s.PageObject.Product2__c}" id="Nametext1" target="_blank">{!s.PageObject.Name__c}</apex:outputLink></div>
                        <div id="Page:mainForm:block:lists:{!s.lineNo}:NameLink">
                            <apex:outputLink style="width:300px;" value="{!baseUrl}/{!s.PageObject.Product2__c}" id="Nametext1" target="_blank">{!s.PageObject.Name__c}</apex:outputLink>
                        </div>
                        <apex:inputHidden id="Name__c" value="{!s.PageObject.Name__c}"/>
                        <apex:inputHidden id="url__c" value="{!s.PageObject.Product2__c}"/>
                    </apex:column>
                    <!-- 数量 -->
                    <apex:column style="text-align:center;width:100px;">
                        <apex:inputField id="Quantity" style="width:50px;text-align:right;" value="{!s.PageObject.Quantity__c}" onChange="calPrice('{!s.lineNo}')"/>
                        <apex:inputField id="Quantity" style="width:50px;text-align:right;" value="{!s.PageObject.Quantity__c}" onclick="show('{!s.PageObject.GuaranteePeriod__c}')" onChange="calPrice('{!s.lineNo}')"/>
                    </apex:column>
                    <!--    2019/11/12 保修年限 CHAN-BHNBX6  start -->
                    <apex:column style="width:50px;text-align:right;" >
@@ -491,7 +512,7 @@
                    </apex:column>
                    <!--    2019/11/12 保修年限 CHAN-BHNBX6  end -->
                    <!-- ListPrice-->
                    <apex:column style="width:85px;text-align:right;">
                    <apex:column style="width:85px;text-align:center;">
                        <apex:outputPanel layout="none" rendered="{!$ObjectType.QuoteIraiLineItem__c.fields.ListPrice__c.accessible}" >
                            <apex:outputText style="width:85px;" id="ListPricetext" value="{0, number, ###,##0.00}">
                                <apex:param value="{!s.ListPrice_Page}" />
@@ -506,7 +527,7 @@
                        </apex:outputPanel>
                    </apex:column>
                    <!-- 小计 -->
                    <apex:column style="width:100px;text-align:right;">
                    <apex:column style="width:100px;text-align:center;">
                        <apex:outputPanel layout="none" rendered="{!$ObjectType.QuoteIraiLineItem__c.fields.ListPrice__c.accessible}" >
                            <apex:outputText style="width:80px;" id="ListPriceTotalText" value="{0, number, ###,##0.00}">
                                <apex:param value="{!s.ListPriceTotal_Page}" />
@@ -523,7 +544,7 @@
                        <apex:inputHidden id="lineNo" value="{!s.lineNo}"/>
                    </apex:column>
                    <!-- CHAN-BHNBX6  NodisCount 小计  2019/11/20 START -->
                    <apex:column style="width:100px;text-align:right;">
                    <apex:column style="width:100px;text-align:center;">
                        <apex:outputPanel layout="none" rendered="{!$ObjectType.QuoteIraiLineItem__c.fields.ServicePrice__c.accessible}" >
                            <apex:outputText style="width:80px;" id="NoDiscountTotalText" value="{0, number, ###,##0.00}">
                                <apex:param value="{!s.NoDiscountTotal_Page}" />
@@ -573,9 +594,9 @@
                            <tr>
                                <th style="width:15px">&nbsp;</th>
                                <!-- SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy start -->
                                <td style="width:100px;" align="right"><apex:commandButton id="QuoteIraiBtn" action="{!checkIraiUser}" reRender="IraiUserId,message1" onclick="blockme();" oncomplete="iraiJs();return false;" value="发送委托邮件" style="width:90px;" disabled="{!Save_button}"/></td>
                                <td style="width:100px;" align="right"><apex:commandButton id="QuoteIraiBtn" action="{!checkIraiUser}" reRender="IraiUserId,message1" onclick="blockme();" oncomplete="iraiJs();return false;" value="发送委托邮件" style="width:100px;white-space:nowrap;" disabled="{!Save_button}"/></td>
                                <!-- SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy end -->
                                <td style="width:100px;" align="right"><apex:commandButton action="{!checkIraiUser}" reRender="IraiUserId,hiddenQuoid,message1" onclick="blockme();" oncomplete="save2btn();return false;" value="{!$Label.Save_Button}" style="width:90px;" disabled="{!Save_button}" /></td>
                                <td style="width:100px;" align="right"><apex:commandButton action="{!checkIraiUser}" reRender="IraiUserId,hiddenQuoid,message1" onclick="blockme();" oncomplete="save2btn();return false;" value="{!$Label.Save_Button}" style="width:100px;" disabled="{!Save_button}" /></td>
                                <!-- 20230109 lt DB202212427301 start  注释 -->
                                <!-- <td style="width:100px;" align="right"><apex:commandButton onclick="oppReflection2btn();return false;" rerender="hiddenQuoid" value="{!$Label.Opp_Button}" style="width:90px;" disabled="{!Save_button}"/></td>
                                <td style="width:100px;" align="right"><apex:commandButton action="{!Back}" rerender="hiddenQuoid" value="不保存(返回)" style="width:90px;"/></td>