From 50ce6a5e5ae7ac6ce3e6281acca9a0db568306e6 Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期三, 23 八月 2023 14:54:59 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
---
force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.js | 84 +++++++++++++++++++++--------------------
1 files changed, 43 insertions(+), 41 deletions(-)
diff --git a/force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.js b/force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.js
index 67d459e..9ec851a 100644
--- a/force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.js
+++ b/force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.js
@@ -13,51 +13,53 @@
recordId: this.recordId
}).then(result=>{
this.IsLoading = false;
- let res = result.ra;
- console.log(res);
- if(res.Campaign__c != '' || res.Campaign__c != undefined){
- if(res.CampaignStatus == '鍙栨秷'){
- this.isShow = true;
- this.msg = '瀛︿細鍙栨秷锛屼笉鍙垎閰�';
- return;
+ if(result){
+ let res = result.ra;
+ console.log(res);
+ if(res.Campaign__c != '' || res.Campaign__c != undefined){
+ if(res.CampaignStatus == '鍙栨秷'){
+ this.isShow = true;
+ this.msg = '瀛︿細鍙栨秷锛屼笉鍙垎閰�';
+ return;
+ }
}
- }
- if(res.Repair__c != '' || res.Repair__c != undefined){
- if(res.Repair_Final_Inspection_Date_F__c != null && res.Repair_Final_Inspection_Date_F__c !=''
- || (res.RC_return_to_office__c!=null && res.RC_return_to_office__c != '')){
- this.isShow = true;
- this.msg = '淇悊鏈夋渶缁堟娴嬫棩鎴栦慨鐞嗗搧杩旈�佹棩锛屼笉鍙垎閰�';
- return;
+ if(res.Repair__c != '' || res.Repair__c != undefined){
+ if(res.Repair_Final_Inspection_Date_F__c != null && res.Repair_Final_Inspection_Date_F__c !=''
+ || (res.RC_return_to_office__c!=null && res.RC_return_to_office__c != '')){
+ this.isShow = true;
+ this.msg = '淇悊鏈夋渶缁堟娴嬫棩鎴栦慨鐞嗗搧杩旈�佹棩锛屼笉鍙垎閰�';
+ return;
+ }
}
- }
- assignBtn({
- Rid: this.recordId
- }).then(resultMsg => {
- if(res.Status__c == '鍙栨秷' && res.Rental_Apply_Equipment_Set_Cnt__c != 0){
- window.open("/apex/RentalFixtureSetAssignAgency?pt_recid=" + this.recordId);
- this.closeAction();
- }else if((res.demo_purpose2__c == '瀛︿細灞曚細' || res.demo_purpose2__c == '璇鹃鐮旂┒' || res.demo_purpose2__c == '鍩硅涓績')&& res.Status__c == '鑽夋涓�'){
- this.isShow = true;
- this.msg = "涓嶈兘鍒嗛厤锛岃纭鐢宠鐨勭姸鎬�";
- return
- }else if((res.demo_purpose2__c =='璇曠敤锛堟棤璇环锛�' || res.demo_purpose2__c == '璇曠敤锛堟湁璇环锛�' || res.demo_purpose2__c =='鍔ㄧ墿瀹為獙' ||
- res.demo_purpose2__c == '涓�鑸淮淇唬鐢�' || res.demo_purpose2__c== '淇濅慨鍚堝悓鐢ㄦ埛缁翠慨浠g敤' || res.demo_purpose2__c == '宸茶喘寰呰揣')
- && res.Status__c != '宸叉壒鍑�' && res.Status__c != '宸插嚭搴撴寚绀�'){
- this.isShow = true;
- this.msg = "涓嶈兘鍒嗛厤锛岃纭鐢宠鐨勭姸鎬�";
- return;
- }else if(resultMsg == 'Fin'){
- window.open("/apex/RentalFixtureSetAssignAgency?pt_recid=" + this.recordId);
- this.closeAction();
- return;
- }else{
- this.isShow = true;
- this.msg = resultMsg;
- return;
- }
- })
+ assignBtn({
+ Rid: this.recordId
+ }).then(resultMsg => {
+ if(res.Status__c == '鍙栨秷' && res.Rental_Apply_Equipment_Set_Cnt__c != 0){
+ window.open("/apex/RentalFixtureSetAssignAgency?pt_recid=" + this.recordId);
+ this.closeAction();
+ }else if((res.demo_purpose2__c == '瀛︿細灞曚細' || res.demo_purpose2__c == '璇鹃鐮旂┒' || res.demo_purpose2__c == '鍩硅涓績')&& res.Status__c == '鑽夋涓�'){
+ this.isShow = true;
+ this.msg = "涓嶈兘鍒嗛厤锛岃纭鐢宠鐨勭姸鎬�";
+ return
+ }else if((res.demo_purpose2__c =='璇曠敤锛堟棤璇环锛�' || res.demo_purpose2__c == '璇曠敤锛堟湁璇环锛�' || res.demo_purpose2__c =='鍔ㄧ墿瀹為獙' ||
+ res.demo_purpose2__c == '涓�鑸淮淇唬鐢�' || res.demo_purpose2__c== '淇濅慨鍚堝悓鐢ㄦ埛缁翠慨浠g敤' || res.demo_purpose2__c == '宸茶喘寰呰揣')
+ && res.Status__c != '宸叉壒鍑�' && res.Status__c != '宸插嚭搴撴寚绀�'){
+ this.isShow = true;
+ this.msg = "涓嶈兘鍒嗛厤锛岃纭鐢宠鐨勭姸鎬�";
+ return;
+ }else if(resultMsg == 'Fin'){
+ window.open("/apex/RentalFixtureSetAssignAgency?pt_recid=" + this.recordId);
+ this.closeAction();
+ return;
+ }else{
+ this.isShow = true;
+ this.msg = resultMsg;
+ return;
+ }
+ })
+ }
})
.catch(err=>{
console.log('initErr==='+err);
--
Gitblit v1.9.1