.sf/config.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
force-app/main/default/classes/DNUpsertBatch.cls | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
force-app/main/default/classes/OCSMHandler.cls | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
force-app/main/default/classes/SyncProvinceWIndowToSignForm.cls | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
force-app/main/default/classes/SyncProvinceWIndowToSignForm.cls-meta.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
force-app/main/default/lwc/lexConsumable/lexConsumable.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
force-app/main/default/lwc/lexConsumable/lexConsumable.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
force-app/main/default/lwc/paginatedList/paginatedList.js-meta.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
manifest/packageForSign.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.sf/config.json
@@ -1,3 +1,3 @@ { "target-org": "LEXOlympusDev" "target-org": "MEBGStage" } force-app/main/default/classes/DNUpsertBatch.cls
@@ -574,12 +574,30 @@ Statu_Achievements__r.orderType__c //无偿出库标识 thh 2021-11-01 end //acc标识 end //Add by Li Jun 20230420 start ,Opportunity__r.OCM_man_province_cus__c //Add By Li Jun 20230420 end from Statu_Achievements_DN__c where Name in: DNNoSet]; return DNList; } global void finish(Database.BatchableContext BC) { } //Add By Li Jun 0420 Start query management province private static Map<String,OCM_Management_Province__c> provinceManagementMap{set;get;} public static Map<String,OCM_Management_Province__c> getManagementProvince(){ if(provinceManagementMap !=null && provinceManagementMap.keySet().size()>0 ){ return provinceManagementMap; } provinceManagementMap = new Map<String,OCM_Management_Province__c>(); List <OCM_Management_Province__c > ompList = [select id, Name, SalesManage__c,GI_assistant__c,Window1__c from OCM_Management_Province__c]; for (OCM_Management_Province__c omp: ompList) { provinceManagementMap.put(omp.Name,omp); } return provinceManagementMap; } //Add By Li Jun 0420 End /* 构建签收单: * eSFMap 是系统里面现有的签收单 * key 为 DN号; @@ -604,8 +622,13 @@ tempeSF.DNName__c = tempDN.Name; tempeSF.Statu_Achievements__c = tempDN.Statu_Achievements__c; tempeSF.Statu_Achievements_DN__c = tempDN.ID; tempeSF.Sales_assistant_name_text__c = tempDN.Sales_assistant_name_text__c;//Updated By Li Jun 20230420 //Updated By Li Jun 20230420 start //tempeSF.Sales_assistant_name_text__c = tempDN.Sales_assistant_name_text__c; tempeSF.Sales_assistant_name_text__c = tempDN.Opportunity__c != null && tempDN.Opportunity__r.OCM_man_province_cus__c != '' && getManagementProvince().containsKey(tempDN.Opportunity__r.OCM_man_province_cus__c)? getManagementProvince().get(tempDN.Opportunity__r.OCM_man_province_cus__c).Window1__c: null; tempeSF.RC_Manager__c = tempDN.RC_Manager__c; //Updated By Li Jun 20230420 end //生成签收单时,给是否无偿出库赋值 精琢技术 thh 2021-10-15 start if(tempDN.Statu_Achievements__r.orderType__c == 'ZM16'){ tempeSF.isFreeDelivery__c = true; @@ -732,7 +755,7 @@ // 电子签收单 赋值营业助理和营业管理部担当 start //集中采购的询价 精琢技术 wql 2020/01/11 start //Add By Li Jun 20230420 Start tempSADN.Sales_assistant_name_text__c =opp.OCM_man_province_cus__c!='' && provinceGIMap.containskey(opp.OCM_man_province_cus__c)?provinceGIMap.get(opp.OCM_man_province_cus__c):''; tempSADN.Sales_assistant_name_text__c =opp.OCM_man_province_cus__c!='' && provinceGIMap.containskey(opp.OCM_man_province_cus__c)?provinceGIMap.get(opp.OCM_man_province_cus__c):null; //Add By Li Jun 20230420 End if(opp.Group_purchase_PCL__c){ //tempSADN.Sales_assistant_name_text__c = provinceGIMap.get('集采课'); //Commented By Li Jun 20230420 force-app/main/default/classes/OCSMHandler.cls
@@ -5,6 +5,9 @@ OCM_Management_Province__c old = null; List<String> noList = new List<String>(); //Add By Li Jun 20230420 Start OCSM省的【营业窗口】人员发生变动时,需要更新现有的未完成的签收单的【营业助理】值 Set<String> changedWindowProvince = new set<String>(); //Add By Li Jun 20230420 End for (OCM_Management_Province__c local : newList) { if (Trigger.isInsert) { @@ -45,12 +48,23 @@ noList.add(old.OnlinePlatformWindow3__c); } } //Add By Li Jun 20230420 Start if (local.Window1__c != null && local.Window1__c != old.Window1__c) { changedWindowProvince.add(local.Name); } //Add By Li Jun 20230420 End } } if (noList.size() > 0) { NFM621Controller.callout('', noList); } //Add By Li Jun 20230420 Start if(changedWindowProvince.size() > 0){ SyncProvinceWIndowToSignForm.syncProvinceWIndow(changedWindowProvince); } //Add By Li Jun 20230420 End } } //LY 2021/11/12 end force-app/main/default/classes/SyncProvinceWIndowToSignForm.cls
New file @@ -0,0 +1,51 @@ global without sharing class SyncProvinceWIndowToSignForm implements Database.Batchable<sObject>,Database.Stateful{ private Set<String> changedWindowProvince{set;get;} global SyncProvinceWIndowToSignForm(Set<String> changedWindowProvince) { this.changedWindowProvince = changedWindowProvince; } global Database.QueryLocator start(Database.BatchableContext BC) { String query = 'select Sales_assistant_name_text__c,isProcessed__c,OCM_man_province_cus__c from eSignForm__c '; query += ' where isProcessed__c = false '; if (changedWindowProvince != null && changedWindowProvince.size() >0 ) { query += ' and OCM_man_province_cus__c = :changedWindowProvince '; system.debug('SOQL' + query); return Database.getQueryLocator(query); } return null; } global void execute(Database.BatchableContext BC, List<eSignForm__c> signFormList) { // 取得OCM管理省信息 Map<String, OCM_Management_Province__c> provinceMap = DNUpsertBatch.getManagementProvince(); // 判断需要更新的签收单 List<eSignForm__c> updList = new List<eSignForm__c>(); for (eSignForm__c temp : signFormList) { String provinceName = temp.OCM_man_province_cus__c; if( provinceName != '' && provinceMap.containsKey(provinceName) && provinceMap.get(provinceName).Window1__c != null){ temp.Sales_assistant_name_text__c = provinceMap.get(provinceName).Window1__c; updList.add(temp); } } // 签收单更新 if (updList.size() > 0) { Database.SaveResult[] lsr = Database.update(updList, false); for (Integer tIdx = 0; tIdx < lsr.size(); tIdx++) { Database.SaveResult sr = lsr[tIdx]; if (!sr.isSuccess()) { Database.Error emsg = sr.getErrors()[0]; System.debug('=====Error Sign: ' + updList[tIdx].Id + ' msg: ' + emsg); } } } } global void finish(Database.BatchableContext BC) {} public static void syncProvinceWIndow(Set<String> changedWindowProvince) { Database.executeBatch(new SyncProvinceWIndowToSignForm(changedWindowProvince),200); } } force-app/main/default/classes/SyncProvinceWIndowToSignForm.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>56.0</apiVersion> <status>Active</status> </ApexClass> force-app/main/default/lwc/lexConsumable/lexConsumable.html
@@ -225,7 +225,7 @@ <p style="font-size: 16px;"><strong>消耗品明细</strong></p> </div> <div style="padding:10px;"> <table style="width: 100%;" class="conTable"> <!-- <table style="width: 100%;" class="conTable"> <thead> <tr style="border-bottom: 1px solid #D4D4D4;"> <template if:true={editAble}> @@ -310,7 +310,8 @@ </tr> </template> </tbody> </table> </table> --> <c-lex-custom-lightning-datatable hide-checkbox-column key-field="Id" data={consumableorderdetailsRecordForDT} columns={cols}></c-lex-custom-lightning-datatable> </div> </div> </div> force-app/main/default/lwc/lexConsumable/lexConsumable.js
@@ -42,6 +42,7 @@ @track category4Option = []; @track category5Option = []; @track consumableorderdetailsRecordsview = []; @track consumableorderdetailsRecordForDT = []; @track attachmentRecoeds = []; @track contactDealer = []; @track proLimitAndDate = []; @@ -117,6 +118,38 @@ {label:'允许报价期间(结束日)',fieldName:'Contract_Decide_End_Date__c',initialWidth:200,hideDefaultActions: true} ]; //消耗品数据col get cols(){ var cols = []; cols.push({label:'消耗品名称',fieldName:'prodName',wrapText:true,hideDefaultActions: true}); cols.push({label:'规格',fieldName:'packing_list',hideDefaultActions: true}); cols.push({label:'CFDA状态',fieldName:'prodSFDAStatus',hideDefaultActions: true}); cols.push({label:'注册证编码号',fieldName:'approbation_No',hideDefaultActions: true}); cols.push({label:'注册证效期',fieldName:'expiration_Date',hideDefaultActions: true}); cols.push({label:'第3分类',fieldName:'prodCategory3',hideDefaultActions: true}); cols.push({label:'第4分类',fieldName:'prodCategory4',hideDefaultActions: true}); cols.push({label:'第5分类',fieldName:'prodCategory5',hideDefaultActions: true}); if(this.cansee){ cols.push({label:'标准单价',fieldName:'prodIntraTradeList',hideDefaultActions: true}); } if(this.editAble){ cols.push( {label:'采购数量', type: "customTableInput",typeAttributes: { recordId: { fieldName: "recordId" }, inputValue: { fieldName: "consumableCount" }, }, hideDefaultActions: true}); }else{ cols.push({label:'采购数量',fieldName:'consumableCount',hideDefaultActions: true}); } cols.push({label:'在库数下限',fieldName:'lowerlimit',hideDefaultActions: true}); cols.push({label:'在库数上限',fieldName:'upperlimit',hideDefaultActions: true}); cols.push({label:'有效期库存(盒)',fieldName:'allnumber',hideDefaultActions: true}); cols.push({label:'有效期库存(个)',fieldName:'allnumber_piece',hideDefaultActions: true}); return cols;l } @wire(CurrentPageReference) getStateParameters(currentPageReference) { console.log('CurrentPageReference'); @@ -147,11 +180,11 @@ this.contractName = result.contractName; this.contractLabel = '经销商有效合同'; this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview; // this.consumableorderdetailsRecordForDT = result.consumableorderdetailsRecordsview; this.getTableData(); this.attachmentRecoeds = result.attachmentRecoeds; this.errorMsgs = result.errorMsgList; this.warningMsgs = result.warningMsgList; // this.hasError = result.hasError; // this.hasWarning = result.hasWarning; this.userWorkLocation = result.userWorkLocation; this.accountName = result.accountName; this.accountid = result.accountid; @@ -202,20 +235,30 @@ } this.showSpinner = false; this.showPage = true; // this.warningMsgs.push('warning1'); // this.warningMsgs.push('warning2'); // this.warningMsgs.push('warning3'); // this.warningMsgs.push('warning4'); // this.errorMsgs.push('error1'); // this.errorMsgs.push('error2'); // this.errorMsgs.push('error3'); // this.errorMsgs.push('error4'); }else{ this.showSpinner = false; console.log("Error:"+result.errorMsg); this.showMyToast('初始化页面失败',result.errorMsg,'error'); } }) } getTableData(){ for(var i in this.consumableorderdetailsRecordForDT){ if(!this.consumableorderdetailsRecordForDT[i].oldCheck){ this.consumableorderdetailsRecordForDT[i]["prodName"] = this.consumableorderdetailsRecordForDT[i].Prod.Name__c; }else{ this.consumableorderdetailsRecordForDT[i]["prodName"] = this.consumableorderdetailsRecordForDT[i].esd.Consumable_Product__r.Name__c; } this.consumableorderdetailsRecordForDT[i]["prodSFDAStatus"] = this.consumableorderdetailsRecordForDT[i].Prod.SFDA_Status__c; this.consumableorderdetailsRecordForDT[i]["prodCategory3"] = this.consumableorderdetailsRecordForDT[i].Prod.Category3__c; this.consumableorderdetailsRecordForDT[i]["prodCategory4"] = this.consumableorderdetailsRecordForDT[i].Prod.Category4__c; this.consumableorderdetailsRecordForDT[i]["prodCategory5"] = this.consumableorderdetailsRecordForDT[i].Prod.Category5__c; this.consumableorderdetailsRecordForDT[i]["prodIntraTradeList"] = this.consumableorderdetailsRecordForDT[i].Prod.Intra_Trade_List_RMB__c; this.consumableorderdetailsRecordForDT[i]["consumableCount"] = this.consumableorderdetailsRecordForDT[i].esd.Consumable_count__c; } console.log("ProdName1:"+this.consumableorderdetailsRecordForDT[0].prodName); console.log("ProdName2:"+this.consumableorderdetailsRecordsview[0].prodName); } get hasWarning(){ @@ -304,6 +347,7 @@ .then(result=>{ if(result.result == 'Success'){ this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview; this.getTableData(); this.showSpinner = false; this.errorMsgs = result.errorMsgList; this.warningMsgs = result.warningMsgList; @@ -351,6 +395,7 @@ }).then(result=>{ if(result.result == 'Success'){ this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview; this.getTableData(); this.showSpinner = false; this.showMyToast('搜索成功',result.errorMsg,'success'); }else{ @@ -786,6 +831,7 @@ }).then(result=>{ if(result.result == 'Success'){ this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview; this.getTableData(); this.showMyToast('搜索成功',result.errorMsg,'success'); }else{ console.log("Error:"+result.errorMsg); @@ -901,6 +947,7 @@ }).then(result=>{ if(result.result == 'Success'){ this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview; this.getTableData(); this.showMyToast('搜索成功',result.errorMsg,'success'); }else{ console.log("Error:"+result.errorMsg); force-app/main/default/lwc/paginatedList/paginatedList.js-meta.xml
@@ -1,5 +1,9 @@ <?xml version="1.0" encoding="UTF-8" ?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>54.0</apiVersion> <isExposed>false</isExposed> <isExposed>true</isExposed> <targets> <target>lightning__AppPage</target> <target>lightning__Tab</target> </targets> </LightningComponentBundle> manifest/packageForSign.xml
@@ -3,8 +3,9 @@ <types> <members>updateESignBatch</members> <members>DNUpsertBatch</members> <members>OCMManagementProvinceBatch</members> <members>SyncProvinceWIndowToSignForm</members> <members>OCSMHandler</members> <name>ApexClass</name> </types> </types> <version>52.0</version> </Package>