| force-app/main/default/lwc/lexSubmitCompetitorReport/lexSubmitCompetitorReport.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexSubmitCompetitorReport/lexSubmitCompetitorReport.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexVOCFinish/lexVOCFinish.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexVOCFinish/lexVOCFinish.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
force-app/main/default/lwc/lexSubmitCompetitorReport/lexSubmitCompetitorReport.html
@@ -1,5 +1,6 @@ <template> <div class="submitHolder" if:true={IsLoading}> <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> </div> </template> force-app/main/default/lwc/lexSubmitCompetitorReport/lexSubmitCompetitorReport.js
@@ -5,7 +5,7 @@ import otherButtonInSubmitCompetitorReport from '@salesforce/apex/ReportController.updateForSubmitCompetitorReportButton'; import { updateRecord } from 'lightning/uiRecordApi'; import init from '@salesforce/apex/ReportController.initForSubmitCompetitorReportButton'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; export default class LexSubmitCompetitorReport extends LightningElement { @api recordId; IsLoading = true; @@ -19,18 +19,28 @@ recordId: this.recordId }).then(result=>{ this.submit(); this.dispatchEvent(new CloseActionScreenEvent()); this.IsLoading = false; }); } showToast(msg,type) { const event = new ShowToastEvent({ title: '', message: msg, variant: type }); this.dispatchEvent(event); } submit(){ otherButtonInSubmitCompetitorReport({ recordId: this.recordId }).then(result=>{ this.showToast("提交对手竞争报告成功","success") this.updateRecordView(this.recordId); this.dispatchEvent(new CloseActionScreenEvent()); }); } } force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.html
@@ -1,5 +1,6 @@ <template> <div class="checkHolder" if:true={IsLoading}> <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> </div> </template> force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.js
@@ -5,7 +5,7 @@ import init from '@salesforce/apex/ReportController.initForVOCCheckButton'; import VOCCheck from '@salesforce/apex/ReportController.updateForVOCCheckButton'; import { updateRecord } from 'lightning/uiRecordApi'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; export default class LexVOCCheck extends LightningElement { @@ -31,7 +31,6 @@ this.profileId = result.profileId; console.log(this.status); this.check(); this.dispatchEvent(new CloseActionScreenEvent()); //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view"); } }).catch(error => { @@ -40,7 +39,6 @@ }).finally(() => { }); this.updateRecordView(this.recordId); } @@ -48,18 +46,32 @@ updateRecord({fields: { Id: recordId }}); } showToast(msg, type) { const event = new ShowToastEvent({ title: "", message: msg, variant: type }); this.dispatchEvent(event); } check (){ // 陆胜,胡迪安,系统管理员可点(需要调整) if (UserInfo_Owner.Id != "00510000000gWAE" && UserInfo_Owner.Id != "00510000004reg2" && this.profileId != "00e10000000Y3o5AAC") { alert("你没有判定VOC的权限"); this.showToast("你没有判定VOC的权限","error"); this.dispatchEvent(new CloseActionScreenEvent()); return; } if (this.status != "跟进中") { alert("不是跟进中不能点击"); this.showToast("不是跟进中不能点击","error"); this.dispatchEvent(new CloseActionScreenEvent()); return; } if (this.isVOC == undefined) { alert("必须选择是否VOC"); this.showToast("必须选择是否VOC","error"); this.dispatchEvent(new CloseActionScreenEvent()); return; } VOCCheck( @@ -70,11 +82,12 @@ } ).then(result =>{ if(result == null){ this.showToast("成功","success"); this.updateRecordView(this.recordId); }else { alert(result); this.showToast(result,"error"); } this.dispatchEvent(new CloseActionScreenEvent()); }); //location.reload(); force-app/main/default/lwc/lexVOCFinish/lexVOCFinish.html
@@ -1,5 +1,6 @@ <template> <div class="vocFinishHolder" if:true={IsLoading}> <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> </div> </template> force-app/main/default/lwc/lexVOCFinish/lexVOCFinish.js
@@ -5,7 +5,7 @@ import update from '@salesforce/apex/ReportController.updateForVOCFinishButton'; import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner'; import { updateRecord } from 'lightning/uiRecordApi'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; export default class LexVOCFinish extends LightningElement { @api recordId; status; @@ -23,7 +23,6 @@ this.status = result.status; this.profileId = result.profileId; this.VOCFinish(); this.dispatchEvent(new CloseActionScreenEvent()); } }).catch(error => { console.log("error"); @@ -35,6 +34,15 @@ //this.updateRecordView(this.recordId); } showToast(msg,type) { const event = new ShowToastEvent({ title: '', message: msg, variant: type }); this.dispatchEvent(event); } updateRecordView(recordId) { updateRecord({fields: { Id: recordId }}); @@ -42,17 +50,21 @@ VOCFinish () { if (UserInfo_Owner.Id != "00510000000gWAE" && UserInfo_Owner.Id != "00510000004reg2" && this.profileId != "00e10000000Y3o5AAC") { alert("你没有完毕VOC的权限"); this.showToast("你没有完毕VOC的权限","error"); this.dispatchEvent(new CloseActionScreenEvent()); return; } if (this.status != "结果确认完毕") { alert("不是结果确认完毕不能点击"); this.showToast("不是结果确认完毕不能点击","error"); this.dispatchEvent(new CloseActionScreenEvent()); return; } update({ recordId: this.recordId }).then(result =>{ this.showToast("成功","success"); this.updateRecordView(this.recordId); this.dispatchEvent(new CloseActionScreenEvent()); }); } } force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.html
@@ -1,5 +1,6 @@ <template> <div class="vocSubmitHolder" if:true={IsLoading}> <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> </div> </template> force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.js
@@ -5,7 +5,7 @@ import VOCSubmit from '@salesforce/apex/ReportController.updateForVOCSubmitButton'; import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner'; import { updateRecord } from 'lightning/uiRecordApi'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; export default class LexVOCSubmit extends LightningElement { @api recordId; createdById; @@ -22,7 +22,6 @@ this.status = result.status; this.createdById = result.createdById; this.Submit(); this.dispatchEvent(new CloseActionScreenEvent()); this.IsLoading = false; //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view"); } @@ -39,18 +38,28 @@ updateRecord({fields: { Id: recordId }}); } showToast(msg,type) { const event = new ShowToastEvent({ title: '', message: msg, variant: type }); this.dispatchEvent(event); } Submit () { if (this.status != "草案中") { alert("不是草案中不能点击"); this.showToast("不是草案中不能点击","error"); this.dispatchEvent(new CloseActionScreenEvent()); return; } VOCSubmit({ recordId: this.recordId, createdById: this.createdById }).then(result =>{ this.showToast("成功","success"); this.updateRecordView(this.recordId); this.dispatchEvent(new CloseActionScreenEvent()); }); } }