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/classes/lexPCLLostReportLwcController.cls |  270 ------------------------------------------------------
 1 files changed, 0 insertions(+), 270 deletions(-)

diff --git a/force-app/main/default/classes/lexPCLLostReportLwcController.cls b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
index 3a4b157..9ec6918 100644
--- a/force-app/main/default/classes/lexPCLLostReportLwcController.cls
+++ b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -31,29 +31,6 @@
 	public static integer secondNum {get; set;}
 	// add tcm 20211122 end
 
-	@AuraEnabled
-	public static LostReport getLostReport(){
-		try {
-			return LostReport;
-		} catch (Exception e) {
-			throw new AuraHandledException(e.getMessage());
-		}
-	}
-
-	@AuraEnabled( cacheable = true ) 
-    public static List< Account > getAccounts() { 
-      
-        return [ SELECT Id, Name, Industry FROM Account LIMIT 10 ]; 
-         
-    } 
-     
-    @AuraEnabled( cacheable = true )
-    public static void saveAccounts(List<Account> accList){
-        Insert accList;
-        /*if(accList.size()>0 && accList != null){
-            insert accList;
-        }*/
-    } 
 
 	@AuraEnabled
     public static String getPickList(String objectName, String fieldName) {
@@ -103,27 +80,6 @@
 		pickList.put('鍏朵粬', qita);
         return JSON.serialize(pickList);
     }
-	@AuraEnabled
-	public static String getPickListByFilter(String objectName,String fieldName,String controlFieldName,String controlFieldValue){
-		try {
-			Schema.DescribeFieldResult fieldDescribe = Schema.getGlobalDescribe().get(objectName).getDescribe().fields.getMap().get(fieldName).getDescribe();
-			// 濡傛灉璇ュ瓧娈典负閫夐」鍒楄〃绫诲瀷锛屽垯鑾峰彇閫夐」鍒楄〃
-			List<Schema.PicklistEntry> picklistValues = fieldDescribe.getPicklistValues();
-			// 鏍规嵁鎺у埗瀛楁鐨勫�肩瓫閫夊嚭瀵瑰簲鐨勯�夐」
-			List<Map<String, Object>> lstPickvals = new List<Map<String, Object>>();
-			for (Schema.PicklistEntry entry : picklistValues) {
-				if (entry.isActive() && entry.getValue().startsWith(controlFieldValue)) {
-					lstPickvals.add(new Map<String, Object>{'label' => entry.getValue(), 'value' => entry.getValue()});
-				}
-			}
-			String jsonStr = JSON.serialize(lstPickvals);
-			return jsonStr;
-		} catch (Exception e) {
-			throw new AuraHandledException(e.getMessage());
-		}
-	}
-
-
 	@AuraEnabled
 	public static Map<string,object> init (string oppId1,string lostReportId1,string pageStatus1,string lostType1,string submitFlag1){
 		try {
@@ -288,176 +244,6 @@
 		maps.put('LostReport', LostReport);
 		return maps;
 	}
-	//鍐欏埌js
-	// 缂栬緫 鍙湁绯荤粺绠$悊鍛樻垨鑰呰崏妗堜腑鍙互缂栬緫
-	@AuraEnabled
-	public static String edit2(){
-		if( userinfo.getProfileId() == (ID) '00e10000000Y3o5AAC' ||
-		    '鑽夋'.equals(LostReport.LostReport.Report_Status__c)
-		    ) {
-			pageStatus = 'Edit';
-			init1();
-		}
-		else{
-			return '鍙湁鍦ㄨ崏妗堜腑鎵嶈兘杩涜缂栬緫锛�';
-		}
-		return null;
-	}
-	// 璁剧疆鍝佺墝
-	@AuraEnabled
-	public static void setBrand(){
-		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
-			// tempLostProduct.LostProductss.Competitor__c = compID;
-			tempLostProduct.LostProductss.LostBrandName__c = brandName;
-			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;
-		}
-	}
-	// 璁剧疆鍝佺墝
-	@AuraEnabled
-	public static void setbrandmannual(){
-		list<LostBrand> LostBrandlist =  LostReport.LostBrands;
-		LostBrand tempBrand = LostBrandlist.get(setBrandNo);
-		string brandName = tempBrand.lostBrand.Lost_By_Company__c;
-		String brandNameMannual = tempBrand.lostBrand.Lost_By_Company_Mannual__c;
-		// ID compID = CompetitionMap.get(brandName);
-		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;
-			}
-		}
-	}
-	// 淇濆瓨
-	// @AuraEnabled
-	// public static String save(LostReport report){
-	// 	try {
-	// 		if(!dataEntry(report)) {
-	// 			return null;
-	// 		}
-	
-	// 		// brandCount = LostReport.LostBrands.size();
-	// 		pageStatus = 'View';
-	// 		return '淇濆瓨鎴愬姛锛�';
-	// 	} catch (Exception e) {
-	// 		return e.getMessage();
-	// 	}
-	// }
-	//璇诲彇骞舵瀯寤虹珵浜夊鎵嬪搧鐗�
-	// public void BrandmapSet(){
-	// 	CompetitionMap = new map<string, id>();
-	// 	list <Competition_Company__c> competitionList
-	// 	    =  [select id,name from Competition_Company__c];
-	// 	for(Competition_Company__c tempComp : competitionList ) {
-	// 		CompetitionMap.put(tempComp.name, tempComp.id);
-	// 	}
-
-	// }
-	// 鏁版嵁妫�鏌�
-	@AuraEnabled
-	public static boolean DataCheck(LostReport report){
-		LostReport = report;
-		boolean dataCheck = true;
-		if(string.isBlank(LostReport.LostReport.LostType__c))
-		{
-			LostReport.LostReport.LostType__c.addError('蹇呴』濉啓澶卞崟绫诲瀷锛�');
-			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;
-			}
-			if(string.isblank(tempLostBrand.lostBrand.Lost_reason_main__c )) {
-				tempLostBrand.lostBrand.Lost_reason_main__c.addError('澶卞崟鐞嗙敱(涓�)蹇呭~锛�');
-				dataCheck = false;
-			}
-			if(string.isblank(tempLostBrand.lostBrand.Agency__c )) {
-				tempLostBrand.lostBrand.Agency__c.addError('涓爣缁忛攢鍟嗗繀濉紒');
-				dataCheck = false;
-			}
-			// 妫�鏌ユ槸鍚︽湁瓒呰繃1涓湁鏁扮殑浜у搧
-			integer productCount = 0;
-			for( PCLLostProducts temlostProduct : tempLostBrand.LostProducts) {
-				if (temlostProduct.LostProductss.LostProduct__c != null || temlostProduct.LostProductss.LostProductMannual__c != null) {
-					System.debug('澶卞崟鍨嬪彿' + temlostProduct.LostProductss.LostProduct__c);
-					System.debug('澶卞崟鍨嬪彿鎵嬪姩' + temlostProduct.LostProductss.LostProductMannual__c);
-					productCount ++;
-				}
-				// update tcm 20211123 start
-				if((temlostProduct.LostProductss.LostProduct__c!=null || temlostProduct.LostProductss.LostProductMannual__c!=null)&&(temlostProduct.LostProductss.Quantity__c==null || temlostProduct.LostProductss.Quantity__c ==0)) {
-					temlostProduct.LostProductss.Quantity__c.addError('璇峰~鍐欏け鍗曟暟閲忥紒');
-					dataCheck = false;
-				}
-				if((temlostProduct.LostProductss.LostProduct__c!=null || temlostProduct.LostProductss.LostProductMannual__c!=null)&&temlostProduct.LostProductss.ProductCategory__c==null) {
-					if (temlostProduct.LostProductss.ProductClass__c==null) {
-						temlostProduct.LostProductss.ProductClass__c.addError('澶卞崟浜у搧绫诲埆蹇呭~锛�');
-						temlostProduct.LostProductss.ProductCategory__c.addError('澶卞崟浜у搧蹇呭~锛�');
-					}else {
-						temlostProduct.LostProductss.ProductCategory__c.addError('澶卞崟浜у搧蹇呭~锛�');
-					}
-					dataCheck = false;
-				}
-				// 褰撳け鍗曞搧鐗屽悕涓哄叾浠栨椂,鎶ラ敊瀛楁涓哄け鍗曞鎵嬪瀷鍙凤紙鎵嬪姩锛� thh 2022-01-17 start
-				if ((temlostProduct.LostProductss.LostProduct__c==null && temlostProduct.LostProductss.LostProductMannual__c==null)&&(temlostProduct.LostProductss.ProductCategory__c!=null||temlostProduct.LostProductss.Quantity__c!=null)) {
-					if(tempLostBrand.lostBrand.Lost_By_Company__c != '鍏朵粬'){
-						temlostProduct.LostProductss.LostProduct__c.addError('澶卞崟瀵规墜鍨嬪彿鎴栧け鍗曞鎵嬪瀷鍙凤紙鎵嬪姩锛夊繀濉紒');
-					} else{
-						temlostProduct.LostProductss.LostProductMannual__c.addError('澶卞崟瀵规墜鍨嬪彿鎴栧け鍗曞鎵嬪瀷鍙凤紙鎵嬪姩锛夊繀濉紒');
-					}
-					dataCheck = false;
-				}
-				// 褰撳け鍗曞搧鐗屽悕涓哄叾浠栨椂,鎶ラ敊瀛楁涓哄け鍗曞鎵嬪瀷鍙凤紙鎵嬪姩锛� thh 2022-01-17 end
-				// update tcm 20211123 end
-			}
-			// 褰撳け鍗曞搧鐗屽悕涓哄叾浠栨椂,鎶ラ敊瀛楁涓哄け鍗曞鎵嬪瀷鍙凤紙鎵嬪姩锛� thh 2022-01-17 start
-			if (productCount == 0 && tempLostBrand.LostProducts != null && tempLostBrand.LostProducts.size() > 0) {
-				if(tempLostBrand.lostBrand.Lost_By_Company__c != '鍏朵粬'){
-					tempLostBrand.LostProducts[0].LostProductss.LostProduct__c.addError('鑷冲皯褰曞叆1鏉″け鍗曞鎵嬪瀷鍙蜂俊鎭紒');
-				}else{
-					tempLostBrand.LostProducts[0].LostProductss.LostProductMannual__c.addError('鑷冲皯褰曞叆1鏉″け鍗曞鎵嬪瀷鍙蜂俊鎭紒');
-				}
-				dataCheck = false;
-			}
-			// 褰撳け鍗曞搧鐗屽悕涓哄叾浠栨椂,鎶ラ敊瀛楁涓哄け鍗曞鎵嬪瀷鍙凤紙鎵嬪姩锛� thh 2022-01-17 end
-		}
-		
-
-		return dataCheck;
-	}
 	@AuraEnabled
 	public static String searchBrands(){
 		String ObjectApi_name = 'PCLLostBrand__c';
@@ -480,17 +266,6 @@
         }
 		String jsonStr = JSON.serialize(lstPickvals);
         return jsonStr;
-	}
-	public static list<LostBrand> brandcopy(LostReport report){
-		list<LostBrand> tempbrands = new list<LostBrand>();
-		for(LostBrand tempbrand: report.LostBrands) {
-			LostBrand LostBrand =
-				new LostBrand(tempbrand.lineNo,tempbrand.LostProducts );
-			LostBrand.lostBrand = tempbrand.lostBrand.clone();
-			LostBrand.lostBrand.id = tempbrand.lostBrand.id;
-			tempbrands.add(LostBrand);
-		}
-		return tempbrands;
 	}
 	// 鏁版嵁褰曞叆
 	@AuraEnabled
@@ -679,51 +454,6 @@
 		return lostBrand;
 	}
 
-	// 鍒犻櫎鍝佺墝 杩欎釜鏈夊弬鏁癰randNo锛屾墠鐭ラ亾鏄垹闄ら偅涓搧鐗�
-	@AuraEnabled
-	public static String Remove(){
-		system.debug('RemoveBrandNo:'+RemoveBrandNo);
-		list<LostBrand> tempLostBrands = new List<lostBrand>();
-		Integer i = 0;
-		for(integer j = 0; j< LostReport.LostBrands.size(); j++ ) {
-			LostBrand templostBrand  = LostReport.LostBrands.get(j);
-			if(j != RemoveBrandNo) {
-				templostBrand.lineNo = i;
-				tempLostBrands.add(templostBrand);
-				i++;
-			}else if(!string.isBlank(templostBrand.lostBrand.id)) {
-				deleteBrandIDSet.add(templostBrand.lostBrand.id);
-			}
-		}
-
-		LostReport.LostBrands =  tempLostBrands;
-
-		brandCount = LostReport.LostBrands.size();
-		return null;
-	}
-	// 娣诲姞鍨嬪彿锛� 杩欎釜鏈夊弬鏁癰randNo锛屾墠鐭ラ亾鏄坊鍔犲埌閭d釜鍝佺墝
-	// update tcm 20211125 娣诲姞鍨嬪彿鏃惰嚜鍔ㄥ甫鍑哄搧鐗� start
-	@AuraEnabled
-	public static String addProduct(){
-		system.debug('brandNo:'+brandNo);
-		LostBrand tempLostBrand = LostReport.LostBrands.get(brandNo);
-		// PCLLostProduct__c plp = new PCLLostProduct__c(Competitor__c=CompetitionMap.get(LostReport.LostBrands[brandNo].lostBrand.Lost_By_Company__c));
-		string brandName = tempLostBrand.lostBrand.Lost_By_Company__c;
-		PCLLostProduct__c plp = new PCLLostProduct__c();
-		plp.LostBrandName__c = brandName;
-		tempLostBrand.LostProducts.add(new PCLLostProducts(tempLostBrand.LostProducts.size(),plp));
-		tempLostBrand.ProductSize = tempLostBrand.LostProducts.size();
-		return null;
-	}
-	@AuraEnabled
-	public static PCLLostProducts getLostProduct(){
-		try {
-			PCLLostProduct__c plp = new PCLLostProduct__c();
-			return new PCLLostProducts(0,plp);
-		} catch (Exception e) {
-			throw new AuraHandledException(e.getMessage());
-		}
-	}
 	// update tcm 20211125 娣诲姞鍨嬪彿鏃惰嚜鍔ㄥ甫鍑哄搧鐗� end
 	// 椤甸潰鐨勬暟鎹粨鏋�
 	public class LostReport {

--
Gitblit v1.9.1