From 07390e2fcb4adf27c928335bf27ae7939c5a80ad Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 23 五月 2023 11:28:12 +0800
Subject: [PATCH] bakcup20230523
---
force-app/main/default/lwc/lexInputPickListCell/lexInputPickListCell.js | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/force-app/main/default/lwc/lexInputPickListCell/lexInputPickListCell.js b/force-app/main/default/lwc/lexInputPickListCell/lexInputPickListCell.js
index b88228d..4081d4d 100644
--- a/force-app/main/default/lwc/lexInputPickListCell/lexInputPickListCell.js
+++ b/force-app/main/default/lwc/lexInputPickListCell/lexInputPickListCell.js
@@ -4,19 +4,20 @@
* @Author: chen jing wu
* @Date: 2023-04-27 11:15:23
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-05-04 13:47:30
+ * @LastEditTime: 2023-05-08 11:39:23
*/
import { LightningElement, track,wire, api } from 'lwc';
import getPickList from '@salesforce/apex/lexPCLLostReportLwcController.getPickList';
-
+import searchBrands from '@salesforce/apex/lexPCLLostReportLwcController.searchBrands';
export default class LexInputPickListCell extends LightningElement {
- @api options=[];
+ @track options=[];
@api value;
@api record;
@api field;
@api fieldType;
@api objectName;
@api readOnly;
+ @api required;
value1;
label;
connectedCallback() {
@@ -24,9 +25,22 @@
this.label = this.field;
if(this.objectName!==undefined && this.isPickList)
{
- this.getPicklist(this.objectName,this.field);
+ if(this.label!= 'LostBrandName__c'){
+ this.getPicklist(this.objectName,this.field);
+ }else{
+ this.getSearchBrands();
+ }
}
}
+ get isRequired(){
+ return this.required;
+ }
+ getSearchBrands(){
+ searchBrands().then(result=>{
+ this.options = JSON.parse(result);
+ });
+ }
+
getPicklist(obj,field)
{
getPickList({ objectName : obj, fieldName :field})
--
Gitblit v1.9.1