From 09b83c021646c56cec56b77dc091893401563f9f Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 24 四月 2023 17:39:27 +0800
Subject: [PATCH] 修改失单页面
---
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js-meta.xml | 10 +
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js | 139 +++++++++++++++++++---
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html | 51 ++++++++
force-app/main/default/lwc/lexLoseReport/lexLoseReport.js | 26 ++--
force-app/main/default/classes/lexPCLLostReportLwcController.cls | 114 +++++++++++++-----
5 files changed, 268 insertions(+), 72 deletions(-)
diff --git a/force-app/main/default/classes/lexPCLLostReportLwcController.cls b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
index 9082354..2127ee4 100644
--- a/force-app/main/default/classes/lexPCLLostReportLwcController.cls
+++ b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -1,39 +1,57 @@
public with sharing class lexPCLLostReportLwcController {
- public Product2 pro2 { get; set; }
- public string oppId { get; set; }
- public string lostReportId { get; set; }
+ @AuraEnabled
+ public static Product2 pro2 { get; set; }
+ @AuraEnabled
+ public static string oppId { get; set; }
+ @AuraEnabled
+ public static string lostReportId { get; set; }
// 褰撳墠椤甸潰鐘舵�� Create,View and Edit, MarketEdit
- public string pageStatus { get; set; }
+ @AuraEnabled
+ public static string pageStatus { get; set; }
// 澶卞崟锛岄儴鍒嗗け鍗�
- public string lostType {get; set;}
- public Set<ID> deleteBrandIDSet = new Set<ID>();
- public string submitFlag {get; set;}
- public LostReport LostReport {get; set;}
- public integer brandNo {get; set;}
- public integer RemoveBrandNo {get; set;}
- public integer setBrandNo {get; set;}
- public integer brandCount {get; set;}
+ @AuraEnabled
+ public static string lostType {get; set;}
+ public static Set<ID> deleteBrandIDSet = new Set<ID>();
+ @AuraEnabled
+ public static string submitFlag {get; set;}
+ @AuraEnabled
+ public static LostReport LostReport {get; set;}
+ @AuraEnabled
+ public static integer brandNo {get; set;}
+ @AuraEnabled
+ public static integer RemoveBrandNo {get; set;}
+ @AuraEnabled
+ public static integer setBrandNo {get; set;}
+ @AuraEnabled
+ public static integer brandCount {get; set;}
// add tcm 20211122 start
- public integer topNum {get; set;}
- public integer secondNum {get; set;}
+ @AuraEnabled
+ public static integer topNum {get; set;}
+ @AuraEnabled
+ public static integer secondNum {get; set;}
// add tcm 20211122 end
// 鍒濆鍖�
- public void initForApex(string oppId1,string lostReportId1,string pageStatus1,string lostType1,string submitFlag1){
+ @AuraEnabled
+ public static void initForApex(string oppId1,string lostReportId1,string pageStatus1,string lostType1,string submitFlag1){
oppId = oppId1;
lostReportId = lostReportId;
pageStatus = pageStatus1;
lostType = lostType1;
submitFlag = submitFlag1;
}
- public String init(){
+ @AuraEnabled
+ public static Map<string,object> init(){
+ Map<string,object> maps = new Map<string,object>();
if(string.isblank(pageStatus)) {
// 杩欓噷闇�瑕佹姤閿欐病鏈変紶鍙傛暟
- return '椤甸潰鍑洪敊锛岃鍒锋柊鍚庨噸璇曪紒';
+ maps.put('message', '椤甸潰鍑洪敊锛岃鍒锋柊鍚庨噸璇曪紒');
+ return maps;
}
else if(pageStatus.equals('Create')) {
if(string.isBlank(oppId)) {
// 杩欓噷鎶ラ敊鍒涘缓鏃跺�欏繀椤绘湁璇环
- return '鍒涘缓澶卞崟鎶ュ憡鏃讹紝璇烽噸璇环椤甸潰鍒涘缓';
+ maps.put('message', '鍒涘缓澶卞崟鎶ュ憡鏃讹紝璇烽噸璇环椤甸潰鍒涘缓');
+ return maps;
}
list<opportunity> opplist =
[select id,Name,
@@ -44,11 +62,13 @@
limit 1];
if( opplist.size() == 0) {
pageStatus = null;
- return '鎮ㄦ病鏈夎浠风殑鏌ョ湅鏉冮檺锛屾棤娉曞垱寤哄け鍗曟姤鍛婏紒';
+ maps.put('message', '鎮ㄦ病鏈夎浠风殑鏌ョ湅鏉冮檺锛屾棤娉曞垱寤哄け鍗曟姤鍛婏紒');
+ return maps;
}
Schema.DescribeSObjectResult s = Lost_cancel_report__c.sObjectType.getDescribe();
if( !s.isCreateable()) {
- return '鎮ㄤ笉鑳藉垱寤哄け鍗�/閮ㄥ垎澶卞崟鎶ュ憡锛�';
+ maps.put('message', '鎮ㄤ笉鑳藉垱寤哄け鍗�/閮ㄥ垎澶卞崟鎶ュ憡锛�');
+ return maps;
}
Lost_cancel_report__c tempLostReport =
new Lost_cancel_report__c(LostType__c= lostType,
@@ -65,7 +85,8 @@
system.debug('edit1');
if(string.isBlank(lostReportId)) {
pageStatus = null;
- return '鎮ㄦ病鏈夋煡鐪嬭繖涓け鍗�/閮ㄥ垎澶卞崟鎶ュ憡鐨勬潈闄愶紒';
+ maps.put('message', '鎮ㄦ病鏈夋煡鐪嬭繖涓け鍗�/閮ㄥ垎澶卞崟鎶ュ憡鐨勬潈闄愶紒');
+ return maps;
}
system.debug('edit2');
list<Lost_cancel_report__c> lostReportList =
@@ -82,7 +103,8 @@
if(lostReportList.size() == 0) {
pageStatus = null;
- return '鎮ㄦ病鏈夋煡鐪嬭繖涓け鍗�/閮ㄥ垎澶卞崟鎶ュ憡鐨勬潈闄愶紒';
+ maps.put('message', '鎮ㄦ病鏈夋煡鐪嬭繖涓け鍗�/閮ㄥ垎澶卞崟鎶ュ憡鐨勬潈闄愶紒');
+ return maps;
}
lostReportList[0].Sales_assistant__c =
lostReportList[0].Opportunity__r.Sales_assistant_ID__c;
@@ -156,13 +178,16 @@
// 璇诲彇绔炰簤瀵规墜鍝佺墝
// BrandmapSet();
if(string.isNotEmpty(submitFlag)) {
- return '鎻愪氦鎴愬姛锛�';
+ maps.put('message', '鎻愪氦鎴愬姛锛�');
+ maps.put('LostReport', LostReport);
+ return maps;
}
return null;
}
// 缂栬緫 鍙湁绯荤粺绠$悊鍛樻垨鑰呰崏妗堜腑鍙互缂栬緫
- public String edit2(){
+ @AuraEnabled
+ public static String edit2(){
if( userinfo.getProfileId() == (ID) '00e10000000Y3o5AAC' ||
'鑽夋'.equals(LostReport.LostReport.Report_Status__c)
) {
@@ -175,7 +200,8 @@
return null;
}
// 璁剧疆鍝佺墝
- public void setBrand(){
+ @AuraEnabled
+ public static void setBrand(){
list<LostBrand> LostBrandlist = LostReport.LostBrands;
LostBrand tempBrand = LostBrandlist.get(setBrandNo);
string brandName = tempBrand.lostBrand.Lost_By_Company__c;
@@ -199,7 +225,8 @@
}
}
// 璁剧疆鍝佺墝
- public void setbrandmannual(){
+ @AuraEnabled
+ public static void setbrandmannual(){
list<LostBrand> LostBrandlist = LostReport.LostBrands;
LostBrand tempBrand = LostBrandlist.get(setBrandNo);
string brandName = tempBrand.lostBrand.Lost_By_Company__c;
@@ -221,7 +248,8 @@
}
}
// 淇濆瓨
- public String save(){
+ @AuraEnabled
+ public static String save(){
if(!DataCheck()) {
return null;
@@ -245,7 +273,8 @@
// }
// 鏁版嵁妫�鏌�
- public boolean DataCheck(){
+ @AuraEnabled
+ public static boolean DataCheck(){
boolean dataCheck = true;
if(string.isBlank(LostReport.LostReport.LostType__c))
{
@@ -323,7 +352,8 @@
return dataCheck;
}
- public list<LostBrand> brandcopy(){
+ @AuraEnabled
+ public static list<LostBrand> brandcopy(){
list<LostBrand> tempbrands = new list<LostBrand>();
for(LostBrand tempbrand: LostReport.LostBrands) {
LostBrand LostBrand =
@@ -335,7 +365,8 @@
return tempbrands;
}
// 鏁版嵁褰曞叆
- public boolean dataEntry(){
+ @AuraEnabled
+ public static boolean dataEntry(){
system.debug('save---start:');
Savepoint sp = Database.setSavepoint();
Lost_cancel_report__c templostReport = LostReport.lostReport.clone();
@@ -470,7 +501,8 @@
// 鎻愪氦
- public Map<string,Object> submit(){
+ @AuraEnabled
+ public static Map<string,Object> submit(){
Map<string,string> messages = new Map<string,string>();
if(!'鑽夋'.equals(LostReport.LostReport.Report_Status__c) ) {
messages.put('error', '鍙湁鍦ㄨ崏妗堜腑鎵嶈兘鎻愪氦鐢宠锛�');
@@ -496,13 +528,15 @@
}
}
// 娣诲姞鍝佺墝
- public String addBrand(){
+ @AuraEnabled
+ public static String addBrand(){
LostReport.LostBrands.add(new LostBrand(LostReport.LostBrands.size()));
brandCount = LostReport.LostBrands.size();
return null;
}
// 鍒犻櫎鍝佺墝 杩欎釜鏈夊弬鏁癰randNo锛屾墠鐭ラ亾鏄垹闄ら偅涓搧鐗�
- public String Remove(){
+ @AuraEnabled
+ public static String Remove(){
system.debug('RemoveBrandNo:'+RemoveBrandNo);
list<LostBrand> tempLostBrands = new List<lostBrand>();
Integer i = 0;
@@ -524,7 +558,8 @@
}
// 娣诲姞鍨嬪彿锛� 杩欎釜鏈夊弬鏁癰randNo锛屾墠鐭ラ亾鏄坊鍔犲埌閭d釜鍝佺墝
// update tcm 20211125 娣诲姞鍨嬪彿鏃惰嚜鍔ㄥ甫鍑哄搧鐗� start
- public String addProduct(){
+ @AuraEnabled
+ public static String addProduct(){
system.debug('brandNo:'+brandNo);
LostBrand tempLostBrand = LostReport.LostBrands.get(brandNo);
// PCLLostProduct__c plp = new PCLLostProduct__c(Competitor__c=CompetitionMap.get(LostReport.LostBrands[brandNo].lostBrand.Lost_By_Company__c));
@@ -538,7 +573,9 @@
// update tcm 20211125 娣诲姞鍨嬪彿鏃惰嚜鍔ㄥ甫鍑哄搧鐗� end
// 椤甸潰鐨勬暟鎹粨鏋�
public class LostReport {
+ @AuraEnabled
public Lost_cancel_report__c lostReport { get; set; }
+ @AuraEnabled
public list<LostBrand> LostBrands { get; set; }
public LostReport(){
lostReport = new Lost_cancel_report__c();
@@ -555,9 +592,13 @@
}
public class LostBrand {
+ @AuraEnabled
public PCLLostBrand__c lostBrand { get; set; }
+ @AuraEnabled
public Integer lineNo { get; set; }
+ @AuraEnabled
public list<PCLLostProducts> LostProducts { get; set; }
+ @AuraEnabled
public Integer ProductSize {get; set;}
public LostBrand( integer lineNo ){
lostBrand = new PCLLostBrand__c();
@@ -581,8 +622,11 @@
}
// add tcm 20211119 start
public class PCLLostProducts {
+ @AuraEnabled
public Integer lineNo2 { get; set; }
+ @AuraEnabled
public PCLLostProduct__c LostProductss { get; set; }
+ @AuraEnabled
public Boolean bool { get; set; }
public PCLLostProducts() {
@@ -606,7 +650,7 @@
// add tcm 20211119 end
// add tcm 20211118 start
- public void search() {
+ public static void search() {
if (LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c==null) {
LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=null;
LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=null;
diff --git a/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js b/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
index 96e99f5..3c1bcf1 100644
--- a/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
+++ b/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-20 14:08:55
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-21 15:15:44
+ * @LastEditTime: 2023-04-24 13:58:53
*/
/*
* @Description:
@@ -82,17 +82,19 @@
//alert("鍏宠仈鎷涙姇鏍囬」鐩殑璇环锛屽彧鑳藉湪鏈夌粨鏋滃悗鍋氬け鍗曟姤鍛婏紒");
//}
else {
- location.href = '/a1U/e?retURL=%2F' + this.recordId +
- '&RecordType=01210000000R4hM' +
- '&CF00N10000004lbGT=' + this.name +
- '&CF00N10000004lbGT_lkid=' + this.recordId +
- '&CF00N10000006QShg=' + this.salesAssistantName +
- '&CF00N10000006QShg_lkid=' + this.salesAssistantID +
- '&CF00N10000006QShq=' + this.managerName +
- '&CF00N10000006QShq_lkid=' + this.salesManagerDepartmentID +
- '&CF00N10000006QShb=' + this.salesOwnerBuchang +
- '&CF00N10000006QShb_lkid=' + this.salesOwnerBuchangID +
- '';
+ var url = '/apex/PCLLostReportPage?pageStatus=Create&oppId=' + this.recordId + '&lostType=澶卞崟';
+ location.href = url;
+ // location.href = '/a1U/e?retURL=%2F' + this.recordId +
+ // '&RecordType=01210000000R4hM' +
+ // '&CF00N10000004lbGT=' + this.name +
+ // '&CF00N10000004lbGT_lkid=' + this.recordId +
+ // '&CF00N10000006QShg=' + this.salesAssistantName +
+ // '&CF00N10000006QShg_lkid=' + this.salesAssistantID +
+ // '&CF00N10000006QShq=' + this.managerName +
+ // '&CF00N10000006QShq_lkid=' + this.salesManagerDepartmentID +
+ // '&CF00N10000006QShb=' + this.salesOwnerBuchang +
+ // '&CF00N10000006QShb_lkid=' + this.salesOwnerBuchangID +
+ // '';
}
this.dispatchEvent(new CloseActionScreenEvent());
}
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
index af9fa97..dc39ff7 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
+++ b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
@@ -1,3 +1,52 @@
+<!--
+ * @Description:
+ * @version:
+ * @Author: chen jing wu
+ * @Date: 2023-04-20 17:16:48
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-04-24 16:34:14
+-->
<template>
-
+ <lightning-card variant="Narrow">
+ <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>
+ <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>
+ <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>
+ </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>
+ </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>
+ </lightning-layout-item>
+ </lightning-layout>
+ <!-- <lightning-layout>
+ <lightning-accordion allow-multiple-sections-open
+ onsectiontoggle={handleSectionToggle}
+ active-section-name={activeSections}>
+ <lightning-accordion-section name="澶卞崟鍝佺墝" label="澶卞崟鍝佺墝">
+
+ </lightning-accordion-section>
+ </lightning-accordion>
+ </lightning-layout> -->
+ </div>
+ </div>
+ </lightning-card>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
index 0452b39..0b3ba85 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-23 16:57:18
+ * @LastEditTime: 2023-04-24 16:46:31
*/
/*
* @Description:
@@ -15,12 +15,14 @@
* @LastEditTime: 2023-04-20 17:11:01
*/
import { api, wire,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 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';
export default class LexPCLLostReportPage extends LightningElement {
@@ -29,20 +31,53 @@
@api pageStatus;
@api lostType;
@api submitFlag;
+ LostReport;
brandCount;
- constructor() {
- super();
+ lostReportObj;
+ //澶卞崟绫诲瀷
+ RecordTypeOptions = [{ label: '--鏃�--', value: '' },
+ { label: '澶卞崟', value: '澶卞崟' },
+ { label: '閮ㄥ垎澶卞崟', value: '閮ㄥ垎澶卞崟' }];
+ // @wire(CurrentPageReference)
+ // getStateParameters(currentPageReference) {
+ // console.log(111);
+ // console.log(currentPageReference);
- // Set the default values for properties using ternary operators
- this.oppId = this.getParamValue('oppId') || '';
- this.lostReportId = this.getParamValue('Id') || '';
- this.pageStatus = this.getParamValue('pageStatus') || '';
- this.lostType = this.getParamValue('lostType') || '';
- this.submitFlag = this.getParamValue('submitFlag') || '';
- }
- connectedCallback(){
-
- }
+ // if (currentPageReference) {
+ // const urlValue = currentPageReference.state.recordId;
+ // if (urlValue) {
+ // let str = `${urlValue}`;
+ // console.log("str");
+ // console.log(str);
+ // this.oppId = str;
+ // }
+ // }
+ // }
+
+ // connectedCallback(){
+ // console.log("1");
+ // 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
@@ -51,28 +86,57 @@
}
saveJs() {
this.blockMyself();
- save();
+ save().then(result=>{
+ if(result){
+ this.showToast(result,"success");
+ this.unblock();
+ this.clearBrandMannualName();
+ }
+ })
}
addBrandJs() {
this.blockMyself();
- addBrand();
+ addBrand().then(()=>{
+ this.unblock();
+ });
}
submitJS() {
this.blockMyself();
- submit();
+ submit().then(result=>{
+ if(result.get('error')){
+ this.showToast(result.get('error'),"error");
+ }else{
+ this[NavigationMixin.Navigate]({
+ type: 'standard__recordPage',
+ attributes: {
+ uri: result.get('uri'),
+ Id: result.get('Id'),
+ pageStatus: result.get('pageStatus'),
+ submitFlag: result.get('submitFlag')
+ }
+ });
+ this.unblock();
+ }
+ });
}
addProductJs(number) {
this.blockMyself();
- addProduct(number);
+ addProduct().then(()=>{
+ this.unblock();
+ });
}
RemoveJs(number) {
this.blockMyself();
- Remove(number);
+ Remove().then(()=>{
+ this.unblock();
+ });
}
// add tcm 20211118 start
searchJs(topNum, secondNum) {
this.blockMyself();
- search(topNum, secondNum);
+ search().then(()=>{
+ this.unblock();
+ });
}
blockMyself(){
Promise.all([
@@ -86,6 +150,22 @@
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() {
+ return this.pageStatus === 'Create' || this.pageStatus === 'Edit';
}
// add tcm 20211118 end
@@ -121,11 +201,16 @@
}
setBrandName(brandNumber) {
this.blockMyself();
- setbrand(brandNumber);
+ setbrand().then(()=>{
+ this.clearBrandMannualName();
+ this.unblock();
+ });
}
setBrandMannualName(brandNumber) {
this.blockMyself();
- setbrandmannual(brandNumber);
+ setbrandmannual().then(()=>{
+ this.unblock();
+ });
}
// 澶卞崟鍝佺墝涓嶇瓑浜庡叾浠栨椂,澶卞崟鍝佺墝锛堟墜鍔級娓呯┖骞朵笖涓嶅厑璁稿~鍐�,澶卞崟鍝佺墝绛変簬鍏朵粬鏃�,澶卞崟瀵规墜鍨嬪彿涓嶅彲鐢� thh 2022-01-13 start
clearBrandMannualName(){
@@ -146,4 +231,14 @@
}
});
}
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ title: '',
+ message: msg,
+ variant: type
+ });
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js-meta.xml b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js-meta.xml
index f8c5cb4..8b2c3d6 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js-meta.xml
+++ b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js-meta.xml
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
- <apiVersion>56.0</apiVersion>
- <isExposed>false</isExposed>
+ <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