From b28b7983fd65d7e3da0e6a57ba1754899f036971 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期二, 06 六月 2023 18:03:11 +0800
Subject: [PATCH] 修改页面以及按钮
---
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js | 42 ++++++++++++++++++++++++++----------------
1 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
index d3d0d93..165b16c 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-06-06 10:51:30
+ * @LastEditTime: 2023-06-06 13:27:33
*/
const columns2=[
{ label: '--鏃�--', value: '' },
@@ -31,7 +31,7 @@
];
const columns3 = [
{label : "澶卞崟鍝佺墝",fieldName : "LostBrandName__c"},
- {label : "澶卞崟瀵规墜鍨嬪彿",fieldName : "LostProduct__c"},
+ {label : "澶卞崟瀵规墜鍨嬪彿",fieldName : "productName"},
{label : "澶卞崟鏁伴噺",fieldName : "Quantity__c",type : "number"},
{label : "澶卞崟瀵规墜鍨嬪彿(鎵嬪姩)",fieldName : "LostProductMannual__c"},
{label : "澶卞崟浜у搧绫诲埆",fieldName : "ProductClass__c"},
@@ -171,7 +171,9 @@
var products = this.LostReport.LostBrands[this.tableflag].LostProducts;
var productList = [];
products.forEach(product=>{
- productList.push(product.LostProductss);
+ var newProduct = JSON.parse(JSON.stringify(product));
+ newProduct.LostProductss.productName = newProduct.productName;
+ productList.push(newProduct.LostProductss);
});
this.tableflag++;
return productList;
@@ -201,6 +203,12 @@
get isEdit(){
if(this.status.pageStatus == 'Edit'){
+ return true;
+ }
+ return false;
+ }
+ get isSubmit(){
+ if(this.submitFlag){
return true;
}
return false;
@@ -349,22 +357,24 @@
if(result.error){
this.showToast(result.error,"error");
}else{
- var report = JSON.parse(result.LostReport);
- var index1 = 0;
- this.LostReport.LostBrands.forEach(brand=>{
- brand.lostBrand.Id = report.LostBrands[index1].lostBrand.Id;
- var index2 = 0;
- brand.LostProducts.forEach(product=>{
- product.LostProductss.Id = report.LostBrands[index1].LostProducts[index2].LostProductss.Id;
- index2++;
- });
- index1++;
- });
+ // var report = JSON.parse(result.LostReport);
+ // var index1 = 0;
+ // this.LostReport.LostBrands.forEach(brand=>{
+ // brand.lostBrand.Id = report.LostBrands[index1].lostBrand.Id;
+ // var index2 = 0;
+ // brand.LostProducts.forEach(product=>{
+ // product.LostProductss.Id = report.LostBrands[index1].LostProducts[index2].LostProductss.Id;
+ // index2++;
+ // });
+ // index1++;
+ // });
+ this.LostReport = JSON.parse(result.LostReport);
this.reportId = result.reportId;
- this.LostReport.lostReport.Id = result.reportId;
- console.log(this.LostReport);
+ // this.LostReport.lostReport.Id = result.reportId;
+ // console.log(this.LostReport);
this.status.pageStatus = 'View';
this.tableflag = 0;
+ console.log(this.LostReport);
}
}).catch(error=>{
console.log("error");
--
Gitblit v1.9.1