| | |
| | | } else { |
| | | newProduct.LostProductss.LostBrandName__c = templostBrand.Lost_By_Company__c; |
| | | } |
| | | system.debug('aaa4+++'+templostBrand.Lost_By_Company_Mannual__c); |
| | | tempProductList.add(newProduct); |
| | | productCount++; |
| | | } |
| | |
| | | list<LostBrand> LostBrandlist = LostReport.LostBrands; |
| | | LostBrand tempBrand = LostBrandlist.get(setBrandNo); |
| | | string brandName = tempBrand.lostBrand.Lost_By_Company__c; |
| | | // fy SWAG-CCC6F6 start |
| | | if(!'其他'.equals(tempBrand.lostBrand.Lost_By_Company_Mannual__c)){ |
| | | tempBrand.lostBrand.Lost_By_Company_Mannual__c = null; |
| | | } |
| | | system.debug('aaa5+++'+tempBrand.lostBrand.Lost_By_Company_Mannual__c); |
| | | // fy SWAG-CCC6F6 end |
| | | // ID compID = CompetitionMap.get(brandName); |
| | | for(PCLLostProducts tempLostProduct : tempBrand.LostProducts ) { |
| | | // test |
| | |
| | | for(PCLLostProducts tempLostProduct : tempBrand.LostProducts ) { |
| | | // test |
| | | // tempLostProduct.LostProductss.Competitor__c = compID; |
| | | system.debug('aaaa3++'+brandNameMannual); |
| | | if ('其他'.equals(brandName) && brandNameMannual != null && !''.equals(brandNameMannual)) { |
| | | tempLostProduct.LostProductss.LostBrandName__c = brandNameMannual; |
| | | tempLostProduct.LostProductss.LostProduct__c = null; |
| | | tempLostProduct.LostProductss.LostProductMannual__c = null; |
| | | tempLostProduct.LostProductss.Quantity__c = null; |
| | | tempLostProduct.LostProductss.ProductClass__c = null; |
| | | tempLostProduct.LostProductss.ProductCategory__c = null; |
| | | tempLostProduct.bool=false; |
| | | // tempLostProduct.LostProductss.LostProduct__c = null; |
| | | // tempLostProduct.LostProductss.LostProductMannual__c = null; |
| | | // tempLostProduct.LostProductss.Quantity__c = null; |
| | | // tempLostProduct.LostProductss.ProductClass__c = null; |
| | | // tempLostProduct.LostProductss.ProductCategory__c = null; |
| | | // tempLostProduct.bool=false; |
| | | } |
| | | } |
| | | } |
| | | // 保存 |
| | | public PageReference save(){ |
| | | |
| | | if(!DataCheck()) { |
| | | return null; |
| | | } |
| | |
| | | dataCheck = false; |
| | | } |
| | | for(LostBrand tempLostBrand : LostReport.LostBrands ) { |
| | | system.debug('aaaa1++'+tempLostBrand.lostBrand.Lost_By_Company_Mannual__c); |
| | | if(string.isblank(tempLostBrand.lostBrand.Lost_By_Company__c)) { |
| | | tempLostBrand.lostBrand.Lost_By_Company__c.addError('请填写失单品牌!'); |
| | | dataCheck = false; |
| | | } |
| | | |
| | | }// fy SWAG-CCC6F6 start |
| | | else if('其他'.equals(tempLostBrand.lostBrand.Lost_By_Company__c)&&string.isblank(tempLostBrand.lostBrand.Lost_By_Company_Mannual__c)){ |
| | | tempLostBrand.lostBrand.Lost_By_Company_Mannual__c.addError('请填写失单品牌(手动)!'); |
| | | dataCheck = false; |
| | | }// fy SWAG-CCC6F6 end |
| | | system.debug('aaaa2++'+tempLostBrand.lostBrand.Lost_By_Company_Mannual__c); |
| | | if(tempLostBrand.lostBrand.LostPrice__c == null) { |
| | | tempLostBrand.lostBrand.LostPrice__c.addError('失单金额必填!'); |
| | | dataCheck = false; |