From ef5db151b7cd6008988eb5a3eec224b7d093cc5e Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期三, 26 四月 2023 14:34:56 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
---
force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js | 173 ++++++
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js | 135 ++--
force-app/main/default/classes/buttonQISSCReportCtl.cls-meta.xml | 5
force-app/main/default/lwc/lexCopyPIOnCall/lexCopyPIOnCall.js | 52 ++
force-app/main/default/classes/buttonQISReportCtl.cls-meta.xml | 5
force-app/main/default/classes/buttonQISReportCtl.cls | 162 ++++++
force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js | 21
force-app/main/default/pages/RentalApplySplit.page | 176 ++++++
force-app/main/default/classes/buttonRepairQuotationCtl.cls | 55 ++
force-app/main/default/classes/buttonQISSCReportCtl.cls | 41 +
force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.html | 5
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css | 21
force-app/main/default/pages/EquipmentRentalCancel.page | 121 ++++
force-app/main/default/pages/EquipmentRentalCancel.page-meta.xml | 7
force-app/main/default/lwc/lexOSHNogoods/__tests__/lexOSHNogoods.test.js | 25
force-app/main/default/lwc/lexSelectAssetsMaintenance/__tests__/lexSelectAssetsMaintenance.test.js | 25
force-app/main/default/pages/RentalApplySplit.page-meta.xml | 7
force-app/main/default/lwc/lexCopyPIOnCall/__tests__/lexCopyPIOnCall.test.js | 25
force-app/main/default/classes/buttonRepairSubOrderCtl.cls | 28 +
force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js | 90 +++
force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js | 15
force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js | 53 ++
force-app/main/default/classes/otherButtonRepairController.cls | 7
force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html | 6
force-app/main/default/lwc/lexCopyPIOnCall/lexCopyPIOnCall.html | 5
force-app/main/default/lwc/multiSelectCombobox/__tests__/multiSelectCombobox.test.js | 25
force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox .css | 35 +
force-app/main/default/lwc/lexCopyPIOnCall/lexCopyPIOnCall.js-meta.xml | 11
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html | 55 +
force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.html | 6
force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html | 58 ++
force-app/main/default/classes/buttonRepairSubOrderCtl.cls-meta.xml | 5
force-app/main/default/classes/lexPCLLostReportLwcController.cls | 25
force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js-meta.xml | 11
force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js-meta.xml | 11
force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js-meta.xml | 5
36 files changed, 1,408 insertions(+), 104 deletions(-)
diff --git a/force-app/main/default/classes/buttonQISReportCtl.cls b/force-app/main/default/classes/buttonQISReportCtl.cls
new file mode 100644
index 0000000..364dfe5
--- /dev/null
+++ b/force-app/main/default/classes/buttonQISReportCtl.cls
@@ -0,0 +1,162 @@
+public with sharing class buttonQISReportCtl {
+ public buttonQISReportCtl() {
+
+ }
+
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new initData();
+ try{
+ QIS_Report__c report = [SELECT QIS_Status__c,PAE_DetermineAC__c,AE_DetermineResult__c,ETQ_UPLOAD_STATUS__c,QIS_final_judgement__c,OCM_judgement__c,PAE_Determine__c,Id FROM QIS_Report__c WHERE Id =: recordId LIMIT 1];
+ res.PAEDetermineC = report.PAE_Determine__c;
+ res.PAEDetermineACC = report.PAE_DetermineAC__c;
+ res.OCMJudgementC = report.OCM_judgement__c;
+ res.QISFinalJudgementC = report.QIS_final_judgement__c;
+ res.ETQUPLOADSTATUSC = report.ETQ_UPLOAD_STATUS__c;
+ res.AEDetermineResultC = report.AE_DetermineResult__c;
+ res.Id = report.Id;
+ res.QISStatusC = report.QIS_Status__c;
+ res.userId = UserInfo.getUserId();
+ res.email = UserInfo.getUserEmail();
+ res.profileId = UserInfo.getProfileId();
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ return res;
+ }
+
+ // 鏍规嵁ID淇悊鎶ヤ环鎻愪氦
+ @AuraEnabled
+ public static String updateOSHNogoods(String Id,String email,String userId){
+ List<User> user = new List<User>();
+ user = [SELECT Id,Alias from User];
+
+ String res ='';
+ try {
+ QIS_Report__c rac = new QIS_Report__c();
+ rac.Id = Id;
+ rac.QIS_Status__c = 'OSH妫�娴嬩腑';
+ rac.OSHRecievedDate__c = Date.today();
+ rac.OSH_Receive_staff__c = user[0].Alias;
+ rac.OSH_staff__c = user[0].Alias;
+ rac.OSH_staff_email__c = email;
+ rac.Is_ProductGot__c = true;
+ rac.OSH_GotProductPeople__c = userId;
+
+ List<User> records = new List<User>();
+ records = [SELECT Id, JingliApprovalManager__c, BuchangApprovalManager__c, ZongjianApprovalManager__c FROM User WHERE Id=: userId ];
+ if (records != null && records.size() > 0 && records[0].JingliApprovalManager__c != null&& records[0].BuchangApprovalManager__c != null) {
+ rac.OSH_Manager__c= records[0].JingliApprovalManager__c;
+ rac.OSH_Buzhang__c= records[0].BuchangApprovalManager__c;
+ } else {
+ rac.OSH_Manager__c= userId;
+ rac.OSH_Buzhang__c= userId;
+ }
+ rac.OSHInspectionDate__c = Date.today();
+ rac.OSH_Nogoods__c = true;
+ update rac;
+ } catch (Exception e) {
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ res = e.getMessage();
+ }
+ return res;
+ }
+
+ @AuraEnabled
+ public static String sendToETQ(String iflog_Id,BatchIF_Log__c rowDataSFDC, List<String> repairIds,String statu){
+ List<QIS_Report__c> temp = [select id from QIS_Report__c where id in :repairIds ];
+ if(temp != null && temp.size() > 0){
+ try {
+ Database.executeBatch(new QISToPDFBatch(iflog_Id, rowDataSFDC,repairIds,statu),50); //鐢熸垚PDF
+ }
+ catch (Exception e) {
+ return '鏇存柊QIS鎶ラ敊:'+ e.getMessage();
+ }
+ }else{
+ BatchIF_Log__c iflog = new BatchIF_Log__c();
+ iflog.Type__c = 'sendToETQ';
+ iflog.ErrorLog__c = '';
+ iflog.Log__c = 'NFM401WebService start--';
+
+ Repair__c updateRe = new Repair__c();
+ updateRe.Id = repairIds[0];
+ updateRe.INTERFACE_RECORD_ID__c = null;
+ updateRe.ETQ_UPLOAD_STATUS__c = null;
+ updateRe.ETQ_UPLOAD_MESSAGE__c = null;
+ updateRe.OSH_ConfirmationDate__c = Date.today();
+ updateRe.OSH_Affirmant__c = UserInfo.getUserId();
+ updateRe.AWS_Interface_Time__c = Datetime.now();
+ updateRe.AsyncData__c = true;
+ try{
+ update updateRe;
+ Database.executeBatch(new RepairToPDFBatch(iflog_Id, rowDataSFDC,repairIds,statu)); //鐢熸垚PDF
+ iflog.Log__c += '\n淇悊:'+updateRe+' 鏇存柊鎴愬姛';
+ iflog.Log__c = '\nNFM401WebService end--';
+ insert iflog;
+ }catch(Exception ex){
+ iflog.ErrorLog__c += '淇悊:'+updateRe+' 鏇存柊澶辫触,鍥犱负::'+ex.getMessage();
+ iflog.Log__c = '\nNFM401WebService end--';
+ insert iflog;
+ return '鏇存柊淇悊鎶ラ敊:'+ ex.getMessage();
+ }
+ }
+ return '鍙戦�佹垚鍔�!';
+ }
+
+ // 鏍规嵁ID淇悊鎶ヤ环鎻愪氦
+ @AuraEnabled
+ public static void updateQISReportC(String QId,String uid){
+ try {
+ QIS_Report__c rac = new QIS_Report__c();
+ rac.Id = QId;
+ rac.INTERFACE_RECORD_ID__c = null;
+ rac.ETQ_UPLOAD_STATUS__c = null;
+ rac.ETQ_UPLOAD_MESSAGE__c = null;
+ rac.AsyncData__c = true;
+ rac.AWS_Interface_Time__c = Datetime.now();
+ rac.OSH_ConfirmationDate__c = Date.today();
+ rac.OSH_Affirmant__c = uid;
+ update rac;
+ } catch (Exception e) {
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ }
+
+ // 鏍规嵁ID淇悊鎶ヤ环鎻愪氦
+ @AuraEnabled
+ public static List<QIS_Report__c> selectQISReportC(String QId){
+ List<QIS_Report__c> res = new List<QIS_Report__c>();
+ try {
+ res = [SELECT Id,AsyncData__c,Complaint_Number__c,ETQ_UPLOAD_STATUS__c from QIS_Report__c where Id=: QId ];
+ } catch (Exception e) {
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ return res;
+ }
+
+ public class InitData{
+ @AuraEnabled
+ public String Id;
+ @AuraEnabled
+ public String QISStatusC;
+ @AuraEnabled
+ public String userId;
+ @AuraEnabled
+ public String email;
+ @AuraEnabled
+ public String profileId;
+ @AuraEnabled
+ public String PAEDetermineC;
+ @AuraEnabled
+ public String PAEDetermineACC;
+ @AuraEnabled
+ public String OCMJudgementC;
+ @AuraEnabled
+ public String QISFinalJudgementC;
+ @AuraEnabled
+ public String ETQUPLOADSTATUSC;
+ @AuraEnabled
+ public String AEDetermineResultC;
+
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonQISReportCtl.cls-meta.xml b/force-app/main/default/classes/buttonQISReportCtl.cls-meta.xml
new file mode 100644
index 0000000..9bbf7b4
--- /dev/null
+++ b/force-app/main/default/classes/buttonQISReportCtl.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>56.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonQISSCReportCtl.cls b/force-app/main/default/classes/buttonQISSCReportCtl.cls
new file mode 100644
index 0000000..8704763
--- /dev/null
+++ b/force-app/main/default/classes/buttonQISSCReportCtl.cls
@@ -0,0 +1,41 @@
+public with sharing class buttonQISSCReportCtl {
+ public buttonQISSCReportCtl() {
+
+ }
+
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new initData();
+ try{
+ QIS_SC_Report__c report = [SELECT Status__c,Id FROM QIS_SC_Report__c WHERE Id =: recordId LIMIT 1];
+ System.debug(LoggingLevel.INFO, '*** opp: ' + report);
+ res.Id = report.Id;
+ res.StatusC = report.Status__c;
+
+ System.debug(LoggingLevel.INFO, '*** res: ' + res);
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ return res;
+ }
+
+ // 鏍规嵁ID淇敼QIS甯傚満閮�
+ @AuraEnabled
+ public static void updateQISSCReport(String Id){
+ try {
+ QIS_SC_Report__c qis_Sc = new QIS_SC_Report__c();
+ qis_Sc.Id = Id;
+ qis_Sc.Status__c = '宸叉彁浜�';
+ update qis_Sc;
+ } catch (Exception e) {
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ }
+
+ public class InitData{
+ @AuraEnabled
+ public String Id;
+ @AuraEnabled
+ public String StatusC;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonQISSCReportCtl.cls-meta.xml b/force-app/main/default/classes/buttonQISSCReportCtl.cls-meta.xml
new file mode 100644
index 0000000..9bbf7b4
--- /dev/null
+++ b/force-app/main/default/classes/buttonQISSCReportCtl.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>56.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonRepairQuotationCtl.cls b/force-app/main/default/classes/buttonRepairQuotationCtl.cls
index 061b409..e7213e6 100644
--- a/force-app/main/default/classes/buttonRepairQuotationCtl.cls
+++ b/force-app/main/default/classes/buttonRepairQuotationCtl.cls
@@ -7,10 +7,13 @@
public static InitData init(String recordId){
InitData res = new initData();
try{
- Repair_Quotation__c report = [SELECT Id,CutPriceStatus_Service__c FROM Repair_Quotation__c WHERE Id =: recordId LIMIT 1];
+ Repair_Quotation__c report = [SELECT Repair__c,Loaner_repair_sys__c,Rental_Apply_Discount_Status__c,Id,CutPriceStatus_Service__c FROM Repair_Quotation__c WHERE Id =: recordId LIMIT 1];
System.debug(LoggingLevel.INFO, '*** opp: ' + report);
+ res.RepairC = report.Repair__c;
+ res.LoanerRepairSysC = report.Loaner_repair_sys__c;
res.Id = report.Id;
res.CutPriceStatusServiceC = report.CutPriceStatus_Service__c;
+ res.RentalApplyDiscountStatusC = report.Rental_Apply_Discount_Status__c;
res.profileId = UserInfo.getProfileId();
System.debug(LoggingLevel.INFO, '*** res: ' + res);
@@ -51,6 +54,50 @@
return res;
}
+ // 鏍规嵁ID淇悊鎶ヤ环鎻愪氦
+ @AuraEnabled
+ public static String updateRepairQuotation03(String recordId){
+ String res ='';
+ try {
+ Repair_Quotation__c repair = new Repair_Quotation__c();
+ repair.Id = recordid;
+ repair.Rental_Apply_Discount_Status__c = '宸叉彁浜�';
+ update repair;
+ } catch (Exception e) {
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ res = e.getMessage();
+ }
+ return res;
+ }
+
+ // 鏍规嵁ID淇悊鎶ヤ环鎻愪氦
+ @AuraEnabled
+ public static String updateRepairQuotation04(String recordId){
+ String res ='';
+ try {
+ Repair_Quotation__c repair = new Repair_Quotation__c();
+ repair.Id = recordid;
+ repair.Repair_quotation_status__c = '鍑忎环鐢宠濉啓瀹屾瘯';
+ update repair;
+ } catch (Exception e) {
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ res = e.getMessage();
+ }
+ return res;
+ }
+
+ // 鏌ユ壘淇悊
+ @AuraEnabled
+ public static List<Repair__c> selectRepairC(String recordId){
+ List<Repair__c> res = new List<Repair__c>();
+ try{
+ res = [SELECT Id, Return_Without_Repair__c, Return_Without_Repair_IF__c FROM Repair__c WHERE Id=: recordId ];
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ return res;
+ }
+
public class InitData{
@AuraEnabled
public String Id;
@@ -58,5 +105,11 @@
public String CutPriceStatusServiceC;
@AuraEnabled
public String profileId;
+ @AuraEnabled
+ public String RentalApplyDiscountStatusC;
+ @AuraEnabled
+ public Boolean LoanerRepairSysC;
+ @AuraEnabled
+ public String RepairC;
}
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonRepairSubOrderCtl.cls b/force-app/main/default/classes/buttonRepairSubOrderCtl.cls
new file mode 100644
index 0000000..6569071
--- /dev/null
+++ b/force-app/main/default/classes/buttonRepairSubOrderCtl.cls
@@ -0,0 +1,28 @@
+public with sharing class buttonRepairSubOrderCtl {
+ public buttonRepairSubOrderCtl() {
+
+ }
+
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new initData();
+ try{
+ RepairSubOrder__c report = [SELECT Id,Status__c FROM RepairSubOrder__c WHERE Id =: recordId LIMIT 1];
+ System.debug(LoggingLevel.INFO, '*** opp: ' + report);
+ res.Id = report.Id;
+ res.StatusC = report.Status__c;
+
+ System.debug(LoggingLevel.INFO, '*** res: ' + res);
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ return res;
+ }
+
+ public class InitData{
+ @AuraEnabled
+ public String Id;
+ @AuraEnabled
+ public String StatusC;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonRepairSubOrderCtl.cls-meta.xml b/force-app/main/default/classes/buttonRepairSubOrderCtl.cls-meta.xml
new file mode 100644
index 0000000..9bbf7b4
--- /dev/null
+++ b/force-app/main/default/classes/buttonRepairSubOrderCtl.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>56.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexPCLLostReportLwcController.cls b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
index 2127ee4..776380d 100644
--- a/force-app/main/default/classes/lexPCLLostReportLwcController.cls
+++ b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -353,6 +353,31 @@
return dataCheck;
}
@AuraEnabled
+ public static List<String> getValuesFromTable(){
+ String ObjectApi_name = 'PCLLostBrand__c';
+ String Field_name = 'Lost_By_Company__c';
+ List<String> lstPickvals=new List<String>();
+ //From the Object Api name retrieving the SObject
+ Schema.SObjectType targetType = Schema.getGlobalDescribe().get(ObjectApi_name);
+ Sobject Object_name = targetType.newSObject();
+ //grab the sobject that was passed
+ Schema.sObjectType sobject_type = Object_name.getSObjectType();
+ //describe the sobject
+ Schema.DescribeSObjectResult sobject_describe = sobject_type.getDescribe();
+ //get a map of fields for the passed sobject
+ Map<String, Schema.SObjectField> field_map = sobject_describe.fields.getMap();
+ //grab the list of picklist values for the passed field on the sobject
+ List<Schema.PicklistEntry> pick_list_values = field_map.get(Field_name).getDescribe().getPickListValues();
+
+ for (Schema.PicklistEntry a : pick_list_values)
+ { //for all values in the picklist list
+
+ lstPickvals.add(a.getValue());//add the value to our final list
+ }
+
+ return lstPickvals;
+ }
+ @AuraEnabled
public static list<LostBrand> brandcopy(){
list<LostBrand> tempbrands = new list<LostBrand>();
for(LostBrand tempbrand: LostReport.LostBrands) {
diff --git a/force-app/main/default/classes/otherButtonRepairController.cls b/force-app/main/default/classes/otherButtonRepairController.cls
index 7e007a7..986cab3 100644
--- a/force-app/main/default/classes/otherButtonRepairController.cls
+++ b/force-app/main/default/classes/otherButtonRepairController.cls
@@ -141,7 +141,8 @@
// 鏍规嵁ID淇敼淇悊
@AuraEnabled
- public static void updateRepair(String recordId){
+ public static String updateRepair(String recordId){
+ String res;
try {
Repair__c repair = new Repair__c();
repair.Id = recordid;
@@ -149,8 +150,10 @@
update repair;
} catch (Exception e) {
System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ res=e.getMessage();
}
- }
+ return res;
+ }
// 淇敼楠屾敹鍗�
@AuraEnabled
diff --git a/force-app/main/default/lwc/lexCopyPIOnCall/__tests__/lexCopyPIOnCall.test.js b/force-app/main/default/lwc/lexCopyPIOnCall/__tests__/lexCopyPIOnCall.test.js
new file mode 100644
index 0000000..4ecaaab
--- /dev/null
+++ b/force-app/main/default/lwc/lexCopyPIOnCall/__tests__/lexCopyPIOnCall.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexCopyPIOnCall from 'c/lexCopyPIOnCall';
+
+describe('c-lex-copy-pi-on-call', () => {
+ 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-copy-pi-on-call', {
+ is: LexCopyPIOnCall
+ });
+
+ // 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/lexCopyPIOnCall/lexCopyPIOnCall.html b/force-app/main/default/lwc/lexCopyPIOnCall/lexCopyPIOnCall.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexCopyPIOnCall/lexCopyPIOnCall.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="exampleHolder" 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/lexCopyPIOnCall/lexCopyPIOnCall.js b/force-app/main/default/lwc/lexCopyPIOnCall/lexCopyPIOnCall.js
new file mode 100644
index 0000000..700808a
--- /dev/null
+++ b/force-app/main/default/lwc/lexCopyPIOnCall/lexCopyPIOnCall.js
@@ -0,0 +1,52 @@
+import {
+ LightningElement,
+ wire,
+ api
+} from 'lwc';
+import {
+ CurrentPageReference
+} from "lightning/navigation";
+import {
+ CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/buttonOnCallCtl.init';
+
+export default class LexCopyPIOnCall extends LightningElement {
+ @api recordId;
+ str;
+ IsLoading = true;
+ Id;
+
+ @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 => {
+ console.log(result);
+ if (result != null) {
+ this.IsLoading = false;
+ this.Id = result.Id;
+
+ this.CopyPI();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ })
+ }
+
+ //澶嶅埗
+ CopyPI() {
+ window.location.href = '/' + this.Id + '/e?newclone=1';
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCopyPIOnCall/lexCopyPIOnCall.js-meta.xml b/force-app/main/default/lwc/lexCopyPIOnCall/lexCopyPIOnCall.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCopyPIOnCall/lexCopyPIOnCall.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>54.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__RecordPage</target>
+ <target>lightning__AppPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html b/force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
new file mode 100644
index 0000000..87f391a
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js b/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js
index 4ae611c..0c3c21f 100644
--- a/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js
+++ b/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js
@@ -12,7 +12,9 @@
import init from '@salesforce/apex/otherButtonRepairController.init';
import selectCustomDeleteById from '@salesforce/apex/otherButtonRepairController.selectCustomDeleteById';
import deleteRepair from '@salesforce/apex/otherButtonRepairController.deleteRepair';
-
+import {
+ ShowToastEvent
+} from 'lightning/platformShowToastEvent';
export default class LexCustomDelete extends LightningElement {
@api recordId;
@@ -63,13 +65,13 @@
rp.Status__c != "1.鍙楃悊瀹屾瘯(SAP寰呭彂閫�)" &&
rp.Status__c != "4.淇悊鍝佽繑閫侀樁娈�"
) {
- alert("涓嶆槸鑽夋涓紝涓嶈兘鍒犻櫎");
+ this.ShowToastEvent("涓嶆槸鑽夋涓紝涓嶈兘鍒犻櫎", "error")
} else if (rp.Status__c == "4.淇悊鍝佽繑閫侀樁娈�" &&
- (rp.SAP_Transfer_time__c != "" || rp.Repair_Ordered_Date__c != "")
+ (rp.SAP_Transfer_time__c != undefined || rp.Repair_Ordered_Date__c != undefined)
) {
- alert("宸茬粡鍙戦�佽繃SAP锛屼笉鑳藉垹闄�");
+ this.ShowToastEvent("宸茬粡鍙戦�佽繃SAP锛屼笉鑳藉垹闄�", "error")
} else if (this.userID.substring(0, 15) != rp.CreatedById.substring(0, 15) && this.userID.substring(0, 15) != rp.Acc_OwnerId__c.substring(0, 15) && this.userID.substring(0, 15) != rp.FSE_ownerid__c.substring(0, 15)) {
- alert("涓嶆槸鎵�鏈変汉銆佸垱寤轰汉鎴朏SE涓昏礋璐d汉锛屼笉鑳藉垹闄�");
+ this.ShowToastEvent("涓嶆槸鎵�鏈変汉銆佸垱寤轰汉鎴朏SE涓昏礋璐d汉锛屼笉鑳藉垹闄�", "error")
} else {
if (confirm("鏄惁纭畾锛�")) {
deleteRepair({
@@ -86,4 +88,13 @@
}
})
}
+
+ ShowToastEvent(msg, type) {
+ const event = new ShowToastEvent({
+ title: '',
+ message: msg,
+ variant: type
+ });
+ this.dispatchEvent(event);
+ }
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHNogoods/__tests__/lexOSHNogoods.test.js b/force-app/main/default/lwc/lexOSHNogoods/__tests__/lexOSHNogoods.test.js
new file mode 100644
index 0000000..1e819d2
--- /dev/null
+++ b/force-app/main/default/lwc/lexOSHNogoods/__tests__/lexOSHNogoods.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexOSHNogoods from 'c/lexOSHNogoods';
+
+describe('c-lex-osh-nogoods', () => {
+ 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-osh-nogoods', {
+ is: LexOSHNogoods
+ });
+
+ // 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/lexOSHNogoods/lexOSHNogoods.html b/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.html
new file mode 100644
index 0000000..aaa4cbd
--- /dev/null
+++ b/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="toReportHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js b/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
new file mode 100644
index 0000000..c8ce47e
--- /dev/null
+++ b/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
@@ -0,0 +1,90 @@
+import {
+ LightningElement,
+ wire,
+ api
+} from 'lwc';
+import {
+ CurrentPageReference
+} from "lightning/navigation";
+import {
+ CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/buttonQISReportCtl.init';
+import updateOSHNogoods from '@salesforce/apex/buttonQISReportCtl.updateOSHNogoods';
+import {
+ ShowToastEvent
+} from 'lightning/platformShowToastEvent';
+
+export default class LexOSHNogoods extends LightningElement {
+ @api recordId;
+ str;
+ IsLoading = true;
+ Id;
+ QISStatusC;
+ userId;
+ email;
+
+ @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 => {
+ console.log(result);
+ if (result != null) {
+ this.IsLoading = false;
+ this.Id = result.Id;
+ this.QISStatusC = result.QISStatusC;
+ this.userId = result.userId;
+ this.email = result.email;
+
+ this.OSHNogoods();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ })
+ }
+
+ // 鍑忎环鐢宠
+ OSHNogoods() {
+ if (this.QISStatusC != 'OSH妫�娴嬬敵璇�' && this.QISStatusC != '瀹屾瘯') {
+ this.ShowToastEvent("OSH宸茬粡鏀跺埌瀹炵墿", "error")
+ // alert('OSH宸茬粡鏀跺埌瀹炵墿');
+ } else {
+ updateOSHNogoods({
+ Id: this.Id,
+ email: this.email,
+ userId: this.userId
+ }).then(result => {
+ console.log(result);
+ if (result.length > 0) {
+ var split = result.split(", ");
+ alert(split[1]);
+ }
+ location.reload();
+ }).catch(error => {
+ console.log(error);
+ })
+ }
+ }
+
+ // 寮圭獥
+ ShowToastEvent(msg, type) {
+ const event = new ShowToastEvent({
+ title: '',
+ message: msg,
+ variant: type
+ });
+ this.dispatchEvent(event);
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js-meta.xml b/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>54.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__RecordPage</target>
+ <target>lightning__AppPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css
new file mode 100644
index 0000000..ab3e552
--- /dev/null
+++ b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css
@@ -0,0 +1,21 @@
+.combobox-container {
+ display: flex;
+ align-items: center;
+}
+
+.combobox-container label {
+ margin-right: 10px;
+}
+
+
+.my-combobox {
+ display: flex;
+ align-items: center;
+ padding: 0 0.5rem;
+ width: 144px;
+}
+
+.slds-form-element__label {
+ width: 144px;
+ margin-right: -5rem;
+}
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
index dc39ff7..1d122cd 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
+++ b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
@@ -4,48 +4,67 @@
* @Author: chen jing wu
* @Date: 2023-04-20 17:16:48
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-24 16:34:14
+ * @LastEditTime: 2023-04-25 17:45:31
-->
<template>
<lightning-card variant="Narrow">
+ <!-- <lightning-input onchange={initAll}></lightning-input> -->
<div style="padding: 0 20px">
<lightning-layout>
- <div style="padding: 10px 3px;border-bottom: 1px solid;font: 16px;font-size: blod;">澶卞崟鎶ュ憡缂栬緫椤甸潰</div>
- <lightning-layout-item flexibility="auto" padding="around-small">
- <lightning-button label="杩藉姞鍝佺墝" onclick={addBrandJs}></lightning-button>
+ <lightning-layout-item>
+ <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;">澶卞崟鎶ュ憡缂栬緫椤甸潰</div>
</lightning-layout-item>
- <lightning-layout-item flexibility="auto" padding="around-small">
+ <div class="slds-align_absolute-center">
+ <lightning-layout-item size="12">
+ <lightning-button label="杩藉姞鍝佺墝" onclick={addBrandJs}></lightning-button>
+ <lightning-button label="淇濆瓨" onclick={saveJs}></lightning-button>
+ <lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
+ </lightning-layout-item>
+ </div>
+ <!-- <lightning-layout-item flexibility="auto" padding="around-small">
<lightning-button label="淇濆瓨" onclick={saveJs}></lightning-button>
</lightning-layout-item>
<lightning-layout-item flexibility="auto" padding="around-small">
<lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
- </lightning-layout-item>
+ </lightning-layout-item> -->
</lightning-layout>
<div style="margin-top: 5px">
<lightning-layout>
<lightning-layout-item flexibility="auto" padding="around-small">
- <lightning-combobox name="progress" label="澶卞崟绫诲瀷" value={lostReportObj.RecordType} options={RecordTypeOptions}
- onchange={handleStatus1Change} class="searchField">
- </lightning-combobox>
+ <!-- <div class="combobox-container">
+ <label for="losttype">澶卞崟绫诲瀷:</label>
+ <lightning-combobox id="losttype" name="progress" value={lostReportObj.RecordType} options={RecordTypeOptions}
+ onchange={handleStatus1Change} class="searchField" style="width: 71.33px; height: 32px;">
+ </lightning-combobox>
+ </div> -->
+ <div class="slds-form_horizontal my-combobox">
+ <label class="slds-form-element__label">澶卞崟绫诲瀷</label>
+ <lightning-combobox name="progress" value={lostReportObj.RecordType} options={RecordTypeOptions}
+ onchange={handleStatus1Change} class="searchField" style="width: 71.33px; height: 32px;">
+ </lightning-combobox>
+ </div>
</lightning-layout-item>
<lightning-layout-item flexibility="auto" padding="around-small">
- <div style="padding: 10px 3px;border-bottom: 1px solid;font: 14px;font-size: blod;">澶卞崟鎬婚噾棰濓紙鍏冿級:</div>
- <lightning-output-field>{LostReport.lostReport.LostTotalAmount__c}</lightning-output-field>
+ <div style="padding: 10px 3px;font: 16px;">澶卞崟鎬婚噾棰濓紙鍏冿級:</div>
+ <!-- <lightning-output-field>{LostReport.lostReport.LostTotalAmount__c}</lightning-output-field> -->
+ <lightning-output-field>0</lightning-output-field>
</lightning-layout-item>
<lightning-layout-item>
- <div style="padding: 10px 3px;border-bottom: 1px solid;font: 14px;font-size: blod;">鐘舵��:</div>
- <lightning-output-field>{LostReport.lostReport.Report_Status__c}</lightning-output-field>
+ <div style="padding: 10px 3px;font: 16px;">鐘舵��:</div>
+ <!-- <lightning-output-field>{LostReport.lostReport.Report_Status__c}</lightning-output-field> -->
+ <div style="padding: 10px 3px;font: 16px;">鑽夋涓�</div>
</lightning-layout-item>
+ <lightning-record-view-form>
+
+ </lightning-record-view-form>
</lightning-layout>
- <!-- <lightning-layout>
- <lightning-accordion allow-multiple-sections-open
- onsectiontoggle={handleSectionToggle}
- active-section-name={activeSections}>
+ <lightning-layout>
+ <lightning-accordion>
<lightning-accordion-section name="澶卞崟鍝佺墝" label="澶卞崟鍝佺墝">
</lightning-accordion-section>
</lightning-accordion>
- </lightning-layout> -->
+ </lightning-layout>
</div>
</div>
</lightning-card>
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
index 0b3ba85..2d46a12 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
+++ b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-20 15:04:03
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-24 16:46:31
+ * @LastEditTime: 2023-04-25 17:37:35
*/
/*
* @Description:
@@ -14,44 +14,53 @@
* @LastEditors: chen jing wu
* @LastEditTime: 2023-04-20 17:11:01
*/
-import { api, wire,LightningElement } from 'lwc';
+import { api, wire,track,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import save from '@salesforce/apex/lexPCLLostReportLwcController.save';
-import jquery from '@salesforce/resourceUrl/jquery183minjs';
-import blockUIcss from '@salesforce/resourceUrl/blockUIcss';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { loadStyle, loadScript } from 'lightning/platformResourceLoader';
import setbrand from '@salesforce/apex/lexPCLLostReportLwcController.setBrand';
import init from '@salesforce/apex/lexPCLLostReportLwcController.init';
-import PleaseWaitDialog from '@salesforce/resourceUrl/PleaseWaitDialog';
import initForApex from '@salesforce/apex/lexPCLLostReportLwcController.initForApex';
+import getValuesFromTable from '@salesforce/apex/lexPCLLostReportLwcController.getValuesFromTable';
export default class LexPCLLostReportPage extends LightningElement {
- @api oppId;
+ @api oppId = '0061000001R2xjWAAR';
@api lostReportId;
- @api pageStatus;
- @api lostType;
+ @api pageStatus = 'Create';
+ @api lostType = '澶卞崟';
@api submitFlag;
+ searchResult;
LostReport;
brandCount;
- lostReportObj;
+
+
+
+ connectedCallback() {
+
+ }
+
+
//澶卞崟绫诲瀷
RecordTypeOptions = [{ label: '--鏃�--', value: '' },
{ label: '澶卞崟', value: '澶卞崟' },
{ label: '閮ㄥ垎澶卞崟', value: '閮ㄥ垎澶卞崟' }];
- // @wire(CurrentPageReference)
- // getStateParameters(currentPageReference) {
- // console.log(111);
- // console.log(currentPageReference);
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ console.log(111);
+ console.log(currentPageReference);
- // if (currentPageReference) {
- // const urlValue = currentPageReference.state.recordId;
- // if (urlValue) {
- // let str = `${urlValue}`;
- // console.log("str");
- // console.log(str);
- // this.oppId = str;
- // }
- // }
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ console.log("str");
+ console.log(str);
+ this.oppId = str;
+ }
+ }
+ }
+ // connectedCallback(){
+ // this.initAll();
// }
// connectedCallback(){
@@ -78,6 +87,42 @@
// });
// });
// }
+ handleSearchBrand(event){
+ const searchText = event.target.value;
+ searchBrand({
+ name: searchText
+ }).then(result=>{
+ this.searchResult = result;
+ });
+ }
+ initAll(){
+ console.log(this.oppId);
+ console.log(this.lostReportId);
+ console.log(this.pageStatus);
+ console.log(this.lostType);
+ console.log(this.submitFlag);
+ initForApex({
+ oppId1: this.oppId,
+ lostReportId1: this.lostReportId,
+ pageStatus1: this.pageStatus,
+ lostType1: this.lostType,
+ submitFlag1: this.submitFlag
+ }).then(()=>{
+ console.log("2");
+ init().then(result=>{
+ console.log("3");
+ console.log(result);
+ if(result.message == '鎻愪氦鎴愬姛锛�'){
+ this.showToast(result.message,"success");
+ this.LostReport = result.LostReport;
+ }else{
+ console.log("211");
+ this.showToast(result.message,"error");
+ console.log("985");
+ }
+ });
+ });
+ }
getParamValue(paramName) {
// Use the URLSearchParams API to get the value of a query parameter
@@ -85,23 +130,18 @@
return params.get(paramName);
}
saveJs() {
- this.blockMyself();
save().then(result=>{
if(result){
this.showToast(result,"success");
- this.unblock();
this.clearBrandMannualName();
}
})
}
addBrandJs() {
- this.blockMyself();
addBrand().then(()=>{
- this.unblock();
});
}
submitJS() {
- this.blockMyself();
submit().then(result=>{
if(result.get('error')){
this.showToast(result.get('error'),"error");
@@ -114,54 +154,21 @@
pageStatus: result.get('pageStatus'),
submitFlag: result.get('submitFlag')
}
- });
- this.unblock();
+ });
}
});
}
addProductJs(number) {
- this.blockMyself();
addProduct().then(()=>{
- this.unblock();
});
}
RemoveJs(number) {
- this.blockMyself();
- Remove().then(()=>{
- this.unblock();
+ Remove().then(()=>{
});
}
// add tcm 20211118 start
searchJs(topNum, secondNum) {
- this.blockMyself();
search().then(()=>{
- this.unblock();
- });
- }
- blockMyself(){
- Promise.all([
- loadScript(this,PleaseWaitDialog),
- loadStyle(this,blockUIcss),
- loadScript(this, jquery)
- //loadScript(this, jq + "/dist/jquery.min.js")
- ]).then(() =>{
- blockme();
- }).catch(error => {
- console.log("321");
- console.log('Failed to load the JQuery : ' +error);
- });
- }
- unblock(){
- Promise.all([
- loadScript(this,PleaseWaitDialog),
- loadStyle(this,blockUIcss),
- loadScript(this, jquery)
- //loadScript(this, jq + "/dist/jquery.min.js")
- ]).then(() =>{
- unblockUI();
- }).catch(error => {
- console.log("321");
- console.log('Failed to load the JQuery : ' +error);
});
}
get pageStatusIsCreateOrEdit() {
@@ -200,16 +207,12 @@
//console.log('setLostTotalAmount end');
}
setBrandName(brandNumber) {
- this.blockMyself();
setbrand().then(()=>{
this.clearBrandMannualName();
- this.unblock();
});
}
setBrandMannualName(brandNumber) {
- this.blockMyself();
setbrandmannual().then(()=>{
- this.unblock();
});
}
// 澶卞崟鍝佺墝涓嶇瓑浜庡叾浠栨椂,澶卞崟鍝佺墝锛堟墜鍔級娓呯┖骞朵笖涓嶅厑璁稿~鍐�,澶卞崟鍝佺墝绛変簬鍏朵粬鏃�,澶卞崟瀵规墜鍨嬪彿涓嶅彲鐢� thh 2022-01-13 start
diff --git a/force-app/main/default/lwc/lexSelectAssetsMaintenance/__tests__/lexSelectAssetsMaintenance.test.js b/force-app/main/default/lwc/lexSelectAssetsMaintenance/__tests__/lexSelectAssetsMaintenance.test.js
new file mode 100644
index 0000000..2b62f83
--- /dev/null
+++ b/force-app/main/default/lwc/lexSelectAssetsMaintenance/__tests__/lexSelectAssetsMaintenance.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexSelectAssetsMaintenance from 'c/lexSelectAssetsMaintenance';
+
+describe('c-lex-select-assets-maintenance', () => {
+ 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-select-assets-maintenance', {
+ is: LexSelectAssetsMaintenance
+ });
+
+ // 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/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.html b/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="exampleHolder" 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/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js b/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js
new file mode 100644
index 0000000..21cb5c4
--- /dev/null
+++ b/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js
@@ -0,0 +1,53 @@
+import {
+ LightningElement,
+ wire,
+ api
+} from 'lwc';
+import {
+ CurrentPageReference
+} from "lightning/navigation";
+import {
+ CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
+
+export default class LexSelectAssetsMaintenance extends LightningElement {
+ @api recordId;
+ str;
+ IsLoading = true;
+ Id;
+
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+
+ connectedCallback() {
+ console.log(this.recordId);
+ init({
+ recordId: this.recordId
+ }).then(result => {
+ console.log(result);
+ if (result != null) {
+ this.IsLoading = false;
+ this.Id = result.Id;
+
+ this.SelectAssets();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ })
+ }
+
+ // 銈点兗銉撱偣濂戠磩瀵捐薄瑁藉搧鐧婚尣
+ SelectAssets() {
+ window.open("/apex/SelectAsset?targetContractId=" + this.Id, "_top");
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js-meta.xml b/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>54.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__RecordPage</target>
+ <target>lightning__AppPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
index ee1cc09..95bfd52 100644
--- a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
+++ b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
@@ -1,9 +1,7 @@
-import { LightningElement,wire,track,api} from 'lwc';
+import { LightningElement,wire,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-import { updateRecord } from 'lightning/uiRecordApi';
import init from '@salesforce/apex/QISReportController.initForlexcopyQISButton';
@@ -17,15 +15,10 @@
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
- console.log(111);
- console.log(currentPageReference);
-
if (currentPageReference) {
const urlValue = currentPageReference.state.recordId;
if (urlValue) {
let str = `${urlValue}`;
- console.log("str");
- console.log(str);
this.recordId = str;
}
}
@@ -54,8 +47,6 @@
this.dispatchEvent(new CloseActionScreenEvent());
}).catch(error => {
console.log('error='+error);
- }).finally(() => {
-
- });
+ })
}
-}
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/multiSelectCombobox/__tests__/multiSelectCombobox.test.js b/force-app/main/default/lwc/multiSelectCombobox/__tests__/multiSelectCombobox.test.js
new file mode 100644
index 0000000..1410cce
--- /dev/null
+++ b/force-app/main/default/lwc/multiSelectCombobox/__tests__/multiSelectCombobox.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import MultiSelectCombobox from 'c/multiSelectCombobox';
+
+describe('c-multi-select-combobox', () => {
+ 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-multi-select-combobox', {
+ is: MultiSelectCombobox
+ });
+
+ // 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/multiSelectCombobox/multiSelectCombobox .css b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox .css
new file mode 100644
index 0000000..4442364
--- /dev/null
+++ b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox .css
@@ -0,0 +1,35 @@
+.verticalAlign {
+ cursor: pointer;
+ padding: 0px 5px !important;
+}
+.slds-dropdown {
+ padding:0px !important;
+}
+.recordListBox {
+ margin-top:0px !important;
+ overflow-y: scroll;
+}
+.slds-listbox li {
+ padding: .45rem 0.7rem !important;
+ display: flex;
+}
+.inputBox input {
+ padding-left: 10px;
+}
+.eachItem:hover {
+ background-color: #F1F1F1;
+ cursor: pointer;
+}
+
+/* For Scrolling */
+::-webkit-scrollbar {
+ width: 7px;
+ height: 7px;
+}
+::-webkit-scrollbar-track {
+ display: none !important;
+}
+::-webkit-scrollbar-thumb {
+ border-radius: 10px;
+ background: rgba(0,0,0,0.4);
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html
new file mode 100644
index 0000000..37465b0
--- /dev/null
+++ b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html
@@ -0,0 +1,58 @@
+<!--
+ * @Description:
+ * @version:
+ * @Author: chen jing wu
+ * @Date: 2023-04-25 17:41:26
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-04-25 17:45:57
+-->
+
+<!-- Code by CafeForce || www.cafeforce.com || support@cafeforce.com || Mandatory Header -->
+<template>
+
+ <!-- Header Label -->
+ <template if:true={label}>
+ <label class="slds-form-element__label">{label}</label>
+ </template>
+ <div class="slds-combobox_container">
+ <div class="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click slds-is-open" aria-expanded="true" aria-haspopup="listbox" role="combobox">
+ <!-- Search Input -->
+ <div class="slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right" role="none">
+ <lightning-input disabled={disabled} class="inputBox" placeholder="Select an Option" onblur={blurEvent} onclick={showOptions} onkeyup={filterOptions} value={searchString} auto-complete="off" variant="label-hidden" id="combobox-id-1" ></lightning-input>
+ <lightning-icon class="slds-input__icon" icon-name="utility:down" size="x-small" alternative-text="search"></lightning-icon>
+ </div>
+ <!-- Dropdown List -->
+ <template if:true={showDropdown}>
+ <div id="listbox-id-1" class="slds-dropdown slds-dropdown_length-5 slds-dropdown_fluid"><!--style="{! 'max-height:' + (8 + (v.recordCount * 40)) + 'px' }""-->
+ <ul class="slds-listbox slds-listbox_vertical recordListBox" role="presentation">
+ <template if:false={message} >
+ <template for:each={optionData} for:item="option">
+ <template if:true={option.isVisible}>
+ <li key={option.value} data-id={option.value} onmousedown={selectItem} class="slds-listbox__item eachItem">
+ <template if:true={option.selected}>
+ <lightning-icon icon-name="utility:check" size="x-small" alternative-text="icon" ></lightning-icon>
+ </template>
+ <span class="slds-media slds-listbox__option_entity verticalAlign slds-truncate">{option.label}</span>
+ </li>
+ </template>
+ </template>
+ </template>
+ <template if:true={message} >
+ <li class="slds-listbox__item">
+ <span class="slds-media slds-listbox__option_entity verticalAlign slds-truncate">{message}</span>
+ </li>
+ </template>
+ </ul>
+ </div>
+ </template>
+ </div>
+ </div>
+ <!-- Multi Select Pills -->
+ <template for:each={optionData} for:item="option">
+ <template if:true={option.selected}>
+ <lightning-pill key={option.value} class="slds-m-around_xx-small" name={option.value} label={option.label} onremove={removePill}></lightning-pill>
+ </template>
+ </template>
+</template>
+
+
diff --git a/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js
new file mode 100644
index 0000000..5bd3990
--- /dev/null
+++ b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js
@@ -0,0 +1,173 @@
+/* Code by CafeForce || www.cafeforce.com || support@cafeforce.com || Mandatory Header */
+import { LightningElement, track, api } from 'lwc';
+
+export default class MultiSelectCombobox extends LightningElement {
+
+ @api options;
+ @api selectedValue;
+ @api selectedValues = [];
+ @api label;
+ @api minChar = 2;
+ @api disabled = false;
+ @api multiSelect = false;
+ @track value;
+ @track values = [];
+ @track optionData;
+ @track searchString;
+ @track message;
+ @track showDropdown = false;
+
+ connectedCallback() {
+ this.showDropdown = false;
+ var optionData = this.options ? (JSON.parse(JSON.stringify(this.options))) : null;
+ var value = this.selectedValue ? (JSON.parse(JSON.stringify(this.selectedValue))) : null;
+ var values = this.selectedValues ? (JSON.parse(JSON.stringify(this.selectedValues))) : null;
+ if(value || values) {
+ var searchString;
+ var count = 0;
+ for(var i = 0; i < optionData.length; i++) {
+ if(this.multiSelect) {
+ if(values.includes(optionData[i].value)) {
+ optionData[i].selected = true;
+ count++;
+ }
+ } else {
+ if(optionData[i].value == value) {
+ searchString = optionData[i].label;
+ }
+ }
+ }
+ if(this.multiSelect)
+ this.searchString = count + ' Option(s) Selected';
+ else
+ this.searchString = searchString;
+ }
+ this.value = value;
+ this.values = values;
+ this.optionData = optionData;
+ }
+
+ filterOptions(event) {
+ this.searchString = event.target.value;
+ if( this.searchString && this.searchString.length > 0 ) {
+ this.message = '';
+ if(this.searchString.length >= this.minChar) {
+ var flag = true;
+ for(var i = 0; i < this.optionData.length; i++) {
+ if(this.optionData[i].label.toLowerCase().trim().startsWith(this.searchString.toLowerCase().trim())) {
+ this.optionData[i].isVisible = true;
+ flag = false;
+ } else {
+ this.optionData[i].isVisible = false;
+ }
+ }
+ if(flag) {
+ this.message = "No results found for '" + this.searchString + "'";
+ }
+ }
+ this.showDropdown = true;
+ } else {
+ this.showDropdown = false;
+ }
+ }
+
+ selectItem(event) {
+ var selectedVal = event.currentTarget.dataset.id;
+ if(selectedVal) {
+ var count = 0;
+ var options = JSON.parse(JSON.stringify(this.optionData));
+ for(var i = 0; i < options.length; i++) {
+ if(options[i].value === selectedVal) {
+ if(this.multiSelect) {
+ if(this.values.includes(options[i].value)) {
+ this.values.splice(this.values.indexOf(options[i].value), 1);
+ } else {
+ this.values.push(options[i].value);
+ }
+ options[i].selected = options[i].selected ? false : true;
+ } else {
+ this.value = options[i].value;
+ this.searchString = options[i].label;
+ }
+ }
+ if(options[i].selected) {
+ count++;
+ }
+ }
+ this.optionData = options;
+ if(this.multiSelect)
+ this.searchString = count + ' Option(s) Selected';
+ if(this.multiSelect)
+ event.preventDefault();
+ else
+ this.showDropdown = false;
+ }
+ }
+
+ showOptions() {
+ if(this.disabled == false && this.options) {
+ this.message = '';
+ this.searchString = '';
+ var options = JSON.parse(JSON.stringify(this.optionData));
+ for(var i = 0; i < options.length; i++) {
+ options[i].isVisible = true;
+ }
+ if(options.length > 0) {
+ this.showDropdown = true;
+ }
+ this.optionData = options;
+ }
+ }
+
+ removePill(event) {
+ var value = event.currentTarget.name;
+ var count = 0;
+ var options = JSON.parse(JSON.stringify(this.optionData));
+ for(var i = 0; i < options.length; i++) {
+ if(options[i].value === value) {
+ options[i].selected = false;
+ this.values.splice(this.values.indexOf(options[i].value), 1);
+ }
+ if(options[i].selected) {
+ count++;
+ }
+ }
+ this.optionData = options;
+ if(this.multiSelect)
+ this.searchString = count + ' Option(s) Selected';
+ }
+
+ blurEvent() {
+ var previousLabel;
+ var count = 0;
+ for(var i = 0; i < this.optionData.length; i++) {
+ if(this.optionData[i].value === this.value) {
+ previousLabel = this.optionData[i].label;
+ }
+ if(this.optionData[i].selected) {
+ count++;
+ }
+ }
+ if(this.multiSelect)
+ this.searchString = count + ' Option(s) Selected';
+ else
+ this.searchString = previousLabel;
+
+ this.showDropdown = false;
+
+ this.dispatchEvent(new CustomEvent('select', {
+ detail: {
+ 'payloadType' : 'multi-select',
+ 'payload' : {
+ 'value' : this.value,
+ 'values' : this.values
+ }
+ }
+ }));
+ }
+}
+/*
+ Code by CafeForce
+ Website: http://www.cafeforce.com
+ DO NOT REMOVE THIS HEADER/FOOTER FOR FREE CODE USAGE
+*/
\ No newline at end of file
diff --git a/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js-meta.xml b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js-meta.xml
new file mode 100644
index 0000000..f8c5cb4
--- /dev/null
+++ b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>56.0</apiVersion>
+ <isExposed>false</isExposed>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/pages/EquipmentRentalCancel.page b/force-app/main/default/pages/EquipmentRentalCancel.page
new file mode 100644
index 0000000..97ce137
--- /dev/null
+++ b/force-app/main/default/pages/EquipmentRentalCancel.page
@@ -0,0 +1,121 @@
+<apex:page Controller="EquipmentRentalCancelController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="鍙栨秷涓�瑙�" lightningStylesheets="true">
+<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+
+<script type="text/javascript">
+function savejs() {
+ if (confirm('鏄惁鎿嶄綔鍙栨秷锛�')) {
+ blockme();
+ saveBtn();
+ }
+}
+function returnjs() {
+ var rentalApplyId = j$(escapeVfId('allPage:allForm:allBlock:rentalApplyId')).text();
+ var url = "/" + rentalApplyId;
+ window.location.href = url;
+}
+function refresh() {
+ var hasError = j$(escapeVfId('allPage:allForm:allBlock:hasError')).text();
+ if (hasError == 'false') {
+ returnjs();
+ }
+}
+/** 20210708 SFDC-C448KZ you start**/
+var cnt = {!EquipmentSetCnt};
+ function changeCancleReasonJs(){
+
+ for (var i = 0; i < cnt; i++) {
+ var Cancel_Reason = j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Cancel_Reason')).value();
+ // && j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':rowCheck')).attr('checked') == 'checked'
+ if(Cancel_Reason != '琚姩鍙栨秷'){
+ j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Loaner_cancel_request')).val('');
+ j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Loaner_cancel_request')).attr('disabled',true);
+ }
+ }
+
+}
+function changeReasonJs(){
+ for (var i = 0; i < cnt; i++) {
+ var reason = j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Loaner_cancel_reason')).value();
+ if(reason != null && reason == '鍏朵粬'){
+ j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Loaner_cancel_request')).attr('disabled',false);
+ }else{
+ j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Loaner_cancel_request')).val('');
+ j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':Loaner_cancel_request')).attr('disabled',true);
+ }
+ }
+}
+/** 20210708 SFDC-C448KZ you end**/
+</script>
+
+ <apex:form id="allForm">
+ <apex:actionFunction name="saveBtn" action="{!saveBtn}" rerender="allBlock,message" onComplete="unblockUI();refresh();changeReasonJs();">
+ </apex:actionFunction>
+ <apex:outputPanel id="allPanel">
+ <apex:pageBlock title="鍙栨秷涓�瑙�" id="allBlock">
+ <apex:pageBlockButtons >
+ <apex:commandButton onclick="savejs(); return false;" value="淇濆瓨" disabled="{!saveBtn}" rerender="dummy"/>
+ <apex:commandButton onclick="returnjs(); return false;" value="杩斿洖" rerender="dummy"/>
+ </apex:pageBlockButtons>
+
+ <apex:outputPanel id="message">
+ <apex:pageMessages />
+ </apex:outputPanel>
+
+ <apex:outputText id="hasError" value="{!hasError}" style="display:none"/>
+ <apex:outputText id="rentalApplyId" value="{!rentalApplyId}" style="display:none"/>
+ <apex:inputHidden id="EquipmentSetCnt" value="{!EquipmentSetCnt}"/><!--20210708 SFDC-C448KZ you -->
+
+ <table class="linetable" border="1" style="border-collapse: collapse;">
+ <colgroup>
+ <col width="25"/>
+ <col width="110"/>
+ <col width="110"/>
+ <col width="110"/>
+ <col width="110"/>
+ <col width="110"/>
+ <col width="175"/>
+ </colgroup>
+ <tr style="background-color:#DCDCDC;">
+ <th style="text-align:center"> </th>
+ <th style="text-align:center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Name.label}</th>
+ <th style="text-align:center">{!$ObjectType.Fixture_Set__c.fields.Name.label}</th>
+ <th style="text-align:center">{!$ObjectType.Fixture_Set__c.fields.Loaner_name__c.label}</th>
+ <th style="text-align:center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.RAES_Status__c.label}</th>
+ <th style="text-align:center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Rental_Start_Date__c.label}</th>
+ <th style="text-align:center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Final_reply_day__c.label}</th>
+ <th style="text-align:center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Cancel_Reason__c.label}</th>
+ <!--20210708 SFDC-C448KZ you -->
+ <th style="text-align:center;width:80px">
+ {!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_reason__c.label}</th>
+ <th style="text-align:center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_Remarks__c.label}</th>
+ </tr>
+ <apex:repeat value="{!lineInfoList}" var="info" id="records">
+ <tr>
+ <!--<td align="center"><apex:inputCheckbox value="{!info.isSelect}" id="rowCheck" disabled="{!IF(info.status=='cantCancel', true, false)}"/></td>-->
+ <td align="center"><apex:inputCheckbox value="{!info.isSelect}" id="rowCheck"/></td>
+ <td align="left"><apex:outputText value="{!info.raes.Name}"></apex:outputText></td>
+ <td align="left"><apex:outputText value="{!info.esName}"></apex:outputText></td>
+ <td align="left"><apex:outputText value="{!info.loanerCode}"></apex:outputText></td>
+ <td align="left"><apex:outputText value="{!info.raes.RAES_Status__c}"></apex:outputText></td>
+ <td align="center"><apex:outputField value="{!info.raes.Rental_Start_Date__c}"></apex:outputField></td>
+ <td align="center"><apex:outputField value="{!info.raes.Final_reply_day__c}"></apex:outputField></td>
+ <td align="right">
+ <!--<apex:inputField id="reason" value="{!info.raes.Cancel_Reason__c}" rendered="{!IF(info.status=='canCancel', true, false)}"/>
+ <apex:outputField value="{!info.raes.Cancel_Reason__c}" rendered="{!IF(info.status=='canCancel', false, true)}"/>-->
+ <apex:inputField id="Cancel_Reason" value="{!info.raes.Cancel_Reason__c}" onchange="changeCancleReasonJs();"/>
+ <!-- <apex:outputField value="{!info.raes.Cancel_Reason__c}"/> -->
+ </td>
+ <!--20210708 SFDC-C448KZ you -->
+ <td align="right">
+ <apex:inputField value="{!info.raes.Loaner_cancel_reason__c}" id="Loaner_cancel_reason" onchange="changeReasonJs();"/>
+ </td>
+ <td align="center"><apex:inputField value="{!info.raes.Loaner_cancel_Remarks__c}" id="Loaner_cancel_request" html-disabled="true"></apex:inputField></td>
+ </tr>
+ </apex:repeat>
+ </table>
+ </apex:pageBlock>
+ </apex:outputPanel>
+ </apex:form>
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/EquipmentRentalCancel.page-meta.xml b/force-app/main/default/pages/EquipmentRentalCancel.page-meta.xml
new file mode 100644
index 0000000..74500f5
--- /dev/null
+++ b/force-app/main/default/pages/EquipmentRentalCancel.page-meta.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>34.0</apiVersion>
+ <availableInTouch>false</availableInTouch>
+ <confirmationTokenRequired>false</confirmationTokenRequired>
+ <label>EquipmentRentalCancel</label>
+</ApexPage>
diff --git a/force-app/main/default/pages/RentalApplySplit.page b/force-app/main/default/pages/RentalApplySplit.page
new file mode 100644
index 0000000..2410174
--- /dev/null
+++ b/force-app/main/default/pages/RentalApplySplit.page
@@ -0,0 +1,176 @@
+<apex:page controller="RentalApplySplitController" action="{!init}" showHeader="false" id="allPage" lightningStylesheets="true">
+ <head>
+ <title>澶囧搧鍊熷嚭鐢宠鍒嗗崟</title>
+ <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+ <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+ </head>
+ <style type="text/css">
+ .hideDropdown select{
+ display: none
+ }
+ .modal {
+ display:none;
+ position: fixed; /* Stay in place */
+ z-index: 10; /* Sit on top */
+ left: 0;
+ top: 0;
+ width: 100%; /* Full width */
+ height: 100%; /* Full height */
+ overflow: auto; /* Enable scroll if needed */
+ background-color: rgb(0,0,0); /* Fallback color */
+ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
+ }
+ span.dateFormat {
+ display: none;
+ }
+
+ /* Modal Content/Box */
+ .modal-content {
+ background-color: #fefefe;
+ margin-left: 6px;
+ margin-top: 100px;
+ padding: 20px;
+ border: 1px solid #888;
+ right: 5%;
+ position: absolute;
+ width: 200px;
+ }
+ .modal-content-cancel {
+ background-color: #fefefe;
+ margin-left: -150px;
+ margin-top: 100px;
+ padding: 20px;
+ border: 1px solid #888;
+ left: 50%;
+ position: absolute;
+ width: 300px;
+ }
+ body .slds-vf-data-table thead th{
+ background: none;
+ }
+ /*table.list td{
+ width:100px;
+ border-width: 1px;
+ }
+ table.list td.col_chk {
+ width:30px;
+ }
+ body .pbBody table.list tr.headerRow td, body .pbBody table.list tr.headerRow th {
+ border-width: 1px;
+ }*/
+ </style>
+ <apex:form id="allForm">
+ <script type="text/javascript">
+ function back() {
+ window.opener.parent.location.href = "/{!ra.Id}";
+ top.window.close();
+ }
+
+ function checkSaveStatus() {
+ var saveStatus = document.getElementById('{!$Component.allForm.saveStatus}').value;
+ if (saveStatus == 'ok') {
+ //20210609 ljh update 1732 start
+ var temp = '{!cloneRas.Id}';
+ console.log(temp);
+ if( temp == null || temp == '' ){
+ window.open("/{!ra.Id}");
+ }else{
+ window.open("/{!cloneRas.Id}");
+ }
+ //20210609 ljh update 1732 end
+ top.window.close();
+ }
+ }
+ //鐜板湴绠$悊鍒嗗崟 202100609 ljh update 1732
+ function changeSplitApplyReason(){
+ var reason = j$(escapeVfId('allPage:allForm:searchBlock:split:split0:Split_Apply_Reason')).value();
+ console.log(reason);
+ var RecordTypeIsAgency = j$(escapeVfId('allPage:allForm:RecordTypeIsAgency')).value();
+ if(reason != null && (reason == '鐜板湴绠$悊鍒嗗崟'
+ || (eval(RecordTypeIsAgency) && reason == '鍒拌揣NG鍒嗗崟'))
+ ){
+ //鍔炰簨澶勫繀椤诲~鍐�
+ j$(escapeVfId('allPage:allForm:searchBlock:split:ToAgency0:ToAgency')).attr('disabled',false);
+ j$(escapeVfId('allPage:allForm:searchBlock:split:ToAgency0:ToAgency')).attr('required',true);
+ }else{
+ if(!(eval(RecordTypeIsAgency) && reason != null && reason == '鍒拌揣NG鍒嗗崟')){
+ //鍔炰簨澶勬竻绌� 鍙
+ j$(escapeVfId('allPage:allForm:searchBlock:split:ToAgency0:ToAgency')).val(null);
+ j$(escapeVfId('allPage:allForm:searchBlock:split:ToAgency0:ToAgency')).attr('disabled',true);
+ }
+ }
+ }
+ function allSplitShow(){
+ var allSplitShow = j$(escapeVfId('allPage:allForm:allSplitShow')).value();
+ if(eval(allSplitShow)){
+ j$('#AllSplitModal').show();
+ }
+ }
+ </script>
+ <apex:pageMessages />
+ <apex:inputHidden value="{!saveStatus}" id="saveStatus"/>
+ <!-- 20210609 ljh add 1732 start-->
+ <apex:inputHidden value="{!allSplitShow}" id="allSplitShow"/>
+ <apex:inputHidden value="{!RecordTypeIsAgency}" id="RecordTypeIsAgency"/>
+ <div id="AllSplitModal" class="modal">
+ <div class="modal-content-cancel">
+ <table>
+ <tr>
+ <td colspan="2">
+ 鏄惁瑕佹暣鍗曞垎{!IF(SplitNum == 1,'鍥炲鍝佷腑蹇冿紵',IF(SplitNum == 2,'缁欏叾浠栧姙浜嬪锛�',IF(SplitNum == 3,'缁欏姙浜嬪锛�','')))}
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center">
+ <apex:commandButton style="margin: 0 20px;" value="纭畾" action="{!saveSplitAll}" oncomplete="checkSaveStatus();unblockUI();" onclick="j$('#AllSplitModal').hide();blockme();" rerender="allForm"
+ />
+ <apex:commandButton style="margin: 0 20px;" value="鍙栨秷" onclick="j$('#AllSplitModal').hide();return false;"/>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <!-- 20210609 ljh add 1732 end-->
+ <apex:pageBlock id="searchBlock" tabStyle="Report">
+ <apex:pageBlockSection title="澶囧搧鍊熷嚭鐢宠鍒嗗崟" collapsible="false" id="split">
+ <apex:pageBlockSectionItem >
+ <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Name.label}" for="Name"/>
+ <apex:outputField value="{!ra.Name}" id="Name"/>
+ </apex:pageBlockSectionItem>
+ <!-- 20201119 ljh update start -->
+ <apex:pageBlockSectionItem id="split0">
+ <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Split_Apply_Reason__c.label}" for="Split_Apply_Reason"/>
+ <apex:inputField value="{!cloneRas.Split_Apply_Reason__c}" id="Split_Apply_Reason" required="true" onchange="changeSplitApplyReason();"/>
+ </apex:pageBlockSectionItem>
+ <!-- 20201117 ljh add start -->
+ <apex:pageBlockSectionItem id="ToAgency0">
+ <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.ToAgency__c.label}" for="Name"/>
+ <apex:inputField value="{!cloneRas.ToAgency__c}" id="ToAgency" />
+ </apex:pageBlockSectionItem>
+ <apex:pageBlockSectionItem html-style="display: none;">
+ <apex:inputField value="{!cloneRas.SalesdeptSelect__c}" id="SalesdeptSelect" style="display: none;" />
+ </apex:pageBlockSectionItem>
+ <!-- 20201117 ljh add end -->
+ </apex:pageBlockSection>
+
+ <apex:dataTable value="{!raesList}" var="raes" id="raesLists" border="allPage" cellpadding="5">
+ <apex:column>
+ <apex:facet name="header">鍊熷嚭澶囧搧閰嶅涓�瑙圢o.</apex:facet>
+ <apex:outputText value="{!raes.Name}" />
+ </apex:column>
+ <apex:column >
+ <apex:facet name="header">鍊熷嚭閰嶅鍨嬪彿</apex:facet>
+ <apex:outputText value="{!raes.Loaner_code_F__c}" />
+ </apex:column>
+ <apex:column >
+ <apex:facet name="header">鍊熷嚭澶囧搧閰嶅涓�瑙堢姸鎬�</apex:facet>
+ <apex:outputText value="{!raes.RAES_Status__c}" />
+ </apex:column>
+ </apex:dataTable>
+ <div style="height: 15px"></div>
+ <apex:commandButton value="纭鍒嗗崟" action="{!saveSplit}" oncomplete="allSplitShow();checkSaveStatus();unblockUI();" onclick="blockme();" rerender="allForm" />
+ <apex:commandButton value="杩斿洖" onclick="back(); return false;" rerender="allForm" oncomplete="unblockUI();" />
+ </apex:pageBlock>
+ </apex:form>
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/RentalApplySplit.page-meta.xml b/force-app/main/default/pages/RentalApplySplit.page-meta.xml
new file mode 100644
index 0000000..5eb6cf2
--- /dev/null
+++ b/force-app/main/default/pages/RentalApplySplit.page-meta.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>35.0</apiVersion>
+ <availableInTouch>false</availableInTouch>
+ <confirmationTokenRequired>false</confirmationTokenRequired>
+ <label>RentalApplySplit</label>
+</ApexPage>
--
Gitblit v1.9.1