From 1bc3f32b126277b5349564485665b462bb760354 Mon Sep 17 00:00:00 2001
From: zhangchunxu <1842059105@qq.com>
Date: 星期五, 04 八月 2023 13:21:26 +0800
Subject: [PATCH] 修改 招标项目 失单
---
force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js | 44 ++++++++++++++++++++++++++++++--------------
1 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js b/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js
index 0f54a7c..e49d936 100644
--- a/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js
+++ b/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js
@@ -10,8 +10,14 @@
CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/buttonAccountCtl.init';
+import {
+ NavigationMixin
+} from 'lightning/navigation';
+import {
+ encodeDefaultFieldValues
+} from 'lightning/pageReferenceUtils';
-export default class LexCreateNewServiceContract extends LightningElement {
+export default class LexCreateNewServiceContract extends NavigationMixin(LightningElement) {
@api recordId;
str;
IsLoading = true;
@@ -57,21 +63,31 @@
// 鏂板缓鏂版湇鍔″悎鍚�
CreateNewServiceContract() {
- var Hospital = this.HospitalC;
- var Hospitalid = this.HospitalIdC;
- var Department = this.DepartmentClassC;
- var Departmentid = this.DepartmentClassIdC;
- var accountname = this.Name;
- var accountid = this.Id;
+ const url = encodeDefaultFieldValues({
+ Hospital__c: this.HospitalC,
+ Department_Class__c: this.DepartmentClassC,
+ Department__c: this.Id
+ });
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'Maintenance_Contract__c',
+ actionName: 'new'
+ },
+ state: {
+ nooverride: '1',
+ defaultFieldValues: url
+ }
+ });
+ this.dispatchEvent(new CloseActionScreenEvent());
+ // var url = 'a0H/e?CF00N10000002Dx56=' + Hospital + '&CF00N10000002Dx56_lkid=' +
+ // Hospitalid + '&CF00N10000002Dx4p=' + Department + '&CF00N10000002Dx4p_lkid=' +
+ // Departmentid + '&CF00N10000002Dx4q=' + accountname + '&CF00N10000002Dx4q_lkid=' +
+ // accountid + '&RecordType=01210000000gTYq';
- var url = 'a0H/e?CF00N10000002Dx56=' + Hospital + '&CF00N10000002Dx56_lkid=' +
- Hospitalid + '&CF00N10000002Dx4p=' + Department + '&CF00N10000002Dx4p_lkid=' +
- Departmentid + '&CF00N10000002Dx4q=' + accountname + '&CF00N10000002Dx4q_lkid=' +
- accountid + '&RecordType=01210000000gTYq';
+ // console.log(url);
- console.log(url);
-
- window.top.location.href = url;
+ // window.top.location.href = url;
}
}
\ No newline at end of file
--
Gitblit v1.9.1