From b37242ad5f2a81065eba0b176b38de4dd93ac8d6 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@prec-tech.com>
Date: 星期一, 10 七月 2023 15:48:46 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
---
force-app/main/default/classes/lexRentalApplyFaultReportController.cls | 75 ++
force-app/main/default/lwc/lexReassign/lexReassign.js | 12
force-app/main/default/pages/RentalFixtureSetAssign.page | 3
force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.html | 3
force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.js | 56 +
force-app/main/default/aura/TransferApplyNew/TransferApplyNew.cmp-meta.xml | 5
force-app/main/default/lwc/lexInventoryPage/lexInventoryPage.html | 3
force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.html | 13
force-app/main/default/lwc/lexInventoryPage/lexInventoryPage.js-meta.xml | 5
force-app/main/default/lwc/lexTransferApplySelectDetail/lexTransferApplySelectDetail.js-meta.xml | 17
force-app/main/default/aura/TransferApplyNew/TransferApplyNewController.js | 5
force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.js | 22
force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.js | 16
force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.js-meta.xml | 17
force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.html | 4
force-app/main/default/lwc/lexLoanerArrangedEmailConsumApply/lexLoanerArrangedEmailConsumApply.js-meta.xml | 11
force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.html | 3
force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.js-meta.xml | 11
force-app/main/default/lwc/lexTransferApplyNew/__tests__/lexTransferApplyNew.test.js | 25
force-app/main/default/staticresources/RentalFixtureSetDetilSelectCss.css | 1
force-app/main/default/lwc/lexNewTransferApply/lexNewTransferApply.html | 3
force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.html | 2
force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.html | 5
force-app/main/default/lwc/lexLoanerArrangedEmailConsumApply/lexLoanerArrangedEmailConsumApply.html | 3
force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.html | 2
force-app/main/default/lwc/lexSendReport/lexSendReport.html | 2
force-app/main/default/lwc/lexLoanerArrangedEmailConsumApply/lexLoanerArrangedEmailConsumApply.js | 91 +++
force-app/main/default/lwc/lexSendReport/lexSendReport.js | 66 ++
force-app/main/default/lwc/lexConsumSelect/lexConsumSelect.html | 3
force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.css | 22
force-app/main/default/lwc/lexRentalApplyFaultReport/lexRentalApplyFaultReport.js | 180 ++++++
force-app/main/default/lwc/lexSendReport/lexSendReport.css | 22
force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.js-meta.xml | 11
force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.html | 4
force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.css | 11
force-app/main/default/lwc/lexReassign/lexReassign.html | 4
force-app/main/default/lwc/lexTransferApplyNew/lexTransferApplyNew.js | 45 +
force-app/main/default/lwc/lexRentalApplyFaultReport/lexRentalApplyFaultReport.html | 52 +
force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.js | 18
force-app/main/default/lwc/lexEquipmentRentalPDF/lexEquipmentRentalPDF.js | 35
force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.js | 32 +
force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.css | 13
force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.js | 32
force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.html | 3
force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.html | 14
force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.js-meta.xml | 12
force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.js | 50 +
force-app/main/default/lwc/lexSendReport/lexSendReport.js-meta.xml | 11
force-app/main/default/lwc/lexTransferApplySelectDetail/lexTransferApplySelectDetail.js | 19
force-app/main/default/staticresources/RelationListPagingCmpJS.js | 8
force-app/main/default/lwc/lexTransferApplyNew/lexTransferApplyNew.js-meta.xml | 5
force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.js | 17
force-app/main/default/lwc/lexTransferApplyNew/lexTransferApplyNew.html | 3
force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.html | 3
force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.html | 3
force-app/main/default/aura/TransferApplyNew/TransferApplyNew.cmp | 33 +
force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.css | 22
force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.html | 2
force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js | 37
force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.js | 101 +-
force-app/main/default/lwc/lexInventoryPage/lexInventoryPage.js | 22
force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.js | 9
force-app/main/default/lwc/lexEquipmentRentalPDF/lexEquipmentRentalPDF.html | 3
force-app/main/default/classes/lexRentalApplyFaultReportController.cls-meta.xml | 5
force-app/main/default/lwc/lexConsumSelect/lexConsumSelect.js-meta.xml | 18
force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.js | 36
force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.html | 3
force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.css | 11
force-app/main/default/pages/RentalFixtureSetDetilSelect.page | 12
force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.js-meta.xml | 11
force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.js | 130 +--
force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.js-meta.xml | 11
force-app/main/default/lwc/lexRentalApplyFaultReport/lexRentalApplyFaultReport.js-meta.xml | 11
force-app/main/default/lwc/lexTransferApplySelectDetail/lexTransferApplySelectDetail.html | 13
force-app/main/default/lwc/lexSubmitExtensionApprovalProcess/lexSubmitExtensionApprovalProcess.html | 3
force-app/main/default/lwc/lexConsumSelect/lexConsumSelect.js | 54 +
force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.js-meta.xml | 7
force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.html | 3
force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.js-meta.xml | 2
force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.js | 72 ++
force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.html | 3
81 files changed, 1,493 insertions(+), 254 deletions(-)
diff --git a/force-app/main/default/aura/TransferApplyNew/TransferApplyNew.cmp b/force-app/main/default/aura/TransferApplyNew/TransferApplyNew.cmp
new file mode 100644
index 0000000..e46431d
--- /dev/null
+++ b/force-app/main/default/aura/TransferApplyNew/TransferApplyNew.cmp
@@ -0,0 +1,33 @@
+<!--
+ * @Description:
+ * @Author: [lijinhuan]
+ * @Date: 2023-04-26 17:25:35
+ * @LastEditors: [lijinhuan]
+ * @LastEditTime: 2023-07-03 16:17:03
+-->
+<aura:component
+ implements="lightning:actionOverride,lightning:isUrlAddressable,force:lightningQuickAction,force:hasRecordId"
+ access="global">
+ <aura:html tag="style">
+ .slds-modal__container{
+ max-width: 65rem !important;
+ width:100% !important;
+ }
+ .cuf-content {
+ padding: 0 0rem !important;
+ }
+ .slds-p-around--medium {
+ padding: 0rem !important;
+ }
+ .slds-modal__content{
+ overflow-y:auto !important;
+ height:unset !important;
+ max-height:unset !important;
+ min-height:8rem;
+ }
+ .slds-tile_board{
+ padding:20px 40px;
+ }
+ </aura:html>
+ <c:lexTransferApplyNew />
+</aura:component>
\ No newline at end of file
diff --git a/force-app/main/default/aura/TransferApplyNew/TransferApplyNew.cmp-meta.xml b/force-app/main/default/aura/TransferApplyNew/TransferApplyNew.cmp-meta.xml
new file mode 100644
index 0000000..838df43
--- /dev/null
+++ b/force-app/main/default/aura/TransferApplyNew/TransferApplyNew.cmp-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>56.0</apiVersion>
+ <description>A Lightning Component Bundle</description>
+</AuraDefinitionBundle>
diff --git a/force-app/main/default/aura/TransferApplyNew/TransferApplyNewController.js b/force-app/main/default/aura/TransferApplyNew/TransferApplyNewController.js
new file mode 100644
index 0000000..77e406b
--- /dev/null
+++ b/force-app/main/default/aura/TransferApplyNew/TransferApplyNewController.js
@@ -0,0 +1,5 @@
+({
+ myAction : function(component, event, helper) {
+
+ }
+})
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexRentalApplyFaultReportController.cls b/force-app/main/default/classes/lexRentalApplyFaultReportController.cls
new file mode 100644
index 0000000..e84a999
--- /dev/null
+++ b/force-app/main/default/classes/lexRentalApplyFaultReportController.cls
@@ -0,0 +1,75 @@
+/*
+ * @Description: 澶囧搧妫�娴嬪垎鏋愭姤鍛�
+ * @Author: [lijinhuan]
+ * @Date: 2023-06-25 20:04:41
+ * @LastEditors: [lijinhuan]
+ * @LastEditTime: 2023-07-06 17:22:39
+ */
+public without sharing class lexRentalApplyFaultReportController {
+ @AuraEnabled
+ public static List<RetObject> init(String recordId){
+ try {
+ List<RetObject> retObjectList = new List<RetObject>();
+ //澶囧搧鍊熷嚭鐢宠涓�瑙堟槑缁�
+ List<Rental_Apply_Equipment_Set_Detail__c> eList = [
+ SELECT Id, Name,
+ Rental_Apply__r.OCM_dept_category__c,
+ Rental_Apply__r.Name,
+ Rental_Apply__r.Person_In_Charge__c,
+ Rental_Apply__r.Person_In_Charge__r.Name,
+ Rental_Apply__r.demo_purpose2__c,
+ Rental_Apply__r.WorkPlace__c,
+ Rental_Apply__r.Hospital__r.Name,
+ Loaner_asset_no__c,
+ AssetName__c,
+ Fixture_Model_No__c,
+ SerialNumber_F__c,
+ Inspection_result_after__c,
+ Inspection_result_after_NG__c
+ FROM Rental_Apply_Equipment_Set_Detail__c
+ WHERE Rental_Apply__c = :recordId
+ AND Inspection_result_after__c = 'NG'
+ AND Is_Body__c = true
+ ORDER BY Id];
+
+ List<Id> eIds = new List<Id>();
+ for(Rental_Apply_Equipment_Set_Detail__c e :eList){
+ eIds.add(e.Id);
+ }
+ //鏌ュ綋鍓嶆槑缁嗕笅鏈夊灏戞晠闅滄姤鍛�
+ // 0 娌℃湁鎶ュ憡
+ // Id 鏈� 鏈�鏂颁竴鏉′负鑽夋涓�
+ // 2 鏈夊緢澶氭潯 娌℃湁杩欎釜鍦烘櫙
+ if(eIds.size() > 0){
+ Map<String,String> sIdMap = New Map<String,String>();
+ for(Rental_Apply_Fault__c raf : [SELECT Id ,status__c ,Rental_Apply_Equipment_Set_Detail__c from Rental_Apply_Fault__c where Rental_Apply_Equipment_Set_Detail__c in :eIds Order By CreatedDate DESC]){
+ if(!sIdMap.containsKey(raf.Rental_Apply_Equipment_Set_Detail__c)){
+ sIdMap.put(raf.Rental_Apply_Equipment_Set_Detail__c,raf.Id);
+ }
+ }
+ for(Rental_Apply_Equipment_Set_Detail__c rae : eList){
+ RetObject temp = new RetObject();
+ temp.rae = rae;
+ if(sIdMap.containsKey(rae.Id)){
+ temp.faultId = sIdMap.get(rae.Id) ;
+ }else{
+ temp.faultId = '';
+ }
+ retObjectList.add(temp);
+ }
+ return retObjectList;
+ }
+ }
+ catch (Exception e) {
+ System.debug('*******lexRentalApplyFaultReportController******'+e.getMessage());
+ }
+ return null;
+ }
+
+ public class RetObject {
+ @AuraEnabled
+ public Rental_Apply_Equipment_Set_Detail__c rae;
+ @AuraEnabled
+ public String faultId;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexRentalApplyFaultReportController.cls-meta.xml b/force-app/main/default/classes/lexRentalApplyFaultReportController.cls-meta.xml
new file mode 100644
index 0000000..754ecb1
--- /dev/null
+++ b/force-app/main/default/classes/lexRentalApplyFaultReportController.cls-meta.xml
@@ -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>
diff --git a/force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.html b/force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.html
index 49a10f7..ba53413 100644
--- a/force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.html
+++ b/force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.html
@@ -1,5 +1,2 @@
<template>
- <div class="sisToOPDHolder" if:true={IsLoading}>
- <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
- </div>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.js b/force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.js
index eb9baa5..8df44b6 100644
--- a/force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.js
+++ b/force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.js
@@ -3,10 +3,11 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
import { updateRecord } from 'lightning/uiRecordApi';
-
+import LightningConfirm from 'lightning/confirm';
import init from '@salesforce/apex/AddSubmitApprovalProcessController.init';
import submitApproval from '@salesforce/apex/AddSubmitApprovalProcessController.submitApproval';
import setSObjectShare from '@salesforce/apex/ControllerUtil.setSObjectShare';
+import changeAddApprovalStatus from '@salesforce/apex/AddSubmitApprovalProcessController.changeAddApprovalStatus';
export default class lexAddSubmitApprovalProcess extends LightningElement {
@api recordId;
@@ -32,10 +33,22 @@
this.ToastShow('娌℃湁闇�瑕佸鎵圭殑杩藉姞闄勫睘鍝�','warning');
return;
}
- if (!confirm("涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵")) {
- this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
+ // if (!confirm("涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵")) {
+ // this.dispatchEvent(new CloseActionScreenEvent());
+ // return;
+ // }
+ const SUBMIT = LightningConfirm.open({
+ message: "涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵",
+ variant: 'headerless',
+ label: '鎻愮ず淇℃伅',
+ // setting theme would have no effect
+ });
+
+ if(SUBMIT==false){
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }
+
// 甯屾湜鍒拌揣鏃ヤ笉鑳芥棭浜庣敵璇锋彁浜ゆ棩-0418杩藉姞
//if ('{!Rental_Apply__c.Request_shipping_day__c}' < '{!TODAY()}') {
// alert('甯屾湜鍒拌揣鏃ヤ笉鑳芥棭浜庣敵璇锋彁浜ゆ棩');
@@ -93,7 +106,7 @@
}
}
- // share
+ //share
var userAccess = new Array();
userAccess.push(result.applyUserId + '_Edit');
@@ -108,6 +121,7 @@
//userAccess.push('{!Rental_Apply__c.ZongjianApprovalManagerId__c}_Read');//20210727 ljh SFDC-C54C33 update 鍏变韩瑙﹀彂鍣ㄥ畬鎴�
//userAccess.push('{!Rental_Apply__c.Status__c}_Read');
+ console.log('鍙傛暟==='+result.rentalApplyId+' '+userAccess+' '+result.ownerId);
setSObjectShare({
sobjectName:'Rental_Apply__Share',
rowCause:'ApplyUserShare__c',
@@ -115,52 +129,44 @@
userAccess:userAccess,
ownerId:result.ownerId
}).then(res=>{
- console.log('setSObjectShareSuccess===='+res);
+
if(res!='OK'){
this.ToastShow(res,'warning');
return;
+ }else{
+ console.log('setSObjectShareSuccess====OK');
+ //杩藉姞澶囧搧鐢宠鐘舵�佺‘璁わ紝宸茬粡鎻愪氦杩囩殑鐢宠锛屼笉鑳介噸澶嶆彁浜tatus__c
+ if (result.rentalApplyStatus != '宸叉壒鍑�' && result.rentalApplyStatus != '宸插嚭搴撴寚绀�') {
+ this.ToastShow('璇峰鍝佺敵璇风姸鎬佺‘璁わ紝鐢宠鐘舵�佸凡鎵瑰噯鍚庢墠鍙互鎻愪氦杩藉姞瀹℃壒','warning');
+ return;
+ }
+
+ changeAddApprovalStatus({
+ recordId: this.recordId,
+ status: '濉啓瀹屾瘯'
+ }).then(changeResult=>{
+ if(changeResult == '鏇存柊鎴愬姛'){
+ submitApproval({
+ recordId: this.recordId
+ }).then(submitApprovalRes=>{
+ if(submitApprovalRes == 'OK'){
+ this.ToastShow('鎻愪氦杩藉姞寰呭鎵�','success');
+ this.updateRecordView(this.recordId);
+ }else{
+ this.ToastShow('杩藉姞寰呭鎵瑰け璐�','ERROR');
+ }
+ })
+ }else{
+ this.ToastShow(changeResult,'error');
+ }
+ })
}
}).catch(err=>{
console.log('setSObjectShareErr===='+err);
})
-
- // var request = new sforce.ProcessSubmitRequest();
- // request.objectId = "{!Rental_Apply__c.Id}";
- // var processResults = sforce.connection.process([request]);
-
-
- // if (processResults[0].errors != null) {
- // var back = new sforce.SObject("Rental_Apply__c");
- // back.Id = "{!Rental_Apply__c.Id}";
- // back.Add_Approval_Status__c = "鑽夋涓�";
- // var backResult = sforce.connection.update([back]);
- // backMessages = this.getConnectDMLErrorMessages(backResult);
- // if (backMessages.length > 0) {
- // this.showToast(backMessages.join("\n"),'error');
- // return;
- // }
-
- // var errmsg = processResults[0].errors.message.toString();
- // this.showToast(errmsg,'error');
- // return;
- // }
-
- //updateRecord({fields: { Id: this.recordId }});
-
- submitApproval({
- recordId: this.recordId
- }).then(res=>{
- console.log('submitApproval===='+res);
- if(res == 'OK'){
- this.ToastShow('鎻愪氦鎴愬姛','success');
- }else{
- this.ToastShow(res,'error');
- }
- })
- updateRecord({fields: { Id: this.recordId }});
}).catch(err=>{
- console.log('sErr====',err.message);
+ console.log('====1111====',err);
})
}
@@ -174,39 +180,7 @@
this.dispatchEvent(new CloseActionScreenEvent());
}
- getConnectDMLErrorMessages(results){
- var messages = [],
- i = 0,
- len = results.length,
- r;
- for (; i < len; i++) {
- r = results[i];
- if (!r.getBoolean("success")) {
- messages = messages.concat(this.getConnectDMLMessagesOfAResult(r));
- }
- }
- return messages;
- }
-
- getConnectDMLMessagesOfAResult(res){
- var messages = [],
- errors = res.getArray("errors"),
- i = 0,
- len = errors.length,
- e;
- for (; i < len; i++) {
- e = errors[i];
- messages.push(e.message + " " + this.getConnectDMLErrorFields(e));
- }
- return messages;
- }
-
- getConnectDMLErrorFields(error){
- var fields = error.getArray('fields');
- if (fields.length > 0) {
- return "[" + fields.join(",") + "]"
- } else {
- return "";
- }
- }
+ updateRecordView(recordId) {
+ updateRecord({fields: { Id: recordId }});
+ }
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.html b/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.html
index 49a10f7..ba53413 100644
--- a/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.html
+++ b/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.html
@@ -1,5 +1,2 @@
<template>
- <div class="sisToOPDHolder" if:true={IsLoading}>
- <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
- </div>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js b/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js
index f97ad18..1e29534 100644
--- a/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js
+++ b/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js
@@ -2,6 +2,7 @@
import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { updateRecord } from 'lightning/uiRecordApi';
import init from '@salesforce/apex/AllReceivedFseController.init';
import getRaeSet from '@salesforce/apex/AllReceivedFseController.getRaeSet';
@@ -39,23 +40,11 @@
recordId: this.recordId
}).then(res=>{
if(res == 'SUCCESS'){
- const evt = new ShowToastEvent({
- title : '鐜板満宸插叏閮ㄦ敹璐�',
- message: '',
- variant: 'success'
- });
- this.dispatchEvent(new CloseActionScreenEvent());
- this.dispatchEvent(evt);
+ this.showToast('鐜板満宸插叏閮ㄦ敹璐�','success');
+ return;
}else{
- const errToast = new ShowToastEvent({
- title : res,
- message: '',
- variant: 'error'
- });
- this.dispatchEvent(new CloseActionScreenEvent());
- this.dispatchEvent(errToast);
-
- console.log(res);
+ this.showToast(res,'warning');
+ return;
}
})
@@ -67,4 +56,20 @@
console.log('init==='+err);
})
}
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ if(type == 'success'){
+ this.updateRecordView(this.recordId);
+ }
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+
+ updateRecordView(recordId) {
+ updateRecord({fields: { Id: recordId }});
+ }
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexConsumSelect/lexConsumSelect.html b/force-app/main/default/lwc/lexConsumSelect/lexConsumSelect.html
new file mode 100644
index 0000000..af9fa97
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumSelect/lexConsumSelect.html
@@ -0,0 +1,3 @@
+<template>
+
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexConsumSelect/lexConsumSelect.js b/force-app/main/default/lwc/lexConsumSelect/lexConsumSelect.js
new file mode 100644
index 0000000..f846a8d
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumSelect/lexConsumSelect.js
@@ -0,0 +1,54 @@
+import { LightningElement, track, wire, api } from 'lwc';
+import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { CloseActionScreenEvent } from 'lightning/actions';
+
+import init from '@salesforce/apex/lexConsumApplyController.init';
+import getSet from '@salesforce/apex/lexConsumApplyController.getSet';
+export default class lexConsumSelect extends LightningElement {
+ @api recordId;
+ @api consumApplySetIds;
+ IsLoading=true;
+ IsDisplay=true;
+ //鎻愮ず淇℃伅
+ msg;
+
+ connectedCallback(){
+ this.IsLoading=false;
+ init({
+ recordId: this.recordId
+ }).then(res=>{
+ this.IsDisplay = false;
+ if(res.yiLoanerArranged > 0){
+ this.IsDisplay = true;
+ this.msg = '鍑哄簱涔嬪悗涓嶈兘鐐瑰嚮鍒嗛厤鎸夐挳,濡傛灉鏈夐渶瑕佸垎閰嶇殑鏄庣粏璇峰垎鍗曞悗缁х画鎿嶄綔';
+ return;
+ }else if(this.consumApplySetIds.length<1){
+ this.IsDisplay = true;
+ this.msg = '璇烽�夋嫨鑰楁潗澶囧搧涓�瑙�';
+ return;
+ }else if(this.consumApplySetIds.length>1){
+ this.IsDisplay = true;
+ this.msg = '璇烽�夋嫨涓�鏉¤�楁潗澶囧搧涓�瑙�';
+ return;
+ }else{
+ getSet({
+ setId: this.consumApplySetIds[0]
+ }).then(res=>{
+ if(res.Zan_Ding_Fen_Pei_Shu__c > 0){
+ this.IsDisplay = true;
+ this.msg = '璇峰湪榛樿鍒嗛厤鍚庡啀鍋氬垎閰嶆搷浣溿��';
+ return;
+ }else{
+ window.open("/apex/ConsumSelect?recid=" + this.consumApplySetIds[0], "_top");
+ }
+ })
+ }
+ })
+ }
+
+ closeAction() {
+ //杩斿洖褰撳墠鐨勫鍝佺敵璇�
+ window.open("/"+this.recordId,'_self');
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexConsumSelect/lexConsumSelect.js-meta.xml b/force-app/main/default/lwc/lexConsumSelect/lexConsumSelect.js-meta.xml
new file mode 100644
index 0000000..171c81d
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumSelect/lexConsumSelect.js-meta.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexConsumSelect">
+ <apiVersion>51.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">
+ <property name="recordId" type="String" label="recordId"/>
+ <property name="consumApplySetIds" type="String[]" label="consumApplySetIds"/>
+ </targetConfig>
+ </targetConfigs>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexEquipmentRentalPDF/lexEquipmentRentalPDF.html b/force-app/main/default/lwc/lexEquipmentRentalPDF/lexEquipmentRentalPDF.html
index 3eff9e8..ba53413 100644
--- a/force-app/main/default/lwc/lexEquipmentRentalPDF/lexEquipmentRentalPDF.html
+++ b/force-app/main/default/lwc/lexEquipmentRentalPDF/lexEquipmentRentalPDF.html
@@ -1,5 +1,2 @@
<template>
- <div class="EquipmentRentalPDF" if:true={IsLoading}>
- <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
- </div>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexEquipmentRentalPDF/lexEquipmentRentalPDF.js b/force-app/main/default/lwc/lexEquipmentRentalPDF/lexEquipmentRentalPDF.js
index 12d6d76..a73f06f 100644
--- a/force-app/main/default/lwc/lexEquipmentRentalPDF/lexEquipmentRentalPDF.js
+++ b/force-app/main/default/lwc/lexEquipmentRentalPDF/lexEquipmentRentalPDF.js
@@ -1,10 +1,12 @@
import { LightningElement, track, wire, api } from 'lwc';
import {CurrentPageReference,NavigationMixin} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { updateRecord } from 'lightning/uiRecordApi';
-import init from '@salesforce/apex/rentalApplyEquipmentRentalPDFController.initJumptoPDFButton';
+import init from '@salesforce/apex/RentalApplyEquipmentRentalPDFController.initJumptoPDFButton';
-export default class rentalApplyEquipmentRentalPDF extends LightningElement {
+export default class lexEquipmentRentalPDF extends LightningElement {
@api recordId;
IsLoading = true;
@@ -29,11 +31,14 @@
recordId : this.recordId
}).then(result => {
if(result != null) {
- this.IsLoading = false;
- let num = result.pageLength;
- console.log("======"+this.recordId + ' ' +num);
- console.log("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/FixtureRentalPDF?raid=" + this.recordId + "&page=" + num)
- window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/apex/FixtureRentalPDF?raid=" + this.recordId + "&page=" + num);
+ console.log('shipmentRequestedCnt'+ result.shipmentRequestedCnt);
+ if(result.shipmentRequestedCnt > 0){
+ this.IsLoading = false;
+ let num = result.pageLength;
+ window.open("https://ocsm--partial.sandbox.lightning.force.com/apex/FixtureRentalPDF?raid=" + this.recordId + "&page=" + num);
+ }else{
+ this.showToast('褰撳墠鐨勭敵璇峰崟涓病鏈夊凡鍑哄簱鎸囩ず鐨勯厤濂椼��','error');
+ }
}
})
.catch( error =>{
@@ -41,4 +46,20 @@
})
}
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ if(type == 'success'){
+ this.updateRecordView();
+ }
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+
+ updateRecordView(recordId) {
+ updateRecord({fields: { Id: recordId }});
+ }
+
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.html b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.html
index 49a10f7..ba53413 100644
--- a/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.html
+++ b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.html
@@ -1,5 +1,2 @@
<template>
- <div class="sisToOPDHolder" if:true={IsLoading}>
- <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
- </div>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.css b/force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.css
new file mode 100644
index 0000000..635bc6c
--- /dev/null
+++ b/force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.css
@@ -0,0 +1,22 @@
+.outerBorderCss{
+ border: 1px solid #D4D4D4;
+ border-radius : 5px;
+ border-top : 3px solid #565959;
+}
+.borderCss{
+ border: 1px solid #D4D4D4;
+ border-radius : 5px;
+ margin-bottom : 7px;
+ border-top : 3px solid #565959;
+}
+.headerDorderCss{
+ border-top: 1px solid #565959;
+ border-bottom: 1px solid #D4D4D4;
+ padding:3px;
+}
+.centerCss{
+ text-align: center;
+}
+.centerCss .left{
+ margin-left: 100px;
+}/* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.html b/force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.html
new file mode 100644
index 0000000..49a10f7
--- /dev/null
+++ b/force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="sisToOPDHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.js b/force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.js
new file mode 100644
index 0000000..327730f
--- /dev/null
+++ b/force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.js
@@ -0,0 +1,56 @@
+import { LightningElement, track, wire, api } from 'lwc';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { CurrentPageReference } from 'lightning/navigation';
+
+import init from '@salesforce/apex/RentalApplyFaultController.init';
+import updateRentalApplyFaultStatus from '@salesforce/apex/RentalApplyFaultController.updateRentalApplyFaultStatus';
+export default class lexFeedbackReport extends LightningElement {
+ @api recordId;
+ IsLoading = true;
+
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference){
+ if(currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if(urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(res=>{
+ if(res.status__c!='宸插彂閫�'){
+ this.showToast('鍙湁宸插彂閫佺殑妫�娴嬪垎鏋愭姤鍛婃墠鑳藉彂閫�','warning');
+ return;
+ }
+
+ updateRentalApplyFaultStatus({
+ recordId: this.recordId,
+ updateStatus: '宸插弽棣�'
+ }).then(result=>{
+ if(result=='SUCCESS'){
+ this.showToast('鎶ュ憡宸插弽棣�','success');
+ }else{
+ this.showToast(res,'error');
+ }
+ })
+ })
+ }
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ if(type == 'success'){
+ this.updateRecordView();
+ }
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.js-meta.xml b/force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.js-meta.xml
new file mode 100644
index 0000000..97620b0
--- /dev/null
+++ b/force-app/main/default/lwc/lexFeedbackReport/lexFeedbackReport.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexFeedbackReport">
+ <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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.css b/force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.css
new file mode 100644
index 0000000..95c1c55
--- /dev/null
+++ b/force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.css
@@ -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;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.html b/force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.html
new file mode 100644
index 0000000..7063605
--- /dev/null
+++ b/force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.html
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.js b/force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.js
new file mode 100644
index 0000000..d0129fc
--- /dev/null
+++ b/force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.js
@@ -0,0 +1,9 @@
+import { LightningElement, track, wire, api } from 'lwc';
+
+export default class lexFixtureSetManage extends LightningElement {
+ @api recordId;
+
+ connectedCallback(){
+ window.open("/apex/FixtureSetManage?pt_recid=" + this.recordId, "_top");
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.js-meta.xml b/force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.js-meta.xml
new file mode 100644
index 0000000..e607891
--- /dev/null
+++ b/force-app/main/default/lwc/lexFixtureSetManage/lexFixtureSetManage.js-meta.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexFixtureSetManage">
+ <apiVersion>51.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">
+ <property name="recordId" type="String" label="recordId"/>
+ </targetConfig>
+ </targetConfigs>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.css b/force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.css
new file mode 100644
index 0000000..fbb1bbe
--- /dev/null
+++ b/force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.css
@@ -0,0 +1,11 @@
+.rentalApplyCanleButtonHolder{
+ position: relative;
+ display: inline-block;
+ width: 80px;
+ height: 80px;
+ text-align: center;
+}
+
+.container .uiContainerManager{
+ display : none !important;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.html b/force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.html
new file mode 100644
index 0000000..e9bebad
--- /dev/null
+++ b/force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.html
@@ -0,0 +1,4 @@
+<template>
+<div class="rentalApplyCanleButtonHolder" if:true={IsLoding}>
+<lightning-spinner alternative-text="Loading" size="medium"> </lightning-spinner> </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.js b/force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.js
new file mode 100644
index 0000000..65937c8
--- /dev/null
+++ b/force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.js
@@ -0,0 +1,72 @@
+import { LightningElement, track, wire, api } from 'lwc';
+import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import LightningConfirm from 'lightning/confirm';
+
+import init from '@salesforce/apex/LexInventoryHeaderClearStatusController.init';
+import updateStatus from '@salesforce/apex/LexInventoryHeaderClearStatusController.updateStatus';
+export default class lexInventoryHeaderClearStatus extends LightningElement {
+ @api recordId;
+ IsLoading = true;
+
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ console.log("str:"+str);
+ this.recordId = str;
+ }
+ }
+ }
+
+ connectedCallback(){
+ init({
+ recordId:this.recordId
+ }).then(results=>{
+ for(var i =0; i<results.length;i++){
+ if(results[i].Inventory_Status__c != '澶勭悊涓�' && results[i].Inventory_Status__c != null){
+ alert(results[i].Name+'鐨勭洏鐐圭姸鎬佷负銆�'+results[i].Inventory_Status__c+'銆戯紝涓嶈兘娓呴櫎姝ょ洏鐐圭姸鎬併��');
+ return;
+ }
+ }
+
+ const result = LightningConfirm.open({
+ message: "璇风‘璁ゆ槸鍚﹁娓呴櫎鐩樼偣鐘舵�侊紵",
+ variant: 'headerless',
+ label: '鎻愮ず淇℃伅',
+ })
+
+ if (result==false) {
+ return;
+ }
+
+ updateStatus({
+ inventoryList: results
+ }).then(res=>{
+ if(res == '娓呴櫎鐩樼偣鐘舵�佸畬姣�'){
+ this.showToast('娓呴櫎鐩樼偣鐘舵�佸畬姣�', 'success');
+ return;
+ }else{
+ this.showToast(res, 'error');
+ return;
+ }
+ })
+ })
+ }
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ if(type == 'success'){
+ this.updateRecordView();
+ }
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.js-meta.xml b/force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.js-meta.xml
new file mode 100644
index 0000000..e164406
--- /dev/null
+++ b/force-app/main/default/lwc/lexInventoryHeaderClearStatus/lexInventoryHeaderClearStatus.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexRentalApplyCanleButton">
+ <apiVersion>54.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__AppPage</target>
+ <target>lightning__RecordPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInventoryPage/lexInventoryPage.html b/force-app/main/default/lwc/lexInventoryPage/lexInventoryPage.html
new file mode 100644
index 0000000..af9fa97
--- /dev/null
+++ b/force-app/main/default/lwc/lexInventoryPage/lexInventoryPage.html
@@ -0,0 +1,3 @@
+<template>
+
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInventoryPage/lexInventoryPage.js b/force-app/main/default/lwc/lexInventoryPage/lexInventoryPage.js
new file mode 100644
index 0000000..2f8fba4
--- /dev/null
+++ b/force-app/main/default/lwc/lexInventoryPage/lexInventoryPage.js
@@ -0,0 +1,22 @@
+import { LightningElement, track, wire, api } from 'lwc';
+import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
+
+export default class lexInventoryPage extends LightningElement {
+ @api recordId;
+ IsLoading = true;
+
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+
+ connectedCallback(){
+ window.open("/apex/InventoryReport?Id=" + this.recordId);
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInventoryPage/lexInventoryPage.js-meta.xml b/force-app/main/default/lwc/lexInventoryPage/lexInventoryPage.js-meta.xml
new file mode 100644
index 0000000..a453ff8
--- /dev/null
+++ b/force-app/main/default/lwc/lexInventoryPage/lexInventoryPage.js-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexInventoryPage">
+ <apiVersion>50.0</apiVersion>
+ <isExposed>true</isExposed>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.html b/force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.html
index 3eff9e8..ba53413 100644
--- a/force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.html
+++ b/force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.html
@@ -1,5 +1,2 @@
<template>
- <div class="EquipmentRentalPDF" if:true={IsLoading}>
- <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
- </div>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.js b/force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.js
index bd626db..45073e5 100644
--- a/force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.js
+++ b/force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.js
@@ -4,10 +4,10 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { updateRecord } from 'lightning/uiRecordApi';
-import init from '@salesforce/apex/loanerArrangedEmailController.init';
-import getRentalApplyEquipmentSet from '@salesforce/apex/loanerArrangedEmailController.getRentalApplyEquipmentSet';
+import init from '@salesforce/apex/LoanerArrangedEmailController.init';
+import getRentalApplyEquipmentSet from '@salesforce/apex/LoanerArrangedEmailController.getRentalApplyEquipmentSet';
import approvalCheck from '@salesforce/apex/RentalApplyWebService.approvalCheck';
-import setShipment_request from '@salesforce/apex/RentalApplyWebService.approvalCheck';
+import setShipment_request from '@salesforce/apex/RentalApplyWebService.setShipment_request';
export default class lexLoanerArrangedEmail extends LightningElement {
@api recordId;
IsLoading = true;
@@ -24,9 +24,11 @@
}
connectedCallback() {
+
init({
recordId: this.recordId
}).then(result => {
+ let id = result.id;
let statusArr = result.statusList;
console.log('result==='+JSON.stringify(result));
if(result != null) {
@@ -58,19 +60,24 @@
//bp2 alert(rs2);
//bp2 } else {
//var rs1 = sforce.apex.execute("RentalApplyWebService", "setShipment_request", {raid : "{!Rental_Apply__c.Id}"});
- console.log('setShipment_request==');
setShipment_request({
raid: this.recordId
}).then(res=>{
console.log('res==',res);
- if (res == "鐘舵�佹洿鏂板埌宸插嚭搴撴寚绀�") {
- this.showToast("鐘舵�佹洿鏂板埌宸插嚭搴撴寚绀�",'success');
+ if (res == '鐘舵�佹洿鏂板埌宸插嚭搴撴寚绀�') {
+ this.showToast('鐘舵�佹洿鏂板埌宸插嚭搴撴寚绀�','success');
print();
- // setTimeout(function() {
- // location.href = "/{!Rental_Apply__c.Id}";
- // },100);
+ this.updateRecordView(this.recordId);
+ return;
}else {
- this.showToast(res,'error');
+ console.log('else==',res);
+ const evt = new ShowToastEvent({
+ title: 'Error',
+ message:res,
+ variant: 'error'
+ });
+ this.dispatchEvent(evt);
+ this.dispatchEvent(new CloseActionScreenEvent());
}
}).catch(e=>{
console.log('approvalCheck==='+e);
@@ -80,7 +87,6 @@
console.log('setShipment_request==='+e);
})
}
- this.dispatchEvent(new CloseActionScreenEvent());
}
})
}
@@ -89,7 +95,7 @@
getRentalApplyEquipmentSet({
recordId: this.recordId
}).then(result => {
- window.open("https://ocsm--partial.sandbox.lightning.force.com/apex/FixtureRentalPDF?raid=" + this.recordId + "&page=" + result);
+ window.open("/apex/FixtureRentalPDF?raid=" + this.recordId + "&page=" + result);
})
}
@@ -109,7 +115,7 @@
variant: type
});
if(type == 'success'){
- this.updateRecordView();
+ this.updateRecordView(this.recordId);
}
this.dispatchEvent(event);
this.dispatchEvent(new CloseActionScreenEvent());
diff --git a/force-app/main/default/lwc/lexLoanerArrangedEmailConsumApply/lexLoanerArrangedEmailConsumApply.html b/force-app/main/default/lwc/lexLoanerArrangedEmailConsumApply/lexLoanerArrangedEmailConsumApply.html
new file mode 100644
index 0000000..af9fa97
--- /dev/null
+++ b/force-app/main/default/lwc/lexLoanerArrangedEmailConsumApply/lexLoanerArrangedEmailConsumApply.html
@@ -0,0 +1,3 @@
+<template>
+
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLoanerArrangedEmailConsumApply/lexLoanerArrangedEmailConsumApply.js b/force-app/main/default/lwc/lexLoanerArrangedEmailConsumApply/lexLoanerArrangedEmailConsumApply.js
new file mode 100644
index 0000000..fc3414c
--- /dev/null
+++ b/force-app/main/default/lwc/lexLoanerArrangedEmailConsumApply/lexLoanerArrangedEmailConsumApply.js
@@ -0,0 +1,91 @@
+import { LightningElement, track, wire, api } from 'lwc';
+import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { CloseActionScreenEvent } from 'lightning/actions';
+
+import init from '@salesforce/apex/lexConsumApplyController.init';
+import approvalCheck from '@salesforce/apex/ConsumApplyWebService.approvalCheck';
+import setShipment_request from '@salesforce/apex/ConsumApplyWebService.setShipment_request';
+import getLength1 from '@salesforce/apex/lexConsumApplyController.getLength1';
+import getLength2 from '@salesforce/apex/lexConsumApplyController.getLength2';
+export default class lexLoanerArrangedEmailConsumApply extends LightningElement {
+ @api recordId;
+
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference){
+ if(currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if(urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(res=>{
+ if(res.weiAssignedCnt > 0){
+ this.showToast('鐢宠鍗曞唴瀛樺湪鏈垎閰嶇殑鑰楁潗锛岃鍒嗛厤鎴栧垎鍓茬敵璇峰崟','warning');
+ return;
+ }else if(res.consumApplyStatus == '鍙栨秷'){
+ this.showToast('瀛︿細鍙栨秷锛屼笉鍙嚭搴撴寚绀�','warning');
+ return;
+ }else if(res.consumApplyStatus == '宸插嚭搴撴寚绀�' && res.assignedNotShipment == 0){
+ this.showToast('鎵�鏈夌殑鑰楁潗澶囧搧Set涓�瑙堥兘杩涜杩囧嚭搴撴寚绀轰簡','warning');
+ return;
+ }else if(res.assignedNotShipment == 0){
+ this.showToast('娌℃湁鍙互鍑哄簱鎸囩ず鐨勬槑缁�','warning');
+ return;
+ }else{
+ approvalCheck({
+ ConsumApplyId: this.recordId
+ }).then(rs1=>{
+ if(rs1 != '1'){
+ this.showToast(rs1,'warning');
+ }else{
+ setShipment_request({
+ raid: this.recordId
+ }).then(result=>{
+ if(result == '鐘舵�佹洿鏂板埌宸插嚭搴撴寚绀�'){
+ this.showToast('鐘舵�佹洿鏂板埌宸插嚭搴撴寚绀�','success');
+ window.open('/apex/ConsumTrialPDF?id={!Consum_Apply__c.Id}');
+ return;
+ // if(res.bollowDate!= '' || res.bollowDate != null){
+ // getLength1({recordId:this.recordId}).then(result1=>{
+ // window.open('/apex/ConsumTrialPDF?id={!Consum_Apply__c.Id}');
+ // })
+ // }
+ }else{
+ this.showToast(result,'warning');
+ return;
+ }
+ })
+ }
+ })
+ }
+ })
+ }
+
+ print(){
+
+ }
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ if(type == 'success'){
+ this.updateRecordView(this.recordId);
+ }
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+
+ updateRecordView(recordId) {
+ updateRecord({fields: { Id: recordId }});
+ }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLoanerArrangedEmailConsumApply/lexLoanerArrangedEmailConsumApply.js-meta.xml b/force-app/main/default/lwc/lexLoanerArrangedEmailConsumApply/lexLoanerArrangedEmailConsumApply.js-meta.xml
new file mode 100644
index 0000000..1c77e64
--- /dev/null
+++ b/force-app/main/default/lwc/lexLoanerArrangedEmailConsumApply/lexLoanerArrangedEmailConsumApply.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexLoanerArrangedEmailConsumApply">
+ <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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.css b/force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.css
new file mode 100644
index 0000000..fbb1bbe
--- /dev/null
+++ b/force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.css
@@ -0,0 +1,11 @@
+.rentalApplyCanleButtonHolder{
+ position: relative;
+ display: inline-block;
+ width: 80px;
+ height: 80px;
+ text-align: center;
+}
+
+.container .uiContainerManager{
+ display : none !important;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.html b/force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.html
new file mode 100644
index 0000000..e9bebad
--- /dev/null
+++ b/force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.html
@@ -0,0 +1,4 @@
+<template>
+<div class="rentalApplyCanleButtonHolder" if:true={IsLoding}>
+<lightning-spinner alternative-text="Loading" size="medium"> </lightning-spinner> </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.js b/force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.js
new file mode 100644
index 0000000..0e58d9a
--- /dev/null
+++ b/force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.js
@@ -0,0 +1,32 @@
+import { LightningElement, track, wire, api } from 'lwc';
+import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+
+import init from '@salesforce/apex/LexInventoryHeaderController.init';
+export default class lexLostReportInventoryPage extends LightningElement {
+ @api recordId;
+ IsLoading = true;
+
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+
+ connectedCallback(){
+ init({
+ recordId:this.recordId
+ }).then(res=>{
+ if(res.Asset__c==null || res.Asset__c==''){
+ window.open("/apex/LostReportEditAsset?id=" + this.recordId,'height=600, width=600');
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ })
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.js-meta.xml b/force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.js-meta.xml
new file mode 100644
index 0000000..e164406
--- /dev/null
+++ b/force-app/main/default/lwc/lexLostReportInventoryPage/lexLostReportInventoryPage.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexRentalApplyCanleButton">
+ <apiVersion>54.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__AppPage</target>
+ <target>lightning__RecordPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.html b/force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.html
index 49a10f7..ba53413 100644
--- a/force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.html
+++ b/force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.html
@@ -1,5 +1,2 @@
<template>
- <div class="sisToOPDHolder" if:true={IsLoading}>
- <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
- </div>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.js b/force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.js
index 4145e2e..2a7b4aa 100644
--- a/force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.js
+++ b/force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.js
@@ -1,6 +1,5 @@
import { LightningElement, track, wire, api } from 'lwc';
import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
-import { CloseActionScreenEvent } from 'lightning/actions';
import init from '@salesforce/apex/MainFixtureSelectButtonController.init';
export default class lexMainFixtureSelect extends LightningElement {
@@ -20,14 +19,11 @@
connectedCallback(){
- init({
- recordId:this.recordId
- }).then(res=>{
- window.open("/apex/MainFixtureSelect?pt_recid=" + res, "_top");
- this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(err=>{
- console.log(err);
- this.dispatchEvent(new CloseActionScreenEvent());
- })
+ window.open("/apex/MainFixtureSelect?pt_recid=" + this.recordId, "_top");
}
+
+ closeAction() {
+ //杩斿洖褰撳墠鐨勫鍝佺敵璇�
+ window.open("/"+this.recordId,'_self');
+ }
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.js-meta.xml b/force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.js-meta.xml
index 74849f3..f655079 100644
--- a/force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.js-meta.xml
+++ b/force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.js-meta.xml
@@ -1,11 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
-<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOCMSubmit">
- <apiVersion>54.0</apiVersion>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexMainFixtureSelect">
+ <apiVersion>51.0</apiVersion>
<isExposed>true</isExposed>
<targets>
- <target>lightning__RecordPage</target>
<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">
+ <property name="recordId" type="String" label="recordId"/>
+ </targetConfig>
+ </targetConfigs>
</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewTransferApply/lexNewTransferApply.html b/force-app/main/default/lwc/lexNewTransferApply/lexNewTransferApply.html
index 49a10f7..ba53413 100644
--- a/force-app/main/default/lwc/lexNewTransferApply/lexNewTransferApply.html
+++ b/force-app/main/default/lwc/lexNewTransferApply/lexNewTransferApply.html
@@ -1,5 +1,2 @@
<template>
- <div class="sisToOPDHolder" if:true={IsLoading}>
- <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
- </div>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexReassign/lexReassign.html b/force-app/main/default/lwc/lexReassign/lexReassign.html
index 7063605..1ceb04f 100644
--- a/force-app/main/default/lwc/lexReassign/lexReassign.html
+++ b/force-app/main/default/lwc/lexReassign/lexReassign.html
@@ -2,12 +2,12 @@
<div class="holder" if:true={IsLoading}>
<lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
</div>
- <div if:false={IsLoading} class="toast">
+ <div if:true={IsDisplay} 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>
+ </button>
</div>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexReassign/lexReassign.js b/force-app/main/default/lwc/lexReassign/lexReassign.js
index 7d4e00c..0c2f8ed 100644
--- a/force-app/main/default/lwc/lexReassign/lexReassign.js
+++ b/force-app/main/default/lwc/lexReassign/lexReassign.js
@@ -6,14 +6,16 @@
//鍙幏鍙栧綋鍓峫ist閫変腑鐨勪竴瑙圛d
@api rentalApplySetIds;
IsLoading=true;
+ IsDisplay=true;
//鎻愮ず淇℃伅
msg;
connectedCallback(){
console.log(this.recordId);
console.log(JSON.stringify(this.rentalApplySetIds));
- // if(this.rentalApplySetIds.length<1){
- if (this.recordId && JSON.stringify(this.rentalApplySetIds)) {
+ this.IsLoading=false;
+ if (this.recordId && this.rentalApplySetIds) {
+ this.IsDisplay = false;
LightningConfirm.open({
message: '浣犵‘瀹氳閲嶆柊鍒嗛厤鍚�?',
variant: 'headerless',
@@ -23,7 +25,8 @@
rentalApplyEquipmentSetReassign({
raesID: this.rentalApplySetIds[0]
}).then(result=>{
- if(result == '1'){
+ this.IsDisplay = true;
+ if(result == '1'){
this.msg = "宸查噸鏂板垎閰�";
this.closeAction();
}else{
@@ -31,6 +34,9 @@
return;
}
})
+ }else{
+ this.closeAction();
+ return;
}
})
}else{
diff --git a/force-app/main/default/lwc/lexRentalApplyFaultReport/lexRentalApplyFaultReport.html b/force-app/main/default/lwc/lexRentalApplyFaultReport/lexRentalApplyFaultReport.html
new file mode 100644
index 0000000..cd7e839
--- /dev/null
+++ b/force-app/main/default/lwc/lexRentalApplyFaultReport/lexRentalApplyFaultReport.html
@@ -0,0 +1,52 @@
+<!--
+ * @Description: 澶囧搧妫�娴嬪垎鏋愭姤鍛�
+ * @Author: [lijinhuan]
+ * @Date: 2023-06-25 17:32:18
+ * @LastEditors: [lijinhuan]
+ * @LastEditTime: 2023-07-05 19:31:34
+-->
+<template>
+ <article class="slds-card" if:false={IsLoading} >
+ <!-- 鏍峰紡澶� -->
+ <div class="slds-card__header slds-grid" >
+ <header class="slds-media slds-media_center slds-has-flexi-truncate">
+ <div class="slds-media__body">
+ <h2 class="slds-card__header-title">
+ <!-- <a href="#" class="slds-card__header-link slds-truncate" title="澶囧搧妫�娴嬪垎鏋愭姤鍛�"> -->
+ <span>澶囧搧妫�娴嬪垎鏋愭姤鍛�</span>
+ <!-- </a> -->
+ </h2>
+ </div>
+ </header>
+ </div>
+ <!-- 鏍峰紡澶� -->
+ <div class="slds-card__body slds-card__body_inner" >
+ <div >
+ <!-- 鐢宠No.-->
+ <label class="slds-form-element__label" style="width:23%;text-align:right; margin-left: 20px;"> 鐢宠No.:</label>
+ <div class="slds-form-element__control" style="width:23%; text-align:left;display: inline-block;">{RentalApplyName}</div>
+ <!-- 澶囧搧鍑哄�熸媴褰� -->
+ <label class="slds-form-element__label" style="width:23%;text-align:right;margin-left: 15px;">澶囧搧鍑哄�熸媴褰�:</label>
+ <div class="slds-form-element__control" style="width:23%; text-align:left;display: inline-block;">{PersonInCharge}</div>
+ <!-- 鐢宠鑰呭姙浜嬪 -->
+ <label class="slds-form-element__label" style="width:23%;text-align:right; margin-left: 20px;"> 鐢宠No.:</label>
+ <div class="slds-form-element__control" style="width:23%; text-align:left;display: inline-block;">{WorkPlace}</div>
+ <!-- 浣跨敤鐩殑2 -->
+ <label class="slds-form-element__label" style="width:23%;text-align:right;margin-left: 15px;">浣跨敤鐩殑2:</label>
+ <div class="slds-form-element__control" style="width:23%; text-align:left;display: inline-block;">{DemoPurpose2}</div>
+ </div>
+ </div>
+ </article>
+ <div if:false={IsLoading} class="toast" style="width: 100%">
+ <div>
+ <template if:true={datas}>
+ <lightning-datatable key-field="Id" data={datas} columns={columns} hide-checkbox-column="true"
+ hide-row-number-column="true" onrowaction={callRowAction}>
+ </lightning-datatable>
+ </template>
+ <template if:true={error}>
+ {error}>
+ </template>
+ </div>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRentalApplyFaultReport/lexRentalApplyFaultReport.js b/force-app/main/default/lwc/lexRentalApplyFaultReport/lexRentalApplyFaultReport.js
new file mode 100644
index 0000000..9389d67
--- /dev/null
+++ b/force-app/main/default/lwc/lexRentalApplyFaultReport/lexRentalApplyFaultReport.js
@@ -0,0 +1,180 @@
+/*
+ * @Description: 澶囧搧妫�娴嬪垎鏋愭姤鍛�
+ * @Author: [lijinhuan]
+ * @Date: 2023-06-25 17:32:18
+ * @LastEditors: [lijinhuan]
+ * @LastEditTime: 2023-07-06 16:04:00
+ */
+import { LightningElement, track, wire, api } from 'lwc';
+import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import { CloseActionScreenEvent } from 'lightning/actions';
+
+import init from '@salesforce/apex/lexRentalApplyFaultReportController.init';
+
+const columns = [
+ { label: 'No.', fieldName: 'Name',type: 'text'},
+ { label: '澶囧搧閰嶅鏄庣粏鍨嬪彿', fieldName: 'Fixture_Model_No__c',type: 'text' },
+ { label: '鍥哄畾璧勪骇鍙风爜', fieldName: 'Loaner_asset_no__c',type: 'text' },
+ { label: '鏈鸿韩缂栫爜', fieldName: 'SerialNumber_F__c',type: 'text'},
+ { label: '鎴樼暐绉戝鍒嗙被', fieldName: 'OCMdeptCategory',type: 'text' },
+ { label: '鍖婚櫌', fieldName: 'Hospital',type: 'text' },
+ { label: '妫�娴嬬粨鏋�', fieldName: 'Inspection_result_after__c',type: 'text'},
+ { label: '妫�娴婲G鍖哄垎', fieldName: 'Inspection_result_after_NG__c',type: 'text'},
+ {
+ type: "button", label: '鏁呴殰鎶ュ憡', initialWidth: 130, typeAttributes: {
+ label: '鏁呴殰鎶ュ憡',
+ name: 'View',
+ title: '鏁呴殰鎶ュ憡',
+ disabled: false,
+ value: 'RentalApplyFault',
+ iconPosition: 'left',
+ iconName:'utility:preview',
+ variant:'Brand'
+ }
+ },
+
+];
+export default class LexRentalApplyFaultReport extends NavigationMixin(LightningElement) {
+ @api recordId;
+ IsLoading = true;
+ datas = [];
+ columns = columns;
+ selectedRas = [];
+ RentalApplyName;
+ PersonInCharge;
+ WorkPlace;
+ DemoPurpose2;
+ @track error;
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference){
+ if(currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if(urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(result=>{
+ if(JSON.stringify(result)!= '' && result.length>0){
+ this.IsLoading = false;
+ this.records = result;
+ let resultList = [];
+ let objectTemp;
+
+ result.forEach(item => {
+ this.RentalApplyName = item.rae.Rental_Apply__r.Name;
+ this.PersonInCharge = item.rae.Rental_Apply__r.Person_In_Charge__r.Name;
+ this.WorkPlace = item.rae.Rental_Apply__r.WorkPlace__c;
+ this.DemoPurpose2 = item.rae.Rental_Apply__r.demo_purpose2__c;
+ // console.log(item);
+ objectTemp = item.rae;
+ objectTemp.OCMdeptCategory = item.rae.Rental_Apply__r.OCM_dept_category__c;
+ objectTemp.Hospital = item.rae.Rental_Apply__r.Hospital__r.Name;
+ // objectTemp.RentalApplyFault = '<a href="/'+item.faultId+'" >鐐瑰嚮鏌ョ湅</a>';
+ objectTemp.RentalApplyFault = item.faultId;
+ //console.log(JSON.stringify(objectTemp));
+ resultList.push(objectTemp);
+ });
+ this.datas = resultList;
+ }else{
+ // this.dispatchEvent(new CloseActionScreenEvent());
+ this.showToast('娌℃湁鍥炴敹妫�娴婲G鐨勪竴瑙�','warning');
+ this.updateRecordView(this.recordId);
+ return;
+ }
+ }).catch(err=>{
+ console.log("error:");
+ console.log(err);
+ this.error = err;
+ }).finally(()=>{
+
+ });
+ }
+
+
+ callRowAction(event) {
+ const rec = event.detail.row;
+ const actionName = event.detail.action.name;
+ // console.log(actionName);
+ if (actionName === 'View') {
+ console.log(rec.RentalApplyFault);
+ const recordId = rec.RentalApplyFault;
+ // this.handleAction(rec, 'view');
+ if(recordId != null && recordId !=''){
+ this[NavigationMixin.Navigate]({
+ type: 'standard__recordPage',
+ attributes: {
+ recordId: recordId,
+ objectApiName: 'Rental_Apply_Fault__c',
+ actionName: 'view'
+ }
+ })
+ // window.open("/"+faultId);
+ }else{
+ console.log('zheli00');
+ console.log('C:',rec);
+ // 鏂板缓璺宠浆
+ // window.open("/a5C/e?
+ // Name=*"
+ // + "&CF00N10000009I5UX_lKid=" + radetailId
+ // + "&CF00N10000009I5UX=" + radetailName
+ // + "&CF00N10000009I5UV_lKid=" + personId
+ // + "&CF00N10000009I5UV=" + personName
+ // + "&00N10000009I5Uh=" + purpose2
+ // + "&00N10000009I5UW=" + name
+ // + "&00N10000009I6jv=" + hospitalName
+ // + "&00N10000009I5Ua=" + serialNumber
+ // + "&00N10000009I5UP=" + fixtureNo
+ // + "&00N10000009I5Uf=" + workPlace
+ // + "&00N10000009I5UU=" + deptCategory);
+ let defaultFieldValues = {};
+ // console.log('zheli01');
+ defaultFieldValues['Name'] = '*';
+ defaultFieldValues['Rental_Apply_Equipment_Set_Detail__c'] = rec.Id;
+ defaultFieldValues['Person_In_Charge_User__c']= rec.Rental_Apply__r.Person_In_Charge__c;
+ defaultFieldValues['demo_purpose2__c']= rec.Rental_Apply__r.demo_purpose2__c;
+ defaultFieldValues['RentalApplyNo__c']= rec.Rental_Apply__r.Name;
+ defaultFieldValues['HospitalText__c']= rec.Hospital;
+ defaultFieldValues['Repair_product_body_number__c']= rec.SerialNumber_F__c;
+ defaultFieldValues['Fixture_Model_No__c']= rec.Fixture_Model_No__c;
+ defaultFieldValues['WorkPlace__c']= rec.Rental_Apply__r.WorkPlace__c;
+ defaultFieldValues['OCM_dept_category__c']= rec.OCMdeptCategory;
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'Rental_Apply_Fault__c',
+ actionName: 'new'
+ },
+ state: {
+ nooverride: '1',
+ defaultFieldValues: encodeDefaultFieldValues(defaultFieldValues)
+ }
+ });
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }
+ }
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ if(type == 'success'){
+ this.updateRecordView(this.recordId);
+ }
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+
+ updateRecordView(recordId) {
+ updateRecord({fields: { Id: recordId }});
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRentalApplyFaultReport/lexRentalApplyFaultReport.js-meta.xml b/force-app/main/default/lwc/lexRentalApplyFaultReport/lexRentalApplyFaultReport.js-meta.xml
new file mode 100644
index 0000000..18324e5
--- /dev/null
+++ b/force-app/main/default/lwc/lexRentalApplyFaultReport/lexRentalApplyFaultReport.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__RecordPage</target>
+ <target>lightning__AppPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.css b/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.css
index af18c76..95c1c55 100644
--- a/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.css
+++ b/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.css
@@ -1,4 +1,4 @@
-.Holder{
+.holder{
position: relative;
display: inline-block;
width: 80px;
@@ -8,4 +8,15 @@
.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;
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.html b/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.html
index 960b41d..7063605 100644
--- a/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.html
+++ b/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.html
@@ -1,5 +1,13 @@
<template>
- <div class="Holder" if:true={IsLoading}>
- <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
- </div>
+ <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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.js b/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.js
index 70a5d7d..38786e0 100644
--- a/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.js
+++ b/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.js
@@ -11,12 +11,14 @@
@api recordId;
id;
+ @api rentalApplyIds;
RentalApplyId;
- Status;
+ //鎻愮ず淇℃伅
+ msg;
IsLoading=true;
+
@wire(CurrentPageReference)
getStateParameters(currentPageReference){
- alert("杩涘叆椤甸潰")
console.log("杩涘叆椤甸潰");
console.log(currentPageReference);
if(currentPageReference){
@@ -35,11 +37,9 @@
connectedCallback(){
console.log(this.recordId);
init({recordId:this.recordId}).then(result=>{
- console.log(result);
if(result!=null){
this.id=result.id;
this.RentalApplyId=result.RentalApplyId;
- this.Status=result.Status;
this.cancelSubmit().then(res=>{
this.IsLoading=false;
this.dispatchEvent(new CloseActionScreenEvent());
@@ -57,56 +57,63 @@
async cancelSubmit(){
// 鍙垎閰嶄唬鏇垮搧鍓嶆彁1 -- 澶囧搧鍊熷嚭鐢宠鐨勭姸鎬侊細鈥滃凡鎵瑰噯鈥濆埌鈥滃凡鍑哄簱鎸囩ず鈥�
- var userIdArr = ['00510000001O6HoAAK','00510000001O6I2AAK','00510000000gW9pAAE','00510000000gW9BAAU','00510000008pVbWAAU','00510000001OOMjAAO','00510000005sEEMAA2','00510000004pNOtAAM','00510000005QJ2eAAG','00510000007iCmcAAE','00510000006kIg8AAE','00510000004rbkzAAA','00510000003LMHuAAO','00510000000gW92AAE'];
+ var userIdArr = ['00510000001O6HoAAK','00510000001O6I2AAK','00510000000gW9pAAE','00510000000gW9BAAU','00510000008pVbWAAU','00510000001OOMjAAO',
+ '00510000005sEEMAA2','00510000004pNOtAAM','00510000005QJ2eAAG','00510000007iCmcAAE','00510000006kIg8AAE','00510000004rbkzAAA','00510000003LMHuAAO',
+ '00510000000gW92AAE'];
//褰撳墠鐢ㄦ埛鐧诲綍id
var userId;
await getUserId().then(res=>{
userId=res;
- });
- console.log(userId);
+ })
+ .catch(err=>{
+ console.log("getUserIderr==="+err);
+ })
+ //TODO====
+ userId = '00510000001O6HoAAK';
+ console.log("userId==="+userId);
if(userIdArr.indexOf(userId)== -1){
- // alert('瀵逛笉璧蜂綘娌℃湁姝ゆ搷浣滅殑鏉冮檺锛�');
- const event = new ShowToastEvent({
- title: '鎻愮ず淇℃伅',
- message:'瀵逛笉璧蜂綘娌℃湁姝ゆ搷浣滅殑鏉冮檺锛�'
- });
- this.dispatchEvent(event);
+ this.msg = '瀵逛笉璧蜂綘娌℃湁姝ゆ搷浣滅殑鏉冮檺锛�';
+ this.IsLoading = false;
+ return;
} else {
- console.log(userId);
- let raid = this.RentalApplyId;
- console.log("hh1");
- await selectRentalApplyEquipmentSetByRACID({recordId:this.RentalApplyId}).then(res=>{
- console.log(res);
- if (res==null||res.length==0) {
- // alert("鏌ヨ缁撴灉涓虹┖");
- const event = new ShowToastEvent({
- title: '鎻愮ず淇℃伅',
- message:"鏌ヨ缁撴灉涓虹┖"
- });
- this.dispatchEvent(event);
- return;
- }
- var allRecords = res;
- var validSize= allRecords.length;
- var canJump = false;
- for(i=0;i<validSize;i++){
- if(allRecords[i].Allow_Adjust_Queue_Flag__c == true){
- canJump = true;
- break;
+ console.log('this.rentalApplyIds=='+this.rentalApplyIds);
+ if(this.rentalApplyIds == undefined || this.rentalApplyIds.length<1){
+ this.msg = '璇烽�夋嫨鍊熷嚭澶囧搧涓�瑙堣褰�';
+ this.IsLoading = false;
+ return;
+ }else{
+ let raid = this.RentalApplyId;
+ await selectRentalApplyEquipmentSetByRACID({recordId:this.recordId}).then(res=>{
+ console.log('selectRentalApplyEquipmentSetByRACID=='+JSON.stringify(res));
+
+ var allRecords = res;
+ var validSize= allRecords.length;
+ var canJump = false;
+ for(var i=0;i<validSize;i++){
+ if(allRecords[i].Allow_Adjust_Queue_Flag__c == true){
+ canJump = true;
+ break;
+ }
}
- }
- if(canJump == true){
- // alert("閫夋嫨鍊熷嚭澶囧搧涓�瑙堣褰曟湁宸茬粡鍏佽鎻掗槦鐨勶紝璇烽�夋嫨鏈厑璁哥殑涓�瑙�");
- const event = new ShowToastEvent({
- title: '鎻愮ず淇℃伅',
- message:"閫夋嫨鍊熷嚭澶囧搧涓�瑙堣褰曟湁宸茬粡鍏佽鎻掗槦鐨勶紝璇烽�夋嫨鏈厑璁哥殑涓�瑙�"
- });
- this.dispatchEvent(event);
- }else{
- let records=[this.recordId];
- window.open("/apex/RentalApplyJump?objId="+this.RentalApplyId+"&raesIds="+records, 'RentalApplyJump', 'width=700,height=300');
- }
- });
+ if(canJump == true){
+ this.msg = '閫夋嫨鍊熷嚭澶囧搧涓�瑙堣褰曟湁宸茬粡鍏佽鎻掗槦鐨勶紝璇烽�夋嫨鏈厑璁哥殑涓�瑙�';
+ this.IsLoading = false;
+ return;
+ }else{
+ let records=[this.recordId];
+ window.open("/apex/RentalApplyJump?objId="+this.recordId+"&raesIds="+ this.rentalApplyIds, 'RentalApplyJump', 'width=700,height=300');
+ this.closeAction();
+ }
+ })
+ .catch(error=>{
+ console.log('selectRentalApplyEquipmentSetByRACIDerr==='+error);
+ })
+ }
}
}
+
+ closeAction() {
+ //杩斿洖褰撳墠鐨勫鍝佺敵璇�
+ window.open("/"+this.recordId,'_self');
+ }
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.js-meta.xml b/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.js-meta.xml
index d96b725..9b51894 100644
--- a/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.js-meta.xml
+++ b/force-app/main/default/lwc/lexRentalApplyJump/lexRentalApplyJump.js-meta.xml
@@ -7,5 +7,12 @@
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
<target>lightning__RecordAction</target>
+ <target>lightning__FlowScreen</target>
</targets>
+ <targetConfigs>
+ <targetConfig targets="lightning__FlowScreen">
+ <property name="recordId" type="String" label="recordId"/>
+ <property name="rentalApplyIds" type="String[]" label="rentalApplyIds"/>
+ </targetConfig>
+ </targetConfigs>
</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.html b/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.html
index 7063605..d2c3546 100644
--- a/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.html
+++ b/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.html
@@ -2,7 +2,7 @@
<div class="holder" if:true={IsLoading}>
<lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
</div>
- <div if:false={IsLoading} class="toast">
+ <div if:true={IsShow} 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"
diff --git a/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.js b/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.js
index 3c2f3ba..6127b72 100644
--- a/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.js
+++ b/force-app/main/default/lwc/lexRentalFixtureSetAssign/lexRentalFixtureSetAssign.js
@@ -6,6 +6,9 @@
export default class lexRentalFixtureSetAssign extends LightningElement {
@api recordId
msg;
+ IsLoading = true;
+ IsShow = false;
+
@wire(CurrentPageReference)
getStateParameters(currentPageReference){
console.log("杩涘叆椤甸潰");
@@ -22,19 +25,20 @@
init({
recordId:this.recordId
}).then(result =>{
- console.log(this.recordId);
- console.log(result);
+ this.IsLoading = false;
let res = result.ra;
console.log("res==="+JSON.stringify(res));
if(res.Campaign__c != '' || res.Campaign__c != undefined){
if(res.CampaignStatus == '鍙栨秷'){
+ this.IsShow = true;
this.msg = '瀛︿細鍙栨秷锛屼笉鍙垎閰�';
return;
}
}
-
if(res.Repair__c != '' || res.Repair__c != undefined){
- if(res.Repair_Final_Inspection_Date_F__c != null && res.Repair_Final_Inspection_Date_F__c !='' || (res.RC_return_to_office__c!=null && res.RC_return_to_office__c != '')){
+ if(res.Repair_Final_Inspection_Date_F__c != null && res.Repair_Final_Inspection_Date_F__c !='' ||
+ (res.RC_return_to_office__c!=null && res.RC_return_to_office__c != '')){
+ this.IsShow = true;
this.msg = '淇悊鏈夋渶缁堟娴嬫棩鎴栦慨鐞嗗搧杩旈�佹棩锛屼笉鍙垎閰�';
return;
}
@@ -46,16 +50,22 @@
if(res.Status__c == '鍙栨秷' && res.Rental_Apply_Equipment_Set_Cnt__c != 0){
window.open("/apex/RentalFixtureSetAssign?pt_recid=" + this.recordId);
this.closeAction();
- }else if((res.demo_purpose2__c == '瀛︿細灞曚細' || res.demo_purpose2__c == '璇鹃鐮旂┒' || res.demo_purpose2__c == '鍩硅涓績')&& res.Status__c == '鑽夋涓�'){
+ }else if((res.demo_purpose2__c == '瀛︿細灞曚細' || res.demo_purpose2__c == '璇鹃鐮旂┒' || res.demo_purpose2__c == '鍩硅涓績')
+ && res.Status__c == '鑽夋涓�'){
+ this.IsShow = true;
this.msg = "涓嶈兘鍒嗛厤锛岃纭鐢宠鐨勭姸鎬�";
return
- }else if((res.demo_purpose2__c =='璇曠敤锛堟棤璇环锛�' || res.demo_purpose2__c == '璇曠敤锛堟湁璇环锛�' || res.demo_purpose2__c =='鍔ㄧ墿瀹為獙' || res.demo_purpose2__c == '涓�鑸淮淇唬鐢�' || res.demo_purpose2__c== '淇濅慨鍚堝悓鐢ㄦ埛缁翠慨浠g敤' || res.demo_purpose2__c == '宸茶喘寰呰揣') && res.Status__c != '宸叉壒鍑�' && res.Status__c != '宸插嚭搴撴寚绀�'){
+ }else if((res.demo_purpose2__c =='璇曠敤锛堟棤璇环锛�' || res.demo_purpose2__c == '璇曠敤锛堟湁璇环锛�' || res.demo_purpose2__c =='鍔ㄧ墿瀹為獙'
+ || res.demo_purpose2__c == '涓�鑸淮淇唬鐢�' || res.demo_purpose2__c== '淇濅慨鍚堝悓鐢ㄦ埛缁翠慨浠g敤' || res.demo_purpose2__c == '宸茶喘寰呰揣')
+ && res.Status__c != '宸叉壒鍑�' && res.Status__c != '宸插嚭搴撴寚绀�'){
+ this.IsShow = true;
this.msg = "涓嶈兘鍒嗛厤锛岃纭鐢宠鐨勭姸鎬�";
return;
}else if(resultMsg == 'Fin'){
window.open("/apex/RentalFixtureSetAssign?pt_recid=" + this.recordId);
this.closeAction();
}else{
+ this.IsShow = true;
this.msg = resultMsg;
return;
}
diff --git a/force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.html b/force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.html
index 7063605..1049d48 100644
--- a/force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.html
+++ b/force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.html
@@ -2,7 +2,7 @@
<div class="holder" if:true={IsLoading}>
<lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
</div>
- <div if:false={IsLoading} class="toast">
+ <div if:true={isShow} 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"
diff --git a/force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.js b/force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.js
index 8ccac30..67d459e 100644
--- a/force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.js
+++ b/force-app/main/default/lwc/lexRentalFixtureSetAssignAgency/lexRentalFixtureSetAssignAgency.js
@@ -5,22 +5,28 @@
export default class lexRentalFixtureSetAssignAgency extends LightningElement {
@api recordId
msg;
+ IsLoading = true;
+ isShow = false;
connectedCallback(){
init({
recordId: this.recordId
}).then(result=>{
+ this.IsLoading = false;
let res = result.ra;
console.log(res);
if(res.Campaign__c != '' || res.Campaign__c != undefined){
if(res.CampaignStatus == '鍙栨秷'){
+ this.isShow = true;
this.msg = '瀛︿細鍙栨秷锛屼笉鍙垎閰�';
return;
}
}
- if(res.Repair__c != ''){
- if(res.Repair_Final_Inspection_Date_F__c != null && res.Repair_Final_Inspection_Date_F__c !='' || (res.RC_return_to_office__c!=null && res.RC_return_to_office__c != '')){
+ if(res.Repair__c != '' || res.Repair__c != undefined){
+ if(res.Repair_Final_Inspection_Date_F__c != null && res.Repair_Final_Inspection_Date_F__c !=''
+ || (res.RC_return_to_office__c!=null && res.RC_return_to_office__c != '')){
+ this.isShow = true;
this.msg = '淇悊鏈夋渶缁堟娴嬫棩鎴栦慨鐞嗗搧杩旈�佹棩锛屼笉鍙垎閰�';
return;
}
@@ -33,9 +39,13 @@
window.open("/apex/RentalFixtureSetAssignAgency?pt_recid=" + this.recordId);
this.closeAction();
}else if((res.demo_purpose2__c == '瀛︿細灞曚細' || res.demo_purpose2__c == '璇鹃鐮旂┒' || res.demo_purpose2__c == '鍩硅涓績')&& res.Status__c == '鑽夋涓�'){
+ this.isShow = true;
this.msg = "涓嶈兘鍒嗛厤锛岃纭鐢宠鐨勭姸鎬�";
return
- }else if((res.demo_purpose2__c =='璇曠敤锛堟棤璇环锛�' || res.demo_purpose2__c == '璇曠敤锛堟湁璇环锛�' || res.demo_purpose2__c =='鍔ㄧ墿瀹為獙' || res.demo_purpose2__c == '涓�鑸淮淇唬鐢�' || res.demo_purpose2__c== '淇濅慨鍚堝悓鐢ㄦ埛缁翠慨浠g敤' || res.demo_purpose2__c == '宸茶喘寰呰揣') && res.Status__c != '宸叉壒鍑�' && res.Status__c != '宸插嚭搴撴寚绀�'){
+ }else if((res.demo_purpose2__c =='璇曠敤锛堟棤璇环锛�' || res.demo_purpose2__c == '璇曠敤锛堟湁璇环锛�' || res.demo_purpose2__c =='鍔ㄧ墿瀹為獙' ||
+ res.demo_purpose2__c == '涓�鑸淮淇唬鐢�' || res.demo_purpose2__c== '淇濅慨鍚堝悓鐢ㄦ埛缁翠慨浠g敤' || res.demo_purpose2__c == '宸茶喘寰呰揣')
+ && res.Status__c != '宸叉壒鍑�' && res.Status__c != '宸插嚭搴撴寚绀�'){
+ this.isShow = true;
this.msg = "涓嶈兘鍒嗛厤锛岃纭鐢宠鐨勭姸鎬�";
return;
}else if(resultMsg == 'Fin'){
@@ -43,6 +53,7 @@
this.closeAction();
return;
}else{
+ this.isShow = true;
this.msg = resultMsg;
return;
}
diff --git a/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.html b/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.html
index 49a10f7..ba53413 100644
--- a/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.html
+++ b/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.html
@@ -1,5 +1,2 @@
<template>
- <div class="sisToOPDHolder" if:true={IsLoading}>
- <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
- </div>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.html b/force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.html
new file mode 100644
index 0000000..af9fa97
--- /dev/null
+++ b/force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.html
@@ -0,0 +1,3 @@
+<template>
+
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.js b/force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.js
new file mode 100644
index 0000000..e2bf008
--- /dev/null
+++ b/force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.js
@@ -0,0 +1,50 @@
+import { LightningElement, track, wire, api } from 'lwc';
+import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init from '@salesforce/apex/lexReturnDeliveryController.init';
+
+export default class lexReturnDeliverySlipConsumApply extends LightningElement {
+ @api recordId;
+
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference){
+ if(currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if(urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(res=>{
+ if(!res.flag){
+ this.showToast('鏈畬鎴愬埌璐х‘璁ゆ垨澶囧搧涓績鏈‘璁や笉鑳戒笂浼犺瘯鐢ㄨ〃','warning');
+ return;
+ }
+ if(res.size > 0){
+ window.open("/apex/consumTrialConfirm?id=" + this.recordId);
+ }
+ })
+ }
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ if(type == 'success'){
+ this.updateRecordView(this.recordId);
+ }
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+
+ updateRecordView(recordId) {
+ updateRecord({fields: { Id: recordId }});
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.js-meta.xml b/force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.js-meta.xml
new file mode 100644
index 0000000..e76c6b2
--- /dev/null
+++ b/force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexReturnDeliverySlipConsumApply">
+ <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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.html b/force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.html
index 7063605..d2c3546 100644
--- a/force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.html
+++ b/force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.html
@@ -2,7 +2,7 @@
<div class="holder" if:true={IsLoading}>
<lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
</div>
- <div if:false={IsLoading} class="toast">
+ <div if:true={IsShow} 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"
diff --git a/force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.js b/force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.js
index ca3687a..37846be 100644
--- a/force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.js
+++ b/force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.js
@@ -3,12 +3,14 @@
import { CloseActionScreenEvent } from 'lightning/actions';
import init from '@salesforce/apex/SelectSubstituteControllerLWT.initFromSelectSubstituteButton';
import selectRentalApplyEquipmentSetByID from '@salesforce/apex/SelectSubstituteControllerLWT.selectRentalApplyEquipmentSetByID';
+import selectRentalApplyCByName from '@salesforce/apex/SelectSubstituteControllerLWT.selectRentalApplyCByName';
export default class selectSubstituteLWC extends LightningElement {
@api recordId;
id;
IsLoading=true;
+ IsShow=false;
@api rentalApplyEquipmentSetIds;
msg;
@@ -28,26 +30,33 @@
init({
recordId:this.recordId,
}).then(result=>{
+ console.log('rentalApplyEquipmentSetIds'+this.rentalApplyEquipmentSetIds);
this.IsLoading = false;
- if(this.rentalApplyEquipmentSetIds.length<1){
+ if(this.rentalApplyEquipmentSetIds == undefined || this.rentalApplyEquipmentSetIds.length<1){
+ this.IsShow = true;
this.msg = "璇烽�夋嫨涓�鏉″�熷嚭澶囧搧涓�瑙堣褰�";
return;
}else if(this.rentalApplyEquipmentSetIds.length>1){
+ this.IsShow = true;
this.msg = "鍙兘閫夋嫨涓�鏉¤褰�";
return;
}else{
selectRentalApplyEquipmentSetByID({
recordId: this.rentalApplyEquipmentSetIds[0]
}).then(res=>{
- console.log(res);
- if(res.RAES_Status__c !='宸叉壒鍑�' && res.RAES_Status__c!= '宸插嚭搴撴寚绀�'){
+ result.Status = '宸叉壒鍑�';
+ res.RAES_Status__c = '宸叉壒鍑�';
+ if(result.Status !='宸叉壒鍑�' && result.Status!= '宸插嚭搴撴寚绀�'){
+ this.IsShow = true;
this.msg = '鐢宠涔︾姸鎬佷笉绗﹀悎鍒嗛厤浠f浛鍝佹潯浠讹紝璇风‘璁ょ敵璇风殑鐘舵��';
return;
}else{
if(res.RAES_Status__c == '鑽夋涓�' || res.RAES_Status__c == '鐢宠涓�' || res.Shippment_loaner_time2__c != null){
+ this.IsShow = true;
this.msg = "涓�瑙堢殑鐘舵�佷笉绗﹀悎鍒嗛厤鏇夸唬鍝佹潯浠�";
return;
}else if(res.Irreplaceable_flag__c == true){
+ this.IsShow = true;
this.msg = "鐢宠浜哄嬀閫変簡浠f浛鍝佷笉鍙�";
return;
}else{
@@ -55,7 +64,7 @@
this.closeAction();
}
}
- })
+ })
}
}).catch(err=>{
console.log("error:"+err);
@@ -64,7 +73,6 @@
closeAction() {
//杩斿洖褰撳墠鐨勫鍝佺敵璇�
- console.log(window.url);
window.open("/"+this.recordId,'_self');
}
diff --git a/force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.js-meta.xml b/force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.js-meta.xml
index b87fe03..66d128c 100644
--- a/force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.js-meta.xml
+++ b/force-app/main/default/lwc/lexSelectSubstitute/lexSelectSubstitute.js-meta.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexRentalFixtureSetAssign">
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSelectSubstitute">
<apiVersion>51.0</apiVersion>
<isExposed>true</isExposed>
<targets>
diff --git a/force-app/main/default/lwc/lexSendReport/lexSendReport.css b/force-app/main/default/lwc/lexSendReport/lexSendReport.css
new file mode 100644
index 0000000..635bc6c
--- /dev/null
+++ b/force-app/main/default/lwc/lexSendReport/lexSendReport.css
@@ -0,0 +1,22 @@
+.outerBorderCss{
+ border: 1px solid #D4D4D4;
+ border-radius : 5px;
+ border-top : 3px solid #565959;
+}
+.borderCss{
+ border: 1px solid #D4D4D4;
+ border-radius : 5px;
+ margin-bottom : 7px;
+ border-top : 3px solid #565959;
+}
+.headerDorderCss{
+ border-top: 1px solid #565959;
+ border-bottom: 1px solid #D4D4D4;
+ padding:3px;
+}
+.centerCss{
+ text-align: center;
+}
+.centerCss .left{
+ margin-left: 100px;
+}/* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSendReport/lexSendReport.html b/force-app/main/default/lwc/lexSendReport/lexSendReport.html
new file mode 100644
index 0000000..ba53413
--- /dev/null
+++ b/force-app/main/default/lwc/lexSendReport/lexSendReport.html
@@ -0,0 +1,2 @@
+<template>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSendReport/lexSendReport.js b/force-app/main/default/lwc/lexSendReport/lexSendReport.js
new file mode 100644
index 0000000..bb442ab
--- /dev/null
+++ b/force-app/main/default/lwc/lexSendReport/lexSendReport.js
@@ -0,0 +1,66 @@
+import { LightningElement, track, wire, api } from 'lwc';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { CurrentPageReference } from 'lightning/navigation';
+
+import init from '@salesforce/apex/RentalApplyFaultController.init';
+import updateRentalApplyFaultStatus from '@salesforce/apex/RentalApplyFaultController.updateRentalApplyFaultStatus';
+export default class lexSendReport extends LightningElement {
+
+ @api recordId;
+ IsLoading = true;
+
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference){
+ if(currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if(urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(res=>{
+ console.log('res==='+JSON.stringify(res));
+ if(res.status__c!='鑽夋涓�' && res.status__c!=''){
+ this.showToast('鍙湁鑽夋涓殑妫�娴嬪垎鏋愭姤鍛婃墠鑳藉彂閫佹姤鍛�','warning');
+ return;
+ }
+
+ updateRentalApplyFaultStatus({
+ recordId: this.recordId,
+ updateStatus: '宸插彂閫�'
+ }).then(result=>{
+ console.log('result==='+result);
+ if(result=='SUCCESS'){
+ this.showToast('鎶ュ憡宸插彂閫�','success');
+ }else{
+ this.showToast(res.getMessage(),'error');
+ }
+ })
+ }).catch(err=>{
+ console.log('init=='+err);
+ })
+ }
+
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ if(type == 'success'){
+ this.updateRecordView();
+ }
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+
+ updateRecordView(recordId) {
+ updateRecord({fields: { Id: recordId }});
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSendReport/lexSendReport.js-meta.xml b/force-app/main/default/lwc/lexSendReport/lexSendReport.js-meta.xml
new file mode 100644
index 0000000..e1f65e1
--- /dev/null
+++ b/force-app/main/default/lwc/lexSendReport/lexSendReport.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSendReport">
+ <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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSubmitExtensionApprovalProcess/lexSubmitExtensionApprovalProcess.html b/force-app/main/default/lwc/lexSubmitExtensionApprovalProcess/lexSubmitExtensionApprovalProcess.html
index 3eff9e8..ba53413 100644
--- a/force-app/main/default/lwc/lexSubmitExtensionApprovalProcess/lexSubmitExtensionApprovalProcess.html
+++ b/force-app/main/default/lwc/lexSubmitExtensionApprovalProcess/lexSubmitExtensionApprovalProcess.html
@@ -1,5 +1,2 @@
<template>
- <div class="EquipmentRentalPDF" if:true={IsLoading}>
- <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
- </div>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.html b/force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.html
index 49a10f7..ba53413 100644
--- a/force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.html
+++ b/force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.html
@@ -1,5 +1,2 @@
<template>
- <div class="sisToOPDHolder" if:true={IsLoading}>
- <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
- </div>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.js b/force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.js
index ca3dd20..1bb49d6 100644
--- a/force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.js
+++ b/force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.js
@@ -3,6 +3,7 @@
import { CloseActionScreenEvent } from 'lightning/actions';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { updateRecord } from 'lightning/uiRecordApi';
import queueTop from '@salesforce/apex/ApplyJsCtl.queueTop';
export default class lexTopInQueue extends LightningElement {
@@ -25,25 +26,32 @@
queueTop({
applyId: this.recordId
}).then(res=>{
+ this.IsLoading = false;
if(res == 'Success'){
- const evt = new ShowToastEvent({
- title : '缃《鎴愬姛',
- message: '',
- variant: 'success'
- });
- this.dispatchEvent(evt);
- this.dispatchEvent(new CloseActionScreenEvent());
+ this.showToast('缃《鎴愬姛','success');
+ return;
}else{
- const evterr = new ShowToastEvent({
- title : res,
- message: '',
- variant: 'error'
- });
- this.dispatchEvent(evterr);
- this.dispatchEvent(new CloseActionScreenEvent());
+ this.showToast(res,'error');
+ return;
}
}).catch(err=>{
this.dispatchEvent(new CloseActionScreenEvent());
})
}
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ if(type == 'success'){
+ this.updateRecordView(this.recordId);
+ }
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+
+ updateRecordView(recordId) {
+ updateRecord({fields: { Id: recordId }});
+ }
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTransferApplyNew/__tests__/lexTransferApplyNew.test.js b/force-app/main/default/lwc/lexTransferApplyNew/__tests__/lexTransferApplyNew.test.js
new file mode 100644
index 0000000..68afd6d
--- /dev/null
+++ b/force-app/main/default/lwc/lexTransferApplyNew/__tests__/lexTransferApplyNew.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexTransferApplyNew from 'c/lexTransferApplyNew';
+
+describe('c-lex-transfer-apply-new', () => {
+ 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-transfer-apply-new', {
+ is: LexTransferApplyNew
+ });
+
+ // Act
+ document.body.appendChild(element);
+
+ // Assert
+ // const div = element.shadowRoot.querySelector('div');
+ expect(1).toBe(1);
+ });
+});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTransferApplyNew/lexTransferApplyNew.html b/force-app/main/default/lwc/lexTransferApplyNew/lexTransferApplyNew.html
new file mode 100644
index 0000000..27e0f69
--- /dev/null
+++ b/force-app/main/default/lwc/lexTransferApplyNew/lexTransferApplyNew.html
@@ -0,0 +1,3 @@
+<template>
+
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTransferApplyNew/lexTransferApplyNew.js b/force-app/main/default/lwc/lexTransferApplyNew/lexTransferApplyNew.js
new file mode 100644
index 0000000..c050950
--- /dev/null
+++ b/force-app/main/default/lwc/lexTransferApplyNew/lexTransferApplyNew.js
@@ -0,0 +1,45 @@
+/*
+ * @Description: 鏂板缓璋冩嫧閲嶅啓 No. 榛樿*
+ * @Author: [lijinhuan]
+ * @Date: 2023-07-03 15:55:28
+ * @LastEditors: [lijinhuan]
+ * @LastEditTime: 2023-07-07 09:50:38
+ */
+import { LightningElement,wire } from 'lwc';
+import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+export default class LexTransferApplyNew extends NavigationMixin(LightningElement) {
+ recordTypeId;
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordTypeId;
+ console.log('****urlValue****',urlValue);
+ let str = `${urlValue}`;
+ this.recordTypeId = str;
+ console.log('****str****',str);
+ let defaultFieldValues = {};
+ defaultFieldValues['Name'] = '*';
+ let states =
+ {
+ nooverride: '1',
+ navigationLocation: 'LIST_VIEW',
+ backgroundContext: '/lightning/o/TransferApply__c/list?filterName=Recent&0.source=alohaHeader',
+ defaultFieldValues: encodeDefaultFieldValues(defaultFieldValues),
+ };
+ if (urlValue) {
+ states['recordTypeId'] = this.recordTypeId;
+ states['useRecordTypeCheck'] = 1;
+ }
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'TransferApply__c',
+ actionName: 'new'
+ },
+ state: states
+ });
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTransferApplyNew/lexTransferApplyNew.js-meta.xml b/force-app/main/default/lwc/lexTransferApplyNew/lexTransferApplyNew.js-meta.xml
new file mode 100644
index 0000000..3fe0e73
--- /dev/null
+++ b/force-app/main/default/lwc/lexTransferApplyNew/lexTransferApplyNew.js-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <isExposed>false</isExposed>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTransferApplySelectDetail/lexTransferApplySelectDetail.html b/force-app/main/default/lwc/lexTransferApplySelectDetail/lexTransferApplySelectDetail.html
new file mode 100644
index 0000000..7063605
--- /dev/null
+++ b/force-app/main/default/lwc/lexTransferApplySelectDetail/lexTransferApplySelectDetail.html
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTransferApplySelectDetail/lexTransferApplySelectDetail.js b/force-app/main/default/lwc/lexTransferApplySelectDetail/lexTransferApplySelectDetail.js
new file mode 100644
index 0000000..15e33ed
--- /dev/null
+++ b/force-app/main/default/lwc/lexTransferApplySelectDetail/lexTransferApplySelectDetail.js
@@ -0,0 +1,19 @@
+import { LightningElement, track, wire, api } from 'lwc';
+import transferApplySelectDetail from '@salesforce/apex/LexTransferApplyController.transferApplySelectDetail';
+
+export default class lexTransferApplySelectDetail extends LightningElement {
+ @api recordId;
+ msg;
+
+ connectedCallback(){
+ transferApplySelectDetail({
+ recordId: this.recordId
+ }).then(res=>{
+ if(res.TA_Status__c == '鍒犻櫎' || res.TA_Status__c == '鍙栨秷' || res.TA_Status__c == '瀹屼簡'){
+ this.msg = '璋冩嫧鐢宠宸茬粡'+ res.TA_Status__c +',涓嶈兘閫夋嫨璋冩嫧鏄庣粏'
+ }else{
+ window.open("/apex/TransferApplySelectDetail?id="+this.recordId, "_top");
+ }
+ })
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTransferApplySelectDetail/lexTransferApplySelectDetail.js-meta.xml b/force-app/main/default/lwc/lexTransferApplySelectDetail/lexTransferApplySelectDetail.js-meta.xml
new file mode 100644
index 0000000..c203d8b
--- /dev/null
+++ b/force-app/main/default/lwc/lexTransferApplySelectDetail/lexTransferApplySelectDetail.js-meta.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexTransferApplySelectDetail">
+ <apiVersion>51.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">
+ <property name="recordId" type="String" label="recordId"/>
+ </targetConfig>
+ </targetConfigs>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/pages/RentalFixtureSetAssign.page b/force-app/main/default/pages/RentalFixtureSetAssign.page
index c3e5f93..01cf21e 100644
--- a/force-app/main/default/pages/RentalFixtureSetAssign.page
+++ b/force-app/main/default/pages/RentalFixtureSetAssign.page
@@ -82,7 +82,8 @@
right: 0;
left: 0;
margin: 0;
- z-index: 9999;
+ /* z-index: 9999; */
+ z-index: 2;
display: inline-block;
border-radius: 0.25rem;/*20230607 ljh lightning*/
border: 1px solid rgb(201, 201, 201);/*20230610 ljh lightning*/
diff --git a/force-app/main/default/pages/RentalFixtureSetDetilSelect.page b/force-app/main/default/pages/RentalFixtureSetDetilSelect.page
index 85c4a1f..059c3b5 100644
--- a/force-app/main/default/pages/RentalFixtureSetDetilSelect.page
+++ b/force-app/main/default/pages/RentalFixtureSetDetilSelect.page
@@ -40,16 +40,16 @@
<!-- 20230522 ljh lightning end -->
<table>
<tr>
- <td colspan="2">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Name.label}</td>
- <td colspan="3"><apex:outputText value="{!parentObj.Name}" style="width:100px"/></td>
+ <td style="text-align:right;">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Name.label}锛�</td>
+ <td style="text-align:left;"><apex:outputText value="{!parentObj.Name}" style="width:100px"/></td>
</tr>
<tr>
- <td colspan="2">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Fixture_Set_Idx__c.label}</td>
- <td colspan="3"><apex:outputText value="{!parentObj.Fixture_Set_Idx__c}" style="width:100px"/></td>
+ <td style="text-align:right;">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Fixture_Set_Idx__c.label}锛�</td>
+ <td style="text-align:left;"><apex:outputText value="{!parentObj.Fixture_Set_Idx__c}" style="width:100px"/></td>
</tr>
<tr>
- <td colspan="2">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_name_F__c.label}</td>
- <td colspan="3"><apex:outputText value="{!parentObj.Loaner_name_F__c}" style="width:100px"/></td>
+ <td style="text-align:right;">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_name_F__c.label}锛�</td>
+ <td style="text-align:left;"><apex:outputText value="{!parentObj.Loaner_name_F__c}" style="width:100px"/></td>
</tr>
<!-- <tr>
<td colspan="2">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_code__c.label}</td>
diff --git a/force-app/main/default/staticresources/RelationListPagingCmpJS.js b/force-app/main/default/staticresources/RelationListPagingCmpJS.js
index 461a428..ffe2bb4 100644
--- a/force-app/main/default/staticresources/RelationListPagingCmpJS.js
+++ b/force-app/main/default/staticresources/RelationListPagingCmpJS.js
@@ -378,8 +378,12 @@
// j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px');
// 20230704 ljh start
if(blockWidth > 1000){
- j$('div#out_Div').css('width', (blockWidth) + 'px');
- j$('div#in_Div').css('width', (blockWidth) + 'px');
+ // j$('div#out_Div').css('width', (blockWidth) + 'px');
+ // j$('div#in_Div').css('width', (blockWidth) + 'px');
+ if (j$('table#tableData').width() > j$('div#in_Div').width()) {
+ j$('div#out_Div').css('width', (blockWidth) + 'px');
+ j$('div#in_Div').css('width', (blockWidth) + 'px');
+ }
}else{
j$('table#tableData').css('width', (blockWidth) + 'px');
j$('table#tableHeader').css('width', (blockWidth) + 'px');
diff --git a/force-app/main/default/staticresources/RentalFixtureSetDetilSelectCss.css b/force-app/main/default/staticresources/RentalFixtureSetDetilSelectCss.css
index db8e787..a5d6f18 100644
--- a/force-app/main/default/staticresources/RentalFixtureSetDetilSelectCss.css
+++ b/force-app/main/default/staticresources/RentalFixtureSetDetilSelectCss.css
@@ -15,4 +15,5 @@
/* 20230517 ljh lightning start */
table.list .col_IndexFromUniqueKey_Text__c {width:70px;}
+table.list .col_Fixture_Set_Detail__r_Quantity__c {width:70px;}
/* 20230517 ljh lightning end */
\ No newline at end of file
--
Gitblit v1.9.1