From 2f4492ee18f90274582fcc2bb06f5e9bf64136e8 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 13 五月 2022 17:32:14 +0800
Subject: [PATCH] ProdBackup0513
---
force-app/main/default/classes/NewDiagnosisPartController.cls | 4
force-app/main/default/classes/NewRepairPartsController.cls | 21
force-app/main/default/pages/EquipmentLoanerApply.page | 4
force-app/main/default/classes/TestDataUtility.cls | 20
force-app/main/default/classes/LoanerPortionReturnController.cls | 5
force-app/main/default/classes/MetaDataUtility.cls | 187 +
force-app/main/default/pages/NewDiagnosisPart.page | 15
force-app/main/default/pages/DeliveryConfirmPDF.page | 191 -
force-app/main/default/classes/NewHighProductsOppController.cls | 14
force-app/main/default/classes/SBG200Rest.cls | 4
force-app/main/default/classes/NewAndEditOpportunityControllerTest.cls | 8
force-app/main/default/classes/SBG001TriggerHandler.cls | 63
force-app/main/default/classes/TSRepairController.cls | 18
force-app/main/default/pages/OrderPdf3.page | 172 -
force-app/main/default/classes/ContactTriggerHandler.cls | 98
force-app/main/default/classes/DeleteSSBatch.cls | 2
force-app/main/default/classes/OpportunityWebService.cls | 77
force-app/main/default/classes/UpdateTotalCostPriceSetTextBatch.cls | 10
force-app/main/default/classes/loanerAppTriggerHandlerTest.cls | 32
force-app/main/default/classes/DeliveryConfirmPDFControllerTest.cls | 6
force-app/main/default/classes/AccountTriggerHandler.cls | 43
force-app/main/default/classes/OrderSplitRatioController.cls | 18
force-app/main/default/classes/NewLoanerApplicationControllerTest.cls | 6
force-app/main/default/pages/SWOPageRead.page | 130
force-app/main/default/classes/NewReplacementOpportunityController.cls | 6
force-app/main/default/classes/MetaDataUtility.cls-meta.xml | 5
force-app/main/default/classes/AWSServiceTool2.cls | 2
force-app/main/default/classes/SBG203Rest.cls | 83
force-app/main/default/classes/AWSServiceToolTest.cls | 48
force-app/main/default/classes/NewAndEditContactControllerTest.cls | 6
force-app/main/default/classes/IENewOpportunityController.cls | 11
force-app/main/default/pages/OrderPdf2.page | 170 -
force-app/main/default/pages/SendEmail.page | 550 ---
force-app/main/default/classes/NewCrossRegionalSalesController.cls | 14
force-app/main/default/classes/QuoteTriggerHandler.cls | 5
force-app/main/default/classes/MetaDataUtilityTest.cls-meta.xml | 5
force-app/main/default/classes/FileUploadControllerTest.cls-meta.xml | 5
force-app/main/default/classes/NewOpportunityController.cls | 8
force-app/main/default/classes/RadiationUtil.cls | 64
force-app/main/default/classes/OrderTriggerHandler.cls | 92
force-app/main/default/pages/QuotesPDF.page | 157 -
force-app/main/default/classes/NewAndEditOrderControllerTest.cls | 3
force-app/main/default/pages/ViewUserFaultInfoDecryptInfo.page | 20
force-app/main/default/classes/SendEmailController.cls | 52
force-app/main/default/pages/SWOPage.page | 267 -
force-app/main/default/classes/TSRepairControllerTest.cls | 5
force-app/main/default/classes/loanerAppTriggerHandler.cls | 13
force-app/main/default/classes/SoapApi.cls | 1
force-app/main/default/classes/IENewOpportunityControllerTest.cls-meta.xml | 2
force-app/main/default/classes/NewHighProductsOppControllerTest.cls | 6
force-app/main/default/classes/QuotePDFControllerTest.cls | 6
force-app/main/default/classes/OrderPdfController.cls | 17
force-app/main/default/classes/OrderPdf2Controller.cls | 17
force-app/main/default/classes/NewLoanerUserControllerTest.cls | 6
force-app/main/default/classes/NewCrossHighOpportunityController.cls | 12
force-app/main/default/classes/SBG203RestTest.cls | 5
force-app/main/default/pages/LoanerUploadFilePage.page | 2
force-app/main/default/pages/QuotePDF.page | 493 +--
force-app/main/default/classes/QuotesPDFController.cls | 9
force-app/main/default/classes/LicenseCheckUtilTest.cls | 1
force-app/main/default/pages/NEWCreateSWOQuote.page | 106
force-app/main/default/pages/OrderPDF.page | 2640 +++++++----------
force-app/main/default/pages/SSBDContractFileUploadPage.page | 2
force-app/main/default/pages/NewLoanerApplication.page | 287 -
force-app/main/default/classes/NewOpportunityControllerTest.cls | 5
force-app/main/default/pages/NewOpportunity.page | 83
force-app/main/default/pages/SearchMemberPage.page | 152
force-app/main/default/pages/NewQuoteEntry.page | 1
force-app/main/default/pages/NewCrossRegionalSalesOpportunity.page | 177 -
force-app/main/default/classes/SBG007TriggerHandler.cls | 78
force-app/main/default/classes/NewAndEditLoanerApplicationControlTest.cls | 3
force-app/main/default/pages/NEWCreateSWOQuoteReadOnly.page | 92
force-app/main/default/classes/SWOController.cls | 72
force-app/main/default/pages/NewCrossHighOpportunity.page | 149
force-app/main/default/classes/SBG007TriggerHandlerTest.cls | 15
force-app/main/default/classes/OrderWebService.cls | 2
force-app/main/default/classes/NewCrossRegionalControllerText.cls | 15
force-app/main/default/pages/ContractFileUploadPage.page-meta.xml | 7
force-app/main/default/pages/OrderDivision.page | 9
force-app/main/default/pages/TSRepair.page | 160 -
force-app/main/default/classes/MetaDataUtilityTest.cls | 36
force-app/main/default/classes/NewLoanerApplicationController.cls | 53
force-app/main/default/pages/NewRepairParts.page | 144
force-app/main/default/classes/SBG027Controller.cls | 59
force-app/main/default/classes/NewLoanerUserController.cls | 46
force-app/main/default/classes/SWOTriggerHandler.cls | 2
force-app/main/default/classes/calendarUtil.cls | 1
force-app/main/default/classes/StaticParameter.cls | 8
force-app/main/default/classes/SWOControllerTest.cls | 8
force-app/main/default/pages/StageProgressBar.page | 22
force-app/main/default/classes/DeliveryConfirmPDFController.cls | 6
force-app/main/default/classes/SearchMemberPageController.cls | 27
force-app/main/default/classes/NFMUtil.cls | 54
force-app/main/default/pages/ContractFileUploadPage.page | 195 +
force-app/main/default/classes/SendEmailControllerTest.cls | 6
force-app/main/default/classes/FileUploadControllerTest.cls | 63
force-app/main/default/classes/QuotesPDFControllerTest.cls | 6
force-app/main/default/classes/NewAndEditQuotesControllerTest.cls | 3
force-app/main/default/pages/LoanerPortionReturn.page | 74
force-app/main/default/pages/NewHighProductsOpp.page | 163
force-app/main/default/classes/SBG027TriggerHandleTest.cls | 5
force-app/main/default/classes/OpportunityTriggerHandler.cls | 23
force-app/main/default/classes/OrderPdfControllerTest.cls | 19
force-app/main/default/classes/QuotePDFController.cls | 17
force-app/main/default/classes/SBG001TriggerHandlerTest.cls | 6
force-app/main/default/staticresources/StageMapJsNew1.js | 22
force-app/main/default/classes/LicenseCheckUtil.cls | 16
force-app/main/default/pages/OpportunityOpenAlert.page | 1
force-app/main/default/pages/NewLoanerUser.page | 216 -
force-app/main/default/classes/SearchMemberPageControllerTest.cls | 6
force-app/main/default/classes/NEWCreateSWOQuoteController.cls | 46
force-app/main/default/classes/NEWCreateSWOQuoteControllerTest.cls | 6
force-app/main/default/classes/OrderPdf2ControllerTest.cls | 6
force-app/main/default/classes/AWSServiceTool2Test.cls | 1
force-app/main/default/classes/LoanerLendDeliverController.cls | 6
force-app/main/default/staticresources/StageMapJsNew1.resource-meta.xml | 2
force-app/main/default/pages/NewReplacementOpportunity.page | 47
117 files changed, 2,445 insertions(+), 6,347 deletions(-)
diff --git a/force-app/main/default/classes/AWSServiceTool2.cls b/force-app/main/default/classes/AWSServiceTool2.cls
index 2c96d1a..2ff4a43 100644
--- a/force-app/main/default/classes/AWSServiceTool2.cls
+++ b/force-app/main/default/classes/AWSServiceTool2.cls
@@ -187,5 +187,5 @@
}
return objList;
}
-
+
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/AWSServiceTool2Test.cls b/force-app/main/default/classes/AWSServiceTool2Test.cls
index f05170a..200ae49 100644
--- a/force-app/main/default/classes/AWSServiceTool2Test.cls
+++ b/force-app/main/default/classes/AWSServiceTool2Test.cls
@@ -52,6 +52,7 @@
Test.stopTest();
}
+
/*
diff --git a/force-app/main/default/classes/AWSServiceToolTest.cls b/force-app/main/default/classes/AWSServiceToolTest.cls
index 81d5e73..10d8720 100644
--- a/force-app/main/default/classes/AWSServiceToolTest.cls
+++ b/force-app/main/default/classes/AWSServiceToolTest.cls
@@ -43,4 +43,52 @@
AWSServiceTool.getNoPIContact(searchContactName,accountId);
Test.stopTest();
}
+ @isTest
+ static void Test4(){
+ Test.setMock(HttpCalloutMock.class, new HttpMock());
+
+
+ Test.startTest();
+ AWSServiceTool.sendToPiAWS('String rowDataStr', 'String endpoint','String awsToken');
+ Test.stopTest();
+ }
+ class HttpMock implements HttpCalloutMock{
+
+ string rid = '';
+ public HttpMock(){
+ }
+ public HttpMock(string rid){
+ this.rid = rid;
+ }
+ public HTTPResponse respond(HTTPRequest request) {
+ // 鍒涘缓涓�涓亣鐨勫洖搴�
+ System.debug('------------------------------------------------------');
+ HttpResponse response = new HttpResponse();
+ string body = '';
+ system.debug(request.getEndpoint());
+ string url = request.getEndpoint();
+
+ if(url.contains('token')){
+ system.debug('url=token');
+ response.setHeader('Content-Type', 'application/json');
+ body='{ "message": "", "object": "freqfewqfewewfewfew", "status": "", "success": true, "timestamp": 0, "txId": "" }';
+ } else if(url.toLowerCase().contains('insert')){
+ system.debug('url=Insert');
+ response.setHeader('Content-Type', 'application/json');
+ body='{ "message": "", "object": [ { "dataId": "123456", "directShippmentAddress": "", "directShippmentAddressEncrypt": "", "isDelete": 0, "phoneNumber": "", "phoneNumberEncrypt": "", "sfRecordId": "'+rid+'" } ], "status": "", "success": true, "timestamp": 0, "txId": "" }';
+ } else if(url.toLowerCase().contains('update')){
+ system.debug('url=update');
+ response.setHeader('Content-Type', 'application/json');
+ body='{ "message": "", "object": [ { "dataId": "123456", "directShippmentAddress": "", "directShippmentAddressEncrypt": "", "isDelete": 0, "phoneNumber": "", "phoneNumberEncrypt": "", "sfRecordId": "'+rid+'" } ], "status": "", "success": true, "timestamp": 0, "txId": "" }';
+ } else{
+
+ }
+
+ response.setBody(body);
+ response.setStatus('OK');
+ response.setStatusCode(200);
+ return response;
+ // }
+ }
+ }
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/AccountTriggerHandler.cls b/force-app/main/default/classes/AccountTriggerHandler.cls
index 63f44a9..194ddb3 100644
--- a/force-app/main/default/classes/AccountTriggerHandler.cls
+++ b/force-app/main/default/classes/AccountTriggerHandler.cls
@@ -36,7 +36,7 @@
//鏂板鏉冮檺鏁寸悊2021-05-10
if (new_profileId.subString(0, 15) == System.label.Market_Department || new_profileId.subString(0, 15) == System.label.Market_Department1 || new_profileId.subString(0, 15) == System.label.Service_Owner || new_profileId.subString(0, 15) == System.label.Service_OwnerMinister
- || UserInfo.getUserType() == 'PowerPartner' || new_profileId.subString(0, 15) == System.label.IEPrototypeManager || newAcc.RecordTypeId == '0120T0000003Cxt') {
+ || UserInfo.getUserType() == 'PowerPartner' || new_profileId.subString(0, 15) == System.label.IEPrototypeManager) {
//鏂板鏉冮檺鏁寸悊2021-05-10
newAcc.IsNew__c = true;
} else {
@@ -91,7 +91,7 @@
//IE涓嶭S鍒嗛噹鐨勫鍔犱笌淇敼
newAcc.Sub_UseA__c = newAcc.Sub_Use1__c;
newAcc.Sub_UseD__c = newAcc.Sub_Use__c;
- newAcc.IndustryBD__c = newAcc.IndustryB__c;
+ //newAcc.IndustryBD__c = newAcc.IndustryB__c;
//IE涓嶭S鍒嗛噹鐨勫鍔犱笌淇敼
newAcc.UseD__c = newAcc.Use__c;
@@ -113,9 +113,9 @@
}
//gwy 2021-06-04 LS 鏂板蹇呭~椤筄EM瀹㈡埛鐨勬爣璇�
- if(newAcc.UserType__c == 'OEM瀹㈡埛' && newAcc.ProductSegment__c == 'BS'){
+ /*if(newAcc.UserType__c == 'OEM瀹㈡埛' && newAcc.ProductSegment__c == 'BS'){
newAcc.Whether_OEM__c = true;
- }
+ }*/
//鐜嬮箯浼熸坊鍔� 鏈嶅姟閮ㄥ垱寤哄鎴枫�佽仈绯讳汉
//00528000000YWC6 瀛� 瀛︽磱 00528000000YWC6
//00528000000YWE7 鍚� 鏅撲笢 00528000000YWE7
@@ -895,7 +895,7 @@
// } else if (newAcc.Sub_Use__c == '鐐奸挗鍘�') {
// newAcc.IndustryC__c = 'Metal Manufacturing';
// newAcc.MarketVerticals__c = 'Manufacturing';
- // newAcc.Use__c = ' Tube/Rod/Bar/Sheet Metal';
+ // newAcc.Use__c = ' Tube/Rod/Bar/Sheet Metal';
// } else if (newAcc.Sub_Use__c == 'PMI-鐭冲寲琛屼笟') {
// newAcc.IndustryC__c = 'Chemical/Petrochemical/Plastics';
// newAcc.MarketVerticals__c = 'Maintenance';
@@ -1013,7 +1013,7 @@
newAcc.AssetNDT4D__c != oldAcc.AssetNDT4D__c ||
newAcc.IndustryCD__c != oldAcc.IndustryCD__c ||
//gwy BS
- newAcc.IndustryBD__c != oldAcc.IndustryBD__c ||
+ //newAcc.IndustryBD__c != oldAcc.IndustryBD__c ||
newAcc.AssetRVI4D__c != oldAcc.AssetRVI4D__c ||
newAcc.AssetRVI3D__c != oldAcc.AssetRVI3D__c ||
//newAcc.KeyAccountD__c != oldAcc.KeyAccountD__c ||
@@ -1069,11 +1069,9 @@
//鐜嬮箯浼� 娣诲姞&&((oldCon.ProductSegmentIE__c == true || oldCon.ProductSegmentRVI__c == true) && oldCon.isServiceCreate__c == true)
//鏈嶅姟閮ㄤ慨鏀硅仈绯讳汉淇℃伅 LS銆丯DT銆丄NI鏃犻渶瀹℃壒璺宠繃瀹℃壒鐘舵�佸彉鑽夋
//鏂板鏉冮檺鏁寸悊2021-05-10
- //gwy 2021-08-20 闄や簡甯傚満閮ㄧ殑浜猴紝閮藉彲浠ュ彉鑽夋
- //List<String> markNot = new String [] {'00528000000YVIc','0050K00000B3aNb','0050K00000B3aN7','00528000001uK0Z','00528000000YVHy','00528000000YVID'};
- if ((oldAcc.MarkisorNo__c == false
- //鏂板鏉冮檺鏁寸悊2021-05-10
- || UserInfo.getUserType() == 'PowerPartner')
+ if ((new_profileId.subString(0, 15) == System.label.Service_Owner
+ //鏂板鏉冮檺鏁寸悊2021-05-10
+ || UserInfo.getUserType() == 'PowerPartner' || now_userId == '00528000000YWC6' || now_userId == '00528000000YWE7')
&& !((oldAcc.ProductSegment__c == 'BS' || oldAcc.ProductSegment__c == 'NDT' || oldAcc.ProductSegment__c == 'ANI') && oldAcc.serviceCreate__c == true)) {
newAcc.stautesD__c = 'Draft';
}
@@ -1120,9 +1118,9 @@
newAcc.AssetNDT4D__c = newAcc.AssetNDT4__c;
}
//gwy BS
- if (newAcc.IndustryB__c != oldAcc.IndustryB__c) {
+ /*if (newAcc.IndustryB__c != oldAcc.IndustryB__c) {
newAcc.IndustryBD__c = newAcc.IndustryB__c;
- }
+ }*/
if (newAcc.IndustryC__c != oldAcc.IndustryC__c) {
newAcc.IndustryCD__c = newAcc.IndustryC__c;
}
@@ -1265,7 +1263,7 @@
newAcc.DepartmentNameD__c = newAcc.DepartmentName__c;
}
//gwy 2021-06-08 瀹㈡埛鍙栨秷閭紪蹇呭~椤�
- /* if (newAcc.PostCodeD__c == null) {
+ /*if (newAcc.PostCodeD__c == null) {
newAcc.PostCodeD__c = '000000';
}*/
//鐜嬮箯浼熸柊鍔� 鏈嶅姟閮ㄥ垱寤哄鎴疯仈绯讳汉
@@ -1531,8 +1529,8 @@
newAcc.AssetRVI2D__c = newAcc.AssetRVI2__c;
newAcc.AssetNDT4D__c = newAcc.AssetNDT4__c;
//gwy 2021-06-15 鏇存敼
- newAcc.IndustryBD__c = newAcc.IndustryB__c;
- newAcc.IndustryCD__c = newAcc.IndustryC__c;
+ //newAcc.IndustryBD__c = newAcc.IndustryB__c;
+ //newAcc.IndustryCD__c = newAcc.IndustryC__c;
//newAcc.IndustryCD__c = newAcc.IndustryB__c;
//newAcc.IndustryBD__c = newAcc.IndustryB__c;
newAcc.AssetRVI4D__c = newAcc.AssetRVI4__c;
@@ -1585,11 +1583,11 @@
}
}
//gwy 2021-06-04 LS 鏂板蹇呭~椤筄EM瀹㈡埛鐨勬爣璇�
- if(newAcc.UserType__c == 'OEM瀹㈡埛' && newAcc.ProductSegment__c == 'BS'){
+ /*if(newAcc.UserType__c == 'OEM瀹㈡埛' && newAcc.ProductSegment__c == 'BS'){
newAcc.Whether_OEM__c = true;
}else{
newAcc.Whether_OEM__c = false;
- }
+ }*/
}
}
@@ -1635,7 +1633,10 @@
for (Account newAcc : newList) {
accIdList.add(newAcc.Id);
- String dealerId = userMap.get(newAcc.OwnerId);
+ // String dealerId = userMap.get(newAcc.OwnerId);
+ // 鎵嬪姩瀵煎叆瀹㈡埛 XHL 20210818
+ String dealerId = String.isNotBlank(newAcc.ImportDealerId__c)? newAcc.ImportDealerId__c:userMap.get(newAcc.OwnerId);
+
String groupId = StaticParameter.dealerGroupMap.get(dealerId == null ? '' : dealerId.substring(0, 15));
Boolean flag = StaticParameter.specialDealerList.contains(dealerId == null ? '' : dealerId.substring(0, 15));
if (flag) {
@@ -1651,7 +1652,9 @@
List<AccountTeamMember> insertList = new list<AccountTeamMember>();
for (Account newAcc : newList) {
- String dealerId = userMap.get(newAcc.OwnerId);
+ // String dealerId = userMap.get(newAcc.OwnerId);
+ // 鎵嬪姩瀵煎叆瀹㈡埛 XHL 20210818
+ String dealerId = String.isNotBlank(newAcc.ImportDealerId__c)? newAcc.ImportDealerId__c:userMap.get(newAcc.OwnerId);
String groupId = StaticParameter.dealerGroupMap.get(dealerId == null ? '' : dealerId.substring(0, 15));
// 甯傚満鎴樼暐閮ㄦ柊寤轰繚瀛樻椂灏嗗垱寤鸿�呮彃鍏ュ鎴峰皬缁�
if (newAcc.IsStrCreated__c == true) {
diff --git a/force-app/main/default/classes/ContactTriggerHandler.cls b/force-app/main/default/classes/ContactTriggerHandler.cls
index e5f43b6..e17979a 100644
--- a/force-app/main/default/classes/ContactTriggerHandler.cls
+++ b/force-app/main/default/classes/ContactTriggerHandler.cls
@@ -5,7 +5,7 @@
// String new_profileId = UserInfo.getProfileId().subString(0,15);
//calendarUtil.getMemberProfileID 杩欓噷鐢ㄥ埌鐨勪汉鍛業D 鍜岃幏鍙栧埌鐨勭畝妗D閮芥槸15浣嶇殑
String new_profileId = calendarUtil.getMemberProfileID(UserInfo.getUserId().subString(0,15));
-
+
if (new_profileId.subString(0,15) == System.label.Market_Department || new_profileId.subString(0,15) == System.label.Market_Department1 || new_profileId.subString(0,15) == System.label.Service_Owner ||
UserInfo.getUserType() == 'PowerPartner') {
newCon.IsNew__c = true;
@@ -25,22 +25,8 @@
if(new_profileId.subString(0,15) == '00e28000000YKLo'){
newCon.IsNew__c = true;
}
- // PIPL Update 20220420 By Chen Yanan Start
- newCon.MobilePhoneD_Encrypted__c = newCon.MobilePhone_Encrypted__c;
- newCon.OtherPhoneD_Encrypted__c = newCon.OtherPhone_Encrypted__c;
- newCon.FaxD_Encrypted__c = newCon.Fax_Encrypted__c;
- newCon.EmailD_Encrypted__c = newCon.Email_Encrypted__c;
- newCon.PhoneD_Encrypted__c = newCon.Phone_Encrypted__c;
- newCon.TitleD_Encrypted__c = newCon.Title_Encrypted__c;
- newCon.Address1D_Encrypted__c = newCon.Address1_Encrypted__c;
- newCon.Address2D_Encrypted__c = newCon.Address2_Encrypted__c;
- newCon.Address3D_Encrypted__c = newCon.Address3_Encrypted__c;
- newCon.PostcodeD_Encrypted__c = newCon.Postcode_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
- System.debug('setIsNew newCon: ' + newCon);
}
-
}
public static void updateForDealer(List<Contact> newList, Map<Id, Contact> newMap, List<Contact> oldList, Map<Id, Contact> oldMap) {
@@ -79,73 +65,33 @@
if (newCon.MobilePhone != oldCon.MobilePhone) {
newCon.MobilePhoneD__c = newCon.MobilePhone;
- // PIPL Update 20220420 By Chen Yanan Start
- System.debug('MobilePhoneD_Encrypted__c');
- newCon.MobilePhoneD_Encrypted__c = newCon.MobilePhone_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newCon.OtherPhone != oldCon.OtherPhone) {
newCon.OtherPhoneD__c = newCon.OtherPhone;
- // PIPL Update 20220420 By Chen Yanan Start
- System.debug('OtherPhoneD_Encrypted__c');
- newCon.OtherPhoneD_Encrypted__c = newCon.OtherPhone_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newCon.Fax != oldCon.Fax) {
newCon.FaxD__c = newCon.Fax;
- // PIPL Update 20220420 By Chen Yanan Start
- System.debug('FaxD_Encrypted__c');
- newCon.FaxD_Encrypted__c = newCon.Fax_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newCon.Email != oldCon.Email) {
newCon.EmailD__c = newCon.Email;
- // PIPL Update 20220420 By Chen Yanan Start
- System.debug('EmailD_Encrypted__c');
- newCon.EmailD_Encrypted__c = newCon.Email_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newCon.Phone != oldCon.Phone) {
newCon.PhoneD__c = newCon.Phone;
- // PIPL Update 20220420 By Chen Yanan Start
- System.debug('PhoneD_Encrypted__c');
- newCon.PhoneD_Encrypted__c = newCon.Phone_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newCon.Title != oldCon.Title) {
newCon.TitleD__c = newCon.Title;
- // PIPL Update 20220420 By Chen Yanan Start
- System.debug('TitleD_Encrypted__c');
- newCon.TitleD_Encrypted__c = newCon.Title_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newCon.Address1__c != oldCon.Address1__c) {
newCon.Address1D__c = newCon.Address1__c;
- System.debug('Address1D_Encrypted__c');
- // PIPL Update 20220420 By Chen Yanan Start
- newCon.Address1D_Encrypted__c = newCon.Address1_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newCon.Address2__c != oldCon.Address2__c) {
newCon.Address2D__c = newCon.Address2__c;
- System.debug('Address2D_Encrypted__c');
- // PIPL Update 20220420 By Chen Yanan Start
- newCon.Address2D_Encrypted__c = newCon.Address2_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newCon.Address3__c != oldCon.Address3__c) {
newCon.Address3D__c = newCon.Address3__c;
- System.debug('Address3D_Encrypted__c');
- // PIPL Update 20220420 By Chen Yanan Start
- newCon.Address3D_Encrypted__c = newCon.Address3_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newCon.Postcode__c != oldCon.Postcode__c) {
newCon.PostcodeD__c = newCon.Postcode__c;
- System.debug('PostcodeD_Encrypted__c');
- // PIPL Update 20220420 By Chen Yanan Start
- newCon.PostcodeD_Encrypted__c = newCon.Postcode_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newCon.ContactStatus__c != oldCon.ContactStatus__c) {
@@ -154,10 +100,7 @@
if (newCon.CancelReason__c != oldCon.CancelReason__c) {
newCon.CancelReasonD__c = newCon.CancelReason__c;
}
- System.debug('updateForDealer newCon: ' + newCon);
}
-
-
}
public static void dealerContactApproval(List<Contact> newList, Map<Id, Contact> newMap, List<Contact> oldList, Map<Id, Contact> oldMap) {
@@ -196,18 +139,6 @@
newCon.ContactStatus__c = newCon.ContactStatusD__c;
newCon.CancelReason__c = newCon.CancelReasonD__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newCon.MobilePhone_Encrypted__c = newCon.MobilePhoneD_Encrypted__c;
- newCon.OtherPhone_Encrypted__c = newCon.OtherPhoneD_Encrypted__c;
- newCon.Fax_Encrypted__c = newCon.FaxD_Encrypted__c;
- newCon.Email_Encrypted__c = newCon.EmailD_Encrypted__c;
- newCon.Phone_Encrypted__c = newCon.PhoneD_Encrypted__c;
- newCon.Title_Encrypted__c = newCon.TitleD_Encrypted__c;
- newCon.Address1_Encrypted__c = newCon.Address1D_Encrypted__c;
- newCon.Address2_Encrypted__c = newCon.Address2D_Encrypted__c;
- newCon.Address3_Encrypted__c = newCon.Address3D_Encrypted__c;
- newCon.Postcode_Encrypted__c = newCon.PostcodeD_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
} else if (newCon.StatusD__c != oldCon.StatusD__c) {
if (newCon.StatusD__c == 'Submit') {
//newCon.DealerSelectOwner__c = newCon.Account.DealerSelectOwner__c;
@@ -236,19 +167,6 @@
newCon.ContactStatus__c = newCon.ContactStatusD__c;
newCon.CancelReason__c = newCon.CancelReasonD__c;
- // PIPL Update 20220420 By Chen Yanan Start
- System.debug('Pass');
- newCon.MobilePhone_Encrypted__c = newCon.MobilePhoneD_Encrypted__c;
- newCon.OtherPhone_Encrypted__c = newCon.OtherPhoneD_Encrypted__c;
- newCon.Fax_Encrypted__c = newCon.FaxD_Encrypted__c;
- newCon.Email_Encrypted__c = newCon.EmailD_Encrypted__c;
- newCon.Phone_Encrypted__c = newCon.PhoneD_Encrypted__c;
- newCon.Title_Encrypted__c = newCon.TitleD_Encrypted__c;
- newCon.Address1_Encrypted__c = newCon.Address1D_Encrypted__c;
- newCon.Address2_Encrypted__c = newCon.Address2D_Encrypted__c;
- newCon.Address3_Encrypted__c = newCon.Address3D_Encrypted__c;
- newCon.Postcode_Encrypted__c = newCon.PostcodeD_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
// if (accsMap.containsKey(newCon.AccountId + '' + newCon.OwnerId) == true && newCon.IsNew__c == true) {
// AccountShare upd = new AccountShare(
@@ -276,21 +194,7 @@
newCon.ContactStatusD__c = newCon.ContactStatus__c;
newCon.CancelReasonD__c = newCon.CancelReason__c;
- // PIPL Update 20220420 By Chen Yanan Start
- System.debug('Reject');
- newCon.MobilePhoneD_Encrypted__c = newCon.MobilePhone_Encrypted__c;
- newCon.OtherPhoneD_Encrypted__c = newCon.OtherPhone_Encrypted__c;
- newCon.FaxD_Encrypted__c = newCon.Fax_Encrypted__c;
- newCon.EmailD_Encrypted__c = newCon.Email_Encrypted__c;
- newCon.PhoneD_Encrypted__c = newCon.Phone_Encrypted__c;
- newCon.TitleD_Encrypted__c = newCon.Title_Encrypted__c;
- newCon.Address1D_Encrypted__c = newCon.Address1_Encrypted__c;
- newCon.Address2D_Encrypted__c = newCon.Address2_Encrypted__c;
- newCon.Address3D_Encrypted__c = newCon.Address3_Encrypted__c;
- newCon.PostcodeD_Encrypted__c = newCon.Postcode_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
- System.debug('dealerContactApproval newCon: ' + newCon);
}
}
// 鏇存柊瀹㈡埛灏忕粍
diff --git a/force-app/main/default/classes/DeleteSSBatch.cls b/force-app/main/default/classes/DeleteSSBatch.cls
index 9a4e48f..edf4f56 100644
--- a/force-app/main/default/classes/DeleteSSBatch.cls
+++ b/force-app/main/default/classes/DeleteSSBatch.cls
@@ -8,7 +8,7 @@
global Database.QueryLocator start(Database.BatchableContext bc) {
- return Database.getQueryLocator([select Id from SS_Opportunity_detail_product__c]);
+ return Database.getQueryLocator([select Id from SSBD_All_Report__c]);
}
diff --git a/force-app/main/default/classes/DeliveryConfirmPDFController.cls b/force-app/main/default/classes/DeliveryConfirmPDFController.cls
index f431ab0..61e0288 100644
--- a/force-app/main/default/classes/DeliveryConfirmPDFController.cls
+++ b/force-app/main/default/classes/DeliveryConfirmPDFController.cls
@@ -17,11 +17,9 @@
public boolean isExpress{get; private set; }
public boolean isRenew{get; private set; }
public String OCM_Number{get; private set; }
- public String staticResource{get; private set; }// 20220221 PI鏀归�� by Bright
public DeliveryConfirmPDFController() {
laId = System.currentPageReference().getParameters().get('id');
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('loaner_application__c'));// 20220221 PI鏀归�� by Bright
}
//鍒濆鍖栨暟鎹�
public PageReference init(){
@@ -40,9 +38,7 @@
baseUrl += '/production';
}
//鑾峰彇鍊熺敤鍗曚俊鎭�
- List<loaner_application__c> laList = [select Id,Follow_Opp_text__c,Follow_Opp__r.InquiryNumber__c,Equipment_Type__c ,pickup_time__c,Loaner_Apply_Renewal_Date__c,loaner_Remark__c,Rental_End_Date__c,Loaner_Ser__c,Approval_Date__c,loaner_request_number__c,Agent__r.Name,Approver__r.Name,Rental_Start_Date__c,loaner_place__c,Demo_purpose__c,direct_shippment_address__c,Loaner_receive_staff__c,Loaner_receive_staff_phone__c,CreatorUserType__c,
- AWS_Data_Id__c,// 20220221 PI鏀归�� by Bright
- Applicant_department__c from loaner_application__c where Id = :laId];
+ List<loaner_application__c> laList = [select Id,Follow_Opp_text__c,Follow_Opp__r.InquiryNumber__c,Equipment_Type__c ,pickup_time__c,Loaner_Apply_Renewal_Date__c,loaner_Remark__c,Rental_End_Date__c,Loaner_Ser__c,Approval_Date__c,loaner_request_number__c,Agent__r.Name,Approver__r.Name,Rental_Start_Date__c,loaner_place__c,Demo_purpose__c,direct_shippment_address__c,Loaner_receive_staff__c,Loaner_receive_staff_phone__c,CreatorUserType__c,Applicant_department__c from loaner_application__c where Id = :laId];
if (laList.size() == 0) {
return null;
}
diff --git a/force-app/main/default/classes/DeliveryConfirmPDFControllerTest.cls b/force-app/main/default/classes/DeliveryConfirmPDFControllerTest.cls
index 62e128b..70b650d 100644
--- a/force-app/main/default/classes/DeliveryConfirmPDFControllerTest.cls
+++ b/force-app/main/default/classes/DeliveryConfirmPDFControllerTest.cls
@@ -1,12 +1,6 @@
@isTest
private class DeliveryConfirmPDFControllerTest {
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'loaner_application__c'});
- }
-
-
@isTest static void test_method_one() {
// Implement test code
OlympusCalendar__c oc1 = new OlympusCalendar__c(Date__c = Date.today().addDays(1), ChangeToHoliday__c=false, ChangeToWorkday__c=true);
diff --git a/force-app/main/default/classes/FileUploadControllerTest.cls b/force-app/main/default/classes/FileUploadControllerTest.cls
new file mode 100644
index 0000000..676ac12
--- /dev/null
+++ b/force-app/main/default/classes/FileUploadControllerTest.cls
@@ -0,0 +1,63 @@
+@isTest
+private class FileUploadControllerTest {
+ static testMethod void testMethod1() {
+ // TestDataUtility.CreatePIPolicyConfiguration('Document');
+ TestDataUtility.CreatePIPolicyConfiguration();
+ Account acc = new Account(Name = 'test');
+ Map<String,Object> accMap = new Map<String,Object>();
+ accMap.put('Account',acc);
+ accMap.put('object','vjdoneqvds');
+ String mapJson = JSON.serialize(accMap);
+
+ Contact con = TestDataUtility.CreateContacts(1)[0];
+
+ Test.setMock(HttpCalloutMock.class, new TestDataUtility.BaseHttpMock(mapJson,'OK','200'));
+
+ Test.startTest();
+ ApexPages.StandardController sc = new ApexPages.StandardController(con);
+ FileUploadController fuc = new FileUploadController(sc);
+
+ String msg = fuc.PIPL_Input_PDF_Error_Msg;
+ Document doc = fuc.documentData;
+ FileUploadController.Response fur = new FileUploadController.Response();
+ fur.message = '';
+
+ FileUploadController.saveFile('Contact','123','456',fuc.parentId);
+
+ FileAddress__c file = new FileAddress__c();
+ PIHelper.PIIntegration pI=PIHelper.getPIIntegrationInfo('Document');
+ file.DownloadLink__c =pI.undeleteUrl+'123'+'&fileName='+'Contact';
+ file.FileName__c ='Contact';
+ file.ViewLink__c =pI.queryUrl+'123';
+ file.ParentRecordId__c =fuc.parentId;
+ file.AWS_File_Key__c = '123';
+ insert file;
+
+ FileUploadController.saveFile('Contact','123','456',fuc.parentId);
+ fuc.refreshFiles();
+ fuc.parentId = '';
+ fuc.refreshFiles();
+ try{
+ delete file;
+ }catch(Exception e){
+ system.debug('Exception from delete file:'+e.getmessage());
+ }
+ Test.stopTest();
+ }
+ static testMethod void testMethod2() {
+ TestDataUtility.CreatePIPolicyConfiguration('Document');
+ Account acc = new Account(Name = 'test');
+ Map<String,Object> accMap = new Map<String,Object>();
+ accMap.put('Account',acc);
+ accMap.put('object','vjdoneqvds');
+ String mapJson = JSON.serialize(accMap);
+
+ Test.setMock(HttpCalloutMock.class, new TestDataUtility.BaseHttpMock(mapJson,'OK','200'));
+
+ Test.startTest();
+ // throw new DMLException('insert false for test');
+ FileUploadController.saveFile('','','','');
+
+ Test.stopTest();
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/FileUploadControllerTest.cls-meta.xml b/force-app/main/default/classes/FileUploadControllerTest.cls-meta.xml
new file mode 100644
index 0000000..541584f
--- /dev/null
+++ b/force-app/main/default/classes/FileUploadControllerTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>50.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/IENewOpportunityController.cls b/force-app/main/default/classes/IENewOpportunityController.cls
index adc16fe..1095832 100644
--- a/force-app/main/default/classes/IENewOpportunityController.cls
+++ b/force-app/main/default/classes/IENewOpportunityController.cls
@@ -1,10 +1,3 @@
-/**
- * @description :
- * @author : ChangeMeIn@UserSettingsUnder.SFDoc
- * @group :
- * @last modified on : 04-08-2022
- * @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
-**/
public with sharing class IENewOpportunityController {
public boolean hasError { get; set; }
//public boolean isDealerPage { get; set; }
@@ -59,7 +52,6 @@
opp.compo_opp__c = true;
}
opp.AccountId = acc.Id;
- opp.Name = acc.Name;//dennis updated for test
opp.Account = acc;
opp.ProductSegment__c = acc.ProductSegment__c;
opp.Type = 'Not Traget';
@@ -103,9 +95,8 @@
Savepoint sp = Database.setSavepoint();
try {
- //0120K000000OptT姝e紡鐜
//0120T0000003Ser娴嬭瘯鐜
- opp.RecordTypeId = '0120T0000003Ser';
+ opp.RecordTypeId = '0120K000000OptT';
opp.SalesChannel__c = 'direct';
insert opp;
if(opp.Have_Computer__c && opp.Association_Opportunity__c != null){
diff --git a/force-app/main/default/classes/IENewOpportunityControllerTest.cls-meta.xml b/force-app/main/default/classes/IENewOpportunityControllerTest.cls-meta.xml
index 40d6793..f3bac1f 100644
--- a/force-app/main/default/classes/IENewOpportunityControllerTest.cls-meta.xml
+++ b/force-app/main/default/classes/IENewOpportunityControllerTest.cls-meta.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
- <apiVersion>54.0</apiVersion>
+ <apiVersion>41.0</apiVersion>
<status>Active</status>
</ApexClass>
diff --git a/force-app/main/default/classes/LicenseCheckUtil.cls b/force-app/main/default/classes/LicenseCheckUtil.cls
index 04bc005..77907d7 100644
--- a/force-app/main/default/classes/LicenseCheckUtil.cls
+++ b/force-app/main/default/classes/LicenseCheckUtil.cls
@@ -99,20 +99,4 @@
return isOk;
}
-
- //鑱旂郴浜烘槸鍚︽槸濉啓鐨勫鎴蜂笅鐨勶紵
- /*public static Boolean CustomerContactCheck(){
- Boolean disPersed = false;
- List<Order> ordList = new List<Order>();
- ordList = [select id,name,SpecialDeliveryAccount__c,SpecialDeliveryContact2__c,SpecialDeliveryAccount_D__c,SpecialDeliveryContact2_D__c from Order];
- for (Order ord : ordList) {
- if(ord.SpecialDeliveryAccount__c != null && ord.SpecialDeliveryContact2__c != null && ord.SpecialDeliveryAccount__c != ord.SpecialDeliveryContact2__r.Name){
- disPersed = true;
- }else if(ord.SpecialDeliveryAccount_D__c != null && ord.SpecialDeliveryContact2_D__c != null && ord.SpecialDeliveryAccount_D__c != ord.SpecialDeliveryContact2_D__r.Name){
- disPersed = true;
- }
- }
-
- return disPersed;
- }*/
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/LicenseCheckUtilTest.cls b/force-app/main/default/classes/LicenseCheckUtilTest.cls
index 5fdf6f4..cbd1ad9 100644
--- a/force-app/main/default/classes/LicenseCheckUtilTest.cls
+++ b/force-app/main/default/classes/LicenseCheckUtilTest.cls
@@ -93,5 +93,4 @@
LicenseCheckUtil.LicenseCheck(acc1.Id);
}
-
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/LoanerLendDeliverController.cls b/force-app/main/default/classes/LoanerLendDeliverController.cls
index 16ca356..dfc92b2 100644
--- a/force-app/main/default/classes/LoanerLendDeliverController.cls
+++ b/force-app/main/default/classes/LoanerLendDeliverController.cls
@@ -6,10 +6,6 @@
public loaner_application__c lac {get;private set;}
public loaner_application__c la { get; private set; }
- // // 20220311 PI鏀归�� --start
- // public string staticResource { get; private set; }
- // // 20220311 PI鏀归�� --end
-
public Set<String> laSet {get; private set;}
/* 鐢婚潰姝ラ
* 涓嬫灦:StockDown
@@ -27,7 +23,6 @@
public LoanerLendDeliverController() {
laId = System.currentPageReference().getParameters().get('id');
step = System.currentPageReference().getParameters().get('step');
- //staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact')); //20220311 PI鏀归��
}
public PageReference init() {
@@ -378,7 +373,6 @@
le.Name = temp.day()+ '鏃�'+str+'鐗╂祦鍗�';
if(str.equals('鍥炲瘎')) le.IsDeliveryLogistics__c = false;
try{
- system.debug('le:'+le);
insert le;
}catch(Exception ex){
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, ex.getMessage() + ' | Line:' + ex.getLineNumber()));
diff --git a/force-app/main/default/classes/LoanerPortionReturnController.cls b/force-app/main/default/classes/LoanerPortionReturnController.cls
index 9e4731f..dc45f15 100644
--- a/force-app/main/default/classes/LoanerPortionReturnController.cls
+++ b/force-app/main/default/classes/LoanerPortionReturnController.cls
@@ -8,7 +8,6 @@
public loaner_application__c la { get; private set; }
public boolean isOk {get; private set; }
public String step { get; private set; }
- public String staticResource { get; private set; }// Update PIPL 20220425 By Chen Yanan
public String loanerType {get; private set; }
// 鏄庣粏Bean
@@ -21,7 +20,6 @@
public LoanerPortionReturnController() {
laId = System.currentPageReference().getParameters().get('id');
step = System.currentPageReference().getParameters().get('step');
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('loaner_application__c'));// Update PIPL 20220425 By Chen Yanan
}
public PageReference init() {
@@ -44,7 +42,7 @@
}
// 鏍锋満鍊熷嚭鐢宠鍙栧緱
- List<loaner_application__c> laList = [select Id,AWS_Data_Id__c,loaner_request_number__c,Return_Trake_Staff__c,Return_Track_Company__c,Return_Track_Number__c,Status__c,HP_Received_Sign_Date__c,RecordType.DeveloperName,loaner_manage_place__c,Equipment_Type__c from loaner_application__c where Id = :laId]; //Update PIPL 20220425 By Chen Yanan
+ List<loaner_application__c> laList = [select Id,loaner_request_number__c,Return_Trake_Staff__c,Return_Track_Company__c,Return_Track_Number__c,Status__c,HP_Received_Sign_Date__c,RecordType.DeveloperName,loaner_manage_place__c,Equipment_Type__c from loaner_application__c where Id = :laId];
if (laList.size() == 0) {
return null;
}
@@ -58,7 +56,6 @@
lac = new loaner_application__c();
lac.Return_Track_Company__c = la.Return_Track_Company__c;
lac.Return_Track_Number__c = la.Return_Track_Number__c;
- lac.AWS_Data_Id__c = la.AWS_Data_Id__c; //Update PIPL 20220425 By Chen Yanan
lac.return_Number__c = '';
if(la.Return_Trake_Staff__c != null){
lac.Return_Trake_Staff__c = la.Return_Trake_Staff__c;
diff --git a/force-app/main/default/classes/MetaDataUtility.cls b/force-app/main/default/classes/MetaDataUtility.cls
new file mode 100644
index 0000000..3466204
--- /dev/null
+++ b/force-app/main/default/classes/MetaDataUtility.cls
@@ -0,0 +1,187 @@
+public without sharing class MetaDataUtility {
+
+ public static List<Metadata.LayoutSection> GetRecordTypePageLayout(string record_type_id,string objectType){
+
+ Map<string,object> mso = null;
+ string layout_name = GetRecordTypePageLayoutName(record_type_id,objectType,UserInfo.getProfileId());
+ system.debug('layout_name='+layout_name);
+ List<Metadata.LayoutSection> temp = GetLayoutSections(objectType,layout_name);
+ if(temp==null){
+ return null;
+ }
+ List<Metadata.LayoutSection> layoutSectionList = new List<Metadata.LayoutSection>();
+ for(Metadata.LayoutSection section : temp){
+ boolean a = false;
+ for( Metadata.LayoutColumn c: section.layoutColumns){
+ //system.debug(c);
+ if(c.layoutItems != null && c.layoutItems.size() > 0 ){
+ a = true;
+ }
+
+ }
+ if(a){
+ layoutSectionList.add(section);
+ }
+ }
+ return layoutSectionList;
+ }
+
+ /*[{
+ "attributes": {
+ "type": "Layout",
+ "url": "/services/data/v53.0/tooling/sobjects/Layout/00h10000009iAb5AAE"
+ },
+ "Id": "00h10000009iAb5AAE",
+ "Name": ".瀹㈡埛浜哄憳銉偆銈€偊銉�",
+ "TableEnumOrId": "01I10000000er3hEAA",
+ "LayoutType": "Standard"
+ }]
+ */
+
+ public static string GetTableOrEnumId(string objectType){
+
+
+ Map<string,object> mso = null;
+ string resp = null;
+ string table_or_enum_id = objectType;
+ List<EntityDefinition> led = [SELECT Id, DurableId, DeveloperName, MasterLabel, Label, QualifiedApiName FROM EntityDefinition where QualifiedApiName = :objectType];
+ if(led.size()>0){
+ table_or_enum_id = led[0].DurableId;
+ }
+ /*
+ if(objectType.endsWith('__c')){
+ resp = ToolingQuery('SELECT id,DeveloperName from CustomObject where DeveloperName =\''+objectType.replace('__c', '')+'\'');
+ if(resp == null){
+ system.debug('resp is not ok');
+ return null;
+ }else{
+ mso = (Map<string,object>)Json.deserializeUntyped(resp);
+ if(integer.valueOf(mso.get('size')) > 0){
+ table_or_enum_id = string.valueOf(((Map<string,object>)(((List<object>)mso.get('records'))[0])).get('Id'));
+ }else{
+ system.debug('no records');
+ return null;
+ }
+ }
+ }*/
+
+ return table_or_enum_id;
+ }
+
+ /*
+ public static List<object> GetAllPageLayout(string objectType){
+ string resp = null;
+ Map<string,object> mso = null;
+
+
+ string table_or_enum_id = GetTableOrEnumId(objectType);
+
+ if(string.isBlank(table_or_enum_id)){
+ return new List<object>();
+ }
+
+ resp = ToolingQuery('SELECT id,name,TableEnumOrId,LayoutType FROM Layout where TableEnumOrId = \''+table_or_enum_id+'\'');
+ if(resp == null){
+ system.debug('Layout where TableEnumOrId='+table_or_enum_id+' is null');
+ return null;
+ }else{
+ mso = (Map<string,object>)Json.deserializeUntyped(resp);
+ if(integer.valueOf(mso.get('size')) > 0){
+ return (List<object>)mso.get('records');
+ }else{
+ system.debug('no records');
+ return new List<object>();
+ }
+ }
+ }*/
+
+
+ public static string GetRecordTypePageLayoutName(string record_type_id,string objectType, string profile_id){
+
+ // if(!string.isBlank(objectType)){
+ // List<sobject> lso = [SELECT Id, Name, DeveloperName, SobjectType, IsActive, Description, BusinessProcessId FROM RecordType where SobjectType = :objectType];
+ // if(lso.size()==0){
+ // return string.valueOf(((Map<string,object>)(GetAllPageLayout(objectType)[0])).get('Name'));
+ // }
+ // }
+
+ // 01210000000QfWdAAK
+ string query = 'SELECT Layout.Name, Layout.TableEnumOrId, ProfileId, Profile.Name, RecordTypeId FROM ProfileLayout where id!=null ';
+ if(!string.isBlank(record_type_id)){
+ query += ' and RecordTypeId = \''+record_type_id+'\'';
+ }
+
+ if(!string.isBlank(objectType)){
+ query += ' and TableEnumOrId = \''+ GetTableOrEnumId(objectType) +'\'';
+ }
+
+ if(!string.isBlank(profile_id)){
+ query += ' and ProfileId = \''+profile_id+'\'';
+ }
+ query += ' order by LastModifiedDate desc ';
+
+ string s = ToolingQuery(query);
+ if(string.isBlank(s)){
+ system.debug('s is blank');
+ return null;
+ }else{
+ Map<string,object> mso = (Map<string,object>)JSON.deserializeUntyped(s);
+
+ if(integer.valueOf(mso.get('size')) > 0){
+ List<object> records = ((List<object>)mso.get('records'));
+
+ mso = (Map<string,object>)(records[0]);
+ return string.valueOf(((Map<string,object>)(mso.get('Layout'))).get('Name'));
+ }else{
+ return null;
+ }
+ }
+
+
+
+ }
+
+ public static string ToolingQuery(string query){
+
+ system.debug('query='+query);
+ String baseURL = 'callout:SF_Rest_API/services/data/v41.0/tooling/query?q='+ query.replace(' ', '+');
+ HttpResponse resp = null;
+ HttpRequest req = new HttpRequest();
+ req.setMethod('GET');
+
+ //req.setHeader('Authorization', 'Bearer ' + UserInfo.getsessionid());
+ //req.setEndpoint(baseURL);
+ req.setEndpoint(baseURL);
+
+ Http client = new Http();
+ resp = client.send(req);
+
+ system.debug(resp.getStatus());
+ system.debug(resp.getStatusCode());
+ if(resp.getStatus() == 'OK'){
+ string s = resp.getBody();
+ system.debug(resp.getBody());
+ return s;
+ }else{
+ system.debug('status is not ok,error:'+resp.getBody());
+ return null;
+ }
+
+ }
+
+ public static List<Metadata.LayoutSection> GetLayoutSections(string object_name, string layout_name){
+ List<String> componentNameList = new List<String>{object_name+'-'+layout_name};
+ //閫氳繃Metadata.Operations.retrieve鑾峰彇metadata
+ //Metadata.Layout -> Metadata.LayoutSection -> Metadata.LayoutColumn objects -> Metadata.LayoutItem objects
+ List<Metadata.Metadata> componentList = Metadata.Operations.retrieve(Metadata.MetadataType.Layout, componentNameList);
+ if(componentList?.size() > 0){
+ Metadata.Layout layout = (Metadata.Layout) componentList.get(0);
+ List<Metadata.LayoutSection> layoutSectionList = layout.layoutSections;
+ return layoutSectionList;
+ }
+ else{
+ return null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/MetaDataUtility.cls-meta.xml b/force-app/main/default/classes/MetaDataUtility.cls-meta.xml
new file mode 100644
index 0000000..40d6793
--- /dev/null
+++ b/force-app/main/default/classes/MetaDataUtility.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>54.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/MetaDataUtilityTest.cls b/force-app/main/default/classes/MetaDataUtilityTest.cls
new file mode 100644
index 0000000..7d55268
--- /dev/null
+++ b/force-app/main/default/classes/MetaDataUtilityTest.cls
@@ -0,0 +1,36 @@
+@isTest
+public class MetaDataUtilityTest {
+
+ @isTest
+ static void Test1(){
+ /*
+ Test.setMock(HttpCalloutMock.class, new CalloutMockContainer('{"size":1,"totalSize":1,"done":true,"queryLocator":null,"entityTypeName":"Layout","records":[{"attributes":{"type":"Layout","url":"/services/data/v41.0/tooling/sobjects/Layout/00h28000001ReZhAAK"},"Id":"00h28000001ReZhAAK","Name":"Order Product Layout","TableEnumOrId":"OrderItem","LayoutType":"Standard"}]}'));
+ MetaDataUtility.GetRecordTypePageLayout(null, 'OrderItem');
+ Test.setMock(HttpCalloutMock.class, new CalloutMockContainer('{"size":4,"totalSize":4,"done":true,"queryLocator":null,"entityTypeName":"ProfileLayout","records":[{"attributes":{"type":"ProfileLayout","url":"/services/data/v41.0/tooling/sobjects/ProfileLayout/01G0T00000AowJEUAZ"},"Layout":{"attributes":{"type":"Layout","url":"/services/data/v41.0/tooling/sobjects/Layout/00h28000001ReZOAA0"},"Name":"Case Layout","TableEnumOrId":"Case"},"ProfileId":"00e28000000wAuNAAU","Profile":{"attributes":{"type":"Profile","url":"/services/data/v41.0/tooling/sobjects/Profile/00e28000000wAuNAAU"},"Name":"绯荤粺绠$悊鍛�"},"RecordTypeId":"0120T00000023R0QAI"},{"attributes":{"type":"ProfileLayout","url":"/services/data/v41.0/tooling/sobjects/ProfileLayout/01G0T00000AowMSUAZ"},"Layout":{"attributes":{"type":"Layout","url":"/services/data/v41.0/tooling/sobjects/Layout/00h0T000000dswbQAA"},"Name":"Case LayoutApproval","TableEnumOrId":"Case"},"ProfileId":"00e28000000wAuNAAU","Profile":{"attributes":{"type":"Profile","url":"/services/data/v41.0/tooling/sobjects/Profile/00e28000000wAuNAAU"},"Name":"绯荤粺绠$悊鍛�"},"RecordTypeId":"0120T00000023R5QAI"},{"attributes":{"type":"ProfileLayout","url":"/services/data/v41.0/tooling/sobjects/ProfileLayout/01G0T00000AowPgUAJ"},"Layout":{"attributes":{"type":"Layout","url":"/services/data/v41.0/tooling/sobjects/Layout/00h0T000000dswbQAA"},"Name":"Case LayoutApproval","TableEnumOrId":"Case"},"ProfileId":"00e28000000wAuNAAU","Profile":{"attributes":{"type":"Profile","url":"/services/data/v41.0/tooling/sobjects/Profile/00e28000000wAuNAAU"},"Name":"绯荤粺绠$悊鍛�"},"RecordTypeId":"0120T00000023RAQAY"},{"attributes":{"type":"ProfileLayout","url":"/services/data/v41.0/tooling/sobjects/ProfileLayout/01G2800000HvfFWEAZ"},"Layout":{"attributes":{"type":"Layout","url":"/services/data/v41.0/tooling/sobjects/Layout/00h28000001ReZOAA0"},"Name":"Case Layout","TableEnumOrId":"Case"},"ProfileId":"00e28000000wAuNAAU","Profile":{"attributes":{"type":"Profile","url":"/services/data/v41.0/tooling/sobjects/Profile/00e28000000wAuNAAU"},"Name":"绯荤粺绠$悊鍛�"},"RecordTypeId":null}]}'));
+ MetaDataUtility.GetRecordTypePageLayout(null, 'Case');*/
+
+ Test.setMock(HttpCalloutMock.class, new CalloutMockContainer('{"size":3,"totalSize":3,"done":true,"queryLocator":null,"entityTypeName":"ProfileLayout","records":[{"attributes":{"type":"ProfileLayout","url":"/services/data/v41.0/tooling/sobjects/ProfileLayout/01G2800000wKyt5EAC"},"Layout":{"attributes":{"type":"Layout","url":"/services/data/v41.0/tooling/sobjects/Layout/00h28000003OBy1AAG"},"Name":"Contact layout for dealer Approval","TableEnumOrId":"Contact"},"ProfileId":"00e28000000wAuNAAU","Profile":{"attributes":{"type":"Profile","url":"/services/data/v41.0/tooling/sobjects/Profile/00e28000000wAuNAAU"},"Name":"绯荤粺绠$悊鍛�"},"RecordTypeId":"01228000000PvwMAAS"},{"attributes":{"type":"ProfileLayout","url":"/services/data/v41.0/tooling/sobjects/ProfileLayout/01G2800000wKysdEAC"},"Layout":{"attributes":{"type":"Layout","url":"/services/data/v41.0/tooling/sobjects/Layout/00h28000001ReZNAA0"},"Name":"Contact Layout","TableEnumOrId":"Contact"},"ProfileId":"00e28000000wAuNAAU","Profile":{"attributes":{"type":"Profile","url":"/services/data/v41.0/tooling/sobjects/Profile/00e28000000wAuNAAU"},"Name":"绯荤粺绠$悊鍛�"},"RecordTypeId":"01228000000PvwLAAS"},{"attributes":{"type":"ProfileLayout","url":"/services/data/v41.0/tooling/sobjects/ProfileLayout/01G2800000HvfFYEAZ"},"Layout":{"attributes":{"type":"Layout","url":"/services/data/v41.0/tooling/sobjects/Layout/00h28000001ReZNAA0"},"Name":"Contact Layout","TableEnumOrId":"Contact"},"ProfileId":"00e28000000wAuNAAU","Profile":{"attributes":{"type":"Profile","url":"/services/data/v41.0/tooling/sobjects/Profile/00e28000000wAuNAAU"},"Name":"绯荤粺绠$悊鍛�"},"RecordTypeId":null}]}'));
+ MetaDataUtility.GetRecordTypePageLayout(null, 'Contact');
+
+
+ }
+
+ class CalloutMockContainer implements HttpCalloutMock {
+
+ string body;
+ public CalloutMockContainer(string body){
+ this.body = body;
+ }
+
+ // 瀹炵幇杩欎釜鎺ュ彛鏂规硶
+ public HTTPResponse respond(HTTPRequest request) {
+ // 鍒涘缓涓�涓亣鐨勫洖搴�
+ HttpResponse response = new HttpResponse();
+ response.setHeader('Content-Type', 'application/json');
+ response.setBody(body);
+ response.setStatus('ok');
+ response.setStatusCode(200);
+ return response;
+ }
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/MetaDataUtilityTest.cls-meta.xml b/force-app/main/default/classes/MetaDataUtilityTest.cls-meta.xml
new file mode 100644
index 0000000..40d6793
--- /dev/null
+++ b/force-app/main/default/classes/MetaDataUtilityTest.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>54.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/NEWCreateSWOQuoteController.cls b/force-app/main/default/classes/NEWCreateSWOQuoteController.cls
index 8762845..8375826 100644
--- a/force-app/main/default/classes/NEWCreateSWOQuoteController.cls
+++ b/force-app/main/default/classes/NEWCreateSWOQuoteController.cls
@@ -28,10 +28,6 @@
public Boolean aftORbef { get; set; }
public Boolean aftORbef1 { get; set; }
-
- public String staticResource { get; private set; }// 20220311 PI鏀归�� by Bright
- public String contactstaticResource { get; private set; }// 20220311 PI鏀归�� by Bright
-
public NEWCreateSWOQuoteController() {
swoId = System.currentPageReference().getParameters().get('swoId');
Id = System.currentPageReference().getParameters().get('Id');
@@ -45,9 +41,6 @@
baseUrl += '/production';
}
rtUrl = System.currentPageReference().getParameters().get('retURL');
-
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Quotes__c'));// 20220221 PI鏀归�� by Bright
- contactstaticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));// 20220221 PI鏀归�� by Bright
}
public NEWCreateSWOQuoteController(ApexPages.StandardController controller) {
@@ -238,9 +231,7 @@
if (String.isNotBlank(Id)) {
List<Quotes__c> quotesList = new List<Quotes__c>();
- quotesList = [SELECT Id,
- AWS_Data_Id__c,CONTACT_NAME__r.Name,CONTACT_NAME__r.AWS_Data_Id__c, // 20220311 PI鏀归�� by Bright
- Name, BILLING_SCHEDULE__c, BILL_TO__c, SHIP_TO__c, BILL_TO_SELECT__c, CATEGORY_1_INDUSTRY_SO__c, CATEGORY_2_USE_SO__c, COLLECTION_STATUS__c, CONTACT_EMAIL__c, CONTACT_FAX__c, CONTACT_NAME__c, CONTACT_PHONE__c, CONTRACT_NAME__c, CURRENCY__c, DATE__c, DISCOUNT_ITEM__c, DISCOUNT_ITEM_F__c, DISCOUNT_WORKFLOW_TYPE__c, EST_EXTENDED_COST__c, EST_GROSS_PROFIT__c, EST_GROSS_PROFIT_PERCENT__c, ESTIMATE__c, EXP_CLOSE__c, EXPIRES__c, FDA_REPORT_COMPLETE__c, GOVERNMENT_ORDER__c, GSA_ORDER__c, INCOTERM__c, INITIATE_APPROVAL_ROUTING__c, INVOICE_MESSAGING__c, IS_SELLER_IMPORTER_OF_RECORD__c, LEAD_SOURCE__c, LEAD_TIME__c, LOCATION__c, NO_CHARGE_TYPE__c, notSaveEmail__c, NSN__c, ONLINE_BILLING__c, ONLINE_BILLING_ADDRESS__c, OPPORTUNITY__c, ORDER_TYPE__c, PKMS_PO_FOR_RECEIPT__c, PO__c, PROBABILITY__c, PRODUCT_SEGMENT__c, QUOTE_TITLE__c, RATE__c, RepairPart__c, REVISION_NEEDED__c, RMA_NOTES__c, COMPANY__c, SALES_TEAM_AUTO_ASSIGNMENT_OVERRIDE__c, SALES_TEAM_AUTO_ASSIGN_ON_SAVE__c, SELECT_MESSAGE__c, SHIPPING_CARRIER__c, SHIPPING_COST__c, SHIPPING_TAX_CODE__c, SHIPPING_TAX_RATE__c, SHIP_TO_ENTITY_USE_CODE__c, SHIP_TO_SELECT__c, SHIP_VIA__c, STATUS__c, SUBSIDIARY__c, SUBTOTAL__c, SWO__c, SWOName__c, SWO_NUMBER__c, SWO_PART_NUMBERS__c, SWO_SERIAL__c, SWOStatus__c, TAX_ID__c, TAX_OVERRIDE__c, TERMS__c, TERMS_OVERRIDE__c, THROW_MESSAGE__c, TOTAL_TRANSACTION_ITEM_WEIGHT_KGS__c, VERTICAL_MARKET_SEGMENT_SO__c, QuotesType__c, CUSTOMER_MESSAGE__c, TOTAL__c, BILL_TO_ENTITY_USE_CODE__c, COMPANYId__c, COMPANYName__c, DISCOUNT_STATUS__c, DISCOUNT_STATUS_ROUTING__c, TAX_CODE__c, TAX_RATE__c, TAX__c, DISCOUNT__c, SWOStatusMark__c FROM Quotes__c WHERE Id = :Id];
+ quotesList = [SELECT Id, Name, BILLING_SCHEDULE__c, BILL_TO__c, SHIP_TO__c, BILL_TO_SELECT__c, CATEGORY_1_INDUSTRY_SO__c, CATEGORY_2_USE_SO__c, COLLECTION_STATUS__c, CONTACT_EMAIL__c, CONTACT_FAX__c, CONTACT_NAME__c, CONTACT_PHONE__c, CONTRACT_NAME__c, CURRENCY__c, DATE__c, DISCOUNT_ITEM__c, DISCOUNT_ITEM_F__c, DISCOUNT_WORKFLOW_TYPE__c, EST_EXTENDED_COST__c, EST_GROSS_PROFIT__c, EST_GROSS_PROFIT_PERCENT__c, ESTIMATE__c, EXP_CLOSE__c, EXPIRES__c, FDA_REPORT_COMPLETE__c, GOVERNMENT_ORDER__c, GSA_ORDER__c, INCOTERM__c, INITIATE_APPROVAL_ROUTING__c, INVOICE_MESSAGING__c, IS_SELLER_IMPORTER_OF_RECORD__c, LEAD_SOURCE__c, LEAD_TIME__c, LOCATION__c, NO_CHARGE_TYPE__c, notSaveEmail__c, NSN__c, ONLINE_BILLING__c, ONLINE_BILLING_ADDRESS__c, OPPORTUNITY__c, ORDER_TYPE__c, PKMS_PO_FOR_RECEIPT__c, PO__c, PROBABILITY__c, PRODUCT_SEGMENT__c, QUOTE_TITLE__c, RATE__c, RepairPart__c, REVISION_NEEDED__c, RMA_NOTES__c, COMPANY__c, SALES_TEAM_AUTO_ASSIGNMENT_OVERRIDE__c, SALES_TEAM_AUTO_ASSIGN_ON_SAVE__c, SELECT_MESSAGE__c, SHIPPING_CARRIER__c, SHIPPING_COST__c, SHIPPING_TAX_CODE__c, SHIPPING_TAX_RATE__c, SHIP_TO_ENTITY_USE_CODE__c, SHIP_TO_SELECT__c, SHIP_VIA__c, STATUS__c, SUBSIDIARY__c, SUBTOTAL__c, SWO__c, SWOName__c, SWO_NUMBER__c, SWO_PART_NUMBERS__c, SWO_SERIAL__c, SWOStatus__c, TAX_ID__c, TAX_OVERRIDE__c, TERMS__c, TERMS_OVERRIDE__c, THROW_MESSAGE__c, TOTAL_TRANSACTION_ITEM_WEIGHT_KGS__c, VERTICAL_MARKET_SEGMENT_SO__c, QuotesType__c, CUSTOMER_MESSAGE__c, TOTAL__c, BILL_TO_ENTITY_USE_CODE__c, COMPANYId__c, COMPANYName__c, DISCOUNT_STATUS__c, DISCOUNT_STATUS_ROUTING__c, TAX_CODE__c, TAX_RATE__c, TAX__c, DISCOUNT__c, SWOStatusMark__c FROM Quotes__c WHERE Id = :Id];
if (quotesList.size() > 0) {
QuotesPage = quotesList[0];
}
@@ -298,8 +289,8 @@
// Mail 椤甸潰鍒濆鍖� Start
List<String> mailIdList = new List<String>();
- List<FileAddress__c> attList = new List<FileAddress__c>();
- Map<String, List<FileAddress__c>> attMap = new Map<String, List<FileAddress__c>>();
+ List<Attachment> attList = new List<Attachment>();
+ Map<String, List<Attachment>> attMap = new Map<String, List<Attachment>>();
Map<String, Mail_Merge__c> mailMap = new Map<String, Mail_Merge__c>([select id, FROM__c, ccName__c, SUBJECT__c, MESSAGE__c, DATE__c, toName__c, EMAIL_SENT__c from Mail_Merge__c where Quotes__c = :Id order by id]);
@@ -307,15 +298,15 @@
if (mailMap != null) {
mailIdList.addAll(mailMap.keySet());
- attList = [select id, Name, FileName__c,ParentRecordId__c from FileAddress__c where ParentRecordId__c in :mailIdList order by ParentRecordId__c, id];
+ attList = [select id, Name, ParentId from Attachment where ParentId in :mailIdList order by ParentId, id];
if (attList.size() > 0) {
- for (FileAddress__c att : attList) {
- if (attMap.containsKey(att.ParentRecordId__c)) {
- attMap.get(att.ParentRecordId__c).add(att);
+ for (Attachment att : attList) {
+ if (attMap.containsKey(att.ParentId)) {
+ attMap.get(att.ParentId).add(att);
} else {
- List<FileAddress__c> a = new List<FileAddress__c>();
+ List<Attachment> a = new List<Attachment>();
a.add(att);
- attMap.put(att.ParentRecordId__c, a);
+ attMap.put(att.ParentId, a);
}
}
}
@@ -333,6 +324,7 @@
}
//棣栧厛鏄粠swo鍒涘缓quotes锛屾湁浜唖woid,灏辨槸鐢ㄦ柊鐨勯潤鎬佽祫婧愭樉绀虹殑鍏嶈矗鐢虫槑銆�
//涔嬪悗锛岀紪杈戝凡缁忓垱寤哄畬浜嗙殑quotes锛�15鍙蜂箣鍓嶅垱寤虹殑锛屾樉绀虹殑鏄棫鐨勩�傛棫鐨勫氨鏄痑ftORbef==false銆�
+ //褰撶劧锛宎ftORbef==false鍏蜂綋鎸囩殑鏄棫鐨勪篃鍙互鎸囨煡涓嶅埌鐨�(杩樻病鏈夊瓨鍏ユ暟鎹簱鐨勶紝鍒涘缓鏃�)銆�
if (String.isNotBlank(swoId)) {
aftORbef1 = true;
}else{
@@ -370,7 +362,7 @@
if ('缁翠慨鎶ヤ环鍗�'.equals(QuotesPage.QuotesType__c)) {
QuotesPage.CUSTOMER_MESSAGE__c = '';
//鏃ユ湡2121骞�11鏈�15鍙蜂箣鍚庣殑,鐢ㄦ柊鐨勫厤璐g敵鏄庛��
- if (aftORbef == true) {
+ if (aftORbef == true || aftORbef1 == true) {
QuotesPage.CUSTOMER_MESSAGE__c += '-缁翠慨璐ㄤ繚鍙兜鐩栦簬鏈缁翠慨鐨勯厤浠讹紝缁翠慨璐ㄤ繚鏈熶负浠櫒鍙戣揣鍚庝笁涓湀鍔犲叓澶┿�俓n';
Messages01 = '-缁翠慨璐ㄤ繚鍙兜鐩栦簬鏈缁翠慨鐨勯厤浠讹紝缁翠慨璐ㄤ繚鏈熶负浠櫒鍙戣揣鍚庝笁涓湀鍔犲叓澶┿��';
}else{
@@ -388,8 +380,13 @@
Messages05 = '鏃ユ湡锛�';
} else if ('闆朵欢鎶ヤ环鍗�'.equals(QuotesPage.QuotesType__c)) {
QuotesPage.CUSTOMER_MESSAGE__c = '';
- QuotesPage.CUSTOMER_MESSAGE__c += '-濂ユ灄宸存柉鏈嶅姟閮ㄥ敭鍑虹殑缁翠慨閰嶄欢纭繚涓鸿川閲忕鍚堝ゥ鏋楀反鏂弬鏁版寚鏍囩殑鏂板搧锛屽ゥ鏋楀反鏂鍞嚭鐨勭淮淇厤浠朵笉鎻愪緵淇濅慨鏈嶅姟锛屽悓鏃朵篃涓嶆彁渚涢��銆佹崲璐ф湇鍔°�傛暚璇锋偍璋ㄦ厧璐拱銆俓n';
- Messages01 = '-濂ユ灄宸存柉鏈嶅姟閮ㄥ敭鍑虹殑缁翠慨閰嶄欢纭繚涓鸿川閲忕鍚堝ゥ鏋楀反鏂弬鏁版寚鏍囩殑鏂板搧锛屽ゥ鏋楀反鏂鍞嚭鐨勭淮淇厤浠朵笉鎻愪緵淇濅慨鏈嶅姟锛屽悓鏃朵篃涓嶆彁渚涢��銆佹崲璐ф湇鍔°�傛暚璇锋偍璋ㄦ厧璐拱銆�';
+ if ('NDT'.equals(QuotesPage.PRODUCT_SEGMENT__c)) {
+ QuotesPage.CUSTOMER_MESSAGE__c += '-浠櫙閫氬厜瀛︾鎶�(涓婃捣)鏈夐檺鍏徃鍖椾含鍒嗗叕鍙稿敭鍑虹殑缁翠慨閰嶄欢涓哄ゥ鏋楀反鏂師鍘傞厤浠讹紝浠櫙閫氬叕鍙稿鍞嚭鐨勭淮淇厤浠朵笉鎻愪緵淇濅慨鏈嶅姟锛屼篃涓嶆彁渚涢��銆佹崲璐ф湇鍔★紝鏁鎮ㄨ皑鎱庤喘涔般�俓n';
+ Messages01 = '-浠櫙閫氬厜瀛︾鎶�(涓婃捣)鏈夐檺鍏徃鍖椾含鍒嗗叕鍙稿敭鍑虹殑缁翠慨閰嶄欢涓哄ゥ鏋楀反鏂師鍘傞厤浠讹紝浠櫙閫氬叕鍙稿鍞嚭鐨勭淮淇厤浠朵笉鎻愪緵淇濅慨鏈嶅姟锛屼篃涓嶆彁渚涢��銆佹崲璐ф湇鍔★紝鏁鎮ㄨ皑鎱庤喘涔般��';
+ }else {
+ QuotesPage.CUSTOMER_MESSAGE__c += '-濂ユ灄宸存柉鏈嶅姟閮ㄥ敭鍑虹殑缁翠慨閰嶄欢纭繚涓鸿川閲忕鍚堝ゥ鏋楀反鏂弬鏁版寚鏍囩殑鏂板搧锛屽ゥ鏋楀反鏂鍞嚭鐨勭淮淇厤浠朵笉鎻愪緵淇濅慨鏈嶅姟锛屽悓鏃朵篃涓嶆彁渚涢��銆佹崲璐ф湇鍔°�傛暚璇锋偍璋ㄦ厧璐拱銆俓n';
+ Messages01 = '-濂ユ灄宸存柉鏈嶅姟閮ㄥ敭鍑虹殑缁翠慨閰嶄欢纭繚涓鸿川閲忕鍚堝ゥ鏋楀反鏂弬鏁版寚鏍囩殑鏂板搧锛屽ゥ鏋楀反鏂鍞嚭鐨勭淮淇厤浠朵笉鎻愪緵淇濅慨鏈嶅姟锛屽悓鏃朵篃涓嶆彁渚涢��銆佹崲璐ф湇鍔°�傛暚璇锋偍璋ㄦ厧璐拱銆�';
+ }
QuotesPage.CUSTOMER_MESSAGE__c += '-鐢ㄦ埛鍦ㄦ纭姝ゆ鎶ヤ环锛屽喅瀹氳喘涔帮細\n';
Messages02 = '-鐢ㄦ埛鍦ㄦ纭姝ゆ鎶ヤ环锛屽喅瀹氳喘涔帮細';
QuotesPage.CUSTOMER_MESSAGE__c += '瀹㈡埛绛惧瓧鎴栫洊绔狅細\n';
@@ -404,6 +401,7 @@
if (String.isNotBlank(swoId)) {
QuotesPage.SWO__c = swoId;
+ //鏃ユ湡2121骞�11鏈�15鍙蜂箣鍚庣殑,鐢ㄦ柊鐨勫厤璐g敵鏄庛��
aftORbef = true;
}
if (!'Cancel'.equals(QuotesPage.STATUS__c)) {
@@ -730,16 +728,16 @@
public class EmailInfo {
public Mail_Merge__c mm {get; set; }
- public List<FileAddress__c> attList {get; set; }
+ public List<Attachment> attList {get; set; }
public String haveAtt {get; set;}
public EmailInfo() {
}
- public EmailInfo(Mail_Merge__c mm_in, List<FileAddress__c> attList_in) {
+ public EmailInfo(Mail_Merge__c mm_in, List<Attachment> attList_in) {
mm = mm_in;
if (attList_in == null || attList_in.size() == 0) {
haveAtt = 'No';
- attList = new List<FileAddress__c>();
+ attList = new List<Attachment>();
} else {
attList = attList_in;
haveAtt = 'Yes';
diff --git a/force-app/main/default/classes/NEWCreateSWOQuoteControllerTest.cls b/force-app/main/default/classes/NEWCreateSWOQuoteControllerTest.cls
index 1c6162c..07d5e1f 100644
--- a/force-app/main/default/classes/NEWCreateSWOQuoteControllerTest.cls
+++ b/force-app/main/default/classes/NEWCreateSWOQuoteControllerTest.cls
@@ -1,11 +1,5 @@
@isTest
private class NEWCreateSWOQuoteControllerTest {
-
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Quotes__c','Contact'});
- }
-
static testMethod void QuotesIdIsNull() {
List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE'];
diff --git a/force-app/main/default/classes/NFMUtil.cls b/force-app/main/default/classes/NFMUtil.cls
index e35f4ec..5e80a26 100644
--- a/force-app/main/default/classes/NFMUtil.cls
+++ b/force-app/main/default/classes/NFMUtil.cls
@@ -58,39 +58,7 @@
webservice String TransmissionDateTime;
webservice String Text;
}
- //add for pipl sushanhu 20220311 start
- /*public static response sendToPiAWS(String rowDataStr, String endpoint,String awsToken) {
- Http http = new Http();
- HttpRequest req = new HttpRequest();
- HTTPResponse res;
- String resb;
- req.setHeader('Content-Type', 'application/json');
- req.setTimeout(120000);
- req.setEndpoint(endpoint);
- req.setMethod('POST');
- req.setHeader('pi-token', awsToken);
- req.setBody(rowDataStr);
- res = http.send(req);
- string ress = String.valueOf(res.getStatusCode()) ;
- resb = res.getBody();
- system.debug('ress:' + ress);
- return new response(ress, resb);
- }
-
- public static response getAwsToken(){
- String responseBody = AWSServiceTool.getAWSToken();
- return new response('success', responseBody);
- }
- public class response {
- public string status;
- public string responseBody;
- public response(string status, string responseBody ) {
- this.status = status;
- this.responseBody = responseBody;
- }
- }*/
- //add for pipl sushanhu 20220311 end
/**
* @return yyyyMMdd 銇棩浠樻枃瀛楀垪
*/
@@ -345,27 +313,7 @@
}
return result;
}
-//add for pipl sushanhu 20220311 start
- /*global class NFMResponse{
- public Boolean SFStatus;
- public String SFMessage;
- public StaticResponse staticResponse;
- }
- global class StaticResponse{
- public string status;
- public String Message;
- public StaticResponse(){
- status='0';
- Message='';
- }
- }
- public static NFMResponse getNFMResponse(){
- NFMResponse result=new NFMResponse();
- result.staticResponse =new StaticResponse();
- return result;
-
- }*/
-//add for pipl sushanhu 20220311 end
public static Boolean EscapeSBG001TriggerHandler = false;
+
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/NewAndEditContactControllerTest.cls b/force-app/main/default/classes/NewAndEditContactControllerTest.cls
index c7789ca..162c19a 100644
--- a/force-app/main/default/classes/NewAndEditContactControllerTest.cls
+++ b/force-app/main/default/classes/NewAndEditContactControllerTest.cls
@@ -9,7 +9,7 @@
// Contact con = TestDataUtility.CreateContacts(1)[0];
Account acc = TestDataUtility.CreateAccounts(1)[0];
Contact con = new Contact();
- String url = ApexPages.currentPage().getParameters().put('retURL','/'+acc.Id);
+ String url = ApexPages.currentPage().getParameters().put('con4_lkid',acc.Id);
Test.startTest();
ApexPages.StandardController sc = new ApexPages.StandardController(con);
@@ -26,9 +26,9 @@
Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock());
// Contact contactTest = TestDataUtility.CreateContacts(1)[0];
- // Account acc = TestDataUtility.CreateAccounts(1)[0];
+ //Account acc = TestDataUtility.CreateAccounts(1)[0];
//Account acc1 = [SELECT Id,Name FROM Account WHERE RecordType.DeveloperName = 'Office' OR RecordType.DeveloperName = 'AgencyContact' OR RecordType.DeveloperName = 'Agency' Limit 1];
- String accrecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
+ String accrecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Dealer').getRecordTypeId();
Account acc1 = new Account(Name = 'testacc1',RecordTypeId = accrecordTypeId,ProductSegment__c='BS');
insert acc1;
Contact contact = new Contact();
diff --git a/force-app/main/default/classes/NewAndEditLoanerApplicationControlTest.cls b/force-app/main/default/classes/NewAndEditLoanerApplicationControlTest.cls
index 40d5393..4b9bb25 100644
--- a/force-app/main/default/classes/NewAndEditLoanerApplicationControlTest.cls
+++ b/force-app/main/default/classes/NewAndEditLoanerApplicationControlTest.cls
@@ -6,7 +6,8 @@
}
static testMethod void NewAndEditLoanerApplicationController() {
Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock());
- loaner_application__c la = TestDataUtility.Createloanerapplications(1)[0];
+ loaner_application__c la = new loaner_application__c();
+ //loaner_application__c la = TestDataUtility.Createloanerapplications(1)[0];
Test.startTest();
ApexPages.StandardController con = new ApexPages.StandardController(la);
diff --git a/force-app/main/default/classes/NewAndEditOpportunityControllerTest.cls b/force-app/main/default/classes/NewAndEditOpportunityControllerTest.cls
index 90d2ef1..011b413 100644
--- a/force-app/main/default/classes/NewAndEditOpportunityControllerTest.cls
+++ b/force-app/main/default/classes/NewAndEditOpportunityControllerTest.cls
@@ -6,11 +6,17 @@
}
static testMethod void NewAndEditOpportunityController() {
Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock());
- Opportunity opp = TestDataUtility.CreateOpportunitys(1)[0];
+ Opportunity opp = new Opportunity();
+ //Opportunity opp = TestDataUtility.CreateOpportunitys(1)[0];
+
Test.startTest();
+ Map<string,string> mso = ApexPages.currentPage().getParameters();
+ mso.put('accid', 'value');
+ mso.put('conId', 'value');
ApexPages.StandardController sc = new ApexPages.StandardController(opp);
NewAndEditOpportunityController qis = new NewAndEditOpportunityController(sc);
qis.contactId = 'test';
+ qis.primaryContactId = 'test';
String qisJson = '{"Is_Decided__c":false,"the_Upload_of_quotation_number__c":"","Cancel_Fail_Approve__c":"","SAP_QuotationCode__c":"","compo_opp__c":false,"CanChangeOpp__c":true,"Name":"test1","AccountId":"0010l00001Q1r4e","RecordTypeId":"012280000005hjO","Type":"","ApprovalStatus_D__c":"Draft","ProductSegment__c":"IE","SpecialPriceApproveStatus__c":"","BudgetAmount__c":"","Machine_Parts__c":"Machine","Amount":"","CurrencyIsoCode":"CNY","customerType__c":"","IsFirstDecide__c":false,"IE_need_business_approve__c":false,"IE_Discount_Special__c":"","IE_ShippingHandling__c":"","IE_local_cost__c":"","IE_Custom_Price__c":"","IE_Payment_terms__c":"","StockAnswerSummary__c":"","Phase1Date__c":"","InquiryResult__c":"","Phase2Date__c":"","ExpectedOrderDate__c":"","Phase3Date__c":"","ExpectedDeliveryDate__c":"","Order_Date__c":"","DeliveryDate__c":"","InquiryResultOrder__c":"","LeadSource":"","TradeType__c":"Taxation","CustomerSourceIE__c":"","SalesChannel__c":"dealer","Trade_Type_D__c":"Taxation","Dealer__c":"0010l00001Pj768","DealerSalesStaffName__c":"***","DealerService__c":"***","SubDealer__c":"test","Dealer_Sales_Staff_Name_D__c":"***","Dealer_Service_D__c":"***","Competitor_Product__c":"","CompetitorProductCode__c":"","Competitor_Product2__c":"","CompetitorProductCode2__c":"","Competitor_Product3__c":"","CompetitorProductCode3__c":"","Competitor_Product4__c":"","CompetitorProductCode4__c":"","Competitor_Product5__c":"","CompetitorProductCode5__c":"","Competitor_Product6__c":"","CompetitorProductCode6__c":"","Competitor_Product7__c":"","CompetitorProductCode7__c":"","Competitor_Product8__c":"","CompetitorProductCode8__c":"","CompetitorCompany__c":"_0001_","LostAmount__c":"","LostCompetitorProduct__c":"","InquiryResultLost__c":"","LostReason__c":"","LostReasonText__c":"","CancelReason__c":"","InquiryResultCancel__c":"","CancelReasonText__c":"","Have_Computer__c":false,"Remark__c":"","NewInquiryDate__c":"2022-4-8","StageName":"Prospect Created","Probability":"","OppUpdateDateTime__c":"","CloseDate":"2022-4-8","ProductSegmentCompetitor__c":"","IsNew__c":false,"OpportunityAmount_text__c":"","OpportunityLineItem_text__c":"","OpportunityLineItemOT_text__c":"","IsSendEmail__c":true,"IsUpdate__c":false,"OppUpdateDate__c":"","DealerSalesStaffName_Encrypted__c":"dcce196c4cfc273a83777852ddd486ab","Dealer_Sales_Staff_Name_D_Encrypted__c":"dcce196c4cfc273a83777852ddd486ab","DealerService_Encrypted__c":"dcce196c4cfc273a83777852ddd486ab","Dealer_Service_D_Encrypted__c":"dcce196c4cfc273a83777852ddd486ab","AWS_Data_Id__c":"961991622629785601"}';
NewAndEditOpportunityController.saveOpportunity(qisJson,'avgwshDFcxAS',False);
diff --git a/force-app/main/default/classes/NewAndEditOrderControllerTest.cls b/force-app/main/default/classes/NewAndEditOrderControllerTest.cls
index 5ccb07f..c7c2eb4 100644
--- a/force-app/main/default/classes/NewAndEditOrderControllerTest.cls
+++ b/force-app/main/default/classes/NewAndEditOrderControllerTest.cls
@@ -8,6 +8,9 @@
Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock());
Order od = TestDataUtility.CreateOrders(1)[0];
+
+
+
Test.startTest();
ApexPages.StandardController sc = new ApexPages.StandardController(od);
NewAndEditOrderController qis = new NewAndEditOrderController(sc);
diff --git a/force-app/main/default/classes/NewAndEditQuotesControllerTest.cls b/force-app/main/default/classes/NewAndEditQuotesControllerTest.cls
index c224661..0852ec2 100644
--- a/force-app/main/default/classes/NewAndEditQuotesControllerTest.cls
+++ b/force-app/main/default/classes/NewAndEditQuotesControllerTest.cls
@@ -6,7 +6,8 @@
}
static testMethod void NewAndEditQuotesController() {
Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock());
- Quotes__c uf = TestDataUtility.CreateQuotes(1)[0];
+ //Quotes__c uf = TestDataUtility.CreateQuotes(1)[0];
+ Quotes__c uf = new Quotes__c();
Test.startTest();
ApexPages.StandardController con = new ApexPages.StandardController(uf);
diff --git a/force-app/main/default/classes/NewCrossHighOpportunityController.cls b/force-app/main/default/classes/NewCrossHighOpportunityController.cls
index 815d013..dd4c0b5 100644
--- a/force-app/main/default/classes/NewCrossHighOpportunityController.cls
+++ b/force-app/main/default/classes/NewCrossHighOpportunityController.cls
@@ -14,10 +14,6 @@
public String ProductSegment { get; set; }
- public String staticResource {get; set;}
-
- public String oppid {get; set;}
-
public NewCrossHighOpportunityController() {
baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
String path = URL.getCurrentRequestUrl().getPath();
@@ -37,8 +33,6 @@
accId = System.currentPageReference().getParameters().get('accid');
conId = System.currentPageReference().getParameters().get('conId');
-
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Opportunity'));
List<Account> accList = [select Id, Name, ProductSegment__c,OwnerID__c from Account where Id = :accId];
if (accList.size() > 0) {
@@ -114,10 +108,8 @@
hasError = false;
- oppid = opp.id;
- // String url = baseUrl + '\\' + opp.Id;
- // return new Pagereference(url);
- return null;
+ String url = baseUrl + '\\' + opp.Id;
+ return new Pagereference(url);
} catch (Exception e) {
Database.rollback(sp);
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, e.getMessage()));
diff --git a/force-app/main/default/classes/NewCrossRegionalControllerText.cls b/force-app/main/default/classes/NewCrossRegionalControllerText.cls
index 468555f..138fbef 100644
--- a/force-app/main/default/classes/NewCrossRegionalControllerText.cls
+++ b/force-app/main/default/classes/NewCrossRegionalControllerText.cls
@@ -1,11 +1,5 @@
@isTest
private class NewCrossRegionalControllerText {
-
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Opportunity','SBG001','Contact'});
- }
-
static testMethod void testMethod1() {
List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE'];
Account accIE = new Account(
@@ -63,12 +57,6 @@
TradeType__c = 'Taxation'
);
insert opp1;
-
- OpportunityContactRole ocr = new OpportunityContactRole(OpportunityId=opp1.Id,ContactId=con.Id,Role = 'End user' , IsPrimary = true);
- insert ocr;
-
-
-
PageReference page = new PageReference('/apex/NewCrossHighOpportunity?accid=' + accIE.Id + '&conId=' + con.Id);
System.Test.setCurrentPage(page);
@@ -146,9 +134,6 @@
TradeType__c = 'Taxation'
);
insert opp1;
-
- OpportunityContactRole ocr = new OpportunityContactRole(OpportunityId=opp1.Id,ContactId=con.Id,Role = 'End user' , IsPrimary = true);
- insert ocr;
PageReference page = new PageReference('/apex/NewCrossRegionalSalesOpportunity?accid=' + accIE.Id + '&conId=' + con.Id);
System.Test.setCurrentPage(page);
diff --git a/force-app/main/default/classes/NewCrossRegionalSalesController.cls b/force-app/main/default/classes/NewCrossRegionalSalesController.cls
index eb16921..bed8ed2 100644
--- a/force-app/main/default/classes/NewCrossRegionalSalesController.cls
+++ b/force-app/main/default/classes/NewCrossRegionalSalesController.cls
@@ -16,10 +16,6 @@
public Boolean isIEDealer{get; set; }
- public String staticResource {get; set;}
-
- public String oppid {get; set;}
-
public NewCrossRegionalSalesController() {
baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
String path = URL.getCurrentRequestUrl().getPath();
@@ -40,14 +36,12 @@
accId = System.currentPageReference().getParameters().get('accid');
conId = System.currentPageReference().getParameters().get('conId');
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Opportunity'));
-
List<Account> accList = [select Id, Name, ProductSegment__c,compo_Acc__c,UserType__c from Account where Id = :accId];
if (accList.size() > 0) {
acc = accList[0];
}
- List<Contact> conList = [select Id, Name from Contact where Id = :conId];//pi
+ List<Contact> conList = [select Id, Name from Contact where Id = :conId];
if (conList.size() > 0) {
con = conList[0];
}
@@ -145,10 +139,8 @@
hasError = false;
- // String url = baseUrl + '\\' + opp.Id;
- // return new Pagereference(url);
- oppid = opp.id;
- return null;
+ String url = baseUrl + '\\' + opp.Id;
+ return new Pagereference(url);
} catch (Exception e) {
Database.rollback(sp);
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, e.getMessage()));
diff --git a/force-app/main/default/classes/NewDiagnosisPartController.cls b/force-app/main/default/classes/NewDiagnosisPartController.cls
index 82aefa3..ae68ac0 100644
--- a/force-app/main/default/classes/NewDiagnosisPartController.cls
+++ b/force-app/main/default/classes/NewDiagnosisPartController.cls
@@ -79,8 +79,7 @@
if (diagnosisPart.DELIVERED__c == false && String.isBlank(diagnosisPart.Id)) {
Boolean isUpdateSwo = false;
- List<SWO__c> swoList = [select Id,Diagnose_part_not_delievered_1__c,Diagnose_part_not_delievered_2__c,Diagnose_part_not_delievered_3__c from SWO__c where Id=:diagnosisPart.SWO__c];
- System.debug('swoList.size():'+swoList.size());
+ List<SWO__c> swoList = [select Diagnose_part_not_delievered_1__c,Diagnose_part_not_delievered_2__c,Diagnose_part_not_delievered_3__c from SWO__c where Id=:diagnosisPart.SWO__c];
if (swoList!=null && swoList.size()!=0) {
SWO__c swo = swoList[0];
if(String.isBlank(swo.Diagnose_part_not_delievered_1__c)){
@@ -93,7 +92,6 @@
isUpdateSwo = true;
swo.Diagnose_part_not_delievered_3__c = diagnosisPart.PART_NUMBER__c;
}
- System.debug('swo.Id:'+swo.Id);
if(isUpdateSwo) update swo;
}
}
diff --git a/force-app/main/default/classes/NewHighProductsOppController.cls b/force-app/main/default/classes/NewHighProductsOppController.cls
index a5b53a2..95fc59a 100644
--- a/force-app/main/default/classes/NewHighProductsOppController.cls
+++ b/force-app/main/default/classes/NewHighProductsOppController.cls
@@ -14,10 +14,6 @@
public String ProductSegment { get; set; }
- public String staticResource {get; set;}
-
- public String oppid {get; set;}
-
public NewHighProductsOppController() {
baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
String path = URL.getCurrentRequestUrl().getPath();
@@ -37,7 +33,6 @@
accId = System.currentPageReference().getParameters().get('accid');
conId = System.currentPageReference().getParameters().get('conId');
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Opportunity'));
List<Account> accList = [select Id, Name, ProductSegment__c,OwnerID__c from Account where Id = :accId];
if (accList.size() > 0) {
@@ -65,7 +60,7 @@
opp.AccountId = acc.Id;
opp.Account = acc;
opp.ProductSegment__c = acc.ProductSegment__c;
- opp.Type = 'Not Traget';
+ opp.Type = '闈炵洰鏍�';
opp.SalesChannel__c = 'dealer';
opp.NewInquiryDate__c = Date.today();
opp.StageName = 'Prospect Created';
@@ -108,10 +103,9 @@
insert ocr;
hasError = false;
- oppid = opp.id;
- // String url = baseUrl + '\\' + opp.Id;
- // return new Pagereference(url);
- return null;
+
+ String url = baseUrl + '\\' + opp.Id;
+ return new Pagereference(url);
} catch (Exception e) {
Database.rollback(sp);
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, e.getMessage()));
diff --git a/force-app/main/default/classes/NewHighProductsOppControllerTest.cls b/force-app/main/default/classes/NewHighProductsOppControllerTest.cls
index d1098f7..5cba708 100644
--- a/force-app/main/default/classes/NewHighProductsOppControllerTest.cls
+++ b/force-app/main/default/classes/NewHighProductsOppControllerTest.cls
@@ -1,11 +1,5 @@
@isTest
private class NewHighProductsOppControllerTest {
-
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Opportunity','SBG001','Contact'});
- }
-
@isTest static void test_method_one() {
List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer BS'];
Account accIE = new Account(
diff --git a/force-app/main/default/classes/NewLoanerApplicationController.cls b/force-app/main/default/classes/NewLoanerApplicationController.cls
index 620a8fb..de3eb9c 100644
--- a/force-app/main/default/classes/NewLoanerApplicationController.cls
+++ b/force-app/main/default/classes/NewLoanerApplicationController.cls
@@ -5,27 +5,12 @@
public String contactID {get; private set;}
public loaner_application__c la{get; private set;}
-
- // Update 20220318 By Yang Kaiyu Start
- public loaner_user__c lu {get; private set;}
-
- public Contact con {get; private set;}
- // Update 20220318 By Yang Kaiyu End
-
public String typeName {get; private set;}
public String userType {get; private set;}
public String baseUrl { get; set; }
public String rtUrl { get; set; }
-
- // Update 20220318 By Yang Kaiyu Start
- public String staticResource {get; set;}
- public String staticResourceContact {get; set;}
- public String staticResourceLoanerUser {get; set;}
-
- public String laid {get; set;}
- // Update 20220318 By Yang Kaiyu End
public NewLoanerApplicationController() {
baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
@@ -45,11 +30,6 @@
userType = UserInfo.getUserType();
accountID = System.currentPageReference().getParameters().get('accid');
contactID = System.currentPageReference().getParameters().get('conId');
- // Update 20220318 By Yang Kaiyu End
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('loaner_application__c'));
- staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));
- staticResourceLoanerUser = JSON.serialize(PIHelper.getPIIntegrationInfo('loaner_user__c'));
- // Update 20220318 By Yang Kaiyu End
Account acc = [select id,ProductSegment__c from Account where id = :accountID];
typeName = acc.ProductSegment__c;
@@ -57,19 +37,12 @@
.get(typeName).getRecordTypeId();
la = new loaner_application__c();
- // Update 20220318 By Yang Kaiyu End
- lu = new loaner_user__c();
- con = new Contact();
- // Update 20220318 By Yang Kaiyu End
la.RecordTypeId= recordTypeId;
if(typeName == 'BS' && userType != 'Standard'){
la.RecordTypeId = System.label.bs_D_ID;
}
System.debug(la.RecordTypeId);
//ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,accountID));
- // Update 20220318 By Yang Kaiyu End
- con = [select id,AWS_Data_Id__c,Phone,Phone_Encrypted__c,Name,LastName_Encrypted__c,Address1__c from Contact where id = :contactID];
- // Update 20220318 By Yang Kaiyu End
return null;
}
@@ -88,27 +61,21 @@
Savepoint sp = Database.setSavepoint();
try {
insert la;
-
- // loaner_user__c lu = new loaner_user__c(); // Update 20220412 By Chen Yanan
+
+ loaner_user__c lu = new loaner_user__c();
lu.loaner_application__c = la.id;
lu.Customer__c = accountID;
- // Update 20220318 By Yang Kaiyu Start
- // System.debug('lu------------'+lu);
- // if(contactID != null){
- // lu.Contact__c = contactID;
- // Contact contact = [select id,AWS_Data_Id__c,Phone,Phone_Encrypted__c,Name,LastName_Encrypted__c,Address1__c from Contact where id = :contactID];
- // lu.ContactNumber__c = contact.Phone;
+
+ if(contactID != null){
+ lu.Contact__c = contactID;
+ Contact contact = [select id,Phone,Name,Address1__c from Contact where id = :contactID];
+ lu.ContactNumber__c = contact.Phone;
- // }
- // Update 20220318 By Yang Kaiyu End
+ }
insert lu;
- // Update 20220318 By Yang Kaiyu Start
- laid = la.id;
- // String url = baseUrl + '\\' + la.Id;
- // return new Pagereference(url);
- return null;
- // Update 20220318 By Yang Kaiyu End
+ String url = baseUrl + '\\' + la.Id;
+ return new Pagereference(url);
} catch (Exception e) {
Database.rollback(sp);
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, e.getMessage()));
diff --git a/force-app/main/default/classes/NewLoanerApplicationControllerTest.cls b/force-app/main/default/classes/NewLoanerApplicationControllerTest.cls
index 07152af..c9e3e1e 100644
--- a/force-app/main/default/classes/NewLoanerApplicationControllerTest.cls
+++ b/force-app/main/default/classes/NewLoanerApplicationControllerTest.cls
@@ -1,11 +1,5 @@
@isTest
private class NewLoanerApplicationControllerTest {
-
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Opportunity','SBG001','Contact','loaner_application__c','loaner_user__c'});
- }
-
static void setupTestData() {
OlympusCalendar__c oc1 = new OlympusCalendar__c(Date__c = Date.today().addDays(1), ChangeToHoliday__c=false, ChangeToWorkday__c=true);
OlympusCalendar__c oc2 = new OlympusCalendar__c(Date__c = Date.today().addDays(2), ChangeToHoliday__c=false, ChangeToWorkday__c=true);
diff --git a/force-app/main/default/classes/NewLoanerUserController.cls b/force-app/main/default/classes/NewLoanerUserController.cls
index 623d7d0..2a612b9 100644
--- a/force-app/main/default/classes/NewLoanerUserController.cls
+++ b/force-app/main/default/classes/NewLoanerUserController.cls
@@ -7,27 +7,7 @@
public List<loaner_user__c> dataLines {get; private set;}
//璁㈠崟Id
public String laId {get; private set;}
- // Update 20220317 By Yang Kaiyu Start
- public String staticResource {get; set;}
- public String staticResourceContact {get; set;}
- //PI contact
- public List<ContactClass> conList {get;set;}
-
- public String contactId {get;set;}
- public string conListJson {get{
- if(conList==null)return null;
- return JSON.serialize(conList);
- }}
- public String dataLinesJson{get{
- if(dataLines==null)return null;
- return JSON.serialize(dataLines);
- }}
- class ContactClass{
- public String contactIdValue{set;get;}
- public String contactNameValue{set;get;}
- public String contactPhoneValue{set;get;}
- }
- // Update 20220317 By Yang Kaiyu End
+ //
/*public NewLoanerUserController() {
laId = System.currentPageReference().getParameters().get('headId');
//ApexPages.currentPage().getParameters().get('headId');
@@ -41,12 +21,7 @@
}else{
loaner_user__c lu = [select id,loaner_application__c from loaner_user__c where id = :luId];
laId = lu.loaner_application__c;
- }
- // Update 20220317 By Yang Kaiyu Start
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('loaner_user__c'));
- staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('contact'));
- conList = new List<ContactClass>();
- // Update 20220317 By Yang Kaiyu End
+ }
}
@@ -62,21 +37,9 @@
baseUrl += '/production';
}
dataLines = new List<loaner_user__c>();
- // Update 20220317 By Yang Kaiyu Start
- luList = [select id,Contact__r.AWS_Data_Id__c,Contact__c,Contact__r.LastName,Contact__r.Phone,Contact__r.LastName_Encrypted__c,Contact__r.Phone_Encrypted__c,ContactNumber__c,
- FromThePeriod__c,EndThePeriod__c,Remarks__c,Customer__c,Follow_UP_Opp__c
- from loaner_user__c
- where loaner_application__c =:laId];
- // Update 20220317 By Yang Kaiyu End
+ luList = [select id,Contact__c,ContactNumber__c,FromThePeriod__c,EndThePeriod__c,Remarks__c,Customer__c,Follow_UP_Opp__c from loaner_user__c where loaner_application__c =:laId];
if(luList.size() >0){
for(loaner_user__c lu : luList){
- // Update 20220317 By Yang Kaiyu Start
- ContactClass con = new ContactClass();
- con.contactIdValue = lu.Contact__r.AWS_Data_Id__c;
- con.contactNameValue = lu.Contact__r.LastName_Encrypted__c;
- con.contactPhoneValue= lu.Contact__r.Phone_Encrypted__c;
- conList.add(con);
- // Update 20220317 By Yang Kaiyu End
dataLines.add(lu);
}
}
@@ -92,8 +55,6 @@
public PageReference updateUser() {
- System.debug('杩涘叆updateUser');
-
List<loaner_user__c> updateList = new List<loaner_user__c>();
loaner_application__c la =[select id,RecordType.DeveloperName from loaner_application__c where id=:laId];
List<String> contactIdList = new List<String>();
@@ -101,7 +62,6 @@
String firstLuId = '';
String accountName = '';
List<String> idList = new List<String>();
- System.debug('dataLines = ' + dataLines);
for(loaner_user__c luc : dataLines){
if(!(String.isBlank(luc.Contact__c) || luc.Customer__c == null)){
loaner_user__c lu = new loaner_user__c();
diff --git a/force-app/main/default/classes/NewLoanerUserControllerTest.cls b/force-app/main/default/classes/NewLoanerUserControllerTest.cls
index c1d69ac..06698d0 100644
--- a/force-app/main/default/classes/NewLoanerUserControllerTest.cls
+++ b/force-app/main/default/classes/NewLoanerUserControllerTest.cls
@@ -1,11 +1,5 @@
@isTest
private class NewLoanerUserControllerTest {
-
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'loaner_user__c','Contact'});
- }
-
static void setupTestData() {
OlympusCalendar__c oc1 = new OlympusCalendar__c(Date__c = Date.today().addDays(1), ChangeToHoliday__c=false, ChangeToWorkday__c=true);
OlympusCalendar__c oc2 = new OlympusCalendar__c(Date__c = Date.today().addDays(2), ChangeToHoliday__c=false, ChangeToWorkday__c=true);
diff --git a/force-app/main/default/classes/NewOpportunityController.cls b/force-app/main/default/classes/NewOpportunityController.cls
index 4ada386..10f2d09 100644
--- a/force-app/main/default/classes/NewOpportunityController.cls
+++ b/force-app/main/default/classes/NewOpportunityController.cls
@@ -16,9 +16,6 @@
public Boolean isIEDealer{get; set; }
- public String staticResource {get; set;}
- public String opportunityAWSDataId{get; set;}
-
public NewOpportunityController() {
baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
String path = URL.getCurrentRequestUrl().getPath();
@@ -82,9 +79,9 @@
if(acc.compo_Acc__c == 'COMPO瀹㈡埛' && acc.ProductSegment__c == 'IE'){
opp.compo_opp__c = true;
}
- if(acc.UserType__c == 'OEM瀹㈡埛' && acc.ProductSegment__c == 'BS'){
+ /*if(acc.UserType__c == 'OEM瀹㈡埛' && acc.ProductSegment__c == 'BS'){
opp.useing__c = 'OEM';
- }
+ }*/
opp.AccountId = acc.Id;
opp.Account = acc;
opp.ProductSegment__c = acc.ProductSegment__c;
@@ -97,7 +94,6 @@
opp.Dealer__c = dealerId;
}
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Opportunity'));
return null;
}
diff --git a/force-app/main/default/classes/NewOpportunityControllerTest.cls b/force-app/main/default/classes/NewOpportunityControllerTest.cls
index e9c1c8f..af363d0 100644
--- a/force-app/main/default/classes/NewOpportunityControllerTest.cls
+++ b/force-app/main/default/classes/NewOpportunityControllerTest.cls
@@ -1,10 +1,5 @@
@isTest
private class NewOpportunityControllerTest {
-
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Opportunity','SBG001','Contact'});
- }
@isTest static void test_method_one() {
List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE'];
diff --git a/force-app/main/default/classes/NewRepairPartsController.cls b/force-app/main/default/classes/NewRepairPartsController.cls
index e3387e7..04a0f83 100644
--- a/force-app/main/default/classes/NewRepairPartsController.cls
+++ b/force-app/main/default/classes/NewRepairPartsController.cls
@@ -4,8 +4,7 @@
public String swoId{get;set;}
public String repairId{get;set;}
public Boolean pageClose{get;set;}
- public String baseUrl{get;set;}
- public String productId{get;set;}
+
/*public NewRepairPartsController(ApexPages.StandardController stdController) {
swoId = System.currentPageReference().getParameters().get('swoId');
}*/
@@ -16,13 +15,6 @@
}
public void init(){
- baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
- String path = URL.getCurrentRequestUrl().getPath();
- if (path.indexOf('/apex') > 0) {
- baseUrl += path.substring(0, path.indexOf('/apex'));
- } else if (path.indexOf('production/') > 0) {
- baseUrl += '/production';
- }
if(String.isNotBlank(repairId)){
Schema.DescribeSobjectResult repairPartType = RepairPart__c.sObjectType.getDescribe();
Map<String, Schema.SObjectField> repairPart_fields = repairPartType.fields.getMap();
@@ -80,17 +72,6 @@
return;
}else{
return;
- }
- }
-
- public void productReturn(){
- if(String.isNotBlank(productId)){
- List<Product2> productList = [SELECT Id, Name, Product_ECCode__c, Description, ProductCode FROM Product2 WHERE Id = :productId limit 1];
- if(productList!=null && productList.size()!=0){
- repairPart.PART_NUMBER__c = productList[0].Product_ECCode__c;
- repairPart.DESCRIPTION__c = productList[0].Description;
- repairPart.ITEM__c = productList[0].ProductCode;
- }
}
}
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/NewReplacementOpportunityController.cls b/force-app/main/default/classes/NewReplacementOpportunityController.cls
index 80c7ece..4757487 100644
--- a/force-app/main/default/classes/NewReplacementOpportunityController.cls
+++ b/force-app/main/default/classes/NewReplacementOpportunityController.cls
@@ -13,8 +13,6 @@
public String rtUrl { get; set; }
public String ProductSegment { get; set; }
- public String staticResource {get; set;}
- public String opportunityAWSDataId{get; set;}
public NewReplacementOpportunityController() {
baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
@@ -62,7 +60,7 @@
opp.AccountId = acc.Id;
opp.Account = acc;
opp.ProductSegment__c = acc.ProductSegment__c;
- opp.Type = 'Not Traget';
+ opp.Type = '闈炵洰鏍�';
opp.SalesChannel__c = 'dealer';
opp.NewInquiryDate__c = Date.today();
opp.StageName = 'Prospect Created';
@@ -72,7 +70,7 @@
if (UserInfo.getUserType() == 'PowerPartner' && acc.ProductSegment__c != 'BS') {
opp.Dealer__c = dealerId;
}
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Opportunity'));
+
return null;
}
diff --git a/force-app/main/default/classes/OpportunityTriggerHandler.cls b/force-app/main/default/classes/OpportunityTriggerHandler.cls
index 6a2b27c..be66aac 100644
--- a/force-app/main/default/classes/OpportunityTriggerHandler.cls
+++ b/force-app/main/default/classes/OpportunityTriggerHandler.cls
@@ -135,10 +135,6 @@
newOpp.Competitor_Product_Code8_D__c = newOpp.CompetitorProductCode8__c;
newOpp.Dealer_Sales_Staff_Name_D__c = newOpp.DealerSalesStaffName__c;
newOpp.Dealer_Service_D__c = newOpp.DealerService__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newOpp.Dealer_Sales_Staff_Name_D_Encrypted__c = newOpp.DealerSalesStaffName_Encrypted__c;
- newOpp.Dealer_Service_D_Encrypted__c = newOpp.DealerService_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
newOpp.Expected_Delivery_Date_D__c = newOpp.ExpectedDeliveryDate__c;
newOpp.Expected_Order_Date_D__c = newOpp.ExpectedOrderDate__c;
newOpp.Inquiry_Result_D__c = newOpp.InquiryResult__c;
@@ -415,15 +411,9 @@
}
if (newOpp.DealerSalesStaffName__c != oldOpp.DealerSalesStaffName__c) {
newOpp.Dealer_Sales_Staff_Name_D__c = newOpp.DealerSalesStaffName__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newOpp.Dealer_Sales_Staff_Name_D_Encrypted__c = newOpp.DealerSalesStaffName_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newOpp.DealerService__c != oldOpp.DealerService__c) {
newOpp.Dealer_Service_D__c = newOpp.DealerService__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newOpp.Dealer_Service_D_Encrypted__c = newOpp.DealerService_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newOpp.ExpectedDeliveryDate__c != oldOpp.ExpectedDeliveryDate__c) {
newOpp.Expected_Delivery_Date_D__c = newOpp.ExpectedDeliveryDate__c;
@@ -548,10 +538,6 @@
newOpp.CompetitorProductCode8__c = newOpp.Competitor_Product_Code8_D__c;
newOpp.DealerSalesStaffName__c = newOpp.Dealer_Sales_Staff_Name_D__c;
newOpp.DealerService__c = newOpp.Dealer_Service_D__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newOpp.DealerSalesStaffName_Encrypted__c = newOpp.Dealer_Sales_Staff_Name_D_Encrypted__c;
- newOpp.DealerService_Encrypted__c = newOpp.Dealer_Service_D_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
newOpp.ExpectedDeliveryDate__c = newOpp.Expected_delivery_date_D__c;
newOpp.ExpectedOrderDate__c = newOpp.Expected_Order_Date_D__c;
newOpp.InquiryResult__c = newOpp.Inquiry_result_D__c;
@@ -625,10 +611,6 @@
newOpp.Competitor_Product_Code8_D__c = newOpp.CompetitorProductCode8__c;
newOpp.Dealer_Sales_Staff_Name_D__c = newOpp.DealerSalesStaffName__c;
newOpp.Dealer_Service_D__c = newOpp.DealerService__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newOpp.Dealer_Sales_Staff_Name_D_Encrypted__c = newOpp.DealerSalesStaffName_Encrypted__c;
- newOpp.Dealer_Service_D_Encrypted__c = newOpp.DealerService_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
newOpp.Expected_Delivery_Date_D__c = newOpp.ExpectedDeliveryDate__c;
newOpp.Expected_Order_Date_D__c = newOpp.ExpectedOrderDate__c;
newOpp.Inquiry_Result_D__c = newOpp.InquiryResult__c;
@@ -1142,7 +1124,7 @@
}
if (targetList.size() > 0) {
- List<Order> odrList = [select id, OpportunityId,ForeignTradeCompany_D__c,TradeType__c,ProductSegment__c from Order where OpportunityId = :targetList and Status__c = 'Active'];
+ List<Order> odrList = [select id, OpportunityId from Order where OpportunityId = :targetList and Status__c = 'Active'];
for (Order odr : odrList) {
Opportunity opp = newMap.get(odr.OpportunityId);
@@ -1167,8 +1149,7 @@
odr.Status__c = 'Inactive';
}
}
-
- System.debug('odrList------'+odrList);
+
if (odrList.size() > 0) update odrList;
}
if (targetList2.size() > 0) {
diff --git a/force-app/main/default/classes/OpportunityWebService.cls b/force-app/main/default/classes/OpportunityWebService.cls
index d6008fb..3f26cf3 100644
--- a/force-app/main/default/classes/OpportunityWebService.cls
+++ b/force-app/main/default/classes/OpportunityWebService.cls
@@ -86,13 +86,6 @@
}
- WebService static void batch(String oppId){
-
- System.debug('$$$$$$$$$$'+oppId);
- List<String> idList = new List<String>();
- idList.add(oppId);
- Database.executeBatch(new OpportunityUpdateSendEmailBatch(idList), 10);
- }
WebService static String checkUpperLimitOfSales(String oppId, String dealerId) {
String result = '';
@@ -125,7 +118,7 @@
}
String accountDealerErrorMessage = RadiationUtil.updateCertificationDetails(dealerId, null, getModelQuantityMap, false);*/
String olympusDealerErrorMessage = RadiationUtil.updateCertificationDetails(olympusAccountId, null, getModelQuantityMap, false);
- result = olympusDealerErrorMessage == '' ? '' : '浠櫙閫氬彲閿�鍞暟閲忎笉瓒�' ;
+ result = olympusDealerErrorMessage == '' ? '' : '濂ユ灄宸存柉鍙攢鍞暟閲忎笉瓒�' ;
//String flage = LicenseCheckUtil.LicenseCheckOly();
Boolean temp = result.startsWith('浣犱笉鑳�');
if (temp) {
@@ -135,7 +128,7 @@
}
}
- WebService static String checkOrderStatus(String oppId, String stageName, String creuser, String owner) {
+ WebService static String checkOrderStatus(String oppId, String stageName, String creuser) {
String temp = '1';
Order ord = new Order();
List<Order> ordList = new List<Order>();
@@ -145,7 +138,7 @@
if (ordList.size() > 0) {
ord = ordList[0];
- if ( (ord.ApproveStatus__c == 'CancelPass' || ord.ApproveStatus__c == 'OrderDraft' || ord.ApproveStatus__c == 'Draft' || ord.ApproveStatus__c == 'Reject') && (creuser == userId || owner == userId)) {
+ if ( (ord.ApproveStatus__c == 'CancelPass' || ord.ApproveStatus__c == 'OrderDraft' || ord.ApproveStatus__c == 'Draft' || ord.ApproveStatus__c == 'Reject') && creuser == userId ) {
StaticParameter.StageProgressBarUpdate = true;
@@ -159,7 +152,7 @@
roleId == '00E28000000aKzs' || roleId == '00E0K000001jGiC' || roleId == '00E0K000001jGiR' ||
roleId == '00E0K000001ywgX' || roleId == '00E28000000knAc' || roleId == '00E28000000knAh' ||
roleId == '00E28000000aKzx' || roleId == '00E28000000knAw' || roleId == '00E28000000knB1' ||
- roleId == '00E28000000aL02' || roleId == '00E28000000kjpX') {
+ roleId == '00E28000000aL02') {
Opportunity opp = new Opportunity();
opp.Id = oppId;
@@ -179,7 +172,7 @@
temp = '0';
}
} else {
- if ((userId == '005280000037mrQ' || userId == '00528000002OAvH' || userId == '00528000000YSdB' ||
+ if (userId == '005280000037mrQ' || userId == '00528000002OAvH' || userId == '00528000000YSdB' ||
roleId == '00E0K000001ywwz' || roleId == '00E0K000001jGiM' || roleId == '00E0K000001jGib' ||
roleId == '00E0K000001ywgS' || roleId == '00E28000000knAm' || roleId == '00E28000000knAr' ||
roleId == '00E28000000aKzn' || roleId == '00E0K000001jGhn' || roleId == '00E0K000001jGhs' ||
@@ -188,7 +181,7 @@
roleId == '00E28000000aKzs' || roleId == '00E0K000001jGiC' || roleId == '00E0K000001jGiR' ||
roleId == '00E0K000001ywgX' || roleId == '00E28000000knAc' || roleId == '00E28000000knAh' ||
roleId == '00E28000000aKzx' || roleId == '00E28000000knAw' || roleId == '00E28000000knB1' ||
- roleId == '00E28000000aL02' || roleId == '00E28000000kjpX') && (creuser == userId || owner == userId)) {
+ roleId == '00E28000000aL02') {
Opportunity opp = new Opportunity();
opp.Id = oppId;
@@ -209,41 +202,7 @@
}
- WebService static String checkDealerId(String dealerId) {
- String rtn = '0';
- // 鑾峰彇绯荤粺绠$悊鍛業d
- String getUserId = System.label.SystemAdmin1_2_GPI;
- // 鑾峰彇褰撳墠鐢ㄦ埛Id
- String userId = UserInfo.getUserId().subString(0,15);
- dealerId.subString(0,15);
- String userDealerId;
- List<User> userList = new List<User>();
- User user = new User();
-
- if (String.isNotBlank(getUserId)) {
- if (!getUserId.contains(userId)) {
- userList = [select mu_Dealer__c
- from User
- where id =: userId];
-
- user = userList[0];
- userDealerId = user.mu_Dealer__c;
- if (String.isNotBlank(userDealerId)) {
- userDealerId.substring(0,15);
- }
- if (userDealerId == dealerId) {
- rtn = '1';
- }
- }else {
- rtn = '0';
- }
- }else {
- rtn = '0';
- }
- System.debug('rtn='+rtn);
- return rtn;
- }
@@ -359,30 +318,6 @@
private static void add() {
Integer i = 0;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
- i++;
i++;
i++;
i++;
diff --git a/force-app/main/default/classes/OrderPdf2Controller.cls b/force-app/main/default/classes/OrderPdf2Controller.cls
index 55868c5..65069b7 100644
--- a/force-app/main/default/classes/OrderPdf2Controller.cls
+++ b/force-app/main/default/classes/OrderPdf2Controller.cls
@@ -64,7 +64,6 @@
public String ndt_fax{get;set;}
public Boolean notSpecialDealer { get; set; }
- public String staticResource { get;private set; }
//4鏈�11鍙蜂箣鍚�
//public Boolean fourMaand { get; set; }
//鍙戣揣鏈�
@@ -83,8 +82,6 @@
Date today = Date.today();
strToday = today.format();
-
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));// 20220222 PI鏀归�� by Bright
}
public PageReference init() {
@@ -114,7 +111,6 @@
PDF_Property__c, Opportunity.Name, PDF_No__c, Description, PDF_Order_No__c,CrossCooperativeProject__c,
Olympus_Price_BeforeDiscount_D__c, Discount_D__c, OlympusContractPricesD__c, CustomerContractPriceD__c,
Opportunity.ProductSegment__c, Opportunity.SalesChannel__c, Opportunity.Machine_Parts__c,
- AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright
SpecialDeliveryAccount__c, SpecialDeliveryAccount_D__c, SpecialDeliveryContact2__c, SpecialDeliveryContact2_D__c,Opportunity.DeliveryDate__c
from Order where Id = :id];
if (orderList.size() == 0) {
@@ -178,9 +174,7 @@
delivery_contact = new Contact();
if (order.SpecialDeliveryContact2_D__c != null) {
- delivery_contact = [select Id, Department, Name, Phone, MobilePhone,
- AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright
- Address1__c from Contact where Id = :order.SpecialDeliveryContact2_D__c];
+ delivery_contact = [select Id, Department, Name, Phone, MobilePhone,Address1__c from Contact where Id = :order.SpecialDeliveryContact2_D__c];
}
user = new Account();
@@ -198,9 +192,7 @@
}
contact = new Contact();
if (contactid != null && contactid.length() > 0) {
- contact = [select Id, Department, Name, Phone, MobilePhone,Fax,
- AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright
- Email from Contact where Id = :contactid];
+ contact = [select Id, Department, Name, Phone, MobilePhone,Fax,Email from Contact where Id = :contactid];
}
List<OrderItem> oiList = [select Id, PriceBookEntry.Product2.ProductCode, PriceBookEntry.Product2.Product_ECCode__c,PriceBookEntry.Product2.Name,PriceBookEntry.Product2.registrationCode__c,
@@ -619,7 +611,6 @@
Name, Opportunity.ExpectedDeliveryDate__c, PDF_Sap_No__c, OrderNumber, Opportunity.SubDealer__c,
PDF_Property__c, Opportunity.Name, PDF_No__c, Description, PDF_Order_No__c,
Olympus_Price_BeforeDiscount_D__c, Discount_D__c, OlympusContractPricesD__c, CustomerContractPriceD__c,
- AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright
Opportunity.ProductSegment__c
from Order where Id = :id];
if (orderList.size() == 0) {
@@ -766,7 +757,6 @@
public String delivery_user { get; set; }
public String delivery_phone { get; set; }
public String delivery_tel { get; set; }
- public String delivery_aws_data_id { get; set; }// 20220222 PI鏀归�� by Bright
// 鏈�缁堢敤鎴蜂俊鎭�
public String user_name { get; set; }
public String user_no { get; set; }
@@ -782,7 +772,6 @@
public String user_property_IE { get; set; }
public String user_product_IE { get; set; }
public String user_market_RVI { get; set; }
- public String user_aws_data_id { get; set; }// 20220222 PI鏀归�� by Bright
// 璁㈠崟淇℃伅2
public Decimal order_subtotal { get; set; }
public Decimal order_discount_rate { get; set; }
@@ -830,7 +819,6 @@
delivery_user = delivery_contact.Name;
delivery_phone = delivery_contact.Phone;
delivery_tel = delivery_contact.MobilePhone;
- delivery_aws_data_id = delivery_contact.AWS_Data_Id__c;// 20220222 PI鏀归�� by Bright
user_name = user.Name;
user_no = user.ManagementCode_F__c;
@@ -843,7 +831,6 @@
user_fax = contact.Fax;
user_email = Contact.Email;
user_tel = contact.MobilePhone;
- user_aws_data_id = contact.AWS_Data_Id__c;// 20220222 PI鏀归�� by Bright
user_property_IE = order.PDF_Property__c;
user_product_IE = user.Sub_Use__c == 'Automotive' ? '姹借溅' : user.Sub_Use__c;
user_market_RVI = user.Sub_Use__c;
diff --git a/force-app/main/default/classes/OrderPdf2ControllerTest.cls b/force-app/main/default/classes/OrderPdf2ControllerTest.cls
index ed740dc..efc5fdb 100644
--- a/force-app/main/default/classes/OrderPdf2ControllerTest.cls
+++ b/force-app/main/default/classes/OrderPdf2ControllerTest.cls
@@ -1,12 +1,6 @@
@isTest
private class OrderPdf2ControllerTest {
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Contact','Opportunity','Order'});
- }
-
-
@isTest static void test_init1() {
OrderPdf2Controller.asd();
List<RecordType> rectDealer = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Dealer'];
diff --git a/force-app/main/default/classes/OrderPdfController.cls b/force-app/main/default/classes/OrderPdfController.cls
index 2b1c117..f948883 100644
--- a/force-app/main/default/classes/OrderPdfController.cls
+++ b/force-app/main/default/classes/OrderPdfController.cls
@@ -62,10 +62,6 @@
public List<OrderItem> oiList {get; set;}
- public String staticResourceContact { get; private set; }// PI鏀归�� By Bright 20220422
- public String staticResourceOrder { get; private set; }// PI鏀归�� By Bright 20220422
- public String staticResourceFile { get; private set; }// PI鏀归�� By Bright 20220422
-
// The extension constructor initializes the private member
// variable mysObject by using the getRecord method from the standard
// controller.
@@ -79,10 +75,6 @@
} else if (path.indexOf('production/') > 0) {
baseUrl += '/production';
}
-
- staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));// PI鏀归�� By Bright 20220422
- staticResourceOrder = JSON.serialize(PIHelper.getPIIntegrationInfo('Order'));// PI鏀归�� By Bright 20220422
- staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));// PI鏀归�� By Bright 20220422
}
public PageReference init() {
od = new Order();
@@ -264,9 +256,7 @@
}
specialDeliveryContact = new Contact();
if (od.SpecialDeliveryContact2_D__c != null) {
- specialDeliveryContact = [select Id, Name,
- AWS_Data_Id__c,// 20220222 PI鏀归�� by Bright
- Email from Contact where Id = :od.SpecialDeliveryContact2_D__c];
+ specialDeliveryContact = [select Id, Name, Email from Contact where Id = :od.SpecialDeliveryContact2_D__c];
}
}
@@ -546,7 +536,6 @@
PDF_C_Address__c, PDF_C_TEL__c, PDF_C_FAX__c, PDF_C_CONTACT__c , PDF_G_TrAndPre__c , PDF_G_SpecNo__c, PDF_F_Add__c, PDF_F_ContactPerson__c,
Opportunity.SpecialDeliveryAddress__c, Opportunity.SpecialDeliveryContact__c, Shipment_Term__c, Shipment_Term_D__c, Shipment_Term2__c, Shipment_Term2_D__c,
SpecialDeliveryAccount__c, SpecialDeliveryAccount_D__c, SpecialDeliveryContact2__c, SpecialDeliveryContact2_D__c, PDF_Order_No__c, DeliveryTimeText__c, DeliveryTimeTextEn__c, Total_price_E__c, ContractPriceTotal__c,
- AWS_Data_Id__c,// 20220222 PI鏀归�� by Bright
PDF_Shipment_Term2_Text__c, PDF_PaymentTerms__c, PDF_PaymentTerms_E__c, PDF_Sign_Name__c, PDF_Sign_Title__c,PDF_Sp_LOADING__c,PDF_Sp_LOADING_E__c
from Order
where id = :Id];
@@ -567,9 +556,7 @@
}
specialDeliveryContact = new Contact();
if (odpdf.SpecialDeliveryContact2_D__c != null) {
- specialDeliveryContact = [select Id, Name,
- AWS_Data_Id__c,// 20220222 PI鏀归�� by Bright
- Email from Contact where Id = :odpdf.SpecialDeliveryContact2_D__c];
+ specialDeliveryContact = [select Id, Name, Email from Contact where Id = :odpdf.SpecialDeliveryContact2_D__c];
}
List<Quote> quoList = [select Id, Name, CreatedDate, OpportunityId, Opportunity.Dealer__c, Opportunity.DealerSalesStaffName__c, AccountId, PrintPrice__c, TotalPrice,
diff --git a/force-app/main/default/classes/OrderPdfControllerTest.cls b/force-app/main/default/classes/OrderPdfControllerTest.cls
index 0bf5f71..b88b5f7 100644
--- a/force-app/main/default/classes/OrderPdfControllerTest.cls
+++ b/force-app/main/default/classes/OrderPdfControllerTest.cls
@@ -1,12 +1,6 @@
@isTest
private class OrderPdfControllerTest {
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Opportunity','Contact','Order','Document'});
- }
-
-
@isTest static void test_init() {
List<RecordType> rectDealer = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Dealer'];
List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE'];
@@ -122,7 +116,6 @@
SpecialDeliveryContact2_D__c = contact.Id,
OpportunityId = opp.Id,
EffectiveDate = Date.today(),
- ProductListApproveStatus__c = 'Draft',RecordTypeId=rectOdr[0].Id,
Status = 'Draft',
Pricebook2Id = pricebook.Id,
EndUser__c = contact.Id,
@@ -143,7 +136,6 @@
insert oiList;
- Test.startTest();
PageReference page = new PageReference('/apex/OrderContract?id=' + order.Id);
System.Test.setCurrentPage(page);
OrderPdfController controller = new OrderPdfController();
@@ -153,7 +145,6 @@
controller.saveBtn();
controller.printBtn();
- Test.stopTest();
}
@isTest static void test_init2() {
@@ -289,7 +280,6 @@
SpecialDeliveryContact2_D__c = contact.Id,
OpportunityId = opp.Id,
EffectiveDate = Date.today(),
- ProductListApproveStatus__c = 'Draft',RecordTypeId=rectOdr[0].Id,
Status = 'Draft',
Pricebook2Id = pricebook.Id,
EndUser__c = contact.Id,
@@ -310,7 +300,6 @@
insert oiList;
- Test.startTest();
PageReference page = new PageReference('/apex/OrderPdf?id=' + order.Id);
System.Test.setCurrentPage(page);
OrderPdfController controller = new OrderPdfController();
@@ -318,7 +307,6 @@
//controller.init();
controller.init2();
//controller.init();
- Test.stopTest();
}
@isTest static void test_init2_2() {
@@ -441,7 +429,6 @@
SpecialDeliveryContact2_D__c = contact.Id,
OpportunityId = opp.Id,
EffectiveDate = Date.today(),
- ProductListApproveStatus__c = 'Draft',RecordTypeId=rectOdr[0].Id,
Status = 'Draft',
Pricebook2Id = pricebook.Id,
EndUser__c = contact.Id,
@@ -461,13 +448,12 @@
}
insert oiList;
- Test.startTest();
+
PageReference page = new PageReference('/apex/OrderPdf?id=' + order.Id);
System.Test.setCurrentPage(page);
OrderPdfController controller = new OrderPdfController();
controller.init2();
- Test.stopTest();
}
@isTest static void test_init2_3() {
List<RecordType> rectDealer = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Dealer'];
@@ -585,7 +571,6 @@
SpecialDeliveryContact2_D__c = contact.Id,
OpportunityId = opp.Id,
EffectiveDate = Date.today(),
- ProductListApproveStatus__c = 'Draft',RecordTypeId=rectOdr[0].Id,
Status = 'Draft',
Pricebook2Id = pricebook.Id,
EndUser__c = contact.Id,
@@ -606,7 +591,6 @@
insert oiList;
- Test.startTest();
PageReference page = new PageReference('/apex/OrderContract?id=' + order.Id);
System.Test.setCurrentPage(page);
OrderPdfController controller = new OrderPdfController();
@@ -616,7 +600,6 @@
controller.saveBtn();
controller.printBtn();
- Test.stopTest();
}
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/OrderSplitRatioController.cls b/force-app/main/default/classes/OrderSplitRatioController.cls
index 3074fc8..09994f5 100644
--- a/force-app/main/default/classes/OrderSplitRatioController.cls
+++ b/force-app/main/default/classes/OrderSplitRatioController.cls
@@ -32,7 +32,7 @@
hasError = false;
ord = new Order();
cc = new Order();
- List<Order> raList = [select Id, Name, Dealer__c,SplitRatio__c,SplitRatiotext__c,CrossCooperativeDealerText__c,SplitRatioFormule__c,BS_AsistGenManger_BS__c,ApproveStatus__c from Order where Id = :raid];
+ List<Order> raList = [select Id, Name, Dealer__c,SplitRatio__c,CrossCooperativeDealerText__c,SplitRatioFormule__c,BS_AsistGenManger_BS__c,ApproveStatus__c from Order where Id = :raid];
UsId = UserInfo.getUserId().subString(0, 15);
if (raList.size() > 0) {
ord = raList[0];
@@ -55,7 +55,7 @@
AppSta = '';
hasError = false;
ra1 = new Order();
- List<Order> ra1List = [select Id, Name, Dealer__c,Dealer_A__r.Name,Dealer_B__r.Name ,SplitRatio__c,SplitRatiotext__c,CrossCooperativeDealerText__c,SplitRatioFormule__c,BS_AsistGenManger_BS__c from Order where Id = :raid];
+ List<Order> ra1List = [select Id, Name, Dealer__c,SplitRatio__c,CrossCooperativeDealerText__c,SplitRatioFormule__c,BS_AsistGenManger_BS__c from Order where Id = :raid];
UsId = UserInfo.getUserId().subString(0, 15);
if (ra1List.size() > 0) {
ra1 = ra1List[0];
@@ -68,17 +68,13 @@
public PageReference saveBtn() {
hasError = false;
String response = ra1.SplitRatio__c;
- /* if (String.isBlank(ra1.SplitRatio__c)) {
- String SplitRatiotext = ra1.Dealer_A__r.Name +' '+ ra1.SplitRatio__c +' '+ ra1.Dealer_B__r.Name;
- ra1.SplitRatiotext__c = SplitRatiotext;
- ra1.
- update ra1;
+ if (String.isBlank(ra1.SplitRatio__c)) {
+ /*String SplitRatiotext = ra1.Dealer__c +' '+ ra1.SplitRatio__c +' '+ ra1.CrossCooperativeDealerText__c;
+ ra1.SplitRatiotext__c = SplitRatiotext;*/
+ update ra1;
}else {
update ra1;
- }*/
- ra1.dealer_A_Name__c = ra1.Dealer_A__r.Name;
- ra1.dealer_B_Name__c = ra1.Dealer_B__r.Name;
- update ra1;
+ }
return null;
}
diff --git a/force-app/main/default/classes/OrderTriggerHandler.cls b/force-app/main/default/classes/OrderTriggerHandler.cls
index 8f35120..6dbfd6d 100644
--- a/force-app/main/default/classes/OrderTriggerHandler.cls
+++ b/force-app/main/default/classes/OrderTriggerHandler.cls
@@ -360,11 +360,6 @@
newOrd.SpecialDeliveryContact_D__c = newOrd.SpecialDeliveryContact__c;
newOrd.SpecialDeliveryPhone_D__c = newOrd.SpecialDeliveryPhone__c;
newOrd.SpecialDeliveryAddress_D__c = newOrd.SpecialDeliveryAddress__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newOrd.SpecialDeliveryContact_D_Encrypted__c = newOrd.SpecialDeliveryContact_Encrypted__c;
- newOrd.SpecialDeliveryPhone_D_Encrypted__c = newOrd.SpecialDeliveryPhone_Encrypted__c;
- newOrd.SpecialDeliveryAddress_D_Encrypted__c = newOrd.SpecialDeliveryAddress_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
newOrd.SpecialParkage_D__c = newOrd.SpecialParkage__c;
newOrd.SpecialWarranty_D__c = newOrd.SpecialWarranty__c;
newOrd.DealerProfit_D__c = newOrd.DealerProfit__c;
@@ -430,7 +425,7 @@
}
public static void setPriceBook(List<Order> newList, Map<Id, Order> newMap, List<Order> oldList, Map<Id, Order> oldMap) {
-
+
List<String> oppidList = new List<String>();
for (Order o : newList) {
oppidList.add(o.OpportunityId);
@@ -1321,21 +1316,12 @@
}
if (newOrd.SpecialDeliveryContact__c != oldOrd.SpecialDeliveryContact__c) {
newOrd.SpecialDeliveryContact_D__c = newOrd.SpecialDeliveryContact__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newOrd.SpecialDeliveryContact_D_Encrypted__c = newOrd.SpecialDeliveryContact_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newOrd.SpecialDeliveryPhone__c != oldOrd.SpecialDeliveryPhone__c) {
newOrd.SpecialDeliveryPhone_D__c = newOrd.SpecialDeliveryPhone__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newOrd.SpecialDeliveryPhone_D_Encrypted__c = newOrd.SpecialDeliveryPhone_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newOrd.SpecialDeliveryAddress__c != oldOrd.SpecialDeliveryAddress__c) {
newOrd.SpecialDeliveryAddress_D__c = newOrd.SpecialDeliveryAddress__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newOrd.SpecialDeliveryAddress_D_Encrypted__c = newOrd.SpecialDeliveryAddress_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
}
if (newOrd.SpecialParkage__c != oldOrd.SpecialParkage__c) {
newOrd.SpecialParkage_D__c = newOrd.SpecialParkage__c;
@@ -1651,11 +1637,6 @@
newOrd.SpecialDeliveryContact__c = newOrd.SpecialDeliveryContact_D__c;
newOrd.SpecialDeliveryPhone__c = newOrd.SpecialDeliveryPhone_D__c;
newOrd.SpecialDeliveryAddress__c = newOrd.SpecialDeliveryAddress_D__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newOrd.SpecialDeliveryContact_Encrypted__c = newOrd.SpecialDeliveryContact_D_Encrypted__c;
- newOrd.SpecialDeliveryPhone_Encrypted__c = newOrd.SpecialDeliveryPhone_D_Encrypted__c;
- newOrd.SpecialDeliveryAddress_Encrypted__c = newOrd.SpecialDeliveryAddress_D_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
newOrd.SpecialParkage__c = newOrd.SpecialParkage_D__c;
newOrd.SpecialWarranty__c = newOrd.SpecialWarranty_D__c;
newOrd.DealerProfit__c = newOrd.DealerProfit_D__c;
@@ -1784,11 +1765,6 @@
newOrd.SpecialDeliveryContact_D__c = newOrd.SpecialDeliveryContact__c;
newOrd.SpecialDeliveryPhone_D__c = newOrd.SpecialDeliveryPhone__c;
newOrd.SpecialDeliveryAddress_D__c = newOrd.SpecialDeliveryAddress__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newOrd.SpecialDeliveryContact_D_Encrypted__c = newOrd.SpecialDeliveryContact_Encrypted__c;
- newOrd.SpecialDeliveryPhone_D_Encrypted__c = newOrd.SpecialDeliveryPhone_Encrypted__c;
- newOrd.SpecialDeliveryAddress_D_Encrypted__c = newOrd.SpecialDeliveryAddress_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
newOrd.SpecialParkage_D__c = newOrd.SpecialParkage__c;
newOrd.SpecialWarranty_D__c = newOrd.SpecialWarranty__c;
newOrd.DealerProfit_D__c = newOrd.DealerProfit__c;
@@ -1830,9 +1806,6 @@
newOrd.Contract_StatusD__c = newOrd.Contract_Status__c;
newOrd.ProductConfig_D__c = newOrd.ProductConfig__c;
- // PIPL Update 20220420 By Chen Yanan Start
- newOrd.SpecialDeliveryPhone_Encrypted__c = newOrd.SpecialDeliveryPhone_D_Encrypted__c;
- // PIPL Update 20220420 By Chen Yanan End
if (newOrd.Upload_IsChanged__c == true) {
newOrd.Upload_IsChanged__c = false;
@@ -2090,14 +2063,15 @@
newOrder.BS_AsistBGenManger_BS__c = u.BS_AsistBGenManger__c == null ? u.Id : u.BS_AsistBGenManger__c;
newOrder.BS_AsistGenManger_BS__c = u.BS_AsistGenManger__c == null ? u.Id : u.BS_AsistGenManger__c;
- newOrder.BS_MandAGM__c = u.BS_Manager__c == u.BS_AsistBGenManger__c ? true : false;
- //newOrder.BS_AGMandD__c = u.BS_AsistGenManger__c == u.BS_Department__c ? true : false;
- //newOrder.BS_DandAB__c = u.BS_Department__c == u.BS_AsistBGenManger__c ? true : false;
+ newOrder.BS_MandAGM__c = u.BS_Manager__c == u.BS_AsistGenManger__c ? true : false;
+ newOrder.BS_AGMandD__c = u.BS_AsistGenManger__c == u.BS_Department__c ? true : false;
+ newOrder.BS_DandAB__c = u.BS_Department__c == u.BS_AsistBGenManger__c ? true : false;
newOrder.BS_ABGandBD__c = u.BS_AsistBGenManger__c == u.BS_BDepartment__c ? true : false;
newOrder.BS_BDandIND__c = u.BS_BDepartment__c == u.BS_INDepartment__c ? true : false;
newOrder.BS_INDandGM__c = u.BS_INDepartment__c == u.BS_GeneralManager__c ? true : false;
}
}
+
if (newOrder.ProductSegment__c != 'BS') {
newOrder.SalesOwner_BS__c = newOrder.OpportunityOwnerId__c;
@@ -2118,14 +2092,6 @@
}
//}
}
-
- for (Order newOrder : newList) {
- if (newOrder.ProductSegment__c == 'BS') {
- newOrder.BS_AGMandD__c = newOrder.BS_Manager_BS__c == newOrder.SalesOwner_BS__c ? true : false;
- newOrder.BS_DandAB__c = newOrder.BS_Department_BS__c == newOrder.SalesOwner_BS__c ? true : false;
- }
- }
-
}
@@ -2662,13 +2628,6 @@
// 鍚堝悓-鍙樻洿鐢宠-鍘熷悎鍚屾棤鏁堟垨鑰呮墜鍔ㄤ慨鏀瑰鑷村悎鍚屾棤鏁�
if (!approveStatus && status) {
- if(newOrd.oldOrder__c){
- RadiationUtil.oldOrder = true;
- if (updateFlag) {
- newOrd.oldOrder__c = false;
- }
-
- }
RadiationUtil.updateRadiationTypeQuantity(newOrd.Id,orderFounder , newOrd.DealerId__c, true,'鏃犳晥鎴栧彉鏇存棤鏁�',newOrd.LastModifiedById );
}
@@ -2685,12 +2644,6 @@
if (RadiationUtil.EscapeOrderTriggerHandler) {
RadiationUtil.EscapeOrderTriggerHandler = false;
- if(newOrd.oldOrder__c){
- RadiationUtil.oldOrder = true;
- if (updateFlag) {
- newOrd.oldOrder__c = false;
- }
- }
RadiationUtil.updateRadiationTypeQuantity(newOrd.Id,orderFounder , newOrd.DealerId__c, true,'鍚堝悓鍙樻洿鑽夋涓�',newOrd.LastModifiedById );
}
@@ -2704,43 +2657,20 @@
Boolean status = newOrd.Status__c != oldOrd.Status__c && newOrd.Status__c == 'Inactive';
// 鍚堝悓鎻愪氦鐘舵�佸彉鎴愭棤鏁�
if ( status ) {
- if(newOrd.oldOrder__c){
- RadiationUtil.oldOrder = true;
- if (updateFlag) {
- newOrd.oldOrder__c = false;
- }
- }
RadiationUtil.updateRadiationTypeQuantity(newOrd.Id,orderFounder , newOrd.DealerId__c, true,'鍚堝悓鎻愪氦鍙樻棤鏁�',newOrd.LastModifiedById );
}
} else if (newOrd.ApproveStatus__c == 'CancelPass' && newOrd.Status__c == 'Active') {
// 鍚堝悓-鍚堝悓鎵瑰噯鈫掆啋鈫掑悎鍚屽彇娑�
if ( approveStatus && newOrd.BeforeSubmitStatus__c == 'OrderPass') {
- if(newOrd.oldOrder__c){
- RadiationUtil.oldOrder = true;
- if (updateFlag) {
- newOrd.oldOrder__c = false;
- }
- }
+
RadiationUtil.updateRadiationTypeQuantity(newOrd.Id,orderFounder , newOrd.DealerId__c, true,'鍚堝悓鍙栨秷',newOrd.LastModifiedById );
}
} else if (oldOrd.ApproveStatus__c == 'OrderSubmit' && newOrd.ApproveStatus__c == 'OrderReject' && newOrd.Status__c == 'Active') {
// 鍚堝悓鎻愪氦鈫掆啋鈫掑悎鍚岄┏鍥�
- if(newOrd.oldOrder__c){
- RadiationUtil.oldOrder = true;
- if (updateFlag) {
- newOrd.oldOrder__c = false;
- }
- }
RadiationUtil.updateRadiationTypeQuantity(newOrd.Id,orderFounder , newOrd.DealerId__c, true,'鍚堝悓椹冲洖',newOrd.LastModifiedById );
} else if (oldOrd.ApproveStatus__c == 'OrderSubmit' && newOrd.ApproveStatus__c == 'OrderDraft' && newOrd.Status__c == 'Active') {
// 鍚堝悓鎻愪氦鈫掆啋鈫掑悎鍚岃皟鍥�
- if(newOrd.oldOrder__c){
- RadiationUtil.oldOrder = true;
- if (updateFlag) {
- newOrd.oldOrder__c = false;
- }
- }
RadiationUtil.updateRadiationTypeQuantity(newOrd.Id,orderFounder , newOrd.DealerId__c, true,'鍚堝悓璋冨洖',newOrd.LastModifiedById );
}
@@ -2858,8 +2788,6 @@
for(OpportunityContactRole oppor:role_list){
roleMap.put(oppor.OpportunityId,oppor.ContactId);
}
- System.debug('oppidList: ' + oppidList);//Nancy 2022-04-25
- System.debug('role_list: ' + role_list);//Nancy 2022-04-25
// 鑾峰彇绯荤粺绠$悊鍛業d
String getUserId = System.label.SystemAdmin1_2_GPI;
String errMessage = '瀹㈡埛鍚嶆垨鏈�缁堢敤鎴蜂笌璇环涓嶄竴鑷达紒';
@@ -2868,13 +2796,7 @@
System.debug(oppAccountMap.get(orOne.OpportunityId) != orOne.AccountId);
System.debug( !roleMap.containsKey(orOne.OpportunityId));
System.debug(orOne.EndUserD__c + '++'+ roleMap.get(orOne.OpportunityId));
- //zhj 2022-04-22 start
- System.debug('oppAccountMap.get(orOne.OpportunityId) = ' + oppAccountMap.get(orOne.OpportunityId));
- System.debug('orOne.AccountId = ' + orOne.AccountId);
- System.debug('roleMap.containsKey(orOne.OpportunityId) = ' + roleMap.containsKey(orOne.OpportunityId));
- System.debug('orOne.EndUserD__c = ' + orOne.EndUserD__c);
- System.debug('roleMap.get(orOne.OpportunityId) = ' + roleMap.get(orOne.OpportunityId));
- //zhj 2022-04-22 end
+
if(oppAccountMap.get(orOne.OpportunityId) != orOne.AccountId || !roleMap.containsKey(orOne.OpportunityId) || orOne.EndUserD__c != roleMap.get(orOne.OpportunityId)){
// 鑾峰彇鐢ㄦ埛Id
String userId = UserInfo.getUserId().subString(0,15);
diff --git a/force-app/main/default/classes/OrderWebService.cls b/force-app/main/default/classes/OrderWebService.cls
index be3d31b..f2e4670 100644
--- a/force-app/main/default/classes/OrderWebService.cls
+++ b/force-app/main/default/classes/OrderWebService.cls
@@ -118,7 +118,7 @@
}
String accountDealerErrorMessage = RadiationUtil.updateCertificationDetails(dealerId, null, getModelQuantityMap, false);*/
String olympusDealerErrorMessage = RadiationUtil.updateCertificationDetails(olympusAccountId, null, getModelQuantityMap, false);
- result = olympusDealerErrorMessage == '' ? '' : '浠櫙閫氬彲閿�鍞暟閲忎笉瓒�' ;
+ result = olympusDealerErrorMessage == '' ? '' : '濂ユ灄宸存柉鍙攢鍞暟閲忎笉瓒�' ;
Boolean temp = result.startsWith('浣犱笉鑳�');
if(temp){
return '-1';
diff --git a/force-app/main/default/classes/QuotePDFController.cls b/force-app/main/default/classes/QuotePDFController.cls
index 1040798..9651bb6 100644
--- a/force-app/main/default/classes/QuotePDFController.cls
+++ b/force-app/main/default/classes/QuotePDFController.cls
@@ -83,17 +83,9 @@
'ZZTT' => '100% TT IN ADVANCE'
};
- public String staticResourceOpportunity{get; private set; }// 20220221 PI鏀归�� by Bright
- public String staticResourceContact{get; private set; }// 20220221 PI鏀归�� by Bright
- public String staticResourceFile{get; private set; }// 20220221 PI鏀归�� by Bright
-
-
public QuotePDFController() {
targetId = ApexPages.currentPage().getParameters().get('Id');
isPrintPrice = ApexPages.currentPage().getParameters().get('printprice');
- staticResourceOpportunity = JSON.serialize(PIHelper.getPIIntegrationInfo('Opportunity'));// 20220221 PI鏀归�� by Bright
- staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));// 20220221 PI鏀归�� by Bright
- staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));// 20220221 PI鏀归�� by Bright
}
// 鐢婚潰鍒濆鍖�
@@ -126,7 +118,6 @@
SetName16__c, SetQty16__c, SetName17__c, SetQty17__c, SetName18__c, SetQty18__c, SetName19__c, SetQty19__c, SetName20__c, SetQty20__c,
SetName21__c, SetQty21__c, SetName22__c, SetQty22__c, SetName23__c, SetQty23__c, SetName24__c, SetQty24__c, SetName25__c, SetQty25__c,
SetName26__c, SetQty26__c, SetName27__c, SetQty27__c, SetName28__c, SetQty28__c, SetName29__c, SetQty29__c, SetName30__c, SetQty30__c,
- Opportunity.AWS_Data_Id__c,// 20220221 PI鏀归�� by Bright
Custom_Price_Total__c, Custom_Price_Total_Text__c, Shipment_Term__c
from Quote
where Id = :targetId];
@@ -163,9 +154,7 @@
}
Contact con = new Contact();
if (conid != null && conid.length() > 0) {
- con = [select Id, Name, Phone, Email,
- AWS_Data_Id__c,// 20220221 PI鏀归�� by Bright
- Account.Name from Contact where Id = :conid];
+ con = [select Id, Name, Phone, Email, Account.Name from Contact where Id = :conid];
}
// PDF鎶ヤ环淇℃伅
quoteInfo = new QuoteInfo(quo, dealer, con);
@@ -226,8 +215,6 @@
public String note5 {get; private set;}
public String note6 {get; private set;}
public String note7 {get; private set;}
- public String conAwsDataId {get; private set;}
- public String oppAwsDataId {get; private set;}
public QuoteInfo(Quote quo, Account acc, Contact con) {
printPrice = quo.PrintPrice__c;
@@ -264,8 +251,6 @@
note5 = quo.Shipment_Term__c;
note6 = quo.Opportunity.TradeType__c == 'Taxation' ? 'tax included' : 'tax exempted';
note7 = quo.Opportunity.TradeType__c == 'Taxation' ? '鍚◣' : '鍏嶇◣';
- conAwsDataId = con.aws_data_id__c; // 20220222 PI鏀归�� by Bright
- oppAwsDataId = quo.Opportunity.aws_data_id__c;// 20220222 PI鏀归�� by Bright
}
}
diff --git a/force-app/main/default/classes/QuotePDFControllerTest.cls b/force-app/main/default/classes/QuotePDFControllerTest.cls
index e344903..4cd2017 100644
--- a/force-app/main/default/classes/QuotePDFControllerTest.cls
+++ b/force-app/main/default/classes/QuotePDFControllerTest.cls
@@ -1,12 +1,6 @@
@isTest
private class QuotePDFControllerTest {
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Opportunity','Contact','Document'});
- }
-
-
@isTest static void test_init() {
Id pricebookId = Test.getStandardPricebookId();
diff --git a/force-app/main/default/classes/QuoteTriggerHandler.cls b/force-app/main/default/classes/QuoteTriggerHandler.cls
index 5c3284b..ba03f0a 100644
--- a/force-app/main/default/classes/QuoteTriggerHandler.cls
+++ b/force-app/main/default/classes/QuoteTriggerHandler.cls
@@ -46,10 +46,7 @@
if(orderList.size() > 0){
System.debug('22222222222');
for(Order odr : orderList){
- //鐜嬮箯浼熸柊鍔犲垽鏂紝鍙湁宸插悓姝ョ殑鎶ヤ环鎵嶄細鍚屾鍚堝悓鐨勪粯娆炬潯浠�
- if(oppMap.get(odr.OpportunityId).IsSyncing){
- odr.PaymentTerms__c = oppMap.get(odr.OpportunityId).PaymentTerms__c;
- }
+ odr.PaymentTerms__c = oppMap.get(odr.OpportunityId).PaymentTerms__c;
}
System.debug(orderList);
update orderList;
diff --git a/force-app/main/default/classes/QuotesPDFController.cls b/force-app/main/default/classes/QuotesPDFController.cls
index b8e9736..b94d45a 100644
--- a/force-app/main/default/classes/QuotesPDFController.cls
+++ b/force-app/main/default/classes/QuotesPDFController.cls
@@ -16,11 +16,6 @@
//鎬婚噾棰� 鍚堣
public Decimal grossAmt{get;set;}
public String conName{get;set;}
-
- // 20220222 PI鏀归�� by Bright---start
- public string staticResource { get; private set; }
- public string contactStaticResource { get; private set; }
- // 20220222 PI鏀归�� by Bright---end
// 绗竴椤典笉浼氫镜鍏ラ〉鑴氫俊鎭殑鏈�澶ц鏁�
private Decimal firstCount = 50;
@@ -44,8 +39,6 @@
public QuotesPDFController() {
//鑾峰彇鎶ヤ环ID
id = System.currentPageReference().getParameters().get('id');
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Quotes__c'));// 20220222 PI鏀归�� by Bright
- contactStaticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));// 20220222 PI鏀归�� by Bright
}
/**
@@ -62,7 +55,7 @@
//DISCOUNT__c
//TAX__c
//TOTAL__c
- quo = [SELECT id,ESTIMATE__c,DATE__c,EXPIRES__c,CURRENCY__c,TERMS__c,INCOTERM__c,PO__c,LEAD_TIME__c,CONTACT_EMAIL__c,CONTACT_PHONE__c,CONTACT_NAME__c,CONTACT_NAME__r.AWS_Data_Id__c ,BILL_TO__c,SHIP_TO__c,CUSTOMER_MESSAGE__c,SWOName__c,QuotesType__c,COMPANYName__c,SUBTOTAL__c,DISCOUNT__c,TAX__c,TOTAL__c,AWS_Data_Id__c FROM Quotes__c WHERE Id = :id];
+ quo = [SELECT id,ESTIMATE__c,DATE__c,EXPIRES__c,CURRENCY__c,TERMS__c,INCOTERM__c,PO__c,LEAD_TIME__c,CONTACT_EMAIL__c,CONTACT_PHONE__c,CONTACT_NAME__c,BILL_TO__c,SHIP_TO__c,CUSTOMER_MESSAGE__c,SWOName__c,QuotesType__c,COMPANYName__c,SUBTOTAL__c,DISCOUNT__c,TAX__c,TOTAL__c FROM Quotes__c WHERE Id = :id];
List<Contact> conList = [select Id,Name from Contact where Id =: quo.CONTACT_NAME__c];
if(conList!=null && conList.size()!=0){
conName = conList[0].Name;
diff --git a/force-app/main/default/classes/QuotesPDFControllerTest.cls b/force-app/main/default/classes/QuotesPDFControllerTest.cls
index 3724508..2558a13 100644
--- a/force-app/main/default/classes/QuotesPDFControllerTest.cls
+++ b/force-app/main/default/classes/QuotesPDFControllerTest.cls
@@ -1,11 +1,5 @@
@isTest
private class QuotesPDFControllerTest {
-
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Quotes__c','Contact'});
- }
-
static testMethod void testMethod1() {
List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE'];
diff --git a/force-app/main/default/classes/RadiationUtil.cls b/force-app/main/default/classes/RadiationUtil.cls
index 02ebb2f..e39f810 100644
--- a/force-app/main/default/classes/RadiationUtil.cls
+++ b/force-app/main/default/classes/RadiationUtil.cls
@@ -1,9 +1,5 @@
global class RadiationUtil {
- public static Boolean oldOrder = false;
-
- public static BOolean is_oly = false;
-
public static Boolean EscapeOrderTriggerHandler = true;
/**
* [updateRadiationTypeQuantity description]鏇存柊浠g悊鍟嗚瘉鐓ф槑缁嗭紝鏇存柊濂ユ灄宸存柉浠g悊鍟嗙殑璇佺収鏄庣粏
@@ -14,8 +10,7 @@
*/
public static void updateRadiationTypeQuantity (String Id, String orderFounder, String dealerId, Boolean toloseFlag, String operationType, String operator) {
-
- String olympusAccountId = System.label.Olympus_Id ;
+ String olympusAccountId = System.label.Olympus_Id;
String orderId = Id;
//鑾峰彇鍚堝悓鐨勮緪灏勭被鍨嬪拰鏁伴噺
@@ -25,9 +20,7 @@
//鏌ヤ唬鐞嗗晢鐨勪唬鐞嗗晢璐拱鏄庣粏
Map<String, PurchaseDetails__c> dealerModelQuantityMap = GetPurchaseDetailsMap(dealerId);
//鏌ュゥ鏋楀反鏂殑浠g悊鍟嗚喘涔版槑缁�
- is_oly = true;
Map<String, PurchaseDetails__c> olympusModelQuantityMap = GetPurchaseDetailsMap(olympusAccountId);
- is_oly = false;
// 鏌ユ壘 鍚堝悓鎻愪氦瀵瑰簲鐨勪唬鐞嗗晢璐拱鏄庣粏
Map<String, PurchaseDetails__c> dealerResult = new Map<String, PurchaseDetails__c>();
Map<String, PurchaseDetails__c> olympusResult = new Map<String, PurchaseDetails__c>();
@@ -121,9 +114,7 @@
} else {//澧炲姞宸插敭浜у搧鏁伴噺
reportMap.putAll(upsertChangedReport(olympusAccountId, radiationType, operationType, orderId, quantity, operator));
- is_oly = true;
olympusModelQuantityMap = insertPurchaseDetail(olympusModelQuantityMap, olympusAccountId, radiationType, radiationTypeQuantityMap);
- is_oly = false;
}
} else {//鍑忓幓宸插敭浜у搧鏁伴噺
if (toloseFlag) {
@@ -131,9 +122,7 @@
olympusResult.get(radiationType).SoldNumber__c -= quantity;
} else {//澧炲姞宸插敭浜у搧鏁伴噺
reportMap.putAll(upsertChangedReport(olympusAccountId, radiationType, operationType, orderId, quantity, operator));
- is_oly = true;
olympusModelQuantityMap = insertPurchaseDetail(olympusModelQuantityMap, olympusAccountId, radiationType, radiationTypeQuantityMap);
- is_oly = false;
}
}
@@ -148,9 +137,7 @@
if ( olympusResult.size() > 0 && olympusResult != null) {
upsert olympusResult.values();
- is_oly = true;
insertReportMap.putAll(insertChangedReport(olympusResult, reportMap));
- is_oly = false;
}
} else {
@@ -161,9 +148,7 @@
if ( olympusModelQuantityMap.size() > 0 && olympusModelQuantityMap != null) {
upsert olympusModelQuantityMap.values();
- is_oly = true;
insertReportMap.putAll(insertChangedReport(olympusModelQuantityMap, reportMap));
- is_oly = false;
}
}
@@ -173,9 +158,7 @@
Map<String, Integer> radiationMap = new Map<String, Integer>();
String accountDealerErrorMessage = updateCertificationDetails(dealerId, orderFounder, radiationMap, true);
- is_oly = true;
String olympusDealerErrorMessage = updateCertificationDetails(olympusAccountId, orderFounder, radiationMap, true);
- is_oly = false;
}
}
@@ -192,7 +175,6 @@
String accountId = detail.PurchaseAccount__c;
//String accountIdafter = accountId.subString(0,15);
String key = accountId.subString(0, 15) + detail.PurProductModel__c;
-
if (reportMap.containsKey(key)) {
reportMap.get(key).ChangedPurchase__c = detail.Id;
}
@@ -209,11 +191,9 @@
* @return [description]
*/
public static String updateCertificationDetails( String accountId, String orderFounder, Map<String, Decimal> dataMap, Boolean updateFlag) {
-
- Map<String, CertificationDetails__c> certificationDetailMap = GetAccountCertificationDetail(accountId);
-
- Map<String, CertificationDetails__c> temporaryCertificationDetailMap = GetAccountCertificationDetail(accountId);
+ Map<String, CertificationDetails__c> certificationDetailMap = GetAccountCertificationDetail(accountId);
+ Map<String, CertificationDetails__c> temporaryCertificationDetailMap = GetAccountCertificationDetail(accountId);
Map<String, PurchaseDetails__c> purchaseDetailMap = GetPurchaseDetailsMap(accountId);
Map<String, CertificationDetails__c> updatecertificationDetailMap = new Map<String, CertificationDetails__c>();
@@ -387,19 +367,7 @@
*/
public static Map<String, CertificationDetails__c> GetAccountCertificationDetail (String accountId) {
Map<String, CertificationDetails__c> result = new Map<String, CertificationDetails__c>();
- List<CertificationDetails__c> certificationDetailsList = new List<CertificationDetails__c>();
- if (oldOrder && is_oly) {
- certificationDetailsList = [ select Id, Name, ProdustionType__c,
- ProductModelNumber__c, Ceiling80__c, Record80__c, Ceiling90__c, Record90__c ,
- CertificationDetailAccount__c, CertificationDetailAccountName__c,
- LicenseInformation__r.IfQuantityCtrl__c,AccountRecordType__c,Record100__c,
- Ceiling100__c
- from CertificationDetails__c
- where CertificationDetailAccount__c = :accountId
- and ActivitieTypes__c = '閿�鍞�' and IsActive__c = false];
-
- }else{
- certificationDetailsList = [ select Id, Name, ProdustionType__c,
+ List<CertificationDetails__c> certificationDetailsList = [ select Id, Name, ProdustionType__c,
ProductModelNumber__c, Ceiling80__c, Record80__c, Ceiling90__c, Record90__c ,
CertificationDetailAccount__c, CertificationDetailAccountName__c,
LicenseInformation__r.IfQuantityCtrl__c,AccountRecordType__c,Record100__c,
@@ -407,8 +375,6 @@
from CertificationDetails__c
where CertificationDetailAccount__c = :accountId
and ActivitieTypes__c = '閿�鍞�' and IsActive__c = true];
- }
-
for (CertificationDetails__c detail : certificationDetailsList) {
result.put(detail.ProdustionType__c, detail);
@@ -438,11 +404,6 @@
purchaseDetail.PurProductModel__c = productModel;
purchaseDetail.PurchaseAccount__c = id;
purchaseDetail.TakeEffectInYear__c = effectiveYear;
- if (oldOrder && is_oly) {
- purchasedetail.company__c = '濂ユ灄宸存柉';
- }else if(is_oly){
- purchaseDetail.company__c = '浠櫙閫氬厜瀛︾鎶�';
- }
for (String model:certificationDetailMap.keySet()) {
if ('Delta鍜孷anta'.equals(model)) {
@@ -499,25 +460,10 @@
public static Map<String, PurchaseDetails__c> GetPurchaseDetailsMap( String accountId) {
String effectiveYear = String.valueOf(Date.today().year());
Map<String, PurchaseDetails__c> result = new Map<String, PurchaseDetails__c>();
- List<PurchaseDetails__c> purchaseDetailsList = new List<PurchaseDetails__c>();
- if(is_oly == false){
- purchaseDetailsList = [select Id, Name, RemainingNumber__c, SoldNumber__c,
+ List<PurchaseDetails__c> purchaseDetailsList = [select Id, Name, RemainingNumber__c, SoldNumber__c,
PurProductModel__c, PurchaseAccount__c
from PurchaseDetails__c
where TakeEffectInYear__c = :effectiveYear and PurchaseAccount__c = :accountId];
- }else{
- if (oldOrder) {
- purchaseDetailsList = [select Id, Name, RemainingNumber__c, SoldNumber__c,
- PurProductModel__c, PurchaseAccount__c
- from PurchaseDetails__c
- where TakeEffectInYear__c = :effectiveYear and PurchaseAccount__c = :accountId and company__c = '濂ユ灄宸存柉'];
- }else{
- purchaseDetailsList = [select Id, Name, RemainingNumber__c, SoldNumber__c,
- PurProductModel__c, PurchaseAccount__c
- from PurchaseDetails__c
- where TakeEffectInYear__c = :effectiveYear and PurchaseAccount__c = :accountId and company__c = '浠櫙閫氬厜瀛︾鎶�'];
- }
- }
if (purchaseDetailsList.size() > 0) {
for (PurchaseDetails__c purchaseDetail : purchaseDetailsList) {
result.put(purchaseDetail.PurProductModel__c, purchaseDetail);
diff --git a/force-app/main/default/classes/SBG001TriggerHandler.cls b/force-app/main/default/classes/SBG001TriggerHandler.cls
index 3ebc381..8f43ef4 100644
--- a/force-app/main/default/classes/SBG001TriggerHandler.cls
+++ b/force-app/main/default/classes/SBG001TriggerHandler.cls
@@ -8,7 +8,6 @@
//001淇敼Rest gwy start 2021-04-06
//public class SBG001ResrException extends Exception {}
public static String status;
- public static String responseBody;//dennis update for pi 2022/3/9
public class SBG001 {
public SSBDCustomerContacts_element SSBDCustomerContacts;
}
@@ -34,7 +33,6 @@
public String ContactCode;
public String ContactEffectiveDateFrom;
public String PurposeOfAdvice;
- public String DataId;//dennis update for pi 2022/3/9
}
//001淇敼Rest gwy end 2021-04-06
@@ -67,7 +65,6 @@
|| acc.RecordTypeId == '01228000000TdFG' // NDT
|| acc.RecordTypeId == '01228000000TdFL' // ANI
|| acc.RecordTypeId == '01228000000TdF1' // BS
- || acc.RecordTypeId == '0120T0000003Cxt' // IE鐩撮攢
)
&& acc.stautesD__c == 'Pass') || acc.RecordTypeId == SBG001TriggerHandler.Account_Agency_Id //鍔炰簨澶�
) {
@@ -88,7 +85,6 @@
|| acc.RecordTypeId == '01228000000TdFG' // NDT
|| acc.RecordTypeId == '01228000000TdFL' // ANI
|| acc.RecordTypeId == '01228000000TdF1' // BS
- || acc.RecordTypeId == '0120T0000003Cxt' // IE鐩撮攢
)
&& acc.stautesD__c == 'Pass'
&& (acc.ManagementCode_Ext__c != old.ManagementCode_Ext__c
@@ -163,7 +159,6 @@
|| con.AccountRecordTypeId__c == '01228000000TdFB' // RVI
|| con.AccountRecordTypeId__c == '01228000000TdFG' // NDT
|| con.AccountRecordTypeId__c == '01228000000TdF1' // BS
- || con.AccountRecordTypeId__c == '0120T0000003Cxt' // IE鐩撮攢
)
&& con.StatusD__c == 'Pass') || con.AccountRecordTypeId__c == SBG001TriggerHandler.Account_Agency_Id// 鍔炰簨澶�
) {
@@ -189,7 +184,6 @@
|| con.AccountRecordTypeId__c == '01228000000TdFG' // NDT
|| con.AccountRecordTypeId__c == '01228000000TdF1' // BS
|| con.AccountRecordTypeId__c == SBG001TriggerHandler.Account_Agency_Id // 鍔炰簨澶�
- || con.AccountRecordTypeId__c == '0120T0000003Cxt' // IE鐩撮攢
)
&& con.StatusD__c == 'Pass'
&& (con.ManagementCode_Ext__c != old.ManagementCode_Ext__c
@@ -330,7 +324,7 @@
SSBDCustomerContact.CustomerDescription = acc.FacilityName__c;
SSBDCustomerContact.CustomerDescription2Description3
= (String.isBlank(acc.DivisionName__c) ? '' : (acc.DivisionName__c=='鏃�' ? '' : acc.DivisionName__c));
- if (acc.RecordTypeId == '01228000000TdF6' || acc.RecordTypeId == '01228000000TdFB' || acc.RecordTypeId == '01228000000TdFG' || acc.RecordTypeId == '01228000000TdFL' || acc.RecordTypeId == '0120T0000003Cxt') { // IE or RVI
+ if (acc.RecordTypeId == '01228000000TdF6' || acc.RecordTypeId == '01228000000TdFB' || acc.RecordTypeId == '01228000000TdFG' || acc.RecordTypeId == '01228000000TdFL') { // IE or RVI
SSBDCustomerContact.CustomerDescription2Description3 += ',' + (String.isBlank(acc.EnglishName__c) ? '' : acc.EnglishName__c);
} else {
SSBDCustomerContact.CustomerDescription2Description3 += ',' + (String.isBlank(acc.DepartmentName__c) ? '' : acc.Departmentname__c);
@@ -518,8 +512,7 @@
Phone, MobilePhone,
Fax, Email, PostCode__c, Address1__c,
CreatedDate, LastModifiedDate,
- Account.UserType__c,
- AWS_Data_Id__c//dennis update for pi 2022/3/9
+ Account.UserType__c
from Contact where Id IN :conIds]; // 鍓婇櫎銉囥兗銈裤倰妞滅储銇椼仾銇勩伅銇氥�丄ll ROWS 銇勩倝銇亜銇仛
// System.debug(Logginglevel.DEBUG, 'SBG001_' + iflog.Name + ' conList.size()=' + conList.size());
@@ -539,7 +532,7 @@
SSBDCustomerContact.CustomerDescription = con.Account.FacilityName__c;
SSBDCustomerContact.CustomerDescription2Description3
= (String.isBlank(con.Account.DivisionName__c) ? '' : (con.Account.DivisionName__c=='鏃�' ? '' : con.Account.DivisionName__c));
- if (con.AccountRecordTypeId__c == '01228000000TdF6' || con.AccountRecordTypeId__c == '01228000000TdFB' || con.AccountRecordTypeId__c == '01228000000TdFG' || con.AccountRecordTypeId__c == '01228000000TdFL' || con.AccountRecordTypeId__c == '0120T0000003Cxt') { // IE or RVI
+ if (con.AccountRecordTypeId__c == '01228000000TdF6' || con.AccountRecordTypeId__c == '01228000000TdFB' || con.AccountRecordTypeId__c == '01228000000TdFG' || con.AccountRecordTypeId__c == '01228000000TdFL') { // IE or RVI
SSBDCustomerContact.CustomerDescription2Description3 += ',' + (String.isBlank(con.Account.EnglishName__c) ? '' : con.Account.EnglishName__c);
} else {
SSBDCustomerContact.CustomerDescription2Description3 += ',' + (String.isBlank(con.Account.DepartmentName__c) ? '' : con.Account.Departmentname__c);
@@ -552,7 +545,6 @@
+ ',' + (String.isBlank(con.Email) ? '' : con.Email);
SSBDCustomerContact.PostalCode = String.isBlank(con.PostCode__c) ? '' : con.PostCode__c;
SSBDCustomerContact.Address = String.isBlank(con.Address1__c) ? '' : con.Address1__c;
- SSBDCustomerContact.DataId = String.isBlank(con.AWS_Data_Id__c) ? '' : con.AWS_Data_Id__c;
SSBDCustomerContact.CustomerCategory = GetCustomerCategory(null,con);//'瀹㈡埛' + (String.isBlank(con.Account.ProductSegment__c) ? '' : con.Account.ProductSegment__c);
// JZHU-BPQBVK-IE鏈�缁堢敤鎴锋帴鍙d紶杈撻�昏緫鍙樻洿(update-Start-20200525)
SSBDCustomerContact.UserType = '';
@@ -742,59 +734,26 @@
} else {
logstr = iflog.Log__c;
}
- // 娣诲姞aws涓婄嚎寮�鍏� by sushanhu 20220419
- Boolean piOn =AWSServiceTool.getAWSServiceStatus();
try{
- if (piOn) {
- //update to aws 2022/3/9 dennis
- PIHelper.PIIntegration pi =PIHelper.getPIIntegrationInfo('SBG001');
- // NFMUtil.response result =NFMUtil.sendToPiAWS(rowDataStr,pi.newUrl,pi.token);
- AWSServiceTool.response result = AWSServiceTool.sendToPiAWS(rowDataStr,pi.newUrl,pi.token);
- system.debug('aws result---'+result);
- status = result.status;
- system.debug('aws status---'+status);
- responseBody=result.responseBody;
- // Map<String, Object> res = (Map<String, Object>)JSON.deserializeUntyped(responseBody);
- // status=(String)res.get(status);
- if ('200'.equals(status)) {
+
+ status = NFMUtil.sendToSapRet(rowDataStr, NFMUtil.SBG001_ENDPOINT);
+ system.debug('status--->'+status);
+ if (status == 'OK') {
logstr += '\nstatus='+status;
rowData.retry_cnt__c = 0;
- } else {
+ } else {
if (rowData.retry_cnt__c == null) rowData.retry_cnt__c = 0;
if (rowData.retry_cnt__c < batch_retry_max_cnt) {
rowData.retry_cnt__c++;
LogAutoSendSchedule.assignOneMinute();
}
if (rowData.retry_cnt__c >= batch_retry_max_cnt) {
- //add respomseBody 璁板綍閿欒淇℃伅 by sushanhu 20220406 start
- rowData.ErrorLog__c = 'status:' + status +responseBody+
+ rowData.ErrorLog__c = 'status:' + status +
'\n閿欒娆℃暟宸茬粡瓒呰繃鑷姩閫佷俊璁惧畾鐨勬渶澶ф鏁帮紝璇锋墜鍔ㄩ�佷俊';
- //add respomseBody 璁板綍閿欒淇℃伅 by sushanhu 20220406 end
}
- }
- //update to aws 2022/3/9 dennis
- logstr += '\nend';
- }else {
- status = NFMUtil.sendToSapRet(rowDataStr, NFMUtil.SBG001_ENDPOINT);
- system.debug('status--->'+status);
- if (status == 'OK') {
- logstr += '\nstatus='+status;
- rowData.retry_cnt__c = 0;
- } else {
- if (rowData.retry_cnt__c == null) rowData.retry_cnt__c = 0;
- if (rowData.retry_cnt__c < batch_retry_max_cnt) {
- rowData.retry_cnt__c++;
- LogAutoSendSchedule.assignOneMinute();
- }
- if (rowData.retry_cnt__c >= batch_retry_max_cnt) {
- rowData.ErrorLog__c = 'status:' + status +
- '\n閿欒娆℃暟宸茬粡瓒呰繃鑷姩閫佷俊璁惧畾鐨勬渶澶ф鏁帮紝璇锋墜鍔ㄩ�佷俊';
- }
- }
- logstr += '\nend';
- // rowData.retry_cnt__c=0;
}
-
+ logstr += '\nend';
+ // rowData.retry_cnt__c=0;
}catch(Exception ex) {
// TODO IOException
// 銈ㄣ儵銉笺亴鐧虹敓銇椼仧鍫村悎
diff --git a/force-app/main/default/classes/SBG001TriggerHandlerTest.cls b/force-app/main/default/classes/SBG001TriggerHandlerTest.cls
index 1eb7c75..fe5afbc 100644
--- a/force-app/main/default/classes/SBG001TriggerHandlerTest.cls
+++ b/force-app/main/default/classes/SBG001TriggerHandlerTest.cls
@@ -1,11 +1,5 @@
@isTest
private class SBG001TriggerHandlerTest {
- //add sushanhu for pipl 20220415
- @testSetup
- static void makaDate(){
- TestDataUtility.CreatePIPolicyConfiguration('SBG001');
- }
- //add sushanhu for pipl 20220415
static testMethod void myUnitTest() {
List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE'];
List<RecordType> rectDealer = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Dealer'];
diff --git a/force-app/main/default/classes/SBG007TriggerHandler.cls b/force-app/main/default/classes/SBG007TriggerHandler.cls
index 9c6355a..ed41915 100644
--- a/force-app/main/default/classes/SBG007TriggerHandler.cls
+++ b/force-app/main/default/classes/SBG007TriggerHandler.cls
@@ -4,7 +4,6 @@
public static Set<Id> SBG007_Ids = new Set<Id>();
//007淇敼Rest gwy start 2021-04-06
public static String status;
- public static String responseBody;//dennis 2022/3/3
public class SBG007 {
public GeDatas_element GeDatas;
}
@@ -30,8 +29,6 @@
public String Other2;
public String Other3;
public GeDataDetails_element[] GeDataDetails;
- //dennis start for pi 2022/3/3
- public String DataId;
}
public class GeDataDetails_element {
@@ -75,10 +72,8 @@
* @param oppIds 閫佷俊瀵捐薄鍟嗚珖(璜栫悊涓�1浠躲伄銇裤仹銇�)
* @param purposeOfAdviceMap 1:Delete 2:Add(Insert) 3:Change(Update)
*/
-
@future (callout=true)
public static void callout(String iflog_Id, List<String> oppIds, Map<String, String> purposeOfAdviceMap) {
- System.debug('杩涘叆callout');
if (oppIds == null || oppIds.size() == 0) {
return;
}
@@ -130,8 +125,7 @@
EndUser__c, Machine_Parts__c,
SalesChannel__c, ExpectedDeliveryDate__c, DealerId__c,Dealer__r.ManagementCode_F__c,Dealer__r.ManagementCode_Ext__c,DealerSalesStaffName__c,
ForeignTradeCompany__c, SpecialDeliveryAddress__c,
- SyncedQuoteId,
- AWS_Data_Id__c //dennis start for pi 2022/3/3
+ SyncedQuoteId
from Opportunity where Id IN :oppIds];
System.debug('11111 oppList='+oppList);
@@ -209,7 +203,6 @@
quotation.DealerSalesStaffName = opp.DealerSalesStaffName__c;
quotation.ForeignTradeCompany = opp.ForeignTradeCompany__c;
quotation.SpecialDeliveryAddress = opp.SpecialDeliveryAddress__c;
- quotation.DataId = opp.AWS_Data_Id__c;//dennis start for pi 2022/3/3
//007淇敼Rest gwy start 2021-04-06
quotation.GeDataDetails = new List<GeDataDetails_element>();
@@ -325,57 +318,7 @@
} else {
logstr = iflog.Log__c;
}
- // 娣诲姞aws涓婄嚎寮�鍏� by sushanhu 20220419
- Boolean piOn =AWSServiceTool.getAWSServiceStatus();
try{
- //add by sushanhu for test 20220421
- //piOn=false;
- if (piOn) {
- //update to aws 2022/3/3 dennis
- PIHelper.PIIntegration pi =PIHelper.getPIIntegrationInfo('SBG007');
- // NFMUtil.response result =NFMUtil.sendToPiAWS(rowDataStr,pi.newUrl,pi.token);
- AWSServiceTool.response result = AWSServiceTool.sendToPiAWS(rowDataStr,pi.newUrl,pi.token);//202204 25 update by sushanhu for pipl
- system.debug('aws result---'+result);
- status = result.status;
- responseBody=result.responseBody;
- system.debug('aws status--'+status);
- if ('200'.equals(status)) {
- logstr += status + '\n';
- rowData.retry_cnt__c = 0;
- }
- else {
- if (rowData.retry_cnt__c == null) rowData.retry_cnt__c = 0;
- if (rowData.retry_cnt__c < batch_retry_max_cnt) {
- rowData.retry_cnt__c++;
- LogAutoSendSchedule.assignOneMinute();
- }
- if (rowData.retry_cnt__c >= batch_retry_max_cnt) {
-
- rowData.ErrorLog__c = 'status:' + status +responseBody// update 鍔犲叆閿欒鐨勮繑鍥炰綋 sushanhu20220406
- +'\n閿欒娆℃暟宸茬粡瓒呰繃鑷姩閫佷俊璁惧畾鐨勬渶澶ф鏁帮紝璇锋墜鍔ㄩ�佷俊';
- }
- }
- }else {
- // 007淇敼Rest gwy start 2021-04-12
- status = NFMUtil.sendToSapRet(rowDataStr, NFMUtil.SBG007_ENDPOINT);
- if (status == 'OK') {
- logstr += '\n' + status;
- rowData.retry_cnt__c = 0;
- } else {
- if (rowData.retry_cnt__c == null) rowData.retry_cnt__c = 0;
- if (rowData.retry_cnt__c < batch_retry_max_cnt) {
- rowData.retry_cnt__c++;
- LogAutoSendSchedule.assignOneMinute();
- }
- if (rowData.retry_cnt__c >= batch_retry_max_cnt) {
- rowData.ErrorLog__c = 'status:' + status +
- '\n閿欒娆℃暟宸茬粡瓒呰繃鑷姩閫佷俊璁惧畾鐨勬渶澶ф鏁帮紝璇锋墜鍔ㄩ�佷俊';
- }
- }
- }
-
-
-
//gaozw
/*Sbg007Sync.HTTPS_Port stub = new Sbg007Sync.HTTPS_Port();
stub.timeout_x = 100000; // timeout in milliseconds
@@ -385,12 +328,25 @@
if (NFMUtil.CLIENT_CERT_NAME != null) {
stub.clientCertName_x = NFMUtil.CLIENT_CERT_NAME;
}*/
-
- //comment by dennis 2022/3/3 end
+ //007淇敼Rest gwy start 2021-04-12
+ status = NFMUtil.sendToSapRet(rowDataStr, NFMUtil.SBG007_ENDPOINT);
+ if (status == 'OK') {
+ logstr += '\n' + status;
+ rowData.retry_cnt__c = 0;
+ } else {
+ if (rowData.retry_cnt__c == null) rowData.retry_cnt__c = 0;
+ if (rowData.retry_cnt__c < batch_retry_max_cnt) {
+ rowData.retry_cnt__c++;
+ LogAutoSendSchedule.assignOneMinute();
+ }
+ if (rowData.retry_cnt__c >= batch_retry_max_cnt) {
+ rowData.ErrorLog__c = 'status:' + status +
+ '\n閿欒娆℃暟宸茬粡瓒呰繃鑷姩閫佷俊璁惧畾鐨勬渶澶ф鏁帮紝璇锋墜鍔ㄩ�佷俊';
+ }
+ }
//007淇敼Rest gwy end 2021-04-12
//Sbg007Sync.GeDatas_element[] pQuotations = new Sbg007Sync.GeDatas_element[] { quotations };
//OlympusCoJpCommonMessage.LOG_element[] logs = stub.SBG007_Sync_BC2GPI(pQuotations);
- //comment by dennis 2022/3/3
rowData.retry_cnt__c=0;
}catch(Exception ex) {
// TODO IOException
diff --git a/force-app/main/default/classes/SBG007TriggerHandlerTest.cls b/force-app/main/default/classes/SBG007TriggerHandlerTest.cls
index a002328..946dcd9 100644
--- a/force-app/main/default/classes/SBG007TriggerHandlerTest.cls
+++ b/force-app/main/default/classes/SBG007TriggerHandlerTest.cls
@@ -1,12 +1,6 @@
@isTest
private class SBG007TriggerHandlerTest
{
- //add sushanhu for pipl 20220415
- @testSetup
- static void makaDate(){
- TestDataUtility.CreatePIPolicyConfiguration();
- }
- //add sushanhu for pipl 20220415
// static testMethod void itShould(){
// List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE'];
// Account accIE = new Account(
@@ -70,7 +64,6 @@
// }
static testMethod void itShould2(){
-
List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE'];
Account accIE = new Account(
Name = '*',
@@ -242,12 +235,4 @@
System.assertEquals('', SBG007TriggerHandler.debug_msg);
}
-
- static testMethod void itShould1(){
- BatchIF_Log__c iflog = new BatchIF_Log__c();
- iflog.Log__c = '{"GeDatas":{"Monitoring":{"TransmissionDateTime":"202108250938","Text":"","Tag":"MSGH","Sender":"8405","Receiver":"1330","NumberOfRecord":"1","MessageType":"SBG027","MessageGroupNumber":"20210000465499"},"GeData":[{"ZNMPA":"N","TradeType":"Taxation","SpecialWarranty":null,"SpecialDeliveryAddress":"3000002093,C-2018-72066","ServiceFee":null,"SalesChannel":"41","SalesAccountCode":"76002795","PurposeOfAdvice":null,"ProductSegment":"BS","PaymentCondition":"ZZTT","Other3":"null,null","Other2":"璺ㄧ渷浠藉悎浣滈」鐩�","Other1":"test,dealer","OrderCode":"00050193","OpportunityCode":"O-2021-115172","OlympusPriceBeforeDiscount":null,"OlympusContractPrices":729412.00,"MachineParts":"Machine","GeDataDetails":[{"ItemQuantity":20,"ItemCode":"000000000006498300","DetailLine":10},{"ItemQuantity":20,"ItemCode":"N2664900","DetailLine":20}],"ForeignTradeCompany":null,"EndUser":"C-2016-25119","Discount":49.00,"DeliveryDate":"20210825","DealerSalesStaffName":"a","DealerCode":"3000002093","CoopAgentPCT":"50","CoopAgent":"A-2021-120990"}]}}';
- insert iflog;
- SBG007TriggerHandler.execute(iflog,null);
- }
-
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/SBG027Controller.cls b/force-app/main/default/classes/SBG027Controller.cls
index 4631772..ce9df07 100644
--- a/force-app/main/default/classes/SBG027Controller.cls
+++ b/force-app/main/default/classes/SBG027Controller.cls
@@ -1,13 +1,5 @@
-/**
- * @description :
- * @author : ChangeMeIn@UserSettingsUnder.SFDoc
- * @group :
- * @last modified on : 03-09-2022
- * @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
-**/
public without sharing class SBG027Controller {
- public static String responseBody;//dennis 2022/3/9
- public static String status;//dennis 2022/3/9
+
public class SBG027 {
public GeDatas_element GeDatas;
}
@@ -31,7 +23,6 @@
public String SalesChannel;
public String DealerCode;
public String DealerSalesStaffName;
- public String DataId; //dennis update for pi 2022/3/9
public String DeliveryDate;
public String PaymentCondition;
public String SpecialWarranty;
@@ -116,8 +107,7 @@
Opportunity.SalesChannel__c, Opportunity.ExpectedDeliveryDate__c, Opportunity.DealerId__c,Opportunity.DealerSalesStaffName__c,OlympusContractPricesD__c,SpecialDeliveryContact_D__c,Opportunity.SpecialDeliveryContact_D__r.ManagementCode_F__c,
Opportunity.ForeignTradeCompany__c, Opportunity.SpecialDeliveryAddress__c,PaymentTerms__c,SpecialDeliveryContact__c,PDF_Sp_Shipment_Term__c,PDF_Sp_ShippingTerms__c,
ForeignTradeCompany_D__r.ManagementCode_F__c, SpecialDeliveryAccount_D__r.ManagementCode_F__c, SpecialDeliveryContact2_D__r.ManagementCode_F__c,Opportunity.Dealer__r.DummyDealer__c,ContractPriceTotal__c,
- If_Supervise__c,CrossCooperativeDealerCode__c,SplitRatio__c,CrossCooperativeProject__c,Level_Category__c,
- Opportunity.AWS_Data_Id__c //dennis start for pi 2022/3/3
+ If_Supervise__c,CrossCooperativeDealerCode__c,SplitRatio__c,CrossCooperativeProject__c,Level_Category__c
from order where Id IN :ordIds ];
//List<order> ordList = [select Id,Name,Opportunity.Name, Opportunity.CurrencyIsoCode,OrderNumber,Opportunity.ForeignTradeCompany__r.ManagementCode_F__c,CustomerContractPriceD__c,SpecialCondition_text__c,SalesChannel__c,
// Owner.Name,Opportunity.AccountId__c,Opportunity.InquiryNumber__c,Opportunity.SpecialDeliveryAddress__r.ManagementCode_F__c, ServiceFee_D__c,Opportunity.SpecialDeliveryAddress_D__c,Opportunity.SpecialDeliveryAddress_D__r.ManagementCode_F__c,
@@ -228,7 +218,6 @@
quotation.EndUser = ord.EndUserD__r.ManagementCode_F__c;
quotation.DeliveryDate = NFMUtil.formatDate2Str(ord.ExpDelDate__c);
quotation.ServiceFee = ord.ServiceFee_D__c;
- quotation.DataId = ord.Opportunity.AWS_Data_Id__c;//dennis start for pi 2022/3/9 update to oppotuinity dataid
//2017/01/15杩藉姞
if(ord.Opportunity.SalesChannel__c == 'direct' && ord.Opportunity.Machine_Parts__c == 'Parts'){
quotation.Discount = 0;
@@ -254,19 +243,6 @@
quotation.Other2 = other2;//ord.SpecialCondition_text__c;
quotation.Other3 = ord.Shipment_Term_D__c + ',' + ord.Shipment_Term2_D__c;
// 璺ㄥ尯鍩熼攢鍞� XHL 20210831 Start
- /*quotation.CoopAgent = '';
- quotation.CoopAgentPCT = '';
- if (ord.CrossCooperativeProject__c) {//璺ㄧ渷浠藉悎浣滈」鐩�
- quotation.CoopAgent = ord.Dealer_B__r.ManagementCode_F__c;//鍚堜綔鍖哄煙浠g悊鍟咰ode
- quotation.DealerCode = ord.Dealer_A__r.ManagementCode_Ext__c;
- quotation.DealerSalesStaffName = ord.DealerSalesStaffNameA__c;
- String splitRatio = ord.SplitRatio__c;
- if (String.isNotBlank(splitRatio) && splitRatio.indexof(':') > 0) {
- Integer pct = Integer.valueOf(splitRatio.split(':')[1].trim())*10;
- quotation.CoopAgentPCT = String.valueof(pct);//涓氱哗鎷嗗垎姣斾緥(鍙�:鍚庤竟鐨勫��*10)
- }
- } */
-
quotation.CoopAgent = '';
quotation.CoopAgentPCT = '';
if (ord.CrossCooperativeProject__c) {//璺ㄧ渷浠藉悎浣滈」鐩�
@@ -402,37 +378,10 @@
} else {
logstr = iflog.Log__c;
}
- // 娣诲姞aws涓婄嚎寮�鍏� by sushanhu 20220420
- Boolean piOn =AWSServiceTool.getAWSServiceStatus();
try{
- //add by sushanhu for test 20220421
- //piOn=false;
- if (piOn) {
- //update to aws 2022/3/9 dennis
- PIHelper.PIIntegration pi =PIHelper.getPIIntegrationInfo('SBG027');
- // NFMUtil.response result =NFMUtil.sendToPiAWS(rowDataStr,pi.newUrl,pi.token);
- AWSServiceTool.response result = AWSServiceTool.sendToPiAWS(rowDataStr,pi.newUrl,pi.token);//update forpipl by sushanhu 20220425
- system.debug('aws result---'+result);
- status = result.status;
- system.debug('aws status--'+status);
- responseBody=result.responseBody;
- // Map<String, Object> res = (Map<String, Object>)JSON.deserializeUntyped(responseBody);
- // status=(String)res.get(status);
- if ('200'.equals(status)) {
- logstr += status + '\n';
- rowData.retry_cnt__c = 0;
- }
- //add by sushanhu 20220406 鍐欏叆閿欒鏃ュ織 start
- else {
- iflog.ErrorLog__c +=responseBody;
- }
- //add by sushanhu 20220406 鍐欏叆閿欒鏃ュ織 end
- }else {
- NFMUtil.sendToSap(rowDataStr, NFMUtil.SBG027_ENDPOINT);
- rowData.retry_cnt__c = 0;
-
- }
+ NFMUtil.sendToSap(rowDataStr, NFMUtil.SBG027_ENDPOINT);
+ rowData.retry_cnt__c = 0;
}catch(Exception ex) {
// TODO IOException
// 銈ㄣ儵銉笺亴鐧虹敓銇椼仧鍫村悎
diff --git a/force-app/main/default/classes/SBG027TriggerHandleTest.cls b/force-app/main/default/classes/SBG027TriggerHandleTest.cls
index 562a0aa..94f341e 100644
--- a/force-app/main/default/classes/SBG027TriggerHandleTest.cls
+++ b/force-app/main/default/classes/SBG027TriggerHandleTest.cls
@@ -1,9 +1,6 @@
@isTest
public class SBG027TriggerHandleTest {
static String setdata(){
- //add by sushanhu 20220415 start
- TestDataUtility.CreatePIPolicyConfiguration('SBG027');
- //add by sushanhu 20220415 end
Id pricebookId = Test.getStandardPricebookId();
Pricebook2 pricebook = new Pricebook2(
Name = 'IE',
@@ -109,7 +106,7 @@
opp.Dealer__c = buyer.Id;
opp.RecordTypeId = rectOpp[0].Id;
opp.OwnerId = UserInfo.getUserId();
- opp.StageName = 'Phase3';//淇敼涓篜rospect Created 鍘熸潵鏄疨hase3
+ opp.StageName = 'Phase3';
opp.CurrencyIsoCode = 'CNY';
opp.ProductSegment__c = 'IE';
opp.CloseDate = Date.today();
diff --git a/force-app/main/default/classes/SBG200Rest.cls b/force-app/main/default/classes/SBG200Rest.cls
index 75b17eb..0398cd6 100644
--- a/force-app/main/default/classes/SBG200Rest.cls
+++ b/force-app/main/default/classes/SBG200Rest.cls
@@ -390,8 +390,8 @@
public static void deleteAccountLicenseInformation(Map<String, Account> accountMap) {
System.debug('deleteAccountLicenseInformation--->Start');
- List<License_Information__c> existList = [select id, Name, AccountManagementCode__c,Is_Active_Formula__c
- from License_Information__c where AccountManagementCode__c In :accountMap.keySet() and Is_Active_Formula__c = true];
+ List<License_Information__c> existList = [select id, Name, AccountManagementCode__c
+ from License_Information__c where AccountManagementCode__c In :accountMap.keySet()];
if (existList.size() > 0) {
delete existList;
diff --git a/force-app/main/default/classes/SBG203Rest.cls b/force-app/main/default/classes/SBG203Rest.cls
index 439066d..2d69b2c 100644
--- a/force-app/main/default/classes/SBG203Rest.cls
+++ b/force-app/main/default/classes/SBG203Rest.cls
@@ -1,10 +1,5 @@
@RestResource(urlMapping = '/SBG203/*')
global with sharing class SBG203Rest {
- //add Response to aws 20220311 add sushanhu for pipl
-
- static Boolean SFStatus=true;
- static String SFMessage='';
- //add Response to aws 20220311 add sushanhu for pipl
global class GeDatas {
public NFMUtil.Monitoring Monitoring;
@@ -33,7 +28,6 @@
public String BPCodeforeign; //鍏嶇◣
public String BPType; //鍚堜綔浼欎即绫诲瀷
public String RegisterAddress; //浣忔墍(绛夊悓娉ㄥ唽鍦板潃)
- public String RegisterAddressEncrypted;// add by sushanhu 瀛樺偍register瀵嗘枃
public String RegionName; //鐪佸埆
public String City; //甯�
public String Phone; //鍚堜綔浼欎即鐢佃瘽
@@ -131,19 +125,6 @@
public String ContactMobilePhone; //鏀惰揣浜烘墜鏈�
public String CITY1; //鏀惰揣浜哄煄甯�
public String ContactEnglishName; //鑻辨枃鍚嶇О
- // add for pi sushanhu 20220309 start
- public String ContactNameEncrypted; //鏀惰揣浜哄悕绉板瘑鏂�
- public String ContactPhoneEncrypted; //鏀惰揣浜虹數璇濆瘑鏂�
- public String PostalCodeEncrypted; //閭紪瀵嗘枃
- public String ContactAddressEncrypted; //鏀惰揣鍦板潃瀵嗘枃
- public String ContactMobilePhoneEncrypted; //鏀惰揣浜烘墜鏈哄瘑鏂�
- public String ContactEnglishNameEncrypted; //鑻辨枃鍚嶇О瀵嗘枃
- //delete by sushanhu 鍜屽鎴锋矡閫� 鍚庢湡 涓嶈祴鍊艰繖涓瓧娈� satrt 20220411
- // public String EnglishAddress; //鑻辨枃鍦板潃
- // public String EnglishAddressEncrypted;// 鑻辨枃鍦板潃瀵嗘枃
- //delete by sushanhu 鍜屽鎴锋矡閫� 鍚庢湡 涓嶈祴鍊艰繖涓瓧娈� end 20220411
- public String DataId; //aws瀛樺偍鍑嵁
- // add for pi sushanhu 20220309 end
}
// 閿�鍞汉灞傜骇
@@ -205,6 +186,7 @@
// 鍙栧緱鎺ュ彛浼犺緭鍐呭
String strData = RestContext.request.requestBody.toString();
GeDatas ges = (GeDatas) JSON.deserializeStrict(strData, GeDatas.class);
+
if (ges == null) {
return;
}
@@ -222,23 +204,8 @@
RestResponse res = RestContext.response;
res.addHeader('Content-Type', 'application/json');
res.statusCode = 200;
- // 娣诲姞aws涓婄嚎寮�鍏� by sushanhu 20220422
- Boolean piOn =AWSServiceTool.getAWSServiceStatus();
- // test
- // piOn =false;
- if (piOn) {
- //update response to aws 20220311 sushanhu for pipl start
- // result.SFStatus=SFStatus;
- // result.SFMessage=SFMessage;
- // String jsonResponse =JSON.serialize(result);
- // system.debug('result---'+jsonResponse);
- String jsonResponse = '{"staticResponse":{"status":"0","Message":""},"SFStatus":true,"SFMessage":""}' ;
- res.responseBody = blob.valueOf(jsonResponse);
- //update response to aws 20220311 sushanhu for pipl end
- }else {
- String jsonResponse = '{"status": "0", "Message":""}';
- res.responseBody = blob.valueOf(jsonResponse);
- }
+ String jsonResponse = '{"status": "0", "Message":""}';
+ res.responseBody = blob.valueOf(jsonResponse);
return;
}
@@ -1120,41 +1087,16 @@
con.PostcodeD__c = consigneeInfo.PostalCode;
con.Address1__c = gda.BPType == '22' ? gda.RegisterAddress : consigneeInfo.ContactAddress;
con.Address1D__c = gda.BPType == '22' ? gda.RegisterAddress : consigneeInfo.ContactAddress;
- //update to aws pi start 20220309 sushanhu
- // con.EnglishAddress__c = gda.BPType == '22' ? gda.STR_SUPPL1 : '';
- //鍒ゆ柇鍦╝ws鎵ц
- con.Address1_Encrypted__c = gda.BPType == '22' ? gda.RegisterAddressEncrypted : consigneeInfo.ContactAddressEncrypted;
- con.Address1D_Encrypted__c = gda.BPType == '22' ? gda.RegisterAddressEncrypted : consigneeInfo.ContactAddressEncrypted;
- con.Postcode_Encrypted__c = consigneeInfo.PostalCodeEncrypted;
- con.PostcodeD_Encrypted__c = consigneeInfo.PostalCodeEncrypted;
- //delete by sushanhu 鍜屽鎴锋矡閫� 鍚庢湡 涓嶈祴鍊艰繖涓瓧娈� satrt 20220411
- // con.EnglishAddress__c = gda.BPType == '22' ? consigneeInfo.EnglishAddress : '';
- // con.EnglishAddress_Encrypted__c=gda.BPType == '22' ?consigneeInfo.EnglishAddressEncrypted : '';
- //delete by sushanhu 鍜屽鎴锋矡閫� 鍚庢湡 涓嶈祴鍊艰繖涓瓧娈� end 20220411
- //update to aws pi start 20220309 sushanhu end
+ con.EnglishAddress__c = gda.BPType == '22' ? gda.STR_SUPPL1 : '';
if (String.isNotBlank(consigneeInfo.ContactEnglishName) && gda.BPType == '22') {
- //update for pipl 鍜屽鎴锋矡閫� 瀵嗘枃鏄剧ず浣嶆暟涓嶅彉 20220411 start
- // con.LastName = consigneeInfo.ContactName + '(' + consigneeInfo.ContactEnglishName + ')';
- con.LastName = consigneeInfo.ContactName ;
- //update for pipl 鍜屽鎴锋矡閫� 瀵嗘枃鏄剧ず浣嶆暟涓嶅彉 20220411 end
-
+ con.LastName = consigneeInfo.ContactName + '(' + consigneeInfo.ContactEnglishName + ')';
con.FirstName = null;
- con.FirstName_Encrypted__c =null; ////add for pipl susahnhu 20220311
con.ContactEnglishName__c = consigneeInfo.ContactEnglishName;
- con.ContactEnglishName_Encrypted__c= consigneeInfo.ContactEnglishNameEncrypted;//add for pipl susahnhu 20220311
} else {
con.LastName = consigneeInfo.ContactName;
con.FirstName = null;
- con.FirstName_Encrypted__c =null; ////add for pipl susahnhu 20220311
}
- //add for pipl susahnhu 20220311 start
- con.LastName_Encrypted__c = consigneeInfo.ContactNameEncrypted;
- con.AWS_Data_Id__c = consigneeInfo.DataId;// AWS 瀛樺偍鍑嵁 add for pipl susahnhu 20220311
- con.MobilePhone_Encrypted__c = consigneeInfo.ContactPhoneEncrypted;
- con.MobilePhoneD_Encrypted__c = consigneeInfo.ContactPhoneEncrypted;
- con.Phone_Encrypted__c = consigneeInfo.ContactPhoneEncrypted;
- con.PhoneD_Encrypted__c = consigneeInfo.ContactPhoneEncrypted;
- //add for pipl susahnhu 20220311 end
+
con.ContactStatus__c = 'Active';
con.ContactStatusD__c = 'Active';
con.StatusD__c = 'Pass';
@@ -1445,10 +1387,7 @@
}
// 灏嗕唬鐞嗗晢鐨勫悎浣滀紮浼村鎴疯缃负鍋�
accountInfo.Dealer_Type__c = NFMUtil.getMapValue(transferMap, 'Dealer_Type__c', gda.AgentType, iflog);
- //accountInfo.EnglishAddress__c = gda.RegisterAddress;
- //update to oher1 add by sushanhu 20220422 start
- accountInfo.EnglishAddress__c = gda.other1;
- //update to oher1 add by sushanhu 20220422 end
+ accountInfo.EnglishAddress__c = gda.RegisterAddress;
} else if (gda.BPType == '22') {
accountInfo.RecordTypeId = '01228000000TF3Q'; //澶栬锤鍏徃
accountInfo.Name = gda.CompanyName;
@@ -1540,12 +1479,8 @@
accountInfo.EnglishNameD__c = gda.CompanyEnglishName;
accountInfo.City__c = gda.City;
accountInfo.CityD__c = gda.City;
- //update to oher1 add by sushanhu 20220422 start
- // accountInfo.Address1__c = gda.RegisterAddress;
- // accountInfo.Address1D__c = gda.RegisterAddress;
- accountInfo.Address1__c = gda.other1;
- accountInfo.Address1D__c = gda.other1;
- //update to oher1 add by sushanhu 20220422 end
+ accountInfo.Address1__c = gda.RegisterAddress;
+ accountInfo.Address1D__c = gda.RegisterAddress;
accountInfo.Phone = gda.Phone;
accountInfo.PhoneD__c = gda.Phone;
accountInfo.Fax = gda.Fax;
diff --git a/force-app/main/default/classes/SBG203RestTest.cls b/force-app/main/default/classes/SBG203RestTest.cls
index 9b4bb28..5d396de 100644
--- a/force-app/main/default/classes/SBG203RestTest.cls
+++ b/force-app/main/default/classes/SBG203RestTest.cls
@@ -13,11 +13,6 @@
public static Dealer_Discount__c dealerDiscount3;
@testSetup
static void inittransfersData() {
- //add sushanhu for pipl 20220415
- //'SBG203'
- TestDataUtility.CreatePIPolicyConfiguration();
-
- //add sushanhu for pipl 20220415
NFMUtil.EscapeSBG001TriggerHandler = true;
List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Dealer'];
Account acc0 = new Account(
diff --git a/force-app/main/default/classes/SWOController.cls b/force-app/main/default/classes/SWOController.cls
index 6164b52..5c6dbe2 100644
--- a/force-app/main/default/classes/SWOController.cls
+++ b/force-app/main/default/classes/SWOController.cls
@@ -17,7 +17,7 @@
public List<RepairPart__c> rpList {get; set;}
- public List<FileAddress__c> attachmentList {get; set;}
+ public List<Attachment> attachmentList {get; set;}
public List<diagnosisInfo> diagnosisList {get; set;}
@@ -32,32 +32,21 @@
public RepairPart__c repairPart{get;set;}
private String SwoStatus;
- public String staticResource { get; private set; }// 20220313 PI鏀归�� by Chen Yanan
- public String contactstaticResource { get; private set; }// 20220313 PI鏀归�� by Chen Yanan
- public String contactAWSDataId { get; private set; }// 20220313 PI鏀归�� by Chen Yanan
- public String contactName { get; private set; }// 20220422 PI鏀归�� by zhj
- public String swoawsDataId{set;get;}// 20220313 PI鏀归�� by Chen Yanan
- public Boolean isNew { get; set; }// 20220313 PI鏀归�� by Chen Yanan
- public String frontCaseId { get; set; }// 20220422 PI鏀归�� by zhj
- public String frontSwoId { get; set; }// 20220424 PI鏀归�� by zhj
//ASSIGNEDTO__c
public SWOController() {
}
public SWOController(ApexPages.StandardController stdController) {
- isNew = true;
swoid = System.currentPageReference().getParameters().get('id');
caseId = System.currentPageReference().getParameters().get('caseId');
accId = System.currentPageReference().getParameters().get('accId');
conId = System.currentPageReference().getParameters().get('conId');
type = System.currentPageReference().getParameters().get('type');
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('SWO__c'));// 20220313 PI鏀归�� by Chen Yanan
- contactstaticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));// 20220313 PI鏀归�� by Chen Yanan
+ System.debug(caseId);
}
public void init() {
-
lineCount = 0;
//鑾峰彇鍒濆URL
baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
@@ -77,16 +66,12 @@
User_FaultInfo__c ca = new User_FaultInfo__c();
List<SWO__c> temp = new List<SWO__c>();
if (caseId != null) {
- // ca = [select id, NUMBER__c,COMPANY__c,CONTACT__c,SUBJECT__c from User_FaultInfo__c where id = : caseId];
- ca = [select id, NUMBER__c,COMPANY__c,CONTACT__c,SUBJECT__c, CONTACT__r.AWS_Data_Id__c, CONTACT__r.Name, CONTACT__r.Email from User_FaultInfo__c where id = : caseId];// 20220313 PI鏀归�� by Chen Yanan
+ ca = [select id, NUMBER__c,COMPANY__c,CONTACT__c,SUBJECT__c from User_FaultInfo__c where id = : caseId];
temp = [select id from SWO__c where CASE_NUMBER__c = :caseId];
- contactAWSDataId = String.isNotBlank(ca.CONTACT__r.AWS_Data_Id__c)?ca.CONTACT__r.AWS_Data_Id__c:'';
- contactName = String.isNotBlank(ca.CONTACT__r.Name)?ca.CONTACT__r.Name:'';
}
System.debug('ca' + ca.NUMBER__c);
System.debug('temp' + temp.size());
if (swoid != null) {
- isNew = false;// 20220313 PI鏀归�� by Chen Yanan
//鍒濆鍖朣WO
Schema.DescribeSobjectResult d_swo = SWO__c.sObjectType.getDescribe();
Map<String, Schema.SObjectField> d_swo_map = d_swo.fields.getMap();
@@ -98,24 +83,19 @@
}
fields_odr += field;
}
- // soql_swo += fields_odr;
- soql_swo += fields_odr + ', CONTACT__r.AWS_Data_Id__c, CONTACT__r.Name, CONTACT__r.Email ';// 20220313 PI鏀归�� by Chen Yanan
+ soql_swo += fields_odr;
soql_swo += ' from SWO__c where Id = \'' + swoid + '\'';
- System.debug('soql_swo: ' + soql_swo);// 20220313 PI鏀归�� by Chen Yanan
List<SWO__c> swoList = Database.query(soql_swo);
- System.debug('swoList: ' + swoList);// 20220313 PI鏀归�� by Chen Yanan
if (swoList.size() > 0) {
swo = swoList[0];
- swoawsDataId = swo.AWS_Data_Id__c;// 20220313 PI鏀归�� by Chen Yanan
- // contactAWSDataId = String.isNotBlank(swo.CONTACT__r.AWS_Data_Id__c)?swo.CONTACT__r.AWS_Data_Id__c:'';// 20220313 PI鏀归�� by Chen Yanan
}
//鍒濆鍖栬褰昐WO 鍘熷ASSIGNED TO锛屼繚瀛樻椂鍒ゆ柇鐢ㄦ埛鏄惁鍙樻洿锛屽鏋滃彉鏇寸粰鐢ㄦ埛鍙戦�侀偖浠�
assignedUser = swo.ASSIGNEDTO__c;
//鍒濆鍖朚ail Merge
List<String> mailIdList = new List<String>();
- List<FileAddress__c> attList = new List<FileAddress__c>();
- Map<String, List<FileAddress__c>> attMap = new Map<String, List<FileAddress__c>>();
+ List<Attachment> attList = new List<Attachment>();
+ Map<String, List<Attachment>> attMap = new Map<String, List<Attachment>>();
Map<String, Mail_Merge__c> mailMap = new Map<String, Mail_Merge__c>([select id, FROM__c, ccName__c, SUBJECT__c, MESSAGE__c, DATE__c, toName__c, EMAIL_SENT__c from Mail_Merge__c where SWO__c = :swoid order by id]);
//mailMap = [select id,FROM__c,ccName__c,SUBJECT__c,MESSAGE__c from Mail_Merge__c where SWO__c = :id order by id];
@@ -123,15 +103,15 @@
if (mailMap != null) {
mailIdList.addAll(mailMap.keySet());
- attList = [select id, Name, ParentRecordId__c,FileName__c from FileAddress__c where ParentRecordId__c in :mailIdList order by ParentRecordId__c, id];
+ attList = [select id, Name, ParentId from Attachment where ParentId in :mailIdList order by ParentId, id];
if (attList.size() > 0) {
- for (FileAddress__c att : attList) {
- if (attMap.containsKey(att.ParentRecordId__c)) {
- attMap.get(att.ParentRecordId__c).add(att);
+ for (Attachment att : attList) {
+ if (attMap.containsKey(att.ParentId)) {
+ attMap.get(att.ParentId).add(att);
} else {
- List<FileAddress__c> a = new List<FileAddress__c>();
+ List<Attachment> a = new List<Attachment>();
a.add(att);
- attMap.put(att.ParentRecordId__c, a);
+ attMap.put(att.ParentId, a);
}
}
}
@@ -157,7 +137,7 @@
rpList = [select Id, Name, Product__c, DescriptionNew__c, PART_NUMBERNew__c, INST_SERIAL__c, QUANTITY__c, DEFECT_PART_NUMBER__c, DEFECT_SERIAL_NUMBER__c, ANI_DEFECT_CATEGORY__c, HOURS__c, LOCATION__c, BILL_AT_0_VALUE__c, ECN__c, QTY_PICKED__c,
Product__r.Description,Product__r.Product_ECCode__c,Product__r.ProductCode from RepairPart__c where SWO_ID__c = :swoid order by Id];
//鍒濆鍖栭檮浠�
- attachmentList = [select Id, Name, CreatedDate,FileName__c from FileAddress__c where ParentRecordId__c = :swoid];
+ attachmentList = [select Id, Name, CreatedDate, BodyLength from Attachment where ParentId = :swoid];
//鍒濆鍖杁iagnosis
List<Diagnosis_Part__c> diList = new List<Diagnosis_Part__c>();
@@ -188,7 +168,6 @@
swo.CONTACT__c = conId;
}
swo.SWO_STATUS__c = 'Not Started';
- System.debug('SWO: ' + swo);
}
SwoStatus = swo.SWO_STATUS__c;
}
@@ -200,7 +179,7 @@
public PageReference save() {
System.debug('save');
//errorMessage = '';
- System.debug('mustData() = ' + mustData());
+
//褰揝WO Status 鏀瑰彉涓篞uotation for approval鏃�,姝ゆ椂闂寸偣鑷姩鎶撳彇濉厖姝ゅ锛�
if(mustData() == false){
return null;
@@ -287,16 +266,10 @@
// SWOSTATUS_Closed_AddAttachment();//SWOSTATUS_Closed_AddAttachment
// }
}
- System.debug('swo save:' + swo); // Update By Yanan
if (swoid == null) {
- System.debug('frontCaseId = ' + frontCaseId);
- if(frontCaseId != null){
- swo.CASE_NUMBER__c = frontCaseId;
- }
+ swo.CASE_NUMBER__c = caseId;
insert swo;
- System.debug('swo.id = ' + swo.id);
swoid = swo.id;
- frontSwoId = swo.id;
//ASSIGNED TO 瀛楁鍙樻洿锛岀粰鍙樻洿鍚庣殑鐢ㄦ埛鍙戦偖浠�
/*if(swo.ASSIGNEDTO__c!=null && swo.ASSIGNEDTO__c!=assignedUser){
assignedUser = swo.ASSIGNEDTO__c;
@@ -344,12 +317,9 @@
// }
// if(insertList.size() > 0 ) insert insertList;
- //zhj 2020-04-24 鍓嶇杩涜璺宠浆闇�瑕佽繘琛岀‘璁や簨鍔� start
- // PageReference ref = new Pagereference('/apex/SWOPageRead?id=' + swo.Id +'&type='+type);
- // ref.setRedirect(true);
- // return ref;
- return null;
- //zhj 2020-04-24 鍓嶇杩涜璺宠浆闇�瑕佽繘琛岀‘璁や簨鍔� end
+ PageReference ref = new Pagereference('/apex/SWOPageRead?id=' + swo.Id +'&type='+type);
+ ref.setRedirect(true);
+ return ref;
}
/**
*鏁版嵁楠岃瘉
@@ -625,16 +595,16 @@
public class EmailInfo {
public Mail_Merge__c mm {get; set; }
- public List<FileAddress__c> attList {get; set; }
+ public List<Attachment> attList {get; set; }
public String haveAtt {get; set;}
public EmailInfo() {
}
- public EmailInfo(Mail_Merge__c mm_in, List<FileAddress__c> attList_in) {
+ public EmailInfo(Mail_Merge__c mm_in, List<Attachment> attList_in) {
mm = mm_in;
if (attList_in == null || attList_in.size() == 0) {
haveAtt = 'No';
- attList = new List<FileAddress__c>();
+ attList = new List<Attachment>();
} else {
attList = attList_in;
haveAtt = 'Yes';
diff --git a/force-app/main/default/classes/SWOControllerTest.cls b/force-app/main/default/classes/SWOControllerTest.cls
index 4268076..53a5778 100644
--- a/force-app/main/default/classes/SWOControllerTest.cls
+++ b/force-app/main/default/classes/SWOControllerTest.cls
@@ -2,11 +2,6 @@
private class SWOControllerTest {
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'SWO__c','Contact'});
- }
-
public static User UserD(){
User user2 = new User();
user2.LastName = 'test2';
@@ -224,7 +219,6 @@
);
insert att;
- Test.startTest();
PageReference page = new PageReference('apex/SWOPage?id='+swo.Id +'&type=Product');
System.Test.setCurrentPage(page);
SWOController controller = new SWOController(new ApexPages.StandardController(swo));
@@ -291,7 +285,7 @@
controller.addDiagnosisInfo();
controller.openPageSave();
controller.repairReturn();
- Test.stopTest();
+
}
diff --git a/force-app/main/default/classes/SWOTriggerHandler.cls b/force-app/main/default/classes/SWOTriggerHandler.cls
index fa9d805..9a5e1a5 100644
--- a/force-app/main/default/classes/SWOTriggerHandler.cls
+++ b/force-app/main/default/classes/SWOTriggerHandler.cls
@@ -95,7 +95,7 @@
//娴嬭瘯鐜
//message += ('https://ssbg--ssbgtest.my.salesforce.com/apex/SWOPageRead?id='+swo.Id);
//姝e紡鐜閾炬帴鍦板潃 https://ssbg--c.ap6.visual.force.com/apex/SWOPageRead?id=a0r0K00006aylRy&sfdc.override=1
- message += ('https://ssbg--ssbgtest.my.salesforce.com/apex/SWOPageRead?id='+swo.Id);
+ message += ('https://ssbg.my.salesforce.com/apex/SWOPageRead?id='+swo.Id);
List<String> ccAddresses = new List<String>();
List<String> toAddresses = new List<String>();
Messaging.SingleEmailMessage sendMail = new Messaging.SingleEmailMessage();
diff --git a/force-app/main/default/classes/SearchMemberPageController.cls b/force-app/main/default/classes/SearchMemberPageController.cls
index b87945a..b3a6f71 100644
--- a/force-app/main/default/classes/SearchMemberPageController.cls
+++ b/force-app/main/default/classes/SearchMemberPageController.cls
@@ -2,21 +2,16 @@
//椤甸潰杈撳叆妫�绱㈡潯浠�
public String searchByName{get;set;}
public String searchByAccount{get;set;}
- public string searchByAWSDataIds{get;set;}// 20220221 PI鏀归�� by Bright
public String memberType{get;set;}
public List<LineMember> lineList{get;set;}
public Integer lineNum{get;set;}
public String memberId{get;set;}
public String memberName{get;set;}
public String memberEmail{get;set;}
- public String aws_data_id{get;set;}// 20220221 PI鏀归�� by Bright
-
public Boolean isError{get;set;}
- public String staticResource{get; private set; }// 20220221 PI鏀归�� by Bright
public SearchMemberPageController() {
lineNum = Integer.valueOf(System.currentPageReference().getParameters().get('lineNum'));
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));// 20220221 PI鏀归�� by Bright
}
public void init(){
lineList = new List<LineMember>();
@@ -29,23 +24,15 @@
String soql = '';
if(memberType == 'Contact'){
- soql = 'select Id,Name,Email,Account.Name,AWS_Data_Id__c from Contact where Id!=null ';
+ soql = 'select Id,Name,Email,Account.Name from Contact where Id!=null ';
- // 20220221 PI鏀归�� by Bright
- // if(String.isNotBlank(searchByName)){
- // soql += 'and Name like \'%'+searchByName.trim()+'%\' ';
- // }
+ if(String.isNotBlank(searchByName)){
+ soql += 'and Name like \'%'+searchByName.trim()+'%\' ';
+ }
if(String.isNotBlank(searchByAccount)){
soql += 'and Account.Name like \'%'+searchByAccount.trim()+'%\' ';
}
-
- // 20220221 PI鏀归�� by Bright
- if (!String.isBlank(searchByAWSDataIds)) {
- soql += 'and AWS_Data_Id__c in ' + SoqlHelper.ToInCondition(searchByAWSDataIds.split(','));
- }
-
- soql += ' limit 200';
- System.debug('sql='+soql);
+ soql += 'limit 200';
List<Contact> conList = Database.query(soql);
if(conList!=null&&conList.size()!=0){
for(Contact con : conList){
@@ -55,7 +42,6 @@
line.name = con.Name;
line.email = con.Email;
line.account = con.Account.Name;
- line.aws_data_id = con.AWS_Data_Id__c;
lineList.add(line);
}
}
@@ -92,7 +78,6 @@
memberId = line.Id;
memberName = line.name;
memberEmail = line.email;
- aws_data_id = line.aws_data_id;
System.debug(line.email);
i++;
}
@@ -125,7 +110,5 @@
public String name{get;set;}
public String email{get;set;}
public String account{get;set;}
- public String aws_data_id{get;set;}
-
}
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/SearchMemberPageControllerTest.cls b/force-app/main/default/classes/SearchMemberPageControllerTest.cls
index 30a3db8..d6a2289 100644
--- a/force-app/main/default/classes/SearchMemberPageControllerTest.cls
+++ b/force-app/main/default/classes/SearchMemberPageControllerTest.cls
@@ -1,11 +1,5 @@
@isTest
private class SearchMemberPageControllerTest {
-
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Contact'});
- }
-
static testMethod void testMethod1() {
List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE'];
diff --git a/force-app/main/default/classes/SendEmailController.cls b/force-app/main/default/classes/SendEmailController.cls
index 822b3bf..7025254 100644
--- a/force-app/main/default/classes/SendEmailController.cls
+++ b/force-app/main/default/classes/SendEmailController.cls
@@ -1,4 +1,4 @@
-public without sharing class SendEmailController{
+public without sharing class SendEmailController {
public Mail_Merge__c mail{get; set;}
@@ -23,7 +23,6 @@
public Attachment attachment{get;set;}
public List<Attachment> attachmentList{get;set;}
- public List<FileAddress__c> newAttachmentList{get;set;}
//SWO_Email_Member__c 杩欎釜瀵硅薄鍙槸涓轰簡鐢熸垚椤甸潰涓婄殑浜哄憳鏄庣粏琛�
// public List<SWO_Email_Member__c> lineDataList_new{get;set;}
@@ -46,28 +45,18 @@
public List<String> ccAddresses ;
public List<String> bccAddresses ;
- public String AWSDataId{get;set;}
- public String staticResourceMail{get;set;}
- public String staticResourceMailMerge{get;set;}
- public String staticResourceDocument{get;set;}
public SendEmailController() {
id = System.currentPageReference().getParameters().get('id');
type = System.currentPageReference().getParameters().get('type');
typeid = System.currentPageReference().getParameters().get('typeid');
openType = System.currentPageReference().getParameters().get('openType');
- staticResourceMail = JSON.serialize(PIHelper.getPIIntegrationInfo('Mail'));
- staticResourceMailMerge = JSON.serialize(PIHelper.getPIIntegrationInfo('Mail_Merge__c'));
- staticResourceDocument = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));
}
- public SendEmailController(ApexPages.StandardController controller) {
- // 20220318 PI 鏀归�� By Bright start
- // id = System.currentPageReference().getParameters().get('id');
- // type = System.currentPageReference().getParameters().get('type');
- // typeid = System.currentPageReference().getParameters().get('typeid');
- // openType = System.currentPageReference().getParameters().get('openType');
- this();
- // 20220318 PI 鏀归�� By Bright end
+ public SendEmailController(ApexPages.StandardController stdController) {
+ id = System.currentPageReference().getParameters().get('id');
+ type = System.currentPageReference().getParameters().get('type');
+ typeid = System.currentPageReference().getParameters().get('typeid');
+ openType = System.currentPageReference().getParameters().get('openType');
}
public void init(){
@@ -86,23 +75,6 @@
mail.RECORD__c = typeid;
mail.RECORD_TYPE__c = type;
memberLineDatas = new List<MemberLine>();
-
- if (!string.isBlank(typeid)) {
- Id rid = typeid;
- String sobjname = 'User_FaultInfo__c';
- sobjname = rid.getSobjectType().getDescribe().getName();
- List<sobject> lso = Database.query('select id,name from '+sobjname+' where id = :rid');
- System.debug('lso='+lso);
- if (lso.size()>0) {
- name = sobjname.replace('__c','')+':'+lso[0].get('Name');
- if (sobjname == 'User_FaultInfo__c') {
- name = 'Case:'+lso[0].get('Name');
- }
- }
- System.debug('name='+name);
- }
-
-
if(id == null){
isOnClick = false;
mail.FROM__c = UserInfo.getUserEmail();
@@ -123,12 +95,7 @@
}
}
}else{
-
-
- mail = [select id,send__c,MESSAGE__c,SUBJECT__c,TYPE__c,FROM__c,DATE__c,RECIPIENT__c,CC__c,BCC__c,RECORD__c,RECORD_TYPE__c,toName__c,ccName__c,bccName__c,ALL_MEMBER__c,ALL_MEMBER_NAME__c,ALL_MEMBER_TYPE__c,EMAIL_SENT__c,SWO__c,CaseF__c,Quotes__c,
- AWS_Data_Id__c // 20220222 PI鏀归�� by Brigh
- from Mail_Merge__c where id =:id];
- AWSDataId=mail.AWS_Data_Id__c;
+ mail = [select id,send__c,MESSAGE__c,SUBJECT__c,TYPE__c,FROM__c,DATE__c,RECIPIENT__c,CC__c,BCC__c,RECORD__c,RECORD_TYPE__c,toName__c,ccName__c,bccName__c,ALL_MEMBER__c,ALL_MEMBER_NAME__c,ALL_MEMBER_TYPE__c,EMAIL_SENT__c,SWO__c,CaseF__c,Quotes__c from Mail_Merge__c where id =:id];
//mail.TYPE__c == 'reply' 閭欢涓哄洖澶嶉偖浠� 鎴栬�呮槸绯荤粺鑷姩鍙戦�佺殑閭欢
//EMAIL_SENT__c =='YES' 閭欢宸插彂閫�
if(mail.TYPE__c == 'reply' || mail.EMAIL_SENT__c =='YES'){
@@ -180,7 +147,7 @@
replyEmailHead = '\n\n\n\n';
replyEmailHead += '-------------閭欢鍘熶欢--------------\n';
replyEmailHead += '鍙戜欢浜猴細' + mail.FROM__c + ';\n';
- replyEmailHead += '鍙戜欢鏃堕棿锛�' + (mail.DATE__c==null?Datetime.now():mail.DATE__c.addHours(8)) + ';\n';
+ replyEmailHead += '鍙戜欢鏃堕棿锛�' + mail.DATE__c.addHours(8) + ';\n';
replyEmailHead += '鏀朵欢浜猴細' + mailToAddressName + '\n';
replyEmailHead += '鎶勯�侊細' + mailCcAdressName + '\n';
replyEmailHead += '涓婚锛�' + mail.SUBJECT__c + ';\n\n';
@@ -228,7 +195,6 @@
addLine();
}
attachmentList = [select Id,Name,CreatedDate,BodyLength,Body from Attachment where ParentId=:id];
- newAttachmentList = [select Id,CreatedDate,Name,ViewLink__c,AWS_File_Key__c,FileName__c from FileAddress__c where ParentRecordId__c=:id];
/*if(String.isNotBlank(openType) && openType == 'Reply'){
attachmentList.clear();
}*/
@@ -406,7 +372,6 @@
}
}
mail.EMAIL_SENT__c = 'YES';
- System.debug('mail='+mail);
upsert mail;
// 杩斿洖鐐瑰嚮閭欢椤甸潰
PageReference ref = new Pagereference('/'+mail.RECORD__c+'?type=mail');
@@ -423,7 +388,6 @@
}
public void save() {
- System.debug('handleType='+handleType);
toAddresses = new List<String>();
ccAddresses = new List<String>();
bccAddresses = new List<String>();
diff --git a/force-app/main/default/classes/SendEmailControllerTest.cls b/force-app/main/default/classes/SendEmailControllerTest.cls
index 34be45f..524bc5d 100644
--- a/force-app/main/default/classes/SendEmailControllerTest.cls
+++ b/force-app/main/default/classes/SendEmailControllerTest.cls
@@ -1,11 +1,5 @@
@isTest
private class SendEmailControllerTest {
-
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Mail','Mail_Merge__c','Document'});
- }
-
static testMethod void Add() {
User_FaultInfo__c ca = new User_FaultInfo__c();
diff --git a/force-app/main/default/classes/SoapApi.cls b/force-app/main/default/classes/SoapApi.cls
index 1846deb..33f86ca 100644
--- a/force-app/main/default/classes/SoapApi.cls
+++ b/force-app/main/default/classes/SoapApi.cls
@@ -11,7 +11,6 @@
domainInstanceMap.put('9', 'ap1');
domainInstanceMap.put('O', 'cs5');
domainInstanceMap.put('N', 'cs6');
- domainInstanceMap.put('0', 'cs112');
soap = new PartnerSoapSforceCom.Soap();
soap.SessionHeader = new PartnerSoapSforceCom.SessionHeader_element();
// This is important, give session id, to let the call work.
diff --git a/force-app/main/default/classes/StaticParameter.cls b/force-app/main/default/classes/StaticParameter.cls
index a47c6fb..dbec883 100644
--- a/force-app/main/default/classes/StaticParameter.cls
+++ b/force-app/main/default/classes/StaticParameter.cls
@@ -242,8 +242,12 @@
'0010K00002W6zlh' => '00G0K000004AYjU',//鎴愰兘鐩涢敶绉戞妧鏈夐檺鍏徃(NDT)
'0010K00002ZVOwt' => '00G0K000004c0oG',//澶╂触瀹忓熀浼熶笟绉戞妧鍙戝睍鏈夐檺鍏徃(NDT)
'0010K00002b6v6W' => '00G0K000004c4xH',//鎴愰兘涓诲绉戞妧鏈夐檺璐d换鍏徃(NDT)
- /*'0010T00000LO3ph' => '00G0T0000029vfq'//鍖椾含娣辨櫙閲忓厜绉戞妧鏈夐檺鍏徃(BS)*/
- /*'0010T00000M9sbG' => '00G0T000002LFkO'//鍗椾含寰槸鐢熺墿绉戞妧鏈夐檺鍏徃(BS)*/
+ '0010K00002dVNy1' => '00G0K0000059xxY',//鍖椾含娣辨櫙閲忓厜绉戞妧鏈夐檺鍏徃(BS)
+ '0010K00002dVNy2' => '00G0K0000059xxY',
+ '0010K00002dVNy3' => '00G0K0000059xxY',
+ '0010K00002ertQz' => '00G0K0000059xxd',//鍗椾含寰槸鐢熺墿绉戞妧鏈夐檺鍏徃(BS)
+ '0010K00002ertR0' => '00G0K0000059xxd',
+ '0010K00002ertR1' => '00G0K0000059xxd',
'0010K00002dmXEJ' => '00G0K0000059tJo'//鍖椾含涓诲绉戞妧鏈夐檺璐d换鍏徃(NDT)
};
diff --git a/force-app/main/default/classes/TSRepairController.cls b/force-app/main/default/classes/TSRepairController.cls
index 6095f10..89300ae 100644
--- a/force-app/main/default/classes/TSRepairController.cls
+++ b/force-app/main/default/classes/TSRepairController.cls
@@ -6,7 +6,6 @@
public String repairId {get; set;}
public TS_Repair__c tsr {get; set;}
-
public String datestr;
public Integer num {get; set{ num = value;}} //娣诲姞浜у搧鏃朵娇鐢�
@@ -23,7 +22,6 @@
//椤甸潰鏄剧ず鍐呭
public List<RepairInfo> RepairInfoList {get; set;}
- public String RepairInfoListStr {get{return JSON.serialize(RepairInfoList);} set;}
public String temp {get; set;}
// Label
@@ -46,9 +44,6 @@
public Map<String, List<BusinessActivity__c>> businessActivityListToMap;
-
-
-
// 鐜嬮箯浼熷畾涔夊彉閲忓紑濮�
// 鍓嶅彴鐐瑰嚮鎸夐挳淇敼鐘舵��
public String status {get; set;}
@@ -56,14 +51,6 @@
//onclickType=0鏃跺彧鑳界偣鍑昏崏妗堬紝鐢宠锛沷nclickType=1鏃跺彧鑳界偣鍑婚┏鍥烇紝鎵瑰噯
public String onclickType {get; set;} //onclickType=0鏃�
// 鐜嬮箯浼熷畾涔夊彉閲忕粨鏉�
-
-
- // Add by zhj for PIPL 20220309 Start
- public String contactId{set;get;}//For Lookup field
- public String staticResourceContact {get; set;}
- public String contactNameValue{set;get;}
- public String contactIdValue{set;get;}
- // Add by zhj for PIPL 20220309 End
public TSRepairController() {
baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
@@ -88,7 +75,6 @@
datestr = System.currentPageReference().getParameters().get('date');
}
-
public PageReference init() {
errorMessageMap = new Map<String, List<String>>();
@@ -148,8 +134,7 @@
}
}
- //contact淇℃伅锛堟悳绱㈡煡璇uery url鐢級
- staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));
+
return null;
}
@@ -707,7 +692,6 @@
updateUserFaultInfo.UserFaultInfoNextService__c = ba.BusinessANextService__c ;//涓嬫鏈嶅姟鏃堕棿
updateUserFaultInfo.UFAccount__c = ba.BusinessAAccount__c ;//瀹㈡埛鍗曚綅(鏌ユ壘)
updateUserFaultInfo.UserFaultInfoCustomerUnit__c = ba.BusinessACustomerUnit__c ;//瀹㈡埛鍗曚綅(鏂囨湰)
- if(String.isNotBlank(contactIdValue)&&String.isNotEmpty(contactIdValue)){}
updateUserFaultInfo.UFContact__c = ba.BusinessAContact__c ;//鑱旂郴浜�
updateUserFaultInfo.UFPhone__c = ba.BusinessAPhone_F__c ;//鑱旂郴鐢佃瘽
diff --git a/force-app/main/default/classes/TSRepairControllerTest.cls b/force-app/main/default/classes/TSRepairControllerTest.cls
index bab9220..7e04dd5 100644
--- a/force-app/main/default/classes/TSRepairControllerTest.cls
+++ b/force-app/main/default/classes/TSRepairControllerTest.cls
@@ -18,11 +18,6 @@
public static Account acc1;
public static Account acc2;
-
- @TestSetup
- static void setup(){
- TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Contact'});
- }
static void basicData() {
diff --git a/force-app/main/default/classes/TestDataUtility.cls b/force-app/main/default/classes/TestDataUtility.cls
index fbd5854..42d7265 100644
--- a/force-app/main/default/classes/TestDataUtility.cls
+++ b/force-app/main/default/classes/TestDataUtility.cls
@@ -471,6 +471,7 @@
}
System.debug('con.Id' + con.Id);
System.debug('con list' + con);
+ System.debug('con list' + con.AccountId);
//new Opportunity
Opportunity opp = new Opportunity();
if([SELECT Id,Name FROM Opportunity LIMIT 1].size()>0){
@@ -481,15 +482,17 @@
// opp.StageName = 'Phase3';
// update opp;
//new Order
+ System.debug('opp list' + opp.Id);
List<Order> odList = new List<Order>();
+ List<OpportunityContactRole> oppoRuleList = new List<OpportunityContactRole>();
for(Integer i=0;i<num;i++){
Order od = new Order(
Name = 'TestOrder'+i,
Status = 'Draft',
Status__c = 'Active',
- AccountId = '0060K00000QulEFQAZ',
+ AccountId = con.AccountId,
ApproveStatus__c = 'Draft',
- OpportunityId = '0060K00000QulEFQAZ',
+ OpportunityId = opp.Id,
// ForeignTradeCompany_D__c = con.AccountId,
EffectiveDate = Date.today(),
IE_SP5_D__c = true,
@@ -497,10 +500,19 @@
SpecialDeliveryAccount_D__c = con.AccountId,
SpecialDeliveryContact2_D__c = con.Id,
EndUser__c = con.Id,
- EndUserD__c = '0060K00000QulEFQAZ'
- );
+ EndUserD__c = con.Id,
+ SpecialDeliveryContact2__c = con.Id
+ );
+ OpportunityContactRole oppoRule = new OpportunityContactRole();
+ oppoRule.OpportunityId = od.OpportunityId;
+ System.debug('oppoRule.OpportunityId' + od.OpportunityId);
+ oppoRule.ContactId = od.EndUser__c;
+ oppoRule.Role = 'End user';
+ oppoRule.IsPrimary = true;
+ oppoRuleList.add(oppoRule);
odList.add(od);
}
+ insert oppoRuleList;
insert odList;
return odList;
}
diff --git a/force-app/main/default/classes/UpdateTotalCostPriceSetTextBatch.cls b/force-app/main/default/classes/UpdateTotalCostPriceSetTextBatch.cls
index 8bafc3b..b79bddc 100644
--- a/force-app/main/default/classes/UpdateTotalCostPriceSetTextBatch.cls
+++ b/force-app/main/default/classes/UpdateTotalCostPriceSetTextBatch.cls
@@ -55,16 +55,12 @@
updList.add(orderData);
}else{
//鐜嬮箯浼熸坊鍔爀lse杩斿洖
- //return '璇ュ悎鍚屼笉绗﹀悎鏇存柊鏉′欢锛屼笉闇�瑕佹洿鏂�';
+ return '璇ュ悎鍚屼笉绗﹀悎鏇存柊鏉′欢锛屼笉闇�瑕佹洿鏂�';
}
}
- if (updList.size() > 0){
- update updList;
- return '鏇存柊鎴愬姛';
- }else{
- return '璇ュ悎鍚屼笉绗﹀悎鏇存柊鏉′欢锛屼笉闇�瑕佹洿鏂�';
- }
+ if (updList.size() > 0) update updList;
+ return '鏇存柊鎴愬姛';
}
}
diff --git a/force-app/main/default/classes/calendarUtil.cls b/force-app/main/default/classes/calendarUtil.cls
index d1bafba..9597dbe 100644
--- a/force-app/main/default/classes/calendarUtil.cls
+++ b/force-app/main/default/classes/calendarUtil.cls
@@ -149,7 +149,6 @@
profilList.add(System.label.system_administrator);
profilList.add(System.label.system_administrator2);
profilList.add(System.label.SystemAdmin_GPI_New);
- //profilList.add(System.label.Mark_Not_change);
return profilList;
}
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/loanerAppTriggerHandler.cls b/force-app/main/default/classes/loanerAppTriggerHandler.cls
index c0016a3..983b992 100644
--- a/force-app/main/default/classes/loanerAppTriggerHandler.cls
+++ b/force-app/main/default/classes/loanerAppTriggerHandler.cls
@@ -1,20 +1,11 @@
-/**
- * @description :
- * @author : ChangeMeIn@UserSettingsUnder.SFDoc
- * @group :
- * @last modified on : 04-21-2022
- * @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
-**/
public without sharing class loanerAppTriggerHandler {
/**
* [changeFollowOpp description] 璺熻繘璇环鏀瑰彉鏃朵慨鏀硅窡杩涜浠�(鏂囨湰)
* Date 2020/8/20
*/
public static void changeFollowOpp(List<loaner_application__c> newList, Map<Id, loaner_application__c> newMap, List<loaner_application__c> oldList, Map<Id, loaner_application__c> oldMap){
- // List<loaner_application__c> upList = new List<loaner_application__c>();
- // newList = [select id,Equipment_Type__c,Follow_Opp__c,Follow_Opp_text__c from loaner_application__c where id = 'a0Q0K00000JO2FfUAL'];
+ //List<loaner_application__c> upList = new List<loaner_application__c>();
List<String> idList = new List<String>();
- System.debug('newList'+newList);
for(loaner_application__c la : newList){
loaner_application__c oldla = oldMap.get(la.Id);
if(la.Equipment_Type__c == 'BS' && la.Follow_Opp__c != oldla.Follow_Opp__c && la.Follow_Opp__c != null){
@@ -42,8 +33,6 @@
}
public static void transferBack(List<loaner_application__c> newList, Map<Id, loaner_application__c> newMap, List<loaner_application__c> oldList, Map<Id, loaner_application__c> oldMap){
- System.debug('newList' + newList);
- System.debug('oldList' + oldList);
List<String> idList = new List<String>();
for(loaner_application__c la : newList){
loaner_application__c old = oldMap.get(la.Id);
diff --git a/force-app/main/default/classes/loanerAppTriggerHandlerTest.cls b/force-app/main/default/classes/loanerAppTriggerHandlerTest.cls
index 8ff8ca0..af7b715 100644
--- a/force-app/main/default/classes/loanerAppTriggerHandlerTest.cls
+++ b/force-app/main/default/classes/loanerAppTriggerHandlerTest.cls
@@ -1,10 +1,3 @@
-/**
- * @description :
- * @author : ChangeMeIn@UserSettingsUnder.SFDoc
- * @group :
- * @last modified on : 04-21-2022
- * @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
-**/
@isTest
private class loanerAppTriggerHandlerTest {
@@ -108,14 +101,12 @@
loaner.DEMO_PURPOSE__C = '婕旂ず';
loaner.Request_shipping_Date__c = Date.today().addDays(10);
loaner.Request_return_Date__c = Date.today().addDays(10);
- // loaner.Status__c = '宸叉彁浜�';
- loaner.Status__c = '鐢宠涓�';
+ loaner.Status__c = '宸叉彁浜�';
loaner.Return_Track_Company__c = '鐗╂祦鍏徃';
loaner.Loaner_receive_staff__c = '1';
loaner.direct_shippment_address__c = '1';
loaner.Loaner_receive_staff_phone__c = '1';
loaner.Post_Code__c = '1';
- loaner.Follow_Opp__c = '0060T0000049Tm1QAE';
//loaner.pickup_time__c = Date.today().addDays(3);
//loaner.Return_Trake_Staff__c = '杩斿搧浜�';
insert loaner;
@@ -200,26 +191,7 @@
loaner.Status__c = '鍙栨秷';
update loaner;
-
- loaner.Status__c = '鑽夋涓�';
- loaner.Equipment_Type__c = 'BS';
- loaner.Follow_Opp__c = '0060T000003zTzNQAU';
- update loaner;
-
- loaner.Status__c = '鐢宠涓�';
- update loaner;
-
- loaner.Status__c = '鑽夋涓�';
- loaner.Equipment_Type__c = 'BS';
- loaner.Loaner_LendOrder__c = true;
- update loaner;
-
- loaner.Status__c = '鐢宠涓�';
- loaner.Equipment_Type__c = 'BS';
- loaner.Loaner_LendOrder__c = true;
- update loaner;
-
- System.Test.stopTest();
+System.Test.stopTest();
}
}
\ No newline at end of file
diff --git a/force-app/main/default/pages/ContractFileUploadPage.page b/force-app/main/default/pages/ContractFileUploadPage.page
new file mode 100644
index 0000000..74ae7af
--- /dev/null
+++ b/force-app/main/default/pages/ContractFileUploadPage.page
@@ -0,0 +1,195 @@
+<!-- 璇ラ〉闈㈢敤浜嶭ead瀵硅薄涓婁紶PDF锛屾湭鏉ュ鏋滆娣诲姞鍏朵粬瀵硅薄鐨勪笂浼燩DF鍔熻兘锛屽鍒惰椤甸潰锛屽皢**standardController**淇敼涓哄叾浠栧璞PI鍚嶇О鍗冲彲 -->
+<apex:page standardController="Contract" extensions="FileUploadController" id="page" lightningStyleSheets="true">
+ <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
+ <script>
+ var staticResources = JSON.parse('{!staticResource}');
+ var parentId = '{!parentId}';
+ var uploadUrl = staticResources.newUrl;
+ var key;
+
+ function alertErrorMessage(errorMsg) {
+ let errorMsgNode = document.getElementById("page:theForm:block:msgContent");
+ errorMsgNode.innerText = errorMsg;
+ errorMsgNode.className = 'message errorM3';
+ }
+
+ function hiddenErrorMsgNode() {
+ let errorMsgNode = document.getElementById("page:theForm:block:msgContent");
+ errorMsgNode.innerText = '';
+ errorMsgNode.className = '';
+ }
+ function getFileContent(event) {
+ var fileObject = document.getElementById("page:theForm:block:uploadSection:file");
+ var reader = new FileReader();
+ var data = reader.readAsDataURL(fileObject.files[0]);
+ debugger
+ console.log(event);
+ }
+ function getBase64(file) {
+ return new Promise((resolve, reject) => {
+ const reader = new FileReader();
+ reader.readAsDataURL(file);
+ reader.onload = () => resolve(reader.result);
+ reader.onerror = error => reject(error);
+ });
+ }
+ function disableButtonStatus() {
+ let btnNode = document.getElementById('uploadFileId');
+ btnNode.classList.add("btnDisabled");
+ }
+
+ function enableButtonStatus() {
+ let btnNode = document.getElementById('uploadFileId');
+ btnNode.classList.remove("btnDisabled");
+ }
+
+ function uploadFile() {
+ disableButtonStatus();
+ var fileObject = document.getElementById("file").files[0];
+ getBase64(fileObject).then(
+ data => {
+ console.log(data);
+ uploadFileToAWS(data, (fileObject.size).toString(), fileObject.name);
+
+ }
+ );
+ }
+ function confirmTrans(transId, isSuccess) {
+
+ fetch(staticResources.updateUrl, {
+ method: 'POST',
+ body: JSON.stringify({ 'txId': transId, "isSuccess": isSuccess }),
+ headers: {
+ 'Content-Type': 'application/json',
+ 'pi-token': staticResources.token
+ }
+ }).then((data) => {
+ return data.json();
+ }).then(data => {
+ console.log("confirmTrans-" + JSON.stringify(data));
+ document.getElementById("file").files[0].name = '';
+ enableButtonStatus();
+ refreshFiles();
+ return data.status;
+ })
+
+ }
+ function calculateFileSize(fileObject) {
+ if (fileObject.size > 20971520) {
+ alertErrorMessage('鏂囦欢杩囧ぇ锛岃閫夋嫨灏忎簬20mb鐨勬枃浠�');
+ }
+ }
+ function uploadFileToAWS(data, size, fileName) {
+ console.log("body=" + JSON.stringify({ 'file': data, "size": size, 'fileName': fileName }));
+
+ fetch(uploadUrl, {
+ method: 'POST',
+ body: JSON.stringify({ 'file': data, "size": size, 'fileName': fileName }),
+ headers: {
+ 'Content-Type': 'application/json',
+ 'pi-token': staticResources.token
+ }
+ }).then((data) => {
+ return data.json();
+ }).then(result => {
+
+ console.log("result" + JSON.stringify(result));
+
+ if (result.success == true) {
+ key = result.object;
+
+ Visualforce.remoting.Manager.invokeAction(
+ '{!$RemoteAction.FileUploadController.saveFile}',
+ fileName, key, result.txId, parentId,
+ function (resultvalue, event) {
+
+
+
+ //2. show file list
+ if (resultvalue.status == 'fail') {
+ alertErrorMessage(resultvalue.message);
+ //1. Confirm trans
+ confirmTrans(result.txId, 0);
+ } else {
+ alertErrorMessage('涓婁紶鎴愬姛');
+ confirmTrans(result.txId, 1);
+ }
+
+ // window.location.reload();
+ },
+ { escape: true }
+ );
+
+ console.log('key' + key);
+ } else {
+ alertErrorMessage('涓婁紶澶辫触璇风◢鍚庡啀璇曪紒');
+ }
+ }).catch((error) => {
+ console.error('Error:', error);
+ })
+ debugger
+ }
+ function downPdf(fileUrl) {
+ window.open(fileUrl,'_blank');
+ }
+
+ </script>
+ <style>
+ .pdf .num {
+ width: 30%;
+ }
+
+ .pdf.name {
+ width: 30%
+ }
+
+ .pdf.downLink {
+ width: 40%
+ }
+ </style>
+ <apex:form id="theForm">
+ <apex:actionFunction name="refreshFiles" action="{!refreshFiles}" reRender="pdf,uploadSection"/>
+ <br/>
+ <br/>
+ <apex:pageBlock id="block">
+ <div style="text-align: center;">
+ <apex:outputPanel id="errorMsg">
+ <apex:pageMessages id="msgContent" escape="false" />
+ </apex:outputPanel>
+ </div>
+ <apex:pageBlockSection id="uploadSection">
+ <!-- <apex:inputFile id="file" value="{!documentData.body}" filename="{!documentData.name}" /> -->
+ <input type="file" id="file" name="filename"/>
+ <input class="btn" id='uploadFileId' type="Button" value="纭涓婁紶" onclick="uploadFile()" />
+ </apex:pageBlockSection>
+ </apex:pageBlock>
+ <apex:pageBlock title="PDF鍒楄〃" id="pdf">
+ <!-- <apex:pageBlockSection > -->
+ <!-- show uploated file list -->
+ <apex:pageBlockTable value="{!fileList}" var="file" align="center" columns="3" columnsWidth="30%,30%,40%">
+ <apex:column id="name" headerValue="鏂囦欢鍚嶇О">
+ <apex:outputLink value="/{!file.Id}" target="_blank">{!file.FileName__c}</apex:outputLink>
+ </apex:column>
+ <!-- <apex:column id="num" headerValue="鐖惰褰曢摼鎺�">
+ <apex:outputLink value="/{!file.ParentRecordId__c}" target="_blank">{!file.ParentRecordId__c}</apex:outputLink>
+ </apex:column> -->
+ <apex:column id="previewLink" headerValue="棰勮閾炬帴">
+ <apex:outputLink value="{!file.ViewLink__c}" target="{!file.ViewLink__c}">棰勮閾炬帴
+ </apex:outputLink>
+ </apex:column>
+ <apex:column id="downLink" headerValue="涓嬭浇閾炬帴">
+ <!-- <apex:outputLink value= "{!file.DownloadLink__c}" target="{!file.DownloadLink__c}">涓嬭浇閾炬帴
+ </apex:outputLink> -->
+ <input class="btn" id='downloadFileButton' type="Button" value="涓嬭浇" onclick="downPdf('{!file.DownloadLink__c}')" />
+ </apex:column>
+ </apex:pageBlockTable>
+ <!-- </apex:pageBlockSection> -->
+ </apex:pageBlock>
+ </apex:form>
+ <apex:relatedList list="CombinedAttachments" >
+ </apex:relatedList>
+ <script>
+ const element = document.getElementsByName('attachFile')[0];
+ element.remove();
+ </script>
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/ContractFileUploadPage.page-meta.xml b/force-app/main/default/pages/ContractFileUploadPage.page-meta.xml
new file mode 100644
index 0000000..709e2e3
--- /dev/null
+++ b/force-app/main/default/pages/ContractFileUploadPage.page-meta.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>54.0</apiVersion>
+ <availableInTouch>false</availableInTouch>
+ <confirmationTokenRequired>false</confirmationTokenRequired>
+ <label>ContractFileUploadPage</label>
+</ApexPage>
diff --git a/force-app/main/default/pages/DeliveryConfirmPDF.page b/force-app/main/default/pages/DeliveryConfirmPDF.page
index 55c0e28..b237c18 100644
--- a/force-app/main/default/pages/DeliveryConfirmPDF.page
+++ b/force-app/main/default/pages/DeliveryConfirmPDF.page
@@ -1,37 +1,16 @@
-<apex:page controller="DeliveryConfirmPDFController" showHeader="false" sidebar="false" id="allPage" action="{!init}" > <!-- renderAs="pdf" -->
+<apex:page controller="DeliveryConfirmPDFController" showHeader="false" sidebar="false" id="allPage" action="{!init}" renderAs="pdf"> <!-- renderAs="pdf" -->
<html>
<head>
<style>
@page {
margin: 1mm 1mm 1mm 1mm;
}
-/* 20220221 PI鏀归�� by 寰愪寒 start */
-body{margin: 0 auto;
- width: 780px;}
- #pdf-wrapper{position: relative;}
- #title1{height: 30px;}
- #title2{height: 110px;}
- /* 20220221 PI鏀归�� by 寰愪寒 end */
</style>
- <!-- 20220221 PI鏀归�� by 寰愪寒 start -->
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
- <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
- <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
- <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
-
- <apex:includeScript value="{!URLFOR($Resource.jspdf)}"/>
- <apex:includeScript value="{!URLFOR($Resource.html2canvas)}"/>
-
-
- <!-- 20220221 PI鏀归�� by 寰愪寒 end -->
</head>
<body style="font-family: Arial Unicode MS; page-break-inside: auto;font-size: 10px;">
- <div id="pdf-wrapper">
- <div id="title1"></div>
<apex:image value="{!URLFOR($Resource.pdfSign)}" width="80" style="position:absolute; left:300px; top:100px;"/>
- <p style="text-align: center; display: block;font-size: 25px;">濂ユ灄宸存柉鏍锋満鍊熺敤鍗�</p>
+ <p style="text-align: center; display: block;font-size: 25px;">浠櫙閫氭牱鏈哄�熺敤鍗�</p>
<table style="border: 2px solid black; width: 100%;border-collapse:collapse;" border="solid">
<tr>
<td align="right" width="100px"><apex:outputText value="鐢宠鏃ユ湡锛�" /></td>
@@ -52,7 +31,7 @@
</apex:outputPanel>
<td align="right">鍊熺敤鎷呭綋锛�</td>
- <td><span aws-obj="loaner_application__c" aws-api="loanerSer" aws-id="{!la.AWS_Data_Id__c}">{!la.Loaner_Ser__c}</span></td>
+ <td><apex:outputText value="{!la.Loaner_Ser__c}"/></td>
</tr>
<tr>
<td align="right">鍊熺敤鏃ユ湡锛�</td>
@@ -114,15 +93,15 @@
<tr>
<td align="right" width="90">瀵勯�佸湴鍧�锛�</td>
- <td colspan="3"><span aws-obj="loaner_application__c" aws-api="directShippmentAddress" aws-id="{!la.AWS_Data_Id__c}">{!la.direct_shippment_address__c}</span> </td>
+ <td colspan="3"><apex:outputField value="{!la.direct_shippment_address__c}"/></td>
</tr>
<tr>
<td align="right" width="90">鑱旂郴浜猴細</td>
- <td><span aws-obj="loaner_application__c" aws-api="loanerReceiveStaff" aws-id="{!la.AWS_Data_Id__c}">{!la.Loaner_receive_staff__c}</span></td>
+ <td><apex:outputField value="{!la.Loaner_receive_staff__c}"/></td>
<td align="right" width="90">鑱旂郴鐢佃瘽锛�</td>
- <td width="200"><span aws-obj="loaner_application__c" aws-api="loanerReceiveStaffPhone" aws-id="{!la.AWS_Data_Id__c}">{!la.Loaner_receive_staff_phone__c}</span></td>
+ <td width="200"><apex:outputField value="{!la.Loaner_receive_staff_phone__c}"/></td>
</tr>
@@ -152,17 +131,17 @@
<apex:repeat value="{!luData}" var="luLine" id="lus">
<tr>
<td class="dataCell" style="text-align: center;">
- <apex:outputText styleClass="Customer__r.Name" value="{!luLine.lu.Customer__r.Name}"/>
+ <apex:outputText value="{!luLine.lu.Customer__r.Name}"/>
</td>
<td class="dataCell" style="text-align: center;">
- <apex:outputText styleClass="Customer__r.DivisionName__c" value="{!luLine.lu.Customer__r.DivisionName__c}"/>
+ <apex:outputText value="{!luLine.lu.Customer__r.DivisionName__c}"/>
</td>
<td class="dataCell" style="text-align: center;">
- <span aws-obj="Contact" aws-api="lastName" aws-id="{!la.AWS_Data_Id__c}">{!luLine.lu.Contact__r.Name}</span>
+ <apex:outputText value="{!luLine.lu.Contact__r.Name}"/>
</td>
<apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', true , false)}" layout="none">
<td class="dataCell" style="text-align: center;">
- <span aws-obj="Contact" aws-api="phone" aws-id="{!la.AWS_Data_Id__c}">{!luLine.lu.Contact__r.Phone}</span>
+ <apex:outputText value="{!luLine.lu.Contact__r.Phone}"/>
</td>
</apex:outputPanel>
<apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', false , true)}" layout="none">
@@ -282,155 +261,9 @@
<tr><td>3.濡傚�熺敤涔嬫牱鏈猴紙澶囧搧锛夊湪鍊熺敤鏈熼棿鎹熷潖锛屾垜鏂规湁鏉冭姹傝吹鏂规寜鐩稿簲閲戦璧斿伩鎴栨壙鎷呯淮淇垂鐢ㄣ��</td></tr>
</apex:outputPanel>
<tr><td>4.鍊熷嚭鏍锋満鍦ㄦ湭寰佸緱鎴戞柟鐨勮鍙紝璐垫柟涓嶅緱杞�熺涓夋柟浣跨敤锛屽惁鍒欏皢涓鍊熺敤骞惰拷绌惰矗浠汇��</td></tr>
- <tr><td>5.濂ユ灄宸存柉鏈夋潈鏍规嵁闇�瑕侀殢鏃舵敹鍥炲�熷嚭鐨勬牱鏈恒��</td></tr>
+ <tr><td>5.浠櫙閫氭湁鏉冩牴鎹渶瑕侀殢鏃舵敹鍥炲�熷嚭鐨勬牱鏈恒��</td></tr>
</table>
- </div>
+
</body>
-<!-- 20220221 PI鏀归�� by 寰愪寒 start -->
-<script>
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResource = JSON.parse('{!staticResource}');
-
- function Fun(pdf){
- var iframe = document.createElement('iframe');
- iframe.setAttribute('style', 'position:absolute;right:0; top:0; bottom:0; height:100%; width:100%');
- document.body.appendChild(iframe);
- iframe.src = pdf.output('datauristring');
- for(let e of document.body.childNodes){
- if( e != iframe && e.style){
- e.style.display = 'none';
- }
- }
- }
-
- let id = "pdf-wrapper";
- var target = document.getElementById(id);
- function jsPdfDownload(){
- let pdfName = "娴嬭瘯";
- let id = "pdf-wrapper";
- var target = document.getElementById(id);
- target.style.background = "#FFFFFF";
- if(pdfName==''||pdfName==undefined) pdfName= getNowFormatDate();
-
- html2canvas(target, {
- scale: 2,
- onrendered:function(canvas) {
- let landscape = false;
- let pw = 595.28;
- let ph = 841.89;
- const marginw = 40;
-
- let orientation = '';
- if (landscape) {
- let temp =ph;
- ph = pw;
- pw = temp;
- orientation = 'l';
- }
-
-
- var contentWidth = canvas.width;
- var contentHeight = canvas.height;
-
- //涓�椤祊df鏄剧ずhtml椤甸潰鐢熸垚鐨刢anvas楂樺害;
- var pageHeight = contentWidth / pw * ph;
- //鏈敓鎴恜df鐨刪tml椤甸潰楂樺害
- var leftHeight = contentHeight;
- //椤甸潰鍋忕Щ
- var position = 0;
- //a4绾哥殑灏哄[595.28,841.89]锛宧tml椤甸潰鐢熸垚鐨刢anvas鍦╬df涓浘鐗囩殑瀹介珮
- var imgWidth = pw-2*marginw;//595.28//宸﹀彸杈硅窛20
- var imgHeight = imgWidth/contentWidth * contentHeight;//宸﹀彸杈硅窛20
-
- var pageData = canvas.toDataURL('image/jpeg', 1.0);
-
- var pdf = new jsPDF(orientation, 'pt', 'a4');// 绗竴涓弬鏁板~瀛楁瘝l锛屾敞鎰忎笉鏄暟瀛�1锛屼负妯悜pdf
-
- //鏈変袱涓珮搴﹂渶瑕佸尯鍒嗭紝涓�涓槸html椤甸潰鐨勫疄闄呴珮搴︼紝鍜岀敓鎴恜df鐨勯〉闈㈤珮搴�(841.89)
- //褰撳唴瀹规湭瓒呰繃pdf涓�椤垫樉绀虹殑鑼冨洿锛屾棤闇�鍒嗛〉
- if (leftHeight < pageHeight) {
- pdf.addImage(pageData, 'JPEG', marginw, 0, imgWidth, imgHeight );//宸﹀彸杈硅窛20
- } else {
- while(leftHeight > 0) {
- pdf.addImage(pageData, 'JPEG', marginw, position, imgWidth, imgHeight)//宸﹀彸杈硅窛20
- leftHeight -= pageHeight;
- position -= ph;
- //閬垮厤娣诲姞绌虹櫧椤�
- if(leftHeight > 0) {
- pdf.addPage();
- }
- }
- }
- Fun(pdf);
- }
- })
- }
-
-
- var aws_data = {};
-
- function Decrypt(r,dataIds){
- let Foo = function(){
- for (const id of dataIds) {
- if (aws_data.hasOwnProperty(id)) {
- let d = aws_data[id];
- let $e =j$("[aws-id='"+d.dataId+ "']");
- $e.each((i,e)=>{
- j$(e).html(d[j$(e).attr("aws-api")]);
- });
- //.find(".decrypt")
-
- }
- }
- unblockUI();
- }
- let ids = [];
- for (const id of dataIds) {
- if (!aws_data.hasOwnProperty(id)) {
- ids.push(id);
- }
- }
- if (ids.length > 0) {
- blockme();
- AWSService.search(r.searchUrl,JSON.stringify({
- "dataIds":ids
- }),function(data){
- unblockUI();
- if(data.object && data.object.length > 0){
-
- for(let d of data.object){
- if(d.dataId){
- aws_data[d.dataId] = d;
- }
- }
- Foo();
- }
- },r.token);
- }else{
- Foo();
- }
- }
-
- function DecryptAll(){
- let dataIds = [];
- j$('[aws-id][aws-obj="loaner_application__c"]').each((i,e)=>{
- let v = j$(e).attr('aws-id');
- if (v) {
- dataIds.push(v);
- }
- });
- Decrypt(staticResource,dataIds);
- }
-
- j$(function(){
- //DecryptAll();
-
- })
-
- document.body.onclick = function(){
- jsPdfDownload();
- }
-</script>
-<!-- 20220221 PI鏀归�� by 寰愪寒 end -->
</html>
</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/EquipmentLoanerApply.page b/force-app/main/default/pages/EquipmentLoanerApply.page
index 8f5573f..f8a7783 100644
--- a/force-app/main/default/pages/EquipmentLoanerApply.page
+++ b/force-app/main/default/pages/EquipmentLoanerApply.page
@@ -422,7 +422,6 @@
</apex:outputPanel>
<th style="text-align: center;"><a href="#" onclick="sortTableJs('2');return false;" style="text-decoration: underline;">{!$ObjectType.loaner_application_detail__c.fields.ECCode__c.label}</a>{!sortOrder[3]}</th>
<th style="text-align: center;"><a href="#" onclick="sortTableJs('3');return false;" style="text-decoration: underline;">{!$ObjectType.loaner_application_detail__c.fields.loaner_place__c.label}</a>{!sortOrder[3]}</th>
- <!-- <th style="text-align: center;">鏍锋満鍚嶇О</th> -->
<apex:outputPanel layout="none" rendered="{!IF(loanerApply.Equipment_Type__c == 'BS' , false , true)}">
<th style="text-align: center;width: 50Px;"><a href="#" onclick="sortTableJs('4');return false;" style="text-decoration: underline;">{!$ObjectType.loaner_application_detail__c.fields.loaner_Status__c.label}/{!$ObjectType.Asset.fields.Count_can_allocate_F__c.label}</a>{!sortOrder[4]}</th>
</apex:outputPanel>
@@ -493,9 +492,6 @@
<td class="dataCell" align="center">
{!records.aset.EC_Code__c}
</td>
- <!-- <td class="dataCell" align="center">
- {!records.aset.Equipment_Type__c}
- </td> -->
<td class="dataCell" align="center">
{!records.aset.loaner_place__c}
</td>
diff --git a/force-app/main/default/pages/LoanerPortionReturn.page b/force-app/main/default/pages/LoanerPortionReturn.page
index dd7021f..38b205b 100644
--- a/force-app/main/default/pages/LoanerPortionReturn.page
+++ b/force-app/main/default/pages/LoanerPortionReturn.page
@@ -2,75 +2,8 @@
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
-<!-- Update PIPL 20220425 By Chen Yanan Start -->
-<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
-<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
-<!-- Update PIPL 20220425 By Chen Yanan End -->
<style type="text/css"> td>div{display: inline-block;}</style>
<script>
- // Update PIPL 20220425 By Chen Yanan start
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResource = JSON.parse('{!staticResource}');
- var aws_data = {};
-
- function Decrypt(r,dataIds,callback){
- if (!(dataIds && dataIds.length)) {
- if(callback)callback();
- return;
- }
-
- let Foo = function(){
- for (const id of dataIds) {
- if (aws_data.hasOwnProperty(id)) {
- let d = aws_data[id];
- let $e =j$("[aws-id='"+d.dataId+ "']");
- $e.each((i,e)=>{
- if (d[j$(e).attr("aws-api")] != '') {
- j$(e).attr('value',d[j$(e).attr("aws-api")]);
- }
- })
- }
- }
- if(callback)callback();
- }
- let ids = [];
- for (const id of dataIds) {
- if (!aws_data.hasOwnProperty(id)) {
- ids.push(id);
- }
- }
- if (ids.length > 0) {
-
- AWSService.query(r.queryUrl,ids[0],function(data){
- console.log('data: ' + JSON.stringify(data));
- if(data.object){
- aws_data[data.object.dataId] = data.object;
- Foo();
- }else{
- if(callback)callback();
- }
- },r.token);
- }else{
- Foo();
- }
- }
-
- function DecryptAll(callback){
- let dataIds1 = [];
- j$('[aws-id][aws-obj="loaner_application__c"]').each((i,e)=>{
- let v = j$(e).attr('aws-id');
- if (v) {
- dataIds1.push(v);
- }
- });
- Decrypt(staticResource,dataIds1,callback);
- }
-
- j$(function(){
- DecryptAll();
-
- })
- // Update PIPL 20220425 By Chen Yanan end
function test1(){
getIsOk();
}
@@ -138,12 +71,7 @@
<tr>
<td>
<label for="user">{!$ObjectType.loaner_application_detail__c.fields.Return_Trake_Staff__c.label}: </label>
- <!-- Update PIPL 20220425 By Chen Yanan Start -->
- <!-- <apex:inputField value="{!lac.Return_Trake_Staff__c}" id="user"></apex:inputField> -->
- <!-- PIPL 鏀归�犲悗 -->
- <apex:inputField html-aws-obj="loaner_application__c" html-aws-api="returnTrakeStaff" html-aws-id="{!lac.AWS_Data_Id__c}" id="Return_Trake_Staff__c" value="{!lac.Return_Trake_Staff__c}"></apex:inputField>
- <!-- Update PIPL 20220425 By Chen Yanan -->
-
+ <apex:inputField value="{!lac.Return_Trake_Staff__c}" id="user"></apex:inputField>
</td>
<td>
<apex:commandButton onclick="test1();" value="鍥炲瘎" rerender="dummy" style="width: 70px;float: right;"/>
diff --git a/force-app/main/default/pages/LoanerUploadFilePage.page b/force-app/main/default/pages/LoanerUploadFilePage.page
index 58bd883..2300e6b 100644
--- a/force-app/main/default/pages/LoanerUploadFilePage.page
+++ b/force-app/main/default/pages/LoanerUploadFilePage.page
@@ -186,7 +186,7 @@
<!-- </apex:pageBlockSection> -->
</apex:pageBlock>
</apex:form>
- <apex:relatedList list="CombinedAttachments" id="Notes">
+ <apex:relatedList list="CombinedAttachments" id="Notes">
<apex:facet name="NoteHeader" ></apex:facet>
</apex:relatedList>
<script>
diff --git a/force-app/main/default/pages/NEWCreateSWOQuote.page b/force-app/main/default/pages/NEWCreateSWOQuote.page
index 6278a46..2d0f0d4 100644
--- a/force-app/main/default/pages/NEWCreateSWOQuote.page
+++ b/force-app/main/default/pages/NEWCreateSWOQuote.page
@@ -7,88 +7,8 @@
<apex:includeScript value="{!URLFOR($Resource.SWOJS)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
-<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
<script type="text/javascript">
- // 20220311 PI鏀归�� by Bright start
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResource = JSON.parse('{!staticResource}');
- var contactstaticResource = JSON.parse('{!contactstaticResource}');
- var aws_data = {};
-
- function Decrypt(r,dataIds,callback){
- if (!(dataIds && dataIds.length)) {
- if(callback)callback();
- return;
- }
-
- let Foo = function(){
- for (const id of dataIds) {
- if (aws_data.hasOwnProperty(id)) {
- let d = aws_data[id];
- let $e =j$("[aws-id='"+d.dataId+ "']");
- $e.each((i,e)=>{
- j$(e).html(d[j$(e).attr("aws-api")]);
- })
-
- }
- }
- if(callback)callback();
- }
- let ids = [];
- for (const id of dataIds) {
- if (!aws_data.hasOwnProperty(id)) {
- ids.push(id);
- }
- }
- if (ids.length > 0) {
-
- AWSService.search(r.searchUrl,JSON.stringify({
- "dataIds":ids
- }),function(data){
-
- if(data.object && data.object.length > 0){
-
- for(let d of data.object){
- if(d.dataId){
- aws_data[d.dataId] = d;
- }
- }
- Foo();
- }else{
- if(callback)callback();
- }
- },r.token);
- }else{
- Foo();
- }
- }
-
- function DecryptAll(callback){
- let dataIds1 = [];
- j$('[aws-id][aws-obj="Contact"]').each((i,e)=>{
- let v = j$(e).attr('aws-id');
- if (v) {
- dataIds1.push(v);
- }
- });
- Decrypt(contactstaticResource,dataIds1,callback);
-
- let dataIds2 = [];
- j$('[aws-id][aws-obj="Quotes__c"]').each((i,e)=>{
- let v = j$(e).attr('aws-id');
- if (v) {
- dataIds2.push(v);
- }
- });
- Decrypt(staticResource,dataIds2,callback);
- }
-
- j$(function(){
- DecryptAll();
-
- })
- // 20220311 PI鏀归�� by Bright end
</script>
<style type="text/css">
.Page{
@@ -213,9 +133,7 @@
<tr>
<td colspan="2" align="left" ><apex:inputField id="CURRENCY" value="{!QuotesPage.CURRENCY__c}" style="width: 56%"/></td>
- <td colspan="2" align="left" >
- <a href="/{!QuotesPage.CONTACT_NAME__c}" aws-obj="Contact" aws-api="lastName" aws-id="{!QuotesPage.CONTACT_NAME__r.AWS_Data_Id__c}">{!QuotesPage.CONTACT_NAME__r.Name}</a>
- </td>
+ <td colspan="2" align="left" ><apex:outputField value="{!QuotesPage.CONTACT_NAME__c}" style="width: 63%"/></td>
<td colspan="2"/>
<td colspan="2" class="title1">Summary</td>
<td/>
@@ -236,7 +154,7 @@
<td colspan="2" align="left" ><apex:outputField id="COMPANY" value="{!QuotesPage.COMPANY__c}"/>
<!-- <apex:outputLink value="/{!QuotesPage.COMPANYId__c}" target="LINK_{!QuotesPage.COMPANYId__c}" ><c:PDFWbr targetStr="{!QuotesPage.COMPANYName__c}"/></apex:outputLink> -->
</td>
- <td align="left" ><apex:outputField html-aws-obj="Quotes__c" html-aws-api="contactPhone" html-aws-id="{!QuotesPage.AWS_Data_Id__c}" id="CONTACT_PHONE" value="{!QuotesPage.CONTACT_PHONE__c}"/></td>
+ <td align="left" ><apex:outputField id="CONTACT_PHONE" value="{!QuotesPage.CONTACT_PHONE__c}"/></td>
<td colspan="3"/>
<td class="title2">{!$ObjectType.Quotes__c.fields.DISCOUNT__c.label}</td>
<td class="title2" align="left" ><apex:outputField value="{!QuotesPage.DISCOUNT__c}" style="width: 62%"/></td>
@@ -377,7 +295,7 @@
<apex:inputText id="DisplayPROBABILITY" value="{!QuotesPage.PROBABILITY__c}" style="display: none;"/>
</td>
<td/>
- <td align="left" ><apex:inputField id="PRODUCT_SEGMENT" value="{!QuotesPage.PRODUCT_SEGMENT__c}" style="width: 95%"/></td>
+ <td align="left" ><apex:inputField id="PRODUCT_SEGMENT" value="{!QuotesPage.PRODUCT_SEGMENT__c}" onchange="QuotesTypeChangeFunction();" style="width: 95%"/></td>
</tr>
<tr>
<td align="left" >{!$ObjectType.Quotes__c.fields.LOCATION__c.label}<span class="textRed">*</span></td>
@@ -527,8 +445,8 @@
<td align="left" >{!$ObjectType.Quotes__c.fields.SHIP_TO__c.label}</td>
</tr>
<tr>
- <td colspan="2" align="left" ><apex:inputField html-aws-obj="Quotes__c" html-aws-api="billTo" html-aws-id="{!QuotesPage.AWS_Data_Id__c}" id="BILL_TO" value="{!QuotesPage.BILL_TO__c }" style="width: 90%;height: 80PX"/></td>
- <td colspan="2" align="left" ><apex:inputField html-aws-obj="Quotes__c" html-aws-api="shipTo" html-aws-id="{!QuotesPage.AWS_Data_Id__c}" id="SHIP_TO" value="{!QuotesPage.SHIP_TO__c}" style="width: 90%;height: 80PX"/></td>
+ <td colspan="2" align="left" ><apex:inputField id="BILL_TO" value="{!QuotesPage.BILL_TO__c }" style="width: 90%;height: 80PX"/></td>
+ <td colspan="2" align="left" ><apex:inputField id="SHIP_TO" value="{!QuotesPage.SHIP_TO__c}" style="width: 90%;height: 80PX"/></td>
</tr>
<tr>
<td colspan="9"> <hr/></td>
@@ -648,19 +566,17 @@
</tr>
<tr>
- <apex:outputPanel layout="none" rendered="{!IF(aftORbef == false && aftORbef1 == false, true, false)}">
- <td colspan="9">
- <apex:outputText id="message01" value="{!Messages01}" style="resize:vertical;width: 100%"/>
- </td>
- </apex:outputPanel>
+ <td colspan="9">
+ <apex:outputText id="message01" value="{!Messages01}" style="resize:vertical;width: 100%"/>
+ </td>
</tr>
- <tr>
+ <!-- <tr>
<apex:outputPanel layout="none" rendered="{!IF(aftORbef == true || aftORbef1 == true, true, false)}">
<td colspan="9">
<apex:outputText value="-缁翠慨璐ㄤ繚鍙兜鐩栦簬鏈缁翠慨鐨勯厤浠讹紝缁翠慨璐ㄤ繚鏈熶负浠櫒鍙戣揣鍚庝笁涓湀鍔犲叓澶┿��" style="resize:vertical;width: 100%"/>
</td>
</apex:outputPanel>
- </tr>
+ </tr> -->
<tr>
<td colspan="9">
<apex:outputText id="message02" value="{!Messages02}" style="resize:vertical;width: 100%"/>
@@ -949,7 +865,7 @@
<td><apex:outputText value="{!mail.haveAtt}" /></td>
<td>
<apex:repeat value="{!mail.attList}" var="att" id="lines">
- <apex:outputLink value="/{!att.Id}" target="LINK_{!att.Id}"><c:PDFWbr targetStr="{!att.FileName__c}" /></apex:outputLink>
+ <apex:outputLink value="/{!att.Id}" target="LINK_{!att.Id}"><c:PDFWbr targetStr="{!att.Name}" /></apex:outputLink>
<br/>
</apex:repeat>
</td>
diff --git a/force-app/main/default/pages/NEWCreateSWOQuoteReadOnly.page b/force-app/main/default/pages/NEWCreateSWOQuoteReadOnly.page
index 2568d35..b3cb2e6 100644
--- a/force-app/main/default/pages/NEWCreateSWOQuoteReadOnly.page
+++ b/force-app/main/default/pages/NEWCreateSWOQuoteReadOnly.page
@@ -6,89 +6,9 @@
<apex:includeScript value="{!URLFOR($Resource.NewQuoteEntryJS)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
-<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
<script type="text/javascript">
- // 20220311 PI鏀归�� by Bright start
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResource = JSON.parse('{!staticResource}');
- var contactstaticResource = JSON.parse('{!contactstaticResource}');
- var aws_data = {};
-
- function Decrypt(r,dataIds,callback){
- if (!(dataIds && dataIds.length)) {
- if(callback)callback();
- return;
- }
-
- let Foo = function(){
- for (const id of dataIds) {
- if (aws_data.hasOwnProperty(id)) {
- let d = aws_data[id];
- let $e =j$("[aws-id='"+d.dataId+ "']");
- $e.each((i,e)=>{
- j$(e).html(d[j$(e).attr("aws-api")]);
- })
-
- }
- }
- if(callback)callback();
- }
- let ids = [];
- for (const id of dataIds) {
- if (!aws_data.hasOwnProperty(id)) {
- ids.push(id);
- }
- }
- if (ids.length > 0) {
-
- AWSService.search(r.searchUrl,JSON.stringify({
- "dataIds":ids
- }),function(data){
-
- if(data.object && data.object.length > 0){
-
- for(let d of data.object){
- if(d.dataId){
- aws_data[d.dataId] = d;
- }
- }
- Foo();
- }else{
- if(callback)callback();
- }
- },r.token);
- }else{
- Foo();
- }
- }
-
- function DecryptAll(callback){
- let dataIds1 = [];
- j$('[aws-id][aws-obj="Contact"]').each((i,e)=>{
- let v = j$(e).attr('aws-id');
- if (v) {
- dataIds1.push(v);
- }
- });
- Decrypt(contactstaticResource,dataIds1,callback);
-
- let dataIds2 = [];
- j$('[aws-id][aws-obj="Quotes__c"]').each((i,e)=>{
- let v = j$(e).attr('aws-id');
- if (v) {
- dataIds2.push(v);
- }
- });
- Decrypt(staticResource,dataIds2,callback);
- }
-
- j$(function(){
- DecryptAll();
-
- })
- // 20220311 PI鏀归�� by Bright end
function openPDF(){
@@ -217,9 +137,7 @@
<tr>
<td colspan="2" align="left" ><apex:outputField id="CURRENCY" value="{!QuotesPage.CURRENCY__c}" style="width: 56%"/></td>
- <td colspan="2" align="left" >
- <a href="/{!QuotesPage.CONTACT_NAME__c}" aws-obj="Contact" aws-api="lastName" aws-id="{!QuotesPage.CONTACT_NAME__r.AWS_Data_Id__c}">{!QuotesPage.CONTACT_NAME__r.Name}</a>
- </td>
+ <td colspan="2" align="left" ><apex:outputField value="{!QuotesPage.CONTACT_NAME__c}" style="width: 63%"/></td>
<td colspan="2"/>
<td colspan="2" class="title1">Summary</td>
<td/>
@@ -239,7 +157,7 @@
<tr>
<td colspan="2" align="left" ><apex:outputField id="COMPANY" value="{!QuotesPage.COMPANY__c}"/>
</td>
- <td align="left" ><apex:outputField html-aws-obj="Quotes__c" html-aws-api="contactPhone" html-aws-id="{!QuotesPage.AWS_Data_Id__c}" id="CONTACT_PHONE" value="{!QuotesPage.CONTACT_PHONE__c}"/></td>
+ <td align="left" ><apex:outputField id="CONTACT_PHONE" value="{!QuotesPage.CONTACT_PHONE__c}"/></td>
<td colspan="3"/>
<td class="title2">{!$ObjectType.Quotes__c.fields.DISCOUNT__c.label}</td>
<td class="title2" align="left" ><apex:outputField value="{!QuotesPage.DISCOUNT__c}" style="width: 62%"/></td>
@@ -542,8 +460,8 @@
<td class="hand" align="left" >{!$ObjectType.Quotes__c.fields.SHIP_TO__c.label}</td>
</tr>
<tr>
- <td colspan="2" align="left" ><apex:outputField html-aws-obj="Quotes__c" html-aws-api="billTo" html-aws-id="{!QuotesPage.AWS_Data_Id__c}" id="BILL_TO" value="{!QuotesPage.BILL_TO__c }" style="width: 90%;height: 80PX"/></td>
- <td colspan="2" align="left" ><apex:outputField html-aws-obj="Quotes__c" html-aws-api="shipTo" html-aws-id="{!QuotesPage.AWS_Data_Id__c}" id="SHIP_TO" value="{!QuotesPage.SHIP_TO__c}" style="width: 90%;height: 80PX"/></td>
+ <td colspan="2" align="left" ><apex:outputField id="BILL_TO" value="{!QuotesPage.BILL_TO__c }" style="width: 90%;height: 80PX"/></td>
+ <td colspan="2" align="left" ><apex:outputField id="SHIP_TO" value="{!QuotesPage.SHIP_TO__c}" style="width: 90%;height: 80PX"/></td>
</tr>
<tr>
<td colspan="9"> <hr/></td>
@@ -901,7 +819,7 @@
<td><apex:outputText value="{!mail.haveAtt}" /></td>
<td>
<apex:repeat value="{!mail.attList}" var="att" id="lines">
- <apex:outputLink value="/{!att.Id}" target="LINK_{!att.Id}"><c:PDFWbr targetStr="{!att.FileName__c}" /></apex:outputLink>
+ <apex:outputLink value="/{!att.Id}" target="LINK_{!att.Id}"><c:PDFWbr targetStr="{!att.Name}" /></apex:outputLink>
<br/>
</apex:repeat>
</td>
diff --git a/force-app/main/default/pages/NewCrossHighOpportunity.page b/force-app/main/default/pages/NewCrossHighOpportunity.page
index d5bb146..e26539a 100644
--- a/force-app/main/default/pages/NewCrossHighOpportunity.page
+++ b/force-app/main/default/pages/NewCrossHighOpportunity.page
@@ -2,122 +2,35 @@
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
- <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.AWSService, 'AWSService.js') }" />
- <apex:includeScript value="/soap/ajax/40.0/connection.js"/>
<script>
- aws_result = '';
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResource = JSON.parse('{!staticResource}');
- function GetObj(){
- return JSON.stringify([{
- dataId : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:AWS_Data_Id__c").value,
- dealerSalesStaffName : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:dssn:opp_DealerSalesStaffName").value,
- dealerService : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:ds:opp_DealerService").value,
- }]);
- }
- function ProcessPI(sobjJson, payloadForNewPI,callback) {
- console.log('---insert---');
- AWSService.post(staticResource.newUrl, payloadForNewPI, function(result){
- aws_result = result
- if(aws_result && aws_result.object && aws_result.object.length > 0){
- let obj = aws_result.object[0];
- if(obj){
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:AWS_Data_Id__c").value = obj.dataId;
-
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:dssn:opp_DealerSalesStaffName").value = obj.dealerSalesStaffName;
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:ds:opp_DealerService").value = obj.dealerService;
+ function saveJs() {
+ blockme();
+ saveBtn();
+ }
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:DealerSalesStaffName_Encrypted__c").value = obj.dealerSalesStaffNameEncrypt;
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:DealerService_Encrypted__c").value = obj.dealerServiceEncrypt;
-
- }
- if(callback){
- callback();
- }
- }
- }, staticResource.token);
- }
- var oppid = '';
- function Redirect(){
- window.location.href = '/'+oppid;
- }
- function Trans(){
- let b = HasError();
- console.log('---HasError---');
- console.log(b);
- console.log('---aws_result---');
- console.log(aws_result);
- AWSService.post(staticResource.transactionUrl, JSON.stringify({
- "txId":aws_result.txId,
- "isSuccess":b ? 0 : 1
- }), function(result){
- console.log('---result---');
- console.log(result);
- console.log('finish');
- Redirect();
- //window.location.reload();
- }, staticResource.token);
-
- }
- function HasError(){
- let e = document.getElementById("page:mainfrom:message");
- console.log(e);
- if (!e) {
- return false;
- }
+ function saveYesJs() {
+ blockme();
+ saveBtnYes();
+ }
- if(j$(e).find(".editListError").length > 0){
- return true;
- }
-
- let divs = j$(e).find("div.message");
- for (let i = 0; i < divs.length; i++) {
- for (let j = 0; j < divs[i].classList.length; j++) {
- for(let cls in divs[i].classList){
- if (cls.indexOf('error')>-1) {
- return true;
- }
- }
-
- }
-
- }
- return false;
- }
- function saveJs() {
- blockme();
- ProcessPI({},GetObj(),function(){
- saveBtn();
- });
- }
+ function saveNoJs() {
+ blockme();
+ saveBtnNo();
+ }
- function saveYesJs() {
- blockme();
- saveBtnYes();
+ function cancelJs() {
+ var baseUrl = '{!baseUrl}';
+ var rtUrl = '{!rtUrl}';
+ if (rtUrl == 'null' || rtUrl == '') {
+ rtUrl = '{!conId}';
}
-
- function saveNoJs() {
- blockme();
- saveBtnNo();
- }
-
- function cancelJs() {
- var baseUrl = '{!baseUrl}';
- var rtUrl = '{!rtUrl}';
- if (rtUrl == 'null' || rtUrl == '') {
- rtUrl = '{!conId}';
- }
- window.location.href = baseUrl + "/" + rtUrl;
- }
+ window.location.href = baseUrl + "/" + rtUrl;
+ }
</script>
<apex:form id="mainForm">
- <script>
- oppid = '{!oppid}';
- </script>
- <apex:actionFunction action="{!saveBtn}" name="saveBtn" reRender="mainForm,message" oncomplete="unblockUI();Trans();"/>
+ <apex:actionFunction action="{!saveBtn}" name="saveBtn" reRender="mainForm,message" oncomplete="unblockUI();"/>
<apex:actionFunction action="{!saveBtnYes}" name="saveBtnYes" reRender="mainForm,message" oncomplete="unblockUI();"/>
<apex:actionFunction action="{!saveBtnNo}" name="saveBtnNo" reRender="mainForm,message" oncomplete="unblockUI();"/>
@@ -205,28 +118,27 @@
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
- <apex:pageBlockSection id="DealerInfo" title="缁忛攢鍟嗙浉鍏充俊鎭�" columns="2">
+ <apex:pageBlockSection title="缁忛攢鍟嗙浉鍏充俊鎭�" columns="2">
<apex:pageBlockSectionItem >
<apex:outputLabel value="浠g悊鍟嗗悕" for="opp_Dealer"/>
<apex:inputField value="{!opp.Dealer__c}" id="opp_Dealer"/>
</apex:pageBlockSectionItem>
- <apex:pageBlockSectionItem id="dssn" >
- <apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName"/><!--pi-->
- </apex:pageBlockSectionItem>
-
+ <apex:pageBlockSectionItem >
+ <apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
+ <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName"/>
+ </apex:pageBlockSectionItem>
+
+
+
<apex:pageBlockSectionItem >
<apex:outputLabel value="涓棿鍟嗗悕" for="opp_SubDealer"/>
<apex:inputField value="{!opp.SubDealer__c}" id="opp_SubDealer"/>
</apex:pageBlockSectionItem>
- <apex:pageBlockSectionItem id="ds" >
+ <apex:pageBlockSectionItem >
<apex:outputLabel value="浠g悊鍟嗘湇鍔℃媴褰撹�呭悕" for="opp_DealerService"/>
- <apex:inputField value="{!opp.DealerService__c}" id="opp_DealerService"/><!--pi-->
+ <apex:inputField value="{!opp.DealerService__c}" id="opp_DealerService"/>
</apex:pageBlockSectionItem>
- <apex:inputHidden value="{!opp.AWS_Data_Id__c}" id="AWS_Data_Id__c"/>
- <apex:inputHidden value="{!opp.DealerSalesStaffName_Encrypted__c}" id="DealerSalesStaffName_Encrypted__c"/>
- <apex:inputHidden value="{!opp.DealerService_Encrypted__c}" id="DealerService_Encrypted__c"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="璺ㄥ尯鍩熼攢鍞�" columns="2">
@@ -234,6 +146,7 @@
<apex:outputLabel value="鍚堜綔鍖哄煙璐熻矗浜�" for="HeadOfCooperationArea__c"/>
<apex:inputField value="{!opp.HeadOfCooperationArea__c}" id="HeadOfCooperationArea__c"/>
</apex:pageBlockSectionItem>
+
</apex:pageBlockSection>
diff --git a/force-app/main/default/pages/NewCrossRegionalSalesOpportunity.page b/force-app/main/default/pages/NewCrossRegionalSalesOpportunity.page
index d1f3d30..a879e0f 100644
--- a/force-app/main/default/pages/NewCrossRegionalSalesOpportunity.page
+++ b/force-app/main/default/pages/NewCrossRegionalSalesOpportunity.page
@@ -2,127 +2,11 @@
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
- <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.AWSService, 'AWSService.js') }" />
- <apex:includeScript value="/soap/ajax/40.0/connection.js"/>
+
<script>
- aws_result = '';
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResource = JSON.parse('{!staticResource}');
- function GetObj(){
- if('{!isDealerPage}'=='true'){
- if('{!ProductSegment}'=='NDT'||'{!ProductSegment}'=='ANT'){
- return JSON.stringify([{
- dataId : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:AWS_Data_Id__c").value,
- dealerSalesStaffName : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo2:dssnd2:opp_DealerSalesStaffName").value,
- dealerService : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo2:ds:opp_DealerService").value,
- }]);
- }else{
- return JSON.stringify([{
- dataId : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:AWS_Data_Id__c").value,
- dealerSalesStaffName : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo2:dssnd1:opp_DealerSalesStaffName").value,
- dealerService : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo2:ds:opp_DealerService").value,
- }]);
- }
- }else{
- if('{!ProductSegment}'=='NDT'||'{!ProductSegment}'=='ANT'){
- return JSON.stringify([{
- dataId : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:AWS_Data_Id__c").value,
- dealerSalesStaffName : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:dssn2:opp_DealerSalesStaffName").value,
- dealerService : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:ds:opp_DealerService").value,
- }]);
- }else{
- return JSON.stringify([{
- dataId : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:AWS_Data_Id__c").value,
- dealerSalesStaffName : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:dssn1:opp_DealerSalesStaffName").value,
- dealerService : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:ds:opp_DealerService").value,
- }]);
- }
- }
- }
- function ProcessPI(sobjJson, payloadForNewPI,callback) {
- console.log('---insert---');
- AWSService.post(staticResource.newUrl, payloadForNewPI, function(result){
- aws_result = result
- if(aws_result && aws_result.object && aws_result.object.length > 0){
- let obj = aws_result.object[0];
- if(obj){
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:AWS_Data_Id__c").value = obj.dataId;
- if('{!isDealerPage}'=='true'){
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo2:dssnd1:opp_DealerSalesStaffName").value = obj.dealerSalesStaffName;
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo2:dsd:opp_DealerService").value = obj.dealerService;
-
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:Dealer_Sales_Staff_Name_D_Encrypted__c").value = obj.dealerSalesStaffNameDEncrypt;
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:Dealer_Service_D_Encrypted__c").value = obj.dealerServiceDEncrypt;
- }else{
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:dssn1:opp_DealerSalesStaffName").value = obj.dealerSalesStaffName;
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:ds:opp_DealerService").value = obj.dealerService;
-
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:DealerSalesStaffName_Encrypted__c").value = obj.dealerSalesStaffNameEncrypt;
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:DealerService_Encrypted__c").value = obj.dealerServiceEncrypt;
- }
- }
- if(callback){
- callback();
- }
- }
- }, staticResource.token);
- }
- var oppid = '';
- function Redirect(){
- window.location.href = '/'+oppid;
- }
- function Trans(){
- let b = HasError();
- console.log('---HasError---');
- console.log(b);
- console.log('---aws_result---');
- console.log(aws_result);
- AWSService.post(staticResource.transactionUrl, JSON.stringify({
- "txId":aws_result.txId,
- "isSuccess":b ? 0 : 1
- }), function(result){
- console.log('---result---');
- console.log(result);
- console.log('finish');
- Redirect();
- //window.location.reload();
- }, staticResource.token);
-
- }
- function HasError(){
- let e = document.getElementById("page:mainForm:message");
- console.log(e);
- if (!e) {
- return false;
- }
-
- if(j$(e).find(".editListError").length > 0){
- return true;
- }
-
- let divs = j$(e).find("div.message");
- for (let i = 0; i < divs.length; i++) {
- for (let j = 0; j < divs[i].classList.length; j++) {
- for(let cls in divs[i].classList){
- if (cls.indexOf('error')>-1) {
- return true;
- }
- }
-
- }
-
- }
- return false;
- }
function saveJs() {
blockme();
- console.log('{!isDealerPage}');
- console.log('{!ProductSegment}');
- ProcessPI({},GetObj(),function(){
- saveBtn();
- });
- //
+ saveBtn();
}
function saveYesJs() {
@@ -146,10 +30,7 @@
</script>
<apex:form id="mainForm">
- <script>
- oppid = '{!oppid}';
- </script>
- <apex:actionFunction action="{!saveBtn}" name="saveBtn" reRender="mainForm,message" oncomplete="unblockUI();Trans();"/>
+ <apex:actionFunction action="{!saveBtn}" name="saveBtn" reRender="mainForm,message" oncomplete="unblockUI();"/>
<apex:actionFunction action="{!saveBtnYes}" name="saveBtnYes" reRender="mainForm,message" oncomplete="unblockUI();"/>
<apex:actionFunction action="{!saveBtnNo}" name="saveBtnNo" reRender="mainForm,message" oncomplete="unblockUI();"/>
@@ -249,36 +130,30 @@
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
- <apex:pageBlockSection id="DealerInfo" title="缁忛攢鍟嗙浉鍏充俊鎭�" columns="2">
+ <apex:pageBlockSection title="缁忛攢鍟嗙浉鍏充俊鎭�" columns="2">
<apex:pageBlockSectionItem >
<apex:outputLabel value="浠g悊鍟嗗悕" for="opp_Dealer"/>
<apex:inputField value="{!opp.Dealer__c}" id="opp_Dealer"/>
</apex:pageBlockSectionItem>
- <apex:pageBlockSectionItem id="dssn1" rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', false, true)}">
- <apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName"/><!--pi-->
- </apex:pageBlockSectionItem>
-
- <apex:pageBlockSectionItem id="dssn2" rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', true, false)}">
- <apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName" required="true"/><!--pi-->
- </apex:pageBlockSectionItem>
+ <apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', false, true)}">
+ <apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
+ <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName"/>
+ </apex:pageBlockSectionItem>
+
+ <apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', true, false)}">
+ <apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
+ <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName" required="true"/>
+ </apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="涓棿鍟嗗悕" for="opp_SubDealer"/>
<apex:inputField value="{!opp.SubDealer__c}" id="opp_SubDealer"/>
</apex:pageBlockSectionItem>
- <apex:pageBlockSectionItem id="ds" >
+ <apex:pageBlockSectionItem >
<apex:outputLabel value="浠g悊鍟嗘湇鍔℃媴褰撹�呭悕" for="opp_DealerService"/>
- <apex:inputField value="{!opp.DealerService__c}" id="opp_DealerService"/><!--pi-->
+ <apex:inputField value="{!opp.DealerService__c}" id="opp_DealerService"/>
</apex:pageBlockSectionItem>
- <apex:inputHidden value="{!opp.AWS_Data_Id__c}" id="AWS_Data_Id__c"/>
- <apex:inputHidden value="{!opp.DealerSalesStaffName_Encrypted__c}" id="DealerSalesStaffName_Encrypted__c"/>
- <apex:inputHidden value="{!opp.DealerService_Encrypted__c}" id="DealerService_Encrypted__c"/>
- <apex:inputHidden value="{!opp.Dealer_Sales_Staff_Name_D_Encrypted__c}" id="Dealer_Sales_Staff_Name_D_Encrypted__c"/>
- <!-- <apex:inputHidden value="{!opp.Dealer_Service_D_Encrypted__c}" id="Dealer_Service_D_Encrypted__c"/> -->
- <input id="Page:mainForm:idSearchSetProduct:DealerInfo:Dealer_Service_D_Encrypted__c" type="hidden" name="Page:mainForm:idSearchSetProduct:DealerInfo:Dealer_Service_D_Encrypted__c" value="{!opp.Dealer_Service_D_Encrypted__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="璺ㄥ尯鍩熼攢鍞�" columns="2">
@@ -444,30 +319,30 @@
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
- <apex:pageBlockSection id="DealerInfo2" title="缁忛攢鍟嗙浉鍏充俊鎭�" columns="2">
+ <apex:pageBlockSection title="缁忛攢鍟嗙浉鍏充俊鎭�" columns="2">
<apex:pageBlockSectionItem >
<apex:outputLabel value="浠g悊鍟嗗悕" for="opp_Dealer"/>
<apex:inputField value="{!opp.Dealer__c}" id="opp_Dealer"/>
</apex:pageBlockSectionItem>
<!-- <apex:outputPanel layout="none" rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', false, true)}"> -->
- <apex:pageBlockSectionItem id="dssnd1" rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', false, true)}">
- <apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕." for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.Dealer_Sales_Staff_Name_D__c}" id="opp_DealerSalesStaffName"/><!--pi-->
- </apex:pageBlockSectionItem>
+ <apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', false, true)}">
+ <apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕." for="opp_DealerSalesStaffName"/>
+ <apex:inputField value="{!opp.Dealer_Sales_Staff_Name_D__c}" id="opp_DealerSalesStaffName"/>
+ </apex:pageBlockSectionItem>
<!-- </apex:outputPanel> -->
<!-- <apex:outputPanel rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', true, false)}" layout="inline"> -->
- <apex:pageBlockSectionItem id="dssnd2" rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', true, false)}">
- <apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕." for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.Dealer_Sales_Staff_Name_D__c}" id="opp_DealerSalesStaffName" required="true"/><!--pi-->
- </apex:pageBlockSectionItem>
+ <apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', true, false)}">
+ <apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕." for="opp_DealerSalesStaffName"/>
+ <apex:inputField value="{!opp.Dealer_Sales_Staff_Name_D__c}" id="opp_DealerSalesStaffName" required="true"/>
+ </apex:pageBlockSectionItem>
<!-- </apex:outputPanel> -->
<apex:pageBlockSectionItem >
<apex:outputLabel value="涓棿鍟嗗悕." for="opp_SubDealer"/>
<apex:inputField value="{!opp.Sub_Dealer_D__c}" id="opp_SubDealer"/>
</apex:pageBlockSectionItem>
- <apex:pageBlockSectionItem id="dsd" >
+ <apex:pageBlockSectionItem >
<apex:outputLabel value="浠g悊鍟嗘湇鍔℃媴褰撹�呭悕." for="opp_DealerService"/>
- <apex:inputField value="{!opp.Dealer_Service_D__c}" id="opp_DealerService"/><!--pi-->
+ <apex:inputField value="{!opp.Dealer_Service_D__c}" id="opp_DealerService"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
diff --git a/force-app/main/default/pages/NewDiagnosisPart.page b/force-app/main/default/pages/NewDiagnosisPart.page
index 066a540..f943879 100644
--- a/force-app/main/default/pages/NewDiagnosisPart.page
+++ b/force-app/main/default/pages/NewDiagnosisPart.page
@@ -80,21 +80,6 @@
<apex:inputField value="{!diagnosisPart.Product__c}" id="ITEM" required="true"/>
</apex:pageBlockSectionItem>
- <apex:pageBlockSectionItem >
- <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.PRODUCT_CODE__c.label}" for="PRODUCT_CODE"/>
- <apex:inputField value="{!diagnosisPart.PRODUCT_CODE__c}" id="PRODUCT_CODE" required="true"/>
- </apex:pageBlockSectionItem>
-
- <apex:pageBlockSectionItem >
- <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.PRODUCT_PART_NUMBER__c.label}" for="PRODUCT_PART_NUMBER"/>
- <apex:inputField value="{!diagnosisPart.PRODUCT_PART_NUMBER__c}" id="PRODUCT_PART_NUMBER" required="true"/>
- </apex:pageBlockSectionItem>
-
- <apex:pageBlockSectionItem >
- <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.PRODUCT_DESCRIPTION__c.label}" for="PRODUCT_DESCRIPTION"/>
- <apex:inputField value="{!diagnosisPart.PRODUCT_DESCRIPTION__c}" id="PRODUCT_DESCRIPTION" required="true"/>
- </apex:pageBlockSectionItem>
-
<apex:pageBlockSectionItem >
<apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.QUANTITY__c.label}" for="QUANTITY"/>
<apex:inputField value="{!diagnosisPart.QUANTITY__c}" id="QUANTITY" required="true"/>
diff --git a/force-app/main/default/pages/NewHighProductsOpp.page b/force-app/main/default/pages/NewHighProductsOpp.page
index 597f068..a275d18 100644
--- a/force-app/main/default/pages/NewHighProductsOpp.page
+++ b/force-app/main/default/pages/NewHighProductsOpp.page
@@ -2,135 +2,35 @@
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
- <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.AWSService, 'AWSService.js') }" />
- <apex:includeScript value="/soap/ajax/40.0/connection.js"/>
+
<script>
- aws_result = '';
- function saveJs() {
- blockme();
- if(document.getElementById("page:mainForm:idSearchSetProduct:DealerInfo:ReceiveInfo:dssn:opp_DealerSalesStaffName") || document.getElementById("page:mainForm:idSearchSetProduct:DealerInfo:ReceiveInfo:ds:opp_DealerService")){
- ProcessPI({},GetObj(),function(){
- saveBtn();
- });
- }else{
- saveBtn();
- }
-
- }
+ function saveJs() {
+ blockme();
+ saveBtn();
+ }
- function saveYesJs() {
- blockme();
- saveBtnYes();
- }
+ function saveYesJs() {
+ blockme();
+ saveBtnYes();
+ }
- function saveNoJs() {
- blockme();
- saveBtnNo();
- }
+ function saveNoJs() {
+ blockme();
+ saveBtnNo();
+ }
- function cancelJs() {
- var baseUrl = '{!baseUrl}';
- var rtUrl = '{!rtUrl}';
- if (rtUrl == 'null' || rtUrl == '') {
- rtUrl = '{!conId}';
- }
- window.location.href = baseUrl + "/" + rtUrl;
+ function cancelJs() {
+ var baseUrl = '{!baseUrl}';
+ var rtUrl = '{!rtUrl}';
+ if (rtUrl == 'null' || rtUrl == '') {
+ rtUrl = '{!conId}';
}
- function GetObj(){
- return JSON.stringify([{
- dataId : document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:AWS_Data_Id__c").value,
- dealerSalesStaffName : document.getElementById("page:mainForm:idSearchSetProduct:DealerInfo:ReceiveInfo:dssn:opp_DealerSalesStaffName").value,
- dealerService : document.getElementById("page:mainForm:idSearchSetProduct:DealerInfo:ReceiveInfo:ds:opp_DealerService").value,
- }]);
-
- }
- function ProcessPI(sobjJson, payloadForNewPI,callback) {
- console.log('---insert---');
- AWSService.post(staticResource.newUrl, payloadForNewPI, function(result){
- aws_result = result
- SetEditObj();
- if(callback){
- callback();
- }
- }, staticResource.token);
- }
- function SetEditObj(){
- let obj = GetAWSResultObj();
- if(obj){
- document.getElementById("Page:mainForm:idSearchSetProduct:DealerInfo:AWS_Data_Id__c").value = obj.dataId;
-
- document.getElementById("page:mainForm:idSearchSetProduct:DealerInfo:ReceiveInfo:dssn:opp_DealerSalesStaffName").value = obj.dealerSalesStaffName;
- document.getElementById("page:mainForm:idSearchSetProduct:DealerInfo:ReceiveInfo:ds:opp_DealerService").value = obj.dealerService;
-
- document.getElementById("page:mainForm:idSearchSetProduct:DealerInfo:DealerSalesStaffName_Encrypted__c").value = obj.dealerSalesStaffNameEncrypt;
- document.getElementById("page:mainForm:idSearchSetProduct:DealerInfo:DealerService_Encrypted__c").value = obj.dealerServiceEncrypt;
- }
- }
- function GetAWSResultObj(){
- if(aws_result && aws_result.object && aws_result.object.length > 0){
- return aws_result.object[0];
- }
- return null;
- }
- var oppid = '';
- function Redirect(){
- window.location.href = '/'+oppid;
- }
- //aws 纭
- function Trans(){
- let b = HasError();
- console.log('---HasError---');
- console.log(b);
- console.log('---aws_result---');
- console.log(aws_result);
- if(b){
- //娓呯┖pi
- document.getElementById('page:mainForm:DealerInfo:ReceiveInfo:dssn:opp_DealerSalesStaffName').value=''
- document.getElementById('page:mainForm:DealerInfo:ReceiveInfo:ds:opp_DealerService').value=''
- }
- AWSService.post(staticResource.transactionUrl, JSON.stringify({
- "txId":aws_result.txId,
- "isSuccess":b ? 0 : 1
- }), function(result){
- console.log('---result---');
- console.log(result);
- console.log('finish');
- Redirect();
- //window.location.reload();
- }, staticResource.token);
-
- }
- function HasError(){
- let e = document.getElementById("page:mainForm:message");
- console.log(e);
- if (!e) {
- return false;
- }
- if(j$(e).find(".editListError").length > 0){
- return true;
- }
- let divs = j$(e).find("div.message");
- for (let i = 0; i < divs.length; i++) {
- for (let j = 0; j < divs[i].classList.length; j++) {
- for(let cls of divs[i].classList){
- if (cls.indexOf('error')>-1) {
- return true;
- }
- }
-
- }
-
- }
- return false;
- }
+ window.location.href = baseUrl + "/" + rtUrl;
+ }
</script>
<apex:form id="mainForm">
- <script>
- oppid = '{!oppid}';
- </script>
- <apex:actionFunction action="{!saveBtn}" name="saveBtn" reRender="mainForm,message" oncomplete="unblockUI();Trans();"/>
+ <apex:actionFunction action="{!saveBtn}" name="saveBtn" reRender="mainForm,message" oncomplete="unblockUI();"/>
<apex:actionFunction action="{!saveBtnYes}" name="saveBtnYes" reRender="mainForm,message" oncomplete="unblockUI();"/>
<apex:actionFunction action="{!saveBtnNo}" name="saveBtnNo" reRender="mainForm,message" oncomplete="unblockUI();"/>
@@ -218,28 +118,27 @@
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
- <apex:pageBlockSection id="DealerInfo" title="缁忛攢鍟嗙浉鍏充俊鎭�" columns="2">
+ <apex:pageBlockSection title="缁忛攢鍟嗙浉鍏充俊鎭�" columns="2">
<apex:pageBlockSectionItem >
<apex:outputLabel value="浠g悊鍟嗗悕" for="opp_Dealer"/>
<apex:inputField value="{!opp.Dealer__c}" id="opp_Dealer"/>
</apex:pageBlockSectionItem>
- <apex:pageBlockSectionItem id="dssn" >
- <apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName"/><!--pi-->
- </apex:pageBlockSectionItem>
-
+ <apex:pageBlockSectionItem >
+ <apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
+ <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName"/>
+ </apex:pageBlockSectionItem>
+
+
+
<apex:pageBlockSectionItem >
<apex:outputLabel value="涓棿鍟嗗悕" for="opp_SubDealer"/>
<apex:inputField value="{!opp.SubDealer__c}" id="opp_SubDealer"/>
</apex:pageBlockSectionItem>
- <apex:pageBlockSectionItem id="ds" >
+ <apex:pageBlockSectionItem >
<apex:outputLabel value="浠g悊鍟嗘湇鍔℃媴褰撹�呭悕" for="opp_DealerService"/>
- <apex:inputField value="{!opp.DealerService__c}" id="opp_DealerService"/><!--pi-->
+ <apex:inputField value="{!opp.DealerService__c}" id="opp_DealerService"/>
</apex:pageBlockSectionItem>
- <apex:inputHidden id="AWS_Data_Id__c" value="{!opp.AWS_Data_Id__c}"/>
- <apex:inputHidden id="DealerSalesStaffName_Encrypted__c" value="{!opp.DealerSalesStaffName_Encrypted__c}"/>
- <apex:inputHidden id="DealerService_Encrypted__c" value="{!opp.DealerService_Encrypted__c}"/>
</apex:pageBlockSection>
diff --git a/force-app/main/default/pages/NewLoanerApplication.page b/force-app/main/default/pages/NewLoanerApplication.page
index 00b63f3..c8da600 100644
--- a/force-app/main/default/pages/NewLoanerApplication.page
+++ b/force-app/main/default/pages/NewLoanerApplication.page
@@ -2,212 +2,26 @@
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.AWSService, 'AWSService.js') }" />
- <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
- <!-- Update 20220318 By Yang Kaiyu End -->
+
<script>
- // Update 20220318 By Yang Kaiyu Start
- aws_result = '';
- lu_aws_result = '';
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResource = JSON.parse('{!staticResource}');
- var staticResourceContact = JSON.parse('{!staticResourceContact}');
- var staticResourceLoanerUser = JSON.parse('{!staticResourceLoanerUser}');
- function searchPI(){
- console.log('---searchPI---');
- var conAwsDataid ='';
- conAwsDataid = document.getElementById("page:mainfrom:idSearchSetProduct:con_AWS_Data_Id__c").value;
- if(conAwsDataid){
- blockme();
- console.log('---AWSService---');
- AWSService.query(staticResourceContact.queryUrl,conAwsDataid,function(data){
- unblockUI();
- if(data.object){
- console.log('----------------data-----------------');
- console.log(data);
- console.log('----------------data-----------------');
- document.getElementById("page:mainfrom:idSearchSetProduct:Contact__c").value = '{!contactID}';
- document.getElementById("page:mainfrom:idSearchSetProduct:ContactNumber__c").value = data.object.phone;
- if(document.getElementById("page:mainfrom:idSearchSetProduct:ContactNumber__c").value){
- AWSService.post(staticResourceLoanerUser.newUrl, GetLUObj(), function(result){
- if(result && result.object){
- lu_aws_result = result;
- console.log('----------------result-----------------');
- console.log(result);
- console.log('----------------result-----------------');
- document.getElementById("page:mainfrom:idSearchSetProduct:lu_AWS_Data_Id__c").value = result.object.dataId;
- document.getElementById("page:mainfrom:idSearchSetProduct:ContactNumber__c").value = result.object.phone;
- document.getElementById("page:mainfrom:idSearchSetProduct:ContactNumber_Encrypted__c").value = result.object.phoneEncrypted;
- }
- }, staticResourceLoanerUser.token);
- }
- }
- },staticResourceContact.token);
- }
- }
- function GetLUObj(){
- return JSON.stringify([{
- contactNumber : document.getElementById("page:mainfrom:idSearchSetProduct:ContactNumber__c").value,
- dataId : document.getElementById("page:mainfrom:idSearchSetProduct:lu_AWS_Data_Id__c").value,
- }]);
- }
- function ProcessPI(sobjJson, payloadForNewPI,callback) {
- console.log('---insert---');
- AWSService.post(staticResource.newUrl, payloadForNewPI, function(result){
- aws_result = result
- SetEditObj();
- if(callback){
- callback();
- }
- }, staticResource.token);
- }
- function SetEditObj(){
- let obj = GetAWSResultObj();
- if(obj){
- document.getElementById("page:mainfrom:idSearchSetProduct:AWS_Data_Id__c").value = obj.dataId;
+ function saveJs() {
+ blockme();
+ saveBtn();
+ }
- document.getElementById("page:mainfrom:idSearchSetProduct:ReceiveInfo:pc:Post_Code__c").value = obj.postCode;
- document.getElementById("page:mainfrom:idSearchSetProduct:ReceiveInfo:lrsp:Loaner_receive_staff_phone__c").value= obj.loanerReceiveStaffPhone;
- document.getElementById("page:mainfrom:idSearchSetProduct:ReceiveInfo:lrs:Loaner_receive_staff__c").value = obj.loanerReceiveStaff;
- document.getElementById("page:mainfrom:idSearchSetProduct:LoanerApplicationDetailInfo:ls:Loaner_Ser__c").value = obj.loanerSer;
- document.getElementById("page:mainfrom:idSearchSetProduct:ReceiveInfo:dsa:direct_shippment_address__c").value = obj.directShippmentAddress;
-
- document.getElementById("page:mainfrom:idSearchSetProduct:direct_shippment_address_Encrypted__c").value = obj.directShippmentAddressEncrypt;
- document.getElementById("page:mainfrom:idSearchSetProduct:Pos_Code_Encrypted__c").value = obj.postCodeEncrypt;
- document.getElementById("page:mainfrom:idSearchSetProduct:Loaner_receive_staff_phone_Encrypted__c").value = obj.loanerReceiveStaffPhoneEncrypt;
- document.getElementById("page:mainfrom:idSearchSetProduct:Loaner_receive_staff_Encrypted__c").value = obj.loanerReceiveStaffEncrypt;
- document.getElementById("page:mainfrom:idSearchSetProduct:Loaner_Ser_Encrypted__c").value = obj.loanerSerEncrypt;
- }
+ function cancelJs() {
+ var baseUrl = '{!baseUrl}';
+ var rtUrl = '{!contactID}';
+ if (rtUrl == 'null' || rtUrl == '') {
+ rtUrl = '{!accountID}';
}
- function GetAWSResultObj(){
- if(aws_result && aws_result.object && aws_result.object.length > 0){
- return aws_result.object[0];
- }
- return null;
- }
- function GetObj(){
- return JSON.stringify([{
- dataId : document.getElementById("page:mainfrom:idSearchSetProduct:AWS_Data_Id__c").value,
- postCode : document.getElementById("page:mainfrom:idSearchSetProduct:ReceiveInfo:pc:Post_Code__c").value,
- loanerReceiveStaffPhone : document.getElementById("page:mainfrom:idSearchSetProduct:ReceiveInfo:lrsp:Loaner_receive_staff_phone__c").value,
- loanerReceiveStaff : document.getElementById("page:mainfrom:idSearchSetProduct:ReceiveInfo:lrs:Loaner_receive_staff__c").value,
- loanerSer : document.getElementById("page:mainfrom:idSearchSetProduct:LoanerApplicationDetailInfo:ls:Loaner_Ser__c").value,
- directShippmentAddress : document.getElementById("page:mainfrom:idSearchSetProduct:ReceiveInfo:dsa:direct_shippment_address__c").value,
- }]);
-
- }
-
- var bt1 = false;
- var bt2 = false;
- var laid = '';
- function Redirect(){
- if(bt1 && bt2){
- window.location.href = '/'+laid;
- }
- }
-
-
-
- //aws 纭
- function Transla(){
- let e = HasError();
- if(!e){
- AWSService.post(staticResourceLoanerUser.transactionUrl, JSON.stringify({
- "txId":lu_aws_result.txId,
- "isSuccess":e ? 0 : 1
- }), function(result){
- console.log('---result---');
- console.log(result);
- console.log('finish');
- bt1=true;
- Redirect();
- //window.location.reload();
- }, staticResourceLoanerUser.token);
- }
- }
- function Trans(){
- let b = HasError();
- console.log('---HasError---');
- console.log(b);
- console.log('---aws_result---');
- console.log(aws_result);
- if(b){
- //娓呯┖pi
- document.getElementById('page:mainfrom:idSearchSetProduct:ReceiveInfo:pc:Post_Code__c').value=''
- document.getElementById('page:mainfrom:idSearchSetProduct:ReceiveInfo:lrsp:Loaner_receive_staff_phone__c').value=''
- document.getElementById('page:mainfrom:idSearchSetProduct:ReceiveInfo:lrs:Loaner_receive_staff__c').value=''
- document.getElementById('page:mainfrom:idSearchSetProduct:LoanerApplicationDetailInfo:ls:Loaner_Ser__c').value=''
- document.getElementById('page:mainfrom:idSearchSetProduct:ReceiveInfo:dsa:direct_shippment_address__c').value=''
- }
- AWSService.post(staticResource.transactionUrl, JSON.stringify({
- "txId":aws_result.txId,
- "isSuccess":b ? 0 : 1
- }), function(result){
- console.log('---result---');
- console.log(result);
- console.log('finish');
- bt2=true;
- Redirect();
- //window.location.reload();
- }, staticResource.token);
-
- }
- function HasError(){
- let e = document.getElementById("page:mainfrom:message");
- console.log(e);
- if (!e) {
- return false;
- }
-
- if(j$(e).find(".editListError").length > 0){
- return true;
- }
-
- let divs = j$(e).find("div.message");
- for (let i = 0; i < divs.length; i++) {
- for (let j = 0; j < divs[i].classList.length; j++) {
- for(let cls in divs[i].classList){
- if (cls.indexOf('error')>-1) {
- return true;
- }
- }
-
- }
-
- }
- return false;
- }
- // Update 20220318 By Yang Kaiyu End
-
- function saveJs() {
- blockme();
- // Update 20220318 By Yang Kaiyu Start
- searchPI();
- ProcessPI({},GetObj(),function(){
- saveBtn();
- });
- // Update 20220318 By Yang Kaiyu End
- }
-
- function cancelJs() {
- var baseUrl = '{!baseUrl}';
- var rtUrl = '{!contactID}';
- if (rtUrl == 'null' || rtUrl == '') {
- rtUrl = '{!accountID}';
- }
- window.location.href = baseUrl + "/" + rtUrl;
- }
+ window.location.href = baseUrl + "/" + rtUrl;
+ }
</script>
<apex:form id="mainfrom">
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <script>
- laid = '{!laid}';
- </script>
- <!-- Update 20220318 By Yang Kaiyu End -->
- <apex:actionFunction action="{!saveBtn}" name="saveBtn" reRender="mainfrom,message" oncomplete="unblockUI();Transla();Trans();"/>
+
+ <apex:actionFunction action="{!saveBtn}" name="saveBtn" reRender="mainForm,message" oncomplete="unblockUI();"/>
<apex:actionFunction action="{!cancelBtn}" name="cancelBtn" reRender="mainForm,message" oncomplete="unblockUI();"/>
<apex:outputPanel id="message">
@@ -221,9 +35,7 @@
</apex:pageBlockButtons>
<apex:outputPanel layout="none" >
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:pageBlockSection id="LoanerApplicationDetailInfo" title="鏍锋満鍊熷嚭鐢宠璇︾粏淇℃伅" columns="2">
- <!-- Update 20220318 By Yang Kaiyu End -->
+ <apex:pageBlockSection title="鏍锋満鍊熷嚭鐢宠璇︾粏淇℃伅" columns="2">
<apex:pageBlockSectionItem >
<apex:outputLabel value="鏍锋満鍊熷嚭鐢宠鍚嶇О" for="la_Name"/>
@@ -233,15 +45,11 @@
<apex:outputLabel value="鏍锋満鍒嗙被" for="la_Type"/>
<apex:inputField value="{!la.Equipment_Type__c}" id="la_Type" required="true"/>
</apex:pageBlockSectionItem>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:pageBlockSectionItem id="ls" >
- <!-- Update 20220318 By Yang Kaiyu End -->
+ <apex:pageBlockSectionItem >
<apex:outputLabel value="鍊熺敤鎷呭綋" for="Loaner_Ser__c"/>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:inputField value="{!la.Loaner_Ser__c}" id="Loaner_Ser__c" required="true"/><!--pi-->
- <!-- Update 20220318 By Yang Kaiyu End -->
+ <apex:inputField value="{!la.Loaner_Ser__c}" id="Loaner_Ser__c" required="true"/>
</apex:pageBlockSectionItem>
-
+
<apex:pageBlockSectionItem rendered="{!IF(userType == 'Standard', false , true)}">
<apex:outputLabel value="瀹℃壒浜�" for="Approver__c"/>
<apex:inputField value="{!la.Approver__c}" id="Approver__c" required="true"/>
@@ -509,70 +317,35 @@
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:pageBlockSection id="ReceiveInfo" title="鏀朵欢浜轰俊鎭�" columns="2">
- <apex:pageBlockSectionItem id="lrs" >
- <!-- Update 20220318 By Yang Kaiyu End -->
+ <apex:pageBlockSection title="鏀朵欢浜轰俊鎭�" columns="2">
+ <apex:pageBlockSectionItem >
<apex:outputLabel value="鏀朵欢浜哄鍚�" for="Loaner_receive_staff__c"/>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:inputField value="{!la.Loaner_receive_staff__c}" id="Loaner_receive_staff__c"/><!--pi-->
- <!-- Update 20220318 By Yang Kaiyu End -->
+ <apex:inputField value="{!la.Loaner_receive_staff__c}" id="Loaner_receive_staff__c"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="鑷彁鏃堕棿" for="pickup_time__c"/>
<apex:inputField value="{!la.pickup_time__c}" id="pickup_time__c"/>
</apex:pageBlockSectionItem>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:pageBlockSectionItem id="dsa" >
- <!-- Update 20220318 By Yang Kaiyu End -->
+ <apex:pageBlockSectionItem >
<apex:outputLabel value="鏀朵欢浜鸿缁嗗湴鍧�" for="direct_shippment_address__c"/>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:inputField value="{!la.direct_shippment_address__c}" id="direct_shippment_address__c"/><!--pi-->
- <!-- Update 20220318 By Yang Kaiyu End -->
+ <apex:inputField value="{!la.direct_shippment_address__c}" id="direct_shippment_address__c"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
</apex:pageBlockSectionItem>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:pageBlockSectionItem id="lrsp" >
- <!-- Update 20220318 By Yang Kaiyu End -->
+ <apex:pageBlockSectionItem >
<apex:outputLabel value="鏀朵欢浜虹數璇�" for="Loaner_receive_staff_phone__c"/>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:inputField value="{!la.Loaner_receive_staff_phone__c}" id="Loaner_receive_staff_phone__c"/><!--pi-->
- <!-- Update 20220318 By Yang Kaiyu Emd -->
+ <apex:inputField value="{!la.Loaner_receive_staff_phone__c}" id="Loaner_receive_staff_phone__c"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
</apex:pageBlockSectionItem>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:pageBlockSectionItem id="pc" >
- <!-- Update 20220318 By Yang Kaiyu End -->
+ <apex:pageBlockSectionItem >
<apex:outputLabel value="閭紪" for="Post_Code__c"/>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:inputField value="{!la.Post_Code__c}" id="Post_Code__c"/><!--pi-->
- <!-- Update 20220318 By Yang Kaiyu End -->
- </apex:pageBlockSectionItem>
+ <apex:inputField value="{!la.Post_Code__c}" id="Post_Code__c"/>
+ </apex:pageBlockSectionItem>
</apex:pageBlockSection>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <apex:inputHidden id="AWS_Data_Id__c" value="{!la.AWS_Data_Id__c}"/>
- <apex:inputHidden id="Loaner_Ser_Encrypted__c" value="{!la.Loaner_Ser_Encrypted__c}"/>
- <apex:inputHidden id="Pos_Code_Encrypted__c" value="{!la.Pos_Code_Encrypted__c}"/>
- <apex:inputHidden id="direct_shippment_address_Encrypted__c" value="{!la.direct_shippment_address_Encrypted__c}"/>
- <apex:inputHidden id="Loaner_receive_staff_phone_Encrypted__c" value="{!la.Loaner_receive_staff_phone_Encrypted__c}"/>
- <input id="page:mainfrom:idSearchSetProduct:Loaner_receive_staff_Encrypted__c" type="hidden" name="page:mainfrom:idSearchSetProduct:Loaner_receive_staff_Encrypted__c" value="{!la.Loaner_receive_staff_Encrypted__c}"/>
- <apex:inputHidden id="Contact__c" value="{!lu.Contact__c}"/>
- <!-- <apex:inputHidden id="lu_AWS_Data_Id__c" value="{!lu.AWS_Data_Id__c}"/> -->
- <apex:inputHidden id="ContactNumber__c" value="{!lu.ContactNumber__c}"/>
- <apex:inputHidden id="ContactNumber_Encrypted__c" value="{!lu.ContactNumber_Encrypted__c}"/>
- <!-- <input id="page:mainfrom:idSearchSetProduct:Contact__c" type="hidden" name="page:mainfrom:idSearchSetProduct:Contact__c" value="{!lu.Contact__c}"/> -->
- <input id="page:mainfrom:idSearchSetProduct:lu_AWS_Data_Id__c" type="hidden" name="page:mainfrom:idSearchSetProduct:lu_AWS_Data_Id__c" value="{!lu.AWS_Data_Id__c}"/>
- <!-- <input id="page:mainfrom:idSearchSetProduct:ContactNumber__c" type="hidden" name="page:mainfrom:idSearchSetProduct:ContactNumber__c" value="{!lu.ContactNumber__c}"/> -->
- <!-- <input id="page:mainfrom:idSearchSetProduct:ContactNumber_Encrypted__c" type="hidden" name="page:mainfrom:idSearchSetProduct:ContactNumber_Encrypted__c" value="{!lu.ContactNumber_Encrypted__c}"/> -->
-
- <apex:inputHidden id="con_AWS_Data_Id__c" value="{!con.AWS_Data_Id__c}"/>
- <apex:inputHidden id="con_id" value="{!con.id}"/>
- <!-- Update 20220318 By Yang Kaiyu End -->
<apex:pageBlockSection title="澶囨敞" >
<apex:pageBlockSectionItem >
<apex:outputLabel value="澶囨敞" for="loaner_Remark__c"/>
@@ -601,9 +374,7 @@
<apex:inputField value="{!la.DealerOrder_From__c}" id="DealerOrder_From__c"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
- <!-- Update 20220318 By Yang Kaiyu Start -->
- <!-- <apex:inputHidden id="Loaner_receive_staff_Encrypted__c" value="{!la.Loaner_receive_staff_Encrypted__c}"/> -->
- <!-- Update 20220318 By Yang Kaiyu End -->
+
diff --git a/force-app/main/default/pages/NewLoanerUser.page b/force-app/main/default/pages/NewLoanerUser.page
index 8b94606..66989ea 100644
--- a/force-app/main/default/pages/NewLoanerUser.page
+++ b/force-app/main/default/pages/NewLoanerUser.page
@@ -1,179 +1,26 @@
-<apex:page standardController="loaner_user__c" extensions="NewLoanerUserController" id="allPage" showHeader="true" sidebar="false" action="{!init}" title="鏂板缓鏍锋満鍊熺敤瀹㈡埛">
-<!-- <apex:page standardController="loaner_user__c" extensions="NewLoanerUserController" showHeader="true" sidebar="false" action="{!init}" title="鏂板缓鏍锋満鍊熺敤瀹㈡埛"> -->
- <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
- <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
- <!-- Update 20220317 By Yang Kaiyu Start -->
- <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
- <apex:includeScript value="/soap/ajax/40.0/connection.js"/>
- <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
- <!-- Update 20220317 By Yang Kaiyu End -->
- <script>
- // Update 20220317 By Yang Kaiyu Start
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResource = JSON.parse('{!staticResource}');
- var staticResourceContact = JSON.parse('{!staticResourceContact}');
- var aws_data = {};
- let conList = [];
- //鏇挎崲vlookup
- var closeField = '';
- var newSearchContactWindow = null;
- var contactInfoStr = '';
- var conValue = ''
- //鑷畾涔塴ookup鏌ヨ
- function searchContact(contactNodeId,field,conValue,conid){
- closeField = conid;
- this.conValue = conValue;
- let accountValue = "";
- if (document.getElementById(field)!=null) {
- accountValue = document.getElementById(field).value;
- }
- console.log(accountValue);
- if(accountValue !='000000000000000'){
- let baseUrl = "/apex/SearchContactPage";
- let searchContactKeyWord = document.getElementById(conid).value;
- let suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue+"&searchContactKeyWord=" + searchContactKeyWord;
- let newSearchContactParam = 'height=600,width=800,left=100,top=100,dialogHide=true,resizable=no,scrollbars=yes,toolbar=no,status=no';
- newSearchContactWindow = window.open(baseUrl+suffixUrl, 'Popup', newSearchContactParam);
- if (window.focus) {
- newSearchContactWindow.focus();
- }
- return false;
- }else{
- alert('璇峰厛閫夋嫨瀹㈡埛鍐嶉�夋嫨鑱旂郴浜�')
- }
- }
- var dataLinesJson;
- function replaceSearchContactLookup() {
- conList = JSON.parse('{!conListJson}');
- dataLinesJson = JSON.parse('{!dataLinesJson}');
- console.log('dataLinesJson = ' + dataLinesJson);
- for(var i = 0;i<dataLinesJson.length;i++){
- let ii = i;
- document.getElementById('allPage:allForm:allBlock:lines:'+ii+':contact').addEventListener('click',function(){
- searchContact('allPage:allForm:contactId','allPage:allForm:allBlock:lines:'+ii+':customer_lkid','allPage:allForm:allBlock:lines:'+ii+':contactId_Hidden','allPage:allForm:allBlock:lines:'+ii+':contact');
- });
- }
-
-
- }
- function htmlToElement(html) {
- var template = document.createElement('template');
- html = html.trim(); // Never return a text node of whitespace as the result
- template.innerHTML = html;
- return template.content.firstChild;
- }
- function closePopupWindow() {
- if (null != newSearchContactWindow) {
- newSearchContactWindow.close();
- }
- contactInfoStr = document.getElementById('allPage:allForm:contactId').value;
- console.log('closePopup:'+contactInfoStr);
- let contactInfo = JSON.parse(contactInfoStr);
- let contactNodeId = conValue;
- document.getElementById(contactNodeId).value = contactInfo.ContactId;
- document.getElementById(closeField).value = contactInfo.Name;
- }
- function DecryptAll(){
- let dataIds = [];
-
- //"{!conList}".each((i,e)=>{
- // console.log('------------------')
- // console.log(e);
- // let v = "{!conList}"[i].contactIdValue;
- // if (v) {
- // dataIds.push(v);
- // }
- //});
- conList = JSON.parse('{!conListJson}');
- if(conList){
- for(var i=0 ;i<conList.length;i++){
- if(conList[i]!=null){
- let v = conList[i].contactIdValue;
- if (v) {
- dataIds.push(v);
- }
- }
- }
- }
-
- Decrypt(dataIds);
- }
- j$(function(){
- DecryptAll();
-
- })
- function Decrypt(dataIds){
- let Foo = function(){
- for (const id in dataIds) {
- if (aws_data.hasOwnProperty(dataIds[id])) {
- let d = aws_data[dataIds[id]];
- let $e =j$("[aws-id='"+d.dataId+ "']");
- //$e.html(d[$e.attr("aws-id")]);
- $e.each(function(i,e){
- j$(e).val(d.lastName);
- })
- }
- }
- }
- let ids = [];
- //for (const id in dataIds) {
- // if (!aws_data.hasOwnProperty(id)) {
- // ids.push(id);
- // }
- //}
- for(var i =0 ;i<dataIds.length;i++){
- if (!aws_data.hasOwnProperty(dataIds[i])) {
- ids.push(dataIds[i]);
- }
- }
- if (ids.length > 0) {
- blockme();
- AWSService.search(staticResourceContact.searchUrl,
- JSON.stringify({
- "dataIds":ids
- }),
- function(data){
- unblockUI();
- if(data.object && data.object.length > 0){
-
- for(let d in data.object){
- console.log('----------------')
- console.log(d);
- if(data.object[d].dataId){
- aws_data[data.object[d].dataId] = data.object[d];
- }
- }
- Foo();
- }
- },
- staticResourceContact.token);
- }else{
- Foo();
- }
- }
- // Update 20220317 By Yang Kaiyu End
- function saveJs() {
- if(confirm('鑱旂郴浜哄拰瀹㈡埛涓哄繀濉俊鎭�,濡傛灉涓虹┖灏嗕笉淇濆瓨姝ゆ潯璁板綍,鏄惁宸茬‘璁ゆ墍鏈夐渶瑕佷繚瀛樼殑淇℃伅璇ュ瓧娈甸兘涓嶄负绌�?')){
- blockme();
- updateUser();
- }
+<apex:page standardController="loaner_user__c" extensions="NewLoanerUserController" showHeader="true" sidebar="false" action="{!init}" title="鏂板缓鏍锋満鍊熺敤瀹㈡埛">
+<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+<script>
+
+function saveJs() {
+ if(confirm('鑱旂郴浜哄拰瀹㈡埛涓哄繀濉俊鎭�,濡傛灉涓虹┖灏嗕笉淇濆瓨姝ゆ潯璁板綍,鏄惁宸茬‘璁ゆ墍鏈夐渶瑕佷繚瀛樼殑淇℃伅璇ュ瓧娈甸兘涓嶄负绌�?')){
+ blockme();
+ updateUser();
}
- </script>
+}
+</script>
- <style type="text/css">
- .dateFormat{
- display: none;
- }
- </style>
+<style type="text/css">
+ .dateFormat{
+ display: none;
+ }
+</style>
<apex:form id="allForm">
- <!-- Update 20220317 By Yang Kaiyu Start -->
- <apex:inputHidden value="{!contactId}" id="contactId" />
- <!-- Update 20220317 By Yang Kaiyu End -->
<apex:actionFunction name="updateUser" action="{!updateUser}" rerender="allForm,message,allPanel" onComplete="unblockUI();"></apex:actionFunction>
<apex:outputPanel id="message">
<apex:messages />
@@ -195,38 +42,23 @@
<div style="overflow: scroll;height: 300px;width: 1260px; ">
<apex:variable value="{!1}" var="cnt" />
<apex:repeat value="{!dataLines}" var="line" id="lines">
- <div style="width: 1260px;">
- {!$ObjectType.loaner_user__c.fields.Customer__c.label}:
- <!-- Update 20220317 By Yang Kaiyu Start -->
- <apex:inputField id="customer" value="{!line.Customer__c}" />
- <!-- Update 20220317 By Yang Kaiyu End -->
+ <div style="width: 1260px;">
+ {!$ObjectType.loaner_user__c.fields.Customer__c.label}:
+ <apex:inputField value="{!line.Customer__c}" />
{!$ObjectType.loaner_user__c.fields.Contact__c.label}:
- <!-- Update 20220317 By Yang Kaiyu Start -->
- <!-- <apex:inputField id="contact" value="{!line.Contact__c}" html-aws-id="{!line.Contact__r.AWS_Data_Id__c}" /> -->
- <apex:inputText id="contact" html-aws-id="{!line.Contact__r.AWS_Data_Id__c}" disabled="false" value="{!line.Contact__r.LastName}" ></apex:inputText>
- <apex:inputText id="contactId_Hidden" value="{!line.Contact__c}" style="display:none"/>
- <!-- Update 20220317 By Yang Kaiyu End -->
-
+ <apex:inputField value="{!line.Contact__c}" />
{!$ObjectType.loaner_user__c.fields.FromThePeriod__c.label}:
<apex:inputField value="{!line.FromThePeriod__c}"/>
{!$ObjectType.loaner_user__c.fields.EndThePeriod__c.label}:
<apex:inputField value="{!line.EndThePeriod__c}"/>
- {!$ObjectType.loaner_user__c.fields.Follow_UP_Opp__c.label}:
- <apex:inputField value="{!line.Follow_UP_Opp__c}"/>
+ {!$ObjectType.loaner_user__c.fields.Follow_UP_Opp__c.label}:
+ <apex:inputField value="{!line.Follow_UP_Opp__c}"/>
{!$ObjectType.loaner_user__c.fields.Remarks__c.label}:
<apex:inputField value="{!line.Remarks__c}"/>
+
<apex:variable value="{!cnt + 1}" var="cnt" />
</div>
</apex:repeat>
- <!-- Update 20220317 By Yang Kaiyu Start -->
- <script>
- sfdcPage.appendToOnloadQueue(function () {
- //Replace Vlookup Field
-
- replaceSearchContactLookup();
- })
- </script>
- <!-- Update 20220317 By Yang Kaiyu End -->
</div>
</apex:pageBlock>
diff --git a/force-app/main/default/pages/NewOpportunity.page b/force-app/main/default/pages/NewOpportunity.page
index e6b049c..5d469d7 100644
--- a/force-app/main/default/pages/NewOpportunity.page
+++ b/force-app/main/default/pages/NewOpportunity.page
@@ -1,75 +1,12 @@
<apex:page id="Page" Controller="NewOpportunityController" sidebar="true" showHeader="true" action="{!init}">
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<script>
- var staticResource = JSON.parse('{!staticResource}');
- var txId = '';
- // var DealerSalesStaffNameId = 'Page:mainForm:idSearchSetProduct:j_id53:j_id56:opp_DealerSalesStaffName';
- // var DealerServiceId = 'Page:mainForm:idSearchSetProduct:j_id53:j_id62:opp_DealerService';
- var DealerSalesStaffNameId = 'PIAPIBACK_opp_DealerSalesStaffName';
- var DealerServiceId = 'PIAPIBACK_opp_DealerService';
- var opportunityAWSDataId = 'Page:mainForm:idSearchSetProduct:j_id55:opportunityAWSDataId';
- function getPIData(){
- let opportunityPayloadList = [];
- let opportunityPIData = new Object();
-
- if(document.getElementsByClassName(DealerSalesStaffNameId)[0]){
- opportunityPIData.dealerSalesStaffName = document.getElementsByClassName(DealerSalesStaffNameId)[0].value
- }
- if(document.getElementsByClassName(DealerServiceId)[0]){
- opportunityPIData.dealerService = document.getElementsByClassName(DealerServiceId)[0].value
- }
- opportunityPayloadList.push(opportunityPIData);
- return JSON.stringify(opportunityPayloadList);
- }
function saveJs() {
blockme();
- new Promise(function(resolve,reject){
- //鍔犲瘑
- let queryPostBack = function(data){
- if(document.getElementsByClassName(DealerSalesStaffNameId)[0]){
- document.getElementsByClassName(DealerSalesStaffNameId)[0].value = data.object[0].dealerSalesStaffName;
- }
- if(document.getElementsByClassName(DealerServiceId)[0]){
- document.getElementsByClassName(DealerServiceId)[0].value = data.object[0].dealerService;
- }
- if(document.getElementById(opportunityAWSDataId)){
- document.getElementById(opportunityAWSDataId).value = data.object[0].dataId;
- }
- txId = data.txId;
- resolve('success');
- };
- AWSService.post(staticResource.newUrl,getPIData(),queryPostBack,staticResource.token);
- }).then(function(data){
- saveBtn();
- Trans();
- })
- }
- //aws 纭
- function Trans(){
- let b = HasError();
- if(b){
- //娓呯┖浠g悊鍟嗛攢鍞媴褰撹�呭悕
- if(document.getElementsByClassName(DealerSalesStaffNameId)[0]){
- document.getElementsByClassName(DealerSalesStaffNameId)[0].value=''
- }
- if(document.getElementsByClassName(DealerServiceId)[0]){
- document.getElementsByClassName(DealerServiceId)[0].value=''
- }
- }
- AWSService.post(staticResource.transactionUrl, JSON.stringify({
- "txId":txId,
- "isSuccess":b ? 0 : 1
- }), function(result){
- console.log('Trans result = '+ JSON.stringify(result));
- }, staticResource.token);
- }
- function HasError(){
- let e = document.getElementById("Page:mainForm:message");
- return e.children[0]!=null;
+ saveBtn();
}
function saveYesJs() {
@@ -154,10 +91,10 @@
<apex:outputLabel value="COMPO璇环" for="compo_opp"/>
<apex:inputField value="{!opp.compo_opp__c}" id="compo_opp"/>
</apex:pageBlockSectionItem>
- <apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'BS', true, false)}">
+ <!-- <apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'BS', true, false)}">
<apex:outputLabel value="鐢ㄩ��" for="useing"/>
<apex:inputField value="{!opp.useing__c}" id="useing"/>
- </apex:pageBlockSectionItem>
+ </apex:pageBlockSectionItem> -->
</apex:pageBlockSection>
<apex:pageBlockSection title="缁撴灉淇℃伅" columns="2">
@@ -201,12 +138,12 @@
<apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', false, true)}">
<apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName" styleClass="PIAPIBACK_opp_DealerSalesStaffName"/>
+ <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', true, false)}">
<apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName" styleClass="PIAPIBACK_opp_DealerSalesStaffName" required="true"/>
+ <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName" required="true"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
@@ -215,9 +152,8 @@
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="浠g悊鍟嗘湇鍔℃媴褰撹�呭悕" for="opp_DealerService"/>
- <apex:inputField value="{!opp.DealerService__c}" id="opp_DealerService" styleClass="PIAPIBACK_opp_DealerService"/>
+ <apex:inputField value="{!opp.DealerService__c}" id="opp_DealerService"/>
</apex:pageBlockSectionItem>
- <apex:inputHidden id="opportunityAWSDataId" value="{!opp.AWS_Data_Id__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="绔炰簤鑰呬俊鎭�" columns="2">
@@ -382,13 +318,13 @@
<!-- <apex:outputPanel layout="none" rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', false, true)}"> -->
<apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', false, true)}">
<apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕." for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.Dealer_Sales_Staff_Name_D__c}" id="opp_DealerSalesStaffName" styleClass="PIAPIBACK_opp_DealerSalesStaffName"/>
+ <apex:inputField value="{!opp.Dealer_Sales_Staff_Name_D__c}" id="opp_DealerSalesStaffName"/>
</apex:pageBlockSectionItem>
<!-- </apex:outputPanel> -->
<!-- <apex:outputPanel rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', true, false)}" layout="inline"> -->
<apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', true, false)}">
<apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕." for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.Dealer_Sales_Staff_Name_D__c}" id="opp_DealerSalesStaffName" required="true" styleClass="PIAPIBACK_opp_DealerSalesStaffName"/>
+ <apex:inputField value="{!opp.Dealer_Sales_Staff_Name_D__c}" id="opp_DealerSalesStaffName" required="true"/>
</apex:pageBlockSectionItem>
<!-- </apex:outputPanel> -->
<apex:pageBlockSectionItem >
@@ -397,9 +333,8 @@
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="浠g悊鍟嗘湇鍔℃媴褰撹�呭悕." for="opp_DealerService"/>
- <apex:inputField value="{!opp.Dealer_Service_D__c}" id="opp_DealerService" styleClass="PIAPIBACK_opp_DealerService"/>
+ <apex:inputField value="{!opp.Dealer_Service_D__c}" id="opp_DealerService"/>
</apex:pageBlockSectionItem>
- <apex:inputHidden id="opportunityAWSDataId" value="{!opp.AWS_Data_Id__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="绔炰簤鑰呬俊鎭�" columns="2">
diff --git a/force-app/main/default/pages/NewQuoteEntry.page b/force-app/main/default/pages/NewQuoteEntry.page
index 0d72380..e2294a7 100644
--- a/force-app/main/default/pages/NewQuoteEntry.page
+++ b/force-app/main/default/pages/NewQuoteEntry.page
@@ -59,6 +59,7 @@
var changedAfterPrint = false;
var changedAfterBid = false;
+
if (changedAfterBid == 'true') {
if (confirm(Confirm_ChangedAfterBid)) {
blockme();
diff --git a/force-app/main/default/pages/NewRepairParts.page b/force-app/main/default/pages/NewRepairParts.page
index 08429c6..bd5f88b 100644
--- a/force-app/main/default/pages/NewRepairParts.page
+++ b/force-app/main/default/pages/NewRepairParts.page
@@ -3,23 +3,6 @@
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
- <style>
- .pbSubheader {
- background: #BFB19C!important;
- /*background-color: #FFFFFF!important;*/
- /*background: #BFB19C;*/
- /*background-color: #44A3BB!important;
- background-color: #E6E6FA!important;*/
- /*background-color: #1797c0!important;*/
- background-color: #DFE6F0!important;
- /*color:#607799;*/
- /*color:#FFFFFF!important;*/
- /*background-color: #FFFFFF!important;*/
- /*font-size:12pt;
- font-family:verdana;*/
- font-weight:bold;
- }
- </style>
<script>
//var isReturn = true;
function returnSWOPage(){
@@ -50,56 +33,46 @@
}
blockme();
deleteAction();
+
}
}
- function toSearchProduct(){
- var baseUrl = j$(escapeVfId("baseUrl")).value();
- window.open(baseUrl + '/apex/NewSearchProductPage','_blank', 'width=500,height=300,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true);
- }
- function searchProduct(){
- var baseUrl = '{!baseUrl}';
-
- openPopup(baseUrl + '/apex/NewSearchProductPage', 'setsearch', 950, 450, 'width=500,height=300,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true);
- }
- function productReturnJS(id,code,eccode,description){
- j$(escapeVfId("Product")).val(id);
- j$(escapeVfId("Page:formInfo:RepairPartInfo:j_id42:j_id46:ITEM")).val(code);
- j$(escapeVfId("PART_NUMBER")).val(eccode);
- j$(escapeVfId("DESCRIPTION")).val(description);
- }
-
- function setProduct(){
- blockme();
- var productId = j$(escapeVfId("Page:formInfo:RepairPartInfo:j_id39:j_id43:Product")).val();
- productReturn(productId);
- }
</script>
-
+ <style type="text/css">
+ .pbSubheader {
+ background: #BFB19C!important;
+ /*background-color: #FFFFFF!important;*/
+ /*background: #BFB19C;*/
+ /*background-color: #44A3BB!important;
+ background-color: #E6E6FA!important;*/
+ /*background-color: #1797c0!important;*/
+ background-color: #DFE6F0!important;
+ /*color:#607799;*/
+ /*color:#FFFFFF!important;*/
+ /*background-color: #FFFFFF!important;*/
+ /*font-size:12pt;
+ font-family:verdana;*/
+ font-weight:bold;
+
+ }
+ </style>
<apex:form id="formInfo">
<apex:outputPanel id="message">
<apex:pagemessages />
</apex:outputPanel>
<apex:actionFunction name="save" action="{!save}" oncomplete="returnSWOPage();unblockUI();" reRender="formInfo,message"/>
<apex:actionFunction name="deleteAction" action="{!deleteAction}" oncomplete="returnSWOPage();unblockUI();" reRender="formInfo,message"/>
- <apex:actionFunction name="productReturn" action="{!productReturn}" oncomplete="unblockUI();" reRender="formInfo">
- <apex:param name="productId" value="{!productId}" />
- </apex:actionFunction>
<input type="hidden" id="repairPartId" value="{!repairId}" />
<input type="hidden" id="pageClose" value="{!pageClose}" />
<input type="hidden" id="swoId" value="{!repairPart.SWO_ID__c}" />
<input type="hidden" id="id" value="{!repairPart.Id}" />
- <input type="hidden" id="baseUrl" value="{!baseUrl}" />
- <input type="hidden" id="Product" value="{!repairPart.Product__c}" />
- <input type="hidden" id="PART_NUMBER" value="{!repairPart.PART_NUMBER__c}" />
- <input type="hidden" id="DESCRIPTION" value="{!repairPart.DESCRIPTION__c}" />
<apex:pageBlock id="RepairPartInfo" title="RepairPart">
<apex:pageBlockButtons location="top">
<apex:commandButton onclick="saveJS()" value="Save" oncomplete="returnSWOPage();" reRender="formInfo,messageInfo" style="width: 10%">
</apex:commandButton>
- <apex:commandButton onclick="closePage();" value="Cancel" style="width: 10%">
+ <apex:commandButton onclick="closePage()" value="Cancel" style="width: 10%">
</apex:commandButton>
<!-- onclick="deleteJS();" -->
@@ -118,29 +91,9 @@
<apex:outputField value="{!repairPart.SWO_ID__c}" id="SWO_ID" />
</apex:pageBlockSectionItem>
- <!-- <apex:pageBlockSectionItem >
+ <apex:pageBlockSectionItem >
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.Product__c.label}" for="ITEM"/>
<apex:inputField value="{!repairPart.Product__c}" id="ITEM" required="true"/>
- </apex:pageBlockSectionItem> -->
-
- <apex:pageBlockSectionItem >
- <apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.Product__c.label}" for="Product"/>
- <apex:inputField value="{!repairPart.Product__c}" id="Product" required="true" />
- </apex:pageBlockSectionItem>
-
- <apex:pageBlockSectionItem >
- <apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.ITEM_ProductCode__c.label}" for="ITEM"/>
- <apex:inputField value="{!repairPart.ITEM_ProductCode__c}" id="ITEM"/>
- </apex:pageBlockSectionItem>
-
- <apex:pageBlockSectionItem >
- <apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.PART_NUMBERNew__c.label}" for="PART_NUMBER"/>
- <apex:inputField value="{!repairPart.PART_NUMBERNew__c}" id="PART_NUMBER"/>
- </apex:pageBlockSectionItem>
-
- <apex:pageBlockSectionItem >
- <apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.DescriptionNew__c.label}" for="Description"/>
- <apex:inputField value="{!repairPart.DescriptionNew__c}" id="Description"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
@@ -226,59 +179,4 @@
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
-
- <!-- 閫夋嫨浜у搧寮瑰嚭灞傞儴鍒� -->
-
- <!-- <div id="popBox">
- <div class="close">
- <a href="javascript:void(0)" onclick="closeBox()">鍏抽棴</a>
- </div>
- <div class="content">
- <table width="100%">
- <colgroup>
- <col width="33%"></col>
- <col width="33%"></col>
- <col width="33%"></col>
- </colgroup>
- <tr>
- <td>
- <apex:selectList id="type" value="{!ConditionType}" size="1">
- <apex:selectOption itemLabel="浜у搧鍚嶇О" itemValue="name"></apex:selectOption>
- <apex:selectOption itemLabel="浜у搧浠g爜" itemValue="code"></apex:selectOption>
- <apex:selectOption itemLabel="EC浠g爜" itemValue="eccode"></apex:selectOption>
- </apex:selectList>
- </td>
- <td>
- <apex:inputText value="{!ByCondition}"></apex:inputText>
- </td>
- <td>
- <apex:commandButton action="{!doSearch}" onclick="blockme();" reRender="data" oncomplete="unblockUI();" value="鏌ヨ"></apex:commandButton>
- </td>
- </tr>
- <tr>
- <th>浜у搧鍚嶇О</th>
- <th>浜у搧浠g爜</th>
- <th>EC浠g爜</th>
- </tr>
- </table>
- <div style="width: 100%;height: 100%;overflow:auto;">
- <table width="100%">
- <colgroup>
- <col width="33%"></col>
- <col width="33%"></col>
- <col width="33%"></col>
- </colgroup>
- <apex:repeat value="{!dataList}" var="line" id="result">
- <tr>
- <td><apex:outputLink value="javascript:void(0)" onclick="returnBefore('{!line.id}','{!line.code}','{!line.eccode}','{!line.description}')">{!line.name}</apex:outputLink></td>
- <td><apex:outputLink value="javascript:void(0)" onclick="returnBefore('{!line.id}','{!line.code}','{!line.eccode}','{!line.description}')">{!line.code}</apex:outputLink></td>
- <td><apex:outputLink value="javascript:void(0)" onclick="returnBefore('{!line.id}','{!line.code}','{!line.eccode}','{!line.description}')">{!line.eccode}</apex:outputLink></td>
- </tr>
- </apex:repeat>
- </table>
- </div>
- </div>
- </div>
- <div id="popLayer">
- </div> -->
</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/NewReplacementOpportunity.page b/force-app/main/default/pages/NewReplacementOpportunity.page
index 0b04ed8..9934402 100644
--- a/force-app/main/default/pages/NewReplacementOpportunity.page
+++ b/force-app/main/default/pages/NewReplacementOpportunity.page
@@ -1,54 +1,12 @@
<apex:page id="Page" Controller="NewReplacementOpportunityController" sidebar="true" showHeader="true" action="{!init}">
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<script>
- var staticResource = JSON.parse('{!staticResource}');
- var txId = '';
- function getPIData(){
- let opportunityPayloadList = [];
- let opportunityPIData = new Object();
- opportunityPIData.dealerSalesStaffName = document.getElementById('Page:mainForm:idSearchSetProduct:j_id35:j_id38:opp_DealerSalesStaffName').value
- opportunityPayloadList.push(opportunityPIData);
- return JSON.stringify(opportunityPayloadList);
- }
function saveJs() {
blockme();
- new Promise(function(resolve,reject){
- //鍔犲瘑
- let queryPostBack = function(data){
- document.getElementById('Page:mainForm:idSearchSetProduct:j_id35:j_id38:opp_DealerSalesStaffName').value = data.object[0].dealerSalesStaffName;
- document.getElementById('Page:mainForm:idSearchSetProduct:j_id35:opportunityAWSDataId').value = data.object[0].dataId;
- txId = data.txId;
- resolve('success');
- };
- AWSService.post(staticResource.newUrl,getPIData(),queryPostBack,staticResource.token);
- }).then(function(data){
- saveBtn();
- Trans();
- })
- }
-
- //aws 纭
- function Trans(){
- let b = HasError();
- if(b){
- //娓呯┖浠g悊鍟嗛攢鍞媴褰撹�呭悕
- document.getElementById('Page:mainForm:idSearchSetProduct:j_id35:j_id38:opp_DealerSalesStaffName').value=''
- }
- AWSService.post(staticResource.transactionUrl, JSON.stringify({
- "txId":txId,
- "isSuccess":b ? 0 : 1
- }), function(result){
- console.log('Trans result = '+ JSON.stringify(result));
- }, staticResource.token);
- }
-
- function HasError(){
- let e = document.getElementById("Page:mainForm:message");
- return e.children[0]!=null;
+ saveBtn();
}
function saveYesJs() {
@@ -72,7 +30,7 @@
</script>
<apex:form id="mainForm">
- <apex:actionFunction action="{!saveBtn}" name="saveBtn" reRender="mainForm,message" oncomplete="Trans();unblockUI();"/>
+ <apex:actionFunction action="{!saveBtn}" name="saveBtn" reRender="mainForm,message" oncomplete="unblockUI();"/>
<apex:actionFunction action="{!saveBtnYes}" name="saveBtnYes" reRender="mainForm,message" oncomplete="unblockUI();"/>
<apex:actionFunction action="{!saveBtnNo}" name="saveBtnNo" reRender="mainForm,message" oncomplete="unblockUI();"/>
@@ -141,7 +99,6 @@
<apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
<apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName" required="true"/>
</apex:pageBlockSectionItem>
- <apex:inputHidden id="opportunityAWSDataId" value="{!opp.AWS_Data_Id__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
diff --git a/force-app/main/default/pages/OpportunityOpenAlert.page b/force-app/main/default/pages/OpportunityOpenAlert.page
index cd8f0a3..aecd289 100644
--- a/force-app/main/default/pages/OpportunityOpenAlert.page
+++ b/force-app/main/default/pages/OpportunityOpenAlert.page
@@ -81,7 +81,6 @@
alert("鍚屾鐨勬姤浠峰拰鏈�杩戜笂浼犵殑鎶ヤ环涓嶄竴鑷达紝璇蜂笂浼犲綋鍓嶅悓姝ョ殑鎶ヤ环銆�");
}
-
function getConnectDMLErrorMessages(results) {
var messages = [],
i = 0,
diff --git a/force-app/main/default/pages/OrderDivision.page b/force-app/main/default/pages/OrderDivision.page
index 55b7f98..e3ee72a 100644
--- a/force-app/main/default/pages/OrderDivision.page
+++ b/force-app/main/default/pages/OrderDivision.page
@@ -83,8 +83,11 @@
<td style="text-align:left;"><apex:outputText style="width:90%" id="productCode" value="{!info.productName}"></apex:outputText></td>
<td style="text-align:left;"><apex:outputText style="width:90%" id="productCode1" value="{!info.ProductCode}"></apex:outputText></td>
<td style="text-align:left;"><apex:outputText style="width:90%" id="ECCode" value="{!info.ECCode}"></apex:outputText></td>
-
- <apex:outputPanel rendered="{!AND(!specialDealer,!info.isSet)}" layout="none">
+ <!-- <apex:outputPanel rendered="{!!specialDealer}" layout="none">
+ <td style="text-align:right;"><apex:outputField style="width:90%" id="unitPrice" value="{!info.oi.UnitPrice}"></apex:outputField></td>
+ </apex:outputPanel>
+ <td style="text-align:right;"><apex:outputField style="width:90%" id="quantity" value="{!info.oi.Quantity}"></apex:outputField></td> -->
+ <apex:outputPanel rendered="{!AND(!specialDealer,!info.isSet)}" layout="none">
<td style="text-align:right;"><apex:outputField style="width:90%" id="unitPrice" value="{!info.oi.UnitPrice}"></apex:outputField></td>
</apex:outputPanel>
<apex:outputPanel rendered="{!AND(!specialDealer,info.isSet)}" layout="none">
@@ -97,8 +100,6 @@
<apex:outputPanel rendered="{!info.isSet}" layout="none">
<td style="text-align:right;"><apex:outputText style="width:90%" id="quantity1" value="{!info.dqps.DecideProductSetCount__c}.00"></apex:outputText></td>
</apex:outputPanel>
-
- <!-- <td style="text-align:right;"><apex:outputField style="width:90%" id="quantity" value="{!info.oi.Quantity}"></apex:outputField></td> -->
<td style="text-align:center;"><apex:inputText style="width:90%;text-align:right;" id="divideCnt" value="{!info.divideCnt}"></apex:inputText></td>
<td style="text-align:left;"><apex:outputField style="width:90%" id="description" value="{!info.oi.Description}"></apex:outputField></td>
</tr>
diff --git a/force-app/main/default/pages/OrderPDF.page b/force-app/main/default/pages/OrderPDF.page
index 53596ac..6de56c6 100644
--- a/force-app/main/default/pages/OrderPDF.page
+++ b/force-app/main/default/pages/OrderPDF.page
@@ -1,5 +1,4 @@
-<apex:page Controller="OrderPdfController" showHeader="false" sidebar="false" id="allPage" action="{!init2}" >
- <!-- <apex:page Controller="OrderPdfController" showHeader="false" sidebar="false" id="allPage" action="{!init2}" renderAs="pdf"> -->
+<apex:page Controller="OrderPdfController" showHeader="false" sidebar="false" id="allPage" action="{!init2}" renderAs="pdf">
<html>
<head>
<style>
@@ -21,1578 +20,1131 @@
</style>
</head>
<body style="font-family: Arial Unicode MS; page-break-inside: auto">
- <div id="pdf-wrapper">
- <div class="pdf-page">
- <table style="border-style:none;float: left;">
- <tr style="font-size: 8pt;">
- <td>
- <div>鍚堝悓鍙�</div>
- <div>Contract No</div>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Taxation', 'true', 'false')}"
- layout="none">
- <div>鎶ュ鍗曞彿</div>
- <div>浠g悊鍟嗗叏绉�</div>
- </apex:outputPanel>
- </td>
- <td>
- <div>: </div>
- <div>: </div>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Taxation', 'true', 'false')}"
- layout="none">
- <div>: </div>
- <div>: </div>
- </apex:outputPanel>
- </td>
- <td>
- <div> {!contra.order.PDF_Order_No__c}</div>
- <div> {!contra.order.PDF_Order_No__c}</div>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Taxation', 'true', 'false')}"
- layout="none">
- <div> {!contra.order.PDF_I_Report__c}</div>
- <div> {!contra.order.Dealer__c}</div>
- </apex:outputPanel>
- </td>
- </tr>
- </table>
- <table style="border-style:none; float:right">
- <tr style="font-size: 8pt;">
- <td>
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
- layout="none">
- <div>绛捐鏃ユ湡</div>
- <div>Signature Date</div>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'NDT' ||Opp.ProductSegment__c = 'ANI' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
- layout="none">
- <div>绛捐鍦扮偣</div>
- <div>Signature Place</div>
- </apex:outputPanel>
- </td>
- <td>
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
- layout="none">
- <div>: </div>
- <div>: </div>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT' ||Opp.ProductSegment__c = 'ANI' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
- layout="none">
- <div>: </div>
- <div>: </div>
- </apex:outputPanel>
- </td>
- <td>
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
- layout="none">
- <div> {!contra.SignatureDate}</div>
- <div> {!contra.SignatureDates}</div>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'NDT' ||Opp.ProductSegment__c = 'ANI'&& Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
- layout="none">
- <div> {!contra.order.PDF_SignaturePlace__c}</div>
- <div> {!contra.order.PDF_SignaturePlaces__c}</div>
- </apex:outputPanel>
- </td>
- </tr>
- </table>
- <table width="100%" cellspacing="0" cellpadding="0">
- <colgroup>
- <col width="25%" />
- <col width="25%" />
- <col width="25%" />
- <col width="25%" />
- </colgroup>
- <tr>
- <td colspan="4" height="5px"></td>
- </tr>
- <tr>
- <td colspan="4" style="text-align: center;font-size: 14pt;">鍚堝悓</td>
- </tr>
- <tr>
- <td colspan="4" style="text-align: center;font-size: 12pt;">CONTRACT</td>
- </tr>
-
- <tr>
- <td style="font-size: 8pt;">涔版柟: </td>
- <td colspan="3" style="font-size: 8pt;">{!specialDeliveryAddress.Name}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">THE BUYER: </td>
- <td colspan="3" style="font-size: 8pt;">{!specialDeliveryAddress.EnglishName__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鍦板潃: </td>
- <td colspan="3" style="font-size: 8pt;">{!specialDeliveryAddress.Address1__c}</td>
- </tr>
- <apex:outputPanel rendered="{!IF(Opp.TradeType__c != 'Taxation', 'true', 'false')}" layout="none">
- <tr>
- <td style="font-size: 8pt;">ADD: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_B_Add__c}</td>
- </tr>
+ <table style="border-style:none;">
+ <tr style="font-size: 8pt;">
+ <td>
+ <div>鍚堝悓鍙�</div>
+ <div>Contract No</div>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Taxation', 'true', 'false')}" layout="none">
+ <div>鎶ュ鍗曞彿</div>
+ <div>浠g悊鍟嗗叏绉�</div>
</apex:outputPanel>
- <tr>
- <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
- <td colspan="3" style="font-size: 8pt;" id="Phone">{!specialDeliveryAddress.Phone}</td>
- </tr>
- <apex:outputPanel rendered="{!IF(Opp.TradeType__c != 'Taxation', 'true', 'false')}" layout="none">
- <tr>
- <td style="font-size: 8pt;">浼犵湡锛團ax锛�: </td>
- <td colspan="3" style="font-size: 8pt;">{!specialDeliveryAddress.Fax}</td>
- </tr>
+ </td>
+ <td>
+ <div>: </div>
+ <div>: </div>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Taxation', 'true', 'false')}" layout="none">
+ <div>: </div>
+ <div>: </div>
</apex:outputPanel>
- <tr>
- <td style="font-size: 8pt;">鑱旂郴浜�: </td>
- <td colspan="3" style="font-size: 8pt;">{!specialDeliveryContact.Name}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">CONTACT PERSON: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_B_contactperson__c}</td>
- </tr>
-
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
- layout="none">
- <tr>
- <td style="font-size: 8pt;">E-Mail: </td>
- <td colspan="3" style="font-size: 8pt;">{!specialDeliveryContact.Email}</td>
- </tr>
+ </td>
+ <td>
+ <div> {!contra.order.PDF_Order_No__c}</div>
+ <div> {!contra.order.PDF_Order_No__c}</div>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Taxation', 'true', 'false')}" layout="none">
+ <div> {!contra.order.PDF_I_Report__c}</div>
+ <div> {!contra.order.Dealer__c}</div>
</apex:outputPanel>
-
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE', 'true', 'false')}" layout="none">
- <tr>
- <td style="font-size: 8pt;">鐢ㄦ埛灞炴��: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_B_Attri__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鐢ㄦ埛浜у搧: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.account.Sub_Use__c}</td>
- </tr>
+ </td>
+ </tr>
+ </table>
+ <table style="border-style:none; top:0px; right:0px; position:absolute;">
+ <tr style="font-size: 8pt;">
+ <td>
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <div>绛捐鏃ユ湡</div>
+ <div>Signature Date</div>
</apex:outputPanel>
-
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'RVI', 'true', 'false')}" layout="none">
- <tr>
- <td style="font-size: 8pt;">甯傚満: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.account.Sub_Use__c}</td>
- </tr>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'NDT' ||Opp.ProductSegment__c = 'ANI' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <div>绛捐鍦扮偣</div>
+ <div>Signature Place</div>
</apex:outputPanel>
-
- <tr>
- <td height="1px"> </td>
- </tr>
-
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'BC' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
- layout="none">
- <tr>
- <td style="font-size: 8pt;">鍗栨柟: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_SELLER__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">THE SELLER: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_THE_SELLER__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鍦板潃: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Adds__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">ADD: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Address__c}</td>
- </tr>
-
+ </td>
+ <td>
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <div>: </div>
+ <div>: </div>
</apex:outputPanel>
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) &&Opp.TradeType__c = 'Taxation', 'true', 'false')}"
- layout="none">
- <tr>
- <td style="font-size: 8pt;">鍗栨柟: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_SELLER__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鍦板潃: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Adds__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鐢佃瘽 (TEL): </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_TEL__c}</td>
- </tr>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT' ||Opp.ProductSegment__c = 'ANI' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <div>: </div>
+ <div>: </div>
</apex:outputPanel>
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI')&& Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
- layout="none">
- <tr>
- <td style="font-size: 8pt;">鍗栨柟: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_SELLER__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">THE SELLER: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_THE_SELLER__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鍦板潃: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Adds__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">ADD: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Address__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鐢佃瘽(Tel): </td>
- <td colspan="3" style="font-size: 8pt;" id="PDF_S_TEL__c">{!contra.order.PDF_S_TEL__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">浼犵湡(FAX): </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_FAX__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">Bank Name: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Bank_Name__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">Branch: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Branch__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">Address: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Bank_Address__c}</td>
- </tr>
- <!-- <tr>
- <td style="font-size: 8pt;">Address: </td>
- <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Address__c}</td>
- </tr> -->
- <tr>
- <td style="font-size: 8pt;">Account no: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Account_No__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">Swift code: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Swift_Code__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">Account name: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Account_Name__c}</td>
- </tr>
+ </td>
+ <td>
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <div> {!contra.SignatureDate}</div>
+ <div> {!contra.SignatureDates}</div>
</apex:outputPanel>
-
- <tr style="line-height: 4px">
- <td height="1px"> </td>
- </tr>
-
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
- layout="none">
- <!-- <tr>
- <td style="font-size: 8pt;"> </td>
- </tr> -->
- <tr>
- <td style="font-size: 8pt;">鏀惰揣浜�: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_Consignee__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">THE CONSIGNEE: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_THECONSIGNE__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鍦板潃: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_Address__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">ADD: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_Add__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_TEL__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">浼犵湡锛團ax锛�: </td>
- <td colspan="3" style="font-size: 8pt;" id="PDF_C_FAX__c">{!contra.order.PDF_C_FAX__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鑱旂郴浜�: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_CONTACT__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">CONTACT PERSON: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_contactperson__c}</td>
- </tr>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'NDT' ||Opp.ProductSegment__c = 'ANI'&& Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <div> {!contra.order.PDF_SignaturePlace__c}</div>
+ <div> {!contra.order.PDF_SignaturePlaces__c}</div>
</apex:outputPanel>
- <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI') && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
- <tr>
- <td style="font-size: 8pt;">THE CONSIGNEE: </td>
- <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_THECONSIGNE__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">ADD: </td>
- <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_Add__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
- <td colspan = "3" style="font-size: 8pt;">{!contra.pdf_c_tel}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">浼犵湡锛團ax锛�: </td>
- <td colspan = "3" style="font-size: 8pt;">{!contra.pdf_c_fax}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">CONTACT PERSON: </td>
- <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_contactperson__c}</td>
- </tr>
- </apex:outputPanel> -->
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Taxation', 'true', 'false')}"
- layout="none">
- <tr>
- <td style="font-size: 8pt;">鏀惰揣浜�: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.pdf_c_consignee}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鍦板潃: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.pdf_c_address}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.pdf_c_tel}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鑱旂郴浜�: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.pdf_c_contact}</td>
- </tr>
- </apex:outputPanel>
-
- <tr height="1px">
- <td height="1px"> </td>
- </tr>
-
- <apex:outputPanel rendered="{!IF(Opp.TradeType__c = 'Tax Exemption' && (Opp.ProductSegment__c = 'BS'||Opp.ProductSegment__c = 'NDT'||Opp.ProductSegment__c = 'ANI'||Opp.ProductSegment__c = 'IE'||Opp.ProductSegment__c = 'RVI'), 'true', 'false')}"
- layout="none">
- <tr>
- <td style="font-size: 8pt;">閫氱煡浜�: </td>
- <td colspan="3" style="font-size: 8pt;" id="PDF_N_NotifyParty__c">{!contra.order.PDF_N_NotifyParty__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">THE NOTIFY PARTY: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_NOTIFY_PARTY__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鍦板潃: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_Address__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">ADD: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_Add__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_TEL__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">浼犵湡锛團ax锛�: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_FAX__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鑱旂郴浜�: </td>
- <td colspan="3" style="font-size: 8pt;" id="PDF_N_CONTACT__c">{!contra.order.PDF_N_CONTACT__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">CONTACT PERSON: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_CONTACTPERSON__c}</td>
- </tr>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!IF(Opp.TradeType__c = 'Tax Exemption' && (Opp.ProductSegment__c = 'ABC'), 'true', 'false')}"
- layout="none">
- <tr>
- <td style="font-size: 8pt;">THE NOTIFY PARTY: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_NOTIFY_PARTY__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">ADD: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_Add__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_TEL__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">浼犵湡锛團ax锛�: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_FAX__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">CONTACT PERSON: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_CONTACTPERSON__c}</td>
- </tr>
- </apex:outputPanel>
-
- <tr>
- <td height="1px"> </td>
- </tr>
-
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
- layout="none">
- <tr>
- <td style="font-size: 8pt;">杞繍鍟� (鑻辨枃): </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_Forwarder__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">ADD: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_F_Add__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_F_TEL__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">浼犵湡锛團ax锛�: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_F_FAX__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鑱旂郴浜� (涓枃): </td>
- <td colspan="3" style="font-size: 8pt;" id="PDF_F_ContactPerson__c">{!contra.order.PDF_F_ContactPerson__c}</td>
- </tr>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Taxation', 'true', 'false')}"
- layout="none">
- <tr>
- <td style="font-size: 8pt;">涓棿鍟嗗叕鍙�: </td>
- <td colspan="3" style="font-size: 8pt;">{!Opp.SubDealer__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鍏徃鍚嶇О: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_F_Add__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鍦板潃: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_F_TEL__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">鐢佃瘽: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_F_FAX__c}</td>
- </tr>
- <tr>
- <td style="font-size: 8pt;">绯荤粺缂栧彿: </td>
- <td colspan="3" style="font-size: 8pt;">{!contra.order.Id}</td>
- </tr>
- </apex:outputPanel>
- </table>
- </div>
-
- <apex:outputPanel layout="none">
- <div style="page-break-after: always;" />
+ </td>
+ </tr>
+ </table>
+ <table width="100%" cellspacing="0" cellpadding="0">
+ <colgroup>
+ <col width="25%"/>
+ <col width="25%"/>
+ <col width="25%"/>
+ <col width="25%"/>
+ </colgroup>
+ <tr><td colspan = "4" height="5px"></td></tr>
+ <tr>
+ <td colspan = "4" style="text-align: center;font-size: 14pt;">鍚堝悓</td>
+ </tr>
+ <tr>
+ <td colspan = "4" style="text-align: center;font-size: 12pt;">CONTRACT</td>
+ </tr>
+
+ <tr>
+ <td style="font-size: 8pt;">涔版柟: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!specialDeliveryAddress.Name}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">THE BUYER: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!specialDeliveryAddress.EnglishName__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鍦板潃: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!specialDeliveryAddress.Address1__c}</td>
+ </tr>
+ <apex:outputPanel rendered="{!IF(Opp.TradeType__c != 'Taxation', 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">ADD: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_B_Add__c}</td>
+ </tr>
</apex:outputPanel>
-
- <div class="pdf-page">
- <table style="font-size: 9pt;">
+ <tr>
+ <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!specialDeliveryAddress.Phone}</td>
+ </tr>
+ <apex:outputPanel rendered="{!IF(Opp.TradeType__c != 'Taxation', 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">浼犵湡锛團ax锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!specialDeliveryAddress.Fax}</td>
+ </tr>
+ </apex:outputPanel>
+ <tr>
+ <td style="font-size: 8pt;">鑱旂郴浜�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!specialDeliveryContact.Name}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">CONTACT PERSON: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_B_contactperson__c}</td>
+ </tr>
+
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none" >
+ <tr>
+ <td style="font-size: 8pt;">E-Mail: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!specialDeliveryContact.Email}</td>
+ </tr>
+ </apex:outputPanel>
+
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE', 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">鐢ㄦ埛灞炴��: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_B_Attri__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鐢ㄦ埛浜у搧: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.account.Sub_Use__c}</td>
+ </tr>
+ </apex:outputPanel>
+
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'RVI', 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">甯傚満: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.account.Sub_Use__c}</td>
+ </tr>
+ </apex:outputPanel>
+
+ <tr><td height="1px"> </td></tr>
+
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'BC' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">鍗栨柟: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_SELLER__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">THE SELLER: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_THE_SELLER__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鍦板潃: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Adds__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">ADD: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Address__c}</td>
+ </tr>
+
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) &&Opp.TradeType__c = 'Taxation', 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">鍗栨柟: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_SELLER__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鍦板潃: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Adds__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鐢佃瘽 (TEL): </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_TEL__c}</td>
+ </tr>
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI')&& Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">鍗栨柟: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_SELLER__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">THE SELLER: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_THE_SELLER__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鍦板潃: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Adds__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">ADD: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Address__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鐢佃瘽(Tel): </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_TEL__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">浼犵湡(FAX): </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_FAX__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">Bank Name: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Bank_Name__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">Branch: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Branch__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">Address: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Bank_Address__c}</td>
+ </tr>
+ <!-- <tr>
+ <td style="font-size: 8pt;">Address: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Address__c}</td>
+ </tr> -->
+ <tr>
+ <td style="font-size: 8pt;">Account no: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Account_No__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">Swift code: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Swift_Code__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">Account name: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Account_Name__c}</td>
+ </tr>
+ </apex:outputPanel>
+
+ <tr style="line-height: 4px"><td height="1px"> </td></tr>
+
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <!-- <tr>
+ <td style="font-size: 8pt;"> </td>
+ </tr> -->
+ <tr>
+ <td style="font-size: 8pt;">鏀惰揣浜�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_Consignee__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">THE CONSIGNEE: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_THECONSIGNE__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鍦板潃: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_Address__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">ADD: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_Add__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_TEL__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">浼犵湡锛團ax锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_FAX__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鑱旂郴浜�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_CONTACT__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">CONTACT PERSON: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_contactperson__c}</td>
+ </tr>
+ </apex:outputPanel>
+<!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI') && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">THE CONSIGNEE: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_THECONSIGNE__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">ADD: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_Add__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.pdf_c_tel}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">浼犵湡锛團ax锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.pdf_c_fax}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">CONTACT PERSON: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_contactperson__c}</td>
+ </tr>
+ </apex:outputPanel> -->
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Taxation', 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">鏀惰揣浜�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.pdf_c_consignee}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鍦板潃: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.pdf_c_address}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.pdf_c_tel}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鑱旂郴浜�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.pdf_c_contact}</td>
+ </tr>
+ </apex:outputPanel>
+
+ <tr height="1px"><td height="1px"> </td></tr>
+
+ <apex:outputPanel rendered="{!IF(Opp.TradeType__c = 'Tax Exemption' && (Opp.ProductSegment__c = 'BS'||Opp.ProductSegment__c = 'NDT'||Opp.ProductSegment__c = 'ANI'||Opp.ProductSegment__c = 'IE'||Opp.ProductSegment__c = 'RVI'), 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">閫氱煡浜�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_N_NotifyParty__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">THE NOTIFY PARTY: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_NOTIFY_PARTY__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鍦板潃: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_N_Address__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">ADD: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_N_Add__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_N_TEL__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">浼犵湡锛團ax锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_N_FAX__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鑱旂郴浜�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_N_CONTACT__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">CONTACT PERSON: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_N_CONTACTPERSON__c}</td>
+ </tr>
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!IF(Opp.TradeType__c = 'Tax Exemption' && (Opp.ProductSegment__c = 'ABC'), 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">THE NOTIFY PARTY: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_NOTIFY_PARTY__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">ADD: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_N_Add__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_N_TEL__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">浼犵湡锛團ax锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_N_FAX__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">CONTACT PERSON: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_N_CONTACTPERSON__c}</td>
+ </tr>
+ </apex:outputPanel>
+
+ <tr><td height="1px"> </td></tr>
+
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">杞繍鍟� (鑻辨枃): </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_Forwarder__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">ADD: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_F_Add__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鐢佃瘽锛圱el锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_F_TEL__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">浼犵湡锛團ax锛�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_F_FAX__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鑱旂郴浜� (涓枃): </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_F_ContactPerson__c}</td>
+ </tr>
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Taxation', 'true', 'false')}" layout="none">
+ <tr>
+ <td style="font-size: 8pt;">涓棿鍟嗗叕鍙�: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!Opp.SubDealer__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鍏徃鍚嶇О: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_F_Add__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鍦板潃: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_F_TEL__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">鐢佃瘽: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_F_FAX__c}</td>
+ </tr>
+ <tr>
+ <td style="font-size: 8pt;">绯荤粺缂栧彿: </td>
+ <td colspan = "3" style="font-size: 8pt;">{!contra.order.Id}</td>
+ </tr>
+ </apex:outputPanel>
+ </table>
+
+ <apex:outputPanel layout="none">
+ <div style="page-break-after: always;"/>
+ </apex:outputPanel>
+
+ <table style="font-size: 9pt;">
+ <tr>
+ <td style="text-align:left">
+ 1. 鍏圭粡涔板崠鍙屾柟鍚屾剰, 缂旂粨鏈悎鍚屽苟鎸夋湰鍚堝悓涓嬭堪鏉℃,涔版柟鍚屾剰璐叆鍙婂崠鏂瑰悓鎰忓嚭鍞互涓嬭揣鐗�:<br/>
+ 1. This Contract is made by and between the Buyer and the Seller锛寃hereby the Buyer agrees to buy and the Seller<br/>
+ agrees to sell the under-mentioned goods subject to the terms and conditions stipulated below:</td>
+ </tr>
+ <tr><td style="text-align: right;">(USD)</td></tr>
+ </table>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'true', 'false')}" layout="none" >
+ <table width="100%" border="1" cellspacing="0" cellpadding="0" style="table-layout:auto;font-size: 9pt;">
+ <tr>
+ <td width="5%" style="text-align: center;">搴忓彿</td>
+ <td style="text-align: center;">璐х墿鍚嶇О鍙婅鏍�</td>
+ <td width="10%" style="text-align: center;">鍗� 浣�</td>
+ <td width="10%" style="text-align: center;">鏁� 閲�</td>
+ <td width="15%" style="text-align: center;">鍗� 浠�</td>
+ <td width="15%" style="text-align: center;">鎬� 浠�</td>
+ </tr>
+ <tr>
+ <td width="5%" style="text-align: center;">Item</td>
+ <td style="text-align: center;">Goods & Specification</td>
+ <td width="10%" style="text-align: center;">Unit</td>
+ <td width="10%" style="text-align: center;">Qty</td>
+ <td width="15%" style="text-align: center;">Unit Price</td>
+ <td width="15%" style="text-align: center;">Total Amount</td>
+ </tr>
+
+ <apex:repeat value="{!printSetInfo}" var="set">
<tr>
- <td style="text-align:left">
- 1. 鍏圭粡涔板崠鍙屾柟鍚屾剰, 缂旂粨鏈悎鍚屽苟鎸夋湰鍚堝悓涓嬭堪鏉℃,涔版柟鍚屾剰璐叆鍙婂崠鏂瑰悓鎰忓嚭鍞互涓嬭揣鐗�:
- <br/> 1. This Contract is made by and between the Buyer and the Seller锛寃hereby the Buyer agrees to buy and
- the Seller
- <br/> agrees to sell the under-mentioned goods subject to the terms and conditions stipulated below:</td>
+ <td style="text-align: center;"><apex:outputText value="{!set.No__c}" /></td>
+ <td style="text-align: center;"><apex:outputText value="{!set.Goods__c}" /></td>
+ <td style="text-align: center;"><apex:outputText value="{!set.Unit__c}" /></td>
+ <td style="text-align: center;"><apex:outputText value="{!set.Qty__c}" /></td>
+ <td style="text-align: center;"><apex:outputText value="{!set.UnitPrice__c}" /></td>
+ <td style="text-align: center;"><apex:outputText value="{!set.Total_Amount__c}" /></td>
</tr>
+ </apex:repeat>
+ </table>
+ </apex:outputPanel>
+
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'false', 'true')}" layout="none" >
+
+ <table width="100%" border="1" cellspacing="0" cellpadding="0" style="table-layout:auto;font-size: 9pt;">
+ <colgroup>
+ <col width="5%"/>
+ <col width="10%"/>
+ <col width="23%"/>
+ <col width="5%"/>
+ <col width="8%"/>
+ <col width="10%"/>
+ <col width="8%"/>
+ <col width="11%"/>
+ <col width="10%"/>
+ <col width="10%"/>
+ </colgroup>
+ <tr>
+ <td style="text-align: center;">搴忓彿</td>
+ <td style="text-align: center;">U8鍙风爜</td>
+ <td style="text-align: center;">浜у搧鍨嬪彿</td>
+ <td style="text-align: center;">鍗曚綅</td>
+ <td style="text-align: center;">鏁伴噺</td>
+ <td style="text-align: center;">鍗曚环</td>
+ <td style="text-align: center;">鎶樻墸</td>
+ <td style="text-align: center;">鎶樺悗鍗曚环</td>
+ <td style="text-align: center;">鎬讳环</td>
+ <td style="text-align: center;">澶囨敞</td>
+ </tr>
+ <tr>
+ <td style="text-align: center;">Item</td>
+ <td style="text-align: center;">U8</td>
+ <td style="text-align: center;">Part Number</td>
+ <td style="text-align: center;">Unit</td>
+ <td style="text-align: center;">Quantity</td>
+ <td style="text-align: center;">Unit Price</td>
+ <td style="text-align: center;">Discount </td>
+ <td style="text-align: center;">Discounted Price/Unit</td>
+ <td style="text-align: center;">Total Amount</td>
+ <td style="text-align: center;">Remark</td>
+ </tr>
+
+ <apex:repeat value="{!printSetInfo}" var="set">
<tr>
- <td style="text-align: right;">(USD)</td>
+ <td style="text-align: center;"><apex:outputText value="{!set.No__c}" style="width: 95%"/></td>
+ <td style="text-align: center;"><apex:outputText value="{!set.U8__c}" style="width: 95%"/></td>
+ <td style="text-align: center;"><!-- <apex:outputText value="{!set.Goods__c}" style="width: 95%"/> --><c:PDFWbr targetStr="{!set.Goods__c}"/></td>
+ <td style="text-align: center;"><apex:outputText value="{!set.Unit__c}" style="width: 95%; text-align: right;"/></td>
+ <td style="text-align: center;"><apex:outputText value="{!set.Qty__c}" style="width: 95%; text-align: right;"/></td>
+ <td style="text-align: center;"><apex:outputText value="{!set.UnitPrice__c}" style="width: 95%"/></td>
+ <td style="text-align: center;"><apex:outputText value="{!set.discount__c}" style="width: 95%"/></td>
+ <td style="text-align: center;"><apex:outputText value="{!set.discountprice__c}" style="width: 95%; text-align: right;"/></td>
+ <td style="text-align: center;"><apex:outputText value="{!set.Total_AmountNDT__c}" style="width: 95%; text-align: right;"/></td>
+ <td style="text-align: center;"><!-- <apex:outputText value="{!set.Remark__c}" style="width: 95%"/> --><c:PDFWbr targetStr="{!set.Remark__c}"/></td>
</tr>
- </table>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'true', 'false')}"
- layout="none">
- <table width="100%" border="1" cellspacing="0" cellpadding="0" style="table-layout:auto;font-size: 9pt;">
- <tr>
- <td width="5%" style="text-align: center;">搴忓彿</td>
- <td style="text-align: center;">璐х墿鍚嶇О鍙婅鏍�</td>
- <td width="10%" style="text-align: center;">鍗� 浣�</td>
- <td width="10%" style="text-align: center;">鏁� 閲�</td>
- <td width="15%" style="text-align: center;">鍗� 浠�</td>
- <td width="15%" style="text-align: center;">鎬� 浠�</td>
- </tr>
- <tr>
- <td width="5%" style="text-align: center;">Item</td>
- <td style="text-align: center;">Goods & Specification</td>
- <td width="10%" style="text-align: center;">Unit</td>
- <td width="10%" style="text-align: center;">Qty</td>
- <td width="15%" style="text-align: center;">Unit Price</td>
- <td width="15%" style="text-align: center;">Total Amount</td>
- </tr>
-
- <apex:repeat value="{!printSetInfo}" var="set">
- <tr>
- <td style="text-align: center;">
- <apex:outputText value="{!set.No__c}" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!set.Goods__c}" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!set.Unit__c}" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!set.Qty__c}" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!set.UnitPrice__c}" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!set.Total_Amount__c}" />
- </td>
- </tr>
- </apex:repeat>
- </table>
- </apex:outputPanel>
-
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'false', 'true')}"
- layout="none">
-
- <table width="100%" border="1" cellspacing="0" cellpadding="0" style="table-layout:auto;font-size: 9pt;">
- <colgroup>
- <col width="5%" />
- <col width="10%" />
- <col width="23%" />
- <col width="5%" />
- <col width="8%" />
- <col width="10%" />
- <col width="8%" />
- <col width="11%" />
- <col width="10%" />
- <col width="10%" />
- </colgroup>
- <tr>
- <td style="text-align: center;">搴忓彿</td>
- <td style="text-align: center;">U8鍙风爜</td>
- <td style="text-align: center;">浜у搧鍨嬪彿</td>
- <td style="text-align: center;">鍗曚綅</td>
- <td style="text-align: center;">鏁伴噺</td>
- <td style="text-align: center;">鍗曚环</td>
- <td style="text-align: center;">鎶樻墸</td>
- <td style="text-align: center;">鎶樺悗鍗曚环</td>
- <td style="text-align: center;">鎬讳环</td>
- <td style="text-align: center;">澶囨敞</td>
- </tr>
- <tr>
- <td style="text-align: center;">Item</td>
- <td style="text-align: center;">U8</td>
- <td style="text-align: center;">Part Number</td>
- <td style="text-align: center;">Unit</td>
- <td style="text-align: center;">Quantity</td>
- <td style="text-align: center;">Unit Price</td>
- <td style="text-align: center;">Discount </td>
- <td style="text-align: center;">Discounted Price/Unit</td>
- <td style="text-align: center;">Total Amount</td>
- <td style="text-align: center;">Remark</td>
- </tr>
-
- <apex:repeat value="{!printSetInfo}" var="set">
- <tr>
- <td style="text-align: center;">
- <apex:outputText value="{!set.No__c}" style="width: 95%" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!set.U8__c}" style="width: 95%" />
- </td>
- <td style="text-align: center;">
- <!-- <apex:outputText value="{!set.Goods__c}" style="width: 95%"/> -->
- <c:PDFWbr targetStr="{!set.Goods__c}" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!set.Unit__c}" style="width: 95%; text-align: right;" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!set.Qty__c}" style="width: 95%; text-align: right;" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!set.UnitPrice__c}" style="width: 95%" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!set.discount__c}" style="width: 95%" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!set.discountprice__c}" style="width: 95%; text-align: right;" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!set.Total_AmountNDT__c}" style="width: 95%; text-align: right;" />
- </td>
- <td style="text-align: center;">
- <!-- <apex:outputText value="{!set.Remark__c}" style="width: 95%"/> -->
- <c:PDFWbr targetStr="{!set.Remark__c}" />
- </td>
- </tr>
- </apex:repeat>
- </table>
- </apex:outputPanel>
-
- <table style="font-size: 9pt;" width="100%">
- <colgroup>
- <col width="30%" />
- <col width="60%" />
- <col width="10%" />
- </colgroup>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'true', 'false')}"
- layout="none">
- <tr>
- <td>鎬婚噾棰濓細 </td>
- <!-- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none"> -->
- <td>US$
- <apex:outputText value="{0, number, ##0.00}">
- <apex:param value="{!TotalMoney}" />
- </apex:outputText>
- </td>
- <!-- </apex:outputPanel> -->
- <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS') &&Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
- <td>{!contra.order.CustomerContractPrice__c}</td>
- </apex:outputPanel> -->
- </tr>
- <tr>
- <td>Total Value: </td>
- <td>{!contra.order.Shipment_Term_D__c}
- <u> {!contra.order.PDF_Shipment_Term2_Text__c} </u>
- </td>
- </tr>
+ </apex:repeat>
+ </table>
+ </apex:outputPanel>
+
+ <table style="font-size: 9pt;" width="100%">
+ <colgroup>
+ <col width="30%" />
+ <col width="60%" />
+ <col width="10%" />
+ </colgroup>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'true', 'false')}" layout="none" >
+ <tr>
+ <td>鎬婚噾棰濓細 </td>
+ <!-- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none"> -->
+ <td>US$
+ <apex:outputText value="{0, number, ##0.00}">
+ <apex:param value="{!TotalMoney}" />
+ </apex:outputText>
+ </td>
+ <!-- </apex:outputPanel> -->
+ <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS') &&Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <td>{!contra.order.CustomerContractPrice__c}</td>
+ </apex:outputPanel> -->
+ </tr>
+ <tr>
+ <td>Total Value: </td>
+ <td>{!contra.order.Shipment_Term_D__c} <u> {!contra.order.PDF_Shipment_Term2_Text__c} </u> </td>
+ </tr>
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'false', 'true')}" layout="none" >
+ <tr>
+ <td>杩愪繚璐�/Shipping Charge锛� </td>
+ <td style="text-indent: 45px">US$
+ <apex:outputText value="{0,number,##0.00}">
+ <apex:param value="{!TrAndPre}"/>
+ </apex:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td>鎬婚噾棰濓細 </td>
+ <!-- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none"> -->
+ <td style="text-indent: 45px;">US$
+ <apex:outputText value="{0, number, ##0.00}">
+ <apex:param value="{!TotalMoney}" />
+ </apex:outputText>
+ </td>
+ <!-- </apex:outputPanel> -->
+ <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS') &&Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <td>{!contra.order.CustomerContractPrice__c}</td>
+ </apex:outputPanel> -->
+ </tr>
+ <tr>
+ <td>Total Value: </td>
+ <td>{!contra.order.Shipment_Term_D__c} <u> </u>{!contra.order.PDF_Shipment_Term2_Text__c} </td>
+ </tr>
+ </apex:outputPanel>
+ <tr>
+ <td>Say: U.S. DOLLARS: </td>
+ <!-- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none"> -->
+ <td>{!contra.order.Total_price_E__c}</td>
+ <!-- </apex:outputPanel> -->
+ <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS') &&Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ <td>{!contra.order.CustomerContractPrice__c}</td>
+ </apex:outputPanel> -->
+ </tr>
+ <tr>
+ <td colspan = "3">
+ 2. 鐢熶骇鍥藉埆鍙婂埗閫犲巶鍟�: {!contra.order.PDF_Bi_manufacturers__c}<br/>
+ 2. COUNTRY OF ORIGIN OF GOODS AND MANUFACTURERS: {!contra.order.PDF_Bi_manufacturersEn__c}<br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan = "3">
+ 3. 鍖呰: <br/>
+ 鍟嗗搧鎳変互鍧氬浐鐨勫嚭鍙g焊鐨鎴栨湪绠卞寘瑁咃紝閫備簬闀块�旂┖杩愩�佸ぉ姘旀垨姘斿�欏彉鍖栥�侀槻娼�佹姉闇囥�侀槻閿堝強澶氭鎼繍銆傜敱浜庡寘瑁呬笉鑹�屼骇鐢熺殑<br/>
+ 鐩存帴鎹熷け, 鐢卞崠鏂硅礋璐c��<br/>
+ 3. PACKING: <br/>
+ The goods should be packed in strong export carton box or wooden box, which is suitable for long haul air transportation and <br/>
+ change of weather or climate, well protected against moisture, shocks, rust and withstand numerous transits. All direct losses <br/>
+ incurred on account of improper packing shall be borne by the Seller.<br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan = "3">
+ 4.杩愯緭鏍囪瘑锛� <br/>
+ 鍗栨柟椤诲湪姣忎欢璐х墿鐨勫寘瑁呭琛ㄤ笂浠ヤ笉瑜壊鐨勯鏂欐爣鏄庝欢鍙枫�佹瘺閲嶃�佸昂鐮佸強涓嬪垪瀛楀彞: <br/>
+ 鈥濆嬁浣垮彈娼�� 銆佲�滃皬蹇冭交鏀锯�濄�� 鈥滄闈㈠悜涓娾�濈瓑瀛楁牱鍙婁笅鍒楀敍澶达細<br/>
+ 4. SHIPPING MARK: <br/>
+ The Seller shall mark on the surface of each package with fadeless paint, the package number锛実ross weight锛宮easurement<br/>
+ and the following wordings锛�<br/>
+ 鈥淜EEP AWAY FROM MOISTURE鈥濓紝鈥淗ANDLE WITH CARE鈥� 锛屸�淭HIS SIDE UP鈥� etc. And the below shipping mark: <br/>
+ <div><apex:outputField value="{!contra.order.PDF_Sp_SHIPPINGMARK__c}" /></div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan = "3">
+ 5.瑁呰繍鏉℃: {!contra.order.PDF_Sp_ShippingTerms__c}<br/>
+ 5.TERMS OF SHIPMENT: {!contra.ShippingTerms}<br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan = "2">
+ 6.浜よ揣鏈�: <apex:outputField value="{!contra.order.DeliveryTimeText__c}" /><br/>
+ 6.THE DELIVERY TIME: <apex:outputField value="{!contra.order.DeliveryTimeTextEn__c}" /><br/>
+ <!-- by the Buyer.<br/> -->
+ </td>
+ </tr>
+ <tr>
+ <td colspan = "3">
+ 7.鍗栨柟搴斾繚鐣欒揣鐗╁拰闆堕儴浠剁殑浜ф潈鍜屾墍鏈夋潈锛岃绛夋潈鍒╁彧鏈夊湪鍏ㄩ鏀跺埌璐ф鏃舵柟鑷姩杞Щ鍒颁拱鏂广��<br/>
+ 7.The Seller shall maintain title and ownership of the goods and spare parts thereof which shall automatically pass to the Buyer<br/>
+ only on receipt of the full payment.<br/>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan = "3">
+ 8. 瑁呰繍鍙e哺锛� {!contra.order.PDF_Sp_LOADING__c}<br/>
+ 8. PORT OF LOADING: {!contra.order.PDF_Sp_LOADING_E__c}<br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan = "3">
+ 9. 鐩殑鍙e哺锛� {!contra.order.PDF_Sp_DestinationPort__c}<br/>
+ 9. PORT OF DESTINATION: {!contra.order.PDF_Sp_DestinationPort_E__c}<br/>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan = "3">
+ 10. 淇濋櫓锛�<br/>
+ 鐢卞崠鏂规寜鍙戠エ閲戦鐨�110%鎶曚繚鍏ㄩ櫓鍙婃垬浜夐櫓锛屽苟璇存槑鍙互鍦ㄤ腑鍥藉鍐呯储璧旓紝绌虹櫧鑳屼功銆�<br/>
+ 10. INSURANCE: <br/>
+ To be covered by the Seller for 110% of the invoice value covering all risks and war risk, indicating claims payable in China, <br/>
+ in currency of the draft, blank endorsed.
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan = "4">
+ 11. 浠樻鏂瑰紡: {!contra.order.PDF_PaymentTerms__c}锛�<br/>
+ 鎵�鏈夐摱琛屾墜缁垂锛屽寘鎷鏂归摱琛屽拰涓浆琛屾墜缁垂鍙婂叾瀹冭垂鐢紝鍧囩敱涔版柟鎵挎媴銆�<br/>
+ 11. TERMS OF PAYMENT: {!contra.order.PDF_PaymentTerms_E__c}锛�<br/>
+ All the bank charges and other expenses, including beneficiary bank and intermediary bank, arising from the payment shall be borne by the Buyer.<br/>
+ </td>
+ </tr>
+ </table>
+ <!--<apex:outputPanel layout="none">
+ <div style="page-break-after: always;"/>
+ </apex:outputPanel>-->
+ <table style="font-size: 9pt;">
+ <tr>
+ <td>
+ 12. 鎵�闇�鐨勬枃浠�: <br/>
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI') && Opp.TradeType__c = 'Taxation', 'true', 'false')}" layout="none">
+ 1) {!contra.order.PDF_Bi_Quality__c}浠界敱鍗栨柟鍑哄叿鐨勮川閲忓拰鏁伴噺璇佹槑;<br/>
+ 2) {!contra.order.PDF_Bi_Origin__c}浠藉崠鏂瑰嚭鍏风殑鍘熶骇鍦拌瘉鏄�;鍙�<br/>
+ 3) {!contra.order.PDF_Bi_Non_Wooden__c}浠介潪鏈ㄨ川鍖呰璇佹槑銆�<br/>
</apex:outputPanel>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'false', 'true')}"
- layout="none">
- <tr>
- <td>杩愪繚璐�/Shipping Charge锛� </td>
- <td style="text-indent: 45px">US$
- <apex:outputText value="{0,number,##0.00}">
- <apex:param value="{!TrAndPre}" />
- </apex:outputText>
- </td>
- </tr>
- <tr>
- <td>鎬婚噾棰濓細 </td>
- <!-- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none"> -->
- <td style="text-indent: 45px;">US$
- <apex:outputText value="{0, number, ##0.00}">
- <apex:param value="{!TotalMoney}" />
- </apex:outputText>
- </td>
- <!-- </apex:outputPanel> -->
- <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS') &&Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
- <td>{!contra.order.CustomerContractPrice__c}</td>
- </apex:outputPanel> -->
- </tr>
- <tr>
- <td>Total Value: </td>
- <td>{!contra.order.Shipment_Term_D__c}
- <u> </u>{!contra.order.PDF_Shipment_Term2_Text__c}
- </td>
- </tr>
+ <apex:outputPanel rendered="{!IF(Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
+ 璇峰湪鍙戣揣鍚巤!contra.order.PDF_Bi_q1__c}涓伐浣滄棩鍐呭皢浠ヤ笅鎵�闇�鐨勬枃浠朵紶鐪�/鐢甸偖缁欎拱鏂�;<br/>
+ 1) 绌鸿繍鎻愬崟姝f湰{!contra.order.PDF_Bi_airway__c}浠斤紝鍓湰{!contra.order.PDF_Bi_copyairway__c}浠姐�傚苟娉ㄦ槑鈥滆繍璐瑰凡浠樷��;<br/>
+ 2) 鍙戠エ{!contra.order.PDF_Bi_invoice__c}浠�, 娉ㄦ槑鍚堝悓鍙峰拰杩愯緭鏍囪瘑(濡傛湁涓�涓互涓婅繍杈撴爣璇�, 搴斿垎鍒嚭鍏峰彂绁�)鍙婂悎鍚屼腑鍏跺畠缁嗚妭;<br/>
+ 3) 濡備繚闄╃敱鍗栨柟璐熻矗鐨勬儏鍐典笅锛屽崠鏂归渶鎻愪緵淇濋櫓鍗晎!contra.order.PDF_Bi_Insurance__c}濂楋紝鎶曚竴鍒囬櫓锛� 鎸夊彂绁ㄩ噾棰�110锛呮姇淇濅竴鍒囬櫓;<br/>
+ 4) {!contra.order.PDF_Bi_Packing__c}浠界敱鍗栨柟鍑哄叿鐨勮绠卞崟;<br/>
+ 5) {!contra.order.PDF_Bi_Quality__c}浠界敱鍗栨柟鍑哄叿鐨勮川閲忓拰鏁伴噺璇佹槑;<br/>
+ 6) {!contra.order.PDF_Bi_Origin__c}浠藉崠鏂瑰嚭鍏风殑鍘熶骇鍦拌瘉鏄�;鍙�<br/>
+ 7) {!contra.order.PDF_Bi_Non_Wooden__c}浠介潪鏈ㄨ川鍖呰璇佹槑銆�<br/>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'ANI' ||Opp.ProductSegment__c = 'NDT', 'true', 'false')}" layout="none">
+ 8) 鎵�鏈夊崟鎹� {!contra.order.PDF_Bi_AllBill__c}<br/>
</apex:outputPanel>
- <tr>
- <td>Say: U.S. DOLLARS: </td>
- <!-- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none"> -->
- <td>{!contra.order.Total_price_E__c}</td>
- <!-- </apex:outputPanel> -->
- <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS') &&Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
- <td>{!contra.order.CustomerContractPrice__c}</td>
- </apex:outputPanel> -->
- </tr>
- <tr>
- <td colspan="3">
- 2. 鐢熶骇鍥藉埆鍙婂埗閫犲巶鍟�: {!contra.order.PDF_Bi_manufacturers__c}
- <br/> 2. COUNTRY OF ORIGIN OF GOODS AND MANUFACTURERS: {!contra.order.PDF_Bi_manufacturersEn__c}
- <br/>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- 3. 鍖呰:
- <br/> 鍟嗗搧鎳変互鍧氬浐鐨勫嚭鍙g焊鐨鎴栨湪绠卞寘瑁咃紝閫備簬闀块�旂┖杩愩�佸ぉ姘旀垨姘斿�欏彉鍖栥�侀槻娼�佹姉闇囥�侀槻閿堝強澶氭鎼繍銆傜敱浜庡寘瑁呬笉鑹�屼骇鐢熺殑
- <br/> 鐩存帴鎹熷け, 鐢卞崠鏂硅礋璐c��
- <br/> 3. PACKING:
- <br/> The goods should be packed in strong export carton box or wooden box, which is suitable for long haul
- air transportation and
- <br/> change of weather or climate, well protected against moisture, shocks, rust and withstand numerous transits.
- All direct losses
- <br/> incurred on account of improper packing shall be borne by the Seller.
- <br/>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- 4.杩愯緭鏍囪瘑锛�
- <br/> 鍗栨柟椤诲湪姣忎欢璐х墿鐨勫寘瑁呭琛ㄤ笂浠ヤ笉瑜壊鐨勯鏂欐爣鏄庝欢鍙枫�佹瘺閲嶃�佸昂鐮佸強涓嬪垪瀛楀彞:
- <br/> 鈥濆嬁浣垮彈娼�� 銆佲�滃皬蹇冭交鏀锯�濄�� 鈥滄闈㈠悜涓娾�濈瓑瀛楁牱鍙婁笅鍒楀敍澶达細
- <br/> 4. SHIPPING MARK:
- <br/> The Seller shall mark on the surface of each package with fadeless paint, the package number锛実ross weight锛宮easurement
- <br/> and the following wordings锛�
- <br/> 鈥淜EEP AWAY FROM MOISTURE鈥濓紝鈥淗ANDLE WITH CARE鈥� 锛屸�淭HIS SIDE UP鈥� etc. And the below shipping mark:
- <br/>
- <div>
- <apex:outputField value="{!contra.order.PDF_Sp_SHIPPINGMARK__c}" />
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- 5.瑁呰繍鏉℃: {!contra.order.PDF_Sp_ShippingTerms__c}
- <br/> 5.TERMS OF SHIPMENT: {!contra.ShippingTerms}
- <br/>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- 6.浜よ揣鏈�:
- <apex:outputField value="{!contra.order.DeliveryTimeText__c}" />
- <br/> 6.THE DELIVERY TIME:
- <apex:outputField value="{!contra.order.DeliveryTimeTextEn__c}" />
- <!-- <br/> by
- the Buyer. -->
- <br/>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- 7.鍗栨柟搴斾繚鐣欒揣鐗╁拰闆堕儴浠剁殑浜ф潈鍜屾墍鏈夋潈锛岃绛夋潈鍒╁彧鏈夊湪鍏ㄩ鏀跺埌璐ф鏃舵柟鑷姩杞Щ鍒颁拱鏂广��
- <br/> 7.The Seller shall maintain title and ownership of the goods and spare parts thereof which shall automatically
- pass to the Buyer
- <br/> only on receipt of the full payment.
- <br/>
- </td>
- </tr>
-
- <tr>
- <td colspan="3">
- 8. 瑁呰繍鍙e哺锛� {!contra.order.PDF_Sp_LOADING__c}
- <br/> 8. PORT OF LOADING: {!contra.order.PDF_Sp_LOADING_E__c}
- <br/>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- 9. 鐩殑鍙e哺锛� {!contra.order.PDF_Sp_DestinationPort__c}
- <br/> 9. PORT OF DESTINATION: {!contra.order.PDF_Sp_DestinationPort_E__c}
- <br/>
- </td>
- </tr>
-
- <tr>
- <td colspan="3">
- 10. 淇濋櫓锛�
- <br/> 鐢卞崠鏂规寜鍙戠エ閲戦鐨�110%鎶曚繚鍏ㄩ櫓鍙婃垬浜夐櫓锛屽苟璇存槑鍙互鍦ㄤ腑鍥藉鍐呯储璧旓紝绌虹櫧鑳屼功銆�
- <br/> 10. INSURANCE:
- <br/> To be covered by the Seller for 110% of the invoice value covering all risks and war risk, indicating
- claims payable in China,
- <br/> in currency of the draft, blank endorsed.
- </td>
- </tr>
-
- <tr>
- <td colspan = "4">
- 11. 浠樻鏂瑰紡: {!contra.order.PDF_PaymentTerms__c}锛�<br/>
- 鎵�鏈夐摱琛屾墜缁垂锛屽寘鎷鏂归摱琛屽拰涓浆琛屾墜缁垂鍙婂叾瀹冭垂鐢紝鍧囩敱涔版柟鎵挎媴銆�<br/>
- 11. TERMS OF PAYMENT: {!contra.order.PDF_PaymentTerms_E__c}锛�<br/>
- All the bank charges and other expenses, including beneficiary bank and intermediary bank, arising from the payment shall be borne by the Buyer.<br/>
- </td>
- </tr>
- </table>
- <!--<apex:outputPanel layout="none">
- <div style="page-break-after: always;"/>
- </apex:outputPanel>-->
- <table style="font-size: 9pt;">
- <tr>
- <td>
- 12. 鎵�闇�鐨勬枃浠�:
- <br/>
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI') && Opp.TradeType__c = 'Taxation', 'true', 'false')}"
- layout="none">
- 1)聽{!contra.order.PDF_Bi_Quality__c}浠界敱鍗栨柟鍑哄叿鐨勮川閲忓拰鏁伴噺璇佹槑;
- <br/> 2) {!contra.order.PDF_Bi_Origin__c}浠藉崠鏂瑰嚭鍏风殑鍘熶骇鍦拌瘉鏄�;鍙�
- <br/> 3) {!contra.order.PDF_Bi_Non_Wooden__c}浠介潪鏈ㄨ川鍖呰璇佹槑銆�
- <br/>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!IF(Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
- 璇峰湪鍙戣揣鍚巤!contra.order.PDF_Bi_q1__c}涓伐浣滄棩鍐呭皢浠ヤ笅鎵�闇�鐨勬枃浠朵紶鐪�/鐢甸偖缁欎拱鏂�;
- <br/> 1) 绌鸿繍鎻愬崟姝f湰{!contra.order.PDF_Bi_airway__c}浠斤紝鍓湰{!contra.order.PDF_Bi_copyairway__c}浠姐�傚苟娉ㄦ槑鈥滆繍璐瑰凡浠樷��;
- <br/> 2) 鍙戠エ{!contra.order.PDF_Bi_invoice__c}浠�, 娉ㄦ槑鍚堝悓鍙峰拰杩愯緭鏍囪瘑(濡傛湁涓�涓互涓婅繍杈撴爣璇�, 搴斿垎鍒嚭鍏峰彂绁�)鍙婂悎鍚屼腑鍏跺畠缁嗚妭;
- <br/> 3) 濡備繚闄╃敱鍗栨柟璐熻矗鐨勬儏鍐典笅锛屽崠鏂归渶鎻愪緵淇濋櫓鍗晎!contra.order.PDF_Bi_Insurance__c}濂楋紝鎶曚竴鍒囬櫓锛� 鎸夊彂绁ㄩ噾棰�110锛呮姇淇濅竴鍒囬櫓;
- <br/> 4) {!contra.order.PDF_Bi_Packing__c}浠界敱鍗栨柟鍑哄叿鐨勮绠卞崟;
- <br/> 5)聽{!contra.order.PDF_Bi_Quality__c}浠界敱鍗栨柟鍑哄叿鐨勮川閲忓拰鏁伴噺璇佹槑;
- <br/> 6) {!contra.order.PDF_Bi_Origin__c}浠藉崠鏂瑰嚭鍏风殑鍘熶骇鍦拌瘉鏄�;鍙�
- <br/> 7) {!contra.order.PDF_Bi_Non_Wooden__c}浠介潪鏈ㄨ川鍖呰璇佹槑銆�
- <br/>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'ANI' ||Opp.ProductSegment__c = 'NDT', 'true', 'false')}"
- layout="none">
- 8) 鎵�鏈夊崟鎹� {!contra.order.PDF_Bi_AllBill__c}
- <br/>
- </apex:outputPanel>
- 12. DOCUMENTS REQUIRED (please don鈥檛 attach any documents of contract value with the shipment):
- <br/> Please fax/e-mail the below required documents to the Buyer within {!contra.order.PDF_Bi_q1__c}
- working days after shipment;
- <br/> 1) {!contra.order.PDF_Bi_airway__c} original and {!contra.order.PDF_Bi_copyairway__c} copy of clean
- air waybills marked 鈥渇reight prepaid鈥�;
- <br/> 2) Invoice in {!contra.order.PDF_Bi_invoice__c} copies indicating contract number and shipping mark
- (in case of more than one shipping mark,the invoice shall be
- <br/> issued separately), made out in details as per relative contract;
- <br/> 3) Insurance Policy/Certificate in one original and {!contra.order.PDF_Bi_Insurance__c} copies for
- 110% of the invoice value if the insurance is bought by the Seller;
- <br/> 4) Packing list in {!contra.order.PDF_Bi_Packing__c} copies issued by the Seller;
- <br/> 5)聽Certificate of Quality and Quantity in {!contra.order.PDF_Bi_Quality__c} copies issued by the
- Seller;
- <br/> 6) Certificate of Origin in {!contra.order.PDF_Bi_Origin__c} copies issued by the Seller; and
- <br/> 7) {!contra.order.PDF_Bi_Non_Wooden__c} Certificate of Non-wood material packing.
- <br/>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS', 'true', 'false')}" layout="none">
- 8) All the documents {!contra.AllBills} cargo
- <br/>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI', 'true', 'false')}" layout="none">
- 8) All the documents not with cargo
- </apex:outputPanel>
- </apex:outputPanel>
- </td>
- </tr>
-
- <tr>
- <td>
- 13. 瑁呰繍閫氱煡锛�
- <br/> 鍗栨柟搴斾簬鍙戣揣鍥涘崄鍏紙48锛夊皬鏃跺唴浠ヤ紶鐪熸垨鐢甸偖褰㈠紡鎻愪緵鍙戣揣閫氱煡鍛婄煡涔版柟鍚堝悓鍙枫�佽揣鐗╁悕绉般�佸疄瑁呮暟閲忋�侀噸閲忋�佷欢鏁般�佸彂绁ㄤ环
- <br/> 鍊笺�佽埅鐝彿鍙婃棩鏈熴�佺┖杩愬崟鍙风瓑
- <br/> 13. SHIPPING ADVICE:
- <br/> The Seller, within forty eight (48) hours after shipment is made, shall notify the Buyer of the contract
- no., name ofgoods,
- <br/> quantity, weight loaded, number of packages, invoice value, flight number and date, air waybill number
- etc. by fax or email.
- <br/>
- </td>
- </tr>
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI', 'true', 'false')}"
- layout="none">
- <tr>
- <td>
- 14. 璐ㄩ噺淇濊瘉锛�
- <br/> A. 鍗栨柟淇濊瘉鏈悎鍚屼箣璐х墿鏄敤鏈�濂界殑鏉愭枡浠ヤ笂绛夌殑宸ヨ壓鍒堕�狅紝宕柊鍙婃湭鐢ㄨ繃鐨勶紝鍏惰川閲忎笌瑙勬牸涓�鍒囨柟闈笌鏈悎鍚岀殑瑙勫畾鐩哥銆�
- <br/> 淇濊瘉鏈熶负鏈�缁堥獙鏀舵姤鍛婄缃蹭箣鏃ヨ捣鐨剓!contra.QAeng}浣嗕笉瓒呰繃鍙戣揣鏃ュ悗鐨剓!contra.QAeng4}銆�
- <br/> 鍦ㄤ繚璇佹湡鍐咃紝濡備拱鏂规寜鐓ц揣鐗╀娇鐢ㄨ鏄庝功鍦ㄦ甯告潯浠朵笅浣跨敤锛岀敱浜庡崠鏂硅璁℃垨鍒堕�犱笂鐨勭己闄疯�屽彂鐢熺殑鎹熷潖锛岀敱鍗栨柟璐熻矗銆�
- <br/> 鍦ㄤ繚璇佹湡鍐呭鏋滆揣鐗╃殑閲嶈闆堕儴浠堕渶瑕佹洿鎹紝鍒欒闆堕儴浠剁殑淇濊瘉鏈熶粠鏇存崲涔嬫棩璧烽噸鏂拌绠楋紝澶栬喘浠朵互鍘熶緵搴斿晢鐨勪繚璇佹湡涓哄噯銆�
- <br/> B. 濡傛灉鍙屾柟鍏卞悓鍟嗗畾骞剁‘璁ょ殑渚涜揣鑼冨洿涓湁閬楁紡鐨勯儴浠跺拰璁惧骞舵湁鍙兘瀵艰嚧鏁村璐х墿涓嶈兘鎸夋椂楠屾敹鎶曚骇鎴栧奖鍝嶇敓浜э紝鍗栨柟
- <br/> 鏈変箟鍔″拰璐d换鍦ㄥ埗閫犺繃绋嬩腑涓庝拱鏂瑰晢閲忓仛鍑虹浉搴旂殑璋冩暣鍜岃ˉ鏁戯紝骞朵繚璇佹暣濂椾互涓婅揣鐗╄兘閫氳繃楠屾敹銆�
- <br/> C. 鏈悎鍚屼腑鎵�杩扮殑淇濊瘉鏄�傜敤浜庢牴鎹悎鍚岃揣鐗╂彁渚涚殑鐨勫敮涓�淇濊瘉銆傛湰淇濊瘉鏉℃鍙栦唬骞舵帓闄ゆ硶寰嬨�佹儻渚嬨�佹硶浠ゆ垨鍏朵粬瑙勫畾鏂藉姞
- <br/> 鎴栭粯绀虹殑浠讳綍鍏朵粬鎷呬繚銆佷繚璇佸拰/鎴栨潯浠跺拰/鎴栧洜姝よ�屼骇鐢熺殑璐d换銆傚浜庝换浣曟湁缂洪櫡鐨勬垨涓嶇鍚堟爣鍑嗙殑璐х墿锛屼拱鏂规墍閫傜敤鐨勫彧鏈�
- <br/> 鏈潯鐗瑰埆瑙勫畾鐨勬晳娴庛��
- <br/> 14. WARRANTY锛�
- <br/> A锛嶵he Seller warrant that the goods hereof is made of the best materials with first class workmanship,
- brand new and
- <br/> unused and complies in all respects with the quality and specification stipulated in this Contract.
- <br/> The warranty period shall be {!contra.QAeng3}counting from the date on which the goods have been
- accepted by the end user
- <br/> but limited to a maximum of {!contra.QAeng2} from the date of shipment.
- <br/> Within the warranty period, the Seller shall be liable for the damage incurred on account of the
- defects attributable to the design
- <br/> and emerging during the course of manufacturing of the Seller鈥檚 side if the Buyer operate under
- regular conditions in accordance
- <br/> with the instruction to the equipments or the machines. Within the warranty period, if some important
- units and parts of the goods
- <br/> need to change, the warranty period of the new units and parts should be counted from the changing
- date. If the new units and
- <br/> parts are bought from the third party, the warranty period of the new units and parts should be
- counted according to the original suppliers.
- <br/> B锛嶪n case there鈥檚 any missing parts & machines which are out of the agreed scope of supply and
- most possibly would influence
- <br/> the commissioning or production on time, the Seller has the obligation and responsibility to discuss
- with Buyer to make concerned
- <br/> adjustments and amendments to warrant the acceptance of the goods.
- <br/> C. The warranty set out in this Contract is the only warranty applicable to the goods supplied pursuant
- to this Contract. This
- <br/> warranty replaces and excludes any other guarantee, warranty and/or condition imposed or implied
- by law, custom, statute or
- <br/> otherwise and/or resulting liabilities. Only those remedies specifically set out in this clause
- are available to the Buyer
- <br/> in respect of any defective or non-conforming goods.
- <br/>
- </td>
- </tr>
+ 12. DOCUMENTS REQUIRED (please don鈥檛 attach any documents of contract value with the shipment):<br/>
+ Please fax/e-mail the below required documents to the Buyer within {!contra.order.PDF_Bi_q1__c} working days after shipment;<br/>
+ 1) {!contra.order.PDF_Bi_airway__c} original and {!contra.order.PDF_Bi_copyairway__c} copy of clean air waybills marked 鈥渇reight prepaid鈥�;<br/>
+ 2) Invoice in {!contra.order.PDF_Bi_invoice__c} copies indicating contract number and shipping mark (in case of more than one shipping mark,the invoice shall be<br/>
+ issued separately), made out in details as per relative contract;<br/>
+ 3) Insurance Policy/Certificate in one original and {!contra.order.PDF_Bi_Insurance__c} copies for 110% of the invoice value if the insurance is bought by the Seller;<br/>
+ 4) Packing list in {!contra.order.PDF_Bi_Packing__c} copies issued by the Seller;<br/>
+ 5) Certificate of Quality and Quantity in {!contra.order.PDF_Bi_Quality__c} copies issued by the Seller; <br/>
+ 6) Certificate of Origin in {!contra.order.PDF_Bi_Origin__c} copies issued by the Seller; and<br/>
+ 7) {!contra.order.PDF_Bi_Non_Wooden__c} Certificate of Non-wood material packing.<br/>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS', 'true', 'false')}" layout="none">
+ 8) All the documents {!contra.AllBills} cargo<br/>
</apex:outputPanel>
<apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI', 'true', 'false')}" layout="none">
- <tr>
- <td>
- 14. 璐ㄩ噺淇濊瘉锛�
- <br/> A. 鍗栨柟淇濊瘉鏈悎鍚屼箣璐х墿鏄敤鏈�濂界殑鏉愭枡浠ヤ笂绛夌殑宸ヨ壓鍒堕�狅紝宕柊鍙婃湭鐢ㄨ繃鐨勶紝鍏惰川閲忎笌瑙勬牸涓�鍒囨柟闈笌鏈悎鍚岀殑瑙勫畾鐩哥銆�
- <br/> 淇濊瘉鏈熼厤浠朵负3涓湀锛屼富鏈轰负1骞磋嚦3骞达紝鏍规嵁浜у搧鍏蜂綋鍨嬪彿纭畾銆�
- <br/> 鍦ㄤ繚璇佹湡鍐咃紝濡備拱鏂规寜鐓ц揣鐗╀娇鐢ㄨ鏄庝功鍦ㄦ甯告潯浠朵笅浣跨敤锛岀敱浜庡崠鏂硅璁℃垨鍒堕�犱笂鐨勭己闄疯�屽彂鐢熺殑鎹熷潖锛岀敱鍗栨柟璐熻矗銆�
- <br/> 鍦ㄤ繚璇佹湡鍐呭鏋滆揣鐗╃殑閲嶈闆堕儴浠堕渶瑕佹洿鎹紝鍒欒闆堕儴浠剁殑淇濊瘉鏈熶粠鏇存崲涔嬫棩璧烽噸鏂拌绠楋紝澶栬喘浠朵互鍘熶緵搴斿晢鐨勪繚璇佹湡涓哄噯銆�
- <br/> B. 濡傛灉鍙屾柟鍏卞悓鍟嗗畾骞剁‘璁ょ殑渚涜揣鑼冨洿涓湁閬楁紡鐨勯儴浠跺拰璁惧骞舵湁鍙兘瀵艰嚧鏁村璐х墿涓嶈兘鎸夋椂楠屾敹鎶曚骇鎴栧奖鍝嶇敓浜э紝鍗栨柟
- <br/> 鏈変箟鍔″拰璐d换鍦ㄥ埗閫犺繃绋嬩腑涓庝拱鏂瑰晢閲忓仛鍑虹浉搴旂殑璋冩暣鍜岃ˉ鏁戯紝骞朵繚璇佹暣濂椾互涓婅揣鐗╄兘閫氳繃楠屾敹銆�
- <br/> C. 鏈悎鍚屼腑鎵�杩扮殑淇濊瘉鏄�傜敤浜庢牴鎹悎鍚岃揣鐗╂彁渚涚殑鐨勫敮涓�淇濊瘉銆傛湰淇濊瘉鏉℃鍙栦唬骞舵帓闄ゆ硶寰嬨�佹儻渚嬨�佹硶浠ゆ垨鍏朵粬瑙勫畾鏂藉姞
- <br/> 鎴栭粯绀虹殑浠讳綍鍏朵粬鎷呬繚銆佷繚璇佸拰/鎴栨潯浠跺拰/鎴栧洜姝よ�屼骇鐢熺殑璐d换銆傚浜庝换浣曟湁缂洪櫡鐨勬垨涓嶇鍚堟爣鍑嗙殑璐х墿锛屼拱鏂规墍閫傜敤鐨勫彧鏈�
- <br/> 鏈潯鐗瑰埆瑙勫畾鐨勬晳娴庛��
- <br/> 14. WARRANTY锛�
- <br/> A锛嶵he Seller warrant that the goods hereof is made of the best materials with first class workmanship,
- brand new and unused and
- <br/> complies in all respects with the quality and specification stipulated in this Contract.
- <br/> The warranty period shall be three months for accessory, 1-3 years for instrument.
- <br/> counting from the date on which the goods have been accepted by the end user but limited to a maximum
- of
- <br/> {!contra.QAeng2} from the date of shipment.
- <br/> Within the warranty period, the Seller shall be liable for the damage incurred on account of the
- defects attributable to the design
- <br/> and emerging during the course of manufacturing of the Seller鈥檚 side if the Buyer operate under
- regular conditions in accordance
- <br/> with the instruction to the equipments or the machines. Within the warranty period, if some important
- units and parts of the goods
- <br/> need to change, the warranty period of the new units and parts should be counted from the changing
- date. If the new units and
- <br/> parts are bought from the third party, the warranty period of the new units and parts should be
- counted according to the original suppliers.
- <br/> B锛嶪n case there鈥檚 any missing parts & machines which are out of the agreed scope of supply and
- most possibly would influence
- <br/> the commissioning or production on time, the Seller has the obligation and responsibility to discuss
- with Buyer to make concerned
- <br/> adjustments and amendments to warrant the acceptance of the goods.
- <br/> C. The warranty set out in this Contract is the only warranty applicable to the goods supplied pursuant
- to this Contract. This
- <br/> warranty replaces and excludes any other guarantee, warranty and/or condition imposed or implied
- by law, custom, statute or
- <br/> otherwise and/or resulting liabilities. Only those remedies specifically set out in this clause
- are available to the Buyer
- <br/> in respect of any defective or non-conforming goods.
- <br/>
- </td>
- </tr>
+ 8) All the documents not with cargo
</apex:outputPanel>
- </table>
- <!--<apex:outputPanel layout="none">
- <div style="page-break-after: always;"/>
- </apex:outputPanel>-->
- <table style="font-size: 9pt;">
- <tr>
- <td>
- 15. 妫�楠屼笌绱㈣禂锛�
- <br/> 锛�1锛変氦璐т箣鍓嶏紝鍒堕�犲巶搴斿璐х墿鐨勮川閲忚鏍笺�佹�ц兘鍜屾暟閲忚繘琛岀簿纭拰鍏ㄩ潰鐨勬鏌ュ苟鍑哄叿璇佹槑璐х墿涓庢湰鍚堝悓瑙勫畾鐩哥鐨勮瘉鏄庝功銆�
- <br/> 锛�2锛夎揣鐗╁埌鐩殑娓垨鐩殑鍦板悗90澶╁唴锛屼互杈冩棭鑰呬负鍑嗭紝涔版柟鎳夊悜涓浗鍑哄叆澧冩楠屾鐤眬鐢宠瀵规湁鍏宠揣鐗╃殑璐ㄩ噺銆佽鏍煎拰鏁伴噺杩�
- <br/> 琛屽垵姝ユ楠屽苟鐢卞叾鍑哄叿妫�楠屾姤鍛娿�傚涓浗鍑哄叆澧冩楠屾鐤眬鍙戠幇鍒拌揣鐗╃殑瑙勬牸鎴�/鍜屾暟閲忎笌鏈悎鍚岃瀹氫笉绗︼紝闄ゅ簲鐢变繚闄╁叕鍙告垨
- <br/> 鑸硅繍鍏徃璐熻矗澶栵紝涔版柟鏈夋潈鎷掓敹璐х墿鎴栧悜鍗栨柟鎻愬嚭璧斿伩銆�
- <br/> 锛�3锛夊璐х墿鐨勮川閲忓拰瑙勬牸涓庢湰鍚堝悓涓嶇锛屾垨鍦ㄦ湰鍚堝悓绗�13鏉¤瀹氱殑淇濊瘉鏈熷唴璇佹槑璐х墿鏈夌己闄凤紝涔版柟搴旂敵璇蜂腑鍥藉嚭鍏ュ妫�楠屾鐤�
- <br/> 灞�妫�楠岋紝骞舵湁鏉冩牴鎹妫�楠屾姤鍛婂悜鍗栨柟鎻愬嚭绱㈣禂銆�
- <br/> 锛�4锛夊崠鏂瑰涓庢湰鍚堝悓涓嶇閮ㄥ垎锛屽簲鍦ㄥ悎鐞嗙殑鏈熼檺鍐呮棤鍋挎崲璐ф垨琛ュ彂鐭己鎴栬船浣庤揣浠凤紝骞惰礋鎷呯敱姝や骇鐢熺殑涓�鍒囪垂鐢ㄥ拰鎹熷け锛屽寘鎷細
- <br/> 鍒╂伅銆侀摱琛岃垂鐢ㄣ�佽繍璐广�佷繚闄╄垂銆佹楠岃垂銆佷粨鍌ㄣ�佺爜澶磋鍗歌垂浠ュ強鍏朵粬涓�鍒囧繀瑕佽垂鐢ㄣ��
- <br/> 15. INSPECTION AND CLAIMS:
- <br/> 锛�1锛塗he manufacturer shall锛宐efore making delivery锛宮ake a precise and comprehensive inspection of the
- goods with regard
- <br/> to the quality, specification and quantity and issue certificates certifying that the goods are in conformity
- with the stipulations of
- <br/> the Contract.
- <br/> 锛�2锛塛ithin ninety (90) days after arrival of the goods at the port of destination or the place of destination,
- whichever is the earlier,
- <br/> the Buyer shall apply to the China Entry & Exit Inspection & Quarantine Bureau (CIQ) for a preliminary
- inspection in respect of the
- <br/> quality, specification and quantity of the goods and a survey report shall be issued thereof. If discrepancies
- are found by the CIQ
- <br/> regarding specifications or the quantity or both, except when the responsibilities lie with Insurance
- Company or Shipping Company,
- <br/> the Buyer has the right to reject the goods or to claim against the Seller.
- <br/> 锛�3锛塖hould the quality and specification of the goods not in conformity with the Contract or should the
- goods be proved defective
- <br/> during the warranty period stipulated in Clause 13, the Buyer shall arrange for a survey to be carried
- out by the CIQ and have the
- <br/> right to claim against the Seller on the strength of the survey report.
- <br/> 锛�4锛塅or any goods which are not in conformity with the Contract, the Seller锛寃ithin a reasonable time锛宻hall
- make replacement
- <br/>free of charge锛宒eliver the short ones or devalue the goods and bear all the charges and losing incurred
- thereof. The charges
- <br/>include interest, banking charges, freight, premium, inspecting charges, storing charges, discharging
- charges and other charges
- <br/>incurred since the goods are not in conformity with the contract.
- </td>
- </tr>
- <!-- </table>
- <apex:outputPanel layout="none">
- <div style="page-break-after: always;"/>
- </apex:outputPanel>
- <table style="font-size: 9pt;">-->
- <tr>
- <td>
- 16. 浜哄姏涓嶅彲鎶楁嫆浜嬫晠锛�
- <br/> 鐢变簬鍦ㄧ敓浜с�佽杩愯繃绋嬩腑鍙戠敓鐨勪汉鍔涗笉鍙姉鎷掍簨鏁咃紙濡傦細鎴樹簤銆佷弗閲嶇伀鐏俱�佹按鐏俱�佸彴椋庛�佸湴闇囦互鍙婂弻鏂瑰潎璁や负灞炰簬浜轰笉鍙姉鎷掍簨鏁咃級
- <br/> 鑰屼娇寰楀崠鏂瑰欢鏈熻鑸规垨涓嶈兘浜よ揣锛屽崠鏂瑰彲涓嶈礋鎷呰矗浠汇�備絾鏄崠鏂瑰簲鍦ㄤ笂杩颁簨鏁呭彂鐢熷悗绔嬪嵆浼犵湡閫氱煡涔版柟锛屽苟鍦ㄤ紶鐪熷悗14澶╁唴锛屾彁渚�
- <br/> 涓嶅彲鎶楁嫆浜嬫晠鍙戠敓鍦板煙鐨勪富绠℃斂搴滃綋灞�鎴栧晢浼氬嚭鍏风殑璇佷欢锛岀┖閭氦涔版柟浠ヨ祫璇佹槑銆傚湪姝ゆ儏鍐典笅锛屽崠鏂逛粛椤婚噰鍙栦竴鍒囧繀瑕佹帾鏂藉姞閫熻揣
- <br/> 鐗╃殑鍙戣繍銆傚涓嶅彲鎶楁嫆浜嬫晠寤剁画90澶╀互涓婏紝浠讳綍涓�鏂规湁鏉冨悜鍙︿竴鏂瑰彂鍑轰功闈㈤�氱煡涓鏈悎鍚屻��
- <br/> 16. FORCE MAJEURE:
- <br/> The Seller shall not be held responsible for the delay in shipment or non-delivery of the goods due
- to force majeure, such as war,
- <br/> serious fire, flood, typhoon and earthquake occur during the process of manufacturing or in the course
- of loading or transit. The
- <br/> Seller shall immediately advise the Buyer by fax of the occurrence mentioned above and within fourteen
- (14) days thereafter, the
- <br/> Seller shall send by airmail to the Buyer for their acceptance a certificate of the accident issued
- by the competent government
- <br/> authorities or the Chamber of Commerce where the accident occurs as evidence thereof. Under such circumstance
- the Seller,
- <br/> however, are still under the obligation to take all necessary measures to hasten the delivery of the
- goods. In case the accident lasts
- <br/> for more than ninety (90) days, both parties shall have the right to terminate this Contract by written
- notice to the other party.
- </td>
- </tr>
- <tr>
- <td>
- 17. 杩熶氦璐х墿鍙婅繚绾﹂噾锛�
- <br/> 闄ゆ湰鍚堝悓绗�15鏉℃墍瑙勫畾鐨勪笉鍙姉鎷掍簨鏁呭師鍥犲锛屽鍗栨柟涓嶈兘鎸夊悎鍚岃瀹氬噯鏃朵氦璐э紝鍦ㄥ崠鏂瑰悓鎰忔壙鎷�
- <br/> 杩熶氦杩濈害閲戝苟鐢变粯娆鹃妧琛屽湪鏀粯璐ф鏃舵墸闄ょ殑鏉′欢涓嬶紝涔版柟搴斿悓鎰忓欢鏈熶氦璐с�備絾杩熶氦杩濈害閲戞�婚涓�
- <br/> 鎳夎秴杩囧悎鍚屾�婚鐨�5%銆傝繜浜よ繚绾﹂噾鐜囦负姣忎竷(7)澶╁崈鍒嗕箣浜旓紝涓嶈冻涓�(7)澶╄�呭簲鎸変竷(7)澶╄绠椼��
- <br/>濡傚欢鏈熶氦璐ц秴杩囨湰鍚堝悓鎵�瑙勫畾鐨勮杩愭湡鍗�(10)鍛紝涔版柟鏈夋潈鍚戝崠鏂瑰彂鍑轰功闈㈤�氱煡涓鏈悎鍚屻��
- <br/> 17. LATE DELIVERY AND LIQUIDATED DAMAGES:
- <br/> Should the Seller fail to make delivery on time as stipulated in the Contract with the exception of
- force majeure causes specified in
- <br/> Clause 15 of this Contract, the Buyer shall agree to postpone the delivery on the condition that the
- Seller agree to pay a liquidated
- <br/> damages which shall be deducted by the paying bank from the payment under negotiation. The liquidated
- damages, however, shall
- <br/> not exceed five percent (5%) of the total value of the goods involved in the late delivery. The rate
- of liquidated damages is charge
- <br/> at one half percent (0.5%) for every seven (7) days, odd days less than seven (7) days should count
- as seven (7) days. In case the
- <br/> late delivery exceed ten (10) weeks of the time of shipment stipulated in the Contract, the Buyer shall
- have the right to terminate
- <br/> this Contract by written notice to the Seller.
- <br/>
- </td>
- </tr>
- <tr>
- <td>
- 18. 涓撳埄鏉冿細
- <br/> 鍗栨柟蹇呴』淇濋殰涔版柟鍦ㄤ腑鍥戒娇鐢ㄥ叾璐х墿鍙婂叾浠讳綍閮ㄥ垎涓嶅彈鍒扮涓夋柟鍏充簬渚电姱涓撳埄鏉冦�佸晢鏍囨潈鎴栧伐涓氳璁℃潈鐨勬寚鎺с�備换浣曠涓夋柟濡傛灉鎻愬嚭渚�
- <br/> 鏉冩寚鎺э紝鍗栨柟椤讳笌绗笁鏂逛氦娑夊苟鎵挎媴鐢辨寮曡捣鐨勪竴鍒囨硶寰嬭矗浠诲拰璐圭敤銆�
- <br/> 18. PATENT RIGHTS
- <br/> The Seller shall indemnify the Buyer against all third-party claims of infringement of patent, trademark,
- or industrial design rights
- <br/> arising from use of the goods or any part thereof in China. In case any third party brings a charge
- of infringement, the Seller shall
- <br/> negotiate with the third-party and be liable for any legal duty and expenses.
- <br/>
- </td>
- </tr>
- <tr>
- <td>
- 19. 鍚堝悓鏂囦欢鍙婅祫鏂欑殑浣跨敤:
- <br/> 锛�1锛夊湪鏈粡涔版柟涔﹂潰鍚屾剰鐨勬儏鍐典笅锛屽崠鏂逛笉寰楀皢鐢变拱鏂规垨浠h〃涔版柟鎻愪緵鐨勬湁鍏冲悎鍚屾潯鏂囥�佽鏍笺�佽鍒掋�佸浘绾搞�佹ā鍨嬨�佹牱鍝佹垨璧勬枡鎻愪緵
- <br/> 缁欎笌灞ヨ鏈悎鍚屾棤鍏崇殑浠讳綍浜恒�傚嵆浣垮悜涓庡饱琛屾湰鍚堝悓鏈夊叧鐨勪汉鍛樻彁渚涳紝涔熷簲娉ㄦ剰淇濆瘑骞朵粎闄愪簬灞ヨ鍚堝悓蹇呴』鐨勮寖鍥淬��
- <br/> 锛�2锛夐櫎闈炴墽琛屽悎鍚岄渶瑕侊紝鍦ㄤ簨鍏堟湭寰楀埌涔版柟涔﹂潰鍚屾剰鐨勬儏鍐典笅锛屽崠鏂逛笉寰椾娇鐢ㄦ潯娆撅紙1锛変腑鎵�鍒椾妇鐨勪换浣曟枃浠跺拰璧勬枡銆�
- <br/> 锛�3锛夐櫎鍚堝悓鏈韩澶栵紝鏉℃锛�1锛夊垪鏄庣殑鎵�鏈夋枃浠跺缁堜负涔版柟鐨勮储浜э紝鑻ヤ拱鏂硅姹傦紝鍗栨柟搴斾簬鍏跺悎鍚屼箟鍔″饱琛屽畬姣曚互鍚庡皢杩欎簺鏂囦欢鍙婂叏
- <br/> 閮ㄥ鍒朵欢閫�杩樼粰涔版柟銆�
- <br/> 19. USE OF CONTRACT鈥橲 DOCUMENTS AND INFORMATION:
- <br/> (1) The Seller shall not, without the Buyer鈥檚 prior written consent, disclose this Contract, or any
- provision hereof, or any
- <br/> specification, plan, drawing, pattern, sample, or information furnished by or on behalf of the Buyer
- in connection therewith, to any
- <br/> person other than the person employed by the Seller in the performance of this Contract. Disclosure
- to any such employed person
- <br/> shall be made in confidence and shall extend only so far as may be necessary for purposes of such performance.
- <br/> (2) The Seller shall not, without the Buyer鈥檚 prior written consent, make use of any document or information
- enumerated in
- <br/> Clause (1) except for purposes of performing this Contract.
- <br/> (3) Any document, other than this Contract itself, enumerated in Clause (1) shall remain the property
- of the Buyer and shall be
- <br/> returned (including all copies) to the Buyer on completion of the Seller鈥檚 performance under this Contract
- if so required by the Buyer.
- <br/>
- </td>
- </tr>
- <tr>
- <td>
- 20. 浠茶锛�
- <br/> 涓庢湰鍚堝悓鏈夊叧鐨勬垨鍥犳墽琛屾湰鍚堝悓鎵�鍙戠敓鐨勪竴鍒囦簤鎵э紝鐢辩璁㈠悎鍚岀殑鍙屾柟鍙嬪ソ鍗忓晢瑙e喅銆傝嫢涓嶈兘瑙e喅鏃讹紝妗堜欢鍙彁浜や腑鍥藉浗闄呯粡娴庤锤鏄�
- <br/> 浠茶濮斿憳浼氫徊瑁併�備徊瑁佹寜鍘熷悎鍚岃繘琛屻�備徊瑁佸鍛樹細鐨勮鍐充负鏈�缁堝喅瀹氾紝绛剧害鍙屾柟閮藉簲鏈嶄粠锛涗换浣曚竴鏂瑰潎涓嶅緱鍚戞硶闄㈡垨鍏朵粬褰撳眬姹傚姪鐢�
- <br/> 璇蜂慨鏀硅瑁佸喅銆傛垨鑰呭湪鍙屾柟鍚屾剰鐨勭涓夊浗鎴栧湴鍖鸿繘琛屼徊瑁併�備徊瑁佽垂鐢ㄧ敱鍙屾柟鏂硅礋鎷呫�傚湪浠茶鏈熼棿锛岄櫎浜嗗湪浠茶杩囩▼涓繘琛屼徊瑁佺殑閮ㄥ垎
- <br/> 澶栵紝鏈悎鍚屽簲缁х画鎵ц銆�
- <br/> 20. ARBITRA
- <br/> All disputes in connection with this Contract or the execution thereof shall be settled friendly through
- negotiation by the parties hereof.
- <br/> In case no settlement can be reached, the case may then be submitted for arbitration to the China International
- Economic and Trade
- <br/> Arbitration Commission, in accordance with the Rulers of Procedures promulgated by they said Arbitration
- Commission. The
- <br/> arbitration shall take place in China and the decision of the Arbitration Commission shall be final
- and binding upon both parties,
- <br/> neither party shall seek recourse to a law court or other authorities to appeal to revision of the decision.
- Or the arbitration may be
- <br/> taken place in a third country or place mutually agreed by both parties. Arbitration fee shall be borne
- by continue to execute
- <br/> this Contract except those under arbitration.
- <br/>
- </td>
- </tr>
- </table>
- <!-- <apex:outputPanel layout="none">
- <div style="page-break-after: always;"/>
- </apex:outputPanel> -->
- <table style="font-size: 9pt;">
- <colgroup>
- <col width="50%" />
- <col width="50%" />
- </colgroup>
- <tr>
- <td colspan="2">
- 21. 杩涘嚭鍙h鍙瘉锛�
- <br/> 杩涘彛鏈悎鍚岄」涓嬭揣鐗╂墍闇�鐨勪腑鍥芥斂搴滃強娴峰叧瑕佹眰鐨勮繘鍙h鍙瘉鍜屽叾浠栬繘鍙f枃浠剁敱涔版柟璐熻矗鍔炵悊銆傚嚭鍙f湰鍚堝悓椤逛笅璐х墿鎵�闇�鐨勫嚭鍙e浗鏀�
- <br/> 搴滃強娴峰叧瑕佹眰鐨勫嚭鍙h鍙瘉鍜屽叾浠栧嚭鍙f枃浠剁敱鍗栨柟璐熻矗鍔炵悊銆�
- <br/> 21. IMPORT AND EXPORT LICENCES:
- <br/> It is the responsibility of the Buyer to arrange import licenses or other import documents, if required
- for the goods covered by this
- <br/> Contract from the Chinese Government and Custom at the Buyer鈥檚 expense. It is the responsibility of
- the Seller to arrange export
- <br/> licenses or other export documents, if required for the Goods covered by this Contract from its country
- Government and Custom at
- <br/> the Seller鈥檚 expense.
- <br/>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- 22. 绋庤垂锛�
- <br/> 涓浗鏀垮簻鏍规嵁鐜拌绋庢硶鍚戜拱鏂瑰緛鏀剁殑涓庡饱琛屾湰鍚堝悓鏈夊叧鐨勪竴鍒囩◣璐圭敱涔版柟鏀粯銆�
- <br/> 涓浗鏀垮簻鏍规嵁鐜拌绋庢硶鍚戝崠鏂瑰緛鏀剁殑涓庡饱琛屾湰鍚堝悓鏈夊叧鐨勪竴鍒囩◣璐圭敱鍗栨柟鏀粯銆�
- <br/> 鍙戠敓鍦ㄤ腑鍥藉澶栫殑锛屼笌灞ヨ鏈悎鍚屾湁鍏崇殑涓�鍒囩◣璐癸紝搴旂敱鍗栨柟鎵挎媴銆�
- <br/> 22. TAX AND DUTIES锛�
- <br/> All taxes in connection with the execution of this Contract levied by the Chinese Government on the
- Buyer in accordance with the
- <br/> tax laws in effect shall be borne by the Buyer.All taxes in connection with the execution of this Contract
- levied by the Chinese
- <br/> Government on the Seller in accordance with the tax laws in effect shall be borne by the Seller. All
- taxes arising outside China in
- <br/> connection with the execution of this Contract shall be borne by the Seller.
- <br/>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- 23.閫傜敤娉曞緥锛�
- <br/> 鏈悎鍚屽簲鎸夌収涓崕浜烘皯鍏卞拰鍥界殑娉曞緥绠¤緰鍙婅В閲娿��
- <br/> 23. APPLICABLE LAW锛�
- <br/> This Contract shall be governed and construed in accordance with the laws of People鈥檚 Republic of China.
- <br/>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- 24.鍏朵粬:
- <br/> 锛�1锛夋湰鍚堝悓搴斾互涓枃鍜岃嫳鏂囦功鍐欙紝濡備腑鏂囧拰鑻辨枃鐗堟湰涔嬮棿鏈変换浣曚笉涓�鑷达紝鍒欎互鑻辨枃鏈负涓汇�傛妧鏈浘绾革紝涔板崠鍙屾柟鐨勬墍鏈夊嚱鐢典互鍙婁笌鍚�
- <br/> 鍚屾湁鍏崇殑鏂囦欢鍧囧簲浠ヤ腑鏂囨垨鑻辨枃涔﹀啓銆�
- <br/> 锛�2锛夐櫎鎶�鏈鏍间腑鍙︽湁瑙勫畾澶栵紝璁¢噺鍗曚綅鍧囦娇鐢ㄥ叕鍒躲��
- <br/> 锛�3锛夋瀵瑰悎鍚屾潯娆惧仛鍑轰换浣曚慨鏀癸紝鍧囬』鐢变拱鍗栧弻鏂圭缃蹭功闈㈢殑鍚堝悓淇敼涔︺��
- <br/> 锛�4锛夋湰鍚堝悓鎵�鏈夐檮浠跺皢鏄湰鍚堝悓涓嶅彲鍒嗗壊鐨勭粍鎴愰儴鍒嗗苟鍏锋湁鍚岀瓑鏁堝姏銆�
- <br/> 锛�5锛夋湭鍦ㄦ湰鍚堝悓涓鏄庣殑鍟嗗姟鎯緥搴旂鍚圛NCOTERMS 2000鏉℃鐨勮瀹氥��
- <br/> 锛�6锛夋湰鍚堝悓鐢变拱鍗栧弻鏂圭璁㈠悗绔嬪嵆鐢熸晥銆�
- <br/> 姝ゅ悎鍚岀敱涔板崠鍙屾柟绛剧讲姝f湰 {!contra.order.PDF_Co_Contract__c}浠姐�� 涔版柟鎸佹湁 {!contra.order.PDF_Co_BContra__c}浠姐��
- 鍗栨柟鎸佹湁 {!contra.order.PDF_Co_SContra__c}浠姐��
- <br/> 24. OTHERS:
- <br/> 锛�1锛塗his Contract shall be written in both Chinese and English, in case there is any inconsistency between
- the Chinese version
- <br/> and the English version, the English version shall prevail. The technical drawings, all correspondence
- and other documents
- <br/>pertaining to this Contract exchanged by the parties shall be written in Chinese or English.
- <br/> 锛�2锛堿ll measurement shall be in SI unit, unless otherwise specified in the Technical Specifications.
- <br/> 锛�3锛塏o variation in or modification of the terms of this Contract shall be valid except by written amendment
- signed by the parties.
- <br/> 锛�4锛堿ll appendixes to this Contract shall be formed as an integral part of this Contract and shall be
- equally effective.
- <br/> 锛�5锛� The commercial customs not described in this Contract shall be in accordance with the terms and
- conditions of INCOTERMS
- <br/> 2000.
- <br/> 锛�6锛塗his Contract shall become effective upon execution by the Buyer and the Seller.
- <br/> Both parties sign this Contract in {!contra.order.PDF_Co_Contract_E__c} .The buyer holds {!contra.order.PDF_Co_BContra_E__c}
- .The seller holds {!contra.order.PDF_Co_SContra_E__c} .
- <br/>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">
- 鍗栨柟锛� 浠櫙閫氬厜瀛︾鎶�锛堜笂娴凤級鏈夐檺鍏徃
- </td>
- <td style="vertical-align: top;">
- 涔版柟锛� {!specialDeliveryAddress.Name}
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">
- THE SELLER: Evident (Shanghai) Co., Ltd
- </td>
- <td style="vertical-align: top;">
- THE BUYER: {!specialDeliveryAddress.EnglishName__c}
- </td>
- </tr>
- <tr>
- <td>
- For and on behalf of
- </td>
- <td>
- For and on behalf of
- </td>
- </tr>
- <tr>
- <td>
- [*]
- </td>
- <td>
- [*]
- </td>
- </tr>
- <tr>
- <td colspan="2" height="100px"></td>
- </tr>
- <tr>
- <td>
- 绛惧悕锛�
- </td>
- <td>
- 绛惧悕锛�
- </td>
- </tr>
- <tr>
- <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none">
- <td>
- Name: Mitsuyuki Shirakawa
- </td>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'true', 'true')}" layout="none"> -->
- <td>
- Name: Yoshito Sato
- </td>
- <!-- </apex:outputPanel> -->
- <td>
- Name: {!contra.order.PDF_Sign_Name__c}
- </td>
- </tr>
- <tr>
- <td>
- Title: Division Manager
- </td>
- <td>
- Title:
- <span id="PDF_Sign_Title__c">{!contra.order.PDF_Sign_Title__c}</span>
- </td>
- </tr>
- <tr>
- <td>
- 鏃ユ湡锛�
- </td>
- <td>
- 鏃ユ湡锛�
- </td>
- </tr>
- <tr>
- <td>
- Signed on
- </td>
- <td>
- Signed on
- </td>
- </tr>
- </table>
- </div>
+ </apex:outputPanel>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ 13. 瑁呰繍閫氱煡锛�<br/>
+ 鍗栨柟搴斾簬鍙戣揣鍥涘崄鍏紙48锛夊皬鏃跺唴浠ヤ紶鐪熸垨鐢甸偖褰㈠紡鎻愪緵鍙戣揣閫氱煡鍛婄煡涔版柟鍚堝悓鍙枫�佽揣鐗╁悕绉般�佸疄瑁呮暟閲忋�侀噸閲忋�佷欢鏁般�佸彂绁ㄤ环<br/>
+ 鍊笺�佽埅鐝彿鍙婃棩鏈熴�佺┖杩愬崟鍙风瓑<br/>
+ 13. SHIPPING ADVICE: <br/>
+ The Seller, within forty eight (48) hours after shipment is made, shall notify the Buyer of the contract no., name ofgoods, <br/>
+ quantity, weight loaded, number of packages, invoice value, flight number and date, air waybill number etc. by fax or email.<br/>
+ </td>
+ </tr>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI', 'true', 'false')}" layout="none">
+ <tr>
+ <td>
+ 14. 璐ㄩ噺淇濊瘉锛�<br/>
+ A. 鍗栨柟淇濊瘉鏈悎鍚屼箣璐х墿鏄敤鏈�濂界殑鏉愭枡浠ヤ笂绛夌殑宸ヨ壓鍒堕�狅紝宕柊鍙婃湭鐢ㄨ繃鐨勶紝鍏惰川閲忎笌瑙勬牸涓�鍒囨柟闈笌鏈悎鍚岀殑瑙勫畾鐩哥銆�<br/>
+ 淇濊瘉鏈熶负鏈�缁堥獙鏀舵姤鍛婄缃蹭箣鏃ヨ捣鐨剓!contra.QAeng}浣嗕笉瓒呰繃鍙戣揣鏃ュ悗鐨剓!contra.QAeng4}銆�<br/>
+ 鍦ㄤ繚璇佹湡鍐咃紝濡備拱鏂规寜鐓ц揣鐗╀娇鐢ㄨ鏄庝功鍦ㄦ甯告潯浠朵笅浣跨敤锛岀敱浜庡崠鏂硅璁℃垨鍒堕�犱笂鐨勭己闄疯�屽彂鐢熺殑鎹熷潖锛岀敱鍗栨柟璐熻矗銆�<br/>
+ 鍦ㄤ繚璇佹湡鍐呭鏋滆揣鐗╃殑閲嶈闆堕儴浠堕渶瑕佹洿鎹紝鍒欒闆堕儴浠剁殑淇濊瘉鏈熶粠鏇存崲涔嬫棩璧烽噸鏂拌绠楋紝澶栬喘浠朵互鍘熶緵搴斿晢鐨勪繚璇佹湡涓哄噯銆�<br/>
+ B. 濡傛灉鍙屾柟鍏卞悓鍟嗗畾骞剁‘璁ょ殑渚涜揣鑼冨洿涓湁閬楁紡鐨勯儴浠跺拰璁惧骞舵湁鍙兘瀵艰嚧鏁村璐х墿涓嶈兘鎸夋椂楠屾敹鎶曚骇鎴栧奖鍝嶇敓浜э紝鍗栨柟<br/>
+ 鏈変箟鍔″拰璐d换鍦ㄥ埗閫犺繃绋嬩腑涓庝拱鏂瑰晢閲忓仛鍑虹浉搴旂殑璋冩暣鍜岃ˉ鏁戯紝骞朵繚璇佹暣濂椾互涓婅揣鐗╄兘閫氳繃楠屾敹銆�<br/>
+ C. 鏈悎鍚屼腑鎵�杩扮殑淇濊瘉鏄�傜敤浜庢牴鎹悎鍚岃揣鐗╂彁渚涚殑鐨勫敮涓�淇濊瘉銆傛湰淇濊瘉鏉℃鍙栦唬骞舵帓闄ゆ硶寰嬨�佹儻渚嬨�佹硶浠ゆ垨鍏朵粬瑙勫畾鏂藉姞<br/>
+ 鎴栭粯绀虹殑浠讳綍鍏朵粬鎷呬繚銆佷繚璇佸拰/鎴栨潯浠跺拰/鎴栧洜姝よ�屼骇鐢熺殑璐d换銆傚浜庝换浣曟湁缂洪櫡鐨勬垨涓嶇鍚堟爣鍑嗙殑璐х墿锛屼拱鏂规墍閫傜敤鐨勫彧鏈�<br/>
+ 鏈潯鐗瑰埆瑙勫畾鐨勬晳娴庛��<br/>
+ 14. WARRANTY锛�<br/>
+ A锛嶵he Seller warrant that the goods hereof is made of the best materials with first class workmanship, brand new and<br/>
+ unused and complies in all respects with the quality and specification stipulated in this Contract.<br/>
+ The warranty period shall be {!contra.QAeng3}counting from the date on which the goods have been accepted by the end user<br/>
+ but limited to a maximum of {!contra.QAeng2} from the date of shipment. <br/>
+ Within the warranty period, the Seller shall be liable for the damage incurred on account of the defects attributable to the design<br/>
+ and emerging during the course of manufacturing of the Seller鈥檚 side if the Buyer operate under regular conditions in accordance<br/>
+ with the instruction to the equipments or the machines. Within the warranty period, if some important units and parts of the goods<br/>
+ need to change, the warranty period of the new units and parts should be counted from the changing date. If the new units and<br/>
+ parts are bought from the third party, the warranty period of the new units and parts should be counted according to the original suppliers.<br/>
+ B锛嶪n case there鈥檚 any missing parts & machines which are out of the agreed scope of supply and most possibly would influence <br/>
+ the commissioning or production on time, the Seller has the obligation and responsibility to discuss with Buyer to make concerned <br/>
+ adjustments and amendments to warrant the acceptance of the goods.<br/>
+ C. The warranty set out in this Contract is the only warranty applicable to the goods supplied pursuant to this Contract. This<br/>
+ warranty replaces and excludes any other guarantee, warranty and/or condition imposed or implied by law, custom, statute or <br/>
+ otherwise and/or resulting liabilities. Only those remedies specifically set out in this clause are available to the Buyer<br/>
+ in respect of any defective or non-conforming goods.<br/>
+ </td>
+ </tr>
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI', 'true', 'false')}" layout="none">
+ <tr>
+ <td>
+ 14. 璐ㄩ噺淇濊瘉锛�<br/>
+ A. 鍗栨柟淇濊瘉鏈悎鍚屼箣璐х墿鏄敤鏈�濂界殑鏉愭枡浠ヤ笂绛夌殑宸ヨ壓鍒堕�狅紝宕柊鍙婃湭鐢ㄨ繃鐨勶紝鍏惰川閲忎笌瑙勬牸涓�鍒囨柟闈笌鏈悎鍚岀殑瑙勫畾鐩哥銆�<br/>
+ 淇濊瘉鏈熼厤浠朵负3涓湀锛屼富鏈轰负1骞磋嚦3骞达紝鏍规嵁浜у搧鍏蜂綋鍨嬪彿纭畾銆�<br/>
+ 鍦ㄤ繚璇佹湡鍐咃紝濡備拱鏂规寜鐓ц揣鐗╀娇鐢ㄨ鏄庝功鍦ㄦ甯告潯浠朵笅浣跨敤锛岀敱浜庡崠鏂硅璁℃垨鍒堕�犱笂鐨勭己闄疯�屽彂鐢熺殑鎹熷潖锛岀敱鍗栨柟璐熻矗銆�<br/>
+ 鍦ㄤ繚璇佹湡鍐呭鏋滆揣鐗╃殑閲嶈闆堕儴浠堕渶瑕佹洿鎹紝鍒欒闆堕儴浠剁殑淇濊瘉鏈熶粠鏇存崲涔嬫棩璧烽噸鏂拌绠楋紝澶栬喘浠朵互鍘熶緵搴斿晢鐨勪繚璇佹湡涓哄噯銆�<br/>
+ B. 濡傛灉鍙屾柟鍏卞悓鍟嗗畾骞剁‘璁ょ殑渚涜揣鑼冨洿涓湁閬楁紡鐨勯儴浠跺拰璁惧骞舵湁鍙兘瀵艰嚧鏁村璐х墿涓嶈兘鎸夋椂楠屾敹鎶曚骇鎴栧奖鍝嶇敓浜э紝鍗栨柟<br/>
+ 鏈変箟鍔″拰璐d换鍦ㄥ埗閫犺繃绋嬩腑涓庝拱鏂瑰晢閲忓仛鍑虹浉搴旂殑璋冩暣鍜岃ˉ鏁戯紝骞朵繚璇佹暣濂椾互涓婅揣鐗╄兘閫氳繃楠屾敹銆�<br/>
+ C. 鏈悎鍚屼腑鎵�杩扮殑淇濊瘉鏄�傜敤浜庢牴鎹悎鍚岃揣鐗╂彁渚涚殑鐨勫敮涓�淇濊瘉銆傛湰淇濊瘉鏉℃鍙栦唬骞舵帓闄ゆ硶寰嬨�佹儻渚嬨�佹硶浠ゆ垨鍏朵粬瑙勫畾鏂藉姞<br/>
+ 鎴栭粯绀虹殑浠讳綍鍏朵粬鎷呬繚銆佷繚璇佸拰/鎴栨潯浠跺拰/鎴栧洜姝よ�屼骇鐢熺殑璐d换銆傚浜庝换浣曟湁缂洪櫡鐨勬垨涓嶇鍚堟爣鍑嗙殑璐х墿锛屼拱鏂规墍閫傜敤鐨勫彧鏈�<br/>
+ 鏈潯鐗瑰埆瑙勫畾鐨勬晳娴庛��<br/>
+ 14. WARRANTY锛�<br/>
+ A锛嶵he Seller warrant that the goods hereof is made of the best materials with first class workmanship, brand new and unused and<br/>
+ complies in all respects with the quality and specification stipulated in this Contract. <br/>
+ The warranty period shall be three months for accessory, 1-3 years for instrument.<br/>
+ counting from the date on which the goods have been accepted by the end user but limited to a maximum of<br/>
+ {!contra.QAeng2} from the date of shipment. <br/>
+ Within the warranty period, the Seller shall be liable for the damage incurred on account of the defects attributable to the design<br/>
+ and emerging during the course of manufacturing of the Seller鈥檚 side if the Buyer operate under regular conditions in accordance<br/>
+ with the instruction to the equipments or the machines. Within the warranty period, if some important units and parts of the goods<br/>
+ need to change, the warranty period of the new units and parts should be counted from the changing date. If the new units and<br/>
+ parts are bought from the third party, the warranty period of the new units and parts should be counted according to the original suppliers.<br/>
+ B锛嶪n case there鈥檚 any missing parts & machines which are out of the agreed scope of supply and most possibly would influence <br/>
+ the commissioning or production on time, the Seller has the obligation and responsibility to discuss with Buyer to make concerned <br/>
+ adjustments and amendments to warrant the acceptance of the goods.<br/>
+ C. The warranty set out in this Contract is the only warranty applicable to the goods supplied pursuant to this Contract. This<br/>
+ warranty replaces and excludes any other guarantee, warranty and/or condition imposed or implied by law, custom, statute or <br/>
+ otherwise and/or resulting liabilities. Only those remedies specifically set out in this clause are available to the Buyer<br/>
+ in respect of any defective or non-conforming goods.<br/>
+ </td>
+ </tr>
+ </apex:outputPanel>
+ </table>
+ <!--<apex:outputPanel layout="none">
+ <div style="page-break-after: always;"/>
+ </apex:outputPanel>-->
+ <table style="font-size: 9pt;">
+ <tr>
+ <td>
+ 15. 妫�楠屼笌绱㈣禂锛�<br/>
+ 锛�1锛変氦璐т箣鍓嶏紝鍒堕�犲巶搴斿璐х墿鐨勮川閲忚鏍笺�佹�ц兘鍜屾暟閲忚繘琛岀簿纭拰鍏ㄩ潰鐨勬鏌ュ苟鍑哄叿璇佹槑璐х墿涓庢湰鍚堝悓瑙勫畾鐩哥鐨勮瘉鏄庝功銆�<br/>
+ 锛�2锛夎揣鐗╁埌鐩殑娓垨鐩殑鍦板悗90澶╁唴锛屼互杈冩棭鑰呬负鍑嗭紝涔版柟鎳夊悜涓浗鍑哄叆澧冩楠屾鐤眬鐢宠瀵规湁鍏宠揣鐗╃殑璐ㄩ噺銆佽鏍煎拰鏁伴噺杩�<br/>
+ 琛屽垵姝ユ楠屽苟鐢卞叾鍑哄叿妫�楠屾姤鍛娿�傚涓浗鍑哄叆澧冩楠屾鐤眬鍙戠幇鍒拌揣鐗╃殑瑙勬牸鎴�/鍜屾暟閲忎笌鏈悎鍚岃瀹氫笉绗︼紝闄ゅ簲鐢变繚闄╁叕鍙告垨<br/>
+ 鑸硅繍鍏徃璐熻矗澶栵紝涔版柟鏈夋潈鎷掓敹璐х墿鎴栧悜鍗栨柟鎻愬嚭璧斿伩銆�<br/>
+ 锛�3锛夊璐х墿鐨勮川閲忓拰瑙勬牸涓庢湰鍚堝悓涓嶇锛屾垨鍦ㄦ湰鍚堝悓绗�13鏉¤瀹氱殑淇濊瘉鏈熷唴璇佹槑璐х墿鏈夌己闄凤紝涔版柟搴旂敵璇蜂腑鍥藉嚭鍏ュ妫�楠屾鐤�<br/>
+ 灞�妫�楠岋紝骞舵湁鏉冩牴鎹妫�楠屾姤鍛婂悜鍗栨柟鎻愬嚭绱㈣禂銆�<br/>
+ 锛�4锛夊崠鏂瑰涓庢湰鍚堝悓涓嶇閮ㄥ垎锛屽簲鍦ㄥ悎鐞嗙殑鏈熼檺鍐呮棤鍋挎崲璐ф垨琛ュ彂鐭己鎴栬船浣庤揣浠凤紝骞惰礋鎷呯敱姝や骇鐢熺殑涓�鍒囪垂鐢ㄥ拰鎹熷け锛屽寘鎷細<br/>
+ 鍒╂伅銆侀摱琛岃垂鐢ㄣ�佽繍璐广�佷繚闄╄垂銆佹楠岃垂銆佷粨鍌ㄣ�佺爜澶磋鍗歌垂浠ュ強鍏朵粬涓�鍒囧繀瑕佽垂鐢ㄣ��<br/>
+ 15. INSPECTION AND CLAIMS:<br/>
+ 锛�1锛塗he manufacturer shall锛宐efore making delivery锛宮ake a precise and comprehensive inspection of the goods with regard<br/>
+ to the quality, specification and quantity and issue certificates certifying that the goods are in conformity with the stipulations of<br/>
+ the Contract. <br/>
+ 锛�2锛塛ithin ninety (90) days after arrival of the goods at the port of destination or the place of destination, whichever is the earlier,<br/>
+ the Buyer shall apply to the China Entry & Exit Inspection & Quarantine Bureau (CIQ) for a preliminary inspection in respect of the<br/>
+ quality, specification and quantity of the goods and a survey report shall be issued thereof. If discrepancies are found by the CIQ<br/>
+ regarding specifications or the quantity or both, except when the responsibilities lie with Insurance Company or Shipping Company,<br/>
+ the Buyer has the right to reject the goods or to claim against the Seller.<br/>
+ 锛�3锛塖hould the quality and specification of the goods not in conformity with the Contract or should the goods be proved defective <br/>
+ during the warranty period stipulated in Clause 13, the Buyer shall arrange for a survey to be carried out by the CIQ and have the<br/>
+ right to claim against the Seller on the strength of the survey report.<br/>
+ 锛�4锛塅or any goods which are not in conformity with the Contract, the Seller锛寃ithin a reasonable time锛宻hall make replacement <br/>free of charge锛宒eliver the short ones or devalue the goods and bear all the charges and losing incurred thereof. The charges <br/>include interest, banking charges, freight, premium, inspecting charges, storing charges, discharging charges and other charges <br/>incurred since the goods are not in conformity with the contract.
+ </td>
+ </tr>
+ <!-- </table>
<apex:outputPanel layout="none">
- <div style="page-break-after: always;" />
+ <div style="page-break-after: always;"/>
+ </apex:outputPanel>
+ <table style="font-size: 9pt;">-->
+ <tr>
+ <td>
+ 16. 浜哄姏涓嶅彲鎶楁嫆浜嬫晠锛�<br/>
+ 鐢变簬鍦ㄧ敓浜с�佽杩愯繃绋嬩腑鍙戠敓鐨勪汉鍔涗笉鍙姉鎷掍簨鏁咃紙濡傦細鎴樹簤銆佷弗閲嶇伀鐏俱�佹按鐏俱�佸彴椋庛�佸湴闇囦互鍙婂弻鏂瑰潎璁や负灞炰簬浜轰笉鍙姉鎷掍簨鏁咃級<br/>
+ 鑰屼娇寰楀崠鏂瑰欢鏈熻鑸规垨涓嶈兘浜よ揣锛屽崠鏂瑰彲涓嶈礋鎷呰矗浠汇�備絾鏄崠鏂瑰簲鍦ㄤ笂杩颁簨鏁呭彂鐢熷悗绔嬪嵆浼犵湡閫氱煡涔版柟锛屽苟鍦ㄤ紶鐪熷悗14澶╁唴锛屾彁渚�<br/>
+ 涓嶅彲鎶楁嫆浜嬫晠鍙戠敓鍦板煙鐨勪富绠℃斂搴滃綋灞�鎴栧晢浼氬嚭鍏风殑璇佷欢锛岀┖閭氦涔版柟浠ヨ祫璇佹槑銆傚湪姝ゆ儏鍐典笅锛屽崠鏂逛粛椤婚噰鍙栦竴鍒囧繀瑕佹帾鏂藉姞閫熻揣<br/>
+ 鐗╃殑鍙戣繍銆傚涓嶅彲鎶楁嫆浜嬫晠寤剁画90澶╀互涓婏紝浠讳綍涓�鏂规湁鏉冨悜鍙︿竴鏂瑰彂鍑轰功闈㈤�氱煡涓鏈悎鍚屻��<br/>
+ 16. FORCE MAJEURE:<br/>
+ The Seller shall not be held responsible for the delay in shipment or non-delivery of the goods due to force majeure, such as war,<br/>
+ serious fire, flood, typhoon and earthquake occur during the process of manufacturing or in the course of loading or transit. The<br/>
+ Seller shall immediately advise the Buyer by fax of the occurrence mentioned above and within fourteen (14) days thereafter, the<br/>
+ Seller shall send by airmail to the Buyer for their acceptance a certificate of the accident issued by the competent government<br/>
+ authorities or the Chamber of Commerce where the accident occurs as evidence thereof. Under such circumstance the Seller, <br/>
+ however, are still under the obligation to take all necessary measures to hasten the delivery of the goods. In case the accident lasts <br/>
+ for more than ninety (90) days, both parties shall have the right to terminate this Contract by written notice to the other party.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 17. 杩熶氦璐х墿鍙婅繚绾﹂噾锛�<br/>
+ 闄ゆ湰鍚堝悓绗�15鏉℃墍瑙勫畾鐨勪笉鍙姉鎷掍簨鏁呭師鍥犲锛屽鍗栨柟涓嶈兘鎸夊悎鍚岃瀹氬噯鏃朵氦璐э紝鍦ㄥ崠鏂瑰悓鎰忔壙鎷�<br/>
+ 杩熶氦杩濈害閲戝苟鐢变粯娆鹃妧琛屽湪鏀粯璐ф鏃舵墸闄ょ殑鏉′欢涓嬶紝涔版柟搴斿悓鎰忓欢鏈熶氦璐с�備絾杩熶氦杩濈害閲戞�婚涓�<br/>
+ 鎳夎秴杩囧悎鍚屾�婚鐨�5%銆傝繜浜よ繚绾﹂噾鐜囦负姣忎竷(7)澶╁崈鍒嗕箣浜旓紝涓嶈冻涓�(7)澶╄�呭簲鎸変竷(7)澶╄绠椼��<br/>濡傚欢鏈熶氦璐ц秴杩囨湰鍚堝悓鎵�瑙勫畾鐨勮杩愭湡鍗�(10)鍛紝涔版柟鏈夋潈鍚戝崠鏂瑰彂鍑轰功闈㈤�氱煡涓鏈悎鍚屻��<br/>
+ 17. LATE DELIVERY AND LIQUIDATED DAMAGES: <br/>
+ Should the Seller fail to make delivery on time as stipulated in the Contract with the exception of force majeure causes specified in <br/>
+ Clause 15 of this Contract, the Buyer shall agree to postpone the delivery on the condition that the Seller agree to pay a liquidated <br/>
+ damages which shall be deducted by the paying bank from the payment under negotiation. The liquidated damages, however, shall<br/>
+ not exceed five percent (5%) of the total value of the goods involved in the late delivery. The rate of liquidated damages is charge <br/>
+ at one half percent (0.5%) for every seven (7) days, odd days less than seven (7) days should count as seven (7) days. In case the<br/>
+ late delivery exceed ten (10) weeks of the time of shipment stipulated in the Contract, the Buyer shall have the right to terminate<br/>
+ this Contract by written notice to the Seller.<br/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 18. 涓撳埄鏉冿細<br/>
+ 鍗栨柟蹇呴』淇濋殰涔版柟鍦ㄤ腑鍥戒娇鐢ㄥ叾璐х墿鍙婂叾浠讳綍閮ㄥ垎涓嶅彈鍒扮涓夋柟鍏充簬渚电姱涓撳埄鏉冦�佸晢鏍囨潈鎴栧伐涓氳璁℃潈鐨勬寚鎺с�備换浣曠涓夋柟濡傛灉鎻愬嚭渚�<br/>
+ 鏉冩寚鎺э紝鍗栨柟椤讳笌绗笁鏂逛氦娑夊苟鎵挎媴鐢辨寮曡捣鐨勪竴鍒囨硶寰嬭矗浠诲拰璐圭敤銆�<br/>
+ 18. PATENT RIGHTS<br/>
+ The Seller shall indemnify the Buyer against all third-party claims of infringement of patent, trademark, or industrial design rights <br/>
+ arising from use of the goods or any part thereof in China. In case any third party brings a charge of infringement, the Seller shall<br/>
+ negotiate with the third-party and be liable for any legal duty and expenses.<br/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 19. 鍚堝悓鏂囦欢鍙婅祫鏂欑殑浣跨敤: <br/>
+ 锛�1锛夊湪鏈粡涔版柟涔﹂潰鍚屾剰鐨勬儏鍐典笅锛屽崠鏂逛笉寰楀皢鐢变拱鏂规垨浠h〃涔版柟鎻愪緵鐨勬湁鍏冲悎鍚屾潯鏂囥�佽鏍笺�佽鍒掋�佸浘绾搞�佹ā鍨嬨�佹牱鍝佹垨璧勬枡鎻愪緵<br/>
+ 缁欎笌灞ヨ鏈悎鍚屾棤鍏崇殑浠讳綍浜恒�傚嵆浣垮悜涓庡饱琛屾湰鍚堝悓鏈夊叧鐨勪汉鍛樻彁渚涳紝涔熷簲娉ㄦ剰淇濆瘑骞朵粎闄愪簬灞ヨ鍚堝悓蹇呴』鐨勮寖鍥淬��<br/>
+ 锛�2锛夐櫎闈炴墽琛屽悎鍚岄渶瑕侊紝鍦ㄤ簨鍏堟湭寰楀埌涔版柟涔﹂潰鍚屾剰鐨勬儏鍐典笅锛屽崠鏂逛笉寰椾娇鐢ㄦ潯娆撅紙1锛変腑鎵�鍒椾妇鐨勪换浣曟枃浠跺拰璧勬枡銆�<br/>
+ 锛�3锛夐櫎鍚堝悓鏈韩澶栵紝鏉℃锛�1锛夊垪鏄庣殑鎵�鏈夋枃浠跺缁堜负涔版柟鐨勮储浜э紝鑻ヤ拱鏂硅姹傦紝鍗栨柟搴斾簬鍏跺悎鍚屼箟鍔″饱琛屽畬姣曚互鍚庡皢杩欎簺鏂囦欢鍙婂叏<br/>
+ 閮ㄥ鍒朵欢閫�杩樼粰涔版柟銆�<br/>
+ 19. USE OF CONTRACT鈥橲 DOCUMENTS AND INFORMATION: <br/>
+ (1) The Seller shall not, without the Buyer鈥檚 prior written consent, disclose this Contract, or any provision hereof, or any<br/>
+ specification, plan, drawing, pattern, sample, or information furnished by or on behalf of the Buyer in connection therewith, to any <br/>
+ person other than the person employed by the Seller in the performance of this Contract. Disclosure to any such employed person<br/>
+ shall be made in confidence and shall extend only so far as may be necessary for purposes of such performance. <br/>
+ (2) The Seller shall not, without the Buyer鈥檚 prior written consent, make use of any document or information enumerated in<br/>
+ Clause (1) except for purposes of performing this Contract.<br/>
+ (3) Any document, other than this Contract itself, enumerated in Clause (1) shall remain the property of the Buyer and shall be<br/>
+ returned (including all copies) to the Buyer on completion of the Seller鈥檚 performance under this Contract if so required by the Buyer. <br/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 20. 浠茶锛�<br/>
+ 涓庢湰鍚堝悓鏈夊叧鐨勬垨鍥犳墽琛屾湰鍚堝悓鎵�鍙戠敓鐨勪竴鍒囦簤鎵э紝鐢辩璁㈠悎鍚岀殑鍙屾柟鍙嬪ソ鍗忓晢瑙e喅銆傝嫢涓嶈兘瑙e喅鏃讹紝妗堜欢鍙彁浜や腑鍥藉浗闄呯粡娴庤锤鏄�<br/>
+ 浠茶濮斿憳浼氫徊瑁併�備徊瑁佹寜鍘熷悎鍚岃繘琛屻�備徊瑁佸鍛樹細鐨勮鍐充负鏈�缁堝喅瀹氾紝绛剧害鍙屾柟閮藉簲鏈嶄粠锛涗换浣曚竴鏂瑰潎涓嶅緱鍚戞硶闄㈡垨鍏朵粬褰撳眬姹傚姪鐢�<br/>
+ 璇蜂慨鏀硅瑁佸喅銆傛垨鑰呭湪鍙屾柟鍚屾剰鐨勭涓夊浗鎴栧湴鍖鸿繘琛屼徊瑁併�備徊瑁佽垂鐢ㄧ敱鍙屾柟鏂硅礋鎷呫�傚湪浠茶鏈熼棿锛岄櫎浜嗗湪浠茶杩囩▼涓繘琛屼徊瑁佺殑閮ㄥ垎<br/>
+ 澶栵紝鏈悎鍚屽簲缁х画鎵ц銆�<br/>
+ 20. ARBITRA<br/>
+ All disputes in connection with this Contract or the execution thereof shall be settled friendly through negotiation by the parties hereof.<br/>
+ In case no settlement can be reached, the case may then be submitted for arbitration to the China International Economic and Trade<br/>
+ Arbitration Commission, in accordance with the Rulers of Procedures promulgated by they said Arbitration Commission. The <br/>
+ arbitration shall take place in China and the decision of the Arbitration Commission shall be final and binding upon both parties, <br/>
+ neither party shall seek recourse to a law court or other authorities to appeal to revision of the decision. Or the arbitration may be <br/>
+ taken place in a third country or place mutually agreed by both parties. Arbitration fee shall be borne by continue to execute<br/>
+ this Contract except those under arbitration. <br/>
+ </td>
+ </tr>
+ </table>
+ <!-- <apex:outputPanel layout="none">
+ <div style="page-break-after: always;"/>
+ </apex:outputPanel> -->
+ <table style="font-size: 9pt;">
+ <colgroup>
+ <col width="50%"/>
+ <col width="50%"/>
+ </colgroup>
+ <tr>
+ <td colspan = "2">
+ 21. 杩涘嚭鍙h鍙瘉锛�<br/>
+ 杩涘彛鏈悎鍚岄」涓嬭揣鐗╂墍闇�鐨勪腑鍥芥斂搴滃強娴峰叧瑕佹眰鐨勮繘鍙h鍙瘉鍜屽叾浠栬繘鍙f枃浠剁敱涔版柟璐熻矗鍔炵悊銆傚嚭鍙f湰鍚堝悓椤逛笅璐х墿鎵�闇�鐨勫嚭鍙e浗鏀�<br/>
+ 搴滃強娴峰叧瑕佹眰鐨勫嚭鍙h鍙瘉鍜屽叾浠栧嚭鍙f枃浠剁敱鍗栨柟璐熻矗鍔炵悊銆�<br/>
+ 21. IMPORT AND EXPORT LICENCES: <br/>
+ It is the responsibility of the Buyer to arrange import licenses or other import documents, if required for the goods covered by this <br/>
+ Contract from the Chinese Government and Custom at the Buyer鈥檚 expense. It is the responsibility of the Seller to arrange export<br/>
+ licenses or other export documents, if required for the Goods covered by this Contract from its country Government and Custom at<br/>
+ the Seller鈥檚 expense.<br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan = "2">
+ 22. 绋庤垂锛�<br/>
+ 涓浗鏀垮簻鏍规嵁鐜拌绋庢硶鍚戜拱鏂瑰緛鏀剁殑涓庡饱琛屾湰鍚堝悓鏈夊叧鐨勪竴鍒囩◣璐圭敱涔版柟鏀粯銆�<br/>
+ 涓浗鏀垮簻鏍规嵁鐜拌绋庢硶鍚戝崠鏂瑰緛鏀剁殑涓庡饱琛屾湰鍚堝悓鏈夊叧鐨勪竴鍒囩◣璐圭敱鍗栨柟鏀粯銆�<br/>
+ 鍙戠敓鍦ㄤ腑鍥藉澶栫殑锛屼笌灞ヨ鏈悎鍚屾湁鍏崇殑涓�鍒囩◣璐癸紝搴旂敱鍗栨柟鎵挎媴銆�<br/>
+ 22. TAX AND DUTIES锛�<br/>
+ All taxes in connection with the execution of this Contract levied by the Chinese Government on the Buyer in accordance with the<br/>
+ tax laws in effect shall be borne by the Buyer.All taxes in connection with the execution of this Contract levied by the Chinese<br/>
+ Government on the Seller in accordance with the tax laws in effect shall be borne by the Seller. All taxes arising outside China in<br/>
+ connection with the execution of this Contract shall be borne by the Seller. <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan = "2">
+ 23.閫傜敤娉曞緥锛�<br/>
+ 鏈悎鍚屽簲鎸夌収涓崕浜烘皯鍏卞拰鍥界殑娉曞緥绠¤緰鍙婅В閲娿��<br/>
+ 23. APPLICABLE LAW锛�<br/>
+ This Contract shall be governed and construed in accordance with the laws of People鈥檚 Republic of China.<br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan = "2">
+ 24.鍏朵粬:<br/>
+ 锛�1锛夋湰鍚堝悓搴斾互涓枃鍜岃嫳鏂囦功鍐欙紝濡備腑鏂囧拰鑻辨枃鐗堟湰涔嬮棿鏈変换浣曚笉涓�鑷达紝鍒欎互鑻辨枃鏈负涓汇�傛妧鏈浘绾革紝涔板崠鍙屾柟鐨勬墍鏈夊嚱鐢典互鍙婁笌鍚�<br/>
+ 鍚屾湁鍏崇殑鏂囦欢鍧囧簲浠ヤ腑鏂囨垨鑻辨枃涔﹀啓銆�<br/>
+ 锛�2锛夐櫎鎶�鏈鏍间腑鍙︽湁瑙勫畾澶栵紝璁¢噺鍗曚綅鍧囦娇鐢ㄥ叕鍒躲��<br/>
+ 锛�3锛夋瀵瑰悎鍚屾潯娆惧仛鍑轰换浣曚慨鏀癸紝鍧囬』鐢变拱鍗栧弻鏂圭缃蹭功闈㈢殑鍚堝悓淇敼涔︺��<br/>
+ 锛�4锛夋湰鍚堝悓鎵�鏈夐檮浠跺皢鏄湰鍚堝悓涓嶅彲鍒嗗壊鐨勭粍鎴愰儴鍒嗗苟鍏锋湁鍚岀瓑鏁堝姏銆�<br/>
+ 锛�5锛夋湭鍦ㄦ湰鍚堝悓涓鏄庣殑鍟嗗姟鎯緥搴旂鍚圛NCOTERMS 2000鏉℃鐨勮瀹氥��<br/>
+ 锛�6锛夋湰鍚堝悓鐢变拱鍗栧弻鏂圭璁㈠悗绔嬪嵆鐢熸晥銆�<br/>
+ 姝ゅ悎鍚岀敱涔板崠鍙屾柟绛剧讲姝f湰 {!contra.order.PDF_Co_Contract__c}浠姐�� 涔版柟鎸佹湁 {!contra.order.PDF_Co_BContra__c}浠姐�� 鍗栨柟鎸佹湁 {!contra.order.PDF_Co_SContra__c}浠姐��<br/>
+ 24. OTHERS:<br/>
+ 锛�1锛塗his Contract shall be written in both Chinese and English, in case there is any inconsistency between the Chinese version <br/>
+ and the English version, the English version shall prevail. The technical drawings, all correspondence and other documents <br/>pertaining to this Contract exchanged by the parties shall be written in Chinese or English.<br/>
+ 锛�2锛堿ll measurement shall be in SI unit, unless otherwise specified in the Technical Specifications.<br/>
+ 锛�3锛塏o variation in or modification of the terms of this Contract shall be valid except by written amendment signed by the parties.<br/>
+ 锛�4锛堿ll appendixes to this Contract shall be formed as an integral part of this Contract and shall be equally effective.<br/>
+ 锛�5锛� The commercial customs not described in this Contract shall be in accordance with the terms and conditions of INCOTERMS <br/>
+ 2000.<br/>
+ 锛�6锛塗his Contract shall become effective upon execution by the Buyer and the Seller. <br/>
+ Both parties sign this Contract in {!contra.order.PDF_Co_Contract_E__c} .The buyer holds {!contra.order.PDF_Co_BContra_E__c} .The seller holds {!contra.order.PDF_Co_SContra_E__c} .<br/>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">
+ 鍗栨柟锛� 浠櫙閫氬厜瀛︾鎶�锛堜笂娴凤級鏈夐檺鍏徃
+ </td>
+ <td style="vertical-align: top;">
+ 涔版柟锛� {!specialDeliveryAddress.Name}
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">
+ THE SELLER: Evident (Shanghai) Co., Ltd
+ </td>
+ <td style="vertical-align: top;">
+ THE BUYER: {!specialDeliveryAddress.EnglishName__c}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ For and on behalf of
+ </td>
+ <td>
+ For and on behalf of
+ </td>
+ </tr>
+ <tr>
+ <td>
+ [*]
+ </td>
+ <td>
+ [*]
+ </td>
+ </tr>
+ <tr><td colspan = "2" height="100px"></td></tr>
+ <tr>
+ <td>
+ 绛惧悕锛�
+ </td>
+ <td>
+ 绛惧悕锛�
+ </td>
+ </tr>
+ <tr>
+ <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none">
+ <td>
+ Name: Mitsuyuki Shirakawa
+ </td>
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'true', 'true')}" layout="none"> -->
+ <td>
+ Name: Yoshito Sato
+ </td>
+ <!-- </apex:outputPanel> -->
+ <td>
+ Name: {!contra.order.PDF_Sign_Name__c}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Title: Division Manager
+ </td>
+ <td>
+ Title: {!contra.order.PDF_Sign_Title__c}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 鏃ユ湡锛�
+ </td>
+ <td>
+ 鏃ユ湡锛�
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Signed on
+ </td>
+ <td>
+ Signed on
+ </td>
+ </tr>
+ </table>
+ <apex:outputPanel layout="none">
+ <div style="page-break-after: always;"/>
</apex:outputPanel>
- <div class="pdf-page">
- <table width="100%">
- <tr>
- <td style="text-align: center;">闄勪欢</td>
- </tr>
- <tr>
- <td style="text-align: center;">Appendix</td>
- </tr>
- </table>
- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none">
- <apex:variable value="{!1}" var="cnt1" />
- <apex:repeat value="{!printRecords}" var="set">
- <apex:repeat value="{!set.setPage}" var="sp">
-
- <table width="100%" border="1" cellspacing="0" cellpadding="0" style="table-layout:auto;font-size: 9pt;">
- <tr>
- <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none"> -->
- <td width="50%" style="text-align: center;">EC Code</td>
- <td style="text-align: center;">Quantity</td>
- <!-- </apex:outputPanel> -->
- <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'true', 'false')}" layout="none">
- <td width="25%" style="text-align: center;">U8 Code</td>
- <td width="25%" style="text-align: center;">Part Number</td>
- <td width="25%" style="text-align: center;">Quantity</td>
- <td style="text-align: center;">Name of Goods</td>
- </apex:outputPanel> -->
- </tr>
- <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none"> -->
- <tr>
- <td width="50%" style="text-align: center;">EC缂栫爜</td>
- <td style="text-align: center;">鏁伴噺</td>
- </tr>
- <!-- </apex:outputPanel> -->
- <apex:repeat value="{!sp}" var="line">
- <tr>
- <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none"> -->
- <td style="text-align: center;">
- <apex:outputText value="{!line.productEC}" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!line.quantity}" />
- </td>
- <!-- </apex:outputPanel> -->
- <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'true', 'false')}" layout="none">
- <td width="25%" style="text-align: center;"><apex:outputText value="{!line.U8Code}" /></td>
- <td width="25%" style="text-align: center;"><apex:outputText value="{!line.productEC}" /></td>
- <td width="25%" style="text-align: center;"><apex:outputText value="{!line.quantity}" /></td>
- <td style="text-align: center;"><apex:outputText value="{!line.productName}" /></td>
- </apex:outputPanel> -->
- </tr>
- </apex:repeat>
- </table>
-
- <!-- <apex:outputPanel rendered="{!cnt1 < pageCnt - 1}" layout="none">
- <div style="page-break-after: always;"/>
- </apex:outputPanel> -->
- <apex:variable value="{!cnt1 + 1}" var="cnt1" />
-
- </apex:repeat>
- </apex:repeat>
- </apex:outputPanel>
-
- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'false', 'true')}"
- layout="none">
-
+ <table width="100%">
+ <tr>
+ <td style="text-align: center;">闄勪欢</td>
+ </tr>
+ <tr>
+ <td style="text-align: center;">Appendix</td>
+ </tr>
+ </table>
+ <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none">
+ <apex:variable value="{!1}" var="cnt1" />
+ <apex:repeat value="{!printRecords}" var="set">
+ <apex:repeat value="{!set.setPage}" var="sp">
+
<table width="100%" border="1" cellspacing="0" cellpadding="0" style="table-layout:auto;font-size: 9pt;">
<tr>
- <td width="25%" style="text-align: center;">U8 Code</td>
- <td width="25%" style="text-align: center;">Part Number</td>
- <td width="25%" style="text-align: center;">Quantity</td>
- <td style="text-align: center;">Name of Goods</td>
+ <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none"> -->
+ <td width="50%" style="text-align: center;">EC Code</td>
+ <td style="text-align: center;">Quantity</td>
+ <!-- </apex:outputPanel> -->
+ <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'true', 'false')}" layout="none">
+ <td width="25%" style="text-align: center;">U8 Code</td>
+ <td width="25%" style="text-align: center;">Part Number</td>
+ <td width="25%" style="text-align: center;">Quantity</td>
+ <td style="text-align: center;">Name of Goods</td>
+ </apex:outputPanel> -->
</tr>
- <apex:repeat value="{!ndtList}" var="ndt">
+ <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none"> -->
<tr>
-
- <td style="text-align: center;">
- <apex:outputText value="{!ndt.U8_Code__c}" style="width: 95%" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!ndt.Part_Number__c}" style="width: 95%" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!ndt.Quantity__c}" style="width: 95%; text-align: center;" />
- </td>
- <td style="text-align: center;">
- <apex:outputText value="{!ndt.Name_of_Goods__c}" style="width: 95%" />
- </td>
+ <td width="50%" style="text-align: center;">EC缂栫爜</td>
+ <td style="text-align: center;">鏁伴噺</td>
</tr>
+ <!-- </apex:outputPanel> -->
+ <apex:repeat value="{!sp}" var="line">
+ <tr>
+ <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none"> -->
+ <td style="text-align: center;"><apex:outputText value="{!line.productEC}" /></td>
+ <td style="text-align: center;"><apex:outputText value="{!line.quantity}" /></td>
+ <!-- </apex:outputPanel> -->
+ <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'true', 'false')}" layout="none">
+ <td width="25%" style="text-align: center;"><apex:outputText value="{!line.U8Code}" /></td>
+ <td width="25%" style="text-align: center;"><apex:outputText value="{!line.productEC}" /></td>
+ <td width="25%" style="text-align: center;"><apex:outputText value="{!line.quantity}" /></td>
+ <td style="text-align: center;"><apex:outputText value="{!line.productName}" /></td>
+ </apex:outputPanel> -->
+ </tr>
</apex:repeat>
</table>
- </apex:outputPanel>
- </div>
-
- </div>
- </body>
- <style>
- /* 20220221 PI鏀归�� by 寰愪寒 start */
- body{margin: 0 auto;width: 780px;}
- .title1{height: 30px;}
- .title2{height: 110px;}
- /* 20220221 PI鏀归�� by 寰愪寒 end */
- </style>
- <!-- 20220221 PI鏀归�� by 寰愪寒 start -->
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
- <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
- <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
- <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
- <apex:includeScript value="{!URLFOR($Resource.jspdf)}"/>
- <apex:includeScript value="{!URLFOR($Resource.html2canvas)}"/>
-
- <script>
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- sforce.connection.serverUrl = '{!$Site.Prefix}/services/Soap/u/53.0';
- var staticResourceContact = JSON.parse('{!staticResourceContact}');
- var staticResourceOrder = JSON.parse('{!staticResourceOrder}');
- var staticResourceFile = JSON.parse('{!staticResourceFile}');
- function Fun(pdf) {
-
- var form = jQuery("<form method='post'></form>");
- jQuery(document.body).append(form);
- let href = window.location.href
- let arr = href.split('/')
- form.attr({ "action": staticResourceFile.hostUrl + staticResourceFile.extraInfo + "?from=" + encodeURIComponent(href) + "&fileName=" + encodeURIComponent(arr[arr.length - 1].split('?')[0]) });
- // form.attr({"action":"http://127.0.0.1:8080/a/d?from="+encodeURIComponent(window.location.href)});
- let input = jQuery("<input type='hidden'/>");
- input.attr({ "name": "base64Str" });
- input.val(pdf.output('datauristring').substr(28));
- form.append(input);
- form.submit();
-
- // jQuery("body > *").each(function(){
- // jQuery(this).css('display','none');
- // })
- // jQuery("body").append('<embed style="position:absolute; left: 0; top: 0;" width="100%" height="100%" src="'+pdf.output('datauristring')+'" type="application/pdf"/>')
-
- }
-
- let id = "pdf-wrapper";
- var target = document.getElementById(id);
- // 鎶奿mageDta杞崲鎴恥rl
- // page_height锛氫竴椤电殑楂樺害
- function ImageDataToUrl(img_data,page_height){
- let cvs = document.createElement("CANVAS");
- cvs.width = img_data.width;
- cvs.height = page_height;
- var ctx= cvs.getContext("2d");
- ctx.fillStyle="white";
- ctx.fillRect(0,0,cvs.width,cvs.height);// 濉厖canvas鎵�鏈夊尯鍩熶负鐧借壊
- let aheight = img_data.height
- for (let i = 0; i < img_data.height && img_data.height > page_height-5; i++) {
- aheight = img_data.height-i;
- let index = img_data.width*4*(aheight-1)
- let blank_count=0;
- for (let j = 0; j < img_data.width * 4; j+=4) {
-
- if (img_data.data[index+j] > 222 && img_data.data[index+j+1] > 222 && img_data.data[index+j+2] > 222) {
- //console.log(img_data.data[index+j] + ',' + img_data.data[index+j+1] + ',' + img_data.data[index+j+2]);
- blank_count++;
- }else{
- //console.log(index + ',' + j);
- }
- }
- if (blank_count > img_data.width * 0.99) {
- break;
- }
- }
- ctx.putImageData(img_data,0,0,0,0,img_data.width,aheight);
- return {
- data : cvs.toDataURL('image/jpeg', 1.0),
- height : aheight
- };
- }
- function jsPdfDownload() {
-
- let jtargets = jQuery("#pdf-wrapper .pdf-page");
- let j_arr = new Array(jtargets.length + 1).join(0).split('').map(function () { return false });
- let landscape = false;
- let pw = 595.28;
- let ph = 841.89;
- const marginw = 40;
- const marginh = 40;
-
- let orientation = '';
- if (landscape) {
- pw += ph; ph = pw - ph; pw = pw - ph;
- orientation = 'l';
- }
- var pdf = new jsPDF(orientation, 'pt', 'a4');// 绗竴涓弬鏁板~瀛楁瘝l锛屾敞鎰忎笉鏄暟瀛�1锛屼负妯悜pdf
- jtargets.each(function (i, e) {
- e.style.background = "#FFFFFF";
- })
-
- let rei = 0;
- let recursion = null;
- recursion = function (i) {
- if (i >= jtargets.length) {
- Fun(pdf);
- return;
- }
- e = jtargets[i];
- html2canvas(e, {
- scale: 2,
- onrendered: function (canvas) {
- /**
- 鏈柟娉曢渶瑕佸仛鍑犱釜浜嬫儏
- 1.闇�瑕佹妸canvas鐨勫唴瀹瑰垎椤垫樉绀哄埌pdf鐨勯〉涓�
- 2.canvas鐨勫楂橀渶瑕佸拰pdf鐨勫楂樿繘琛屾槧灏�
- 3.鎴彇鍒扮殑鍐呭闇�瑕佹斁杩涗竴椤靛楂樼殑canvas閲岄潰锛屽苟瀵瑰叾浣欏尯鍩熷埛鐧�
- */
- var ctx = canvas.getContext("2d");
- let canvas_max_page_num = 9;
- let canvas_current_page_num = 0;
- var contentWidth = canvas.width;
- var contentHeight = canvas.height;
-
-
- //鏈敓鎴恜df鐨刪tml椤甸潰楂樺害
- var leftHeight = contentHeight;
- //椤甸潰鍋忕Щ
- var position = 0;
-
- //a4绾哥殑灏哄[595.28,841.89]锛宧tml椤甸潰鐢熸垚鐨刢anvas鍦╬df涓浘鐗囩殑瀹介珮
- var outputWidth = pw - 2 * marginw;//595.28//宸﹀彸杈硅窛20
- let rate = outputWidth / 780;//杈撳嚭瀹藉害鍜屽唴瀹瑰搴︾殑姣斾緥
- var outputHeight = ph - 2 * marginh;//宸﹀彸杈硅窛20
- let onePdfPageInCanvasHeight = contentWidth/outputWidth*outputHeight;//涓�椤祊df鍦╟anvas涓殑楂樺害;
- //var pageData = canvas.toDataURL('image/jpeg', 1.0);
- var pageData = null;
- var imgData = null;
-
- var captureHeight = null;// 鎴彇鐨勫綋鍓峜anvas椤电殑楂樺害
-
- let j = i;
- while(position < contentHeight){
-
- if (j++) {
- pdf.addPage();
- }
-
- if(position+onePdfPageInCanvasHeight>contentHeight){
- captureHeight = contentHeight-position;
- }else{
- captureHeight = onePdfPageInCanvasHeight;
- }
-
- imgData = ctx.getImageData(0,position,contentWidth,captureHeight);
- pageData = ImageDataToUrl(imgData,onePdfPageInCanvasHeight);
- pdf.addImage(pageData.data, 'JPEG', marginw, marginh, outputWidth, outputHeight);//宸﹀彸杈硅窛20,琚緭鍑虹殑鍥剧墖浼氳鎷変几涓簅utputWidth锛宱utputHeight鐨勫楂�
- canvas_current_page_num++;
- position += pageData.height;
- if (canvas_max_page_num > 0 && canvas_current_page_num >= canvas_max_page_num) {
- break;
- }
- }
-
- recursion(i + 1);
- }
- })
- };
- recursion(rei);
-
-
-
- }
-
- function ReplaceDecrypt(staticResource,data){
- for (let index = 0; index < staticResource.PIDetails.length; index++) {
- let pi = staticResource.PIDetails[index];
- let e = document.getElementById(pi.SF_Field_API_Name__c);
- if (e && data && data.object && data.object[pi.AWS_Field_API__c]) {
- e.innerHTML = data[pi.AWS_Field_API__c]
- }
- }
- }
+ <!-- <apex:outputPanel rendered="{!cnt1 < pageCnt - 1}" layout="none">
+ <div style="page-break-after: always;"/>
+ </apex:outputPanel> -->
+ <apex:variable value="{!cnt1 + 1}" var="cnt1" />
-
- //blockme();
- document.body.onload = function(){
-
- let i = 0;
- let Foo = function(){
- if ( i == 2) {
- if(confirm("PDF宸插姞杞藉畬姣曪紝鏄惁鏄剧ず锛�")){
- jsPdfDownload();
- }
- }
- }
-
- if ('{!specialDeliveryContact.AWS_Data_Id__c}') {
- AWSService.query(staticResourceContact.queryUrl, '{!specialDeliveryContact.AWS_Data_Id__c}', function(data){
- ReplaceDecrypt(staticResourceContact,data);
-
- i++;
- Foo();
- }, staticResourceContact.token);
- }else{
- i++;
- Foo();
- }
-
- if ('{!contra.order.AWS_Data_Id__c}') {
- AWSService.query(staticResourceOrder.queryUrl, '{!contra.order.AWS_Data_Id__c}', function(data){
-
- ReplaceDecrypt(staticResourceOrder,data);
-
- i++;
- Foo();
- }, staticResourceOrder.token);
- }else{
- i++;
- Foo();
- }
- }
-
-
+ </apex:repeat>
+ </apex:repeat>
+ </apex:outputPanel>
- </script>
- <!-- 20220221 PI鏀归�� by 寰愪寒 end -->
+ <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'false', 'true')}" layout="none" >
+
+ <table width="100%" border="1" cellspacing="0" cellpadding="0" style="table-layout:auto;font-size: 9pt;">
+ <tr>
+ <td width="25%" style="text-align: center;">U8 Code</td>
+ <td width="25%" style="text-align: center;">Part Number</td>
+ <td width="25%" style="text-align: center;">Quantity</td>
+ <td style="text-align: center;">Name of Goods</td>
+ </tr>
+ <apex:repeat value="{!ndtList}" var="ndt">
+ <tr>
+
+ <td style="text-align: center;"><apex:outputText value="{!ndt.U8_Code__c}" style="width: 95%"/></td>
+ <td style="text-align: center;"><apex:outputText value="{!ndt.Part_Number__c}" style="width: 95%"/></td>
+ <td style="text-align: center;"><apex:outputText value="{!ndt.Quantity__c}" style="width: 95%; text-align: center;"/></td>
+ <td style="text-align: center;"><apex:outputText value="{!ndt.Name_of_Goods__c}" style="width: 95%"/></td>
+ </tr>
+ </apex:repeat>
+ </table>
+ </apex:outputPanel>
+
+ </body>
</html>
</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/OrderPdf2.page b/force-app/main/default/pages/OrderPdf2.page
index 8345a38..6fff05d 100644
--- a/force-app/main/default/pages/OrderPdf2.page
+++ b/force-app/main/default/pages/OrderPdf2.page
@@ -1,4 +1,4 @@
-<apex:page Controller="OrderPdf2Controller" showHeader="false" sidebar="false" id="allPage" action="{!init}" > <!-- renderAs="pdf" -->
+<apex:page Controller="OrderPdf2Controller" showHeader="false" sidebar="false" id="allPage" action="{!init}" renderAs="pdf" > <!-- renderAs="pdf" -->
<head>
<style>
@page {
@@ -15,30 +15,9 @@
td.border-thick-title { border-width: 1pt 0pt 1pt 0pt; border-style: solid; border-color: black; text-align: center;}
td.border-thick-bottom { border-width: 0pt 0pt 1pt 0pt; border-style: solid; border-color: black; text-align: center;}
td.detail { text-align: center; }
- /* 20220221 PI鏀归�� by 寰愪寒 start */
- body{margin: 0 auto;
- width: 780px;}
- #title1{height: 30px;}
- #title2{height: 110px;}
- /* 20220221 PI鏀归�� by 寰愪寒 end */
-
</style>
- <!-- 20220221 PI鏀归�� by 寰愪寒 start -->
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
- <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
- <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
- <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
-
- <apex:includeScript value="{!URLFOR($Resource.jspdf)}"/>
- <apex:includeScript value="{!URLFOR($Resource.html2canvas)}"/>
-
-
- <!-- 20220221 PI鏀归�� by 寰愪寒 end -->
</head>
-<body style="font-family: Arial Unicode MS; page-break-inside: auto; font-size: 8pt;line-height: 16pt;">
- <div id="pdf-wrapper">
- <div id="title1"></div>
+<body style="font-family: Arial Unicode MS; page-break-inside: auto; font-size: 8pt;">
<table border="0" width="100%">
<tr>
<td style="text-align: center; font-size: 16pt;">瀹岀◣璁㈣揣鍗�</td>
@@ -172,7 +151,7 @@
</tr>
<tr>
<td style="text-align: right;">鑱旂郴鍦板潃锛�</td>
- <td style="text-align: left;" colspan="5" id="delivery_address">{!header.delivery_address}</td>
+ <td style="text-align: left;" colspan="5">{!header.delivery_address}</td>
</tr>
<tr>
<td style="text-align: right;">鍩庡競锛�</td>
@@ -182,11 +161,11 @@
</tr>
<tr>
<td style="text-align: right;">鏀惰揣浜哄鍚嶏細</td>
- <td style="text-align: left;" id="delivery_user">{!header.delivery_user}</td>
+ <td style="text-align: left;">{!header.delivery_user}</td>
<td style="text-align: right;">鍥鸿瘽锛�</td>
- <td style="text-align: left;" id="delivery_phone">{!header.delivery_phone}</td>
+ <td style="text-align: left;">{!header.delivery_phone}</td>
<td style="text-align: right;">鎵嬫満锛�</td>
- <td style="text-align: left;" id="delivery_tel">{!header.delivery_tel}</td>
+ <td style="text-align: left;">{!header.delivery_tel}</td>
</tr>
</table>
<table style="border:solid 1px black" width="100%">
@@ -214,7 +193,7 @@
</tr>
<tr>
<td style="text-align: right;">鑱旂郴鍦板潃锛�</td>
- <td style="text-align: left;" colspan="5" id="user_address">{!header.user_address}</td>
+ <td style="text-align: left;" colspan="5">{!header.user_address}</td>
</tr>
<tr>
<td style="text-align: right;">鍩庡競锛�</td>
@@ -224,11 +203,11 @@
</tr>
<tr>
<td style="text-align: right;">鐢ㄦ埛濮撳悕锛�</td>
- <td style="text-align: left;" id="user_name2">{!header.user_name2}</td>
+ <td style="text-align: left;">{!header.user_name2}</td>
<td style="text-align: right;">鍥鸿瘽锛�</td>
- <td style="text-align: left;" id="user_phone">{!header.user_phone}</td>
+ <td style="text-align: left;">{!header.user_phone}</td>
<td style="text-align: right;">鎵嬫満锛�</td>
- <td style="text-align: left;" id="user_tel">{!header.user_tel}</td>
+ <td style="text-align: left;">{!header.user_tel}</td>
</tr>
<apex:outputPanel layout="none" rendered="{!IF(productSegment == 'IE', true, false)}">
<tr>
@@ -554,134 +533,5 @@
<td style="text-align: left;"> </td>
</tr> -->
</table>
-</div>
</body>
-<!-- 20220221 PI鏀归�� by 寰愪寒 start -->
-<script>
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResources = JSON.parse('{!staticResource}');
-
- function Fun(pdf){
- var iframe = document.createElement('iframe');
- iframe.setAttribute('style', 'position:absolute;right:0; top:0; bottom:0; height:100%; width:100%');
- document.body.appendChild(iframe);
- iframe.src = pdf.output('datauristring');
- for(let e of document.body.childNodes){
- if( e != iframe && e.style){
- e.style.display = 'none';
- }
- }
- }
-
- let id = "pdf-wrapper";
- var target = document.getElementById(id);
- function jsPdfDownload(){
- let pdfName = "娴嬭瘯";
- let id = "pdf-wrapper";
- var target = document.getElementById(id);
- target.style.background = "#FFFFFF";
- if(pdfName==''||pdfName==undefined) pdfName= getNowFormatDate();
-
- html2canvas(target, {
- scale: 2,
- onrendered:function(canvas) {
- let landscape = false;
- let pw = 595.28;
- let ph = 841.89;
- const marginw = 40;
-
- let orientation = '';
- if (landscape) {
- let temp =ph;
- ph = pw;
- pw = temp;
- orientation = 'l';
- }
-
-
- var contentWidth = canvas.width;
- var contentHeight = canvas.height;
-
- //涓�椤祊df鏄剧ずhtml椤甸潰鐢熸垚鐨刢anvas楂樺害;
- var pageHeight = contentWidth / pw * ph;
- //鏈敓鎴恜df鐨刪tml椤甸潰楂樺害
- var leftHeight = contentHeight;
- //椤甸潰鍋忕Щ
- var position = 0;
- //a4绾哥殑灏哄[595.28,841.89]锛宧tml椤甸潰鐢熸垚鐨刢anvas鍦╬df涓浘鐗囩殑瀹介珮
- var imgWidth = pw-2*marginw;//595.28//宸﹀彸杈硅窛20
- var imgHeight = imgWidth/contentWidth * contentHeight;//宸﹀彸杈硅窛20
-
- var pageData = canvas.toDataURL('image/jpeg', 1.0);
-
- var pdf = new jsPDF(orientation, 'pt', 'a4');// 绗竴涓弬鏁板~瀛楁瘝l锛屾敞鎰忎笉鏄暟瀛�1锛屼负妯悜pdf
-
- //鏈変袱涓珮搴﹂渶瑕佸尯鍒嗭紝涓�涓槸html椤甸潰鐨勫疄闄呴珮搴︼紝鍜岀敓鎴恜df鐨勯〉闈㈤珮搴�(841.89)
- //褰撳唴瀹规湭瓒呰繃pdf涓�椤垫樉绀虹殑鑼冨洿锛屾棤闇�鍒嗛〉
- if (leftHeight < pageHeight) {
- pdf.addImage(pageData, 'JPEG', marginw, 0, imgWidth, imgHeight );//宸﹀彸杈硅窛20
- } else {
- while(leftHeight > 0) {
- pdf.addImage(pageData, 'JPEG', marginw, position, imgWidth, imgHeight)//宸﹀彸杈硅窛20
- leftHeight -= pageHeight;
- position -= ph;
- //閬垮厤娣诲姞绌虹櫧椤�
- if(leftHeight > 0) {
- pdf.addPage();
- }
- }
- }
- Fun(pdf);
- }
- })
- }
-
- //blockme();
- document.body.onload = function(){
- let dataIds = [];
-
- if('{!header.delivery_aws_data_id}')dataIds.push('{!header.delivery_aws_data_id}');
- if('{!header.user_aws_data_id}')dataIds.push('{!header.user_aws_data_id}');
-
- AWSService.post(staticResources.searchUrl, JSON.stringify({
- dataIds:dataIds
- }), function(data){
-
- //unblockUI();
- if(data && data.object && data.object.length){
- for (const obj of data.object) {
- if (obj.dataId == '{!header.delivery_aws_data_id}') {
- document.getElementById("delivery_address").innerHTML = obj.address1;
- document.getElementById("delivery_user").innerHTML = obj.lastName;
- document.getElementById("delivery_phone").innerHTML = obj.phone;
- document.getElementById("delivery_tel").innerHTML = obj.mobilePhone;
- }
-
- if (obj.dataId == '{!header.user_aws_data_id}') {
- document.getElementById("user_address").innerHTML = obj.address1;
- document.getElementById("user_name2").innerHTML = obj.lastName;
- document.getElementById("user_phone").innerHTML = obj.phone;
- document.getElementById("user_tel").innerHTML = obj.mobilePhone;
- }
- }
-
-
- setTimeout(() => {
- jsPdfDownload();
- }, 1500);
- }
-
-
-
- }, staticResources.token);
-
-
-
- }
-
- document.body.onclick = function(){
- //jsPdfDownload();
- }
-</script>
-<!-- 20220221 PI鏀归�� by 寰愪寒 end -->
</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/OrderPdf3.page b/force-app/main/default/pages/OrderPdf3.page
index fdad6ec..0c28f12 100644
--- a/force-app/main/default/pages/OrderPdf3.page
+++ b/force-app/main/default/pages/OrderPdf3.page
@@ -16,33 +16,13 @@
td.border-thick-title { border-width: 1pt 0pt 1pt 0pt; border-style: solid; border-color: black; text-align: center;}
td.border-thick-bottom { border-width: 0pt 0pt 1pt 0pt; border-style: solid; border-color: black; text-align: center;}
td.detail { text-align: center; }
- /* 20220221 PI鏀归�� by 寰愪寒 start */
- body{margin: 0 auto;
- width: 780px;}
- #title1{height: 80px;}
- #title2{height: 110px;}
- /* 20220221 PI鏀归�� by 寰愪寒 end */
-
-</style>
-<!-- 20220221 PI鏀归�� by 寰愪寒 start -->
-<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
-<script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
-<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
-<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
-<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
-
-<apex:includeScript value="{!URLFOR($Resource.jspdf)}"/>
-<apex:includeScript value="{!URLFOR($Resource.html2canvas)}"/>
-
-
-<!-- 20220221 PI鏀归�� by 寰愪寒 end -->
+ </style>
</head>
-<body style="font-family: Arial Unicode MS; page-break-inside: auto; font-size: 8pt;line-height: 16pt;">
- <div id="pdf-wrapper">
- <div id="title1"></div>
- <table border="0" width="100%" style="margin-bottom: 8pt;">
+<body style="font-family: Arial Unicode MS; page-break-inside: auto; font-size: 8pt;">
+
+ <table border="0" width="100%">
<apex:outputPanel layout="none" rendered="{!IF(productSegment == 'NDT', true, false)}">
<tr>
<td style="text-align: center; font-size: 16pt;">SSBG-NDT鍐呰锤璁㈣揣鍗�</td>
@@ -148,11 +128,11 @@
</tr>
<tr>
<td style="text-align: right;">鏀惰揣浜哄鍚嶏細</td>
- <td style="text-align: left;" id="delivery_user">{!header.delivery_user}</td>
+ <td style="text-align: left;">{!header.delivery_user}</td>
<td style="text-align: right;">鍥鸿瘽锛�</td>
- <td style="text-align: left;" id="delivery_phone">{!header.delivery_phone}</td>
+ <td style="text-align: left;">{!header.delivery_phone}</td>
<td style="text-align: right;">鎵嬫満锛�</td>
- <td style="text-align: left;" id="delivery_tel">{!header.delivery_tel}</td>
+ <td style="text-align: left;">{!header.delivery_tel}</td>
</tr>
</table>
<table style="border:solid 1px black" width="100%">
@@ -180,7 +160,7 @@
</tr>
<tr>
<td style="text-align: right;">鑱旂郴鍦板潃锛�</td>
- <td style="text-align: left;" colspan="5" id="user_address">{!header.user_address}</td>
+ <td style="text-align: left;" colspan="5">{!header.user_address}</td>
</tr>
<tr>
<td style="text-align: right;">鍩庡競锛�</td>
@@ -190,11 +170,11 @@
</tr>
<tr>
<td style="text-align: right;">鐢ㄦ埛濮撳悕锛�</td>
- <td style="text-align: left;" id="user_name2">{!header.user_name2}</td>
+ <td style="text-align: left;">{!header.user_name2}</td>
<td style="text-align: right;">鍥鸿瘽锛�</td>
- <td style="text-align: left;" id="user_phone">{!header.user_phone}</td>
+ <td style="text-align: left;">{!header.user_phone}</td>
<td style="text-align: right;">鎵嬫満锛�</td>
- <td style="text-align: left;" id="user_tel">{!header.user_tel}</td>
+ <td style="text-align: left;">{!header.user_tel}</td>
</tr>
<tr>
<td style="text-align: right;">Sub Use锛�</td>
@@ -332,136 +312,8 @@
</tr>
</table>
-</div>
+
</body>
-<!-- 20220221 PI鏀归�� by 寰愪寒 start -->
-<script>
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResources = JSON.parse('{!staticResource}');
-
- function Fun(pdf){
- var iframe = document.createElement('iframe');
- iframe.setAttribute('style', 'position:absolute;right:0; top:0; bottom:0; height:100%; width:100%');
- document.body.appendChild(iframe);
- iframe.src = pdf.output('datauristring');
- for(let e of document.body.childNodes){
- if( e != iframe && e.style){
- e.style.display = 'none';
- }
- }
- }
-
- let id = "pdf-wrapper";
- var target = document.getElementById(id);
- function jsPdfDownload(){
- let pdfName = "娴嬭瘯";
- let id = "pdf-wrapper";
- var target = document.getElementById(id);
- target.style.background = "#FFFFFF";
- if(pdfName==''||pdfName==undefined) pdfName= getNowFormatDate();
-
- html2canvas(target, {
- scale: 2,
- onrendered:function(canvas) {
- let landscape = false;
- let pw = 595.28;
- let ph = 841.89;
- const marginw = 40;
-
- let orientation = '';
- if (landscape) {
- let temp =ph;
- ph = pw;
- pw = temp;
- orientation = 'l';
- }
-
-
- var contentWidth = canvas.width;
- var contentHeight = canvas.height;
-
- //涓�椤祊df鏄剧ずhtml椤甸潰鐢熸垚鐨刢anvas楂樺害;
- var pageHeight = contentWidth / pw * ph;
- //鏈敓鎴恜df鐨刪tml椤甸潰楂樺害
- var leftHeight = contentHeight;
- //椤甸潰鍋忕Щ
- var position = 0;
- //a4绾哥殑灏哄[595.28,841.89]锛宧tml椤甸潰鐢熸垚鐨刢anvas鍦╬df涓浘鐗囩殑瀹介珮
- var imgWidth = pw-2*marginw;//595.28//宸﹀彸杈硅窛20
- var imgHeight = imgWidth/contentWidth * contentHeight;//宸﹀彸杈硅窛20
-
- var pageData = canvas.toDataURL('image/jpeg', 1.0);
-
- var pdf = new jsPDF(orientation, 'pt', 'a4');// 绗竴涓弬鏁板~瀛楁瘝l锛屾敞鎰忎笉鏄暟瀛�1锛屼负妯悜pdf
-
- //鏈変袱涓珮搴﹂渶瑕佸尯鍒嗭紝涓�涓槸html椤甸潰鐨勫疄闄呴珮搴︼紝鍜岀敓鎴恜df鐨勯〉闈㈤珮搴�(841.89)
- //褰撳唴瀹规湭瓒呰繃pdf涓�椤垫樉绀虹殑鑼冨洿锛屾棤闇�鍒嗛〉
- if (leftHeight < pageHeight) {
- pdf.addImage(pageData, 'JPEG', marginw, 0, imgWidth, imgHeight );//宸﹀彸杈硅窛20
- } else {
- while(leftHeight > 0) {
- pdf.addImage(pageData, 'JPEG', marginw, position, imgWidth, imgHeight)//宸﹀彸杈硅窛20
- leftHeight -= pageHeight;
- position -= ph;
- //閬垮厤娣诲姞绌虹櫧椤�
- if(leftHeight > 0) {
- pdf.addPage();
- }
- }
- }
- Fun(pdf);
- }
- })
- }
-
- //blockme();
- document.body.onload = function(){
- let dataIds = [];
-
- if('{!header.delivery_aws_data_id}')dataIds.push('{!header.delivery_aws_data_id}');
- if('{!header.user_aws_data_id}')dataIds.push('{!header.user_aws_data_id}');
-
- AWSService.post(staticResources.searchUrl, JSON.stringify({
- dataIds:dataIds
- }), function(data){
-
- //unblockUI();
- if(data && data.object && data.object.length){
- for (const obj of data.object) {
- if (obj.dataId == '{!header.delivery_aws_data_id}') {
- document.getElementById("delivery_address").innerHTML = obj.address1;
- document.getElementById("delivery_user").innerHTML = obj.lastName;
- document.getElementById("delivery_phone").innerHTML = obj.phone;
- document.getElementById("delivery_tel").innerHTML = obj.mobilePhone;
- }
-
- if (obj.dataId == '{!header.user_aws_data_id}') {
- document.getElementById("user_address").innerHTML = obj.address1;
- document.getElementById("user_name2").innerHTML = obj.lastName;
- document.getElementById("user_phone").innerHTML = obj.phone;
- document.getElementById("user_tel").innerHTML = obj.mobilePhone;
- }
- }
-
-
- setTimeout(() => {
- jsPdfDownload();
- }, 1500);
- }
-
-
-
- }, staticResources.token);
-
-
-
- }
-
- document.body.onclick = function(){
- //jsPdfDownload();
- }
-</script>
-<!-- 20220221 PI鏀归�� by 寰愪寒 end -->
diff --git a/force-app/main/default/pages/QuotePDF.page b/force-app/main/default/pages/QuotePDF.page
index 103cf6e..0248eda 100644
--- a/force-app/main/default/pages/QuotePDF.page
+++ b/force-app/main/default/pages/QuotePDF.page
@@ -1,5 +1,4 @@
-<apex:page Controller="QuotePDFController" showHeader="false" sidebar="false" id="allPage" action="{!init}" >
- <!-- <apex:page Controller="QuotePDFController" showHeader="false" sidebar="false" id="allPage" action="{!init}" renderAs="pdf"> -->
+<apex:page Controller="QuotePDFController" showHeader="false" sidebar="false" id="allPage" action="{!init}" renderAs="pdf">
<head>
<style>
@page {
@@ -9,348 +8,156 @@
</style>
</head>
<body style="font-family: Arial Unicode MS; page-break-inside: auto">
- <div id="pdf-wrapper">
- <div class="pdf-page">
- <table border="0" width="100%" style="border-collapse: collapse;">
- <tr>
- <td style="text-align:right;">{!quoteInfo.quoteDate}</td>
- </tr>
- <tr>
- <td style="text-align:right;">{!$ObjectType.Quote.label}#{!quoteInfo.quoteNo}</td>
- </tr>
- <tr>
- <td style="text-align:right;">{!$Label.Label_Total_pages}锛歿!pageCnt}</td>
- </tr>
- <tr>
- <td style="text-align:left;">{!$Label.Label_From}锛歿!quoteInfo.dealerName}</td>
- </tr>
- <tr>
- <td style="text-align:left;">{!$ObjectType.Contact.label}锛�<span id="dealerContactName">{!quoteInfo.dealerContactName}</span> {!$ObjectType.Contact.fields.MobilePhone.label}锛�<span>{!quoteInfo.dealerContactPhone}</span></td>
- </tr>
- <tr>
- <td style="text-align:left;">{!$ObjectType.Account.fields.Address1__c.label}锛歿!quoteInfo.dealerAddress}</td>
- </tr>
- <tr>
- <td style="text-align:left;">{!$ObjectType.Contact.fields.Phone.label}锛歿!quoteInfo.dealerPhone} {!$ObjectType.Contact.fields.Fax.label}锛歿!quoteInfo.dealerFax}</td>
- </tr>
- <tr>
- <td style="text-align:left;">{!$ObjectType.Contact.fields.Email.label}锛歿!quoteInfo.dealerEmail}</td>
- </tr>
- <tr>
- <td style="text-align:left;"> </td>
- </tr>
- <tr>
- <td style="text-align:left;">{!$Label.Label_To}锛歿!quoteInfo.accountName}</td>
- </tr>
- <tr>
- <td style="text-align:left;" id="accountContactName">{!quoteInfo.accountContactName}</td>
- </tr>
- <tr>
- <td style="text-align:left;">{!$ObjectType.Contact.fields.Phone.label}锛�<span id="accountContactPhone">{!quoteInfo.accountContactPhone}</span> {!$ObjectType.Contact.fields.Email.label}锛�<span id="accountContactEmail">{!quoteInfo.accountContactEmail}</span></td>
- </tr>
- </table>
-
- <br/>
- Quotation Sheet(Quotation #{!quoteInfo.quoteNo})<br/>
-
- <table border="1" width="100%" style="border-collapse: collapse;table-layout: fixed;">
- <colgroup>
- <col width="10%" />
- <col width="60%" />
- <col width="10%" />
- <col width="20%" />
- </colgroup>
- <tr style="text-align: center;">
- <th>{!$Label.Label_Units}</th>
- <th>{!$Label.Label_Description}</th>
- <th>{!$ObjectType.QuoteLineItem.fields.Quantity.label}</th>
- <th>{!$ObjectType.QuoteLineItem.fields.TotalPrice.label}{!currencyIsoCode}</th>
- </tr>
- <apex:repeat value="{!printRecords}" var="set">
- <tr>
- <td style="text-align: center;"><apex:outputText value="{!set.units}" /></td>
- <td><apex:outputText value="{!set.description}" /></td>
- <td style="text-align: right;"><apex:outputText value="{!set.qty}" /></td>
- <td style="text-align: right;"><apex:outputText value="{!set.total}" /></td>
- </tr>
- </apex:repeat>
- </table>
-
- <br/>
-
- Note:<br/>
- <!-- 1) The payment terms are {!quoteInfo.note1} .<br/>
- 浠樻鏂瑰紡 {!quoteInfo.note2} 銆�<br/>
- 2) Quoation valid until {!quoteInfo.note3} .<br/>
- 鎶ヤ环鏈夋晥鏈熷埌 {!quoteInfo.note3} 銆�<br/>
- 3) All the commodoties come with {!quoteInfo.note4} year's manufacturer warranty.<br/>
- 鎵�鏈夊晢鍝佸惈 {!quoteInfo.note4} 骞村巶瀹朵繚淇��<br/>
- 4) The above quotations are {!quoteInfo.note5} prices, Commodoties shipped to the clien's requirements.<br/>
- 涓婅堪鎶ヤ环涓� {!quoteInfo.note5} 浠凤紝鍟嗗搧閫佽嚦瀹㈡埛鎸囧畾鍦扮偣銆�<br/>
- 5) The above quotations are all {!quoteInfo.note6}.<br/>
- 涓婅堪鎶ヤ环鍧囦负 {!quoteInfo.note7} 浠枫��<br/>
- 6) Configuration as per attached.<br/>
- 閰嶇疆娓呭崟璇﹁闄勪欢銆�<br/> -->
- <apex:outputText value="{!quoteInfo.comment}" escape="false"/>
- <!-- 1) The above quotations are CIP prices, Commodities shipped to the client鈥檚 requirements.<br/>
- 2) The above quotations are all tax {!quoteInfo.note2}.<br/>
- 3) The payment terms are {!quoteInfo.note3}.<br/>
- 4) Quotation valid until {!quoteInfo.note4}.<br/>
- 5) All the commodities come with {!quoteInfo.note5} year鈥檚 manufacturer warranty.<br/>
- 6) Configuration as per attached.<br/>
- 7) Delivery lead time is {!quoteInfo.note7} days after receipt of payment.<br/> -->
-
- </div>
- <apex:outputPanel rendered="{!pageCnt > 1}" layout="none">
- <div style="page-break-after: always;"/>
- </apex:outputPanel>
-
- <apex:variable value="{!1}" var="cnt1" />
+ <table border="0" width="100%" style="border-collapse: collapse;">
+ <tr>
+ <td style="text-align:right;">{!quoteInfo.quoteDate}</td>
+ </tr>
+ <tr>
+ <td style="text-align:right;">{!$ObjectType.Quote.label}#{!quoteInfo.quoteNo}</td>
+ </tr>
+ <tr>
+ <td style="text-align:right;">{!$Label.Label_Total_pages}锛歿!pageCnt}</td>
+ </tr>
+ <tr>
+ <td style="text-align:left;">{!$Label.Label_From}锛歿!quoteInfo.dealerName}</td>
+ </tr>
+ <tr>
+ <td style="text-align:left;">{!$ObjectType.Contact.label}锛歿!quoteInfo.dealerContactName} {!$ObjectType.Contact.fields.MobilePhone.label}锛歿!quoteInfo.dealerContactPhone}</td>
+ </tr>
+ <tr>
+ <td style="text-align:left;">{!$ObjectType.Account.fields.Address1__c.label}锛歿!quoteInfo.dealerAddress}</td>
+ </tr>
+ <tr>
+ <td style="text-align:left;">{!$ObjectType.Contact.fields.Phone.label}锛歿!quoteInfo.dealerPhone} {!$ObjectType.Contact.fields.Fax.label}锛歿!quoteInfo.dealerFax}</td>
+ </tr>
+ <tr>
+ <td style="text-align:left;">{!$ObjectType.Contact.fields.Email.label}锛歿!quoteInfo.dealerEmail}</td>
+ </tr>
+ <tr>
+ <td style="text-align:left;"> </td>
+ </tr>
+ <tr>
+ <td style="text-align:left;">{!$Label.Label_To}锛歿!quoteInfo.accountName}</td>
+ </tr>
+ <tr>
+ <td style="text-align:left;">{!quoteInfo.accountContactName}</td>
+ </tr>
+ <tr>
+ <td style="text-align:left;">{!$ObjectType.Contact.fields.Phone.label}锛歿!quoteInfo.accountContactPhone} {!$ObjectType.Contact.fields.Email.label}锛歿!quoteInfo.accountContactEmail}</td>
+ </tr>
+ </table>
+
+ <br/>
+ Quotation Sheet(Quotation #{!quoteInfo.quoteNo})<br/>
+
+ <table border="1" width="100%" style="border-collapse: collapse;table-layout: fixed;">
+ <colgroup>
+ <col width="10%" />
+ <col width="60%" />
+ <col width="10%" />
+ <col width="20%" />
+ </colgroup>
+ <tr style="text-align: center;">
+ <th>{!$Label.Label_Units}</th>
+ <th>{!$Label.Label_Description}</th>
+ <th>{!$ObjectType.QuoteLineItem.fields.Quantity.label}</th>
+ <th>{!$ObjectType.QuoteLineItem.fields.TotalPrice.label}{!currencyIsoCode}</th>
+ </tr>
<apex:repeat value="{!printRecords}" var="set">
- <!-- <apex:variable value="{!1}" var="cnt2" /> -->
- <apex:repeat value="{!set.setPage}" var="sp">
- <div class="pdf-page">
- <table border="1" width="100%" style="border-collapse: collapse;table-layout: fixed; font-size: 12px;">
- <colgroup>
- <col width="3%" />
- <col width="10%" />
- <col width="15%" />
- <col width="{!IF(isPrintPrice=='true', 23, 33)}%" />
- <col width="{!IF(isPrintPrice=='true', 20, 33)}%" />
- <col width="5%" />
- <apex:outputPanel rendered="{!isPrintPrice=='true'}" layout="none">
- <col width="12%" />
- <col width="12%" />
- </apex:outputPanel>
- </colgroup>
- <!-- <apex:outputPanel rendered="{!cnt2 == 1}" layout="none"> -->
- <tr style="text-align: center;">
- <td colspan="{!IF(isPrintPrice=='true', 8, 6)}">{!set.description}{!$Label.Label_Set_detail}</td>
- </tr>
- <!-- </apex:outputPanel> -->
- <tr style="text-align: center;">
- <td>{!$Label.Label_No}</td>
- <td>{!$ObjectType.Product2.fields.ProductCode.label}</td>
- <td>{!$ObjectType.Product2.fields.Product_ECCode__c.label}</td>
- <td>{!$ObjectType.Product2.fields.Description.label}</td>
- <td>{!$ObjectType.QuoteLineItem.fields.Description.label}</td>
- <td>{!$ObjectType.QuoteLineItem.fields.Quantity.label}</td>
- <apex:outputPanel rendered="{!isPrintPrice=='true'}" layout="none">
- <td>{!$ObjectType.QuoteLineItem.fields.UnitPrice.label}{!currencyIsoCode}</td>
- <td>{!$ObjectType.QuoteLineItem.fields.TotalPrice.label}{!currencyIsoCode}</td>
- </apex:outputPanel>
- </tr>
- <apex:repeat value="{!sp}" var="line">
- <tr>
- <td style="text-align: center;"><apex:outputText value="{!line.lineNo}" /></td>
- <td><apex:outputText escape="false" value="{!line.productCode}" /></td>
- <td><apex:outputText escape="false" value="{!line.productEC}" /></td>
- <td><apex:outputText escape="false" value="{!line.description}" /></td>
- <td><apex:outputText escape="false" value="{!line.comment}" /></td>
- <td style="text-align: right;"><apex:outputText value="{!line.quantity}" /></td>
- <apex:outputPanel rendered="{!isPrintPrice=='true'}" layout="none">
- <td style="text-align: right;"><apex:outputText value="{!line.price}" /></td>
- <td style="text-align: right;"><apex:outputText value="{!line.totalPrice}" /></td>
- </apex:outputPanel>
- </tr>
- </apex:repeat>
- </table>
- </div>
-
-
- <apex:outputPanel rendered="{!cnt1 < pageCnt - 1}" layout="none">
- <div style="page-break-after: always;"/>
- </apex:outputPanel>
-
- <!-- <apex:variable value="{!cnt2 + 1}" var="cnt2" /> -->
- <apex:variable value="{!cnt1 + 1}" var="cnt1" />
- </apex:repeat>
+ <tr>
+ <td style="text-align: center;"><apex:outputText value="{!set.units}" /></td>
+ <td><apex:outputText value="{!set.description}" /></td>
+ <td style="text-align: right;"><apex:outputText value="{!set.qty}" /></td>
+ <td style="text-align: right;"><apex:outputText value="{!set.total}" /></td>
+ </tr>
</apex:repeat>
- </div>
+ </table>
+
+ <br/>
+
+ Note:<br/>
+<!-- 1) The payment terms are {!quoteInfo.note1} .<br/>
+ 浠樻鏂瑰紡 {!quoteInfo.note2} 銆�<br/>
+ 2) Quoation valid until {!quoteInfo.note3} .<br/>
+ 鎶ヤ环鏈夋晥鏈熷埌 {!quoteInfo.note3} 銆�<br/>
+ 3) All the commodoties come with {!quoteInfo.note4} year's manufacturer warranty.<br/>
+ 鎵�鏈夊晢鍝佸惈 {!quoteInfo.note4} 骞村巶瀹朵繚淇��<br/>
+ 4) The above quotations are {!quoteInfo.note5} prices, Commodoties shipped to the clien's requirements.<br/>
+ 涓婅堪鎶ヤ环涓� {!quoteInfo.note5} 浠凤紝鍟嗗搧閫佽嚦瀹㈡埛鎸囧畾鍦扮偣銆�<br/>
+ 5) The above quotations are all {!quoteInfo.note6}.<br/>
+ 涓婅堪鎶ヤ环鍧囦负 {!quoteInfo.note7} 浠枫��<br/>
+ 6) Configuration as per attached.<br/>
+ 閰嶇疆娓呭崟璇﹁闄勪欢銆�<br/> -->
+ <apex:outputText value="{!quoteInfo.comment}" escape="false"/>
+<!-- 1) The above quotations are CIP prices, Commodities shipped to the client鈥檚 requirements.<br/>
+ 2) The above quotations are all tax {!quoteInfo.note2}.<br/>
+ 3) The payment terms are {!quoteInfo.note3}.<br/>
+ 4) Quotation valid until {!quoteInfo.note4}.<br/>
+ 5) All the commodities come with {!quoteInfo.note5} year鈥檚 manufacturer warranty.<br/>
+ 6) Configuration as per attached.<br/>
+ 7) Delivery lead time is {!quoteInfo.note7} days after receipt of payment.<br/> -->
+
+ <apex:outputPanel rendered="{!pageCnt > 1}" layout="none">
+ <div style="page-break-after: always;"/>
+ </apex:outputPanel>
+
+<apex:variable value="{!1}" var="cnt1" />
+<apex:repeat value="{!printRecords}" var="set">
+ <!-- <apex:variable value="{!1}" var="cnt2" /> -->
+ <apex:repeat value="{!set.setPage}" var="sp">
+ <table border="1" width="100%" style="border-collapse: collapse;table-layout: fixed; font-size: 12px;">
+ <colgroup>
+ <col width="3%" />
+ <col width="10%" />
+ <col width="15%" />
+ <col width="{!IF(isPrintPrice=='true', 23, 33)}%" />
+ <col width="{!IF(isPrintPrice=='true', 20, 33)}%" />
+ <col width="5%" />
+ <apex:outputPanel rendered="{!isPrintPrice=='true'}" layout="none">
+ <col width="12%" />
+ <col width="12%" />
+ </apex:outputPanel>
+ </colgroup>
+ <!-- <apex:outputPanel rendered="{!cnt2 == 1}" layout="none"> -->
+ <tr style="text-align: center;">
+ <td colspan="{!IF(isPrintPrice=='true', 8, 6)}">{!set.description}{!$Label.Label_Set_detail}</td>
+ </tr>
+ <!-- </apex:outputPanel> -->
+ <tr style="text-align: center;">
+ <td>{!$Label.Label_No}</td>
+ <td>{!$ObjectType.Product2.fields.ProductCode.label}</td>
+ <td>{!$ObjectType.Product2.fields.Product_ECCode__c.label}</td>
+ <td>{!$ObjectType.Product2.fields.Description.label}</td>
+ <td>{!$ObjectType.QuoteLineItem.fields.Description.label}</td>
+ <td>{!$ObjectType.QuoteLineItem.fields.Quantity.label}</td>
+ <apex:outputPanel rendered="{!isPrintPrice=='true'}" layout="none">
+ <td>{!$ObjectType.QuoteLineItem.fields.UnitPrice.label}{!currencyIsoCode}</td>
+ <td>{!$ObjectType.QuoteLineItem.fields.TotalPrice.label}{!currencyIsoCode}</td>
+ </apex:outputPanel>
+ </tr>
+ <apex:repeat value="{!sp}" var="line">
+ <tr>
+ <td style="text-align: center;"><apex:outputText value="{!line.lineNo}" /></td>
+ <td><apex:outputText escape="false" value="{!line.productCode}" /></td>
+ <td><apex:outputText escape="false" value="{!line.productEC}" /></td>
+ <td><apex:outputText escape="false" value="{!line.description}" /></td>
+ <td><apex:outputText escape="false" value="{!line.comment}" /></td>
+ <td style="text-align: right;"><apex:outputText value="{!line.quantity}" /></td>
+ <apex:outputPanel rendered="{!isPrintPrice=='true'}" layout="none">
+ <td style="text-align: right;"><apex:outputText value="{!line.price}" /></td>
+ <td style="text-align: right;"><apex:outputText value="{!line.totalPrice}" /></td>
+ </apex:outputPanel>
+ </tr>
+ </apex:repeat>
+ </table>
+
+ <apex:outputPanel rendered="{!cnt1 < pageCnt - 1}" layout="none">
+ <div style="page-break-after: always;"/>
+ </apex:outputPanel>
+
+ <!-- <apex:variable value="{!cnt2 + 1}" var="cnt2" /> -->
+ <apex:variable value="{!cnt1 + 1}" var="cnt1" />
+ </apex:repeat>
+</apex:repeat>
</body>
-<style>
- /* 20220221 PI鏀归�� by 寰愪寒 start */
- body{margin: 0 auto;width: 780px;}
- .title1{height: 30px;}
- .title2{height: 110px;}
- /* 20220221 PI鏀归�� by 寰愪寒 end */
-</style>
-<!-- 20220221 PI鏀归�� by 寰愪寒 start -->
-<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
-<script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
-<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
-<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
-<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
-<apex:includeScript value="{!URLFOR($Resource.jspdf)}"/>
-<apex:includeScript value="{!URLFOR($Resource.html2canvas)}"/>
-
-<!-- 20220221 PI鏀归�� by 寰愪寒 end -->
-<!-- 20220221 PI鏀归�� by 寰愪寒 start -->
-<script>
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- sforce.connection.serverUrl = '{!$Site.Prefix}/services/Soap/u/53.0';
- var staticResourceContact = JSON.parse('{!staticResourceContact}');
- var staticResourceOpportunity = JSON.parse('{!staticResourceOpportunity}');
- var staticResourceFile = JSON.parse('{!staticResourceFile}');
- function Fun(pdf) {
-
- var form = jQuery("<form method='post'></form>");
- jQuery(document.body).append(form);
- let href = window.location.href
- let arr = href.split('/')
- form.attr({ "action": staticResourceFile.hostUrl + staticResourceFile.extraInfo + "?from=" + encodeURIComponent(href) + "&fileName=" + encodeURIComponent(arr[arr.length - 1].split('?')[0]) });
- // form.attr({"action":"http://127.0.0.1:8080/a/d?from="+encodeURIComponent(window.location.href)});
- let input = jQuery("<input type='hidden'/>");
- input.attr({ "name": "base64Str" });
- input.val(pdf.output('datauristring').substr(28));
- form.append(input);
- form.submit();
-
- // jQuery("body > *").each(function(){
- // jQuery(this).css('display','none');
- // })
- // jQuery("body").append('<embed style="position:absolute; left: 0; top: 0;" width="100%" height="100%" src="'+pdf.output('datauristring')+'" type="application/pdf"/>')
-
- }
-
- let id = "pdf-wrapper";
- var target = document.getElementById(id);
- // 鎶奿mageDta杞崲鎴恥rl
- // page_height锛氫竴椤电殑楂樺害
- function ImageDataToUrl(img_data,page_height){
- let cvs = document.createElement("CANVAS");
- cvs.width = img_data.width;
- cvs.height = page_height;
- var ctx= cvs.getContext("2d");
- ctx.fillStyle="white";
- ctx.fillRect(0,0,cvs.width,cvs.height);// 濉厖canvas鎵�鏈夊尯鍩熶负鐧借壊
- ctx.putImageData(img_data,0,0);
- return cvs.toDataURL('image/jpeg', 1.0);
- }
- function jsPdfDownload() {
-
- let jtargets = jQuery("#pdf-wrapper .pdf-page");
- let j_arr = new Array(jtargets.length + 1).join(0).split('').map(function () { return false });
- let landscape = false;
- let pw = 595.28;
- let ph = 841.89;
- const marginw = 40;
- const marginh = 40;
-
- let orientation = '';
- if (landscape) {
- pw += ph; ph = pw - ph; pw = pw - ph;
- orientation = 'l';
- }
- var pdf = new jsPDF(orientation, 'pt', 'a4');// 绗竴涓弬鏁板~瀛楁瘝l锛屾敞鎰忎笉鏄暟瀛�1锛屼负妯悜pdf
- jtargets.each(function (i, e) {
- e.style.background = "#FFFFFF";
- })
-
- let rei = 0;
- let recursion = null;
- recursion = function (i) {
- if (i >= jtargets.length) {
- Fun(pdf);
- return;
- }
- e = jtargets[i];
- html2canvas(e, {
- scale: 2,
- onrendered: function (canvas) {
- /**
- 鏈柟娉曢渶瑕佸仛鍑犱釜浜嬫儏
- 1.闇�瑕佹妸canvas鐨勫唴瀹瑰垎椤垫樉绀哄埌pdf鐨勯〉涓�
- 2.canvas鐨勫楂橀渶瑕佸拰pdf鐨勫楂樿繘琛屾槧灏�
- 3.鎴彇鍒扮殑鍐呭闇�瑕佹斁杩涗竴椤靛楂樼殑canvas閲岄潰锛屽苟瀵瑰叾浣欏尯鍩熷埛鐧�
- */
- var ctx = canvas.getContext("2d");
- let canvas_max_page_num = 9;
- let canvas_current_page_num = 0;
- var contentWidth = canvas.width;
- var contentHeight = canvas.height;
-
-
- //鏈敓鎴恜df鐨刪tml椤甸潰楂樺害
- var leftHeight = contentHeight;
- //椤甸潰鍋忕Щ
- var position = 0;
-
- //a4绾哥殑灏哄[595.28,841.89]锛宧tml椤甸潰鐢熸垚鐨刢anvas鍦╬df涓浘鐗囩殑瀹介珮
- var outputWidth = pw - 2 * marginw;//595.28//宸﹀彸杈硅窛20
- let rate = outputWidth / 780;//杈撳嚭瀹藉害鍜屽唴瀹瑰搴︾殑姣斾緥
- var outputHeight = ph - 2 * marginh;//宸﹀彸杈硅窛20
- let onePdfPageInCanvasHeight = contentWidth/outputWidth*outputHeight;//涓�椤祊df鍦╟anvas涓殑楂樺害;
- //var pageData = canvas.toDataURL('image/jpeg', 1.0);
- var pageData = null;
- var imgData = null;
-
- var captureHeight = null;// 鎴彇鐨勫綋鍓峜anvas椤电殑楂樺害
-
- let j = i;
- while(position < contentHeight){
-
- if (j++) {
- pdf.addPage();
- }
-
- if(position+onePdfPageInCanvasHeight>contentHeight){
- captureHeight = contentHeight-position;
- }else{
- captureHeight = onePdfPageInCanvasHeight;
- }
-
- imgData = ctx.getImageData(0,position,contentWidth,captureHeight);
- pageData = ImageDataToUrl(imgData,onePdfPageInCanvasHeight);
- pdf.addImage(pageData, 'JPEG', marginw, marginh, outputWidth, outputHeight);//宸﹀彸杈硅窛20,琚緭鍑虹殑鍥剧墖浼氳鎷変几涓簅utputWidth锛宱utputHeight鐨勫楂�
- canvas_current_page_num++;
- position += onePdfPageInCanvasHeight;
- if (canvas_max_page_num > 0 && canvas_current_page_num >= canvas_max_page_num) {
- break;
- }
- }
-
- recursion(i + 1);
- }
- })
- };
- recursion(rei);
-
-
-
- }
-
- //blockme();
- document.body.onload = function(){
-
- let i = 0;
- let Foo = function(){
- if ( i == 2) {
- if(confirm("PDF宸插姞杞藉畬姣曪紝鏄惁鏄剧ず锛�")){
- jsPdfDownload();
- }
- }
- }
-
- AWSService.query(staticResourceContact.queryUrl, '{!quoteInfo.conAwsDataId}', function(data){
- //unblockUI();
- document.getElementById("accountContactName").innerHTML = data.object.lastName;
- document.getElementById("accountContactPhone").innerHTML = data.object.phone;
- document.getElementById("accountContactEmail").innerHTML = data.object.email;
- i++;
- Foo();
- }, staticResourceContact.token);
-
- AWSService.query(staticResourceOpportunity.queryUrl, '{!quoteInfo.oppAwsDataId}', function(data){
- //unblockUI();
- document.getElementById("dealerContactName").innerHTML = data.object.dealerSalesStaffName;
- i++;
- Foo();
- }, staticResourceOpportunity.token);
- }
-
-
-
-</script>
-<!-- 20220221 PI鏀归�� by 寰愪寒 end -->
</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/QuotesPDF.page b/force-app/main/default/pages/QuotesPDF.page
index 8e6ec01..bafe58d 100644
--- a/force-app/main/default/pages/QuotesPDF.page
+++ b/force-app/main/default/pages/QuotesPDF.page
@@ -1,4 +1,4 @@
-<apex:page controller="QuotesPDFController" showHeader="false" sidebar="false" id="allPage" action="{!init}" >
+<apex:page controller="QuotesPDFController" showHeader="false" sidebar="false" id="allPage" action="{!init}" renderAs="pdf">
<!-- renderAs="pdf" -->
<html>
@@ -8,30 +8,11 @@
size: A4 landscape;
margin: 12mm 12mm 5mm 12mm;
}
- /* 20220221 PI鏀归�� by 寰愪寒 start */
- body{margin: 0 auto;
- width: 780px;}
- #title1{height: 30px;}
- #title2{height: 110px;}
- /* 20220221 PI鏀归�� by 寰愪寒 end */
+
</style>
- <!-- 20220221 PI鏀归�� by 寰愪寒 start -->
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
- <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
- <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
- <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
-
- <apex:includeScript value="{!URLFOR($Resource.jspdf)}"/>
- <apex:includeScript value="{!URLFOR($Resource.html2canvas)}"/>
-
-
- <!-- 20220221 PI鏀归�� by 寰愪寒 end -->
</head>
<body>
- <div id="pdf-wrapper">
- <div id="title1"></div>
<table border="0" style="font-family: Arial Unicode MS; page-break-inside: auto" width="100%">
<colgroup>
<col width="60%"/>
@@ -73,14 +54,14 @@
<td>
<!-- <c:PDFWbr targetStr="{!conName}"/><br/>
<c:PDFWbr targetStr="{!quo.COMPANYName__c}"/><br/> -->
- <p style="line-height:15px;"><apex:outputField id="BILL_TO__c" value="{!quo.BILL_TO__c}"/><br/>
+ <p style="line-height:15px;"><apex:outputField value="{!quo.BILL_TO__c}"/><br/>
CHINA
</p>
</td>
<td>
<!-- <c:PDFWbr targetStr="{!conName}"/><br/>
<c:PDFWbr targetStr="{!quo.COMPANYName__c}"/><br/> -->
- <p style="line-height:15px;"><apex:outputField id="SHIP_TO__c" value="{!quo.SHIP_TO__c}"/><br/>
+ <p style="line-height:15px;"><apex:outputField value="{!quo.SHIP_TO__c}"/><br/>
CHINA
</p>
</td>
@@ -127,14 +108,14 @@
</apex:outputPanel>
<apex:outputPanel layout="none" rendered="{!IF(conName != null, true, false)}">
- <td style="border-bottom-width: 0;" id="conName">{!conName} </td>
+ <td style="border-bottom-width: 0;">{!conName} </td>
</apex:outputPanel>
<apex:outputPanel layout="none" rendered="{!IF(conName != null, false, true)}">
<td style="border-bottom-width: 0;"> </td>
</apex:outputPanel>
<apex:outputPanel layout="none" rendered="{!IF(quo.CONTACT_PHONE__c != null, true, false)}">
- <td style="border-bottom-width: 0;" id="CONTACT_PHONE__c">{!quo.CONTACT_PHONE__c} </td>
+ <td style="border-bottom-width: 0;">{!quo.CONTACT_PHONE__c} </td>
</apex:outputPanel>
<apex:outputPanel layout="none" rendered="{!IF(quo.CONTACT_PHONE__c != null, false, true)}">
<td style="border-bottom-width: 0;"> </td>
@@ -317,132 +298,8 @@
</apex:outputText></td>
</tr>
</table>
- </div>
+
</body>
- <!-- 20220221 PI鏀归�� by 寰愪寒 start -->
-<script>
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResources = JSON.parse('{!staticResource}');
- var contactStaticResource = JSON.parse('{!contactStaticResource}');
-
- function Fun(pdf){
- let uri = pdf.output('datauristring');
- let matches = /(?<=addFile=)[^&]*/.exec(window.location.href);
- if (matches && matches.length) {
- eval('top.'+matches[0]+'("'+uri+'")');
- return;
- }
- var iframe = document.createElement('iframe');
- iframe.setAttribute('style', 'position:absolute;right:0; top:0; bottom:0; height:100%; width:100%');
- document.body.appendChild(iframe);
- iframe.src = uri;
- for (let e of document.body.childNodes) {
- if (e != iframe && e.style) {
- e.style.display = 'none';
- }
- }
- }
-
- let id = "pdf-wrapper";
- var target = document.getElementById(id);
- function jsPdfDownload(){
- let pdfName = "娴嬭瘯";
- let id = "pdf-wrapper";
- var target = document.getElementById(id);
- target.style.background = "#FFFFFF";
- if(pdfName==''||pdfName==undefined) pdfName= getNowFormatDate();
-
- html2canvas(target, {
- scale: 2,
- onrendered:function(canvas) {
- let landscape = false;
- let pw = 595.28;
- let ph = 841.89;
- const marginw = 40;
-
- let orientation = '';
- if (landscape) {
- let temp =ph;
- ph = pw;
- pw = temp;
- orientation = 'l';
- }
-
-
- var contentWidth = canvas.width;
- var contentHeight = canvas.height;
-
- //涓�椤祊df鏄剧ずhtml椤甸潰鐢熸垚鐨刢anvas楂樺害;
- var pageHeight = contentWidth / pw * ph;
- //鏈敓鎴恜df鐨刪tml椤甸潰楂樺害
- var leftHeight = contentHeight;
- //椤甸潰鍋忕Щ
- var position = 0;
- //a4绾哥殑灏哄[595.28,841.89]锛宧tml椤甸潰鐢熸垚鐨刢anvas鍦╬df涓浘鐗囩殑瀹介珮
- var imgWidth = pw-2*marginw;//595.28//宸﹀彸杈硅窛20
- var imgHeight = imgWidth/contentWidth * contentHeight;//宸﹀彸杈硅窛20
-
- var pageData = canvas.toDataURL('image/jpeg', 1.0);
-
- var pdf = new jsPDF(orientation, 'pt', 'a4');// 绗竴涓弬鏁板~瀛楁瘝l锛屾敞鎰忎笉鏄暟瀛�1锛屼负妯悜pdf
-
- //鏈変袱涓珮搴﹂渶瑕佸尯鍒嗭紝涓�涓槸html椤甸潰鐨勫疄闄呴珮搴︼紝鍜岀敓鎴恜df鐨勯〉闈㈤珮搴�(841.89)
- //褰撳唴瀹规湭瓒呰繃pdf涓�椤垫樉绀虹殑鑼冨洿锛屾棤闇�鍒嗛〉
- if (leftHeight < pageHeight) {
- pdf.addImage(pageData, 'JPEG', marginw, 0, imgWidth, imgHeight );//宸﹀彸杈硅窛20
- } else {
- while(leftHeight > 0) {
- pdf.addImage(pageData, 'JPEG', marginw, position, imgWidth, imgHeight)//宸﹀彸杈硅窛20
- leftHeight -= pageHeight;
- position -= ph;
- //閬垮厤娣诲姞绌虹櫧椤�
- if(leftHeight > 0) {
- pdf.addPage();
- }
- }
- }
- Fun(pdf);
- }
- })
- }
-
-
- document.body.onload = function(){
- let i = 0;
- let Foo = function(){
- if(i == 2){
- jsPdfDownload();
- }
- }
- if('{!quo.AWS_Data_Id__c}'){
- AWSService.query(staticResources.queryUrl, '{!quo.AWS_Data_Id__c}', function(data){
- let e = document.getElementById("allPage:BILL_TO__c");if(e)e.innerHTML = data.object.billTo;
- e =document.getElementById("allPage:SHIP_TO__c");if(e)e.innerHTML = data.object.shipTo;
- e =document.getElementById("CONTACT_PHONE__c");if(e)e.innerHTML = data.object.contactPhone;
- i++;
- Foo();
-
- }, staticResources.token);
- }else{
- i++;
- Foo();
- }
-
- if('{!quo.CONTACT_NAME__r.AWS_Data_Id__c}'){
- AWSService.query(contactStaticResource.queryUrl, '{!quo.CONTACT_NAME__r.AWS_Data_Id__c}', function(data){
- let e = document.getElementById("conName");if(e)e.innerHTML = data.object.lastName;
- i++;
- Foo();
- }, staticResources.token);
- }else{
- i++;
- Foo();
- }
-
-
- }
-</script>
-<!-- 20220221 PI鏀归�� by 寰愪寒 end -->
</html>
</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/SSBDContractFileUploadPage.page b/force-app/main/default/pages/SSBDContractFileUploadPage.page
index bd3b5cf..3e33226 100644
--- a/force-app/main/default/pages/SSBDContractFileUploadPage.page
+++ b/force-app/main/default/pages/SSBDContractFileUploadPage.page
@@ -191,7 +191,7 @@
<!-- </apex:pageBlockSection> -->
</apex:pageBlock>
</apex:form>
- <apex:relatedList list="CombinedAttachments" id="Notes">
+ <apex:relatedList list="CombinedAttachments" id="Notes">
<apex:facet name="NoteHeader" ></apex:facet>
</apex:relatedList>
<script>
diff --git a/force-app/main/default/pages/SWOPage.page b/force-app/main/default/pages/SWOPage.page
index ec2d8f2..b9d64c1 100644
--- a/force-app/main/default/pages/SWOPage.page
+++ b/force-app/main/default/pages/SWOPage.page
@@ -5,100 +5,8 @@
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
- <!-- 20220313 PI鏀归�� by Chen Yanan -->
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
<script>
- // 20220313 PI鏀归�� by Chen Yanan start
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResources = JSON.parse('{!staticResource}');
- var contactstaticResource = JSON.parse('{!contactstaticResource}');
- var aws_data = {};
- console.log('AWS' + '{!contactAWSDataId}');
- var isNew = {!isNew};
- console.log('isNew: ' + isNew);
-
- function Decrypt(r,dataIds,callback){
- if (!(dataIds && dataIds.length)) {
- if(callback)callback();
- return;
- }
-
- let Foo = function(){
- for (const id of dataIds) {
- if (aws_data.hasOwnProperty(id)) {
- let d = aws_data[id];
- let $e =j$("[aws-id='"+d.dataId+ "']");
- $e.each((i,e)=>{
- //j$(e).html(d[j$(e).attr("aws-api")]);
- j$(e).attr('value',d[j$(e).attr("aws-api")])
- })
-
- }
- }
- if(callback)callback();
- }
- let ids = [];
- for (const id of dataIds) {
- if (!aws_data.hasOwnProperty(id)) {
- ids.push(id);
- }
- }
- if (ids.length > 0) {
-
- // AWSService.search(r.searchUrl,JSON.stringify({
- // "dataIds":ids
- // }),function(data){
- AWSService.query(r.queryUrl,ids[0],function(data){
- console.log('data: ' + JSON.stringify(data));
- // if(data.object && data.object.length > 0){
- if(data.object){
-
- // for(let d of data.object){
- // if(d.dataId){
- // aws_data[d.dataId] = d;
- // }
- // }
- aws_data[data.object.dataId] = data.object;
- Foo();
- }else{
- if(callback)callback();
- }
- },r.token);
- }else{
- Foo();
- }
- }
-
- function DecryptAll(callback){
- let dataIds1 = [];
- j$('[aws-id][aws-obj="Contact"]').each((i,e)=>{
- let v = j$(e).attr('aws-id');
- if (v) {
- dataIds1.push(v);
- }
- });
- Decrypt(contactstaticResource,dataIds1,callback);
-
-
- }
-
- function DecryptSWOAll(callback) {
- let dataIds2 = [];
- j$('[aws-id][aws-obj="SWO__c"]').each((i,e)=>{
- let v = j$(e).attr('aws-id');
- if (v) {
- dataIds2.push(v);
- }
- });
- Decrypt(staticResources,dataIds2,callback);
- }
-
- j$(function(){
- DecryptSWOAll();
- DecryptAll();
- })
- // 20220313 PI鏀归�� by Chen Yanan end
var IS_OPEN = true;
j$(document).ready(function() {
@@ -251,114 +159,6 @@
IS_OPEN = false;
}
}
- //Add By Li JUn for PIPL 20220414 Start
- var aws_result = {};
-
- function saveSWOToAWS(){
- // document.getElementById("errorMsg").innerHTML = '';
- // if(!document.getElementById("Page:mainForm:idSearchVisitor:updateContactLastName").value){
- // document.getElementById("errorMsg").innerHTML = '<strong>閿欒:</strong> 蹇呴』濉啓銆�';
- // return;
- // }
- blockme();
- let es = document.getElementsByTagName('select')
- for(let ei in es){
- let e = es[ei];
- for(let opi in e.options){
- let op = e.options[opi];
- if(!op)continue;
- if(op.value == "*****" && op.selected){
- unblockUI();
- alert('涓嬫媺妗嗕笉鑳戒富鍔ㄩ�夋嫨瀵嗘枃閫夐」')
- return;
- }
- }
- }
- ProcessPIForAWS({},GetEditObj());
- }
-
- function ProcessPIForAWS(sobjJson, payloadForNewPI) {
- let url = staticResources.newUrl
- let moduleName = AWSService.insertModule;
- if (!isNew) {
- console.log('Update');
- moduleName = AWSService.updateModule;
- url = staticResources.updateUrl
- }
- console.log('Payload for AWS:'+payloadForNewPI + ' Module Name:'+moduleName);
- // AWSService.postAWS(url,moduleName, payloadForNewPI, function(result){
- AWSService.post(url, payloadForNewPI, function(result){
- aws_result = result;
- SetEditObj();
- saveNew();
- }, staticResources.token);
- }
-
- function GetEditObj(){
- var swoId = j$(escapeVfId("swoid")).value();
- console.log('swoId: ' + swoId);
- return JSON.stringify([{
- // lastName : document.getElementById("Page:mainForm:idSearchVisitor:updateContactLastName").value,
- // phone : document.getElementById("Page:mainForm:idSearchVisitor:updateContactPhone").value,
- // type : document.getElementById("Page:mainForm:idSearchVisitor:updateContactType").value,
- // doctorDivision1 : document.getElementById("Page:mainForm:idSearchVisitor:updateContactDoctorDivision").value,
- // dataId:selectedAwsDataId
- contactNameHidden: document.getElementById("Page:mainForm:CONTACT_NAME_HIDDEN__c").value,
- dataId:'{!swoawsDataId}'
- }]);
- }
-
- function SetEditObj(){
- let obj = GetAWSResultObj();
- if(obj){
- console.log('Result from AWS:'+JSON.stringify(obj));
- document.getElementById('Page:mainForm:AWS_Data_Id__c').value = obj.dataId;
- document.getElementById("Page:mainForm:CONTACT_NAME_HIDDEN__c").value = obj.contactNameHidden;
-
- // document.getElementById("Page:mainForm:idSearchVisitor:updateContactLastName").value = obj.lastName;
- // document.getElementById("Page:mainForm:LastName_Encrypted__c").value = obj.lastNameEncrypt;
-
- // document.getElementById("Page:mainForm:idSearchVisitor:updateContactPhone").value = obj.phone;
- // document.getElementById("Page:mainForm:Phone_Encrypted__c").value = obj.phoneEncrypt;
-
- // document.getElementById("Page:mainForm:idSearchVisitor:updateContactType").value = obj.type;
- // document.getElementById("Page:mainForm:Type_Encrypted__c").value = obj.typeEncrypt;
-
- // document.getElementById("Page:mainForm:idSearchVisitor:updateContactDoctorDivision").value = obj.doctorDivision1;
- // document.getElementById("Page:mainForm:Doctor_Division1_Encrypted__c").value = obj.doctorDivision1Encrypt;
- }
-
- }
-
- function GetAWSResultObj(){
- if(aws_result && aws_result.object && aws_result.object.length > 0){
- return aws_result.object[0];
- }
- return null;
- }
-
- function Trans(){
- console.log('SWO ID : ' + document.getElementById('swoid').value);
- var swoId = j$(escapeVfId("swoid")).value();
- console.log('SFRcordId:'+swoId);
- // AWSService.postAWS(staticResources.transactionUrl,AWSService.confirmTrans, JSON.stringify({
- // "txId":aws_result.txId,
- // "sfRecordId":swoId,
- // "isSuccess":1
- // }), function(result){
- AWSService.post(staticResources.transactionUrl, JSON.stringify({
- "txId":aws_result.txId,
- "sfRecordId":swoId,
- "isSuccess":1
- }), function(result){
- //let id = document.getElementById('Page:mainForm:frontSwoId').value
- let id = j$(escapeVfId("swoid")).value();
- window.location.href = '/apex/SWOPageRead?id=' + id +'&type='+'{!type}';
- //window.location.reload();
- }, staticResources.token);
- }
-
- //Add By Li JUn for PIPL 20220414 End
</script>
<style type="text/css">
@@ -419,7 +219,6 @@
</style>
<apex:form id="mainForm" style="width: 95%; margin-left: 30px;">
-
<apex:actionFunction name="mustData" action="{!mustData}" reRender="messageInfo" oncomplete="clickColorChange('Repair')"></apex:actionFunction>
<apex:actionFunction name="repairReturn" action="{!init}" reRender="mainForm" >
<apex:param name="swoid" assignTo="{!swoid}" value="" /><!-- mailRepair mainForm-->
@@ -427,12 +226,6 @@
<apex:actionFunction name="openPageSave" action="{!openPageSave}" reRender="">
</apex:actionFunction>
<apex:actionFunction name="uploadFile" action="{!uploadFile}"></apex:actionFunction>
- <!-- Add save method for PIPL 20220414 by Li Jun Start -->
- <apex:inputHidden id="frontSwoId" value="{!frontSwoId}" />
- <apex:actionFunction name="saveNew" action="{!save}" reRender="swoid,frontSwoId" onComplete="Trans()">
- <apex:param name="frontCaseId" assignto="{!caseId}" value="{!caseId}"/>
- </apex:actionFunction>
- <!-- Add save method for PIPL 20220414 by Li Jun End -->
<input type="hidden" id="baseUrl" value="{!baseUrl}"/>
<input type="hidden" id="swoid" value="{!swoid}"/>
<input type="hidden" id="type" value="{!type}"/>
@@ -449,12 +242,7 @@
<apex:outputPanel id="messageInfo">
<apex:pagemessages />
</apex:outputPanel>
- <!-- Before PIPL Update 20220414 By Chen Yanan Start -->
- <!-- <apex:commandButton onclick="blockme();" value="Save" action="{!save}" style="width: 5%;"/> -->
- <!-- Before PIPL Update 20220414 By Chen Yanan end -->
- <!-- After PIPL Update 20220414 By Chen Yanan Start -->
- <apex:commandButton id="saveSWO" value="Save" style="width: 5%;" onclick="saveSWOToAWS();" rerender="dummy" />
- <!-- After PIPL Update 20220414 By Chen Yanan end -->
+ <apex:commandButton onclick="blockme();" value="Save" action="{!save}" style="width: 5%;"/>
<table style="width: 100%;">
<colgroup>
<col width="16%"/>
@@ -511,19 +299,12 @@
<td colspan="2">{!$ObjectType.SWO__c.fields.OFFICE__c.label}<span class="textRed">*</span></td>
<td><apex:inputField value="{!swo.TYPE__c}"/></td>
<td colspan="2">{!$ObjectType.SWO__c.fields.CONTACT_NAME_HIDDEN__c.label}</td>
-
</tr>
<tr>
<td colspan="2"><apex:inputField value="{!swo.OFFICE__c}"/></td>
<td></td>
- <!-- Update By Yanan -->
- <!-- <td colspan="2"><apex:inputField value="{!swo.CONTACT_NAME_HIDDEN__c}"/></td> -->
- <td colspan="2" >
- <apex:inputHidden id="AWS_Data_Id__c" value="{!swo.AWS_Data_Id__c}"/>
- <apex:inputField html-aws-obj="SWO__c" html-aws-api="contactNameHidden" html-aws-id="{!swo.AWS_Data_Id__c}" id="CONTACT_NAME_HIDDEN__c" value="{!swo.CONTACT_NAME_HIDDEN__c }" />
- </td>
- <!-- Update By Yanan -->
+ <td colspan="2"><apex:inputField value="{!swo.CONTACT_NAME_HIDDEN__c}"/></td>
</tr>
<tr>
@@ -675,12 +456,8 @@
<table style="width: 100%;border-collapse: collapse;">
<tr class="title">
<td id="titleProduct" class="title1"><apex:commandLink oncomplete="clickColorChange('Product')" action="{!setProduct}" reRender="table" value="Product Info" /></td>
- <!-- PIPL Update 20220414 By Chen Yanan Start -->
- <!-- <td id="titleCase" class="title1"><apex:commandLink oncomplete="clickColorChange('Case')" action="{!setCase}" reRender="table" value="Case Info" /></td> -->
- <!-- After -->
- <td id="titleCase" class="title1"><apex:commandLink oncomplete="clickColorChange('Case');DecryptAll();" action="{!setCase}" reRender="table" value="Case Info" /></td>
- <!-- PIPL Update 20220414 By Chen Yanan End -->
- <td id="titlemail" class="title1"><apex:commandLink oncomplete="clickColorChange('mail')" action="{!setMail}" reRender="table" value="Mail Merge" /></td>
+ <td id="titleCase" class="title1"><apex:commandLink oncomplete="clickColorChange('Case')" action="{!setCase}" reRender="table" value="Case Info" /></td>
+ <td id="titlemail" class="title1"><apex:commandLink oncomplete="clickColorChange('mail')" action="{!setMail}" reRender="table" value="Mail Merge" /></td>
<td id="titleTracking" class="title1"><apex:commandLink oncomplete="clickColorChange('Tracking')" action="{!setTracking}" reRender="table" value="Tracking" /></td>
<td id="titleTechnical" class="title1"><apex:commandLink oncomplete="clickColorChange('Technical')" action="{!setTechnical}" reRender="table" value="Technical Info" /></td>
<td id="titleEstimation" class="title1"><apex:commandLink oncomplete="clickColorChange('Estimation')" action="{!setEstimation}" reRender="table" value="Estimation" /></td>
@@ -924,13 +701,7 @@
</tr>
<tr>
<td><apex:outputField value="{!swo.CASE_NUMBER__c}" ></apex:outputField></td>
- <!-- PIPL Update 20220414 By Chen Yanan Start -->
- <!-- <td><apex:inputField value="{!swo.EMAIL__c}"/></td> -->
- <td colspan="2" align="left" >
- <apex:inputField html-aws-obj="Contact" html-aws-api="email" html-aws-id="{!contactAWSDataId}" value="{!swo.EMAIL__c}" />
- </td>
-
- <!-- PIPL Update 20220414 By Chen Yanan End -->
+ <td><apex:inputField value="{!swo.EMAIL__c}"/></td>
</tr>
<tr>
<td>{!$ObjectType.SWO__c.fields.COMPANY__c.label}</td>
@@ -945,13 +716,7 @@
<td>{!$ObjectType.SWO__c.fields.TRAN__c.label}</td>
</tr>
<tr>
- <!-- 20220313 PI鏀归�� by Chen Yanan -->
- <!-- <td><apex:outputField value="{!swo.CONTACT__c}" ></apex:outputField></td> -->
- <td colspan="2" align="left" >
- <!-- <a href="/{!swo.CONTACT__c}" aws-obj="Contact" aws-api="lastName" aws-id="{!contactAWSDataId}">{!swo.CONTACT__r.Name}</a> -->
- <a href="/{!swo.CONTACT__c}" aws-obj="Contact" aws-api="lastName" aws-id="{!contactAWSDataId}">{!contactName}</a>
- </td>
- <!-- 20220313 PI鏀归�� by Chen Yanan -->
+ <td><apex:outputField value="{!swo.CONTACT__c}" ></apex:outputField></td>
<td><apex:inputField value="{!swo.TRAN__c}"/></td>
</tr>
</table>
@@ -1616,12 +1381,9 @@
</apex:outputPanel>
<apex:outputPanel rendered="{!IF(type = 'General' || type = 'All',true,false)}">
- <!-- Before PIPL Update by Li Jun 20220414 Start -->
- <apex:commandButton value="Attach" action="{!uploadFile}"></apex:commandButton>
- <!-- Before PIPL Update by Li Jun 20220414 End -->
- <!-- After PIPL Update by Li Jun 20220414 Start -->
- <input class="btn" type="Button" value="PIPL Attach" onclick="window.open('/apex/SWOFileUploadPage')" />
- <!-- After PIPL Update by Li Jun 20220414 End -->
+ <apex:commandButton value="Attach" onclick="uploadFileJS();return false;"></apex:commandButton>
+
+
<table class="tableCss" style="border:1px solid #000000;width: 80%">
<tr style="text-align:center;">
<th style="text-align:center;width: 33%;">File Name</th>
@@ -1631,9 +1393,9 @@
<apex:repeat id="attachmentList" value="{!attachmentList}" var="attachment">
<tr style="text-align:center; vertical-align: middle;">
<!-- <td><input value="{!attachment.Name}" readonly="readonly" style="border:none;"/></td> -->
- <td><apex:outputLink value="/{!attachment.Id}">{!attachment.FileName__c}</apex:outputLink></td>
+ <td><apex:outputLink value="/{!attachment.Id}">{!attachment.Name}</apex:outputLink></td>
<td><apex:inputField value="{!attachment.CreatedDate}"/></td>
- <!-- <td><apex:inputField value="{!attachment.BodyLength}"/></td>-->
+ <td><apex:inputField value="{!attachment.BodyLength}"/></td>
</tr>
</apex:repeat>
</table>
@@ -2013,11 +1775,8 @@
<br/>
<br/>
<!-- <apex:commandButton action="{!save}" onclick="blockme();" value="Save" oncomplete="isOk();unblockUI();" reRender="Page,mainForm" style="width: 5%;"/> -->
- <!-- PIPL Update 20220414 By Chen Yanan -->
- <!-- <apex:commandButton onclick="blockme();" value="Save" action="{!save}" style="width: 5%;"/> -->
- <apex:commandButton id="saveSWOs" value="Save" style="width: 5%;" onclick="saveSWOToAWS();" rerender="dummy" />
- <!-- PIPL Update 20220414 By Chen Yanan -->
-
+ <apex:commandButton onclick="blockme();" value="Save" action="{!save}" style="width: 5%;"/>
+
</apex:form>
<br/>
diff --git a/force-app/main/default/pages/SWOPageRead.page b/force-app/main/default/pages/SWOPageRead.page
index f53c130..d076824 100644
--- a/force-app/main/default/pages/SWOPageRead.page
+++ b/force-app/main/default/pages/SWOPageRead.page
@@ -5,96 +5,8 @@
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
- <!-- Update 20220315 By Chen Yanan -->
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
+
<script>
- // 20220315 PI鏀归�� by Chen Yanan start
- var staticResources = JSON.parse('{!staticResource}');
- var contactstaticResource = JSON.parse('{!contactstaticResource}');
- var aws_data = {};
- console.log('AWS' + '{!contactAWSDataId}');
-
- function Decrypt(r,dataIds,callback){
- if (!(dataIds && dataIds.length)) {
- if(callback)callback();
- return;
- }
-
- let Foo = function(){
- for (const id of dataIds) {
- if (aws_data.hasOwnProperty(id)) {
- let d = aws_data[id];
- let $e =j$("[aws-id='"+d.dataId+ "']");
- $e.each((i,e)=>{
- j$(e).html(d[j$(e).attr("aws-api")]);
- })
-
- }
- }
- if(callback)callback();
- }
- let ids = [];
- for (const id of dataIds) {
- if (!aws_data.hasOwnProperty(id)) {
- ids.push(id);
- }
- }
- if (ids.length > 0) {
-
- // AWSService.search(r.searchUrl,JSON.stringify({
- // "dataIds":ids
- // }),function(data){
- AWSService.query(r.queryUrl,ids[0],function(data){
- console.log('data: ' + JSON.stringify(data));
- // if(data.object && data.object.length > 0){
- if(data.object){
-
- // for(let d of data.object){
- // if(d.dataId){
- // aws_data[d.dataId] = d;
- // }
- // }
- aws_data[data.object.dataId] = data.object;
- Foo();
- }else{
- if(callback)callback();
- }
- },r.token);
- }else{
- Foo();
- }
- }
-
- function DecryptAll(callback){
- let dataIds1 = [];
- j$('[aws-id][aws-obj="Contact"]').each((i,e)=>{
- let v = j$(e).attr('aws-id');
- if (v) {
- dataIds1.push(v);
- }
- });
- Decrypt(contactstaticResource,dataIds1,callback);
-
-
- }
-
- function DecryptSWOAll(callback) {
- let dataIds2 = [];
- j$('[aws-id][aws-obj="SWO__c"]').each((i,e)=>{
- let v = j$(e).attr('aws-id');
- if (v) {
- dataIds2.push(v);
- }
- });
- Decrypt(staticResources,dataIds2,callback);
- }
-
- j$(function(){
- DecryptSWOAll();
- DecryptAll();
- })
- // 20220315 PI鏀归�� by Chen Yanan end
-
j$(document).ready(function() {
var type = j$(escapeVfId("type")).value();
clickColorChange(type);
@@ -340,11 +252,7 @@
<tr>
<td colspan="2"><apex:outputField value="{!swo.OFFICE__c}"/></td>
<td></td>
- <!-- 20220315 PI鏀归�� by Chen Yanan start -->
- <!-- <td colspan="2"><apex:outputField value="{!swo.CONTACT_NAME_HIDDEN__c}"/></td> -->
- <!-- <td colspan="2" align="left" ><apex:outputField html-aws-obj="SWO__C" html-aws-api="contactName" html-aws-id="{!swo.CONTACT_NAME_HIDDEN__c}" id="CONTACT_NAME_HIDDEN__c" value="{!swo.CONTACT_NAME_HIDDEN__c}"/></td> -->
- <td colspan="2" align="left" ><apex:outputField html-aws-obj="SWO__c" html-aws-api="contactNameHidden" html-aws-id="{!swo.AWS_Data_Id__c}" id="CONTACT_NAME_HIDDEN__c" value="{!swo.CONTACT_NAME_HIDDEN__c}"/></td>
- <!-- 20220315 PI鏀归�� by Chen Yanan End -->
+ <td colspan="2"><apex:outputField value="{!swo.CONTACT_NAME_HIDDEN__c}"/></td>
</tr>
<tr>
@@ -495,12 +403,8 @@
<table style="width: 100%;border-collapse: collapse;">
<tr class="title">
<td id="titleProduct" class="title1"><apex:commandLink oncomplete="clickColorChange('Product')" action="{!setProduct}" reRender="table" value="Product Info" /></td>
- <!-- PIPL Update 20220414 By Chen Yanan Start -->
- <!-- <td id="titleCase" class="title1"><apex:commandLink oncomplete="clickColorChange('Case')" action="{!setCase}" reRender="table" value="Case Info" /></td> -->
- <!-- After -->
- <td id="titleCase" class="title1"><apex:commandLink oncomplete="clickColorChange('Case');DecryptAll();" action="{!setCase}" reRender="table" value="Case Info" /></td>
- <!-- PIPL Update 20220414 By Chen Yanan End -->
- <td id="titlemail" class="title1"><apex:commandLink oncomplete="clickColorChange('mail')" action="{!setMail}" reRender="table" value="Mail Merge" /></td>
+ <td id="titleCase" class="title1"><apex:commandLink oncomplete="clickColorChange('Case')" action="{!setCase}" reRender="table" value="Case Info" /></td>
+ <td id="titlemail" class="title1"><apex:commandLink oncomplete="clickColorChange('mail')" action="{!setMail}" reRender="table" value="Mail Merge" /></td>
<td id="titleTracking" class="title1"><apex:commandLink oncomplete="clickColorChange('Tracking')" action="{!setTracking}" reRender="table" value="Tracking" /></td>
<td id="titleTechnical" class="title1"><apex:commandLink oncomplete="clickColorChange('Technical')" action="{!setTechnical}" reRender="table" value="Technical Info" /></td>
<td id="titleEstimation" class="title1"><apex:commandLink oncomplete="clickColorChange('Estimation')" action="{!setEstimation}" reRender="table" value="Estimation" /></td>
@@ -554,7 +458,7 @@
<td><apex:outputText value="{!mail.haveAtt}" /></td>
<td>
<apex:repeat value="{!mail.attList}" var="att" id="lines">
- <apex:outputLink value="/{!att.Id}"><c:PDFWbr targetStr="{!att.FileName__c}" /></apex:outputLink>
+ <apex:outputLink value="/{!att.Id}"><c:PDFWbr targetStr="{!att.Name}" /></apex:outputLink>
<br/>
</apex:repeat>
</td>
@@ -744,13 +648,7 @@
</tr>
<tr>
<td><apex:outputField value="{!swo.CASE_NUMBER__c}" ></apex:outputField></td>
- <!-- PIPL Update 20220414 By Chen Yanan Start -->
- <!-- <td><apex:inputField value="{!swo.EMAIL__c}"/></td> -->
- <td colspan="2" align="left" >
- <apex:inputField html-aws-obj="Contact" html-aws-api="email" html-aws-id="{!contactAWSDataId}" value="{!swo.EMAIL__c}" />
- </td>
-
- <!-- PIPL Update 20220414 By Chen Yanan End -->
+ <td><apex:outputField value="{!swo.EMAIL__c}"/></td>
</tr>
<tr>
<td class="hand">{!$ObjectType.SWO__c.fields.COMPANY__c.label}</td>
@@ -765,12 +663,7 @@
<td class="hand">{!$ObjectType.SWO__c.fields.TRAN__c.label}</td>
</tr>
<tr>
- <!-- 20220315 PI鏀归�� by Chen Yanan start -->
- <!-- <td><apex:outputField value="{!swo.CONTACT__c}" ></apex:outputField></td> -->
- <td colspan="2" align="left" >
- <a href="/{!swo.CONTACT__c}" aws-obj="Contact" aws-api="lastName" aws-id="{!contactAWSDataId}">{!swo.CONTACT__r.Name}</a>
- </td>
- <!-- 20220315 PI鏀归�� by Chen Yanan End -->
+ <td><apex:outputField value="{!swo.CONTACT__c}" ></apex:outputField></td>
<td><apex:outputField value="{!swo.TRAN__c}"/></td>
</tr>
</table>
@@ -1436,10 +1329,9 @@
</apex:outputPanel>
<apex:outputPanel rendered="{!IF(type = 'General' || type = 'All',true,false)}">
- <!-- Before PIPL Update by Li Jun 20220414 Start -->
<apex:commandButton value="Attach" action="{!uploadFile}"></apex:commandButton>
- <!-- Before PIPL Update by Li Jun 20220414 End -->
- <input class="btn" type="Button" value="PIPL Attach" onclick="window.open('/apex/SWOFileUploadPage')" />
+
+
<table class="tableCss" style="border:1px solid #000000;width: 80%">
<tr style="text-align:center;">
<th style="text-align:center;width: 33%;">File Name</th>
@@ -1449,9 +1341,9 @@
<apex:repeat id="attachmentList" value="{!attachmentList}" var="attachment">
<tr style="text-align:center; vertical-align: middle;">
<!-- <td><output value="{!attachment.Name}" readonly="readonly" style="border:none;"/></td> -->
- <td><apex:outputLink value="/{!attachment.Id}">{!attachment.FileName__c}</apex:outputLink></td>
+ <td><apex:outputLink value="/{!attachment.Id}">{!attachment.Name}</apex:outputLink></td>
<td><apex:outputField value="{!attachment.CreatedDate}"/></td>
- <!-- <td><apex:outputField value="{!attachment.BodyLength}"/></td> -->
+ <td><apex:outputField value="{!attachment.BodyLength}"/></td>
</tr>
</apex:repeat>
</table>
diff --git a/force-app/main/default/pages/SearchMemberPage.page b/force-app/main/default/pages/SearchMemberPage.page
index 447e4d6..4767d57 100644
--- a/force-app/main/default/pages/SearchMemberPage.page
+++ b/force-app/main/default/pages/SearchMemberPage.page
@@ -4,132 +4,15 @@
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
<style type="text/css">
- td{line-height: 32px;}
- [aws-api] {
- position: relative;
- }
- [aws-api] .decrypt{
- position: absolute;
- top: 50%;left: 0;
- display: none;
- text-align: left;
- /* padding-left: 5px; */
- }
- /* [aws-api]:hover .decrypt{display: block;width: 100px} */
+
</style>
<script>
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResource = JSON.parse('{!staticResource}');
-
- var aws_data = {};
-
- //zhj 2022-04-22 PIPL start
- //js hover
- function jsHover(){
- var encrypts = document.getElementsByClassName('encrypt');
- for(var i = 0;i<encrypts.length;i++){
- encrypts[i].onmouseover = (function close(j) {
- return function () {
- //鏄剧ずName
- encrypts[j].children[1].children[0].innerText = encrypts[j].children[1].children[1].innerText
- //鏄剧ずEmail
- encrypts[j].children[2].children[0].innerText = encrypts[j].children[2].children[1].innerText
- }
- })(i);
- }
- }
- //zhj 2022-04-22 PIPL end
-
- function Decrypt(r,dataIds,callback){
- if (!(dataIds && dataIds.length)) {
- if(callback)callback();
- return;
- }
-
- let Foo = function(){
- for (const id of dataIds) {
- if (aws_data.hasOwnProperty(id)) {
- let d = aws_data[id];
- let $e =j$("[aws-id='"+d.dataId+ "']");
- $e.each((i,e)=>{
- j$(e).find(".decrypt").html(d[j$(e).attr("aws-api")]);
- })
-
- }
- }
- if(callback)callback();
- jsHover();
- }
- let ids = [];
- for (const id of dataIds) {
- if (!aws_data.hasOwnProperty(id)) {
- ids.push(id);
- }
- }
- if (ids.length > 0) {
-
- AWSService.search(r.searchUrl,JSON.stringify({
- "dataIds":ids
- }),function(data){
-
- if(data.object && data.object.length > 0){
-
- for(let d of data.object){
- if(d.dataId){
- aws_data[d.dataId] = d;
- }
- }
- Foo();
- }else{
- if(callback)callback();
- }
- },r.token);
- }else{
- Foo();
- }
- }
-
- function DecryptAll(callback){
- let dataIds = [];
- j$('[aws-id][aws-obj="Contact"]').each((i,e)=>{
- let v = j$(e).attr('aws-id');
- if (v) {
- dataIds.push(v);
- }
- });
- Decrypt(staticResource,dataIds,callback);
- }
-
- j$(function(){
- //DecryptAll();
-
- })
-
function doSearchJS(){
blockme();
var searchByName = j$(escapeVfId("searchByName")).value();
var searchByAccount = j$(escapeVfId("searchByAccount")).value();
- var searchByAWSDataIds = j$(escapeVfId("searchByAWSDataIds")).value();
- var memberType = j$(escapeVfId('Page:allData:memberType')).value();
- if (memberType == "Contact" && searchByName) {
- AWSService.search(staticResource.searchUrl,JSON.stringify({
- contactName:searchByName
- }),function(data){
- if (data && data.object && data.object.length) {
- let ids = data.object.map(m=>m.dataId);
- DoSearch(searchByName,searchByAccount,ids.join(','));
- }else{
- unblockUI();
- }
-
- },staticResource.token);
- }else{
- DoSearch(searchByName,searchByAccount,[]);
- }
-
-
+ DoSearch(searchByName,searchByAccount);
}
function saveJS(){
blockme();
@@ -143,8 +26,8 @@
}
var lineNum = j$(escapeVfId("lineNum")).value();
var memberId = j$(escapeVfId("memberId")).value();
- var memberName = aws_data[j$(escapeVfId("aws_data_id")).value()].lastName;
- var memberEmail = aws_data[j$(escapeVfId("aws_data_id")).value()].email;
+ var memberName = j$(escapeVfId("memberName")).value();
+ var memberEmail = j$(escapeVfId("memberEmail")).value();
window.opener.refreshPage(lineNum,memberId,memberName,memberEmail);
window.close();
}
@@ -164,28 +47,23 @@
j$(escapeVfId("dataAccount")).attr("style","display:block");
}
}
-
-
-
</script>
<div style="width: 100%;height: 100%;">
<apex:outputPanel id="message1">
<apex:messages styleClass="editListError"/>
</apex:outputPanel>
<apex:form id="allData">
- <apex:actionFunction action="{!SearchMember}" name="DoSearch" reRender="result" oncomplete="DecryptAll(unblockUI);">
+ <apex:actionFunction action="{!SearchMember}" name="DoSearch" reRender="result" oncomplete="unblockUI();">
<apex:param assignTo="{!searchByName}" name="searchByName" value=""></apex:param>
<apex:param assignTo="{!searchByAccount}" name="searchByAccount" value=""></apex:param>
- <apex:param assignTo="{!searchByAWSDataIds}" name="searchByAWSDataIds" value=""></apex:param>
</apex:actionFunction>
- <apex:actionFunction action="{!save}" name="save" reRender="allData,message1" oncomplete="DecryptAll(()=>{unblockUI();refreshPage();closeJS();});">
+ <apex:actionFunction action="{!save}" name="save" reRender="allData,message1" oncomplete="unblockUI();refreshPage();closeJS();">
</apex:actionFunction>
<input type="hidden" id="isError" value="{!isError}" />
<input type="hidden" id="lineNum" value="{!lineNum}" />
<input type="hidden" id="memberId" value="{!memberId}" />
<input type="hidden" id="memberName" value="{!memberName}" />
<input type="hidden" id="memberEmail" value="{!memberEmail}" />
- <input type="hidden" id="aws_data_id" value="{!aws_data_id}" />
<table style="width: 100%;">
<colgroup>
@@ -205,7 +83,7 @@
<tr>
<th style="text-align:center;"><apex:commandButton value="Search" onclick="doSearchJS();return false;" /> <apex:commandButton value="Save" onclick="saveJS();return false;"/></th>
- <th id="nameLable" style="text-align:center;"><input id="searchByAWSDataIds" type="hidden" value="{!searchByAWSDataIds}" /> Name锛�<input id="searchByName" type="text" value="{!searchByName}" /></th>
+ <th id="nameLable" style="text-align:center;">Name锛�<input id="searchByName" type="text" value="{!searchByName}" /></th>
<th style="text-align:center;"><div id="accountLable">Account锛�<input id="searchByAccount" type="text" value="{!searchByAccount}" /></div></th>
@@ -239,22 +117,12 @@
</apex:outputPanel> -->
</tr>
<apex:repeat value="{!lineList}" var="line">
- <tr class="encrypt">
+ <tr>
<td style="text-align:right;">
<apex:inputCheckbox id="checkbox" value="{!line.check}" />
</td>
- <td aws-obj="Contact" aws-api="lastName" aws-id="{!line.aws_data_id}">
- <!-- 20220222 PI鏀归�� by Bright start -->
- <span>{!line.name}</span>
- <span class="decrypt"></span>
- <!-- 20220222 PI鏀归�� by Bright end -->
- </td>
- <td aws-obj="Contact" aws-api="email" aws-id="{!line.aws_data_id}">
- <!-- 20220222 PI鏀归�� by Bright start -->
- <span>{!line.email}</span>
- <span class="decrypt"></span>
- <!-- 20220222 PI鏀归�� by Bright end -->
- </td>
+ <td><apex:outputText value="{!line.name}"></apex:outputText></td>
+ <td><apex:outputText value="{!line.email}"></apex:outputText></td>
<td><apex:outputText value="{!line.account}"></apex:outputText></td>
</tr>
</apex:repeat>
diff --git a/force-app/main/default/pages/SendEmail.page b/force-app/main/default/pages/SendEmail.page
index 8487046..c6a373f 100644
--- a/force-app/main/default/pages/SendEmail.page
+++ b/force-app/main/default/pages/SendEmail.page
@@ -6,7 +6,6 @@
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
-<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no"/>
<style type="text/css">
@@ -28,20 +27,6 @@
}
</style>
<script>
- let isBlocking = false;
- function b(){
- if (!isBlocking) {
- isBlocking = true;
- blockme();
- }
- }
-
- function ub(){
- if (isBlocking) {
- isBlocking = false;
- unblockUI();
- }
- }
function formSubmit(){
testFile();
@@ -61,9 +46,7 @@
var memberEmailId = "memberEmail"+lineNum;
j$(escapeVfId(memberNameId)).attr("value",memberName);
j$(escapeVfId(memberEmailId)).attr("value",memberEmail);*/
- // addMemberData(lineNum,memberId,memberName,memberEmail);
- j$("#memberBody tr[line-id='"+lineNum+"'] input.emailAddress").val(memberEmail);
- j$("#memberBody tr[line-id='"+lineNum+"'] input.name").val(memberName);
+ addMemberData(lineNum,memberId,memberName,memberEmail);
}
function statusChabge(linenumNum,type){
var toId = "Page:messageForm:lineDataList:"+linenumNum+":"+"to";
@@ -109,7 +92,6 @@
function openFile(){
// alert('111111111');
// uploadFileS();
- document.getElementById("file_input").value = '';
popupBox.setTitle("璇烽�夋嫨瑕佷笂浼犵殑鍥剧墖锛�");
popupBox.importContentNode(document.getElementById("Page:messageForm:popupBox"));
popupBox.show(document.getElementById("Page:messageForm:popupBox"));
@@ -120,399 +102,72 @@
//dialog 寮圭獥 end
//涓婁紶鍥剧墖
- function saveAttachment(){
- var maxFileSize = 4350000; //Base64 缂栫爜浠ュ悗鏈�澶х殑鏂囦欢瀛楄妭鏁�
- var attachmentBody; //闄勪欢鍐呭
- var attachmentName; //闄勪欢鍚嶇О
- var attachmentType; //闄勪欢鍚嶇О
- var attachmentSize; //闄勪欢澶у皬
- var parentId = j$(escapeVfId("parentId")).value();
- // 鑾峰彇涓婁紶鍥剧墖鐨勬暟閲�
- var size = document.getElementById("file_input").files.length;
- if (size > 0) {
- var nameList = [];
- var typeList = [];
- var bodyList = [];
- for(var i = 0;i < size;i++){
- var fbody = document.getElementById("file_input").files[i];
- attachmentName = fbody.name;
- if(fbody.size <= maxFileSize) {
- attachmentType = fbody.type;
- nameList.push(attachmentName);
- typeList.push(attachmentType);
- var fileReader = new FileReader();
- fileReader.readAsBinaryString(fbody);
- fileReader.onload = function(e) {
- bodyList.push(window.btoa(this.result));
- }
- fileReader.onerror = function(e) {
- alert("涓婁紶澶辫触锛岃閲嶆柊灏濊瘯");
- }
- fileReader.onabort = function(e) {
- alert("涓婁紶澶辫触锛岃閲嶆柊灏濊瘯");
- }
- } else {
- alert("Base64 缂栫爜鏈�澶у厑璁�4.3M鏂囦欢,"+attachmentName + '杩囧ぇ鏃犳硶涓婁紶');
- }
-
-
- }
- if (nameList.length > 0) {
- //浣跨敤RemoteAction涓婁紶闄勪欢
- Visualforce.remoting.Manager.invokeAction(
- '{!$RemoteAction.SendEmailController.AddAttachment}',
- nameList,
- typeList,
- bodyList,
- parentId,
- function(result,event) {
-
- if(result == '鏂囦欢涓婁紶鎴愬姛'){
- alert(result);
- RefreshPage();
- } else if (result == null){
- result = '鏂囦欢涓婁紶澶辫触,璇烽噸鏂颁笂浼�';
- alert(result);
- RefreshPage();
- } else {
- alert(result);
+ function saveAttachment(){
+ var maxFileSize = 4350000; //Base64 缂栫爜浠ュ悗鏈�澶х殑鏂囦欢瀛楄妭鏁�
+ var attachmentBody; //闄勪欢鍐呭
+ var attachmentName; //闄勪欢鍚嶇О
+ var attachmentType; //闄勪欢鍚嶇О
+ var attachmentSize; //闄勪欢澶у皬
+ var parentId = j$(escapeVfId("parentId")).value();
+ // 鑾峰彇涓婁紶鍥剧墖鐨勬暟閲�
+ var size = document.getElementById("file_input").files.length;
+ if (size > 0) {
+ var nameList = [];
+ var typeList = [];
+ var bodyList = [];
+ for(var i = 0;i < size;i++){
+ var fbody = document.getElementById("file_input").files[i];
+ attachmentName = fbody.name;
+ if(fbody.size <= maxFileSize) {
+ attachmentType = fbody.type;
+ nameList.push(attachmentName);
+ typeList.push(attachmentType);
+ var fileReader = new FileReader();
+ fileReader.readAsBinaryString(fbody);
+ fileReader.onload = function(e) {
+ bodyList.push(window.btoa(this.result));
}
-
- });
-
- }
-
- }
-
-
- }
-
- // PI鏀归�� By Bright 20220329
- AWSService.sfSessionId = '{!GETSESSIONID()}';
- var staticResourceMail = JSON.parse('{!staticResourceMail}');
- var staticResourceMailMerge = JSON.parse('{!staticResourceMailMerge}');
- var staticResourceDocument = JSON.parse('{!staticResourceDocument}');
- var isQuotesPdf = false;
-
- function alertErrorMessage(errorMsg) {
- console.log(errorMsg);
- }
-
- function uploadFileToAWS(data, size, fileName, callback) {
-
- console.log("body=" + JSON.stringify({ 'file': data, "size": size, 'fileName': fileName }));
- AWSService.post(staticResourceDocument.newUrl, JSON.stringify({
- 'file': data,
- "size": size,
- 'fileName': fileName })
- , function(result){
- console.log("result" + JSON.stringify(result));
-
- if (result.success) {
- let key = result.object;
- confirmTrans(result.txId,1,function(){
- if (callback) {
- callback(key);
+ fileReader.onerror = function(e) {
+ alert("涓婁紶澶辫触锛岃閲嶆柊灏濊瘯");
}
- })
- //SendEmail();
- console.log('key' + key);
- } else {
- alertErrorMessage('涓婁紶澶辫触璇风◢鍚庡啀璇曪紒');
- }
- }, staticResourceDocument.token);
-
- }
-
- function SendEmailCallBack(){
- console.log('SendEmailCallBack');
- }
-
- function confirmTrans(transId, isSuccess,callback) {
-
- AWSService.post(staticResourceDocument.updateUrl, JSON.stringify({
- "txId":transId,
- "sfRecordId":"",
- "isSuccess":isSuccess
- }), function(data){
- console.log("confirmTrans-" + JSON.stringify(data));
- if (callback) {
- callback()
- }
- }, staticResourceDocument.token);
-
- }
-
- function uploadFile() {
- var maxFileSize = 4350000;
- let files = document.getElementById("file_input").files
- // 鑾峰彇涓婁紶鍥剧墖鐨勬暟閲�
-
- if (files.length == 0) {
- alert('鑷冲皯閫夋嫨涓�涓檮浠�');
- return;
- }
-
- let attachList=[];
- let complete_flags = new Array(files.length + 1).join(0).split('').map(function () { return false });
- let AllComplete = function(){
- for (let index = 0; index < complete_flags.length; index++){
- if(!complete_flags[index]){
- return;
- }
- }
-
- ub();
- }
- for(var i = 0;i < files.length;i++){
- var fbody = files[i];
- let j = i;
- if(fbody.size <= maxFileSize) {
-
- } else {
- alert("Base64 缂栫爜鏈�澶у厑璁�4.3M鏂囦欢,"+fbody.name + '杩囧ぇ鏃犳硶涓婁紶');
- return;
- }
- }
-
- popupBox.hide();
- b();
- for(var i = 0;i < files.length;i++){
- var fbody = files[i];
- let j = i;
- var fileReader = new FileReader();
- fileReader.fbody = fbody;
- fileReader.readAsDataURL(fbody);
- fileReader.onload = function(e) {
- let reader = this;
- attachList.push({
- name:reader.fbody.name,
- type:reader.fbody.type,
- body:reader.result,
- size:reader.fbody.size
- })
- //
- console.log('onload '+ j);
- // ReadComplete();
- uploadFileToAWS(reader.result, reader.fbody.size, reader.fbody.name,function(key){
- complete_flags[j] = true;
- AppendAttachmentHtml(reader.fbody.name,key,reader.fbody.size);
- AllComplete();
- });
-
-
- }
- fileReader.onerror = function(e) {
- ub();
- alert("涓婁紶澶辫触锛岃閲嶆柊灏濊瘯");
- }
- fileReader.onabort = function(e) {
- ub();
- alert("涓婁紶澶辫触锛岃閲嶆柊灏濊瘯");
- }
- }
-
- console.log('end');
-
- }
-
- let AfterCallBack = null;
- function AddQuotesPdf(callback){
- if (isQuotesPdf) {
- alert('宸叉坊鍔犳姤浠峰崟锛屾棤闇�閲嶅娣诲姞');
- return;
- }
- b();
- AfterCallBack = callback;
- j$("#pdf").attr("src",'/apex/QuotesPDF?id={!typeid}&addFile=AddQuotesPdfCallBack');
- }
-
- function AddQuotesPdfCallBack(uri){
- let bodys = uri.split(',');
- let body = bodys[bodys.length-1]
- let size = window.atob(body).length;
- let name = '鎶ヤ环鍗�.pdf';
- uploadFileToAWS(uri, size, name,function(key){
- ub();
- AppendAttachmentHtml(name,key,size);
- isQuotesPdf = true;
- if (AfterCallBack) {
- AfterCallBack();
- }
- });
- }
-
- function SendEmailJs(){
-
- let tos = jQuery("#memberBody :checked[target='to']");
- if(tos.length<1){
- alert("鑷冲皯濉啓涓�涓敹浠朵汉");
- return;
- }
-
- let error_email_e = null;
- j$("#memberBody .emailAddress").each(function(i,e){
- if (!/^[\w-]{1,99}@[\da-zA-Z]{1,99}\.[a-zA-Z]+$/.test(e.value)) {
- error_email_e = e;
- return false;
- }
- return true;
- })
-
- if (error_email_e) {
- if(error_email_e.value){
- alert('閭鍦板潃鏍煎紡涓嶅:'+error_email_e.value);
- }else{
- alert('閭鍦板潃蹇呭~');
- }
-
- j$(error_email_e).focus();
- j$(error_email_e).select();
- return;
- }
-
- let subject = j$(".SUBJECT__c").val();
- if (!subject) {
- alert("SUBJECT蹇呭~");
- return;
- }
-
-
- let message = j$(".MESSAGE__c").val();
- if (!message) {
- alert("MESSAGE蹇呭~");
- return;
- }
-
- let Foo = function(target){
- let targets = jQuery("#memberBody :checked[target='"+target+"']");
- let emails = [];
- let names = [];
- targets.each(function(i,e){
- let v = j$(e).closest("tr").find(".name").val();
- names.push(v?v:'-');
- emails.push(j$(e).closest("tr").find(".emailAddress").val());
- });
- return {
- emails:emails,
- names:names
- }
- }
-
-
- let to = Foo('to');
- let cc = Foo('cc');
- let bcc = Foo('bcc');
-
-
- let payload = {
- "bcc": bcc.emails.join(';'),
- "bccName": bcc.names.join(';'),
- "cc": cc.emails.join(';'),
- "ccName": cc.names.join(';'),
- "from": j$(".FROM__c").html(),
- "fromName": "",
- "message": message,
- "recipient": to.emails.join(';'),
- "recordId": "{!typeid}",
- "recordType": "{!type}",
- "subjectCopy": subject+'~{!name}',
- "toName": to.names.join(';')
- };
- b();
-
-
-
- let Send = function(){
- let fileMap = {}
- j$("a.attach_link").each(function(i,e){
- fileMap[j$(e).attr("data-key")] = j$(e).attr("data-name");
- });
- payload.fileMap = fileMap;
- AWSService.post(staticResourceMail.newUrl,JSON.stringify(payload),function(data){
- console.log(data);
- ub();
- if (data && data.success) {
- alert('鍙戦�佹垚鍔�')
- if ('{!typeid}') {
- window.location.href = '/{!typeid}?type=mail';
- }else{
- window.location.href = '/'+data.object;
+ fileReader.onabort = function(e) {
+ alert("涓婁紶澶辫触锛岃閲嶆柊灏濊瘯");
+ }
+ } else {
+ alert("Base64 缂栫爜鏈�澶у厑璁�4.3M鏂囦欢,"+attachmentName + '杩囧ぇ鏃犳硶涓婁紶');
}
- }else{
- alert('鍙戦�佸け璐ワ紝鍘熷洜:'+(data && data.message ? data.message :'鏈煡閿欒'));
+
+
}
- },staticResourceMail.token);
- }
-
- // 濡傛灉娌℃坊鍔犳姤浠峰崟锛岃嚜鍔ㄦ坊鍔�
- if ('{!type}' == 'Quotes' && !isQuotesPdf) {
- AddQuotesPdf(Send);
- }else{
- Send();
- }
-
- }
-
- function AppendAttachmentHtml(name,key,size){
- let html = '<tr style="text-align:center; vertical-align: middle;">'
- + '<td><a class="attach_link" target="_blank" data-key="'+key+'" data-name="'+name+'" href="'+staticResourceDocument.queryUrl+key+'">'+name+'</a></td>'
- +'<td>'+new Date().toLocaleString()+'</td>'
- +'<td>'+size+'</td>'
- +'<td><input type="button" class="btn delete_attachment" value="delete" /></td>'
- +'</tr>';
- j$("table.attach_preview").append(html);
- }
-
- function AddMemberJs(){
- let line_id = new Date().getTime()+''+Math.floor(Math.random()*1000);
- let html = '<tr line-id="'+line_id+'" style="text-align:center;">'
- +'<td><input id="memberName2" type="hidden" value=""><input class="emailAddress" type="text" value=""/></td>'
- +'<td><input class="name" type="text" value=""/></td>'
- +'<td><input line-id="'+line_id+'" target="to" type="checkbox" checked="checked"/></td>'
- +'<td><input line-id="'+line_id+'" target="cc" type="checkbox"/></td>'
- +' <td><input line-id="'+line_id+'" target="bcc" type="checkbox"/></td>'
- +' <td><input line-id="'+line_id+'" class="btn delete" value="delete" type="button"/></td>'
- +' <td><input type="button" value="Search" onclick="openSearchMemberPage('+line_id +');" class="btn search"/></td>'
- +' </tr>';
- j$("#memberBody").append(html);
- }
-
- j$(function(){
- j$("table.attach_preview").on("click",".delete_attachment",function(){
- j$(this).closest("tr").remove();
- })
-
- j$("#memberBody").on("click",":checkbox",function(){
- let b = j$(this).prop("checked");
- console.log(b);
- j$(":checkbox[line-id='"+j$(this).attr("line-id")+"']").prop("checked",false);
- j$(this).prop("checked",b);
- })
-
- j$("#memberBody").on("click","input.delete",function(){
- j$("tr[line-id='"+j$(this).attr("line-id")+"']").remove();
- })
-
- if ('{!AWSDataId}') {
- b();
- AWSService.query(staticResourceMailMerge.queryUrl,'{!AWSDataId}',function(data){
- ub();
- if (data && data.object) {
- let allMembers = data.object.allMember.split(';');
- let allMemberNames = data.object.allMemberName.split(';');
- j$("#memberBody .emailAddress").each(function(i,e){
- j$(e).val(allMembers[i]);
- })
-
- j$("#memberBody .name").each(function(i,e){
- j$(e).val(allMemberNames[i]=='-'?'':allMemberNames[i]);
- })
+ if (nameList.length > 0) {
+ //浣跨敤RemoteAction涓婁紶闄勪欢
+ Visualforce.remoting.Manager.invokeAction(
+ '{!$RemoteAction.SendEmailController.AddAttachment}',
+ nameList,
+ typeList,
+ bodyList,
+ parentId,
+ function(result,event) {
+
+ if(result == '鏂囦欢涓婁紶鎴愬姛'){
+ alert(result);
+ RefreshPage();
+ } else if (result == null){
+ result = '鏂囦欢涓婁紶澶辫触,璇烽噸鏂颁笂浼�';
+ alert(result);
+ RefreshPage();
+ } else {
+ alert(result);
+ }
+
+ });
+
}
-
- },staticResourceMailMerge.token);
+
+ }
+
+
}
- })
</script>
<div style="width : 100%;">
<div style="width : 70%; margin: auto;">
@@ -534,10 +189,6 @@
<!-- <apex:param name="lineNum" assignTo="{!lineNum}" value="" /> -->
</apex:actionFunction>
- <apex:actionFunction name="SendEmail" action="{!SendEmail}" oncomplete="SendEmailCallBack();" reRender="messageForm" >
- <apex:param name="handleType" assignTo="{!handleType}" value="send" />
- </apex:actionFunction>
-
<div style="width: 100%">
<div class="errorMessage" style="margin-left: 39%">
<span id="errorMessage">{!errorMessage}</span>
@@ -551,7 +202,7 @@
</tr>
<tr>
<th style="width: 20%;text-align:center;">FROM:</th>
- <td><apex:outputText styleClass="FROM__c" value="{!mail.FROM__c}" style="width: 40%"/></td>
+ <td><apex:outputText value="{!mail.FROM__c}" style="width: 40%"/></td>
</tr>
</table>
</div>
@@ -570,18 +221,17 @@
</thead>
<tbody id="memberBody">
<apex:repeat id="lineDataList" value="{!memberLineDatas}" var="lineData">
- <tr line-id="{!lineData.lineNum}" style="text-align:center;">
+ <tr style="text-align:center;">
<td>
<input type="hidden" id="memberName{!lineData.lineNum}" value="{!lineData.name}" />
- <apex:inputText styleClass="emailAddress" value="{!lineData.emailAddress}" /></td>
- <td><apex:inputText styleClass="name" value="{!lineData.name}" /></td>
- <td><apex:inputCheckbox html-line-id="{!lineData.lineNum}" html-target="to" id="to" value="{!lineData.to}"/></td>
- <td><apex:inputCheckbox html-line-id="{!lineData.lineNum}" html-target="cc" id="cc" value="{!lineData.cc}"/></td>
- <td><apex:inputCheckbox html-line-id="{!lineData.lineNum}" html-target="bcc" id="bcc" value="{!lineData.bcc}"/></td>
- <td><input line-id="{!lineData.lineNum}" class="btn delete" value="delete" type="button"/></td>
- <!-- <td><apex:commandButton onclick="b();" action="{!deLine}" reRender="messageForm" value="delete" oncomplete="ub();" disabled="{!isOnClick}">
+ <apex:inputText value="{!lineData.emailAddress}" /></td>
+ <td><apex:inputText value="{!lineData.name}" /></td>
+ <td><apex:inputCheckbox onclick="statusChabge({!lineData.lineNum},'to')" id="to" value="{!lineData.to}"/></td>
+ <td><apex:inputCheckbox onclick="statusChabge({!lineData.lineNum},'cc')" id="cc" value="{!lineData.cc}"/></td>
+ <td><apex:inputCheckbox onclick="statusChabge({!lineData.lineNum},'bcc')" id="bcc" value="{!lineData.bcc}"/></td>
+ <td><apex:commandButton onclick="blockme();" action="{!deLine}" reRender="messageForm" value="delete" oncomplete="unblockUI();" disabled="{!isOnClick}">
<apex:param name="lineNum" assignTo="{!lineNum}" value="{!lineData.lineNum}" />
- </apex:commandButton></td> -->
+ </apex:commandButton></td>
<td>
<apex:commandButton onclick="openSearchMemberPage({!lineData.lineNum});" value="Search" disabled="{!isOnClick}">
@@ -592,8 +242,7 @@
</tbody>
<thead>
<tr style="text-align:center;">
- <!-- <td><apex:commandButton id="addLine" onclick="b();" action="{!addLine}" reRender="messageForm" value="ADD Member" oncomplete="ub();" disabled="{!isOnClick}"></apex:commandButton></td> -->
- <td><apex:commandButton id="addLine" onclick="AddMemberJs();" value="ADD Member" oncomplete=""></apex:commandButton></td>
+ <td><apex:commandButton id="addLine" onclick="blockme();" action="{!addLine}" reRender="messageForm" value="ADD Member" oncomplete="unblockUI();" disabled="{!isOnClick}"></apex:commandButton></td>
</tr>
</thead>
</table>
@@ -617,11 +266,11 @@
</tr> -->
<tr>
<th style="text-align:center;width: 20%;">SUBJECT:</th>
- <td><apex:inputField styleClass="SUBJECT__c" value="{!mail.SUBJECT__c}" style="width: 40%"/></td>
+ <td><apex:inputField value="{!mail.SUBJECT__c}" style="width: 40%"/></td>
</tr>
<tr>
<th style="text-align:center;width: 20%;">MESSAGE:</th>
- <td><apex:inputField styleClass="MESSAGE__c" style="height: 200px;width: 60%" value="{!mail.MESSAGE__c}"/></td>
+ <td><apex:inputField style="height: 200px;width: 60%" value="{!mail.MESSAGE__c}"/></td>
</tr>
</table>
</div>
@@ -635,70 +284,57 @@
<tr>
<td>
- <!-- <apex:commandButton value="Upload Attachment" action="{!uploadFile}" disabled="{!isOnClick}">
- </apex:commandButton> -->
+ <apex:commandButton value="Upload Attachment" action="{!uploadFile}" disabled="{!isOnClick}">
+ </apex:commandButton>
<apex:panelGroup >
- <apex:commandButton onclick="openFile();return false;" value="鍥剧墖鎵归噺涓婁紶" disabled="{!isOnClick}"/>
+ <apex:commandButton onclick="uploadFileS();return false;" value="鍥剧墖鎵归噺涓婁紶" disabled="{!isOnClick}"/>
</apex:panelGroup>
</td>
</tr>
</table>
</div>
- <apex:outputPanel rendered="{!IF(openType == 'View', true, false)}" style="margin-left: 5px;">
+ <div style="margin-left: 5px;">
<!-- border:1px solid #000000; -->
<table class="tableCss" style="width: 80%">
<tr style="text-align:center;">
<th style="text-align:center;width: 33%;">File Name</th>
<th style="text-align:center;width: 33%;">Upload Time</th>
- <!-- <th style="text-align:center;width: 33%;">File Size</th> -->
+ <th style="text-align:center;width: 33%;">File Size</th>
</tr>
- <apex:repeat id="attachmentList" value="{!newAttachmentList}" var="item">
+ <apex:repeat id="attachmentList" value="{!attachmentList}" var="attachment">
<tr style="text-align:center; vertical-align: middle;">
- <!-- <td><input value="{!item.Name}" readonly="readonly" style="border:none;"/></td> -->
- <td><apex:outputLink value="/{!item.Id}">{!item.FileName__c}</apex:outputLink></td>
- <td><apex:inputField value="{!item.CreatedDate}"/></td>
- <!-- <td><apex:inputField value="{item.BodyLength}"/></td> -->
- <td id="{!item.Id}">
- <a target="_blank" href="{!item.ViewLink__c}">鏌ョ湅</a>
+ <!-- <td><input value="{!attachment.Name}" readonly="readonly" style="border:none;"/></td> -->
+ <td><apex:outputLink value="/{!attachment.Id}">{!attachment.Name}</apex:outputLink></td>
+ <td><apex:inputField value="{!attachment.CreatedDate}"/></td>
+ <td><apex:inputField value="{!attachment.BodyLength}"/></td>
+ <td id="{!attachment.Id}">
+ <apex:commandButton id="deleteFile" value="delete" action="{!deleteFile}" reRender="messageForm" onclick="blockme();" oncomplete="unblockUI();" disabled="{!isOnClick}">
+ <apex:param name="fileId" assignTo="{!fileId}" value="{!attachment.Id}" />
+ </apex:commandButton>
</td>
</tr>
</apex:repeat>
</table>
- </apex:outputPanel>
- <!-- 20220222 PI鏀归�� by Bright start -->
- <apex:outputPanel rendered="{!IF(openType == 'View', false, true)}" style="margin-left: 5px;">
- <!-- border:1px solid #000000; -->
- <table class="tableCss attach_preview" style="width: 80%">
- <tr style="text-align:center;">
- <th style="text-align:center;width: 33%;">File Name</th>
- <th style="text-align:center;width: 33%;">Upload Time</th>
- <th style="text-align:center;width: 33%;">File Size</th>
- </tr>
-
- </table>
- </apex:outputPanel>
- <!-- 20220222 PI鏀归�� by Bright end -->
+ </div>
<div style="width: 30%;height: 5%;margin-left: 30%;margin-top: middle;">
<apex:outputPanel rendered="{!IF(type == 'Quotes', true, false)}">
- <apex:commandButton id="open" value="鏌ョ湅鎶ヤ环鍗�" onclick="openPDF();return false;" style="width: 49%;height: 5%" />
- <apex:commandButton id="addPDf" value="娣诲姞鎶ヤ环鍗�" onclick="AddQuotesPdf();return false;" oncomplete="" reRender="messageForm" style="width: 49%;height: 5%" disabled="{!isOnClick}"/>
+ <apex:commandButton id="open" value="鏌ョ湅鎶ヤ环鍗�" onclick="openPDF()" style="width: 49%;height: 5%" />
+ <apex:commandButton id="addPDf" value="娣诲姞鎶ヤ环鍗�" action="{!addPDF}" onclick="blockme();" oncomplete="unblockUI();" reRender="messageForm" style="width: 49%;height: 5%" disabled="{!isOnClick}"/>
</apex:outputPanel>
- <apex:commandButton id="test" value="Send Mail" onclick="SendEmailJs();return false;" style="width: 99%;height: 5%" disabled="{!isOnClick}"/>
- <!-- <apex:commandButton id="test" action="{!SendEmail}" value="Send Mail" onclick="b();" oncomplete="ub();" reRender="messageForm" style="width: 99%;height: 5%" disabled="{!isOnClick}">
+ <apex:commandButton id="test" action="{!SendEmail}" value="Send Mail" onclick="blockme();" oncomplete="unblockUI();" reRender="messageForm" style="width: 99%;height: 5%" disabled="{!isOnClick}">
<apex:param name="handleType" assignTo="{!handleType}" value="send" />
- </apex:commandButton> -->
+ </apex:commandButton>
</div>
<apex:outputPanel id="popupBox" layout="block" style="display:none">
<input type="file" id="file_input" name="attFile" multiple="true"/><br/>
<center>
- <apex:commandButton value="纭" onclick="uploadFile(); return false;" style="width: 20%; margin: 20px 10px 0px 10px" />
+ <apex:commandButton value="纭" onclick="saveAttachment(); return false;" style="width: 20%; margin: 20px 10px 0px 10px" />
<apex:commandButton value="鍙栨秷" onclick="popupBox.hide();" style="width: 20%; margin: 20px 10px 0px 10px" />
</center>
</apex:outputPanel>
</apex:form>
- <iframe src="" id="pdf" style="position: absolute;left: 100%;" />
</div>
</div>
</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/StageProgressBar.page b/force-app/main/default/pages/StageProgressBar.page
index 419d92a..f3311ef 100644
--- a/force-app/main/default/pages/StageProgressBar.page
+++ b/force-app/main/default/pages/StageProgressBar.page
@@ -97,15 +97,14 @@
} else if (s == '澶辫触') {
var oppId = '{!Opportunity.Id}';
var creuser = '{!Opportunity.CreatedById}'.substring(0,15);
- var owner = '{!Opportunity.OwnerId}'.substring(0,15);
var userId = '{!$User.Id}'.substring(0,15);
var roleId = '{!$User.UserRoleId}'.substring(0,15);
//alert(userId);
- if(userId == '005280000037mrQ' || userId == '00528000002OAvH' || userId == '00528000000YSdB' || roleId == '00E0K000001ywwz' || roleId == '00E0K000001jGiM' || roleId == '00E0K000001jGib' || roleId == '00E0K000001ywgS' || roleId == '00E28000000knAm' || roleId == '00E28000000knAr' || roleId == '00E28000000aKzn' || roleId == '00E0K000001jGhn' || roleId == '00E0K000001jGhs' || roleId == '00E0K000001ywgN' || roleId == '00E0K000001PWuh' || roleId == '00E0K000001PWum' || roleId == '00E0K000001PWur' || roleId == '00E280000015xus' || roleId == '00E280000015xux' || roleId == '00E28000000aKzs' || roleId == '00E0K000001jGiC' || roleId == '00E0K000001jGiR' || roleId == '00E0K000001ywgX' || roleId == '00E28000000knAc' || roleId == '00E28000000knAh' || roleId == '00E28000000aKzx' || roleId == '00E28000000knAw' || roleId == '00E28000000knB1' || roleId == '00E28000000aL02' || roleId == '00E28000000kjpX'){
- var rtn = sforce.apex.execute("OpportunityWebService", "checkOrderStatus", {oppId: oppId,stageName:'Closed Lost',creuser: creuser,owner: owner});
- if(rtn == '1' && (creuser == userId || owner == userId)){
+ if(userId == '005280000037mrQ' || userId == '00528000002OAvH' || userId == '00528000000YSdB' || roleId == '00E0K000001ywwz' || roleId == '00E0K000001jGiM' || roleId == '00E0K000001jGib' || roleId == '00E0K000001ywgS' || roleId == '00E28000000knAm' || roleId == '00E28000000knAr' || roleId == '00E28000000aKzn' || roleId == '00E0K000001jGhn' || roleId == '00E0K000001jGhs' || roleId == '00E0K000001ywgN' || roleId == '00E0K000001PWuh' || roleId == '00E0K000001PWum' || roleId == '00E0K000001PWur' || roleId == '00E280000015xus' || roleId == '00E280000015xux' || roleId == '00E28000000aKzs' || roleId == '00E0K000001jGiC' || roleId == '00E0K000001jGiR' || roleId == '00E0K000001ywgX' || roleId == '00E28000000knAc' || roleId == '00E28000000knAh' || roleId == '00E28000000aKzx' || roleId == '00E28000000knAw' || roleId == '00E28000000knB1' || roleId == '00E28000000aL02' ){
+ var rtn = sforce.apex.execute("OpportunityWebService", "checkOrderStatus", {oppId: oppId,stageName:'Closed Lost',creuser: creuser});
+ if(rtn == '1' && creuser == userId){
/*if(!confirm("鏄惁澶辫触璇环锛�")){
return;
}*/
@@ -125,8 +124,8 @@
return;
}else{
//alert(rtn);
- if(creuser != userId || owner != userId){
- alert('鍙湁鍒涘缓浜哄拰鎵�鏈変汉鎵嶈兘澶辫触璇环');
+ if(creuser != userId){
+ alert('鍙湁鍒涘缓浜烘墠鑳藉け璐ヨ浠�');
}else if(rtn == '0' ){
alert('璇环涓嬪瓨鍦ㄦ湁鏁堝悎鍚岋紝涓嶈兘鍙栨秷/澶辫触');
}else{
@@ -141,15 +140,14 @@
} else if (s == '鍙栨秷') {
var oppId = '{!Opportunity.Id}';
var creuser = '{!Opportunity.CreatedById}'.substring(0,15);
- var owner = '{!Opportunity.OwnerId}'.substring(0,15);
var userId = '{!$User.Id}'.substring(0,15);
var roleId = '{!$User.UserRoleId}'.substring(0,15);
//alert(userId);
- if(userId == '005280000037mrQ' || userId == '00528000002OAvH' || userId == '00528000000YSdB' || roleId == '00E0K000001ywwz' || roleId == '00E0K000001jGiM' || roleId == '00E0K000001jGib' || roleId == '00E0K000001ywgS' || roleId == '00E28000000knAm' || roleId == '00E28000000knAr' || roleId == '00E28000000aKzn' || roleId == '00E0K000001jGhn' || roleId == '00E0K000001jGhs' || roleId == '00E0K000001ywgN' || roleId == '00E0K000001PWuh' || roleId == '00E0K000001PWum' || roleId == '00E0K000001PWur' || roleId == '00E280000015xus' || roleId == '00E280000015xux' || roleId == '00E28000000aKzs' || roleId == '00E0K000001jGiC' || roleId == '00E0K000001jGiR' || roleId == '00E0K000001ywgX' || roleId == '00E28000000knAc' || roleId == '00E28000000knAh' || roleId == '00E28000000aKzx' || roleId == '00E28000000knAw' || roleId == '00E28000000knB1' || roleId == '00E28000000aL02' || roleId == '00E28000000kjpX'){
- var rtn = sforce.apex.execute("OpportunityWebService", "checkOrderStatus", {oppId: oppId,stageName:'Closed Cancel',creuser: creuser,owner: owner});
- if(rtn == '1' && (creuser == userId || owner == userId)){
+ if(userId == '005280000037mrQ' || userId == '00528000002OAvH' || userId == '00528000000YSdB' || roleId == '00E0K000001ywwz' || roleId == '00E0K000001jGiM' || roleId == '00E0K000001jGib' || roleId == '00E0K000001ywgS' || roleId == '00E28000000knAm' || roleId == '00E28000000knAr' || roleId == '00E28000000aKzn' || roleId == '00E0K000001jGhn' || roleId == '00E0K000001jGhs' || roleId == '00E0K000001ywgN' || roleId == '00E0K000001PWuh' || roleId == '00E0K000001PWum' || roleId == '00E0K000001PWur' || roleId == '00E280000015xus' || roleId == '00E280000015xux' || roleId == '00E28000000aKzs' || roleId == '00E0K000001jGiC' || roleId == '00E0K000001jGiR' || roleId == '00E0K000001ywgX' || roleId == '00E28000000knAc' || roleId == '00E28000000knAh' || roleId == '00E28000000aKzx' || roleId == '00E28000000knAw' || roleId == '00E28000000knB1' || roleId == '00E28000000aL02' ){
+ var rtn = sforce.apex.execute("OpportunityWebService", "checkOrderStatus", {oppId: oppId,stageName:'Closed Cancel',creuser: creuser});
+ if(rtn == '1' && creuser == userId){
/*if(!confirm("鏄惁澶辫触璇环锛�")){
return;
}*/
@@ -168,8 +166,8 @@
refreshPage();
return;
}else{
- if(creuser != userId || owner != userId){
- alert('鍙湁鍒涘缓浜哄拰鎵�鏈変汉鎵嶈兘鍙栨秷璇环');
+ if(creuser != userId){
+ alert('鍙湁鍒涘缓浜烘墠鑳藉彇娑堣浠�');
}else if(rtn == '0' ){
alert('璇环涓嬪瓨鍦ㄦ湁鏁堝悎鍚岋紝涓嶈兘鍙栨秷/澶辫触');
}else{
diff --git a/force-app/main/default/pages/TSRepair.page b/force-app/main/default/pages/TSRepair.page
index 6c2bf36..0c54e4a 100644
--- a/force-app/main/default/pages/TSRepair.page
+++ b/force-app/main/default/pages/TSRepair.page
@@ -8,7 +8,6 @@
<apex:includeScript value="{!URLFOR($Resource.jquerysuggestjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no"/>
<style type="text/css">
/*.sfdcBody {position: absolute;
@@ -104,11 +103,6 @@
<!-- JS 鏂规硶 -->
<script>
var j$ = jQuery.noConflict();
- var closeField = '';
- var closePhone = '';
- var newSearchContactWindow = null;
- var staticResourceContact = JSON.parse('{!staticResourceContact}')
-
j$(document).ready(function() {
var status = '{!tsr.TSReportStatus__c}';
@@ -350,144 +344,16 @@
}
- //20220310 zhj PIPL start
- function isError(){
- let h = HasError()
- if(h){
- unblockUI();
- }
- }
- function HasError(){
- // if (IsAddmessage) {
- // return true;
- // }
- let e = document.getElementById("allPage:allForm:message");
- if (!e) {
- return false;
- }
-
- let divs = j$(e).find("div.message");
- for (let i = 0; i < divs.length; i++) {
- for (let j = 0; j < divs[i].classList.length; j++) {
- for(let cls of divs[i].classList){
- if (cls.indexOf('error')>-1) {
- return true;
- }
- }
-
- }
-
- }
- return false;
- }
-
- function alertErrorMessage(errorMsg) {
- let errorMsgNode = document.getElementById("allPage:allForm:message");
- errorMsgNode.innerText = errorMsg;
- errorMsgNode.className = 'pbError';
- }
-
- function htmlToElement(html) {
- var template = document.createElement('template');
- html = html.trim(); // Never return a text node of whitespace as the result
- template.innerHTML = html;
- return template.content.firstChild;
- }
-
- var contactIdValue = '';
- function searchContact(contactNodeId,field1,field2,field3,accountValueId){
- closeField = field1;
- closePhone = field2;
- contactIdValue = field3;
- var accountValueLkid = document.getElementById(accountValueId+'_lkid').value;
- var searchContactKeyWord = document.getElementById(field1).value;
- if (accountValueLkid != '000000000000000') {
- let baseUrl = "/apex/SearchContactPage";
- let suffixUrl = "?contactId="+contactNodeId+ "&accountId=" + accountValueLkid;
- let newSearchContactParam = 'height=600,width=800,left=100,top=100,dialogHide=true,resizable=no,scrollbars=yes,toolbar=no,status=no';
- newSearchContactWindow = window.open(baseUrl+suffixUrl, 'Popup', newSearchContactParam);
- if (window.focus) {
- newSearchContactWindow.focus();
- }
- return false;
- }else {
- alert('璇峰厛閫夋嫨瀹㈡埛鍗曚綅');
- }
- }
-
- var currentLastName = '';
- var currentPhoneId = '';
- function replaceSearchContactLookup() {
- blockme();
- var RepairInfoListStr = JSON.parse('{!RepairInfoListStr}');
- sforce.connection.sessionId = '{!GETSESSIONID()}';
- let queryContactBack = function(data,number){
- document.getElementById(currentLastName).value = data.object.lastName;
- document.getElementById(currentPhoneId).innerText = data.object.phone;
- number++;
- if(document.getElementById('allPage:allForm:RepairInfoList:'+number+':contactIdValue') != null && document.getElementById('allPage:allForm:RepairInfoList:'+number+':contactIdValue').value != ''){
- currentLastName = 'allPage:allForm:RepairInfoList:'+number+':Contacts__c';
- currentPhoneId = 'allPage:allForm:RepairInfoList:'+number+':j_id91';
- let sfId = document.getElementById('allPage:allForm:RepairInfoList:'+number+':contactIdValue').value;
- var queryStr = 'Select Id, AWS_Data_Id__c'
- +' from Contact where id = \''
- + sfId +'\' ';
- var reports = sforce.connection.query(queryStr);
- var records = reports.getArray("records");
- var awsDataId = records[0].AWS_Data_Id__c;
- AWSService.queryTSRepair(staticResourceContact.queryUrl, awsDataId, queryContactBack, staticResourceContact.token,number);
- }
- }
- for(var i = 0;i<RepairInfoListStr.length;i++){
- let contactHtmlString = '<img src="/img/s.gif" onclick="searchContact(\'allPage:allForm:contactId\',\'allPage:allForm:RepairInfoList:'+i+':Contacts__c\',\'allPage:allForm:RepairInfoList:'+i+':j_id91\',\'allPage:allForm:RepairInfoList:'+i+':contactIdValue\',\'allPage:allForm:RepairInfoList:'+i+':BusinessACustomerUnit\')" alt="Reference Document Number Lookup" class="lookupIcon" title="Reference Document Number Lookup (New Window)"/>';
- let lookUpNode = htmlToElement(contactHtmlString);
- console.log(lookUpNode);
- let parentNode = document.getElementById('allPage:allForm:RepairInfoList:'+i+':contactIdValue').parentNode;
- parentNode.appendChild(lookUpNode);
- }
- if(document.getElementById('allPage:allForm:RepairInfoList:0:contactIdValue').value != ''){
- currentLastName = 'allPage:allForm:RepairInfoList:0:Contacts__c';
- currentPhoneId = 'allPage:allForm:RepairInfoList:0:j_id91';
- //瑙e瘑
- let sfId = document.getElementById('allPage:allForm:RepairInfoList:0:contactIdValue').value;
- var queryStr = 'Select Id, AWS_Data_Id__c'
- +' from Contact where id = \''
- + sfId +'\' ';
- var reports = sforce.connection.query(queryStr);
- var records = reports.getArray("records");
- var awsDataId = records[0].AWS_Data_Id__c;
- AWSService.queryTSRepair(staticResourceContact.queryUrl, awsDataId, queryContactBack, staticResourceContact.token,0);
- }
- unblockUI();
- }
-
-
- function closePopupWindow() {
- console.log('closePopupWindow()')
- if (null != newSearchContactWindow) {
- newSearchContactWindow.close();
- }
- let contactInfoStr = document.getElementById('allPage:allForm:contactId').value;
- console.log('closePopup:'+contactInfoStr);
- let contactInfo = JSON.parse(contactInfoStr);
-
- document.getElementById(contactIdValue).value = contactInfo.ContactId;
- document.getElementById(''+closeField).value = contactInfo.Name;
- document.getElementById(''+closePhone).value = contactInfo.Phone;
- document.getElementById(''+closePhone).innerText = contactInfo.Phone;
- }
- //20220310 zhj PIPL end
</script>
<apex:form id="allForm">
- <apex:inputHidden value="{!contactId}" id="contactId"/>
<!-- 鐜嬮箯浼� 鐐瑰嚮鎸夐挳鏇存柊鐘舵�佸紑濮� -->
- <apex:actionFunction name="setStatus" action="{!setStatus}" reRender="Activities,message,Activities1" oncomplete="unblockUI();replaceSearchContactLookup();">
+ <apex:actionFunction name="setStatus" action="{!setStatus}" reRender="Activities,message,Activities1" oncomplete="unblockUI();">
<apex:param name="status" assignTo="{!status}" value="" />
</apex:actionFunction>
<!-- 鐜嬮箯浼� 鐐瑰嚮鎸夐挳鏇存柊鐘舵�佺粨鏉� -->
- <apex:actionFunction name="updateServiceCategory" action="{!updateServiceCategory}" rerender="Activities" onComplete="replaceSearchContactLookup();unblockUI();">
+ <apex:actionFunction name="updateServiceCategory" action="{!updateServiceCategory}" rerender="Activities" onComplete="unblockUI();">
<apex:param name="num" assignTo="{!num}" value="" />
</apex:actionFunction>
@@ -679,13 +545,7 @@
<apex:inputField id="BusinessACustomerUnit" value="{!repairInfo.ba.BusinessAAccount__c}" />
</td>
<th style="text-align: center;">鑱旂郴浜�</th>
- <td align="left" >
- <!-- <apex:inputField value="{!repairInfo.ba.BusinessAContact__c}" style="width: 80%"/> -->
- <!-- Add By zhj for PIPL 20220309 Start -->
- <apex:inputText value="{!contactNameValue}" id="Contacts__c" style="width: 80%"/>
- <apex:inputHidden id="contactIdValue" value="{!repairInfo.ba.BusinessAContact__c}"/>
- <!-- Add By zhj for PIPL 20220309 end -->
- </td>
+ <td align="left" ><apex:inputField value="{!repairInfo.ba.BusinessAContact__c}" style="width: 80%"/></td>
<th style="text-align: center;">鑱旂郴鐢佃瘽</th>
<td align="left" ><apex:outputField value="{!repairInfo.ba.BusinessAPhone_F__c}"/></td>
</tr>
@@ -953,10 +813,7 @@
<th style="text-align: center;" >瀹㈡埛鍗曚綅</th>
<td style="text-align: left;"><apex:outputField value="{!repairInfo.ba.BusinessAAccount__c}" style="width: 80%"/></td>
<th style="text-align: center;">鑱旂郴浜�</th>
- <td align="left" >
- <apex:outputField value="{!repairInfo.ba.BusinessAContact__c}" style="width: 80%"/>
- <apex:inputHidden id="contactIdValue" value="{!repairInfo.ba.BusinessAContact__c}"/>
- </td>
+ <td align="left" ><apex:outputField value="{!repairInfo.ba.BusinessAContact__c}" style="width: 80%"/></td>
<th style="text-align: center;">鑱旂郴鐢佃瘽</th>
<td align="left" ><apex:outputField value="{!repairInfo.ba.BusinessAPhone_F__c}"/></td>
</tr>
@@ -1141,14 +998,9 @@
<br/>
<br/>
</apex:repeat>
+
</apex:outputPanel>
- <script>
- console.log('appendToOnloadQueue')
- sfdcPage.appendToOnloadQueue(function () {
- replaceSearchContactLookup();
- });
- </script>
<apex:commandButton id="test" onclick="blockme();" action="{!addBusinessActivity}" reRender="Activities" value="娣诲姞涓氬姟娲诲姩" oncomplete="unblockUI();" disabled="{!If(tsr.TSReportStatus__c = '鐢宠涓�' || tsr.TSReportStatus__c = '纭' ,true , If((tsr.TSReportStatus__c = '鑽夋涓�' || tsr.TSReportStatus__c = '椹冲洖') && onclickType != '0',true,false))}"></apex:commandButton>
- <apex:commandButton id="save" onclick="blockme();" action="{!save}" reRender="message,allPanel,allForm" value="淇濆瓨" style="width: 70px;" oncomplete="unblockUI();isError();" disabled="{!If(tsr.TSReportStatus__c = '鐢宠涓�' || tsr.TSReportStatus__c = '纭',true , If((tsr.TSReportStatus__c = '鑽夋涓�' || tsr.TSReportStatus__c = '椹冲洖') && onclickType != '0',true,false))}"></apex:commandButton>
+ <apex:commandButton id="save" onclick="blockme();" action="{!save}" reRender="message,allPanel,allForm" value="淇濆瓨" style="width: 70px;" oncomplete="unblockUI();" disabled="{!If(tsr.TSReportStatus__c = '鐢宠涓�' || tsr.TSReportStatus__c = '纭',true , If((tsr.TSReportStatus__c = '鑽夋涓�' || tsr.TSReportStatus__c = '椹冲洖') && onclickType != '0',true,false))}"></apex:commandButton>
</apex:form>
</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/ViewUserFaultInfoDecryptInfo.page b/force-app/main/default/pages/ViewUserFaultInfoDecryptInfo.page
index c2cde7e..c668edc 100644
--- a/force-app/main/default/pages/ViewUserFaultInfoDecryptInfo.page
+++ b/force-app/main/default/pages/ViewUserFaultInfoDecryptInfo.page
@@ -8,6 +8,8 @@
<apex:outputField html-data-id="{!encryptedAPI}" title="{!ApiPrefix}{!encryptedAPI}" value="{!User_FaultInfo__c[encryptedAPI]}" />
</apex:repeat>
<apex:outputField html-data-id="CONTACT__c" title="{!ApiPrefix}CONTACT__c" value="{!User_FaultInfo__c['CONTACT__c']}" />
+ <apex:outputField html-data-id="PHONE__c" title="{!ApiPrefix}PHONE__c" value="{!User_FaultInfo__c['PHONE__c']}" />
+ <apex:outputField html-data-id="E_MAIL__c" title="{!ApiPrefix}E_MAIL__c" value="{!User_FaultInfo__c['E_MAIL__c']}" />
<apex:outputField html-data-id="UFContact__c" title="{!ApiPrefix}UFContact__c" value="{!User_FaultInfo__c['UFContact__c']}" />
</apex:pageBlockSection>
<script>
@@ -65,6 +67,24 @@
ele.title='';
ele.innerHTML = data.object.lastName;
}
+
+ let t1 = "[title='"+config.ApiPrefix+"PHONE__c']";
+ let ele1 = document.querySelector(t1);
+ if(ele1){
+ ele1.title='';
+ if (data.object.phoneD == '') {
+ ele1.innerHTML = data.object.mobilePhoneD;
+ } else {
+ ele1.innerHTML = data.object.phoneD;
+ }
+ }
+
+ let t2 = "[title='"+config.ApiPrefix+"E_MAIL__c']";
+ let ele2 = document.querySelector(t2);
+ if(ele2){
+ ele2.title='';
+ ele1.innerHTML = data.object.emailD;
+ }
};
var queryEndUserDBack = function queryEndUserDBack(data){
diff --git a/force-app/main/default/staticresources/StageMapJsNew1.js b/force-app/main/default/staticresources/StageMapJsNew1.js
index 1f963f0..ff0ea84 100644
--- a/force-app/main/default/staticresources/StageMapJsNew1.js
+++ b/force-app/main/default/staticresources/StageMapJsNew1.js
@@ -1,4 +1,4 @@
-锘�/*
+/*
* 鍚勮銆佷竴鐣洰銇従鍦ㄣ伄Stage銆佷簩鐣洰銇嬨倝銇偗銉儍銈仹銇嶃倠Stage
*
* 琛屻倰瀹氱京銇椼仾銇勫牬鍚堛�佷簩鐣洰銇嬨倝Stage銈掑畾缇┿仐銇亜鍫村悎銆併偗銉儍銈笉鑳姐伀銇倠
@@ -140,26 +140,6 @@
];
var SSBD_HighendProductsCOLOR =
-[["Prospect Created","Prospect Created"]
-,["Phase1","Prospect Created","Phase1"]
-,["Phase2","Prospect Created","Phase1","Phase2"]
-,["Phase3","Prospect Created","Phase1","Phase2","Phase3"]
-,["Closed Won","Prospect Created","Phase1","Phase2","Phase3","Closed Won","瀹屾垚"]
-,["Closed Lost","Prospect Created","Phase1","Phase2","Phase3","Closed Lost","澶辫触"]
-,["Closed Cancel","Prospect Created","Phase1","Phase2","Phase3","Closed Cancel","鍙栨秷"]
-];
-
-var IE_SSBD =
-[["Prospect Created","Phase1","Closed Lost","Closed Cancel","澶辫触","鍙栨秷"]
-,["Phase1","Phase2","Closed Lost","Closed Cancel","澶辫触","鍙栨秷"]
-,["Phase2","Phase3","Closed Lost","Closed Cancel","澶辫触","鍙栨秷"]
-,["Phase3","Closed Won","Closed Lost","Closed Cancel","瀹屾垚","澶辫触","鍙栨秷"]
-,["Closed Won"]
-,["Closed Lost"]
-,["Closed Cancel"]
-];
-
-var IE_SSBDCOLOR =
[["Prospect Created","Prospect Created"]
,["Phase1","Prospect Created","Phase1"]
,["Phase2","Prospect Created","Phase1","Phase2"]
diff --git a/force-app/main/default/staticresources/StageMapJsNew1.resource-meta.xml b/force-app/main/default/staticresources/StageMapJsNew1.resource-meta.xml
index 4b411f2..6adb110 100644
--- a/force-app/main/default/staticresources/StageMapJsNew1.resource-meta.xml
+++ b/force-app/main/default/staticresources/StageMapJsNew1.resource-meta.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<StaticResource xmlns="http://soap.sforce.com/2006/04/metadata">
<cacheControl>Private</cacheControl>
- <contentType>application/x-javascript</contentType>
+ <contentType>text/javascript</contentType>
</StaticResource>
--
Gitblit v1.9.1