From 9865adca4699a8c42ac02e23b00006a45afd3d3d Mon Sep 17 00:00:00 2001
From: yumenghui <953181891@qq.com>
Date: 星期五, 07 七月 2023 17:28:06 +0800
Subject: [PATCH] 耗材备品申请:审批待提交 耗材备品配套一览明细:查看默认分配/重新分配/ 数据维护单:审批待提交
---
force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.js | 54 +++
force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.js | 65 ++++
force-app/main/default/classes/ConsumApplyApprovalProcessController.cls-meta.xml | 5
force-app/main/default/classes/ConsumApplyEquipmentSetDefaultController.cls | 23 +
force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.js | 216 ++++++++++++++
force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/__tests__/lexConsumApplySubmitApprovalProcess.test.js | 25 +
force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.html | 5
force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.js-meta.xml | 11
force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/__tests__/lexConsumApplyEquipmentSetConsumDefaultSelect.test.js | 25 +
force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/__tests__/lexConsumApplyEquipmentSetReassign.test.js | 25 +
force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.html | 5
force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.css | 22 +
force-app/main/default/classes/ConsumApplyEquipmentSetReaController.cls-meta.xml | 5
force-app/main/default/classes/ConsumApplyEquipmentSetReaController.cls | 26 +
force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.js-meta.xml | 20 +
force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/__tests__/lexAssetMaintainHeaderSubmitApprovalProcess.test.js | 25 +
force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.js | 56 +++
force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.html | 5
force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.css | 22 +
force-app/main/default/classes/ConsumApplyApprovalProcessController.cls | 153 ++++++++++
force-app/main/default/classes/ConsumApplyEquipmentSetDefaultController.cls-meta.xml | 5
force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.js-meta.xml | 11
force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.html | 5
force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.css | 22 +
force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.css | 22 +
force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.js-meta.xml | 19 +
26 files changed, 877 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/ConsumApplyApprovalProcessController.cls b/force-app/main/default/classes/ConsumApplyApprovalProcessController.cls
new file mode 100644
index 0000000..49d2d30
--- /dev/null
+++ b/force-app/main/default/classes/ConsumApplyApprovalProcessController.cls
@@ -0,0 +1,153 @@
+public with sharing class ConsumApplyApprovalProcessController {
+
+ @AuraEnabled
+ public static InitDate initSubmitApprovalProcessController(String recordId) {
+ InitDate res = new InitDate();
+
+
+ Consum_Apply__c apply = [SELECT Id,
+ Request_Shipping_7days_Before__c,
+ Request_shipping_day__c,
+ Campaign__c,
+ QIS_number__c,
+ QIS_ID_Line__c,
+ Status__c,
+ Min_Consum_Can_Request_approval_Date__c,
+ applyUser__c,
+ JingliApprovalManager__c,
+ SalesManager__c,
+ BuchangApprovalManager__c,
+ BuchangApprovalManagerSales__c,
+ ZongjianApprovalManager__c,
+ OwnerId FROM Consum_Apply__c WHERE Id = :recordId LIMIT 1];
+ res.id = apply.Id;
+ res.shippingDays = apply.Request_Shipping_7days_Before__c;
+ res.shippingDay = apply.Request_shipping_day__c;
+ res.campaign = apply.Campaign__c;
+ res.qISNumber = apply.QIS_number__c;
+ res.qISIDLine = apply.QIS_ID_Line__c;
+ res.status = apply.Status__c;
+ res.minApprovalDate = apply.Min_Consum_Can_Request_approval_Date__c;
+ res.applyUser = apply.applyUser__c;
+ res.jingliManager = apply.JingliApprovalManager__c;
+ res.salesManager = apply.SalesManager__c;
+ res.buchangManager = apply.BuchangApprovalManager__c;
+ res.buchangManagerSale = apply.BuchangApprovalManagerSales__c;
+ res.zongjianManager = apply.ZongjianApprovalManager__c;
+ res.owner = apply.OwnerId;
+
+
+ return res;
+
+ }
+
+ public class InitDate{
+
+ @AuraEnabled
+ public String id;
+
+ @AuraEnabled
+ public Date shippingDays;//甯屾湜鍒拌揣鏃ュ墠7涓伐浣滄棩
+
+ @AuraEnabled
+ public Date shippingDay;//甯屾湜鍒拌揣鏃�
+
+ @AuraEnabled
+ public String campaign ;//瀛︿細
+
+ @AuraEnabled
+ public String qISNumber;//QIS
+
+ @AuraEnabled
+ public String qISIDLine;//QIS鐨処D鍊�
+
+ @AuraEnabled
+ public String status;// 鐘舵��
+
+ @AuraEnabled
+ public Date minApprovalDate;//鏈�灏忓彲浠ユ彁浜ょ敵璇锋棩鏈�
+
+ @AuraEnabled
+ public String applyUser;//鎿嶄綔鑰�
+
+ @AuraEnabled
+ public String jingliManager;//CL6 缁忕悊绾�(鏈嶅姟)
+
+ @AuraEnabled
+ public String salesManager;//CL6 缁忕悊绾�
+
+ @AuraEnabled
+ public String buchangManager;//CL5 鎬荤洃绾�(鏈嶅姟)
+
+ @AuraEnabled
+ public String buchangManagerSale;//CL5 鎬荤洃绾�
+
+ @AuraEnabled
+ public String zongjianManager;//CL4 楂樼骇鎬荤洃
+
+ @AuraEnabled
+ public String owner;//鎵�鏈変汉
+
+ }
+
+ @AuraEnabled
+ public static List<Campaign> selectCampaignById(String recordId){
+
+ List<Campaign> campaign=[SELECT Status, Rental_Apply_Flag__c FROM Campaign WHERE id =:recordId];
+
+ return campaign;
+ }
+
+ @AuraEnabled
+ public static List<QIS_report__c> selectReportById(String recordId){
+
+ List<QIS_report__c> report=[SELECT id,next_action__c FROM QIS_report__c WHERE id =:recordId];
+ return report;
+ }
+
+ @AuraEnabled
+ public static List<Consum_Apply_Equipment_Set__c> selectEquipmentById(String recordId){
+
+ List<Consum_Apply_Equipment_Set__c> equipment=[SELECT Id FROM Consum_Apply_Equipment_Set__c
+ WHERE RetalFSetDetail_Cnt__c = 0 AND Consum_Apply__c =:recordId];
+
+ return equipment;
+ }
+
+ @AuraEnabled
+ public static String approvalCheck(String recordId){
+
+ String res = ConsumApplyWebService.approvalCheck(recordId);
+ return res;
+ }
+
+ @AuraEnabled
+ public static String setSObjectShare(String applyUser,String parentId,List<String> userAccess, String ownerId){
+
+ String res = ControllerUtil.setSObjectShare('Consum_Apply__Share',applyUser,parentId,userAccess,ownerId);
+ return res;
+ }
+
+ @AuraEnabled
+ public static String updateConsumApply(String recordId){
+ Consum_Apply__c apply = [SELECT Id,
+ Request_Shipping_7days_Before__c,
+ Request_shipping_day__c,
+ Campaign__c,
+ QIS_number__c,
+ QIS_ID_Line__c,
+ Status__c,
+ Min_Consum_Can_Request_approval_Date__c,
+ applyUser__c,
+ JingliApprovalManager__c,
+ SalesManager__c,
+ BuchangApprovalManager__c,
+ BuchangApprovalManagerSales__c,
+ ZongjianApprovalManager__c,
+ OwnerId FROM Consum_Apply__c WHERE Id = :recordId LIMIT 1];
+ apply.Status__c = '濉啓瀹屾瘯';
+ update apply;
+
+ return '1';
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/ConsumApplyApprovalProcessController.cls-meta.xml b/force-app/main/default/classes/ConsumApplyApprovalProcessController.cls-meta.xml
new file mode 100644
index 0000000..754ecb1
--- /dev/null
+++ b/force-app/main/default/classes/ConsumApplyApprovalProcessController.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/classes/ConsumApplyEquipmentSetDefaultController.cls b/force-app/main/default/classes/ConsumApplyEquipmentSetDefaultController.cls
new file mode 100644
index 0000000..9043f01
--- /dev/null
+++ b/force-app/main/default/classes/ConsumApplyEquipmentSetDefaultController.cls
@@ -0,0 +1,23 @@
+public with sharing class ConsumApplyEquipmentSetDefaultController {
+ @AuraEnabled
+ public static InitDate defaultSelect(String recordId) {
+ InitDate res = new InitDate();
+ Consum_Apply__c apply = [SELECT Id,
+ Yi_loaner_arranged__c FROM Consum_Apply__c WHERE Id = :recordId LIMIT 1];
+ res.yiLoanerArranged = apply.Yi_loaner_arranged__c;
+ return res;
+
+ }
+
+
+
+ public class InitDate{
+
+ @AuraEnabled
+ public String id;
+
+ @AuraEnabled
+ public Decimal yiLoanerArranged;
+
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/ConsumApplyEquipmentSetDefaultController.cls-meta.xml b/force-app/main/default/classes/ConsumApplyEquipmentSetDefaultController.cls-meta.xml
new file mode 100644
index 0000000..754ecb1
--- /dev/null
+++ b/force-app/main/default/classes/ConsumApplyEquipmentSetDefaultController.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/classes/ConsumApplyEquipmentSetReaController.cls b/force-app/main/default/classes/ConsumApplyEquipmentSetReaController.cls
new file mode 100644
index 0000000..6276029
--- /dev/null
+++ b/force-app/main/default/classes/ConsumApplyEquipmentSetReaController.cls
@@ -0,0 +1,26 @@
+public with sharing class ConsumApplyEquipmentSetReaController {
+
+
+
+ @AuraEnabled
+ public static InitDate reassign(String recordId) {
+ InitDate res = new InitDate();
+ Consum_Apply__c apply = [SELECT Id,
+ Status__c FROM Consum_Apply__c WHERE Id = :recordId LIMIT 1];
+ res.status = apply.Status__c;
+ return res;
+
+ }
+
+
+
+ public class InitDate{
+
+ @AuraEnabled
+ public String id;
+
+ @AuraEnabled
+ public String status;
+
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/ConsumApplyEquipmentSetReaController.cls-meta.xml b/force-app/main/default/classes/ConsumApplyEquipmentSetReaController.cls-meta.xml
new file mode 100644
index 0000000..754ecb1
--- /dev/null
+++ b/force-app/main/default/classes/ConsumApplyEquipmentSetReaController.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/lexAssetMaintainHeaderSubmitApprovalProcess/__tests__/lexAssetMaintainHeaderSubmitApprovalProcess.test.js b/force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/__tests__/lexAssetMaintainHeaderSubmitApprovalProcess.test.js
new file mode 100644
index 0000000..2792473
--- /dev/null
+++ b/force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/__tests__/lexAssetMaintainHeaderSubmitApprovalProcess.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexAssetMaintainHeaderSubmitApprovalProcess from 'c/lexAssetMaintainHeaderSubmitApprovalProcess';
+
+describe('c-lex-asset-maintain-header-submit-approval-process', () => {
+ 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-asset-maintain-header-submit-approval-process', {
+ is: LexAssetMaintainHeaderSubmitApprovalProcess
+ });
+
+ // 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/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.css b/force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.css
new file mode 100644
index 0000000..635bc6c
--- /dev/null
+++ b/force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.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/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.html b/force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.html
new file mode 100644
index 0000000..49a10f7
--- /dev/null
+++ b/force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.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/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.js b/force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.js
new file mode 100644
index 0000000..a4992b2
--- /dev/null
+++ b/force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.js
@@ -0,0 +1,65 @@
+import { LightningElement , 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 submitApply from '@salesforce/apex/AssetMaintainHeaderWebService.submitApply';
+import applyPermission from '@salesforce/apex/AssetMaintainHeaderWebService.applyPermission';
+
+export default class LexAssetMaintainHeaderSubmitApprovalProcess 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(){
+ applyPermission().then(res=>{
+ this.IsLoading = false;
+ if(res=='false'){
+ this.showToast('娌℃湁鎻愪氦鐢宠鐨勬潈闄�','error');
+ }else if(confirm('涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵')){
+ submitApply({
+ amhId: this.recordId
+ }).then(result=>{
+ if(result=='1'){
+ this.showToast('宸叉彁浜�','success');
+ }else{
+ this.showToast(result,'error');
+ }
+ })
+ }else{
+ this.IsLoading = false;
+ this.showToast('宸插彇娑�','error');
+ }
+ })
+
+ }
+
+ updateRecordView() {
+ updateRecord({fields: { Id: this.recordId }});
+ }
+
+ 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/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.js-meta.xml b/force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.js-meta.xml
new file mode 100644
index 0000000..727dc54
--- /dev/null
+++ b/force-app/main/default/lwc/lexAssetMaintainHeaderSubmitApprovalProcess/lexAssetMaintainHeaderSubmitApprovalProcess.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>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/lexConsumApplyEquipmentSetConsumDefaultSelect/__tests__/lexConsumApplyEquipmentSetConsumDefaultSelect.test.js b/force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/__tests__/lexConsumApplyEquipmentSetConsumDefaultSelect.test.js
new file mode 100644
index 0000000..bb40867
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/__tests__/lexConsumApplyEquipmentSetConsumDefaultSelect.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexConsumApplyEquipmentSetConsumDefaultSelect from 'c/lexConsumApplyEquipmentSetConsumDefaultSelect';
+
+describe('c-lex-consum-apply-equipment-set-consum-default-select', () => {
+ 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-consum-apply-equipment-set-consum-default-select', {
+ is: LexConsumApplyEquipmentSetConsumDefaultSelect
+ });
+
+ // 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/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.css b/force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.css
new file mode 100644
index 0000000..635bc6c
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.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/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.html b/force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.html
new file mode 100644
index 0000000..49a10f7
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.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/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.js b/force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.js
new file mode 100644
index 0000000..367a038
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.js
@@ -0,0 +1,54 @@
+import { LightningElement , 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 defaultSelect from '@salesforce/apex/ConsumApplyEquipmentSetDefaultController.defaultSelect';
+
+export default class LexConsumApplyEquipmentSetConsumDefaultSelect 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(){
+ this.IsLoading = false;
+ defaultSelect({recordId:this.recordId}).then(result=>{
+ console.log('result--->'+result);
+ if (result.yiLoanerArranged > 0 ) {
+ this.showToast('鍑哄簱涔嬪悗涓嶈兘鐐瑰嚮鏌ョ湅榛樿鍒嗛厤鎸夐挳,濡傛灉鏈夐渶瑕佸垎閰嶇殑鏄庣粏璇峰垎鍗曞悗缁х画鎿嶄綔','error')
+ return;
+ }
+ window.open("/apex/ConsumDefaultSelect?pt_recid="+this.recordId, '_top');
+ // window.open("/apex/ConsumDefaultSelect?pt_recid={!Consum_Apply__c.Id}", "_top");
+ })
+ }
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ title: '',
+ message: msg,
+ variant: type
+ });
+ 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/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.js-meta.xml b/force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.js-meta.xml
new file mode 100644
index 0000000..88b2850
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplyEquipmentSetConsumDefaultSelect/lexConsumApplyEquipmentSetConsumDefaultSelect.js-meta.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="LexConsumApplyEquipmentSetConsumDefaultSelect">
+ <apiVersion>57.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__RecordPage</target>
+ <target>lightning__AppPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ <target>lightning__FlowScreen</target>
+ </targets>
+ <!-- 瀹氫箟鍙橀噺 -->
+ <targetConfigs>
+ <targetConfig targets="lightning__FlowScreen">
+ <!-- name js涓娇鐢ㄧ殑鍙橀噺锛屼粠灞忓箷娴佷腑鑾峰彇鍙傛暟 label 鍦ㄥ睆骞曟祦鐨勮LWC鐨勮缃腑鏄剧ず -->
+ <property name="recordId" type="String" label="recordId"/>
+ </targetConfig>
+ </targetConfigs>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/__tests__/lexConsumApplyEquipmentSetReassign.test.js b/force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/__tests__/lexConsumApplyEquipmentSetReassign.test.js
new file mode 100644
index 0000000..688df6f
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/__tests__/lexConsumApplyEquipmentSetReassign.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexConsumApplyEquipmentSetReassign from 'c/lexConsumApplyEquipmentSetReassign';
+
+describe('c-lex-consum-apply-equipment-set-reassign', () => {
+ 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-consum-apply-equipment-set-reassign', {
+ is: LexConsumApplyEquipmentSetReassign
+ });
+
+ // 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/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.css b/force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.css
new file mode 100644
index 0000000..635bc6c
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.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/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.html b/force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.html
new file mode 100644
index 0000000..49a10f7
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.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/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.js b/force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.js
new file mode 100644
index 0000000..4debcb6
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.js
@@ -0,0 +1,56 @@
+import { LightningElement , 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 reassign from '@salesforce/apex/ConsumApplyEquipmentSetReaController.reassign';
+
+export default class LexConsumApplyEquipmentSetReassign extends LightningElement {
+ @api recordId;
+ @api consumEquipmentId;
+ 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(){
+ this.IsLoading = false;
+ reassign({recordId:this.recordId}).then(result=>{
+ console.log('result--->'+result);
+ if (result.status != '宸插嚭搴撴寚绀�' ) {
+ this.showToast('鑰楁潗璇峰崟娌℃湁鍑哄簱鎸囩ず涓嶈兘閲嶆柊鍒嗛厤','error')
+ return;
+ }
+ if(confirm('浣犵‘瀹氳閲嶆柊鍒嗛厤鍚�')){
+ window.open("/apex/ConsumReassign?caid="+this.recordId);
+ }
+
+ // window.location.href = "/apex/ConsumReassign?caid={!Consum_Apply__c.Id}";
+ })
+ }
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ title: '',
+ message: msg,
+ variant: type
+ });
+ 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/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.js-meta.xml b/force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.js-meta.xml
new file mode 100644
index 0000000..0420522
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplyEquipmentSetReassign/lexConsumApplyEquipmentSetReassign.js-meta.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="LexConsumApplyEquipmentSetReassign">
+ <apiVersion>57.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__RecordPage</target>
+ <target>lightning__AppPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ <target>lightning__FlowScreen</target>
+ </targets>
+ <!-- 瀹氫箟鍙橀噺 -->
+ <targetConfigs>
+ <targetConfig targets="lightning__FlowScreen">
+ <!-- name js涓娇鐢ㄧ殑鍙橀噺锛屼粠灞忓箷娴佷腑鑾峰彇鍙傛暟 label 鍦ㄥ睆骞曟祦鐨勮LWC鐨勮缃腑鏄剧ず -->
+ <property name="recordId" type="String" label="recordId"/>
+ <property name="consumEquipmentId" type="String[]" label="consumEquipmentId"/>
+ </targetConfig>
+ </targetConfigs>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/__tests__/lexConsumApplySubmitApprovalProcess.test.js b/force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/__tests__/lexConsumApplySubmitApprovalProcess.test.js
new file mode 100644
index 0000000..083dd91
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/__tests__/lexConsumApplySubmitApprovalProcess.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexConsumApplySubmitApprovalProcess from 'c/lexConsumApplySubmitApprovalProcess';
+
+describe('c-lex-consum-apply-submit-approval-process', () => {
+ 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-consum-apply-submit-approval-process', {
+ is: LexConsumApplySubmitApprovalProcess
+ });
+
+ // 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/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.css b/force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.css
new file mode 100644
index 0000000..635bc6c
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.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/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.html b/force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.html
new file mode 100644
index 0000000..49a10f7
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.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/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.js b/force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.js
new file mode 100644
index 0000000..5ddbbec
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.js
@@ -0,0 +1,216 @@
+import { LightningElement , 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 init from '@salesforce/apex/ConsumApplyApprovalProcessController.initSubmitApprovalProcessController';
+import selectCampaignById from '@salesforce/apex/ConsumApplyApprovalProcessController.selectCampaignById';
+import selectReportById from '@salesforce/apex/ConsumApplyApprovalProcessController.selectReportById';
+import selectEquipmentById from '@salesforce/apex/ConsumApplyApprovalProcessController.selectEquipmentById';
+import approvalCheck from '@salesforce/apex/ConsumApplyApprovalProcessController.approvalCheck';
+import setSObjectShare from '@salesforce/apex/ConsumApplyApprovalProcessController.setSObjectShare';
+import updateConsumApply from '@salesforce/apex/ConsumApplyApprovalProcessController.updateConsumApply';
+// import setSObjectShare from '@salesforce/apex/ControllerUtil.setSObjectShare';
+
+
+export default class LexConsumApplySubmitApprovalProcess extends LightningElement {
+
+ @api recordId;
+ id;
+ shippingDays;//甯屾湜鍒拌揣鏃ュ墠7涓伐浣滄棩
+ shippingDay;//甯屾湜鍒拌揣鏃�
+ campaign ;//瀛︿細
+ qISNumber;//QIS
+ qISIDLine;//QIS鐨処D鍊�
+ status;// 鐘舵��
+ minApprovalDate;//鏈�灏忓彲浠ユ彁浜ょ敵璇锋棩鏈�
+ applyUser;//鎿嶄綔鑰�
+ jingliManager;//CL6 缁忕悊绾�(鏈嶅姟)
+ salesManager;//CL6 缁忕悊绾�
+ buchangManager;//CL5 鎬荤洃绾�(鏈嶅姟)
+ buchangManagerSale;//CL5 鎬荤洃绾�
+ zongjianManager;//CL4 楂樼骇鎬荤洃
+ owner;//鎵�鏈変汉
+ 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( result => {
+ console.log('result'+result);
+ if(result!= null){
+ this.IsLoading = false;
+ this.id = result.id;
+ this.shippingDays = result.shippingDays;
+ this.shippingDay = result.shippingDay;
+ this.campaign = result.campaign;
+ this.qISNumber = result.qISNumber;
+ this.qISIDLine = result.qISIDLine;
+ this.status = result.status;
+ this.minApprovalDate = result.minApprovalDate;
+ this.applyUser = result.applyUser;
+ this.jingliManager = result.jingliManager;
+ this.salesManager = result.salesManager;
+ this.buchangManager = result.buchangManager;
+ this.buchangManagerSale = result.buchangManagerSale;
+ this.zongjianManager = result.zongjianManager;
+ this.owner = result.owner;
+
+ var date = new Date();
+ var day = date.getDate();
+
+ console.log('shipingDays'+this.shippingDays);
+ if(this.shippingDays < day){
+ this.showToast('姝ょ敵璇峰凡涓嶆弧瓒筹紙甯屾湜鍒拌揣鏃�-7宸ヤ綔鏃ワ級鍓嶅畬鎴愬鎵圭殑鎯呭喌锛岃閲嶆柊淇敼鐢宠銆�','error');
+ }
+
+ if(!confirm('涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵\n\n鈥� 闇�瑕佸湪'
+ +this.shippingDays+'鍓嶅畬鎴愬鎵癸紝鍚﹀垯鐢宠鍗曡嚜鍔ㄥ彇娑堛��')){
+ console.log('2222222222');
+ this.IsLoading = false;
+ this.showToast('宸插彇娑�','error')
+ }
+
+
+ console.log('3333333333333');
+ if(this.shippingDay < day){
+ this.showToast('甯屾湜鍒拌揣鏃ヤ笉鑳芥棭浜庣敵璇锋彁浜ゆ棩','error');
+ }
+
+ if(this.campaign != null && this.campaign != ''){
+ console.log('qqqqqqqqqqqqqq');
+ var dataList = new Array();
+ selectCampaignById({recordId: this.campaign}).then(data =>{
+ console.log('iiiiiiiiiiii');
+ dataList = data;
+ var interval = dataList[0].Status;
+ if (interval == '鑽夋涓�') {
+ this.showToast('瀛︿細鐘舵�佷负鑽夋涓紝涓嶈兘鎻愪氦','error');
+ }
+ if (interval == '鐢宠涓�') {
+ this.showToast('瀛︿細鐘舵�佷负鐢宠涓紝涓嶈兘鎻�','error');
+ }
+ if (interval == '宸茬粨鏉�') {
+ this.showToast('瀛︿細鐘舵�佷负宸茬粨鏉燂紝涓嶈兘鎻愪氦','error');
+ }
+ if (interval == '宸叉彁浜ゆ姤鍛�') {
+ this.showToast('瀛︿細鐘舵�佷负宸叉彁浜ゆ姤鍛婏紝涓嶈兘鎻愪氦','error');
+ }
+ if (interval == '鍙栨秷鐢宠涓�') {
+ this.showToast('瀛︿細鐘舵�佷负鍙栨秷鐢宠涓紝涓嶈兘鎻愪氦','error');
+ }
+ if (interval == '鍙栨秷') {
+ this.showToast('瀛︿細鐘舵�佷负鍙栨秷锛屼笉鑳芥彁浜�','error');
+ }
+ })
+ }
+ console.log('9888888888');
+ if(this.qISNumber != null && this.qISNumber != ''){
+ var resList = new Array();
+ selectReportById({recordId:this.qISIDLine}).then(res=>{
+ resList = res;
+ var interval = resList[0].next_action__c;
+ if (interval == '閫佸洖') {
+ this.showToast('QIS 宸查�佸洖锛屼笉鑳藉啀鐢宠澶囧搧浜�','error');
+ }
+ })
+ }
+
+ console.log('wwwwwwwwwww');
+ var userAccess = new Array();
+ userAccess.push(this.applyUser+'_Edit');
+ userAccess.push(this.jingliManager+'_Read');
+ userAccess.push(this.salesManager+'_Read');
+ userAccess.push(this.buchangManager+'_Read');
+ userAccess.push(this.buchangManagerSale+'_Read');
+ userAccess.push(this.zongjianManager+'_Read');
+
+ console.log('yyyyyyyyyy');
+ setSObjectShare({applyUser:this.applyUser,
+ parentId:this.Id,
+ userAccess:userAccess,
+ ownerId:this.owner}).then(res=>{
+ if(res!='OK'){
+ this.showToast(rtn,'error');
+ }
+ })
+ // var rtn = setSObjectShare(Consum_Apply__Share,this.applyUser,this.Id,userAccess,this.owner);
+ // if(rtn != 'OK'){
+ // this.showToast(rtn,'error');
+ // }
+
+ //娌℃湁this.status == '寮曞綋瀹屼簡'鐘舵��
+ if(this.status == '濉啓瀹屾瘯' || this.status == '鐢宠涓�' || this.status == '宸叉壒鍑�'
+ || this.status == '宸插嚭搴撴寚绀�' || this.status == '鍒犻櫎' || this.status == '鍙栨秷'){
+ this.showToast('璇峰鍝佺敵璇风姸鎬佺‘璁わ紝宸茬粡鎻愪氦杩囩殑鐢宠锛屼笉鑳介噸澶嶆彁浜�','error');
+ }
+ console.log('eeeeeeeeee');
+ if(this.minApprovalDate > day){
+ this.showToast('鐢宠鎻愪氦鏃ュ埌棰勮浣跨敤鏃ュ繀椤诲湪22涓伐浣滄棩浠ュ唴鎵嶅彲浠�','error');
+ }
+ var raesList = new Array();
+
+ console.log('ttttttttt');
+ selectEquipmentById({recordId:this.id}).then(raes=>{
+ raesList = raes;
+ if(raesList.length > 0){
+ this.showToast('鏈夋病鏈夋槑缁嗙殑鑰楁潗澶囧搧閰嶅涓�瑙堬紝涓嶈兘鎻愪氦','error');
+ }
+ })
+
+ console.log('99999999999'+this.id);
+ approvalCheck({recordId:this.id}).then(re1=>{
+ if(re1 != '1'){
+ this.showToast(re1,'error');
+ }
+ })
+
+ updateConsumApply({recordId:this.id}).then(re1=>{
+ if(re1 != '1'){
+ this.showToast(re1,'error');
+ }else{
+ this.showToast('宸叉彁浜�','success');
+ }
+ })
+ }else{
+ console.log('444444444444');
+ this.IsLoading = false;
+ this.showToast('result涓虹┖','error')
+ }
+
+ })
+
+ }
+
+
+
+
+
+updateRecordView() {
+ updateRecord({fields: { Id: this.recordId }});
+ }
+
+ 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/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.js-meta.xml b/force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.js-meta.xml
new file mode 100644
index 0000000..727dc54
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumApplySubmitApprovalProcess/lexConsumApplySubmitApprovalProcess.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>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
--
Gitblit v1.9.1