From 928399eceec50e3d37ea08669a12789a9410a9d2 Mon Sep 17 00:00:00 2001
From: 沙世明 <shashiming@prec-tech.com>
Date: 星期二, 22 十一月 2022 16:51:16 +0800
Subject: [PATCH] 111

---
 force-app/main/default/staticresources/NewQuoteEntryJS.bin |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 56 insertions(+), 4 deletions(-)

diff --git a/force-app/main/default/staticresources/NewQuoteEntryJS.bin b/force-app/main/default/staticresources/NewQuoteEntryJS.bin
index c19cb19..36e5ba4 100644
--- a/force-app/main/default/staticresources/NewQuoteEntryJS.bin
+++ b/force-app/main/default/staticresources/NewQuoteEntryJS.bin
@@ -161,12 +161,14 @@
 }
 
 // 璺宠浆鑷抽�夋嫨浜у搧椤甸潰
-function searchProduct(i, str) {
+function searchProduct(i, str, celon) {
     // CNY USD銈掑彇寰�
     j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Assert')).attr('readonly', true);
     //    var trade = j$(escapeVfId("Page:mainForm:block:CurrencyIsoCode")).value();
     //    openPopup('/apex/SearchProduct?trade=' + trade + '&lineno=' + i + '&val=' + str, 'setsearch', 950, 450, 'width=950,height=450,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true);
-    openPopup('/apex/SearchProduct?lineno=' + i + '&val=' + str, 'setsearch', 950, 450, 'width=950,height=450,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true);
+    // Celon璇环淇敼 2022-04-24 ssm start
+    openPopup('/apex/SearchProduct?lineno=' + i + '&val=' + str + '&celon=' + celon, 'setsearch', 950, 450, 'width=950,height=450,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true);
+    // Celon璇环淇敼 2022-04-24 ssm end
     //var w = openPopup('/apex/SearchProduct?trade=' + trade + '&lineno=' + i + '&val=' + str, 'search','width=950,height=450');
     //w.focus();
 }
@@ -193,12 +195,18 @@
 // 椤甸潰鍒濆鍖栨柟娉�
 function calonLoad() {
     var productStatusUpdated = j$(escapeVfId('Page:mainForm:productStatusUpdated')).val();
-
+    //obsap 缁忛攢鍟�1鍚堝悓閲戦璁$畻 fy start
+    var flg=true;
+    //obsap 缁忛攢鍟�1鍚堝悓閲戦璁$畻 fy end
+    debugger
     var pathname = window.location.pathname;
     if (pathname.indexOf('SI') != -1) {
         EstimationListPrice.call();
         calUnitPriceTotal.call();
         quoteTotalPrice.call();
+        //obsap 缁忛攢鍟�1鍚堝悓閲戦璁$畻 fy start
+        flg=false;
+        //obsap 缁忛攢鍟�1鍚堝悓閲戦璁$畻 fy end
         setOCMAmount.call();
         checkProductStatusValidPeriod();
         ProSFDC_Status_Update();
@@ -227,6 +235,25 @@
         // j$(escapeVfId('Page:mainForm:block:Dealer_Final_Price')).attr('disabled',false);
     }
     // 鎶ヤ环 绮剧悽鎶�鏈� fy 2021-09-06 end
+    //obsap 缁忛攢鍟�1鍚堝悓閲戦璁$畻 fy start
+    if(flg){
+        var z = j$(escapeVfId('Page:mainForm:block:quoTotalPrice')).value();
+        var s=j$(escapeVfId('Page:mainForm:block:SalesAmount1')).value();
+        var id = document.getElementById('Page:mainForm:hiddenQuoid').innerHTML;
+        debugger
+        if(!id){
+            if(!s){
+                var IsQuoteTrial =j$(escapeVfId('Page:mainForm:block:IsQuoteTrial')).value();
+                if(!IsQuoteTrial){
+                    z=localParseFloat(z);
+                    j$(escapeVfId('Page:mainForm:block:SalesAmount1')).val(z*0.5);
+                    setOCMAmount();
+                }
+            }
+        }
+        
+    }
+    //obsap 缁忛攢鍟�1鍚堝悓閲戦璁$畻 fy end
     // debugger
     // var SkipQuotefilg = j$(escapeVfId('Page:mainForm:SkipQuotefilg')).value();
     // if(SkipQuotefilg == 'true'){
@@ -857,7 +884,19 @@
         y = y + localParseFloat(x);
     }
     j$(escapeVfId('Page:mainForm:block:quoTotalPrice')).val(toNumComma(y));
-
+    //obsap 缁忛攢鍟�1鍚堝悓閲戦璁$畻 fy start
+    var z = j$(escapeVfId('Page:mainForm:block:quoTotalPrice')).value();
+    var id = document.getElementById('Page:mainForm:hiddenQuoid').innerHTML;
+    debugger
+    if(!id){
+        var IsQuoteTrial =j$(escapeVfId('Page:mainForm:block:IsQuoteTrial')).value();
+        if(!IsQuoteTrial){
+            z=localParseFloat(z);
+            j$(escapeVfId('Page:mainForm:block:SalesAmount1')).val(z*0.5);
+            setOCMAmount();
+        }
+    }
+    //obsap 缁忛攢鍟�1鍚堝悓閲戦璁$畻 fy end
     //DisCalculation.call();
     DisAmount.call();
 
@@ -1138,6 +1177,19 @@
         j$(escapeVfId('Page:mainForm:block:hidden_MultiYearWarrantyTotalPrice')).value();
     noDiscountPriceTotal = localParseFloat(noDiscountPriceTotal);
     j$(escapeVfId('Page:mainForm:block:quoTotalPrice')).val(toNumComma(y + x + noDiscountPriceTotal));
+    //obsap 缁忛攢鍟�1鍚堝悓閲戦璁$畻 fy start
+    var z = j$(escapeVfId('Page:mainForm:block:quoTotalPrice')).value();
+    debugger
+    var id = document.getElementById('Page:mainForm:hiddenQuoid').innerHTML;
+    if(!id){
+        var IsQuoteTrial =j$(escapeVfId('Page:mainForm:block:IsQuoteTrial')).value();
+        if(!IsQuoteTrial){
+            z=localParseFloat(z);
+            j$(escapeVfId('Page:mainForm:block:SalesAmount1')).val(z*0.5);
+            setOCMAmount();
+        }
+    }
+    //obsap 缁忛攢鍟�1鍚堝悓閲戦璁$畻 fy end
     // 澶氬勾淇濅慨 end
     if (y == 0) {
         j$(escapeVfId('Page:mainForm:block:QuoCalculation')).val(0);

--
Gitblit v1.9.1