From 8d545727e0f91bbe313c16045319bfae928cea21 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期五, 07 四月 2023 08:54:56 +0800
Subject: [PATCH] 修改按钮 4.7
---
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.css | 22 +++++
force-app/main/default/lwc/lexQISAgree/lexQISAgree.js-meta.xml | 11 ++
force-app/main/default/lwc/lexQISAgree/lexQISAgree.css | 22 +++++
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js | 64 ++++++++++++++++
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js-meta.xml | 11 ++
force-app/main/default/lwc/lexQISAgree/lexQISAgree.html | 5 +
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.html | 5 +
force-app/main/default/lwc/lexQISAgree/lexQISAgree.js | 85 +++++++++++++++++++++
8 files changed, 225 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/lwc/lexQISAgree/lexQISAgree.css b/force-app/main/default/lwc/lexQISAgree/lexQISAgree.css
new file mode 100644
index 0000000..9acb129
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISAgree/lexQISAgree.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 *//* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISAgree/lexQISAgree.html b/force-app/main/default/lwc/lexQISAgree/lexQISAgree.html
new file mode 100644
index 0000000..c8bdbfc
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISAgree/lexQISAgree.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/lexQISAgree/lexQISAgree.js b/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js
new file mode 100644
index 0000000..5725e34
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js
@@ -0,0 +1,85 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { NavigationMixin } from 'lightning/navigation';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import init from '@salesforce/apex/QISReportController.initForQisAgreeButton';
+import updateQis from '@salesforce/apex/QISReportController.updateQisForQisAgree';
+import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
+import { updateRecord } from 'lightning/uiRecordApi';
+
+export default class lexQISAgree extends LightningElement {
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ OwnerId;
+ err;
+
+ @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;
+ }
+ }
+ }
+
+ connectedCallback () {
+ init({
+ recordId: this.recordId
+ }).then(result => {
+ this.IsLoading = false;
+ this.qisReportId = result.Id;
+ this.OwnerId = result.ownerId;
+ if (this.OwnerId != UserInfo_Owner.Id) {
+ const evt = new ShowToastEvent({
+ title : '鍙湁鎵�鏈夎�呭彲浠ユ寜QIS缁撴灉璺熻繘瀹屾瘯鐨勬寜閽�',
+ message: '',
+ variant: 'error'
+ });
+ this.dispatchEvent(evt);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }else{
+ this.updateQisSubmit();
+ }
+ }).catch(error => {
+ console.log('error='+error);
+ }).finally(() => {
+
+ });
+ }
+
+ updateRecordView(recordId) {
+ updateRecord({fields: { Id: recordId }});
+ }
+
+ updateQisSubmit(){
+ updateQis({
+ recordId: this.recordId
+ }).then(result =>{
+ console.log('result'+result);
+ this.err = result;
+ if (result!='鎴愬姛') {
+ const evt = new ShowToastEvent({
+ title : '鏇存柊澶辫触',
+ message: this.err,
+ variant: 'error'
+ });
+ this.dispatchEvent(evt);
+ }
+ this.dispatchEvent(new CloseActionScreenEvent());
+ this.updateRecordView(this.recordId);
+ }).catch(error => {
+ console.log('error='+error);
+ }).finally(() => {
+
+ });
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js-meta.xml b/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js-meta.xml
new file mode 100644
index 0000000..7a4ca36
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexQISAgree">
+ <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/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.css b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.css
new file mode 100644
index 0000000..79456f2
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.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;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.html b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.html
new file mode 100644
index 0000000..c8bdbfc
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.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/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
new file mode 100644
index 0000000..94c87ab
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
@@ -0,0 +1,64 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { NavigationMixin } from 'lightning/navigation';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import init from '@salesforce/apex/QISReportController.initForlexQISIntakeuniversalcodeButton';
+import sqlForPAE from '@salesforce/apex/QISReportController.sqlForPAE1';
+
+export default class lexQISIntakeuniversalcode extends LightningElement {
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ paeId;
+
+ @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;
+ }
+ }
+ }
+
+ connectedCallback () {
+ init({
+ recordId: this.recordId
+ }).then(result => {
+ console.log(result);
+ if (result != null) {
+ this.IsLoading = false;
+ this.qisReportId = result.Id;
+ var RecordTypeId = "ASRCDecision";
+ sqlForPAE({
+ qisReportId: this.qisReportId
+ }).then(result => {
+ if (result!=null) {
+ this.paeId = result.PAEid;
+ console.log('result='+this.paeId);
+ }
+ var url = '';
+ if (result!=null&&result.length>0){
+ url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ;
+ } else {
+ url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId;
+ }
+ console.log('url='+url);
+ window.location.replace(url);
+ });
+ }
+ }).catch(error => {
+ console.log('error='+error);
+ }).finally(() => {
+
+ });
+ }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js-meta.xml b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js-meta.xml
new file mode 100644
index 0000000..2ed1142
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexQISIntakeuniversalcode">
+ <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