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/rentalApplyLWT/rentalApplyLWT.js | 359 ++++++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 277 insertions(+), 82 deletions(-)
diff --git a/force-app/main/default/lwc/rentalApplyLWT/rentalApplyLWT.js b/force-app/main/default/lwc/rentalApplyLWT/rentalApplyLWT.js
index 91a23a0..3a73263 100644
--- a/force-app/main/default/lwc/rentalApplyLWT/rentalApplyLWT.js
+++ b/force-app/main/default/lwc/rentalApplyLWT/rentalApplyLWT.js
@@ -15,6 +15,9 @@
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
import STATUS_PROCESS_STATE from '@salesforce/label/c.StatusProcessState';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import LightningConfirm from 'lightning/confirm';
+import Id from '@salesforce/user/Id';
export default class rentalApplyLWT extends LightningElement {
contactFirstName = 'Yan';
@@ -89,7 +92,12 @@
}).catch(err=>{
console.log("error:");
console.log(err.message);
- alert("鎿嶄綔澶辫触,閿欒淇℃伅:"+err.message);
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"鎿嶄綔澶辫触,鎻愮ず淇℃伅:"+err.message,
+ });
+ this.dispatchEvent(event);
+ //alert("鎿嶄綔澶辫触,鎻愮ず淇℃伅:"+err.message);
});
console.log("end");
}
@@ -105,35 +113,6 @@
}
- handleClick(event) {
- this.clickedButtonLabel = event.target.label;
- }
- handleContactFirstNameInputChange(event) {
- this.contactFirstName = event.target.value;
- }
- cancelSubmit(){
- console.log('djwaijd');
- if (this.Rental_Apply__c.Status__c == "鍙栨秷") {
- alert("宸茬粡鍙栨秷锛�");
- console.log('1');
- return;
- }
- if (this.Rental_Apply__c.Status__c == "鍒犻櫎") {
- alert("宸茬粡鍒犻櫎锛�");
- console.log('2');
- return;
- }
- if(this.RA_Status__c == "宸插嚭搴�" || this.Yi_loaner_arranged__c > 0) {
- alert("澶囧搧宸茬粡鍑哄簱锛屼笉鑳藉彇娑堬紒");
- console.log('2');
- return;
- }
- let raid = this.Id;
- window.open("/apex/RentalApplyCancel?objId="+raid, 'RentalApplyCancel', 'width=500,height=250');
- }
-
-
-
async sumit(){
let buttons = document.getElementsByName('submit_approval_process'.toLowerCase());
for (let i=0; i<buttons.length; i++) {
@@ -141,12 +120,24 @@
buttons[i].disabled = true;
}
//kk
- if (!confirm("涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵")) {
+
+ const result = await LightningConfirm.open({
+ message: "涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵",
+ variant: 'headerless',
+ label: 'this is the aria-label value',
+ // setting theme would have no effect
+ });
+ if (result==false) {
return;
}
//1540 you 璇曠敤锛堟棤璇环锛夌洰鐨勭殑澶囧搧鐢宠鍗曪紝涓嶈兘鍏宠仈璇环淇℃伅锛�
if(this.Rental_Apply__c.demo_purpose2__c == '璇曠敤锛堟棤璇环锛�' && this.Rental_Apply__c.Follow_UP_Opp__c !=null && this.Rental_Apply__c.Follow_UP_Opp__c != ''){
- alert('璇曠敤锛堟棤璇环锛夌洰鐨勭殑澶囧搧鐢宠鍗曪紝涓嶈兘鍏宠仈璇环淇℃伅锛�');
+ //alert('璇曠敤锛堟棤璇环锛夌洰鐨勭殑澶囧搧鐢宠鍗曪紝涓嶈兘鍏宠仈璇环淇℃伅锛�');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'璇曠敤锛堟棤璇环锛夌洰鐨勭殑澶囧搧鐢宠鍗曪紝涓嶈兘鍏宠仈璇环淇℃伅锛�',
+ });
+ this.dispatchEvent(event);
return;
}
// 宸茶喘寰呰揣鐨勭敵璇峰崟瀹℃壒鏃讹紝闇�瑕乧heck娉ㄦ畫鐨勭姸鎬�
@@ -155,14 +146,24 @@
let SaID=this.Rental_Apply__c.Statu_Achievements_ID__c;
let rtn = sforce.apex.execute("RentalApplyWebService","RentalApplyCheckForSAoneEle",{SaID:SaID});
if(rtn!='Fin'){
- alert(rtn);
+ //alert(rtn);
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:rtn,
+ });
+ this.dispatchEvent(event);
return;
}
}
// 甯屾湜鍒拌揣鏃ヤ笉鑳芥棭浜庣敵璇锋彁浜ゆ棩-0418杩藉姞
let d=new Date();
if (this.Rental_Apply__c.Request_shipping_day__c < d ) {
- alert('甯屾湜鍒拌揣鏃ヤ笉鑳芥棭浜庣敵璇锋彁浜ゆ棩');
+ //alert('甯屾湜鍒拌揣鏃ヤ笉鑳芥棭浜庣敵璇锋彁浜ゆ棩');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯屾湜鍒拌揣鏃ヤ笉鑳芥棭浜庣敵璇锋彁浜ゆ棩',
+ });
+ this.dispatchEvent(event);
return;
}
let raesdList = new Array();
@@ -180,12 +181,17 @@
}
}
if(stoppedSet.size> 0) {
- alert( Array.from(stoppedSet).join('锛�') + ' 浜у搧娉ㄥ唽璇佺姸鎬佷负鍋滄锛屼笉鍙敵璇�');
+ //alert( Array.from(stoppedSet).join('锛�') + ' 浜у搧娉ㄥ唽璇佺姸鎬佷负鍋滄锛屼笉鍙敵璇�');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:Array.from(stoppedSet).join('锛�') + ' 浜у搧娉ㄥ唽璇佺姸鎬佷负鍋滄锛屼笉鍙敵璇�',
+ });
+ this.dispatchEvent(event);
return;
}
}
}).catch(err=>{
- console.log("selectRentalApplyEquipmentSetDetailByRacId error:");
+ console.log("select1 error:");
console.log(err.message);
console.log("鎶ラ敊缁撴潫");
}).finally(()=>{
@@ -199,14 +205,19 @@
console.log(result);
DeliveryGood=result;
}).catch(err=>{
- console.log("selectQISReportById error:");
+ console.log("select1 error:");
console.log(err.message);
}).finally(()=>{
});
console.log(DeliveryGood);
let records= DeliveryGood;
if(records.length == 0 || !modelSet.has(records[0].nonyushohin__r.Product2.Fixture_Model_No_T__c)){
- alert('鐢宠鐨勫瀷鍙峰繀椤讳笌QIS鐢宠鍨嬪彿涓�鑷�');
+ //alert('鐢宠鐨勫瀷鍙峰繀椤讳笌QIS鐢宠鍨嬪彿涓�鑷�');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'鐢宠鐨勫瀷鍙峰繀椤讳笌QIS鐢宠鍨嬪彿涓�鑷�',
+ });
+ this.dispatchEvent(event);
return;
}
}
@@ -222,7 +233,7 @@
DeliveryGood=result;
records=result;
}).catch(err=>{
- console.log("selectRepairById error:");
+ console.log("select1 error:");
console.log(err.message);
}).finally(()=>{
});
@@ -231,7 +242,12 @@
}else{
if(this.Rental_Apply__c.Demo_purpose1__c == '缁翠慨浠g敤' && this.Rental_Apply__c.demo_purpose2__c != '绱㈣禂QIS') {
if(!modelSet.has(records[0].Delivered_Product__r.Product2.Fixture_Model_No_T__c)){
- alert('鐢宠鐨勫瀷鍙峰繀椤讳笌閫佷慨鐨勫瀷鍙蜂竴鑷�');
+ //alert('鐢宠鐨勫瀷鍙峰繀椤讳笌閫佷慨鐨勫瀷鍙蜂竴鑷�');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'鐢宠鐨勫瀷鍙峰繀椤讳笌閫佷慨鐨勫瀷鍙蜂竴鑷�',
+ });
+ this.dispatchEvent(event);
return;
}
}
@@ -239,28 +255,53 @@
console.log("Demo_purpose1__c涓虹┖");
}else if(this.Rental_Apply__c.Demo_purpose1__c == '缁翠慨浠g敤' && this.Rental_Apply__c.demo_purpose2__c == '涓�鑸敤鎴�' ){
if (records[0].Repair_Estimated_date_formula__c == null) {
- alert('涓�鑸淮淇棤鎶ヤ环鏃ワ紝涓嶅彲鍊熺敤澶囧搧');
+ //alert('涓�鑸淮淇棤鎶ヤ环鏃ワ紝涓嶅彲鍊熺敤澶囧搧');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'涓�鑸淮淇棤鎶ヤ环鏃ワ紝涓嶅彲鍊熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
else if (records[0].Repair_Estimated_date_formula__c < '2019-07-01' && records[0].Agreed_Date__c == null) {
- alert('鎶ヤ环鏃ュ湪2019/7/1涔嬪墠涓旀埛鍚屾剰鏃ヤ负绌猴紝涓嶅彲鍊熺敤澶囧搧');
+ //alert('鎶ヤ环鏃ュ湪2019/7/1涔嬪墠涓旀埛鍚屾剰鏃ヤ负绌猴紝涓嶅彲鍊熺敤澶囧搧');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'鎶ヤ环鏃ュ湪2019/7/1涔嬪墠涓旀埛鍚屾剰鏃ヤ负绌猴紝涓嶅彲鍊熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
//20210608 ljh SFDC-C3CCN4 start
if(records[0].Repair_Rank__c == '' || records[0].Repair_Rank__c == null){
- alert('鎶ヤ环绛夌骇涓虹┖涓嶈兘鐢宠澶囧搧');
+ //alert('鎶ヤ环绛夌骇涓虹┖涓嶈兘鐢宠澶囧搧');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'鎶ヤ环绛夌骇涓虹┖涓嶈兘鐢宠澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}else{
if(records[0].DW_Sign_Txt__c == 'false' && records[0].Repair_Rank__c == 'DW'){
- alert('DW鎶ヤ环绛夌骇涓嬫鍨嬪彿涓嶇鍚堝鍝佺敵璇峰�熺敤鏉′欢');
+ //alert('DW鎶ヤ环绛夌骇涓嬫鍨嬪彿涓嶇鍚堝鍝佺敵璇峰�熺敤鏉′欢');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'DW鎶ヤ环绛夌骇涓嬫鍨嬪彿涓嶇鍚堝鍝佺敵璇峰�熺敤鏉′欢',
+ });
+ this.dispatchEvent(event);
return;
}
if(records[0].Repair_Rank__c == 'D1'
||records[0].Repair_Rank__c == 'D2'
||records[0].Repair_Rank__c == 'D3'
||records[0].Repair_Rank__c == 'E2'){
- alert('鎶ヤ环绛夌骇涓嶇鍚堝鍝佺敵璇峰�熺敤鏉′欢');
+ //alert('鎶ヤ环绛夌骇涓嶇鍚堝鍝佺敵璇峰�熺敤鏉′欢');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'鎶ヤ环绛夌骇涓嶇鍚堝鍝佺敵璇峰�熺敤鏉′欢',
+ });
+ this.dispatchEvent(event);
return;
}
}
@@ -270,21 +311,41 @@
console.log("Demo_purpose1__c涓虹┖");
}else if(this.Rental_Apply__c.Demo_purpose1__c == '缁翠慨浠g敤' && this.Rental_Apply__c.demo_purpose2__c == '甯傚満澶氬勾淇濅慨' ){
if (records[0].FSE_ApplyForRepair_Day__c == null) {
- alert('甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧');
+ // alert('甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
}
if(this.Rental_Apply__c.Demo_purpose1__c == '缁翠慨浠g敤' && this.Rental_Apply__c.demo_purpose2__c == '鏁呴殰鎺掓煡' ){
if (records[0].FSE_ApplyForRepair_Day__c == null) {
- alert('鏁呴殰鎺掓煡锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧');
+ //alert('鏁呴殰鎺掓煡锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
if(records[0].Repair_Ordered_Date__c != null) {
- alert('鏁呴殰鎺掓煡锛孾4.淇悊鍝丷C鍙楃悊鏃蹇呴』涓虹┖');
+ //alert('鏁呴殰鎺掓煡锛孾4.淇悊鍝丷C鍙楃悊鏃蹇呴』涓虹┖');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
if(records[0].IfCheckFixture__c == 'false'){
- alert('涓嶆弧瓒虫晠闅滄帓鏌ョ洰鐨�');
+ //alert('涓嶆弧瓒虫晠闅滄帓鏌ョ洰鐨�');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
}
@@ -303,29 +364,59 @@
&& profileId != '00e10000000Y3o5'
&& records[0].NewProductGuaranteeObject__c == '8: 甯傚満澶氬勾淇濅慨'
&& this.Rental_Apply__c.demo_purpose2__c != '甯傚満澶氬勾淇濅慨') {
- alert('鏃犲伩鍖哄埆鏍囧織涓�8: 甯傚満澶氬勾淇濅慨锛屽繀椤婚�夋嫨甯傚満澶氬勾淇濅慨銆�');
+ //alert('鏃犲伩鍖哄埆鏍囧織涓�8: 甯傚満澶氬勾淇濅慨锛屽繀椤婚�夋嫨甯傚満澶氬勾淇濅慨銆�');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
}
if(records[0].Repair_Final_Inspection_Date__c != null){
- alert('瀛樺湪淇悊鏈�缁堟娴嬫棩锛屼笉鍙�熺敤澶囧搧');
+ //alert('瀛樺湪淇悊鏈�缁堟娴嬫棩锛屼笉鍙�熺敤澶囧搧');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
if(records[0].Repair_Shipped_Date__c != null){
- alert('瀛樺湪RC淇悊杩旈�佹棩锛屼笉鍙�熺敤澶囧搧');
+ //alert('瀛樺湪RC淇悊杩旈�佹棩锛屼笉鍙�熺敤澶囧搧');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
if(records[0].Status1__c =='0.鍒犻櫎' ||records[0].Status1__c =='0.鍙栨秷' ||records[0].Status1__c =='5.瀹屾瘯' ){
- alert('淇悊宸茬粡缁撴潫锛屼笉鑳界敵璇峰鍝�');
+ //alert('淇悊宸茬粡缁撴潫锛屼笉鑳界敵璇峰鍝�');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
if ( this.Rental_Apply__c.demo_purpose2__c == '鍐嶄慨鐞�' && records[0].ReRepairObject_F__c == 'false') {
- alert('涓嶅睘浜庡啀鍙楃悊鍙傝�冨璞★紝涓嶅彲鍊熺敤澶囧搧');
+ //alert('涓嶅睘浜庡啀鍙楃悊鍙傝�冨璞★紝涓嶅彲鍊熺敤澶囧搧');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
if (this.Rental_Apply__c.RecordTypeId != '01210000000RHIn'
&& this.Rental_Apply__c.demo_purpose2__c != '淇濅慨鐢ㄦ埛'
&& this.Rental_Apply__c.demo_purpose2__c != '甯傚満澶氬勾淇濅慨'
&& records[0].Number_of_EffectiveContract__c == '鏈�' ) {
- alert('鏈夌淮淇悎鍚�,蹇呴』閫夋嫨淇濅慨鐢ㄦ埛.');
+ //alert('鏈夌淮淇悎鍚�,蹇呴』閫夋嫨淇濅慨鐢ㄦ埛.');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
let AssetModelNo = records[0].Delivered_Product__r.Product2.Asset_Model_No__c;
@@ -333,7 +424,12 @@
&& (records[0].NewProductGuaranteeObject__c == '2: 鏈嶅姟澶氬勾淇濅慨'
&& (AssetModelNo == 'LTF-190-10-3D' || AssetModelNo == 'LTF-S190-5' || AssetModelNo == 'CYF-VHA' || AssetModelNo == 'CYF-VA2' || AssetModelNo == 'CYF-5A'|| AssetModelNo == 'LTF-S190-10'|| AssetModelNo == 'OER-AW'|| AssetModelNo == 'URF-V'|| AssetModelNo == 'URF-V2'|| AssetModelNo == 'URF-P6'))
&& this.Rental_Apply__c.demo_purpose2__c != '淇濅慨鐢ㄦ埛' ) {
- alert('姝よ澶囧瀷鍙峰骞翠繚淇紝璇烽�夋嫨淇濅慨鐢ㄦ埛.');
+ //alert('姝よ澶囧瀷鍙峰骞翠繚淇紝璇烽�夋嫨淇濅慨鐢ㄦ埛.');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
@@ -342,7 +438,12 @@
&& (AssetModelNo == 'CV-V1' || AssetModelNo == 'CV-V1(A)' || AssetModelNo == 'CV-V1(B)' || AssetModelNo == 'GIF-LV1' || AssetModelNo == 'CF-LV1L' || AssetModelNo == 'CF-LV1I' || AssetModelNo == 'MAJ-1910')
&& (this.Rental_Apply__c.demo_purpose2__c == '涓�鑸敤鎴�' || this.Rental_Apply__c.demo_purpose2__c == '鍐嶄慨鐞�')
) {
- alert('濂ヨ緣璁惧锛屼繚淇湡鍐呬笉鎻愪緵澶囧搧.');
+ //alert('濂ヨ緣璁惧锛屼繚淇湡鍐呬笉鎻愪緵澶囧搧.');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'甯傚満澶氬勾淇濅慨锛屾病鏈塠FSE淇悊鐢宠鏃锛屼笉鍙�熺敤澶囧搧',
+ });
+ this.dispatchEvent(event);
return;
}
}
@@ -357,7 +458,12 @@
//kk
let raesCountCheck = sforce.apex.execute("OpdPlanWebService", "raesCountCheck", {rentalApplyId: raId});
if(raesCountCheck != 'OK'){
- alert(raesCountCheck);
+ //alert(raesCountCheck);
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:raesCountCheck,
+ });
+ this.dispatchEvent(event);
return;
}
}
@@ -387,49 +493,104 @@
let interval = records[0].Status;
let records_Date = records[0].Rental_Apply_Flag__c;
if (interval==null ) {
- alert("璇风‘璁ゅ浼氱姸鎬�");
+ //alert("璇风‘璁ゅ浼氱姸鎬�");
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"璇风‘璁ゅ浼氱姸鎬�",
+ });
+ this.dispatchEvent(event);
return;
}
else if (interval == '鑽夋涓�') {
- alert('瀛︿細鐘舵�佷负鑽夋涓紝涓嶈兘鎻愪氦');
+ //alert('瀛︿細鐘舵�佷负鑽夋涓紝涓嶈兘鎻愪氦');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'瀛︿細鐘舵�佷负鑽夋涓紝涓嶈兘鎻愪氦',
+ });
+ this.dispatchEvent(event);
return;
}
else if (interval == '鐢宠涓�') {
- alert('瀛︿細鐘舵�佷负鐢宠涓紝涓嶈兘鎻愪氦');
+ //alert('瀛︿細鐘舵�佷负鐢宠涓紝涓嶈兘鎻愪氦');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'瀛︿細鐘舵�佷负鐢宠涓紝涓嶈兘鎻愪氦',
+ });
+ this.dispatchEvent(event);
return;
}
else if (interval == '宸茬粨鏉�') {
- alert('瀛︿細鐘舵�佷负宸茬粨鏉燂紝涓嶈兘鎻愪氦');
+ // alert('瀛︿細鐘舵�佷负宸茬粨鏉燂紝涓嶈兘鎻愪氦');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'瀛︿細鐘舵�佷负宸茬粨鏉燂紝涓嶈兘鎻愪氦',
+ });
+ this.dispatchEvent(event);
return;
}
else if (interval == '宸叉彁浜ゆ姤鍛�') {
- alert('瀛︿細鐘舵�佷负宸叉彁浜ゆ姤鍛婏紝涓嶈兘鎻愪氦');
+ // alert('瀛︿細鐘舵�佷负宸叉彁浜ゆ姤鍛婏紝涓嶈兘鎻愪氦');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'瀛︿細鐘舵�佷负宸叉彁浜ゆ姤鍛婏紝涓嶈兘鎻愪氦',
+ });
+ this.dispatchEvent(event);
return;
}
else if (interval == '鍙栨秷鐢宠涓�') {
- alert('瀛︿細鐘舵�佷负鍙栨秷鐢宠涓紝涓嶈兘鎻愪氦');
+ // alert('瀛︿細鐘舵�佷负鍙栨秷鐢宠涓紝涓嶈兘鎻愪氦');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'瀛︿細鐘舵�佷负鍙栨秷鐢宠涓紝涓嶈兘鎻愪氦',
+ });
+ this.dispatchEvent(event);
return;
}
else if (interval == '鍙栨秷') {
- alert('瀛︿細鐘舵�佷负鍙栨秷锛屼笉鑳芥彁浜�');
+ // alert('瀛︿細鐘舵�佷负鍙栨秷锛屼笉鑳芥彁浜�');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'瀛︿細鐘舵�佷负鍙栨秷锛屼笉鑳芥彁浜�',
+ });
+ this.dispatchEvent(event);
return;
}
//kk
if(this.Rental_Apply__c.Request_shipping_day__c==null){
- alert("璇风‘璁ゅ笇鏈涘埌璐ф棩鏈�");
+ // alert("璇风‘璁ゅ笇鏈涘埌璐ф棩鏈�");
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"璇风‘璁ゅ笇鏈涘埌璐ф棩鏈�",
+ });
+ this.dispatchEvent(event);
return;
}else{
if (d >= this.Rental_Apply__c.Request_shipping_day__c -7) {
- alert("蹇呴』鎻愬墠浜庡笇鏈涘埌璐ф棩7澶╀互涓婃彁浜ょ敵璇�");
+ // alert("蹇呴』鎻愬墠浜庡笇鏈涘埌璐ф棩7澶╀互涓婃彁浜ょ敵璇�");
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"蹇呴』鎻愬墠浜庡笇鏈涘埌璐ф棩7澶╀互涓婃彁浜ょ敵璇�",
+ });
+ this.dispatchEvent(event);
return;
}
// 20220324 ljh obpm add start
if (records != null && records[0].IF_Approved__c == "true" && (records[0].Meeting_Approved_No__c == null || records[0].Meeting_Approved_No__c == "") ) {
- alert("娌℃湁鍐宠鍙风殑锛屾殏涓嶈兘鍑哄��,璇锋洿鏂拌鍐充俊鎭��");
+ // alert("娌℃湁鍐宠鍙风殑锛屾殏涓嶈兘鍑哄��,璇锋洿鏂拌鍐充俊鎭��");
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"娌℃湁鍐宠鍙风殑锛屾殏涓嶈兘鍑哄��,璇锋洿鏂拌鍐充俊鎭��",
+ });
+ this.dispatchEvent(event);
return;
}
if (records != null && records[0].IF_Approved__c == "true" && records[0].Meeting_Approved_No__c != "" && statusList.indexOf(records[0].Approved_Status__c) != -1 && records[0].Approved_Status__c != '鑽夌' ) {
- alert("宸茬敵璇峰喅瑁佷絾鍐宠鐘舵�佷笉绗﹀悎鏉′欢銆�");
+ // alert("宸茬敵璇峰喅瑁佷絾鍐宠鐘舵�佷笉绗﹀悎鏉′欢銆�");
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"宸茬敵璇峰喅瑁佷絾鍐宠鐘舵�佷笉绗﹀悎鏉′欢銆�",
+ });
+ this.dispatchEvent(event);
return;
}
}
@@ -447,14 +608,19 @@
console.log(result);
DeliveryGood=result;
}).catch(err=>{
- console.log("selectQISreportById2 error:");
+ console.log("selectCampaignById error:");
console.log(err.message);
}).finally(()=>{
});
let records= DeliveryGood;
let interval = records[0].next_action__c;
if (interval == '閫佸洖') {
- alert("QIS 宸查�佸洖锛屼笉鑳藉啀鐢宠澶囧搧浜�");
+ // alert("QIS 宸查�佸洖锛屼笉鑳藉啀鐢宠澶囧搧浜�");
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"QIS 宸查�佸洖锛屼笉鑳藉啀鐢宠澶囧搧浜�",
+ });
+ this.dispatchEvent(event);
return;
}
}
@@ -475,16 +641,31 @@
});
if(rtn==null){
- alert("rtn涓虹┖");
+ // alert("rtn涓虹┖");
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"rtn涓虹┖",
+ });
+ this.dispatchEvent(event);
return;
}else{
if (rtn != 'OK') {
- alert(rtn);
+ // alert(rtn);
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:rtn,
+ });
+ this.dispatchEvent(event);
return;
}
}
if(this.Rental_Apply__c.Status__c == null){
- alert('璇峰鍝佺敵璇风姸鎬佺‘璁わ紝涓嶈兘涓虹┖');
+ // alert('璇峰鍝佺敵璇风姸鎬佺‘璁わ紝涓嶈兘涓虹┖');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'璇峰鍝佺敵璇风姸鎬佺‘璁わ紝涓嶈兘涓虹┖',
+ });
+ this.dispatchEvent(event);
return;
}else{
if (this.Rental_Apply__c.Status__c == '濉啓瀹屾瘯' ||
@@ -495,7 +676,12 @@
this.Rental_Apply__c.Status__c == '宸插嚭搴撴寚绀�' ||
this.Rental_Apply__c.Status__c == '鍒犻櫎' ||
this.Rental_Apply__c.Status__c == '鍙栨秷' ) {
- alert('璇峰鍝佺敵璇风姸鎬佺‘璁わ紝宸茬粡鎻愪氦杩囩殑鐢宠锛屼笉鑳介噸澶嶆彁浜�');
+ // alert('璇峰鍝佺敵璇风姸鎬佺‘璁わ紝宸茬粡鎻愪氦杩囩殑鐢宠锛屼笉鑳介噸澶嶆彁浜�');
+ const event = new ShowToastEvent({
+ title: 'Get Help',
+ message:'璇峰鍝佺敵璇风姸鎬佺‘璁わ紝宸茬粡鎻愪氦杩囩殑鐢宠锛屼笉鑳介噸澶嶆彁浜�'
+ });
+ this.dispatchEvent(event);
return;
}
}
@@ -506,14 +692,19 @@
console.log(result);
raesList=result;
}).catch(err=>{
- console.log("selectRentalApplyEquipmentSetByRacId error:");
+ console.log("selectCampaignById error:");
console.log(err.message);
}).finally(()=>{
});
let records= raesList;
if(records.length > 0){
- alert('鏈夋病鏈夋槑缁嗙殑鍊熷嚭澶囧搧閰嶅涓�瑙堬紝涓嶈兘鎻愪氦');
+ // alert('鏈夋病鏈夋槑缁嗙殑鍊熷嚭澶囧搧閰嶅涓�瑙堬紝涓嶈兘鎻愪氦');
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'鏈夋病鏈夋槑缁嗙殑鍊熷嚭澶囧搧閰嶅涓�瑙堬紝涓嶈兘鎻愪氦',
+ });
+ this.dispatchEvent(event);
return;
}
@@ -522,7 +713,7 @@
console.log(result);
racs=result;
}).catch(err=>{
- console.log("selectRentalApplyById error:");
+ console.log("selectCampaignById error:");
console.log(err.message);
}).finally(()=>{
});
@@ -534,7 +725,7 @@
console.log(result);
userId=result;
}).catch(err=>{
- console.log("getUserId error:");
+ console.log("selectCampaignById error:");
console.log(err.message);
}).finally(()=>{
});
@@ -543,7 +734,7 @@
console.log(result);
manageUsers=result;
}).catch(err=>{
- console.log("selectUserById error:");
+ console.log("selectCampaignById error:");
console.log(err.message);
}).finally(()=>{
});
@@ -583,7 +774,12 @@
messages=resultt.errors[0].split(',')[1];
if (messages!=null&&messages!="") {
console.log("hhh26");
- alert("鎿嶄綔澶辫触,閿欒淇℃伅:"+messages);
+ // alert("鎿嶄綔澶辫触,鎻愮ず淇℃伅:"+messages);
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"鎿嶄綔澶辫触,鎻愮ず淇℃伅:"+messages,
+ });
+ this.dispatchEvent(event);
return;
}
}
@@ -654,6 +850,5 @@
console.log("in 3");
return "";
}
-
};
}
\ No newline at end of file
--
Gitblit v1.9.1