| | |
| | | * @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: '' }, |
| | |
| | | userId; |
| | | allowUserId; |
| | | submitUserId; |
| | | specProFlg; |
| | | loadingFlg; |
| | | @track isSubmitUser = false; |
| | | @track isAllowUser = false; |
| | | handleCustomButtonClick(event) { |
| | |
| | | } |
| | | |
| | | }); |
| | | // 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; |
| | |
| | | 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); |
| | |
| | | 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'); |
| | |
| | | |
| | | }); |
| | | }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'); |
| | |
| | | this.IsLoading = false; |
| | | }else{ |
| | | // window.location = '/' + this.LostReport.lostReport.Id; |
| | | |
| | | this.remoteUrl(); |
| | | } |
| | | }).catch(error=>{ |
| | | console.log('error'); |
| | | console.log(error); |
| | | }); |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |