From f6a201e215d929bda9815e1689907d166a603519 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 15 五月 2023 15:08:27 +0800
Subject: [PATCH] 5月15日陈京武按钮开发

---
 force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js |   71 ++++++++++++++++++++++++++++-------
 1 files changed, 56 insertions(+), 15 deletions(-)

diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
index 2d46a12..05d8284 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-25 17:37:35
+ * @LastEditTime: 2023-04-26 11:45:00
  */
 /*
  * @Description: 
@@ -14,6 +14,45 @@
  * @LastEditors: chen jing wu
  * @LastEditTime: 2023-04-20 17:11:01
  */
+const columns = [
+    {
+      label: '澶卞崟鍝佺墝',
+      fieldName: 'LostBrandName__c',
+      type: 'list',
+      editable: true
+    },
+    {
+      label: '澶卞崟瀵规墜鍨嬪彿',
+      fieldName: 'LostProductName__c',
+      type: 'text',
+      editable: true
+    },
+    {
+        label: '澶卞崟鏁伴噺',
+        fieldName: 'Quantity__c',
+        type: 'number',
+        editable: true
+    },
+    {
+    label: '澶卞崟瀵规墜鍨嬪彿锛堟墜鍔級',
+    fieldName: 'LostProductMannual__c',
+    type: 'text',
+    editable: true
+    },
+    {
+    label: '澶卞崟浜у搧绫诲埆',
+    fieldName: 'ProductClass__c',
+    type: 'list',
+    editable: true
+    },
+    {
+    label: '澶卞崟浜у搧鍖哄垎',
+    fieldName: 'ProductCategory__c',
+    type: 'list',
+    editable: true
+    }
+    // ...
+  ];
 import { api, wire,track,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import save from '@salesforce/apex/lexPCLLostReportLwcController.save';
@@ -22,7 +61,8 @@
 import setbrand from '@salesforce/apex/lexPCLLostReportLwcController.setBrand';
 import init from '@salesforce/apex/lexPCLLostReportLwcController.init';
 import initForApex from '@salesforce/apex/lexPCLLostReportLwcController.initForApex';
-import getValuesFromTable from '@salesforce/apex/lexPCLLostReportLwcController.getValuesFromTable';
+import multiSelectCombobox from 'c/multiSelectCombobox'
+import searchBrands from '@salesforce/apex/lexPCLLostReportLwcController.searchBrands';
 export default class LexPCLLostReportPage extends LightningElement {
     @api oppId = '0061000001R2xjWAAR';
     @api lostReportId;
@@ -32,11 +72,18 @@
     searchResult;
     LostReport;
     brandCount;
-
-
-
+    brandOptions = [];
     connectedCallback() {
-        
+        this.initAll();
+        searchBrands().then(result=>{
+            this.brandOptions = JSON.parse(result);
+            console.log(this.brandOptions);
+            const multiCombobox = this.template.querySelector('c-multi-select-combobox');
+            multiCombobox.refreshOptions(this.brandOptions);
+        }).catch(error=>{
+            console.log("error");
+            console.log(error);
+        });
     }
 
     
@@ -63,6 +110,7 @@
     //     this.initAll();
     // }
     
+    
     // connectedCallback(){
     //     console.log("1");
     //     initForApex({
@@ -87,14 +135,7 @@
     //         });
     //     });
     // }
-    handleSearchBrand(event){
-        const searchText = event.target.value;
-        searchBrand({
-            name: searchText
-        }).then(result=>{
-            this.searchResult = result;
-        });
-    }
+    
     initAll(){
         console.log(this.oppId);
         console.log(this.lostReportId);
@@ -117,7 +158,7 @@
                             this.LostReport = result.LostReport;
                         }else{
                             console.log("211");
-                            this.showToast(result.message,"error");
+                            //this.showToast(result.message,"error");
                             console.log("985");
                         }
                     });

--
Gitblit v1.9.1