From c51e03fbf2f6633d8e88aeec9dcb8df13524df8f Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期四, 13 七月 2023 12:00:06 +0800
Subject: [PATCH] backup0713
---
force-app/main/default/pages/NewQuoteIrai.page | 216 +++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 165 insertions(+), 51 deletions(-)
diff --git a/force-app/main/default/pages/NewQuoteIrai.page b/force-app/main/default/pages/NewQuoteIrai.page
index 8c32313..f538e97 100644
--- a/force-app/main/default/pages/NewQuoteIrai.page
+++ b/force-app/main/default/pages/NewQuoteIrai.page
@@ -1,4 +1,4 @@
-<apex:page controller="NewQuoteIraiController" sidebar="false" action="{!init}" id="Page">
+<apex:page controller="NewQuoteIraiController" sidebar="false" action="{!init}" id="Page" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.jquerysuggestcss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
@@ -85,11 +85,19 @@
}
function iraiJs() {
- var username = j$(escapeVfId("Page:mainForm:block:IraiUser")).val();
- var userid = j$(escapeVfId("Page:mainForm:block:IraiUser_lkid")).val();
-
+ // var username = j$(escapeVfId("Page:mainForm:block:IraiUser")).val();
+ // var userid = j$(escapeVfId("Page:mainForm:block:IraiUser_lkid")).val();
+ var username1 = j$(escapeVfId("Page:mainForm:block:j_id43:IraiUser")).val();
+ var userid = j$(escapeVfId("Page:mainForm:block:j_id43:IraiUser_lkid")).val();
+ var username2 = j$(escapeVfId("Page:mainForm:block:j_id46:IraiUser")).val();
+ //obsap 鏂板缁忛攢鍟�1瀛楁 fy start
+ var Agency1entrustc = j$(escapeVfId("Page:mainForm:block:SalesName1")).val();
+ debugger
+ //obsap 鏂板缁忛攢鍟�1瀛楁 fy end
sforce.connection.sessionId = Session_ID;
-
+ if(!userid&&username2){
+ userid=username2;
+ }
var resultSet = sforce.connection.query( "SELECT Email,SFDCPosition_C__c FROM User WHERE Id = '" + userid + "'");
var records = resultSet.getArray("records");
@@ -100,20 +108,42 @@
mail = iraiUser.Email;
SFDCPosition = iraiUser.SFDCPosition_C__c;
}
- if (mail != null && mail.length > 0) {
- if (SFDCPosition != '钀ヤ笟鍔╃悊'){
- alert('璇烽�夋嫨瀵瑰簲鐨勮惀涓氬姪鐞�.');
- unblockUI();
- }
- else if (window.confirm('纭畾瑕佸鎵樿浜哄憳鍚楋紵\n' + mail)) {
- QuoteIrai();
- } else {
- unblockUI();
+ //obsap 鏂板缁忛攢鍟�1瀛楁 fy start
+ if(Agency1entrustc != null&&Agency1entrustc !=""&&Agency1entrustc.length > 0){
+ if (mail != null && mail.length > 0) {
+ // var Salesdepartment = '{!loginUser.Salesdepartment_text__c}';
+ //fy 20220512
+ var Salesdepartment = {!obsflag};
+ console.log('Salesdepartment:' + Salesdepartment);
+ var positioncheck = true;
+ // if (Salesdepartment == '5.鍗庝笢' || Salesdepartment == '6.鍗庡崡') {
+ //fy 20220512
+ if (Salesdepartment) {
+ mail = '{!obsap_mail}';
+ positioncheck = false;
}
- } else {
- alert('璇烽�夋嫨濮旀墭浜哄憳.');
+ if (positioncheck && SFDCPosition != '钀ヤ笟鍔╃悊'){
+ alert('璇烽�夋嫨瀵瑰簲鐨勮惀涓氬姪鐞�.');
+ unblockUI();
+ }
+ // 20230104 lt DB202212427301 start 娉ㄩ噴
+ // else if (window.confirm('纭畾瑕佸鎵樿浜哄憳鍚楋紵\n' + mail)) {
+ // QuoteIrai();
+ // }
+ // 20230104 lt DB202212427301 end
+ else {
+ QuoteIrai(); // 20230104 lt DB202212427301 end
+ // unblockUI(); // 20230104 lt DB202212427301 end
+ }
+ } else {
+ alert('璇烽�夋嫨濮旀墭浜哄憳.');
+ unblockUI();
+ }
+ }else {
+ alert('璇烽�夋嫨绗竴缁忛攢鍟�.');
unblockUI();
}
+ //obsap 鏂板缁忛攢鍟�1瀛楁 fy end
}
function openpdf(type) {
@@ -289,20 +319,41 @@
<!-- CHAN-BJQ4VZ 绮剧悽鎶�鏈� 2019/12/10 End -->
<table border="0">
<tr>
- <th style="width:40px;"> </th>
+ <th style="width:50px;"> </th>
<!-- 浜у搧閰嶅妫�绱㈡寜閽� -->
- <td style="width:150px;"><apex:commandButton id="SetProduct" onclick="searchSetProduct();return false;" value="{!$Label.Set_Product}" rerender="dummy"/></td>
+ <td style="width:100px;"><apex:commandButton id="SetProduct" onclick="searchSetProduct();return false;" value="{!$Label.Set_Product}" rerender="dummy"/></td>
<!-- excel 瀵煎嚭鎸夐挳 -->
- <td style="width:150px;"><apex:commandButton onclick="openQuoteExcelImport(event);return false;" value="{!$Label.Excel_Import}" rerender="dummy"/></td>
+ <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>
<th style="text-align:right;width:80px;">{!$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>
- <th style="text-align:right;width:80px;">{!$ObjectType.QuoteIrai__c.fields.LastIraiUser__c.Label}</th>
- <td style="text-align:center;width:70px;"><apex:outputField id="LastIraiUser" value="{!quo.LastIraiUser__c}"/></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>
+ </apex:variable>
+
+ <!-- 20230104 lt DB202212427301 start-->
+ <!-- <th style="text-align:right;width:80px;">{!$ObjectType.QuoteIrai__c.fields.LastIraiUser__c.Label}</th>
+ <td style="text-align:center;width:70px;"><apex:outputField id="LastIraiUser" value="{!quo.LastIraiUser__c}"/></td> -->
+ <!-- 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>
+ <!-- 20230104 lt DB202212427301 end-->
+
<!-- 2020/02/18 绮剧悽鎶�鏈� 闊╅儴闀挎彁鍑哄厛闅愯棌 娌″繀瑕� Start-->
<!-- <th style="text-align:right;width:70px;">鎬昏</th>
<td style="text-align:right;width:80px;">
@@ -318,33 +369,71 @@
<td> </td>
</tr>
<tr>
- <td style="text-align:right;width:100px;"></td>
- <th style="text-align:right;width:50px;">
- {!$ObjectType.QuoteIrai__c.fields.MultiYearWarrantyTotalPrice__c.Label}
- : </th>
- <td style="width:470px;">
- <apex:outputtext id="MultiYearWarrantyTotalPrice_out" value="{0, number, ###,##0.00}"
- style="text-align:right;width:180px;">
- <apex:param value="{!qb.MultiYearWarrantyTotalPrice}"/>
- </apex:outputtext>
- </td>
- <!-- <apex:variable id="contractWarranty" value="{!1}" var="abc" rendered="{!IF(trade == '鍐呰部',true,false)}">
-
- <th style="text-align:right;width:50px;">
- {!$ObjectType.Quote.fields.MultiYearWarrantyTotalPrice__c.label}
- : </th>
- <td style="width:470px;">
- <apex:outputtext id="MultiYearWarrantyTotalPrice_out" value="{0, number, ###,##0.00}"
- style="text-align:right;width:180px;">
- <apex:param value="{!quo.MultiYearWarrantyTotalPrice__c}"/>
- </apex:outputtext>
- </td>
- <th style="text-align:right;width:50px;">
- {!$ObjectType.Quote.fields.multiYearWarranty__c.label}
- : </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> -->
+ <td style="text-align:right;width:50px;"></td>
+ <th style="text-align:right;width:50px;" rowspan="3">
+ {!$ObjectType.QuoteIrai__c.fields.MultiYearWarrantyTotalPrice__c.Label}
+ : </th>
+ <!-- <td style="width:470px;"> -->
+ <!--obsap 鏂板缁忛攢鍟�1瀛楁 fy start-->
+ <td style="width:100px;" rowspan="3">
+ <!--obsap 鏂板缁忛攢鍟�1瀛楁 fy end-->
+ <apex:outputtext style="width: :100px" id="MultiYearWarrantyTotalPrice_out" value="{0, number, ###,##0.00}"
+ >
+ <!--obsap 鏂板缁忛攢鍟�1瀛楁 fy start-->
+ <!-- style="text-align:right;width:180px;"> -->
+ <!--obsap 鏂板缁忛攢鍟�1瀛楁 fy end-->
+ <apex:param value="{!qb.MultiYearWarrantyTotalPrice}"/>
+ </apex:outputtext>
+ </td>
+ <!--obsap 鏂板缁忛攢鍟�1瀛楁 fy start-->
+ <th style="width:100px;"> </th>
+ <td style="text-align:right;width:50px;"></td>
+ <td style="text-align:right;width:50px;"></td>
+ <th colspan="2" style="width:260px;text-align:center;">{!$Label.Sales_Name}</th>
+ <!--obsap 鏂板缁忛攢鍟�1瀛楁 fy end-->
+ <!-- <apex:variable id="contractWarranty" value="{!1}" var="abc" rendered="{!IF(trade == '鍐呰部',true,false)}">
+
+ <th style="text-align:right;width:50px;">
+ {!$ObjectType.Quote.fields.MultiYearWarrantyTotalPrice__c.label}
+ : </th>
+ <td style="width:470px;">
+ <apex:outputtext id="MultiYearWarrantyTotalPrice_out" value="{0, number, ###,##0.00}"
+ style="text-align:right;width:180px;">
+ <apex:param value="{!quo.MultiYearWarrantyTotalPrice__c}"/>
+ </apex:outputtext>
+ </td>
+ <th style="text-align:right;width:50px;">
+ {!$ObjectType.Quote.fields.multiYearWarranty__c.label}
+ : </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> -->
+ </tr>
+ <!--obsap 鏂板缁忛攢鍟�1瀛楁 fy start-->
+ <tr>
+ <td ></td>
+ <td ></td>
+ <td ></td>
+ <th style="width:100px;text-align:right;">{!$Label.Sales_Name1}</th>
+ <td colspan="2" style="width:260px;text-align:right;"><apex:inputField style="width:230px;" id="SalesName1" value="{!quo.Agency1_entrust__c}" onChange=""/></td>
+ <!-- SWAG-CKDATG 銆愬鎵樸�戙�怬BSAP-鎶ヤ环濮旀墭銆戞姤浠峰鎵橀」鐩敼鍠�1 fy start -->
+ <th style="width:100px;text-align:right;">澶氬勾淇�</th>
+ <!-- DB202212304166 銆愮揣鎬�-鎶ヤ环濮旀墭涓庤喘涔版剰鍚戙�戣灏嗘渶鍚庢搷浣滅殑鎶ヤ环濮旀墭鐘舵�佹斁鍒拌喘涔版剰鍚戜腑 fy start -->
+ <td colspan="2" style="text-align:left;"><apex:inputField id="cancelMultiyearInsurance" value="{!quo.cancelMultiyearInsurance__c}" onChange="cancelMultiyearInsurancechange()"/></td><!-- onChange="cancelMultiyearInsurancechange()"-->
+ <!-- DB202212304166 銆愮揣鎬�-鎶ヤ环濮旀墭涓庤喘涔版剰鍚戙�戣灏嗘渶鍚庢搷浣滅殑鎶ヤ环濮旀墭鐘舵�佹斁鍒拌喘涔版剰鍚戜腑 fy end -->
+ <!-- SWAG-CKDATG 銆愬鎵樸�戙�怬BSAP-鎶ヤ环濮旀墭銆戞姤浠峰鎵橀」鐩敼鍠�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;">{!$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;"></th>
+ <td colspan="2" style="text-align:left;"></td>
+ </tr>
+ <!--DB202302464682銆愭姤浠峰鎵樸�戞姤浠峰鎵樻敼鍠�224 fy end-->
<tr>
<td> </td>
</tr>
@@ -389,6 +478,9 @@
<!-- 浜у搧缂栧彿-->
<apex:column style="text-align:center;width:150px;">
<apex:inputText id="Assert" style="width:120px;" value="{!s.Asset_Model}" onclick="searchProduct('{!s.lineNo}',this.value)" />
+ <!-- DB202212304166 銆愮揣鎬�-鎶ヤ环濮旀墭涓庤喘涔版剰鍚戙�戣灏嗘渶鍚庢搷浣滅殑鎶ヤ环濮旀墭鐘舵�佹斁鍒拌喘涔版剰鍚戜腑 fy start -->
+ <apex:inputHidden id="CanNotCancelledGurantee__c" value="{!s.CanNotCancelledGurantee}" />
+ <!-- DB202212304166 銆愮揣鎬�-鎶ヤ环濮旀墭涓庤喘涔版剰鍚戙�戣灏嗘渶鍚庢搷浣滅殑鎶ヤ环濮旀墭鐘舵�佹斁鍒拌喘涔版剰鍚戜腑 fy start -->
</apex:column>
<!-- NMPA鐘舵�� -->
<apex:column style="width:100px;text-align:center;">
@@ -453,12 +545,30 @@
<apex:outputPanel layout="none" rendered="{!!$ObjectType.QuoteIraiLineItem__c.fields.ServicePrice__c.accessible}" >
<span style="width:80px;text-align:right;" id="Page:mainForm:block:lists:{!s.lineNo}:NoDiscountTotalText">{!IF(s.PageObject.Product2__c == null, ' ', 0.00)}</span>
<script type="text/javascript">
+ debugger
j$(escapeVfId('Page:mainForm:block:lists:'+ {!s.lineNo} + ':NoDiscountTotal')).val(toNum(0));
</script>
</apex:outputPanel>
</apex:column>
+ <!-- DB202212304166 銆愮揣鎬�-鎶ヤ环濮旀墭涓庤喘涔版剰鍚戙�戣灏嗘渶鍚庢搷浣滅殑鎶ヤ环濮旀墭鐘舵�佹斁鍒拌喘涔版剰鍚戜腑 fy start -->
+ <!-- <apex:column style="width:100px;text-align:right;">
+ <apex:outputPanel layout="none" rendered="{!IF(quo.cancelMultiyearInsurance__c =='瑕�' ||(quo.cancelMultiyearInsurance__c =='涓嶈' && s.CanNotCancelledGurantee == 'true' ),true,false)}" >
+ <apex:outputText style="width:80px;" id="NoDiscountTotalText" value="{0, number, ###,##0.00}">
+ <apex:param value="{!s.NoDiscountTotal_Page}" />
+ </apex:outputText>
+ </apex:outputPanel>
+ <apex:inputHidden id="NoDiscountTotal" value="{!s.NoDiscountTotal_Page}"/>
+ <apex:inputHidden id="NoDiscount" value="{!s.NoDiscount_Page}"/>
+ <apex:outputPanel layout="none" rendered="{!IF(quo.cancelMultiyearInsurance__c =='涓嶈'&& s.CanNotCancelledGurantee == 'false' ,true,false)}" >
+ <span style="width:80px;text-align:right;" id="Page:mainForm:block:lists:{!s.lineNo}:NoDiscountTotalText">{!IF(s.PageObject.Product2__c == null, ' ', 0.00)}</span>
+ <script type="text/javascript">
+ j$(escapeVfId('Page:mainForm:block:lists:'+ {!s.lineNo} + ':NoDiscountTotal')).val(toNum(0));
+ </script>
+ </apex:outputPanel>
+ </apex:column> -->
+ <!-- DB202212304166 銆愮揣鎬�-鎶ヤ环濮旀墭涓庤喘涔版剰鍚戙�戣灏嗘渶鍚庢搷浣滅殑鎶ヤ环濮旀墭鐘舵�佹斁鍒拌喘涔版剰鍚戜腑 fy end -->
<!-- CHAN-BHNBX6 NodisCount 灏忚 2019/11/20 END -->
</apex:pageBlockTable>
</div>
@@ -473,12 +583,16 @@
<table border="0">
<tr>
<th style="width:15px"> </th>
- <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;"/></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:90px;" disabled="{Save_button}" /></td>
- <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>
+ <!-- SWAG-CKDATG 銆愬鎵樸�戙�怬BSAP-鎶ヤ环濮旀墭銆戞姤浠峰鎵橀」鐩敼鍠�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>
+ <!-- SWAG-CKDATG 銆愬鎵樸�戙�怬BSAP-鎶ヤ环濮旀墭銆戞姤浠峰鎵橀」鐩敼鍠�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>
+ <!-- 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>
<td style="width:100px;" align="right"><apex:commandButton value="浜у搧璇曠敤璇勪环OPD" style="width:95px;" onclick="openpdf('OPD');return false;" disabled="{!pdf_button}"/></td>
- <td style="width:100px;" align="right"><apex:commandButton value="浜у搧璇曠敤璇勪环SIS" style="width:95px;" onclick="openpdf('SIS');return false;" disabled="{!pdf_button}"/></td>
+ <td style="width:100px;" align="right"><apex:commandButton value="浜у搧璇曠敤璇勪环SIS" style="width:95px;" onclick="openpdf('SIS');return false;" disabled="{!pdf_button}"/></td> -->
+ <!-- 20230109 lt DB202212427301 end 娉ㄩ噴 -->
</tr>
</table>
</td>
--
Gitblit v1.9.1