force-app/main/default/classes/lexLightingButtonConstant.cls
@@ -55,6 +55,8 @@ public static final String STATUS_QIS_FSE_COMPLATED = 'FSE填写完毕'; //QIS的状态‘完毕’ public static final String STATUS_QIS_COMPLATED = '完毕'; //询价注残特殊对应的状态‘已提交’ public static final String STATUS_OPPORTUNITY_SPECIAL_APPLY_SUBMIT = '已提交'; //招标项目的阶段补充说明‘3-1:废标公告’ public static final String SUB_INFO_TYPE_SCRAPPED_LABEL = '3-1:废标公告'; //招标项目的阶段补充说明‘3-2:流标公告’ force-app/main/default/classes/lexOpportunitySpecialApplyController.cls
New file @@ -0,0 +1,41 @@ public with sharing class lexOpportunitySpecialApplyController { @AuraEnabled public static InitData initForSpecSubmitButton(String recordId){ InitData res = new InitData(); try { OpportunitySpecialApply__c opp = [ select Apply_Reason__c, Is_upload_file__c, Status__c from OpportunitySpecialApply__c where Id =: recordId ]; res.applyReason = opp.Apply_Reason__c; res.isUploadFile = opp.Is_upload_file__c; res.status = opp.Status__c; } catch (Exception e) { throw new AuraHandledException(e.getMessage()); } return res; } @AuraEnabled public static string updateForSpecSubmitButton(String recordId){ OpportunitySpecialApply__c opp = new OpportunitySpecialApply__c(); try { opp.Id = recordId; opp.Status__c = lexLightingButtonConstant.STATUS_OPPORTUNITY_SPECIAL_APPLY_SUBMIT; update opp; return ''; } catch (Exception e) { return e.getMessage(); } } public class InitData{ @AuraEnabled public String applyReason; @AuraEnabled public Boolean isUploadFile; @AuraEnabled public String status; } } force-app/main/default/classes/lexOpportunitySpecialApplyController.cls-meta.xml
New file @@ -0,0 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>57.0</apiVersion> <status>Active</status> </ApexClass> force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -31,29 +31,6 @@ public static integer secondNum {get; set;} // add tcm 20211122 end @AuraEnabled public static LostReport getLostReport(){ try { return LostReport; } catch (Exception e) { throw new AuraHandledException(e.getMessage()); } } @AuraEnabled( cacheable = true ) public static List< Account > getAccounts() { return [ SELECT Id, Name, Industry FROM Account LIMIT 10 ]; } @AuraEnabled( cacheable = true ) public static void saveAccounts(List<Account> accList){ Insert accList; /*if(accList.size()>0 && accList != null){ insert accList; }*/ } @AuraEnabled public static String getPickList(String objectName, String fieldName) { @@ -103,27 +80,6 @@ pickList.put('其他', qita); return JSON.serialize(pickList); } @AuraEnabled public static String getPickListByFilter(String objectName,String fieldName,String controlFieldName,String controlFieldValue){ try { Schema.DescribeFieldResult fieldDescribe = Schema.getGlobalDescribe().get(objectName).getDescribe().fields.getMap().get(fieldName).getDescribe(); // 如果该字段为选项列表类型,则获取选项列表 List<Schema.PicklistEntry> picklistValues = fieldDescribe.getPicklistValues(); // 根据控制字段的值筛选出对应的选项 List<Map<String, Object>> lstPickvals = new List<Map<String, Object>>(); for (Schema.PicklistEntry entry : picklistValues) { if (entry.isActive() && entry.getValue().startsWith(controlFieldValue)) { lstPickvals.add(new Map<String, Object>{'label' => entry.getValue(), 'value' => entry.getValue()}); } } String jsonStr = JSON.serialize(lstPickvals); return jsonStr; } catch (Exception e) { throw new AuraHandledException(e.getMessage()); } } @AuraEnabled public static Map<string,object> init (string oppId1,string lostReportId1,string pageStatus1,string lostType1,string submitFlag1){ try { @@ -288,176 +244,6 @@ maps.put('LostReport', LostReport); return maps; } //写到js // 编辑 只有系统管理员或者草案中可以编辑 @AuraEnabled public static String edit2(){ if( userinfo.getProfileId() == (ID) '00e10000000Y3o5AAC' || '草案'.equals(LostReport.LostReport.Report_Status__c) ) { pageStatus = 'Edit'; init1(); } else{ return '只有在草案中才能进行编辑!'; } return null; } // 设置品牌 @AuraEnabled public static void setBrand(){ list<LostBrand> LostBrandlist = LostReport.LostBrands; LostBrand tempBrand = LostBrandlist.get(setBrandNo); string brandName = tempBrand.lostBrand.Lost_By_Company__c; // fy SWAG-CCC6F6 start if(!'其他'.equals(tempBrand.lostBrand.Lost_By_Company_Mannual__c)){ tempBrand.lostBrand.Lost_By_Company_Mannual__c = null; } system.debug('aaa5+++'+tempBrand.lostBrand.Lost_By_Company_Mannual__c); // fy SWAG-CCC6F6 end // ID compID = CompetitionMap.get(brandName); for(PCLLostProducts tempLostProduct : tempBrand.LostProducts ) { // test // tempLostProduct.LostProductss.Competitor__c = compID; tempLostProduct.LostProductss.LostBrandName__c = brandName; tempLostProduct.LostProductss.LostProduct__c = null; tempLostProduct.LostProductss.LostProductMannual__c = null; tempLostProduct.LostProductss.Quantity__c = null; tempLostProduct.LostProductss.ProductClass__c = null; tempLostProduct.LostProductss.ProductCategory__c = null; tempLostProduct.bool=false; } } // 设置品牌 @AuraEnabled public static void setbrandmannual(){ list<LostBrand> LostBrandlist = LostReport.LostBrands; LostBrand tempBrand = LostBrandlist.get(setBrandNo); string brandName = tempBrand.lostBrand.Lost_By_Company__c; String brandNameMannual = tempBrand.lostBrand.Lost_By_Company_Mannual__c; // ID compID = CompetitionMap.get(brandName); for(PCLLostProducts tempLostProduct : tempBrand.LostProducts ) { // test // tempLostProduct.LostProductss.Competitor__c = compID; system.debug('aaaa3++'+brandNameMannual); if ('其他'.equals(brandName) && brandNameMannual != null && !''.equals(brandNameMannual)) { tempLostProduct.LostProductss.LostBrandName__c = brandNameMannual; // tempLostProduct.LostProductss.LostProduct__c = null; // tempLostProduct.LostProductss.LostProductMannual__c = null; // tempLostProduct.LostProductss.Quantity__c = null; // tempLostProduct.LostProductss.ProductClass__c = null; // tempLostProduct.LostProductss.ProductCategory__c = null; // tempLostProduct.bool=false; } } } // 保存 // @AuraEnabled // public static String save(LostReport report){ // try { // if(!dataEntry(report)) { // return null; // } // // brandCount = LostReport.LostBrands.size(); // pageStatus = 'View'; // return '保存成功!'; // } catch (Exception e) { // return e.getMessage(); // } // } //读取并构建竞争对手品牌 // public void BrandmapSet(){ // CompetitionMap = new map<string, id>(); // list <Competition_Company__c> competitionList // = [select id,name from Competition_Company__c]; // for(Competition_Company__c tempComp : competitionList ) { // CompetitionMap.put(tempComp.name, tempComp.id); // } // } // 数据检查 @AuraEnabled public static boolean DataCheck(LostReport report){ LostReport = report; boolean dataCheck = true; if(string.isBlank(LostReport.LostReport.LostType__c)) { LostReport.LostReport.LostType__c.addError('必须填写失单类型!'); dataCheck = false; } for(LostBrand tempLostBrand : LostReport.LostBrands ) { system.debug('aaaa1++'+tempLostBrand.lostBrand.Lost_By_Company_Mannual__c); if(string.isblank(tempLostBrand.lostBrand.Lost_By_Company__c)) { tempLostBrand.lostBrand.Lost_By_Company__c.addError('请填写失单品牌!'); dataCheck = false; }// fy SWAG-CCC6F6 start else if('其他'.equals(tempLostBrand.lostBrand.Lost_By_Company__c)&&string.isblank(tempLostBrand.lostBrand.Lost_By_Company_Mannual__c)){ tempLostBrand.lostBrand.Lost_By_Company_Mannual__c.addError('请填写失单品牌(手动)!'); dataCheck = false; }// fy SWAG-CCC6F6 end system.debug('aaaa2++'+tempLostBrand.lostBrand.Lost_By_Company_Mannual__c); if(tempLostBrand.lostBrand.LostPrice__c == null) { tempLostBrand.lostBrand.LostPrice__c.addError('失单金额必填!'); dataCheck = false; } if(string.isblank(tempLostBrand.lostBrand.Lost_reason_main__c )) { tempLostBrand.lostBrand.Lost_reason_main__c.addError('失单理由(主)必填!'); dataCheck = false; } if(string.isblank(tempLostBrand.lostBrand.Agency__c )) { tempLostBrand.lostBrand.Agency__c.addError('中标经销商必填!'); dataCheck = false; } // 检查是否有超过1个有数的产品 integer productCount = 0; for( PCLLostProducts temlostProduct : tempLostBrand.LostProducts) { if (temlostProduct.LostProductss.LostProduct__c != null || temlostProduct.LostProductss.LostProductMannual__c != null) { System.debug('失单型号' + temlostProduct.LostProductss.LostProduct__c); System.debug('失单型号手动' + temlostProduct.LostProductss.LostProductMannual__c); productCount ++; } // update tcm 20211123 start if((temlostProduct.LostProductss.LostProduct__c!=null || temlostProduct.LostProductss.LostProductMannual__c!=null)&&(temlostProduct.LostProductss.Quantity__c==null || temlostProduct.LostProductss.Quantity__c ==0)) { temlostProduct.LostProductss.Quantity__c.addError('请填写失单数量!'); dataCheck = false; } if((temlostProduct.LostProductss.LostProduct__c!=null || temlostProduct.LostProductss.LostProductMannual__c!=null)&&temlostProduct.LostProductss.ProductCategory__c==null) { if (temlostProduct.LostProductss.ProductClass__c==null) { temlostProduct.LostProductss.ProductClass__c.addError('失单产品类别必填!'); temlostProduct.LostProductss.ProductCategory__c.addError('失单产品必填!'); }else { temlostProduct.LostProductss.ProductCategory__c.addError('失单产品必填!'); } dataCheck = false; } // 当失单品牌名为其他时,报错字段为失单对手型号(手动) thh 2022-01-17 start if ((temlostProduct.LostProductss.LostProduct__c==null && temlostProduct.LostProductss.LostProductMannual__c==null)&&(temlostProduct.LostProductss.ProductCategory__c!=null||temlostProduct.LostProductss.Quantity__c!=null)) { if(tempLostBrand.lostBrand.Lost_By_Company__c != '其他'){ temlostProduct.LostProductss.LostProduct__c.addError('失单对手型号或失单对手型号(手动)必填!'); } else{ temlostProduct.LostProductss.LostProductMannual__c.addError('失单对手型号或失单对手型号(手动)必填!'); } dataCheck = false; } // 当失单品牌名为其他时,报错字段为失单对手型号(手动) thh 2022-01-17 end // update tcm 20211123 end } // 当失单品牌名为其他时,报错字段为失单对手型号(手动) thh 2022-01-17 start if (productCount == 0 && tempLostBrand.LostProducts != null && tempLostBrand.LostProducts.size() > 0) { if(tempLostBrand.lostBrand.Lost_By_Company__c != '其他'){ tempLostBrand.LostProducts[0].LostProductss.LostProduct__c.addError('至少录入1条失单对手型号信息!'); }else{ tempLostBrand.LostProducts[0].LostProductss.LostProductMannual__c.addError('至少录入1条失单对手型号信息!'); } dataCheck = false; } // 当失单品牌名为其他时,报错字段为失单对手型号(手动) thh 2022-01-17 end } return dataCheck; } @AuraEnabled public static String searchBrands(){ String ObjectApi_name = 'PCLLostBrand__c'; @@ -480,17 +266,6 @@ } String jsonStr = JSON.serialize(lstPickvals); return jsonStr; } public static list<LostBrand> brandcopy(LostReport report){ list<LostBrand> tempbrands = new list<LostBrand>(); for(LostBrand tempbrand: report.LostBrands) { LostBrand LostBrand = new LostBrand(tempbrand.lineNo,tempbrand.LostProducts ); LostBrand.lostBrand = tempbrand.lostBrand.clone(); LostBrand.lostBrand.id = tempbrand.lostBrand.id; tempbrands.add(LostBrand); } return tempbrands; } // 数据录入 @AuraEnabled @@ -679,51 +454,6 @@ return lostBrand; } // 删除品牌 这个有参数brandNo,才知道是删除那个品牌 @AuraEnabled public static String Remove(){ system.debug('RemoveBrandNo:'+RemoveBrandNo); list<LostBrand> tempLostBrands = new List<lostBrand>(); Integer i = 0; for(integer j = 0; j< LostReport.LostBrands.size(); j++ ) { LostBrand templostBrand = LostReport.LostBrands.get(j); if(j != RemoveBrandNo) { templostBrand.lineNo = i; tempLostBrands.add(templostBrand); i++; }else if(!string.isBlank(templostBrand.lostBrand.id)) { deleteBrandIDSet.add(templostBrand.lostBrand.id); } } LostReport.LostBrands = tempLostBrands; brandCount = LostReport.LostBrands.size(); return null; } // 添加型号, 这个有参数brandNo,才知道是添加到那个品牌 // update tcm 20211125 添加型号时自动带出品牌 start @AuraEnabled public static String addProduct(){ system.debug('brandNo:'+brandNo); LostBrand tempLostBrand = LostReport.LostBrands.get(brandNo); // PCLLostProduct__c plp = new PCLLostProduct__c(Competitor__c=CompetitionMap.get(LostReport.LostBrands[brandNo].lostBrand.Lost_By_Company__c)); string brandName = tempLostBrand.lostBrand.Lost_By_Company__c; PCLLostProduct__c plp = new PCLLostProduct__c(); plp.LostBrandName__c = brandName; tempLostBrand.LostProducts.add(new PCLLostProducts(tempLostBrand.LostProducts.size(),plp)); tempLostBrand.ProductSize = tempLostBrand.LostProducts.size(); return null; } @AuraEnabled public static PCLLostProducts getLostProduct(){ try { PCLLostProduct__c plp = new PCLLostProduct__c(); return new PCLLostProducts(0,plp); } catch (Exception e) { throw new AuraHandledException(e.getMessage()); } } // update tcm 20211125 添加型号时自动带出品牌 end // 页面的数据结构 public class LostReport { force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
@@ -4,7 +4,7 @@ * @Author: chen jing wu * @Date: 2023-04-20 17:16:48 * @LastEditors: chen jing wu * @LastEditTime: 2023-06-06 10:33:07 * @LastEditTime: 2023-06-06 14:00:41 --> <template> @@ -25,7 +25,7 @@ </lightning-layout> <div style="margin-top: 5px"> <lightning-layout> <lightning-layout-item size="2" padding="around-small"> <lightning-layout-item size="3" padding="around-small"> <div class="slds-form_horizontal my-combobox"> <label class="slds-form-element__label">失单类型:</label> <lightning-combobox name="progress" value={LostReport.lostReport.LostType__c} options={RecordTypeOptions} @@ -33,7 +33,7 @@ </lightning-combobox> </div> </lightning-layout-item> <lightning-layout-item size="3" padding="around-small"> <lightning-layout-item size="4" padding="around-small"> <div style="padding: 10px 3px;font: 16px;">失单总金额(元):{LostReport.lostReport.LostTotalAmount__c}</div> </lightning-layout-item> <lightning-layout-item size="3" padding="around-small"> force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
@@ -4,7 +4,7 @@ * @Author: chen jing wu * @Date: 2023-04-20 15:04:03 * @LastEditors: chen jing wu * @LastEditTime: 2023-06-06 10:51:30 * @LastEditTime: 2023-06-06 13:27:33 */ const columns2=[ { label: '--无--', value: '' }, @@ -31,7 +31,7 @@ ]; const columns3 = [ {label : "失单品牌",fieldName : "LostBrandName__c"}, {label : "失单对手型号",fieldName : "LostProduct__c"}, {label : "失单对手型号",fieldName : "productName"}, {label : "失单数量",fieldName : "Quantity__c",type : "number"}, {label : "失单对手型号(手动)",fieldName : "LostProductMannual__c"}, {label : "失单产品类别",fieldName : "ProductClass__c"}, @@ -171,7 +171,9 @@ var products = this.LostReport.LostBrands[this.tableflag].LostProducts; var productList = []; products.forEach(product=>{ productList.push(product.LostProductss); var newProduct = JSON.parse(JSON.stringify(product)); newProduct.LostProductss.productName = newProduct.productName; productList.push(newProduct.LostProductss); }); this.tableflag++; return productList; @@ -201,6 +203,12 @@ get isEdit(){ if(this.status.pageStatus == 'Edit'){ return true; } return false; } get isSubmit(){ if(this.submitFlag){ return true; } return false; @@ -349,22 +357,24 @@ if(result.error){ this.showToast(result.error,"error"); }else{ var report = JSON.parse(result.LostReport); var index1 = 0; this.LostReport.LostBrands.forEach(brand=>{ brand.lostBrand.Id = report.LostBrands[index1].lostBrand.Id; var index2 = 0; brand.LostProducts.forEach(product=>{ product.LostProductss.Id = report.LostBrands[index1].LostProducts[index2].LostProductss.Id; index2++; }); index1++; }); // var report = JSON.parse(result.LostReport); // var index1 = 0; // this.LostReport.LostBrands.forEach(brand=>{ // brand.lostBrand.Id = report.LostBrands[index1].lostBrand.Id; // var index2 = 0; // brand.LostProducts.forEach(product=>{ // product.LostProductss.Id = report.LostBrands[index1].LostProducts[index2].LostProductss.Id; // index2++; // }); // index1++; // }); this.LostReport = JSON.parse(result.LostReport); this.reportId = result.reportId; this.LostReport.lostReport.Id = result.reportId; console.log(this.LostReport); // this.LostReport.lostReport.Id = result.reportId; // console.log(this.LostReport); this.status.pageStatus = 'View'; this.tableflag = 0; console.log(this.LostReport); } }).catch(error=>{ console.log("error"); force-app/main/default/lwc/lexSpecSubmit/__tests__/lexSpecSubmit.test.js
New file @@ -0,0 +1,25 @@ import { createElement } from 'lwc'; import LexSpecSubmit from 'c/lexSpecSubmit'; describe('c-lex-spec-submit', () => { afterEach(() => { // The jsdom instance is shared across test cases in a single file so reset the DOM while (document.body.firstChild) { document.body.removeChild(document.body.firstChild); } }); it('TODO: test case generated by CLI command, please fill in test logic', () => { // Arrange const element = createElement('c-lex-spec-submit', { is: LexSpecSubmit }); // Act document.body.appendChild(element); // Assert // const div = element.shadowRoot.querySelector('div'); expect(1).toBe(1); }); }); force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.css
New file @@ -0,0 +1,10 @@ .specSubmitHolder{ position: relative; display: inline-block; width: 80px; height: 80px; text-align: center; } .container .uiContainerManager{ display: none !important; } force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.html
New file @@ -0,0 +1,7 @@ <template> <div class="specSubmitHolder" if:true={IsLoading}> <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button> </div> </template> force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.js
New file @@ -0,0 +1,105 @@ /* * @Description: * @version: * @Author: chen jing wu * @Date: 2023-06-06 15:41:32 * @LastEditors: chen jing wu * @LastEditTime: 2023-06-06 16:40:51 */ import { api, wire,LightningElement } from 'lwc'; import { CurrentPageReference } from "lightning/navigation"; import { CloseActionScreenEvent } from 'lightning/actions'; import updateForSpecSubmitButton from '@salesforce/apex/lexOpportunitySpecialApplyController.updateForSpecSubmitButton'; import init from '@salesforce/apex/lexOpportunitySpecialApplyController.initForSpecSubmitButton'; import { updateRecord } from 'lightning/uiRecordApi'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; import LightningConfirm from 'lightning/confirm'; export default class LexSpecSubmit extends LightningElement { @api recordId; applyReason; isUploadFile; status; IsLoading = true; @wire(CurrentPageReference) getStateParameters(currentPageReference) { console.log(111); console.log(currentPageReference); if (currentPageReference) { const urlValue = currentPageReference.state.recordId; if (urlValue) { let str = `${urlValue}`; console.log("str"); console.log(str); this.recordId = str; } } } showToast(msg,type) { const event = new ShowToastEvent({ title: '', message: msg, variant: type }); this.dispatchEvent(event); } updateRecordView(recordId) { updateRecord({fields: { Id: recordId }}); } connectedCallback(){ init({ recordId: this.recordId }).then(result=>{ this.applyReason = result.applyReason; this.isUploadFile = result.isUploadFile; this.status = result.status; this.specSubmit(); }).catch(error=>{ console.log("error"); console.log(error); }); } specSubmit(){ var reason = this.applyReason; var file = this.isUploadFile; var status = this.status; if((reason == '招标质疑'||reason == '取消招标') && (file == false)){ this.showToast('请上传附件。','error'); return; } if(status != '草案中'&& status != '驳回'){ this.showToast('当前状态无法提交审批。','error'); return; } this.handleConfirmClick('一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?'); } async handleConfirmClick(msg) { const result = await LightningConfirm.open({ message: msg, variant: 'headerless', label: 'this is the aria-label value', }); console.log(result); if(result){ updateForSpecSubmitButton({ recordId: this.recordId }).then(result=>{ if(result){ this.showToast(result,'error'); }else{ this.showToast('审批提交成功。','success'); this.updateRecordView(this.recordId); this.IsLoading = false; } this.dispatchEvent(new CloseActionScreenEvent()); }); }else{ this.dispatchEvent(new CloseActionScreenEvent()); return; } } } force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.js-meta.xml
New file @@ -0,0 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>54.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__RecordPage</target> <target>lightning__AppPage</target> <target>lightning__HomePage</target> <target>lightning__RecordAction</target> </targets> </LightningComponentBundle> force-app/main/default/lwc/lexSpecilaApplyCreate/__tests__/lexSpecilaApplyCreate.test.js
New file @@ -0,0 +1,25 @@ import { createElement } from 'lwc'; import LexSpecilaApplyCreate from 'c/lexSpecilaApplyCreate'; describe('c-lex-specila-apply-create', () => { afterEach(() => { // The jsdom instance is shared across test cases in a single file so reset the DOM while (document.body.firstChild) { document.body.removeChild(document.body.firstChild); } }); it('TODO: test case generated by CLI command, please fill in test logic', () => { // Arrange const element = createElement('c-lex-specila-apply-create', { is: LexSpecilaApplyCreate }); // Act document.body.appendChild(element); // Assert // const div = element.shadowRoot.querySelector('div'); expect(1).toBe(1); }); }); force-app/main/default/lwc/lexSpecilaApplyCreate/lexSpecilaApplyCreate.css
New file @@ -0,0 +1,22 @@ .holder{ position: relative; display: inline-block; width: 80px; height: 80px; text-align: center; } .container .uiContainerManager{ display : none !important; } .toast{ border: 1px solid #c9c9c9; border-radius: 10px; width: 50%; margin: 0 auto; font-size: 18px; font-weight: bold; padding: 10px 20px; background: #feb75d; display: flex; } force-app/main/default/lwc/lexSpecilaApplyCreate/lexSpecilaApplyCreate.html
New file @@ -0,0 +1,13 @@ <template> <div class="holder" if:true={IsLoading}> <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> </div> <div if:false={IsLoading} class="toast"> <span style="padding: 10px;">{msg}</span> <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;"> <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small" title="Close" style="color: black;"></lightning-icon> <span class="slds-assistive-text">Close</span> </button> </div> </template> force-app/main/default/lwc/lexSpecilaApplyCreate/lexSpecilaApplyCreate.js
New file @@ -0,0 +1,32 @@ import { LightningElement,api, track, wire } from 'lwc'; import {CurrentPageReference} from 'lightning/navigation'; import { CloseActionScreenEvent } from 'lightning/actions'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; import { NavigationMixin } from 'lightning/navigation'; import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; export default class LexSpecilaApplyCreate extends NavigationMixin(LightningElement) { @api oppId; @api oppName; @api oppForecastStatus; msg; IsLoading = true; connectedCallback(){ // const defaultValues = encodeDefaultFieldValues({ // Opportunity__c: this.oppId, // 关联主记录 ID // Apply_Content_Old__c: this.oppForecastStatus == undefined ? '' : this.oppForecastStatus // }); this[NavigationMixin.Navigate]({ type: 'standard__objectPage', attributes: { objectApiName: 'OpportunitySpecialApply__c', actionName: 'new' }, // state: { // defaultFieldValues: defaultValues, // RecordTypeId: '01210000000gTCW' // } }); // var url = 'a3W/e?RecordType=01210000000gTCW&CF00N10000008qvFQ='+ encodeURIComponent(this.oppName) + '&CF00N10000008qvFQ_lkid='+ encodeURIComponent(this.oppId) + '&00N10000008qvFX='+ encodeURIComponent(this.oppForecastStatus)+'&retURL='+ encodeURIComponent(this.oppId); // window.location.href = url; } } force-app/main/default/lwc/lexSpecilaApplyCreate/lexSpecilaApplyCreate.js-meta.xml
New file @@ -0,0 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>54.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__AppPage</target> <target>lightning__RecordPage</target> <target>lightning__HomePage</target> <target>lightning__RecordAction</target> <!-- 屏幕流配置 --> <target>lightning__FlowScreen</target> </targets> <!-- 定义变量 --> <targetConfigs> <targetConfig targets="lightning__FlowScreen"> <!-- name js中使用的变量,从屏幕流中获取参数 label 在屏幕流的该LWC的设置中显示 --> <property name="oppId" type="String" label="oppId"/> <property name="oppName" type="String" label="oppName"/> <property name="oppForecastStatus" type="String" label="oppForecastStatus"/> </targetConfig> </targetConfigs> </LightningComponentBundle> force-app/main/default/pages/ISO_DemandOperAndDemonsJump.page
@@ -1,4 +1,4 @@ <apex:page standardController="IS_Opportunity_Demand__c" extensions="ISO_DemandOperAndDemonsJumpController" action="{!init}"> <apex:page standardController="IS_Opportunity_Demand__c" extensions="ISO_DemandOperAndDemonsJumpController" action="{!init}" lightningStylesheets="true"> <script type="text/javascript"> // TODO jsにて日報画面色変更 window.location.href = '/apex/{!lid}'; force-app/main/default/pages/SolApproval.page
@@ -1,4 +1,4 @@ <apex:page sidebar="true" standardController="Solution_Programme__c"> <apex:page sidebar="true" standardController="Solution_Programme__c" lightningStylesheets="true"> <!-- <apex:relatedList list="ProcessSteps" ></apex:relatedList>--> <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> <script type="text/javascript"> force-app/main/default/pages/Solution_ProgrammeClone.page
@@ -1,3 +1,3 @@ <apex:page standardController="Solution_Programme__c" extensions="CreateSolCloneController" title="Solution_Programme__c" action="{!checkRecordTypeEDIT}"> <apex:page standardController="Solution_Programme__c" extensions="CreateSolCloneController" title="Solution_Programme__c" action="{!checkRecordTypeEDIT}" lightningStylesheets="true"> </apex:page> force-app/main/default/pages/Solution_ProgrammeDelete.page
@@ -1,4 +1,4 @@ <apex:page standardController="Solution_Programme__c" extensions="Solution_ProgrammeDeleteController" action="{!init}" sidebar="true"> <apex:page standardController="Solution_Programme__c" extensions="Solution_ProgrammeDeleteController" action="{!init}" sidebar="true" lightningStylesheets="true"> <apex:outputPanel layout="none" rendered="{!IF(is_Alert_Delete, false,true )}"> <apex:form > <apex style="font-size: 18px;">Solution方案只有状态为草案中时才可删除</apex><br/> force-app/main/default/pages/Solution_ProgrammeEdit.page
@@ -1,3 +1,3 @@ <apex:page standardController="Solution_Programme__c" extensions="CreateSolEditController" title="Solution_Programme__c" action="{!checkRecordTypeEDIT}"> <apex:page standardController="Solution_Programme__c" extensions="CreateSolEditController" title="Solution_Programme__c" action="{!checkRecordTypeEDIT}" lightningStylesheets="true"> </apex:page> force-app/main/default/pages/SubAuthorizedCreate.page
@@ -1,5 +1,5 @@ <!-- 需要按照转授权字段的ID 改这里--> <apex:page standardController="SubAuthorized__c" showHeader="false" sidebar="false"> <apex:page standardController="SubAuthorized__c" showHeader="false" sidebar="false" lightningStylesheets="true"> <script type="text/javascript"> function init() { var str = '/a3Q/e?&Name=*'; force-app/main/default/pages/taskManage.page
@@ -1,4 +1,4 @@ <apex:page showHeader="false" sidebar="false" id="allPage" title="任务管理表"> <apex:page showHeader="false" sidebar="false" id="allPage" title="任务管理表" lightningStylesheets="true"> <apex:includeLightning /> <div style="width:100%;height:100%;" id="TaskManageAppOutContainer" />