From ddb0231ef7c5cf2bad9d3f1afc2f733674ad38a5 Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期四, 24 八月 2023 14:50:51 +0800
Subject: [PATCH] 再修理按钮

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

diff --git a/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js b/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
index 9b6cfc7..7871e35 100644
--- a/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
+++ b/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
@@ -57,6 +57,22 @@
             this.opportunityCategory = result.opportunityCategory;
             this.agency1Name = result.agency1Name;
             console.log("1");
+            if(this.closeForecastedDate == undefined){
+                this.closeForecastedDate = '';
+            }else{
+                this.closeForecastedDate = new String(this.closeForecastedDate).replace("-","/");
+            }
+            console.log(this.closeForecastedDate);
+            if(this.bidPlannedDate == undefined){
+                this.bidPlannedDate = '';
+            }else{
+                this.bidPlannedDate = new String(this.bidPlannedDate).replace("-","/");
+            }
+            if(this.dealerFinalPrice == undefined){
+                this.dealerFinalPrice = '';
+            }
+            console.log(this.bidPlannedDate);
+            console.log(this.dealerFinalPrice);
             this.newOpportunityAgency();
         }).catch(error=>{
             console.log("error");
@@ -69,15 +85,15 @@
             var newflag = true;
             if (this.agency1Id == undefined) {
                 newflag = false;
-                alert("缁忛攢鍟嗕笉瀛樺湪锛屼笉鑳借浆鎴愩�愮粡閿�鍟嗙洰鏍囪浠枫�戙��");
+                this.showToast("缁忛攢鍟嗕笉瀛樺湪锛屼笉鑳借浆鎴愩�愮粡閿�鍟嗙洰鏍囪浠枫�戙��","error");
             }
             else if (this.agencyOpportunity != undefined) {
                 newflag = false;
-                alert("宸茬粡杞垚杩囥�愮粡閿�鍟嗙洰鏍囪浠枫�戙��");
+                this.showToast("宸茬粡杞垚杩囥�愮粡閿�鍟嗙洰鏍囪浠枫�戙��","error");
             }
             else if (this.trade != '鍐呰部') {
                 newflag = false;
-                alert("涓嶆槸鍐呰锤锛屼笉鑳借浆鎴愩�愮粡閿�鍟嗙洰鏍囪浠枫�戙��");
+                this.showToast("涓嶆槸鍐呰锤锛屼笉鑳借浆鎴愩�愮粡閿�鍟嗙洰鏍囪浠枫�戙��","error");
             }
             else {
                 var records = null;
@@ -89,7 +105,7 @@
                     records = result;
                     if (records == null || records.length == 0) {
                         newflag = false;
-                        alert("娌℃湁鏈夋晥鐨勩�愮粡閿�鍟嗗尰闄€�戙��");
+                        this.showToast("娌℃湁鏈夋晥鐨勩�愮粡閿�鍟嗗尰闄€�戙��","error");
                     }
                     if (newflag) {
                         console.log("5");
@@ -101,7 +117,7 @@
                             console.log("6");
                             var recTypeList = result;
                             if (recTypeList.length == 0) {
-                                    alert("娌℃湁鎵惧埌锛岀粡閿�鍟嗚浠风殑瀹氫箟銆�");
+                                    this.showToast("娌℃湁鎵惧埌锛岀粡閿�鍟嗚浠风殑瀹氫箟銆�","error");
                                 } else {
                                     console.log("7");
                                     queryForRecords2({
@@ -154,6 +170,7 @@
                                         console.log("10");
                                         console.log(records[0]);
                                         var ahl = records[0];
+                                        
                                         try {
                                             var url = "/a2Y/e?retURL=%2F" 
                                             + this.recordId 
@@ -205,4 +222,4 @@
     updateRecordView(recordId) {
         updateRecord({fields: { Id: recordId }});
     }
-}
+}
\ No newline at end of file

--
Gitblit v1.9.1