From 32944d1a233be29c0cb27d8ad4f21df868fb98a0 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@prec-tech.com>
Date: 星期二, 04 七月 2023 17:42:20 +0800
Subject: [PATCH] 耗材试用表 重新分配页面
---
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