.prettierrc | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
.sf/config.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
force-app/main/default/classes/AccAssumeChangeBatch.cls | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
force-app/main/default/classes/AccessorySelectController.cls | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
force-app/main/default/pages/AccChangeApprovalResponse.page | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
package-lock.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
package.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.prettierrc
@@ -3,11 +3,25 @@ "overrides": [ { "files": "**/lwc/**/*.html", "options": { "parser": "lwc" } "options": { "tabWidth": 4, "parser": "lwc" } }, { "files": "**/*.{cls,trigger,apex}", "options": { "apexInsertFinalNewline": true, "printWidth": 140, "tabWidth": 4 } }, { "files": "*.{cmp,page,component}", "options": { "parser": "html" } "options": { "parser": "html", "tabWidth": 4 } } ] } .sf/config.json
New file @@ -0,0 +1,3 @@ { "target-org": "OlympusPIPLDev" } force-app/main/default/classes/AccAssumeChangeBatch.cls
@@ -10,7 +10,6 @@ } // 执行靶器 global AccAssumeChangeBatch() { } global Database.QueryLocator start(Database.BatchableContext bc) { @@ -26,11 +25,16 @@ } global void execute(Database.BatchableContext BC, list<Account> HosinfoList) { List<Tender_information__c> TenInfoList = [Select Id, Hospital__c, Hospital1__c, Hospital2__c, Hospital3__c, Hospital4__c from Tender_information__c Where Hospital__c in: HosinfoList or Hospital1__c in: HosinfoList or Hospital2__c in: HosinfoList or Hospital3__c in: HosinfoList or Hospital4__c in: HosinfoList ]; List<Tender_information__c> TenInfoList = [ SELECT Id, Hospital__c, Hospital1__c, Hospital2__c, Hospital3__c, Hospital4__c FROM Tender_information__c WHERE Hospital__c IN :HosinfoList OR Hospital1__c IN :HosinfoList OR Hospital2__c IN :HosinfoList OR Hospital3__c IN :HosinfoList OR Hospital4__c IN :HosinfoList ]; if (TenInfoList.size() > 0) { // List<Tender_information__c> failedTenderList = new List<Tender_information__c>(); @@ -67,6 +71,5 @@ } global void finish(Database.BatchableContext BC) { } } force-app/main/default/classes/AccessorySelectController.cls
@@ -55,13 +55,30 @@ public override List<String> getColumnFieldList() { // strColumus 里加 field // FixtureUtil#raesdGroupBy()の項目も必要 return new List<String>{'Id', 'Rental_Apply_Equipment_Set__c', 'FSD_Id__c', 'Select_Time__c', 'Fixture_Model_No_F__c', 'IndexFromUniqueKey__c', 'FSD_Fixture_Model_No__c', 'Is_Body_F__c', 'SalesProvince__c', 'OneToOne_Flag__c', 'Rental_Apply__c', 'Rental_Apply__r.Salesdepartment__c', 'DeliverySlip__c', 'Is_Body__c', 'Rental_Apply__r.Equipment_Type_F__c', 'Rental_Apply__r.Internal_asset_location_F__c', 'Rental_Apply__r.Salesdept__c', 'Rental_Apply__r.Product_category__c', 'Rental_Apply__r.demo_purpose2__c','Rental_Apply__r.Follow_UP_Opp__r.Shipping_Finished_Day_Func__c', 'Rental_Apply__r.next_action__c','Rental_Apply__r.QIS_number__r.ReplaceDeliveryDate__c'}; return new List<String>{ 'Id', 'Rental_Apply_Equipment_Set__c', 'FSD_Id__c', 'Select_Time__c', 'Fixture_Model_No_F__c', 'IndexFromUniqueKey__c', 'FSD_Fixture_Model_No__c', 'Is_Body_F__c', 'SalesProvince__c', 'OneToOne_Flag__c', 'Rental_Apply__c', 'Rental_Apply__r.Salesdepartment__c', 'DeliverySlip__c', 'Is_Body__c', 'Rental_Apply__r.Equipment_Type_F__c', 'Rental_Apply__r.Internal_asset_location_F__c', 'Rental_Apply__r.Salesdept__c', 'Rental_Apply__r.Product_category__c', 'Rental_Apply__r.demo_purpose2__c', 'Rental_Apply__r.Follow_UP_Opp__r.Shipping_Finished_Day_Func__c', 'Rental_Apply__r.next_action__c', 'Rental_Apply__r.QIS_number__r.ReplaceDeliveryDate__c' }; } // 画面里直接可以输入的項目 List public override List<String> getWritableColumnFieldList() { @@ -83,7 +100,6 @@ public override String getSqlWhereStr() { sqlWhereStr = ''; return sqlWhereStr; } public override Boolean getIsNeedRunSearch() { @@ -94,7 +110,6 @@ public String goAccessoryAdd { get; set; } /*****************検索用******************/ /*****************ソート時再検索条件(画面からの入力条件を無視するため)******************/ @@ -118,7 +133,6 @@ // public String bieBiePinFenLei { get; set; } //别备品分类 // #OLY_OCM-654 End public Rental_Apply_Equipment_Set_Detail__c pageRaesd {get; set;} public AccessorySelectController() { Integer i = 0; @@ -572,7 +586,9 @@ //借出备品一览の情報を取得 if (!String.isBlank(this.parentId)) { List<Rental_Apply_Equipment_Set__c> parentObjs = [ SELECT Id, Rental_Apply__r.Name, SELECT Id, Rental_Apply__r.Name, Rental_Apply__r.Owner.Name, Rental_Apply__r.Salesdept__c, Rental_Apply__r.WorkPlace__c, @@ -593,31 +609,41 @@ Rental_End_Date__c, Irreplaceable_flag__c, RequestNoJoinStr2__c, First_RAESD__c, First_RAESD__r.Is_Body__c First_RAESD__c, First_RAESD__r.Is_Body__c FROM Rental_Apply_Equipment_Set__c where Id = :parentId]; WHERE Id = :parentId ]; if(parentObjs.size()>0){ parentObj = parentObjs.get(0); String rsdid=System.label.Rental_Apply_id; List<Rental_Apply_Equipment_Set_Detail__c> raesdObjs = [ SELECT Id, Rental_Apply_Equipment_Set__c, SELECT Id, Rental_Apply_Equipment_Set__c, Cancel_Reason__c, // 20210817 ljh SFDC-C448KZ add Loaner_cancel_reason__c,// 20210817 ljh SFDC-C448KZ add Loaner_cancel_Remarks__c// 20210817 ljh SFDC-C448KZ add FROM Rental_Apply_Equipment_Set_Detail__c WHERE Rental_Apply__c =:rsdid limit 1]; WHERE Rental_Apply__c = :rsdid LIMIT 1 ]; if (!raesdObjs.isEmpty()) { sonObj = raesdObjs[0]; } // 主体 or 第一条 List<Rental_Apply_Equipment_Set_Detail__c> bodyObjs = [ SELECT Id, Internal_asset_location_before__c, Salesdepartment_before__c, Product_category_text__c, Equipment_Type_text__c, Select_Time__c SELECT Id, Internal_asset_location_before__c, Salesdepartment_before__c, Product_category_text__c, Equipment_Type_text__c, Select_Time__c FROM Rental_Apply_Equipment_Set_Detail__c WHERE Rental_Apply_Equipment_Set__c = :parentId and Id =: parentObj.First_RAESD__c and Cancel_Select__c = false]; WHERE Rental_Apply_Equipment_Set__c = :parentId AND Id = :parentObj.First_RAESD__c AND Cancel_Select__c = FALSE ]; if (!bodyObjs.isEmpty()) { if (bodyObjs[0].Select_Time__c != null) { bieCunFangDi = bodyObjs[0].Internal_asset_location_before__c; @@ -642,7 +668,6 @@ throw new ControllerUtil.myException('不能明确存放地, 请确认数据。'); } } } // 20210817 ljh SFDC-C448KZ update end } @@ -667,26 +692,20 @@ bieBenBu = ''; } // #OLY_OCM-654 保有设备合并后,取出的第一条一览明细的本部可能为空,所以biebenbu为空时,也要添加检索条件 End } //别存放地 SelectOption public List<SelectOption> getbieCunFangDiOps() { return new List<SelectOption>{ new SelectOption(bieCunFangDi, bieCunFangDi) }; return new List<SelectOption>{ new SelectOption(bieCunFangDi, bieCunFangDi) }; } // #OLY_OCM-654 别本部 页面没有检索所以不改 SelectOption public List<SelectOption> getbieBenBuOps() { return new List<SelectOption>{ new SelectOption(bieBenBu, bieBenBu) }; return new List<SelectOption>{ new SelectOption(bieBenBu, bieBenBu) }; // return FixtureUtil.bieBenBuOpsMap.get('本部'); } private void searchOppSetParam() { } public PageReference searchOpp() { @@ -730,7 +749,9 @@ Rental_Apply_Equipment_Set_Detail__c robj = (Rental_Apply_Equipment_Set_Detail__c) wprInfo.sobj; // 状态只有是可以分配时才会保存 if (FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal()) == robj.Fu_Shu_Pin_Fen_Pei_Jia__c if ( FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal()) == robj.Fu_Shu_Pin_Fen_Pei_Jia__c ) { if (!String.isBlank(robj.Asset__c)) { assetIdList.add(robj.Asset__c); @@ -742,15 +763,20 @@ if (assetIdList.size() > 0) { //20170906 upsert by UniqueKey__c List<Rental_Apply_Equipment_Set_Detail__c> mfUpsert = new List<Rental_Apply_Equipment_Set_Detail__c>(); Map<Id, Asset> aSetMap = new Map<Id, Asset>([ Select Id, Quantity, Map<Id, Asset> aSetMap = new Map<Id, Asset>( [ SELECT Id, Quantity, Out_of_wh__c, Manage_type__c, Ji_Zhong_Guan_Li_Ku_Cun__c, // 20220118 ljh SFDC-C9V84U start Last_Reserve_RAES_Detail__c From Asset where Id = :assetIdList for Update]); FROM Asset WHERE Id = :assetIdList FOR UPDATE ] ); Map<Id, Asset> assetUpdateMap = new Map<Id, Asset>(); // 状态只有是可以分配时才会保存 @@ -761,15 +787,24 @@ } Rental_Apply_Equipment_Set_Detail__c robj = (Rental_Apply_Equipment_Set_Detail__c) wprInfo.sobj; //1822 yc 20211021 已购待货目的,新品已有发货日不能出库 start if(robj.Rental_Apply__r.demo_purpose2__c=='已购待货' && robj.Rental_Apply__r.Follow_UP_Opp__r.Shipping_Finished_Day_Func__c!= null){ if ( robj.Rental_Apply__r.demo_purpose2__c == '已购待货' && robj.Rental_Apply__r.Follow_UP_Opp__r.Shipping_Finished_Day_Func__c != null ) { throw new ControllerUtil.myException('已购待货目的,新品已有发货日,不能继续了'); } if(robj.Rental_Apply__r.demo_purpose2__c=='索赔QIS' && robj.Rental_Apply__r.next_action__c=='无偿更换' && robj.Rental_Apply__r.QIS_number__r.ReplaceDeliveryDate__c!= null){ if ( robj.Rental_Apply__r.demo_purpose2__c == '索赔QIS' && robj.Rental_Apply__r.next_action__c == '无偿更换' && robj.Rental_Apply__r.QIS_number__r.ReplaceDeliveryDate__c != null ) { throw new ControllerUtil.myException('索赔QIS目的,QIS已有新品发货日,不能继续了'); } //1822 yc 20211021 已购待货目的,新品已有发货日不能出库 end // 可以分配の場合 (Asset__c 从 null 到 有值) if (FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal()) == robj.Fu_Shu_Pin_Fen_Pei_Jia__c if ( FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal()) == robj.Fu_Shu_Pin_Fen_Pei_Jia__c ) { Asset aSet = aSetMap.get(robj.Asset__c); // 不能lock到数据的时候 @@ -799,8 +834,14 @@ //assetUpdateMap.put(aSet.Id, aSet); } String uniqueKeyStr = parentObj.RequestNoJoinStr2__c + ':'+ robj.Rental_Apply_Equipment_Set__c + ':' + robj.FSD_Id__c + ':' + robj.IndexFromUniqueKey__c; String uniqueKeyStr = parentObj.RequestNoJoinStr2__c + ':' + robj.Rental_Apply_Equipment_Set__c + ':' + robj.FSD_Id__c + ':' + robj.IndexFromUniqueKey__c; robj.UniqueKey__c = uniqueKeyStr; @@ -848,7 +889,6 @@ *@return PageReference 刷新附属品选择页面 */ public PageReference unassign(){ Savepoint sp = Database.setSavepoint(); try { @@ -865,28 +905,26 @@ } // 加lock Map<Id,Rental_Apply_Equipment_Set_Detail__c> raesdMap = new Map<Id,Rental_Apply_Equipment_Set_Detail__c>([ SELECT Id , Asset__c , Select_Time__c , StockDown_time__c , Cancel_Date__c , Fixture_OneToOne_Link_Id__c Map<Id, Rental_Apply_Equipment_Set_Detail__c> raesdMap = new Map<Id, Rental_Apply_Equipment_Set_Detail__c>( [ SELECT Id, Asset__c, Select_Time__c, StockDown_time__c, Cancel_Date__c, Fixture_OneToOne_Link_Id__c FROM Rental_Apply_Equipment_Set_Detail__c WHERE Id in :raesdIdList FOR UPDATE]); WHERE Id IN :raesdIdList FOR UPDATE ] ); if (raesdMap.size() > 0) { Map<String, Rental_Apply_Equipment_Set_Detail__c> mfUpsert = new Map<String, Rental_Apply_Equipment_Set_Detail__c>(); // 读取已分配的所有附属品 Map<Id, Asset> aSetMap = new Map<Id, Asset>([ Select Id, Quantity, Out_of_wh__c, Manage_type__c, Last_Reserve_RAES_Detail__c From Asset where Id = :assetIdList for Update]); Map<Id, Asset> aSetMap = new Map<Id, Asset>( [ SELECT Id, Quantity, Out_of_wh__c, Manage_type__c, Last_Reserve_RAES_Detail__c FROM Asset WHERE Id = :assetIdList FOR UPDATE ] ); for (Integer indexNum = 0; indexNum < viewList.size(); indexNum++) { // 对打勾的附属品取消分配 WrapperInfo wprInfo = viewList[indexNum]; @@ -941,8 +979,14 @@ // 备品管理编码(借出时) robj.EquipmentSet_Managment_Code_text__c = null; String uniqueKeyStr = parentObj.RequestNoJoinStr2__c + ':'+ robj.Rental_Apply_Equipment_Set__c + ':' + robj.FSD_Id__c + ':' + robj.IndexFromUniqueKey__c; String uniqueKeyStr = parentObj.RequestNoJoinStr2__c + ':' + robj.Rental_Apply_Equipment_Set__c + ':' + robj.FSD_Id__c + ':' + robj.IndexFromUniqueKey__c; robj.UniqueKey__c = uniqueKeyStr; mfUpsert.put(robj.UniqueKey__c, robj); @@ -951,13 +995,10 @@ if (!mfUpsert.isEmpty()) { FixtureUtil.withoutUpsertRaesd(mfUpsert.values()); } } else{ } else { throw new ControllerUtil.myException('没有下架前已分配的附属品'); } } catch (Exception ex) { } catch (Exception ex) { ApexPages.addMessages(ex); Database.rollback(sp); return null; @@ -968,8 +1009,6 @@ pg.getParameters().put('pt_recid',parentId); pg.setRedirect(true); return pg; } // https://sohobb.backlog.jp/view/OLY_OCM-152#comment-20041467 @@ -996,7 +1035,6 @@ if (robj.CreatedBy.ProfileId == System.Label.ProfileId_EquipmentCenter && robj.Select_Time__c == null) { // 删除明细Id<List> delIds.add(robj.Id); } else { if (String.isBlank(robj.Cancel_Reason__c)) { ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '请输入取消理由')); @@ -1026,7 +1064,9 @@ robj.Cancel_Mem__c = UserInfo.getUserId(); // 取消理由备注 //robj.Loaner_cancel_Remarks__c robj.Loaner_cancel_Remarks__c = robj.Loaner_cancel_Remarks__c==null ? robj.Loaner_cancel_reason__c : robj.Loaner_cancel_Remarks__c;//20210818 SFDC-C448KZ ljh end robj.Loaner_cancel_Remarks__c = robj.Loaner_cancel_Remarks__c == null ? robj.Loaner_cancel_reason__c : robj.Loaner_cancel_Remarks__c; //20210818 SFDC-C448KZ ljh end //※已经分配的場合 トリがでやります //if(!String.isBlank(robj.Asset__c) && robj.Select_Time__c != null) { //借出备品Set一览明细 trigger 里 clear Asset__c @@ -1039,7 +1079,6 @@ raesds.add(robj); } } } } @@ -1096,7 +1135,11 @@ Map<String, List<Asset>> autoSelectMap = new Map<String, List<Asset>>(); // 自动分配对象 Map<String, List<Rental_Apply_Equipment_Set_Detail__c>> autoRsdMap = new Map<String, List<Rental_Apply_Equipment_Set_Detail__c>>(); Map<Rental_Apply_Equipment_Set_Detail__c, Map<String, FixtureUtil.groupBean>> rsdMap = FixtureUtil.raesdGroupBy(selectedData, myComponentController.columus, bieWhere); Map<Rental_Apply_Equipment_Set_Detail__c, Map<String, FixtureUtil.groupBean>> rsdMap = FixtureUtil.raesdGroupBy( selectedData, myComponentController.columus, bieWhere ); // 選択済みの明细 if (selectedData.size() > 0) { for (Integer i = 0; i < selectedData.size(); i++) { @@ -1114,9 +1157,11 @@ Integer index = rsdGroupInfo.get(apikey).gnum; if (!String.isBlank(rsdObj.Asset__c) && rsdObj.Select_Time__c != null) { rsdObj.put(apikey, FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.assetFixtureStatus.Yi_Fen_Pei.ordinal())); } else { rsdObj.put( apikey, FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.assetFixtureStatus.Yi_Fen_Pei.ordinal()) ); } else { rsdObj.put(apikey, FixtureUtil.assetFixtureStatusMap.get(index)); } } @@ -1167,7 +1212,10 @@ } else { showButtonList.add(false); // 可以分配の場合 if (FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.assetFixtureStatus.Ke_Yi_Fen_Pei.ordinal()) == rsdObj.Fu_Shu_Pin_Fen_Pei_Jia__c) { if ( FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.assetFixtureStatus.Ke_Yi_Fen_Pei.ordinal()) == rsdObj.Fu_Shu_Pin_Fen_Pei_Jia__c ) { if (!autoRsdMap.containsKey(rsdObj.FSD_Fixture_Model_No__c)) { autoRsdMap.put(rsdObj.FSD_Fixture_Model_No__c, new List<Rental_Apply_Equipment_Set_Detail__c>()); autoSelectMap.put(rsdObj.FSD_Fixture_Model_No__c, new List<Asset>()); @@ -1194,22 +1242,26 @@ // 検索条件 String dateToday = String.valueOf(Date.today()); String soql = 'SELECT Id, Fixture_Model_No_F__c, Pre_Arrival_wh_time__c, Ji_Zhong_Guan_Li_Ku_Cun__c,' + ' SerialNumber, Salesdepartment__c, Internal_asset_location__c,' + ' You_Xiao_Ku_Cun__c, Out_of_wh__c, Repairing_Count__c' + ' FROM Asset' + ' WHERE Asset_Owner__c = \'Olympus\' AND ' + FixtureUtil.getAssetSoqlBase() + ' and Asset_loaner_category__c != \'耗材\'' + ' and RecordTypeId = \'01210000000kOPR\'' + ' and Loaner_accsessary__c = true' + ' and Equipment_Type__c != \'检测用备品\'' + ' and Delete_Flag__c = False' + ' and Freeze_sign_Abandoned_Flag__c = False' + ' and (Consumable_Guaranteen_end__c = null or Consumable_Guaranteen_end__c >=' + dateToday + ')' + ' and Fixture_OneToOne_Link__c = null' // 附属品一对一的个体管理不能检索出来 + ' and Internal_asset_location__c != null' + ' and Product2.Fixture_Model_No_T__c IN :moset' + bieWhere + String soql = 'SELECT Id, Fixture_Model_No_F__c, Pre_Arrival_wh_time__c, Ji_Zhong_Guan_Li_Ku_Cun__c,' + ' SerialNumber, Salesdepartment__c, Internal_asset_location__c,' + ' You_Xiao_Ku_Cun__c, Out_of_wh__c, Repairing_Count__c' + ' FROM Asset' + ' WHERE Asset_Owner__c = \'Olympus\' AND ' + FixtureUtil.getAssetSoqlBase() + ' and Asset_loaner_category__c != \'耗材\'' + ' and RecordTypeId = \'01210000000kOPR\'' + ' and Loaner_accsessary__c = true' + ' and Equipment_Type__c != \'检测用备品\'' + ' and Delete_Flag__c = False' + ' and Freeze_sign_Abandoned_Flag__c = False' + ' and (Consumable_Guaranteen_end__c = null or Consumable_Guaranteen_end__c >=' + dateToday + ')' + ' and Fixture_OneToOne_Link__c = null' + // 附属品一对一的个体管理不能检索出来 ' and Internal_asset_location__c != null' + ' and Product2.Fixture_Model_No_T__c IN :moset' + bieWhere + + ' and Ji_Zhong_Guan_Li_Ku_Cun__c > 0' ; // 有集中管理库存的 soql += ' ORDER BY Product2.Fixture_Model_No_T__c, Consumable_Guaranteen_end__c ASC NULLS LAST, Ji_Zhong_Guan_Li_Ku_Cun__c DESC, Pre_Arrival_wh_time__c ASC NULLS FIRST, Id DESC'; @@ -1251,8 +1303,10 @@ } } if (String.isBlank(rsdObj.Asset__c)) { rsdObj.put('Fu_Shu_Pin_Fen_Pei_Jia__c', FixtureUtil.assetFixtureStatusMap.get( FixtureUtil.AssetFixtureStatus.Mei_You_Ku_Cun.ordinal())); rsdObj.put( 'Fu_Shu_Pin_Fen_Pei_Jia__c', FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Mei_You_Ku_Cun.ordinal()) ); } } } force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.html
@@ -1,26 +1,73 @@ <template> <div class="exampleHolder" if:true={IsLoading} > <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner> <lightning-spinner alternative-text="Loading" size="large" ></lightning-spinner> </div> <div style="padding:30px"> <div style="float:right" > <div class="demo-only demo-only_viewport" style="height:4.5rem;" if:true = {Tongzhishow}> <div class="demo-only demo-only_viewport" style="height: 4.5rem" if:true={Tongzhishow} > <div class="slds-notification-container" style={IsLeftStyle}> <div aria-live="assertive" aria-atomic="true" class="slds-assistive-text">提示</div> <section class="slds-notification" role="dialog" aria-labelledby="noti77" aria-describedby="dialog-body-id-43" > <div class="slds-notification__body" id="dialog-body-id-43" > <a class="slds-notification__target slds-media" href="#" style={BgColorStyle}> <span class="slds-icon_container slds-icon-standard-task slds-media__figure" title="task"> <lightning-icon icon-name={TongzhiIcon} alternative-text="Account" title="Account"></lightning-icon> <div aria-live="assertive" aria-atomic="true" class="slds-assistive-text" > 提示 </div> <section class="slds-notification" role="dialog" aria-labelledby="noti77" aria-describedby="dialog-body-id-43" > <div class="slds-notification__body" id="dialog-body-id-43" > <a class="slds-notification__target slds-media" href="#" style={BgColorStyle} > <span class="slds-icon_container slds-icon-standard-task slds-media__figure" title="task" > <lightning-icon icon-name={TongzhiIcon} alternative-text="Account" title="Account" ></lightning-icon> </span> <div class="slds-media__body"> <h2 class="slds-text-heading_small slds-m-bottom_xx-small" id="noti77"> <span class="slds-assistive-text">task notification:</span>提示</h2> <h2 class="slds-text-heading_small slds-m-bottom_xx-small" id="noti77" > <span class="slds-assistive-text" >task notification:</span >提示 </h2> <p>{SaveShowText}</p> </div> </a> <button class="slds-button slds-button_icon slds-button_icon-container slds-notification__close" title="close"> <lightning-icon icon-name="utility:close" alternative-text="close" title="close" size="x-small" onclick={CloseAlert}></lightning-icon> <button class="slds-button slds-button_icon slds-button_icon-container slds-notification__close" title="close" > <lightning-icon icon-name="utility:close" alternative-text="close" title="close" size="x-small" onclick={CloseAlert} ></lightning-icon> </button> </div> </section> @@ -28,7 +75,12 @@ </div> </div> <p><lightning-formatted-text value="当前预测OCSM签约日 : " ></lightning-formatted-text>{opp.Close_Forecasted_Check}</p> <p> <lightning-formatted-text value="当前预测OCSM签约日 : " ></lightning-formatted-text >{opp.Close_Forecasted_Check} </p> <div class={xgxLy} style="width: 495px;padding:1px"> <lightning-combobox @@ -36,7 +88,8 @@ label="日期提前/日期延后" value={opp.Date_InAdvance_Delay} options={RelateOption} onchange={handleRelationFn} > onchange={handleRelationFn} > </lightning-combobox> </div> @@ -52,7 +105,9 @@ onchange={handleRelationFn1} > </lightning-combobox> <div style="font-size:10px;color:red" if:true={bxgLyFlag}>请选择提前理由</div> <div style="font-size: 10px; color: red" if:true={bxgLyFlag}> 请选择提前理由 </div> </div> <!-- 延后 --> @@ -68,7 +123,9 @@ onchange={handleRelationFn1} > </lightning-combobox> <div style="font-size:10px;color:red" if:true={bxgLyFlag}>请选择延后理由</div> <div style="font-size: 10px; color: red" if:true={bxgLyFlag}> 请选择延后理由 </div> </div> <!-- 改变日期 --> @@ -103,6 +160,5 @@ > 保存 </button> </div> </template> force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js
@@ -1,41 +1,37 @@ import { LightningElement, track } from 'lwc'; import GetOppinformationcData from '@salesforce/apex/ImprovedForecastTimeController.GetOppinformationcData'; import getReason from '@salesforce/apex/ImprovedForecastTimeController.getReason'; import SaveData from '@salesforce/apex/ImprovedForecastTimeController.SaveData'; import SystemModstamp from '@salesforce/schema/Account.SystemModstamp'; import { LightningElement, track } from "lwc"; import GetOppinformationcData from "@salesforce/apex/ImprovedForecastTimeController.GetOppinformationcData"; import getReason from "@salesforce/apex/ImprovedForecastTimeController.getReason"; import SaveData from "@salesforce/apex/ImprovedForecastTimeController.SaveData"; import SystemModstamp from "@salesforce/schema/Account.SystemModstamp"; export default class ImprovedForecastTime extends LightningElement { //显示与隐藏 isAdvance = false; //选着 提前 的标识 isDelay = false; //选着 延后 的标识 RelateOption=[ {label:"提前",value:"提前"}, {label:"延后",value:"延后"}, ] { label: "延后", value: "延后" } ]; handleRelationFn(event){ var value = event.target.value; this.opp.Date_InAdvance_Delay = value; debugger debugger; // this.opp.Predicted_date_ChangeReason__c = ''; //SWAG-CJR4PC【委托】调查-修改预测日提前理由错误 fy start this.opp.Predicted_date_ChangeReason = '' this.opp.Close_Forecasted_Date= ''; this.opp.CloseDate= ''; this.opp.Predicted_date_ChangeReason = ""; this.opp.Close_Forecasted_Date = ""; this.opp.CloseDate = ""; //SWAG-CJR4PC【委托】调查-修改预测日提前理由错误 fy end if (value == "提前") { this.isAdvance = true; this.isDelay = false; } if (value == "延后") { this.isAdvance = false; this.isDelay = true; } } handleRelationFn1(event){ @@ -47,12 +43,12 @@ var value = event.target.value; this.opp.Close_Forecasted_Date = value; this.flg=false; debugger debugger; this.CloseDateAssignment(value); } //给预测发货日赋值 CloseDateAssignment(value){ debugger debugger; var value=this.addDay(30,value); this.opp.CloseDate = value; this.flg=true; @@ -60,18 +56,18 @@ //加天数 addDay(dayNumber, value1) { var date = new Date(value1); var ms = dayNumber * (1000 * 60 * 60 * 24) var ms = dayNumber * (1000 * 60 * 60 * 24); var newDate = new Date(date.getTime() + ms); var value=newDate.toLocaleDateString(); var value2=value.split('/'); var value2 = value.split("/"); if(value2[1].length == 1){ value2[1]='0'+value2[1]; value2[1] = "0" + value2[1]; } if(value2[2].length == 1){ value2[2]='0'+value2[2]; value2[2] = "0" + value2[2]; } value=value2[0]+'-'+value2[1]+'-'+value2[2]; value = value2[0] + "-" + value2[1] + "-" + value2[2]; return value; } handleRelationFn3(event){ @@ -79,55 +75,55 @@ this.opp.CloseDate = value; } //从url上取得ID getQueryVariable(variable) { getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i<vars.length;i++) { var pair = vars[i].split("="); if(pair[0] == variable){return pair[1];} if (pair[0] == variable) { return pair[1]; } return(false); } return false; } oppId = ''; oppId = ""; opp = {}; Date_InAdvance_Delay = ''; Date_InAdvance_Delay = ""; AdvanceReasons = []; DelayReasons = []; //初始化 connectedCallback(){ this.oppId = this.getQueryVariable('id'); this.oppId = this.getQueryVariable("id"); GetOppinformationcData({ParamIdStr:this.oppId}).then(response=>{ GetOppinformationcData({ ParamIdStr: this.oppId }).then((response) => { this.opp=JSON.parse(response); if(this.opp.Date_InAdvance_Delay == '提前'){ if (this.opp.Date_InAdvance_Delay == "提前") { this.isAdvance = true; this.isDelay = false; } if(this.opp.Date_InAdvance_Delay == '延后'){ if (this.opp.Date_InAdvance_Delay == "延后") { this.isAdvance = false; this.isDelay = true; } }); getReason().then(response=>{ getReason().then((response) => { var options = JSON.parse(response); this.AdvanceReasons = options['提前']; this.DelayReasons = options['延后']; this.AdvanceReasons = options["提前"]; this.DelayReasons = options["延后"]; }); } //提示 SaveShowText="保存成功";//提示框的文本 Tongzhishow=false; //提示显示的标识 TongzhiIcon = 'standard:account' //提示框的图标 IsLeftStyle = "" //提示框的样式 BgColorStyle = "" TongzhiIcon = "standard:account"; //提示框的图标 IsLeftStyle = ""; //提示框的样式 BgColorStyle = ""; //弹框提示 content 内容 error 是否是错误提示框 left 是否居左 Alert(content,error = false,left = false){ @@ -142,9 +138,9 @@ this.BgColorStyle = "background-color:#69e669"; } if (left) { this.IsLeftStyle = "left: 0.25rem" this.IsLeftStyle = "left: 0.25rem"; }else{ this.IsLeftStyle = "" this.IsLeftStyle = ""; } } @@ -167,7 +163,7 @@ } //保存数据逻辑 saveFn(){ debugger debugger; var myDate = new Date(); //今天日期 var myDate1 = new Date(this.opp.Close_Forecasted_Check); //当前预测日期 var myDate2 = new Date(this.opp.Close_Forecasted_Date); //改变的预测日期 @@ -201,42 +197,48 @@ //20221226 lt DB202212359066增加限制-修改预测日最大日期 end console.warn('myDatevalue:='+myDate); console.warn('今天日期'+myDate3); console.warn('当前预测日期'+myDate4); console.warn('1111111111'+myDate2); console.warn('改变的预测日期'+myDate5); console.warn("myDatevalue:=" + myDate); console.warn("今天日期" + myDate3); console.warn("当前预测日期" + myDate4); console.warn("1111111111" + myDate2); console.warn("改变的预测日期" + myDate5); //SWAG-CJR4PC【委托】调查-修改预测日提前理由错误 fy start // if(this.opp.Date_InAdvance_Delay == undefined || this.opp.Predicted_date_ChangeReason == undefined || myDate5 == undefined){ // if(this.opp.Date_InAdvance_Delay == '' ||this.opp.Date_InAdvance_Delay == undefined || this.opp.Predicted_date_ChangeReason == '' ||this.opp.Predicted_date_ChangeReason == undefined|| myDate5 == '' || myDate5 == undefined){ if(!this.opp.Date_InAdvance_Delay || !this.opp.Predicted_date_ChangeReason || !this.opp.Close_Forecasted_Date){ if ( !this.opp.Date_InAdvance_Delay || !this.opp.Predicted_date_ChangeReason || !this.opp.Close_Forecasted_Date ) { //SWAG-CJR4PC【委托】调查-修改预测日提前理由错误 fy end this.Alert("请选择日期/理由。",false,true); } else if(this.opp.Date_InAdvance_Delay == '提前' && (myDate5 >= myDate4 || myDate5 < myDate3)){ this.Alert("请选择 “提前” 于当前预测OCSM签约日的日期 且 不早于今天。",false,true); } else if(this.opp.Date_InAdvance_Delay == '延后' && myDate5 <= myDate4){ } else if ( this.opp.Date_InAdvance_Delay == "提前" && (myDate5 >= myDate4 || myDate5 < myDate3) ) { this.Alert( "请选择 “提前” 于当前预测OCSM签约日的日期 且 不早于今天。", false, true ); } else if (this.opp.Date_InAdvance_Delay == "延后" && myDate5 <= myDate4) { this.Alert("请选择 “延后” 于当前预测OCSM签约日的日期。",false,true); } else if(myDate7 < myDate5){ } else if (myDate7 < myDate5) { this.Alert("预测发货日不能小于预测签约日。",false,true); } //20221226 lt DB202212359066增加限制-修改预测日最大日期 start else if(myDate5 > OrderDate){ this.Alert("订货预测日请在未来三财年内。",false,true); } else if(myDate7 > ShipmentsDate){ } else if (myDate7 > ShipmentsDate) { this.Alert("发货预测日请在未来四财年内。",false,true); } //20221226 lt DB202212359066增加限制-修改预测日最大日期 end else{ this.OnLoading(true); SaveData({JsonData:JSON.stringify(this.opp)}).then((response)=>{ if (response == '成功') { if (response == "成功") { this.OnLoading(false); this.Alert("保存成功",false,true); window.location.hash = "Refresh"+"=="+this.oppId; @@ -246,5 +248,4 @@ }); } } } force-app/main/default/pages/AccChangeApprovalResponse.page
@@ -1,20 +1,35 @@ <apex:page standardController="Account_Delay_Apply__c" extensions="AccChangeApprovalResponseController" showHeader="false" sidebar="false" id="allPage" action="{!init}"> <apex:page standardController="Account_Delay_Apply__c" extensions="AccChangeApprovalResponseController" showHeader="false" sidebar="false" id="allPage" action="{!init}" > <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> <script> function tocenterjs() { //blockme(); window.open('/apex/AccChangeApprovalResponsePopUp?accid=' + '{!URLENCODE(Account_Delay_Apply__c.Id)}' + '&type=response2system', 'HospitalApprovalDate', 'height=400,width=600,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no'); window.open( "/apex/AccChangeApprovalResponsePopUp?accid=" + "{!URLENCODE(Account_Delay_Apply__c.Id)}" + "&type=response2system", "HospitalApprovalDate", "height=400,width=600,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no" ); } function touserjs() { //blockme(); window.open('/apex/AccChangeApprovalResponsePopUp?accid=' + '{!URLENCODE(Account_Delay_Apply__c.Id)}' + '&type=response2user', 'HospitalApprovalDate', 'height=400,width=600,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no'); window.open( "/apex/AccChangeApprovalResponsePopUp?accid=" + "{!URLENCODE(Account_Delay_Apply__c.Id)}" + "&type=response2user", "HospitalApprovalDate", "height=400,width=600,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no" ); } function reloadjs() { //blockme(); @@ -22,18 +37,40 @@ } </script> <apex:form id="allForm"> <apex:actionFunction name="init" action="{!init}" rerender="allPanel,message"> <apex:actionFunction name="init" action="{!init}" rerender="allPanel,message" > </apex:actionFunction> <apex:outputPanel id="allPanel"> <apex:pageBlock title="{!$ObjectType.Account_Delay_Apply__c.fields.Response__c.label}" id="allBlock"> <apex:pageBlock title="{!$ObjectType.Account_Delay_Apply__c.fields.Response__c.label}" id="allBlock" > <apex:pageBlockButtons location="top"> <apex:commandButton onclick="tocenterjs(); return false;" value="To:当前审批人" rerender="dummy" /> <apex:commandButton onclick="touserjs(); return false;" value="To:申请者" rerender="dummy" /> <apex:commandButton onclick="tocenterjs(); return false;" value="To:当前审批人" rerender="dummy" /> <apex:commandButton onclick="touserjs(); return false;" value="To:申请者" rerender="dummy" /> </apex:pageBlockButtons> <apex:inputField id="response" value="{!ra.Response__c}" style="width:100%; height:120px; resize:none;"/> <apex:inputField id="response" value="{!ra.Response__c}" style="width: 100%; height: 120px; resize: none" /> <script> j$(escapeVfId('allPage:allForm:allBlock:response')).attr('readonly', true); j$(escapeVfId("allPage:allForm:allBlock:response")).attr( "readonly", true ); </script> </apex:pageBlock> </apex:outputPanel> package-lock.json
New file Diff too large package.json
@@ -12,7 +12,7 @@ "test:unit:watch": "sfdx-lwc-jest --watch", "test:unit:debug": "sfdx-lwc-jest --debug", "test:unit:coverage": "sfdx-lwc-jest --coverage", "prettier": "prettier --write \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"", "prettier": "prettier", "prettier:verify": "prettier --list-different \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"" }, "devDependencies": {