From af908216bb0012fe849e3b49b3039c7ba238f8f0 Mon Sep 17 00:00:00 2001
From: liangxiaozhen <liangxiaozhen>
Date: 星期五, 11 八月 2023 14:35:43 +0800
Subject: [PATCH] 补充controller,修改变量,主页bug修改

---
 force-app/main/default/lwc/lexInputPickListCell/lexInputPickListCell.js |   37 +++++++++++++++++++++++++++++--------
 1 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/force-app/main/default/lwc/lexInputPickListCell/lexInputPickListCell.js b/force-app/main/default/lwc/lexInputPickListCell/lexInputPickListCell.js
index 450758c..4081d4d 100644
--- a/force-app/main/default/lwc/lexInputPickListCell/lexInputPickListCell.js
+++ b/force-app/main/default/lwc/lexInputPickListCell/lexInputPickListCell.js
@@ -4,29 +4,43 @@
  * @Author: chen jing wu
  * @Date: 2023-04-27 11:15:23
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-27 13:24:21
+ * @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=[];
-    value;
+    @track options=[];
+    @api value;
     @api record;
     @api field;
     @api fieldType;
     @api objectName;
-
-    value;
+    @api readOnly;
+    @api required;
+    value1;
     label;
     connectedCallback() {
-        this.value = this.record[this.field];
+        this.value1 = this.record[this.field];
         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})
@@ -55,6 +69,13 @@
         }
         return false;
     }
+    get isReadOnly(){
+        if(this.readOnly == true){
+            return true;
+        }else{
+            return false;
+        }
+    }
     
     @api
     inputValue() {

--
Gitblit v1.9.1