From 4363dfe1869bda7e042d4755ab005f8997b45ae0 Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期一, 15 五月 2023 11:11:00 +0800
Subject: [PATCH] 现场统一收货

---
 force-app/main/default/classes/AllReceivedFseController.cls       |   13 +++++--------
 force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js |   11 ++++++++---
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/force-app/main/default/classes/AllReceivedFseController.cls b/force-app/main/default/classes/AllReceivedFseController.cls
index 9d19029..23805dc 100644
--- a/force-app/main/default/classes/AllReceivedFseController.cls
+++ b/force-app/main/default/classes/AllReceivedFseController.cls
@@ -1,14 +1,11 @@
 public with sharing class AllReceivedFseController {
-    public AllReceivedFseController() {
-        
-    }
 
     @AuraEnabled
     public static InitData init(String recordId){
         InitData res = new InitData();
         Rental_Apply__c ra = [SELECT Id, Loaner_received_ng_num__c from Rental_Apply__c where Id = :recordId];
-        res.Id = ra.Id;
-        res.LoanerReceivedNgNum = Integer.valueOf(ra.Loaner_received_ng_num__c);
+        res.id = ra.Id;
+        res.loanerReceivedNgNum = Integer.valueOf(ra.Loaner_received_ng_num__c);
 
         return res;
     }
@@ -28,7 +25,7 @@
 
         if(updateList.size()>0){
             try {
-                update updateList;
+                Update updateList;
                 return 'SUCCESS';
             }
             catch (Exception e) {
@@ -41,8 +38,8 @@
 
     public Class InitData{
         @AuraEnabled
-        public String Id;
+        public String id;
         @AuraEnabled
-        public Integer LoanerReceivedNgNum;
+        public Integer loanerReceivedNgNum;
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js b/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js
index f6ebf2b..f97ad18 100644
--- a/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js
+++ b/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js
@@ -25,13 +25,15 @@
 		init({
 			recordId: this.recordId
 		}).then(res=>{
-			if(res.LoanerReceivedNgNum == 0){
+			console.log('loanerReceivedNgNum==='+ res.loanerReceivedNgNum);
+			if(res.loanerReceivedNgNum == 0){
 				const evt = new ShowToastEvent({
                         title : '鐜板満宸茬粡鍏ㄩ儴鏀跺埌瀹炵墿浜�',
                         message: '',
-                        variant: 'success'
+                        variant: 'error'
                     });
                 this.dispatchEvent(evt);
+                this.dispatchEvent(new CloseActionScreenEvent());
 			}else{
 				getRaeSet({
 					recordId: this.recordId
@@ -57,9 +59,12 @@
 					}
 					
 				})
+				.catch(err=>{
+					console.log('getRaeSet==='+err);
+				})
 			}
 		}).catch(err=>{
-			console.log(err);
+			console.log('init==='+err);
 		})
 	}
 }
\ No newline at end of file

--
Gitblit v1.9.1