From 1727a4f4d02e429475608e60f142a63bc24127bc Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 23 十月 2023 10:07:34 +0800
Subject: [PATCH] 近期修改
---
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js | 64 ++++++++++++++++++++++++++++++-
1 files changed, 61 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
index 6b3f341..c9803f6 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-10-11 18:24:16
+ * @LastEditTime: 2023-10-16 11:48:33
*/
let columns2=[
{ label: '--鏃�--', value: '' },
@@ -139,6 +139,8 @@
userId;
allowUserId;
submitUserId;
+ specProFlg;
+ loadingFlg;
@track isSubmitUser = false;
@track isAllowUser = false;
handleCustomButtonClick(event) {
@@ -370,6 +372,38 @@
}
});
+ // if(this.pageStatus = 'Edit' && this.loadingFlg == false){
+ // var elements1 = this.template.querySelectorAll('.ProductClass[data-id="' + 0 + '"]');
+ // var elements2 = this.template.querySelectorAll('.ProductCategory[data-id="' + 0 + '"]');
+ // console.log('lnm');
+ // console.log(elements1);
+ // console.log(elements2);
+ // console.log('lnm');
+ // console.log('in=>');
+ // this.loadingFlg = true;
+ // var j = 0;
+ // var i = 0;
+ // this.LostReport.LostBrands.forEach(brand=>{
+
+ // brand.LostProducts.forEach(product=>{
+ // if(product.LostProductss.LostProduct__r !=undefined){
+ // if(product.LostProductss.LostProduct__r.ProductClass__c ==undefined && product.LostProductss.LostProduct__r.ProductCategory__c ==undefined){
+ // console.log('cnm');
+ // console.log(elements1[i]);
+ // console.log(elements2[i]);
+ // console.log('cnm');
+ // elements1[i].readOnly = false;
+ // elements2[i].readOnly = false;
+ // }
+ // }
+ // i++;
+ // });
+ // j++;
+ // });
+
+ // }else if(this.pageStatus = 'View'){
+ // this.loadingFlg = false;
+ // }
// if((value == '' || value == null) && this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c == '鍏朵粬'){
// var elements =
// elements[index].disabled = false;
@@ -535,7 +569,12 @@
getNewLostProduct({
lineNo2: this.LostReport.LostBrands[index].LostProducts.length
}).then(result=>{
- result.LostProductss.LostBrandName__c = this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c;
+ if(this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c == '鍏朵粬' && (this.LostReport.LostBrands[index].lostBrand.Lost_By_Company_Mannual__c != null && this.LostReport.LostBrands[index].lostBrand.Lost_By_Company_Mannual__c != undefined && this.LostReport.LostBrands[index].lostBrand.Lost_By_Company_Mannual__c != '')){
+ result.LostProductss.LostBrandName__c = this.LostReport.LostBrands[index].lostBrand.Lost_By_Company_Mannual__c;
+ }else{
+ result.LostProductss.LostBrandName__c = this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c;
+ }
+
this.LostReport.LostBrands[index].LostProducts.push(result);
console.log('***');
console.log(this.LostReport);
@@ -1070,7 +1109,7 @@
handleModalSubmit(){
this.IsLoading = true;
- const comment = this.template.querySelector('.comment');
+ const comment = this.template.querySelector('.textAreaBody');
console.log(this.isLookup == true && this.newActorId == null);
if(this.isLookup == true && this.newActorId == null){
this.showToast('璇峰~鍏ユ柊鍒嗛厤浜�','error');
@@ -1093,11 +1132,18 @@
});
}else{
+ console.log('1nm');
+ console.log(this.LostReport.lostReport.Id);
+ console.log(comment.value);
+ console.log(this.action);
+ console.log('1nm');
submitForApproval({
recordId: this.LostReport.lostReport.Id,
comments: comment.value,
action: this.action
}).then(result=>{
+ console.log('sb');
+ console.log(result);
if(result){
if(this.action == 'Approve'){
this.showToast('鎮ㄦ棤鏉冩壒鍑�','error');
@@ -1110,8 +1156,12 @@
this.IsLoading = false;
}else{
// window.location = '/' + this.LostReport.lostReport.Id;
+
this.remoteUrl();
}
+ }).catch(error=>{
+ console.log('error');
+ console.log(error);
});
}
@@ -1277,6 +1327,14 @@
var temps1 =this.template.querySelectorAll('.ProductCategory[data-id="'+ index1 +'"]');
temps1[index2].readOnly = false;
this.LostReport.LostBrands[index1].LostProducts[index2].productOptions = this.productOptionsList[val];
+ searchProduct({
+ lostProduct:this.LostReport.LostBrands[index1].LostProducts[index2].LostProductss.LostProduct__c
+ }).then(result=>{
+ var prd = JSON.parse(result);
+ if(prd.ProductClass__c == undefined && prd.ProductCategory__c == undefined){
+ this.LostReport.LostBrands[index1].LostProducts[index2].LostProductss.isSpec__c = true;
+ }
+ });
}
}
--
Gitblit v1.9.1