From 35910c355f74e736e2068a0ffb7f39ae9615d8e1 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期五, 24 五月 2024 16:29:00 +0800
Subject: [PATCH] 1

---
 force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js |   29 ++++++-----------------------
 1 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js b/force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js
index e81cef7..7706a06 100644
--- a/force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js
+++ b/force-app/main/default/lwc/lexNewQuoteEntry/lexNexQuoteEntryUtil.js
@@ -738,23 +738,13 @@
     } 
 } 
 function SetProductId(lineno,selectv){
-   //fy DB202312538864 2024.02.02 start
-    // var Product2 = {};
-    // var PricebookEntry = {Product2:Product2};
-    // var pageObject = {};
-    // var addobj = {PricebookEntry:PricebookEntry,
-    //                 latestInfo:latestInfo,
-    //                 pageObject:pageObject};
-    // var attributes1 = {type: "PricebookEntry"};
-    // var attributes2 = {type: "Product2"};
-    // var attributes3 = {type: "QuoteLineItem"};
     var Product2 = {};
     var PricebookEntry = {Product2:Product2};
     var latestInfo = {};
-    var pageObject = {PricebookEntry:PricebookEntry,PricebookEntryId:''};
-    var addobj = {latestInfo:latestInfo,
+    var pageObject = {};
+    var addobj = {PricebookEntry:PricebookEntry,
+                    latestInfo:latestInfo,
                     pageObject:pageObject};
-    //fy DB202312538864 2024.02.02 end
     var Asset_Model_No__c = selectv.Product2.Asset_Model_No__c;
     var Product2Id = selectv.Product2Id;
     var SFDA_Status__c = selectv.Product2.SFDA_Status__c
@@ -775,8 +765,8 @@
     var Intra_Trade_Service_USD = selectv.Product2.NoDiscount_Foreign__c;
     var Maintenance_Price_Year_USD = selectv.Product2.Repair_Contract_USD__c;
     // chenijngwu 20240319 SP涓绘満 start
-    addobj.pageObject.PricebookEntry.Product2.ProductCategory__c = selectv.Product2.ProductCategory__c;
-    if(addobj.pageObject.PricebookEntry.Product2.ProductCategory__c == 'SP涓绘満'){
+    addobj.PricebookEntry.Product2.ProductCategory__c = selectv.Product2.ProductCategory__c;
+    if(addobj.PricebookEntry.Product2.ProductCategory__c == 'SP涓绘満'){
         addobj.SPAssistantFlag = true;
     }
     // chenijngwu 20240319 SP涓绘満 end
@@ -1066,15 +1056,8 @@
     console.warn(JSON.stringify(quoteLineItem));
     quoteLineItem.forEach(quotltiem=>{
         // chenjingwu 20240411 start
-        if(quotltiem.PricebookEntry === undefined){
-            quotltiem.PricebookEntry = {Product2:{}};
-          }else{
-              if(quotltiem.PricebookEntry.Product2 === undefined){
-                  quotltiem.PricebookEntry.Product2 = {};
-              }
-          }
         if(quotltiem.ProductCategory !== undefined && quotltiem.ProductCategory !== null){
-            quotltiem.PricebookEntry.Product2.ProductCategory__c = quotltiem.ProductCategory;
+            quotltiem.pageObject.PricebookEntry.Product2.ProductCategory__c = quotltiem.ProductCategory;
         }
         // chenjingwu 20240411 end        
         quotltiem.Quantity__c = quotltiem.pageObject.Quantity__c;

--
Gitblit v1.9.1