From 13a007c5803ab3b52e7827c717640b1721cc96e5 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@prec-tech.com>
Date: 星期四, 13 七月 2023 18:31:07 +0800
Subject: [PATCH] 耗材申请 取消 选择明细 发货 耗材申请中间小画面 一览 选择操作画面借出耗材备品一览
---
force-app/main/default/classes/lexNewSparePartsLoanApplicationCtl.cls | 75 +++++++-----
force-app/main/default/pages/ConsumApplyCancel.page | 8 +
force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js | 7
force-app/main/default/lwc/lexNewSparePartsLoanApplication/lexNewSparePartsLoanApplication.js | 119 +++++++++++--------
force-app/main/default/pages/ConsumFixtureSetSelect.page | 5
force-app/main/default/classes/LexLostSubmitApprovalController.cls | 15 +-
force-app/main/default/pages/ConsumEquipmentSetShipment.page | 16 ++
force-app/main/default/lwc/lexEquipmentRentalApply_FromSA/lexEquipmentRentalApply_FromSA.js | 60 +++++++--
8 files changed, 193 insertions(+), 112 deletions(-)
diff --git a/force-app/main/default/classes/LexLostSubmitApprovalController.cls b/force-app/main/default/classes/LexLostSubmitApprovalController.cls
index 2902ba8..af3f9c6 100644
--- a/force-app/main/default/classes/LexLostSubmitApprovalController.cls
+++ b/force-app/main/default/classes/LexLostSubmitApprovalController.cls
@@ -6,12 +6,15 @@
InitData res = new initData();
try{
List<LostReport_Detail__c> reportDetail = new List<LostReport_Detail__c>();
- LostReport__c report = [SELECT Id,Status__c FROM LostReport__c WHERE Id = :recordId LIMIT 1];
- res.Id = report.Id;
- res.statusTf = report.Status__c;
- reportDetail = [SELECT Rental_Apply_Equipment_Set_Detail__r.Lost_item_check_day__c FROM LostReport_Detail__c WHERE id = :recordId AND Rental_Apply_Equipment_Set_Detail__r.Lost_item_check_day__c != null];
- res.reportDetailList = reportDetail;
- System.debug(LoggingLevel.INFO, '*** zq: ' + res);
+ List<LostReport__c> reportList = [SELECT Id,Status__c FROM LostReport__c WHERE Id = :recordId LIMIT 1];
+ if(reportList.size() > 0){
+ LostReport__c report = reportList[0];
+ res.Id = report.Id;
+ res.statusTf = report.Status__c;
+ reportDetail = [SELECT Rental_Apply_Equipment_Set_Detail__r.Lost_item_check_day__c FROM LostReport_Detail__c WHERE LostReport__c = :recordId AND Rental_Apply_Equipment_Set_Detail__r.Lost_item_check_day__c != null];
+ res.reportDetailList = reportDetail;
+ System.debug(LoggingLevel.INFO, '*** zq: ' + res);
+ }
}catch(Exception e){
System.debug(LoggingLevel.INFO, '*** zq: ' + e);
}
diff --git a/force-app/main/default/classes/lexNewSparePartsLoanApplicationCtl.cls b/force-app/main/default/classes/lexNewSparePartsLoanApplicationCtl.cls
index 0783ac8..a9413a3 100644
--- a/force-app/main/default/classes/lexNewSparePartsLoanApplicationCtl.cls
+++ b/force-app/main/default/classes/lexNewSparePartsLoanApplicationCtl.cls
@@ -28,36 +28,43 @@
public static InitData init(String recordId){
InitData res = new initData();
try {
- OPDPlan__c rep = [select Id,Related_Opportunity1_ID__r.Id,Campaign__r.Id,Status__c,Rental_Apply_Flag__c,OPDType__c,CampaignStatus__c,CampaignRecodeTypeId__c,Internal_in_charge_province__c,StayOrNot__c,OriginalOpdPlanApplication__c,IF_Approved__c,Approved_No__c,Approved_Status__c,Rental_Apply2__c,OriginalOpdPlan__c,CampaignName__c,Related_Opportunity1_Name__c,NoOpp_Reason__c,Account_Laboratory__c,OCM_category_Name__c,HospitalName__c,Name,IsJump__c,JumpCause__c,originalOpdRentalApply__c,RentalApplyName__c from OPDPlan__c where Id =: recordId];
- res.opdPlanId = rep.Id;
- res.opdCampaignId = rep.Campaign__r.Id == null ? '' : rep.Campaign__r.Id;
- res.opdOpportunityId = rep.Related_Opportunity1_ID__r.Id == null ? '' : rep.Related_Opportunity1_ID__r.Id;
- res.opdStatus = rep.Status__c == null ? '' : rep.Status__c;
- res.opdRentalApplyFlag = rep.Rental_Apply_Flag__c;
- res.opdType = rep.OPDType__c == null ? '' : rep.OPDType__c;
- res.opdCampaignStatus = rep.CampaignStatus__c == null ? '' : rep.CampaignStatus__c;
- res.opdCampaignRecodeTypeId = rep.CampaignRecodeTypeId__c == null ? '' : rep.CampaignRecodeTypeId__c;
- res.opdInternalinchargeprovince = rep.Internal_in_charge_province__c == null ? '' : rep.Internal_in_charge_province__c;
- res.opdStayOrNot = rep.StayOrNot__c == null ? '' : rep.StayOrNot__c;
- res.opdOriginalOpdPlanApplication = rep.OriginalOpdPlanApplication__c== null ? '' : rep.OriginalOpdPlanApplication__c;
- res.opdIFApproved = rep.IF_Approved__c;
- res.opdApprovedNo = rep.Approved_No__c == null ? '' : rep.Approved_No__c;
- res.opdApprovedStatus = rep.Approved_Status__c == null ? '' : rep.Approved_Status__c;
- res.opdRentalApply2 = rep.Rental_Apply2__c == null ? '' : rep.Rental_Apply2__c;
- res.opdOriginalOpdPlan = rep.OriginalOpdPlan__c == null ? '' : rep.OriginalOpdPlan__c;
- res.opdCampaignName = rep.CampaignName__c == null ? '' : rep.CampaignName__c;
- res.opdRelatedOpportunity1Name = rep.Related_Opportunity1_Name__c == null ? '' : rep.Related_Opportunity1_Name__c;
- res.opdNoOppReason = rep.NoOpp_Reason__c == null ? '' : rep.NoOpp_Reason__c;
- res.opdAccountLaboratory = rep.Account_Laboratory__c == null ? '' : rep.Account_Laboratory__c;
- res.opdOCMcategoryName = rep.OCM_category_Name__c == null ? '' : rep.OCM_category_Name__c;
- res.opdHospitalName = rep.HospitalName__c == null ? '' : rep.HospitalName__c;
- res.opdName = rep.Name == null ? '' : rep.Name;
- res.opdIsJump = rep.IsJump__c;
- res.opdJumpCause = rep.JumpCause__c == null ? '' : rep.JumpCause__c;
- res.opdoriginalOpdRentalApply = rep.originalOpdRentalApply__c == null ? '' : rep.originalOpdRentalApply__c;
- res.opdRentalApplyName = rep.RentalApplyName__c == null ? '' : rep.RentalApplyName__c;
- res.opdStatusProcessState = System.Label.StatusProcessState;
- return res;
+ List<OPDPlan__c> repList = [select Id,HospitalID__c,Related_Opportunity1_ID__r.Id,Campaign__r.Id,Status__c,Rental_Apply_Flag__c,OPDType__c,CampaignStatus__c,CampaignRecodeTypeId__c,Internal_in_charge_province__c,StayOrNot__c,OriginalOpdPlanApplication__c,IF_Approved__c,Approved_No__c,Approved_Status__c,Rental_Apply2__c,OriginalOpdPlan__c,CampaignName__c,Related_Opportunity1_ID__c,NoOpp_Reason__c,Account_Laboratory__c,OCM_category_Name__c,OCM_category_ID__c,HospitalName__c,Name,IsJump__c,JumpCause__c,originalOpdRentalApply__c,RentalApplyName__c from OPDPlan__c where Id =: recordId];
+ if(repList.size() > 0){
+ OPDPlan__c rep = repList[0];
+ res.opdPlanId = rep.Id;
+ res.opdHospitalId = rep.HospitalID__c == null ? '' : rep.HospitalID__c;
+ res.opdCampaignId = rep.Campaign__r.Id == null ? '' : rep.Campaign__r.Id;
+ res.opdOpportunityId = rep.Related_Opportunity1_ID__r.Id == null ? '' : rep.Related_Opportunity1_ID__r.Id;
+ res.opdStatus = rep.Status__c == null ? '' : rep.Status__c;
+ res.opdRentalApplyFlag = rep.Rental_Apply_Flag__c;
+ res.opdType = rep.OPDType__c == null ? '' : rep.OPDType__c;
+ res.opdCampaignStatus = rep.CampaignStatus__c == null ? '' : rep.CampaignStatus__c;
+ res.opdCampaignRecodeTypeId = rep.CampaignRecodeTypeId__c == null ? '' : rep.CampaignRecodeTypeId__c;
+ res.opdInternalinchargeprovince = rep.Internal_in_charge_province__c == null ? '' : rep.Internal_in_charge_province__c;
+ res.opdStayOrNot = rep.StayOrNot__c == null ? '' : rep.StayOrNot__c;
+ res.opdOriginalOpdPlanApplication = rep.OriginalOpdPlanApplication__c== null ? '' : rep.OriginalOpdPlanApplication__c;
+ res.opdIFApproved = rep.IF_Approved__c;
+ res.opdApprovedNo = rep.Approved_No__c == null ? '' : rep.Approved_No__c;
+ res.opdApprovedStatus = rep.Approved_Status__c == null ? '' : rep.Approved_Status__c;
+ res.opdRentalApply2 = rep.Rental_Apply2__c == null ? '' : rep.Rental_Apply2__c;
+ res.opdOriginalOpdPlan = rep.OriginalOpdPlan__c == null ? '' : rep.OriginalOpdPlan__c;
+ res.opdCampaignName = rep.CampaignName__c == null ? '' : rep.CampaignName__c;
+ res.opdRelatedOpportunity1ID = rep.Related_Opportunity1_ID__c == null ? '' : rep.Related_Opportunity1_ID__c;
+ res.opdNoOppReason = rep.NoOpp_Reason__c == null ? '' : rep.NoOpp_Reason__c;
+ res.opdAccountLaboratory = rep.Account_Laboratory__c == null ? '' : rep.Account_Laboratory__c;
+ res.opdOCMcategoryName = rep.OCM_category_Name__c == null ? '' : rep.OCM_category_Name__c;
+ res.opdOCMcategoryId = rep.OCM_category_ID__c == null ? '' : rep.OCM_category_ID__c;
+ res.opdHospitalName = rep.HospitalName__c == null ? '' : rep.HospitalName__c;
+ res.opdName = rep.Name == null ? '' : rep.Name;
+ res.opdIsJump = rep.IsJump__c;
+ res.opdJumpCause = rep.JumpCause__c == null ? '' : rep.JumpCause__c;
+ res.opdoriginalOpdRentalApply = rep.originalOpdRentalApply__c == null ? '' : rep.originalOpdRentalApply__c;
+ res.opdRentalApplyName = rep.RentalApplyName__c == null ? '' : rep.RentalApplyName__c;
+ res.opdStatusProcessState = System.Label.StatusProcessState;
+ res.opdCampaignTypeId = Schema.SObjectType.Campaign.getRecordTypeInfosByDeveloperName().get('Service_trainig').getRecordTypeId();
+ return res;
+ }
+ return null;
} catch (Exception e) {
throw new AuraHandledException(e.getMessage());
}
@@ -98,7 +105,7 @@
@AuraEnabled
public String opdCampaignName;
@AuraEnabled
- public String opdRelatedOpportunity1Name;
+ public String opdRelatedOpportunity1ID;
@AuraEnabled
public String opdNoOppReason;
@AuraEnabled
@@ -106,7 +113,11 @@
@AuraEnabled
public String opdOCMcategoryName;
@AuraEnabled
+ public String opdOCMcategoryId;
+ @AuraEnabled
public String opdHospitalName;
+ @AuraEnabled
+ public String opdHospitalId;
@AuraEnabled
public String opdName;
@AuraEnabled
@@ -119,6 +130,8 @@
public String opdRentalApplyName;
@AuraEnabled
public String opdStatusProcessState;
+ @AuraEnabled
+ public String opdCampaignTypeId;
}
public class UserResult {
diff --git a/force-app/main/default/lwc/lexEquipmentRentalApply_FromSA/lexEquipmentRentalApply_FromSA.js b/force-app/main/default/lwc/lexEquipmentRentalApply_FromSA/lexEquipmentRentalApply_FromSA.js
index 5512f33..d1ef8ad 100644
--- a/force-app/main/default/lwc/lexEquipmentRentalApply_FromSA/lexEquipmentRentalApply_FromSA.js
+++ b/force-app/main/default/lwc/lexEquipmentRentalApply_FromSA/lexEquipmentRentalApply_FromSA.js
@@ -1,15 +1,16 @@
import { LightningElement,wire,track,api} from 'lwc';
-import { CurrentPageReference, NavigationMixin} from "lightning/navigation";
+import { CurrentPageReference,NavigationMixin} from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init from '@salesforce/apex/lexEquipmentRentalApply_FromSACtl.init';
import UserInfo_Owner from '@salesforce/apex/lexEquipmentRentalApply_FromSACtl.UserInfo_Owner';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
-import RentalApplyCheckForSAoneEle 聽from '@salesforce/apex/RentalApplyWebService.RentalApplyCheckForSAoneEle';
+import RentalApplyCheckForSAoneEle from '@salesforce/apex/RentalApplyWebService.RentalApplyCheckForSAoneEle';
// 鏂板缓澶囧搧鍊熷嚭鐢宠(娉ㄦ畫)
-export default class LexEquipmentRentalApply_FromSA extends LightningElement {
+export default class LexEquipmentRentalApply_FromSA extends NavigationMixin(LightningElement) {
@api recordId;
+ defaultFields;
IsLoading = true;
@wire(CurrentPageReference)
@@ -31,7 +32,25 @@
connectedCallback(){
console.log(this.recordId);
// if(rtn == 'Fin'){
- // var url = '/a0t/e?CF00N10000006pvpb={!URLENCODE(Statu_Achievements__c.Name)}&CF00N10000006pvpb_lkid={!URLENCODE(Statu_Achievements__c.Id)}&retURL=%2F{!URLENCODE(Statu_Achievements__c.Id)}&CF00N10000003Mp1d={!URLENCODE(Statu_Achievements__c.Opp_Hospitalo__c)}&CF00N10000003Mp1d_lkid={!URLENCODE(Statu_Achievements__c.Opp_Hospital_Id__c)}&Name={!URLENCODE('*')}&00N10000003Msk0={!URLENCODE('浜у搧璇曠敤')}&00N10000003Msk5={!URLENCODE('宸茶喘寰呰揣')}&CF00N10000003O3V6={!URLENCODE(Statu_Achievements__c.Opp_DeptClass__c)}&CF00N10000003O3V6_lkid={!URLENCODE(Statu_Achievements__c.Opp_DeptClass_Id__c)}&CF00N10000003Mp2R={!Statu_Achievements__c.Opp_ClassName__c}&CF00N10000003Mp2R_lkid={!URLENCODE(Statu_Achievements__c.Opp_Class_Id__c)}&CF00N10000005HzRr={!URLENCODE($User.LastName&' '&$User.FirstName)}&CF00N10000005HzRr_lkid={!URLENCODE($User.Id)}&CF00N10000005HzRz={!URLENCODE($User.LastName&' '&$User.FirstName)}&CF00N10000005HzRz_lkid={!URLENCODE($User.Id)}&00N10000003OJzc={!URLENCODE($User.LastName&' '&$User.FirstName)}&CF00N10000003O3VB={!URLENCODE(Statu_Achievements__c.Opportunity__c)}&CF00N10000003O3VB_lkid={!URLENCODE(Statu_Achievements__c.OpportunityId__c)}'
+ // var url = '/a0t/e?CF00N10000006pvpb={!URLENCODE(Statu_Achievements__c.Name)}&
+ // CF00N10000006pvpb_lkid={!URLENCODE(Statu_Achievements__c.Id)}&
+ // retURL=%2F{!URLENCODE(Statu_Achievements__c.Id)}&
+ // CF00N10000003Mp1d={!URLENCODE(Statu_Achievements__c.Opp_Hospitalo__c)}&
+ // CF00N10000003Mp1d_lkid={!URLENCODE(Statu_Achievements__c.Opp_Hospital_Id__c)}&
+ // Name={!URLENCODE('*')}&
+ // 00N10000003Msk0={!URLENCODE('浜у搧璇曠敤')}&
+ // 00N10000003Msk5={!URLENCODE('宸茶喘寰呰揣')}&
+ // CF00N10000003O3V6={!URLENCODE(Statu_Achievements__c.Opp_DeptClass__c)}&
+ // CF00N10000003O3V6_lkid={!URLENCODE(Statu_Achievements__c.Opp_DeptClass_Id__c)}&
+ // CF00N10000003Mp2R={!Statu_Achievements__c.Opp_ClassName__c}&
+ // CF00N10000003Mp2R_lkid={!URLENCODE(Statu_Achievements__c.Opp_Class_Id__c)}&
+ // CF00N10000005HzRr={!URLENCODE($User.LastName&' '&$User.FirstName)}&
+ // CF00N10000005HzRr_lkid={!URLENCODE($User.Id)}&
+ // CF00N10000005HzRz={!URLENCODE($User.LastName&' '&$User.FirstName)}&
+ // CF00N10000005HzRz_lkid={!URLENCODE($User.Id)}&
+ // 00N10000003OJzc={!URLENCODE($User.LastName&' '&$User.FirstName)}&
+ // CF00N10000003O3VB={!URLENCODE(Statu_Achievements__c.Opportunity__c)}&
+ // CF00N10000003O3VB_lkid={!URLENCODE(Statu_Achievements__c.OpportunityId__c)}'
// window.top.location.href = url;
// }else{
// alert(rtn );
@@ -45,26 +64,29 @@
this.IsLoading = false;
if (result != null) {
+ console.log("==========result===>>>=====", result);
UserInfo_Owner({}).then(res=>{
- if(res.isFormalStuff == 'true'){
- this.showToast('璇曠敤鏈熷唴锛屼笉鑳界敵璇�','warning');
+ if(res.isFormalStuff){
+ this.showToast('璇曠敤鏈熷唴锛屼笉鑳界敵璇�','warnning');
return;
}else{
- const defaultValues = encodeDefaultFieldValues({
- Statu_Achievements__c: result.achievement,
- retURL:this.recordId,
+ console.log("==========res===>>>=====", res);
+ console.log("==========result1===>>>=====", result);
+ const defaultValues = {
Hospital__c: result.hospital,
Name:'*',
Strategic_dept__c: result.departmentClass,
- Account__c:result.oppClassName,
+ Account__c:result.oppClassId,
Demo_purpose1__c:'浜у搧璇曠敤',
demo_purpose2__c:'宸茶喘寰呰揣',
- Person_In_Charge__c:res.lastName + res.firstName,
- applyUser__c:res.lastName + res.firstName,
+ Person_In_Charge__c:res.id,
+ applyUser__c:res.id,
Loaner_received_staff__c:res.lastName + res.firstName,
Follow_UP_Opp__c:result.opportunity
- });
-
+ };
+ console.log("==========defaultValues44===>>>=====", defaultValues);
+ this.defaultFields = defaultValues;
+ console.log("==========defaultValues===>>>=====", this.defaultFields);
this[NavigationMixin.Navigate]({
type: 'standard__objectPage',
attributes: {
@@ -72,10 +94,14 @@
actionName: 'new'
},
state:{
- defaultFieldValues: this.defaultValues
+ defaultFieldValues: encodeDefaultFieldValues(this.defaultFields)
+
}
- })
+ });
+
}
+ }).catch(error => {
+ console.log("error--->>>",error);
})
this.dispatchEvent(new CloseActionScreenEvent());
// window.location.reload();
@@ -94,7 +120,7 @@
showToast(message, type) {
const evt = new ShowToastEvent({
- title: 'Error',
+ // title: 'Error',
message: message,
variant: type
});
diff --git a/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js b/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js
index d87684e..4598166 100644
--- a/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js
+++ b/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js
@@ -69,7 +69,7 @@
showToast(msg,type) {
const event = new ShowToastEvent({
- title: '',
+ // title: '',
message: msg,
variant: type
});
@@ -87,12 +87,15 @@
recordId: this.recordId
}).then(result=>{
if(result != '1'){
- this.showToast(result,"error");
+ this.showToast(result,"warning");
return
}
this.updateRecordView(this.recordId);
// this.showToast("鎻愪氦鎴愬姛","success");
this.dispatchEvent(new CloseActionScreenEvent());
})
+ .finally(()=>{
+ window.location.reload();
+ })
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewSparePartsLoanApplication/lexNewSparePartsLoanApplication.js b/force-app/main/default/lwc/lexNewSparePartsLoanApplication/lexNewSparePartsLoanApplication.js
index c28718a..17f0cf5 100644
--- a/force-app/main/default/lwc/lexNewSparePartsLoanApplication/lexNewSparePartsLoanApplication.js
+++ b/force-app/main/default/lwc/lexNewSparePartsLoanApplication/lexNewSparePartsLoanApplication.js
@@ -36,63 +36,78 @@
this.IsLoading = false;
if (result != null) {
console.log("-------result--------------",JSON.stringify(result))
+ // StayOrNot__c 鎵�鏈変汉鍦ㄧ鑱岀姸鎬�
if (result.opdStayOrNot == '宸茬鑱�') {
- this.showToast('鎵�鏈変汉宸茬粡绂昏亴锛岃鑱旂郴绯荤粺绠$悊鍛樹慨鏀规墍鏈変汉銆�','error');
+ this.showToast('鎵�鏈変汉宸茬粡绂昏亴锛岃鑱旂郴绯荤粺绠$悊鍛樹慨鏀规墍鏈変汉銆�','warning');
return;
}
+ // IF_Approved__c 鏄惁闇�瑕佺敵璇峰喅瑁� ; Approved_No__c 鍐宠缂栫爜
if (result.opdIFApproved == true && result.opdApprovedNo == ''){
- this.showToast('闇�瑕佸喅瑁佹椂锛屽喅瑁佺紪鐮佷笉鑳戒负绌�','error');
- return;
+ this.showToast('闇�瑕佸喅瑁佹椂锛屽喅瑁佺紪鐮佷笉鑳戒负绌�','warning');
+ return;
}
+ // 鍐宠鐘舵�� Approved_Status__c
if (result.opdIFApproved == true && result.opdApprovedNo != '' && result.opdStatusProcessState.indexOf(result.opdApprovedStatus)!= -1 && result.opdApprovedStatus != '鑽夌' ){
- this.showToast('宸茬敵璇峰喅瑁佷絾鍐宠鐘舵�佷笉绗﹀悎鏉′欢','error');
- return;
+ this.showToast('宸茬敵璇峰喅瑁佷絾鍐宠鐘舵�佷笉绗﹀悎鏉′欢','warning');
+ return;
}
var HaveValue = "{!OPDPlan__c.Rental_Apply2__c}";
+ // 澶囧搧鍊熷嚭鐢宠1 Rental_Apply2__c ; OPD璁″垝鏉ユ簮 OPDType__c
if (result.opdRentalApply2 != '' && result.opdType != '瀛︿細') {
- this.showToast('涓�涓狾PD璁″垝鍙彲鍏宠仈鍒涘缓涓�涓鍝佺敵璇峰崟','error');
+ this.showToast('涓�涓狾PD璁″垝鍙彲鍏宠仈鍒涘缓涓�涓鍝佺敵璇峰崟','warning');
return;
}
+ // 鐘舵�� Status__c
if (result.opdStatus != '璁″垝涓�') {
- this.showToast('OPD璁″垝鐨勭姸鎬佷笉鏄鍒掍腑锛屼笉鑳芥柊寤哄鍝佸�熷嚭鐢宠','error');
- return;
+ this.showToast('OPD璁″垝鐨勭姸鎬佷笉鏄鍒掍腑锛屼笉鑳芥柊寤哄鍝佸�熷嚭鐢宠','warning');
+ return;
}
UserInfo_Owner({}).then(res=>{
- console.log("-------UserInfo_Owner------------",res);
- if(res.isFormalStuff == 'true'){
- this.showToast('璇曠敤鏈熷唴锛屼笉鑳界敵璇�','error');
+ console.log("-------UserInfo_Owner---1111---------",res);
+ // 鏄惁鍦ㄨ瘯鐢ㄦ湡 isFormal_Stuff__c
+ if(res.isFormalStuff){
+ this.showToast('璇曠敤鏈熷唴锛屼笉鑳界敵璇�','warning');
return;
}
- console.log("-------UserInfo_Owner---1111---------",result);
+
+ // 瀛︿細 Campaign__c
if (result.opdType == '瀛︿細' && result.opdCampaignId != '') {
console.log("-------UserInfo_Owner---2222---------");
+ // 鎻愪氦鐢宠FLG Rental_Apply_Flag__c
if (result.opdRentalApplyFlag < 7) {
- this.showToast("鐢宠鎻愪氦蹇呴』鍦�7澶╋紙鍚級浠ヤ笂鎵嶅彲浠�",'error');
- return;
+ this.showToast("鐢宠鎻愪氦蹇呴』鍦�7澶╋紙鍚級浠ヤ笂鎵嶅彲浠�",'warning');
+ return;
}
+ // userProvince 鐪� Province__c
var ups = res.userProvince.slice(0, 2);
- if (result.opdCampaignTypeId != '01210000000R26P' && res.userJobCategory == '閿�鍞湇鍔�' ) {
- this.showToast('FSE涓嶈兘鐢宠璇ュ浼氱被鍨嬪鍝�','error');
- return;
- } else if ((res.userJobCategory == '閿�鍞湇鍔�' || res.userJobCategory == '鏀彺') && result.opdCampaignTypeId == '01210000000R26P' && result.opdInternalinchargeprovince.indexOf(ups) == -1) {
- this.showToast("涓嶧SE鎵�鍦ㄧ渷涓�鑷达紝鎵嶅彲浣跨敤澶囧搧",'error');
- return;
+ let campaignRecodeType = result.opdCampaignRecodeTypeId.slice(0,15)
+ let getCampaignRecodeType = result.opdCampaignTypeId.slice(0,15)
+ console.log("-------opdCampaignRecodeTypeId---2222---------",getCampaignRecodeType,campaignRecodeType);
+ // 鑱岀 Job_Category__c
+ if (campaignRecodeType !== getCampaignRecodeType && res.userJobCategory == '閿�鍞湇鍔�' ) {
+ this.showToast('FSE涓嶈兘鐢宠璇ュ浼氱被鍨嬪鍝�','warning');
+ return;
+ } else if ((res.userJobCategory == '閿�鍞湇鍔�' || res.userJobCategory == '鏀彺') && campaignRecodeType !== getCampaignRecodeType && result.opdInternalinchargeprovince.indexOf(ups) == -1) {
+ this.showToast("涓嶧SE鎵�鍦ㄧ渷涓�鑷达紝鎵嶅彲浣跨敤澶囧搧",'warning');
+ return;
} else if (result.opdCampaignStatus == '宸茬粨鏉�') {
- this.showToast("宸茬粨鏉燂紝涓嶈兘鐢宠",'error');
- return;
+ // 瀛︿細鐘舵�� CampaignStatus__c
+ this.showToast("宸茬粨鏉燂紝涓嶈兘鐢宠",'warning');
+ return;
} else if (result.opdCampaignStatus == '宸叉彁浜ゆ姤鍛�') {
- this.showToast("宸叉彁浜ゆ姤鍛婏紝涓嶈兘鐢宠",'error');
- return;
+ this.showToast("宸叉彁浜ゆ姤鍛婏紝涓嶈兘鐢宠",'warning');
+ return;
} else if (result.opdCampaignStatus == '鍙栨秷鐢宠涓�') {
- this.showToast("鍙栨秷鐢宠涓紝涓嶈兘鐢宠",'error');
- return;
+ this.showToast("鍙栨秷鐢宠涓紝涓嶈兘鐢宠",'warning');
+ return;
} else if (result.opdCampaignStatus == '鍙栨秷') {
- this.showToast("宸茬粡鍙栨秷锛屼笉鑳界敵璇�",'error');
- return;
+ this.showToast("宸茬粡鍙栨秷锛屼笉鑳界敵璇�",'warning');
+ return;
}
}
+ // 鍘烵PD璁″垝(鍐嶇敵璇�) OriginalOpdPlan__c 鍘烵PD璁″垝(琛ュ厖鐢宠) OriginalOpdPlanApplication__c
if (result.opdOriginalOpdPlan == '') {
if (result.opdOriginalOpdPlanApplication == '') {
if (result.opdType == '瀛︿細' && result.opdCampaignId != '') {
@@ -106,11 +121,11 @@
demo_purpose2__c:'瀛︿細灞曚細',
Campaign__c:result.opdCampaign,
Account__c:result.opdAccountLaboratory,
- Strategic_dept__c:result.opdOCMcategoryName,
- Hospital__c:result.opdHospitalName,
- OPDPlan__c:opdName,
- Person_In_Charge__c:res.lastName + res.firstName,
- applyUser__c:res.lastName + res.firstName,
+ Strategic_dept__c:result.opdOCMcategoryId,
+ Hospital__c:result.opdHospitalId,
+ OPDPlan__c:result.opdPlanId,
+ Person_In_Charge__c:res.id,
+ applyUser__c:res.id,
Loaner_received_staff__c:res.lastName + res.firstName,
IsJump__c:result.opdIsJump,
JumpCause__c:result.opdJumpCause,
@@ -120,6 +135,7 @@
});
this.navigateEvents(defaultValues);
} else if (result.opdOpportunityId != '') {
+ // 璺熻繘璇环ID1
// var purposeStr = '&00N10000003Msk0=浜у搧璇曠敤' +
// '&00N10000003Msk5=璇曠敤锛堟湁璇环锛�' +
// '&CF00N10000003O3VB_lkid={!OPDPlan__c.Related_Opportunity1_IDId__c}' +
@@ -129,20 +145,20 @@
// OPDPlan__c:this.recordId,
Demo_purpose1__c:'浜у搧璇曠敤',
demo_purpose2__c:'璇曠敤锛堟湁璇环锛�',
- Follow_UP_Opp__c:result.opdRelatedOpportunity1Name,
+ Follow_UP_Opp__c:result.opdRelatedOpportunity1ID,
Account__c:result.opdAccountLaboratory,
- // Strategic_dept__c:result.opdOCMcategoryName,
- // Hospital__c:result.opdHospitalName,
- // OPDPlan__c:opdName,
- // Person_In_Charge__c:res.lastName + res.firstName,
- // applyUser__c:res.lastName + res.firstName,
- // Loaner_received_staff__c:res.lastName + res.firstName,
- // IsJump__c:result.opdIsJump,
- // JumpCause__c:result.opdJumpCause,
- // Name:'*',
- // Approved_State_Create__c:result.ApprovedStatus,
- // ApprovedNo_Create__c:result.opdApprovedNo
+ Strategic_dept__c:result.opdOCMcategoryId,
+ Hospital__c:result.opdHospitalId,
+ OPDPlan__c:result.opdPlanId,
+ Person_In_Charge__c:res.id,
+ applyUser__c:res.id,
+ Loaner_received_staff__c:res.lastName + res.firstName,
+ IsJump__c:result.opdIsJump,
+ JumpCause__c:result.opdJumpCause,
+ Name:'*',
+ Approved_State_Create__c:result.ApprovedStatus,
+ ApprovedNo_Create__c:result.opdApprovedNo
});
console.log("--------defaultValues---1111---",defaultValues);
@@ -159,11 +175,11 @@
NoOpp_Reason__c:result.opdNoOppReason,
Account__c:result.opdAccountLaboratory,
- Strategic_dept__c:result.opdOCMcategoryName,
- Hospital__c:result.opdHospitalName,
- OPDPlan__c:opdName,
- Person_In_Charge__c:res.lastName + res.firstName,
- applyUser__c:res.lastName + res.firstName,
+ Strategic_dept__c:result.opdOCMcategoryId,
+ Hospital__c:result.opdHospitalId,
+ OPDPlan__c:result.opdPlanId,
+ Person_In_Charge__c:res.id,
+ applyUser__c:res.id,
Loaner_received_staff__c:res.lastName + res.firstName,
IsJump__c:result.opdIsJump,
JumpCause__c:result.opdJumpCause,
@@ -250,7 +266,7 @@
showToast(message, type) {
const evt = new ShowToastEvent({
- title: 'Error',
+ // title: 'Error',
message: message,
variant: type
});
@@ -268,7 +284,6 @@
},
state:{
defaultFieldValues: defaultValues
-
}
})
}
diff --git a/force-app/main/default/pages/ConsumApplyCancel.page b/force-app/main/default/pages/ConsumApplyCancel.page
index dae299c..d47982f 100644
--- a/force-app/main/default/pages/ConsumApplyCancel.page
+++ b/force-app/main/default/pages/ConsumApplyCancel.page
@@ -1,9 +1,15 @@
-<apex:page controller="ConsumApplyCancelController" action="{!init}" showHeader="false">
+<apex:page controller="ConsumApplyCancelController" lightningStylesheets="true" action="{!init}" showHeader="false">
<head>
<title>鑰楁潗鐢宠鍙栨秷</title>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+ <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning 聽-->
+ <style>
+ div > input {
+ vertical-align: middle !important;
+ }
+ </style>
<script type="text/javascript">
function back() {
window.opener.parent.location.href = "/{!ra.Id}";
diff --git a/force-app/main/default/pages/ConsumEquipmentSetShipment.page b/force-app/main/default/pages/ConsumEquipmentSetShipment.page
index a5b4416..a2df5f2 100644
--- a/force-app/main/default/pages/ConsumEquipmentSetShipment.page
+++ b/force-app/main/default/pages/ConsumEquipmentSetShipment.page
@@ -1,4 +1,4 @@
-<apex:page Controller="ConsumEquipmentSetShipmentController" showHeader="false" sidebar="false" id="allPage" action="{!init}" >
+<apex:page Controller="ConsumEquipmentSetShipmentController" lightningStylesheets="true" showHeader="false" sidebar="false" id="allPage" action="{!init}" >
<head>
<meta name="format-detection" content="telephone=no"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
@@ -11,6 +11,7 @@
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
<apex:stylesheet value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.css')}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.js')}"/>
+<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning 聽-->
<style type="text/css">
div#out_Div_L {
position:relative;
@@ -84,6 +85,19 @@
text-decoration: none;
}
+/* add lightning */
+input.btn {
+ padding: 2px 15px !important;
+}
+td.dataCellBorder1 {
+ width: 32px;
+ height: 38px;
+ padding: 1px 8px 1px 3px !important;
+}
+td.col_chk {
+ width: 32px;
+ padding: 1px 5px 1px 3px !important;
+}
</style>
<script type="text/javascript">
sforce.connection.sessionId = "{!$Api.Session_ID}";
diff --git a/force-app/main/default/pages/ConsumFixtureSetSelect.page b/force-app/main/default/pages/ConsumFixtureSetSelect.page
index fe4e625..57439d1 100644
--- a/force-app/main/default/pages/ConsumFixtureSetSelect.page
+++ b/force-app/main/default/pages/ConsumFixtureSetSelect.page
@@ -1,4 +1,4 @@
-<apex:page standardController="Consum_Apply_Equipment_Set__c" extensions="ConsumFixtureSetSelectController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
+<apex:page standardController="Consum_Apply_Equipment_Set__c" extensions="ConsumFixtureSetSelectController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true">
<head>
<title>鑰楁潗鏄庣粏閫夋嫨</title>
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
@@ -6,6 +6,7 @@
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
+<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning 聽-->
<script type="text/javascript">
var heightAjustment = 120;
@@ -76,7 +77,7 @@
<td width="20px;" />
<td>
<apex:commandButton style="margin-left:20px;float:left;" value="閫傜敤" onclick="applyjs(); return false;"/>
- {!$Label.ConsumFixtureSetSelect_applyJs_Description}
+ <span style="margin-left: 10px;justify-items: center;line-height: 30px;">{!$Label.ConsumFixtureSetSelect_applyJs_Description}</span>
</td>
<td colspan="2"></td>
</tr>
--
Gitblit v1.9.1