From 8cb9ec8168351f3a1db37b16a037de9d00fb6025 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期四, 13 四月 2023 17:51:55 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
---
force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js-meta.xml | 11 ++
force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.js | 53 ++++++++++
force-app/main/default/classes/EquipmentRentalPicturePDFController.cls-meta.xml | 5 +
force-app/main/default/classes/EquipmentRentalPicturePDFController.cls | 32 ++++++
force-app/main/default/classes/ReturnDeliverySlipController.cls-meta.xml | 5 +
force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.css | 22 ++++
force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js | 41 ++++++++
force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.css | 22 ++++
force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.js-meta.xml | 11 ++
force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.html | 5 +
force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.html | 5 +
force-app/main/default/classes/ReturnDeliverySlipController.cls | 37 +++++++
12 files changed, 249 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/EquipmentRentalPicturePDFController.cls b/force-app/main/default/classes/EquipmentRentalPicturePDFController.cls
new file mode 100644
index 0000000..d7ceca7
--- /dev/null
+++ b/force-app/main/default/classes/EquipmentRentalPicturePDFController.cls
@@ -0,0 +1,32 @@
+public with sharing class EquipmentRentalPicturePDFController {
+
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new InitData();
+ try {
+ Rental_Apply__c ra = [SELECT Id, Shipment_requested_cnt__c from Rental_Apply__c where Id = :recordId];
+ if(ra.Shipment_requested_cnt__c > 0){
+ List<Rental_Apply_Equipment_Set__c> raeSet = [select Id from Rental_Apply_Equipment_Set__c where Rental_Apply__c = :recordId and Yi_Shipment_request__c > 0 and RAES_Status__c != '鍙栨秷'];
+ Integer setLength = raeSet.size();
+ res.pageLength = Math.mod(setLength,10)== 0 ? setLength/10 : (setLength/10) +1 ;
+ res.raesList = raeSet;
+ }
+ res.ShipmentRequestedCnt = Integer.valueOf(ra.Shipment_requested_cnt__c);
+ }
+ catch (Exception e) {
+ System.debug(LoggingLevel.INFO, '****e:' + e);
+ }
+ return res;
+ }
+
+ public class InitData{
+ @AuraEnabled
+ public String Id;
+ @AuraEnabled
+ public Integer pagelength;
+ @AuraEnabled
+ public Integer ShipmentRequestedCnt;
+ @AuraEnabled
+ public List<Rental_Apply_Equipment_Set__c> raesList;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/EquipmentRentalPicturePDFController.cls-meta.xml b/force-app/main/default/classes/EquipmentRentalPicturePDFController.cls-meta.xml
new file mode 100644
index 0000000..9662499
--- /dev/null
+++ b/force-app/main/default/classes/EquipmentRentalPicturePDFController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>50.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/ReturnDeliverySlipController.cls b/force-app/main/default/classes/ReturnDeliverySlipController.cls
new file mode 100644
index 0000000..0a97ed6
--- /dev/null
+++ b/force-app/main/default/classes/ReturnDeliverySlipController.cls
@@ -0,0 +1,37 @@
+public with sharing class ReturnDeliverySlipController {
+ public ReturnDeliverySlipController() {
+
+ }
+
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new InitData();
+ try {
+ Rental_Apply__c ra = [SELECT Id, Name, Rental_Apply_Equipment_Set_Cnt__c, Loaner_received_ng_num__c from Rental_Apply__c where Id = :recordId];
+ res.raeSet = null;
+ if(ra.Rental_Apply_Equipment_Set_Cnt__c > 0){
+ List<Rental_Apply_Equipment_Set_Detail__c> raSet = [SELECT Id, Name from Rental_Apply_Equipment_Set_Detail__c WHERE Received_Confirm_F__c = 'NG' AND Cancel_Select__c = false AND Rental_Apply__c = :recordId];
+ res.raeSet = raSet;
+ system.debug('raeSet===='+res.raeSet);
+ }
+ res.Name = ra.Name;
+ res.RentalApplyEquipmentSetCnt = Integer.valueOf(ra.Rental_Apply_Equipment_Set_Cnt__c);
+ res.LoanerReceivedNgNum = Integer.valueOf(ra.Loaner_received_ng_num__c);
+ }
+ catch (Exception e) {
+ system.debug('INFO****' + e);
+ }
+ return res;
+ }
+
+ public class InitData{
+ @AuraEnabled
+ public Integer RentalApplyEquipmentSetCnt;
+ @AuraEnabled
+ public Integer LoanerReceivedNgNum;
+ @AuraEnabled
+ public String Name;
+ @AuraEnabled
+ public List<Rental_Apply_Equipment_Set_Detail__c> raeSet;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/ReturnDeliverySlipController.cls-meta.xml b/force-app/main/default/classes/ReturnDeliverySlipController.cls-meta.xml
new file mode 100644
index 0000000..9662499
--- /dev/null
+++ b/force-app/main/default/classes/ReturnDeliverySlipController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>50.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.css b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.css
new file mode 100644
index 0000000..635bc6c
--- /dev/null
+++ b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.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/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.html b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.html
new file mode 100644
index 0000000..49a10f7
--- /dev/null
+++ b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.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/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js
new file mode 100644
index 0000000..bd82704
--- /dev/null
+++ b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js
@@ -0,0 +1,41 @@
+import { LightningElement, track, wire, api } from 'lwc';
+import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init from '@salesforce/apex/EquipmentRentalPicturePDFController.init';
+export default class lexEquipmentRentalPicturePDF 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(){
+ console.log(this.recordId);
+ init({
+ recordId: this.recordId
+ }).then(result=>{
+ //console.log('result.ShipmentRequestedCnt===' + result.ShipmentRequestedCnt)
+ if( result.ShipmentRequestedCnt > 0){
+ console.log(result.pagelength);
+ for(var i =0; i<result.pagelength; i++){
+ window.open('/apex/FixtureRentalPicturePDF?raid='+ this.recordId +'&page=' + i);
+ }
+ }else{
+ alert('褰撳墠鐨勭敵璇峰崟涓病鏈夊凡鍑哄簱鎸囩ず鐨勯厤濂椼��');
+ }
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }).catch(err=>{
+ this.dispatchEvent(new CloseActionScreenEvent());
+ console.log(err);
+ })
+ }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js-meta.xml b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js-meta.xml
new file mode 100644
index 0000000..74849f3
--- /dev/null
+++ b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOCMSubmit">
+ <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/lexReturnDeliverySlip/lexReturnDeliverySlip.css b/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.css
new file mode 100644
index 0000000..635bc6c
--- /dev/null
+++ b/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.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/lexReturnDeliverySlip/lexReturnDeliverySlip.html b/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.html
new file mode 100644
index 0000000..49a10f7
--- /dev/null
+++ b/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.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/lexReturnDeliverySlip/lexReturnDeliverySlip.js b/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.js
new file mode 100644
index 0000000..b8c66e8
--- /dev/null
+++ b/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.js
@@ -0,0 +1,53 @@
+import { LightningElement, track, wire, api } from 'lwc';
+import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import init from '@salesforce/apex/ReturnDeliverySlipController.init';
+
+
+export default class lexReturnDeliverySlip extends LightningElement {
+
+ @api recordId;
+ IsLoading = true;
+ raId;
+ raName;
+
+ @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(result.RentalApplyEquipmentSetCnt > 0){
+ console.log(JSON.stringify(result.raeSet));
+ if(JSON.stringify(result.raeSet) != '[]'){
+ var check = result.raeSet && result.raeSet.length>0;
+ if((check || result.RentalApplyEquipmentSetCnt - result.LoanerReceivedNgNum > 0) && result.RentalApplyEquipmentSetCnt > 0){
+ window.open("/apex/EquipmentSetShippmentReceived4?id=" + result.Name);
+ }else{
+ alert("娌℃湁鐢宠鑰呮敹鍒扮‘璁ょ殑鍊熷嚭澶囧搧");
+ }
+ }else{
+ alert("娌℃湁绗﹀悎鏉′欢鐨勫鍝佸�熷嚭鐢宠涓�瑙堟槑缁�");
+ console.log('else');
+ }
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }else{
+ this.dispatchEvent(new CloseActionScreenEvent());
+ alert("娌℃湁澶囧搧鍊熷嚭鐢宠涓�瑙堝強涓�瑙堟槑缁�");
+ }
+ }).catch(err=>{
+ this.dispatchEvent(new CloseActionScreenEvent());
+ console.log('err=='+err);
+ })
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.js-meta.xml b/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.js-meta.xml
new file mode 100644
index 0000000..74849f3
--- /dev/null
+++ b/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOCMSubmit">
+ <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
--
Gitblit v1.9.1