From 6945f4e865d3f6ba831515fe51e4e6167cd2077b Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期四, 04 五月 2023 10:19:07 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
---
force-app/main/default/classes/LexSISearchSetProductController.cls | 9
force-app/main/default/pages/YouCantDeleteQuote.page | 2
force-app/main/default/pages/PAEListjump.page | 2
force-app/main/default/pages/SearchProduct.page | 16
force-app/main/default/lwc/lexStockCancel/lexStockCancel.html | 6
force-app/main/default/pages/Maintenance.page | 2
force-app/main/default/classes/LexContractAuthorizeController.cls-meta.xml | 5
force-app/main/default/pages/SelectAsset.page | 2
force-app/main/default/lwc/lexStockCancel/lexStockCancel.js | 197 +-
force-app/main/default/classes/LexStockCancelController.cls | 60
force-app/main/default/lwc/lexStockCancel/lexStockCancel.js-meta.xml | 12
force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.js-meta.xml | 11
force-app/main/default/pages/AccessoryAdd.page | 174 +-
force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.css | 11
force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.js | 264 +++
force-app/main/default/pages/PAEDecisionRecord.page | 148 +
force-app/main/default/pages/UnderConstruct.page | 2
force-app/main/default/pages/ConsumEquipmentRentalResponsePopUp.page | 196 +-
force-app/main/default/classes/PAEDecisionRecordController.cls | 2
force-app/main/default/pages/RentalAgencyReceived.page | 691 +++++-----
force-app/main/default/pages/PAEDecisionRecordjump.page | 2
force-app/main/default/classes/LexContractAuthorizeController.cls | 454 ++++++
force-app/main/default/pages/ConsumApplySplit.page | 3
force-app/main/default/pages/ConsumTrial.page | 1617 +++++++++++-----------
force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.html | 5
force-app/main/default/pages/ConsumAssignCancel.page | 189 +-
force-app/main/default/pages/OFSRepairConsignPDFOuter.page | 2
27 files changed, 2,486 insertions(+), 1,598 deletions(-)
diff --git a/force-app/main/default/classes/LexContractAuthorizeController.cls b/force-app/main/default/classes/LexContractAuthorizeController.cls
new file mode 100644
index 0000000..19acb51
--- /dev/null
+++ b/force-app/main/default/classes/LexContractAuthorizeController.cls
@@ -0,0 +1,454 @@
+public with sharing class LexContractAuthorizeController {
+ public LexContractAuthorizeController() {
+ }
+ @AuraEnabled
+ public static Opportunity init(String recordId){
+ try{
+ Opportunity item=[select
+ id,Estimation_Decision__c,Contract_DB_complite_day__c,Contract_Authorize__c,Contract_Authorize_Lock__c,If_Need_Authorize__c,
+ Authorized_DB_No__c,SPO_URL__c,Estimation_No__c,Closing_Bid_Date__c,Bid_Date__c,
+ Cnt_Lost_cancel_Draft__c,Cnt_Lost_cancel_report__c,IF_Submit__c,Agency1__c,Trade__c,Sales_Root__c,Is_Corrosion__c
+ from Opportunity
+ where id = :recordId];
+ return item;
+
+ }catch(Exception e){
+ System.debug('LexStockCancelController init error: '+e.getMessage());
+ }
+ return null;
+ }
+
+ @AuraEnabled
+ public static UpdateResult updateOppotunity(
+ String recordId
+ ) {
+ UpdateResult result = new UpdateResult();
+ result.recordId = recordId;
+ try{
+ Opportunity opp=new Opportunity(id=recordId);
+ opp.Contract_Authorize__c = true;
+
+ opp.If_Interface_Lock__c=true;
+
+ opp.IF_Submit__c = true;
+ update opp;
+ result.success = true;
+ result.errors = new List<String>();
+ return result;
+ }catch(Exception e){
+ result.success = false;
+ result.errors = new List<String>();
+ result.errors.add(e.getMessage());
+ System.debug(LoggingLevel.INFO,'updateOppotunity Error : ' + e);
+ }
+ return result;
+ }
+ @AuraEnabled
+ public static String submitApprovalRequest(String recordId) {
+ try{
+ Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
+ req.setObjectId(recordId);
+ Approval.ProcessResult result = Approval.process(req);
+ if(result!=null&&result.getErrors()!=null&&result.getErrors().size()>0) return result.getErrors().get(0).getMessage();
+ }catch(Exception e){
+ System.debug('LexStockCancelController submitApprovalRequest error: '+e.getMessage());
+ return e.getMessage();
+ }
+ return null;
+ }
+
+ @AuraEnabled
+ public static String getProfileId(){
+ return UserInfo.getProfileId();
+ }
+ @AuraEnabled
+ public static Boolean judgeIsAssistantAppliedOutTime(String Quoteid) {
+ List<PromotionSales__c> PromotionSalesList = [select id,IsAssistantAppliedOutTime__c from PromotionSales__c where Quote__r.Quote_No__c =:Quoteid];
+ for(PromotionSales__c pro : PromotionSalesList){
+ if(pro.IsAssistantAppliedOutTime__c){
+ return false;
+ }
+ }
+ return true;
+ }
+ @AuraEnabled
+ public static Opportunity searchOpportunity(String oppid) {
+ try{
+ Opportunity res=[select Id,Contract_Authorize_Lock__c from Opportunity where Id =:oppid];
+ return res;
+ }catch(Exception e){
+ System.debug('LexStockCancelController submitApprovalRequest error: '+e.getMessage());
+ }
+ return null;
+ }
+ @AuraEnabled
+ // LHJ 闃胯タ璧涘妫�鏌� Start
+ public static String checkDangerItem(String agency1) {
+ //娌℃湁鍗卞寲鍝佽瘉鐓х殑鎻愮ず淇℃伅
+ String licenseStr = '绗竴缁忛攢鍟嗘病鏈夋湁鏁堢殑鍗遍櫓鍖栧鍝佺粡钀ヨ鍙瘉銆�';
+ //娌℃湁闃胯タ璧涘缁忛攢鍟嗗崗璁殑鎻愮ず淇℃伅
+ String accStr = '绗竴缁忛攢鍟嗘病鏈夐樋瑗胯禌澶氱粡閿�鍟嗗崗璁��';
+
+ //妫�鏌ユ槸鍚︽湁璇佺収
+ List<License_Information__c> licenseList = [SELECT Id
+ FROM License_Information__c
+ WHERE LicenseAndAccount__c = :agency1
+ AND LicenseType__c = '鍗遍櫓鍖栧鍝佺粡钀ヨ鍙瘉'
+ AND Is_Active_Formula__c = true
+
+ ];
+ //妫�鏌ユ槸鍚︽湁闃胯タ璧涘鍗忚
+ List<Account> accountList = [SELECT Id
+ FROM Account
+ WHERE Parent.id = :agency1
+ //闃胯タ璧涘 澧炲姞妫�绱㈤樋瑗胯禌澶氬崗璁� 浠ュ強 鍙互鍋氭姤浠�(澶嶉�夋) 绮剧悽鎶�鏈� wql 2021/01/04 start
+ AND Contract_Quote_Decide_Flag_checkbox__c =true
+ AND Assiesedo_Dealer__c = true
+ //闃胯タ璧涘 澧炲姞妫�绱㈤樋瑗胯禌澶氬崗璁� 浠ュ強 鍙互鍋氭姤浠�(澶嶉�夋) 绮剧悽鎶�鏈� wql 2021/01/04 end
+ ];
+
+ system.debug('licenseList:'+licenseList.size());
+ system.debug('agency1:'+agency1);
+ //鈶犳棦娌℃湁鍗卞寲鍝佽瘉涔熸病鏈夐樋瑗胯禌澶氬崗璁�
+ if(licenseList.size() == 0 && accountList.size() ==0){
+ return licenseStr+accStr;
+ }
+ //鈶℃病鏈夊嵄鍖栧搧璇�
+ else if(licenseList.size() ==0){
+ return licenseStr;
+ }
+ //鈶℃病鏈夐樋瑗胯禌澶氱粡閿�鍟嗗崗璁�
+ else if(accountList.size() ==0){
+ return accStr;
+ }
+ //鈶㈠叏閮芥湁
+ else{
+ return 'OK';
+ }
+ }
+ @AuraEnabled
+ public static String oppCheck(String oppid, String saveFlg) {
+
+ Map<Id, String> proMap= new Map<Id, String>();
+ List<OpportunityLineItem> OppItemList = [select PricebookEntry.Product2Id, PricebookEntry.Product2.Name
+ From OpportunityLineItem
+ Where OpportunityId = :oppid];
+
+ if (OppItemList.size() > 0) {
+ for (OpportunityLineItem opl : OppItemList) {
+ proMap.put(opl.PricebookEntry.Product2Id, opl.PricebookEntry.Product2.Name);
+ }
+ }
+
+ List<Opportunity> oppList = [select Agency1__c from Opportunity where id = :oppid];
+ String angencyId = oppList[0].Agency1__c;
+ String strRet = '';
+
+ if (saveFlg == '1') {
+ strRet = checkProRegisterDecide(proMap, angencyId, oppid);
+ } else {
+ strRet = checkProRegisterDecide(proMap, angencyId, '');
+ }
+ return strRet;
+ }
+ public static String checkProRegisterDecide(Map<Id, String> proMap, String agency1, String OppId) {
+
+ String errormessage = '';
+ Boolean error = false;
+
+ Map<String, String> CheckMap = new Map<String, String>();
+ CheckMap = MapCheckProRegisterDecide(proMap, agency1, OppId);
+ if (CheckMap.isEmpty()) {
+ return 'OK';
+ } else {
+ return '鏈変笉鍙攢鍞骇鍝佹垨瓒呭嚭缁忛攢鍟嗙粡钀ヨ寖鍥达紝璇锋洿鏂版姤浠峰崟' + CheckMap;
+ }
+
+ }
+ @AuraEnabled
+ public static String updReg(String oppid) {
+
+ List<OpportunityLineItem> updList = new List<OpportunityLineItem>();
+ List<OpportunityLineItem> OppItemList = [select id, Id__c, Register_alleffective__c,
+ PricebookEntry.Product2.RegisterNo_ALL__c
+ From OpportunityLineItem
+ Where OpportunityId = :oppid];
+ for (OpportunityLineItem ol : OppItemList) {
+ ol.Register_alleffective__c = ol.PricebookEntry.Product2.RegisterNo_ALL__c;
+ updList.add(ol);
+ }
+ if (updList.size() > 0) update updList;
+ return 'OK';
+ }
+ public static Map<String, String> MapCheckProRegisterDecide(Map<Id, String> proMap, String agency1, String OppId) {
+
+ Map<String, String> retMap = new Map<String, String>();
+ String errormessage = '';
+ Boolean error = false;
+ Map<String,List<String>> proAllBSstrMap;
+ List<String> proNotNeedList = new List<String>();
+
+ Map<String,List<String>> old_newMap = new Map<String,List<String>>();
+ Map<String,List<String>> new_oldMap = new Map<String,List<String>>();
+
+ // 鍙栧緱 缁忚惀鑼冨洿瀵瑰簲浜у搧鍏崇郴
+ List<String> midStr = new List<String>();
+ List<String> midStrO = new List<String>();
+
+ // List<Product_Register_contrast__c> rrList = Product_Register_contrast__c.getall().values();
+
+ // for (Product_Register_contrast__c rr : rrList) {
+
+ // midStr = new List<String>();
+ // midStrO = new List<String>();
+
+ // // 缁忚惀鑼冨洿瀵瑰簲浜у搧鍏崇郴 Map浣滄垚 鏃�-鏂板鐓�
+ // if (old_newMap.containsKey(rr.Register_old__c)) {
+ // old_newMap.get(rr.Register_old__c).add(rr.Register_new__c);
+ // } else {
+ // midStrO.add(rr.Register_new__c);
+ // old_newMap.put(rr.Register_old__c, midStrO.clone());
+ // }
+
+ // // 缁忚惀鑼冨洿瀵瑰簲浜у搧鍏崇郴 Map浣滄垚 鏂�-鏃у鐓�
+ // if (new_oldMap.containsKey(rr.Register_new__c)) {
+ // new_oldMap.get(rr.Register_new__c).add(rr.Register_old__c);
+ // } else {
+ // midStr.add(rr.Register_old__c);
+ // new_oldMap.put(rr.Register_new__c, midStr.clone());
+ // }
+
+ // }
+ // 鍙栧緱缁忛攢鍟� 鍖荤枟鍣ㄦ缁忚惀璁稿彲璇�
+ List<License_Information__c> licenseList = [SELECT Id,
+ ScopeKey__c,
+ LicenseType__c
+ FROM License_Information__c
+ WHERE LicenseAndAccount__c = :agency1
+ AND (LicenseType__c = '鍖荤枟鍣ㄦ缁忚惀璁稿彲璇�'
+ OR LicenseType__c = '绗簩绫诲尰鐤楀櫒姊扮粡钀ュ妗堝嚟璇�')
+ AND Is_Active_Formula__c = true
+ ];
+ // 鍒ゆ柇 鍖荤枟鍣ㄦ缁忚惀璁稿彲璇� 鏄惁瀛樺湪
+ if (licenseList.size() == 0) {
+ error = true;
+ errormessage = '绗竴缁忛攢鍟嗘病鏈夋湁鏁堢殑鍖荤枟鍣ㄦ缁忚惀璁稿彲璇併��';
+ retMap.put('agency', '0');
+
+ } else {
+ //缁忛攢鍟嗙粡钀ヨ寖鍥�
+ List<String> agListA = new List<String>();
+ List<String> agListTemp = new List<String>();
+ List<String> agList = new List<String>();
+
+ //鍙栫粡閿�鍟嗕笅 鎵�鏈夊尰鐤楀櫒姊扮粡钀ヨ鍙瘉銆佺浜岀被鍖荤枟鍣ㄦ缁忚惀澶囨鍑瘉
+ for (License_Information__c li : licenseList) {
+ if (li.ScopeKey__c != null) {
+ agListA.addAll(li.ScopeKey__c.split(';'));
+ agListTemp.addAll(li.ScopeKey__c.split(';'));
+ }
+ }
+ for (String a : agListTemp) {
+ if (a.length() >= 6) {
+ agList.add(a.substring(0, a.length() - 1));
+ } else {
+ agList.add(a.trim());
+ }
+ }
+
+ //浜у搧娉ㄥ唽璇�
+ Map<String,Map<String,String>> proBSMap = new Map<String,Map<String,String>>();
+
+ Map<String,String> proMidMap = null;
+ //浜у搧鎵�鏈夋湁鏁堟敞鍐岃瘉锛堝彲浠ュ拰缁忛攢鍟嗗尮閰嶏級
+ proAllBSstrMap = new Map<String,List<String>>();
+ set<Id> proIdList = new set<Id>();
+
+ for (String qli : proMap.keySet()) {
+ proIdList.add(qli);
+ proBSMap.put(qli, proMidMap);
+ List<String> empList = new List<String>();
+ proAllBSstrMap.put(qli, empList);
+
+ }
+
+ List<Product_Register_Link__c> prls = [
+ Select Product2__c,
+ Product2__r.Asset_Model_No__c,
+ Product2__r.SFDA_Approbated_Status__c,
+ Product2__r.SFDA_Status_New__c, // 浜у搧鐨凜FDA鏈�缁堢姸鎬� 20181225
+ Product_Register__r.Name,
+ Product_Register__r.BusinessScopeKey__c,
+ Product_Register__r.RegisterNoStatus__c,
+ Product_Register__r.MedPrdClass__c
+ From Product_Register_Link__c
+ where Product2__c in :proIdList
+ ];
+
+ // LHJ 20190102 澧炲姞璺宠繃閫昏緫 Start
+ List<Product2> productList = [select ID,SFDA_Status__c from Product2 where id in :proIdList];
+ for (Product2 pro : productList) {
+ if (pro.SFDA_Status__c == '涓嶈') {
+ proNotNeedList.add(pro.ID);
+ }
+ }
+ // LHJ 20190102 澧炲姞璺宠繃閫昏緫 End
+
+ for (Product_Register_Link__c prl : prls) {
+
+ // 璁剧疆浜у搧绫诲埆MAP
+ if (String.isNotBlank(prl.Product_Register__r.BusinessScopeKey__c)) {
+ system.debug('Product2 +++++++' + prl.Product2__c);
+ if (proBSMap.get(prl.Product2__c) != null) {
+ proBSMap.get(prl.Product2__c).put(prl.Product_Register__r.Name, prl.Product_Register__r.BusinessScopeKey__c);
+
+ } else {
+ Map<String,String> toooMap = new Map<String,String>();
+ toooMap.put(prl.Product_Register__r.Name, prl.Product_Register__r.BusinessScopeKey__c);
+ proBSMap.put(prl.Product2__c, toooMap.clone());
+ }
+ }
+
+ // 浜у搧鐨勪骇鍝佹敞鍐岃瘉鏄�"涓嶈"鐘舵�� 涓嶉渶瑕佸尮閰嶆敞鍐岃瘉 20181225
+ if (prl.Product2__r.SFDA_Approbated_Status__c == '涓嶈'
+
+ || prl.Product_Register__r.MedPrdClass__c == '1') {
+ proNotNeedList.add(prl.Product2__c);
+ }
+ }
+ system.debug('proBSMap +++++++' + proBSMap);
+ for (String qli : proMap.keySet()) {
+
+ String proId = qli;
+ String proName = proMap.get(proId);
+
+ if (proId != null) {
+ Boolean haveBS = false;
+
+ // 浜у搧灞炰簬闈炲尰鐤楋紝涓嶇敤鍒ゆ柇缁忚惀鑼冨洿
+ if (proNotNeedList.contains(proId)) {
+ haveBS = true;
+ continue;
+ }
+
+ if (proBSMap.get(proId) == null) {
+ error = true;
+ errormessage += '浜у搧"' + proName + '"娌℃湁鏈夋晥鐨勪骇鍝佹敞鍐岃瘉銆俓n';
+ retMap.put(proId, '1');
+ continue;
+ }
+
+
+ if (proBSMap.get(proId) != null) {
+ system.debug('111 +++++++' + proBSMap);
+ Map<String,String> midMap = new Map<String,String>();
+ midMap = proBSMap.get(proId);
+
+ for (String str : midMap.keySet()) {
+ // LHJ 20200711 Start
+ String strMidMap = midMap.get(str);
+ List<String> proRegList = new List<String>();
+ proRegList.addAll(strMidMap.split(';'));
+ // LHJ 20200711 End
+ for(String strReg:proRegList){
+ // 琚畾涔変负"6815A"鐨勪骇鍝佺被鍒�,缁忚惀鑼冨洿涓繀椤绘湁6815鎴栬��6815A澶栨墠鍙互鍖归厤銆�
+ if (strReg.length() == 6) {
+
+ for(String strAg:agListA){
+ if(strAg.length() >= 5 && midMap.get(str.substring(0, str.length() - 1)) == strAg.substring(0,5)){
+ proAllBSstrMap.get(proId).add(str.substring(0, str.length() - 1));
+ haveBS = true;
+ break;
+ }
+ }
+
+ /*if (agListA.contains(midMap.get(str.substring(0, str.length() - 1)))) {
+ proAllBSstrMap.get(proId).add(str.substring(0, str.length() - 1));
+ haveBS = true;
+ }*/
+ } else {
+ system.debug('agList +++++++' + agList);
+ system.debug('midMap +++++++' + strReg);
+
+ if (agList.contains(strReg)) {
+
+ //浜у搧绫诲埆,鍖归厤鍒扮粡閿�鍟嗙被鍒�
+ proAllBSstrMap.get(proId).add(str);
+ haveBS = true;
+ break;
+ }
+ }
+ }
+
+
+ }
+ }
+
+ if (!haveBS) {
+ error = true;
+ errormessage += '绗竴缁忛攢鍟嗙殑缁忚惀鑼冨洿涓笉鍖呭惈浜у搧" ' + proName + '"銆俓n';
+ retMap.put(proId, '2');
+ }
+ }
+ }
+ }
+
+ if (retMap.isEmpty() == false) {
+ //return errormessage;
+
+ } else {
+ if (OppId != '') {
+ // 鏇存柊鎵�鏈夋敞鍐岃瘉淇℃伅
+ String strRegister_alleffective;
+ List<Product2> pro2List = new List<Product2>();
+ Map<String, Product2> pro2Map = new Map<String, Product2>();
+ List<OpportunityLineItem> updList = new List<OpportunityLineItem>();
+ List<OpportunityLineItem> OppItemList = [select id, Id__c, Register_alleffective__c,PricebookEntry.Product2Id
+ From OpportunityLineItem
+ Where OpportunityId = :OppId];
+ // 闈炲尰鐤楁垨1绫讳骇鍝侊紝鍙栧緱
+ if (proNotNeedList != null && proNotNeedList.size() > 0) {
+ pro2List = [select id, SFDA_Approbated_Status__c, RegisterNo_ALL__c from Product2 where Id in :proNotNeedList];
+ }
+ for (Product2 pro2 : pro2List) {
+ pro2Map.put(pro2.Id, pro2);
+ }
+
+ for (OpportunityLineItem ol : OppItemList) {
+ if (proAllBSstrMap.containsKey(ol.PricebookEntry.Product2Id)) {
+ ol.Register_alleffective__c = '';
+ for(String str: proAllBSstrMap.get(ol.PricebookEntry.Product2Id)) {
+
+ if (String.isNotBlank(ol.Register_alleffective__c)) {
+ ol.Register_alleffective__c += ';' + str;
+ } else {
+ ol.Register_alleffective__c = str;
+ }
+ }
+ // 闈炲尰鐤楁垨1绫讳骇鍝�
+ if (pro2Map.containskey(ol.PricebookEntry.Product2Id)) {
+ if (pro2Map.get(ol.PricebookEntry.Product2Id).SFDA_Approbated_Status__c == '涓嶈') {
+ ol.Register_alleffective__c = 'FYL';
+ } else {
+ ol.Register_alleffective__c = pro2Map.get(ol.PricebookEntry.Product2Id).RegisterNo_ALL__c;
+ }
+ }
+ }
+ updList.add(ol);
+ }
+ if (updList.size() > 0) update updList;
+ }
+ }
+ //濡傛灉涓嶆弧瓒抽樋瑗胯禌澶氱殑鏉′欢锛岃繘鍏ヨ繖涓彉閲� 20200821 ljh
+ return retMap;
+ }
+ public class UpdateResult {
+ @AuraEnabled public String recordId {get;set;}
+ @AuraEnabled public Boolean success {get;set;}
+ @AuraEnabled public List<String> errors {get;set;}
+ }
+ public class InitData{
+
+
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/LexContractAuthorizeController.cls-meta.xml b/force-app/main/default/classes/LexContractAuthorizeController.cls-meta.xml
new file mode 100644
index 0000000..70f89f4
--- /dev/null
+++ b/force-app/main/default/classes/LexContractAuthorizeController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>51.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/LexSISearchSetProductController.cls b/force-app/main/default/classes/LexSISearchSetProductController.cls
index 36dd0d8..a4336f0 100644
--- a/force-app/main/default/classes/LexSISearchSetProductController.cls
+++ b/force-app/main/default/classes/LexSISearchSetProductController.cls
@@ -4,6 +4,7 @@
public LexSISearchSetProductController(){
}
+
@AuraEnabled
public static InitData init(){
InitData data=new InitData();
@@ -80,7 +81,7 @@
}else{
data.setPFString = data.setPFString+','+activities[i];
}
-
+
}
}
}
@@ -89,7 +90,7 @@
}catch(Exception e){
System.debug('SelectDone error:'+e);
}
-
+
return null;
}
@@ -149,7 +150,7 @@
@AuraEnabled
public String Name;
- @AuraEnabled
+ @AuraEnabled
public String Product_Set_CD_c;
@AuraEnabled
@@ -170,4 +171,4 @@
Valid_c = psl.Valid_Status__c;
}
}
-}
\ No newline at end of file
+}
diff --git a/force-app/main/default/classes/LexStockCancelController.cls b/force-app/main/default/classes/LexStockCancelController.cls
index f46f6f1..6040fcc 100644
--- a/force-app/main/default/classes/LexStockCancelController.cls
+++ b/force-app/main/default/classes/LexStockCancelController.cls
@@ -2,4 +2,64 @@
public LexStockCancelController() {
}
+ @AuraEnabled
+ public static Opportunity init(String recordId){
+ try{
+ Opportunity item=[select
+ Stock_cancel_reason__c,Whether_Upload_Question_Document__c
+ from Opportunity
+ where id = :recordId];
+ return item;
+
+ }catch(Exception e){
+ System.debug('LexStockCancelController init error: '+e.getMessage());
+ }
+ return null;
+ }
+
+ @AuraEnabled
+ public static UpdateResult updateOppotunity(
+ String recordId,
+ String stStatus
+ ) {
+ UpdateResult result = new UpdateResult();
+ result.recordId = recordId;
+ try{
+ Opportunity op=new Opportunity(id=recordId);
+ if(stStatus!=null&&stStatus!=''){
+ op.Stock_apply_status__c= stStatus;
+ }
+ update op;
+ result.success = true;
+ result.errors = new List<String>();
+ return result;
+ }catch(Exception e){
+ result.success = false;
+ result.errors = new List<String>();
+ result.errors.add(e.getMessage());
+ System.debug(LoggingLevel.INFO,'updateOppotunity Error : ' + e);
+ }
+ return result;
+ }
+ @AuraEnabled
+ public static String submitApprovalRequest(String recordId) {
+ try{
+ Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
+ req.setObjectId(recordId);
+ Approval.ProcessResult result = Approval.process(req);
+ if(result!=null&&result.getErrors()!=null&&result.getErrors().size()>0) return result.getErrors().get(0).getMessage();
+ }catch(Exception e){
+ System.debug('LexStockCancelController submitApprovalRequest error: '+e.getMessage());
+ return e.getMessage();
+ }
+ return null;
+ }
+ public class UpdateResult {
+ @AuraEnabled public String recordId {get;set;}
+ @AuraEnabled public Boolean success {get;set;}
+ @AuraEnabled public List<String> errors {get;set;}
+ }
+ public class InitData{
+
+ }
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/PAEDecisionRecordController.cls b/force-app/main/default/classes/PAEDecisionRecordController.cls
index bbbe490..d77fbf0 100644
--- a/force-app/main/default/classes/PAEDecisionRecordController.cls
+++ b/force-app/main/default/classes/PAEDecisionRecordController.cls
@@ -15,6 +15,7 @@
get;
set;
}
+ public Integer pageLimit{get;set;}
public String ASac_ASrc;
public String RepairId {
get;
@@ -128,6 +129,7 @@
RecordTypeName = ApexPages.currentPage().getParameters().get('RecordTypeIds');
productIdx = '';
updateIsPaeMap = false;
+ pageLimit = Integer.valueOf(System.Label.mpddetPageLimitsize);//绯荤粺鏍囩
}
public void init() {
editAble = true;
diff --git a/force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.css b/force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.css
new file mode 100644
index 0000000..af18c76
--- /dev/null
+++ b/force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.css
@@ -0,0 +1,11 @@
+.Holder{
+ position: relative;
+ display: inline-block;
+ width: 80px;
+ height: 80px;
+ text-align: center;
+}
+
+.container .uiContainerManager{
+ display : none !important;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.html b/force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.html
new file mode 100644
index 0000000..bf9cadc
--- /dev/null
+++ b/force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="Holder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.js b/force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.js
new file mode 100644
index 0000000..52329fc
--- /dev/null
+++ b/force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.js
@@ -0,0 +1,264 @@
+import { LightningElement,api, track, wire } from 'lwc';
+
+import {CurrentPageReference} from 'lightning/navigation';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import LightningConfirm from 'lightning/confirm';
+import customJSFile from '@salesforce/resourceUrl/CommonUtilJs';
+import { loadScript } from 'lightning/platformResourceLoader';
+import init from '@salesforce/apex/LexContractAuthorizeController.init';
+import getProfileId from '@salesforce/apex/LexContractAuthorizeController.getProfileId';
+import judgeIsAssistantAppliedOutTime from '@salesforce/apex/LexContractAuthorizeController.judgeIsAssistantAppliedOutTime';
+import searchOpportunity from '@salesforce/apex/LexContractAuthorizeController.searchOpportunity';
+import checkDangerItem from '@salesforce/apex/LexContractAuthorizeController.checkDangerItem';
+import oppCheck from '@salesforce/apex/LexContractAuthorizeController.oppCheck';
+import updReg from '@salesforce/apex/LexContractAuthorizeController.updReg';
+import updateOppotunity from '@salesforce/apex/LexContractAuthorizeController.updateOppotunity';
+
+export default class lexContractAuthorize extends LightningElement {
+
+
+ @api recordId;
+ IsLoading=true;
+ data;
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference){
+ console.log("杩涘叆椤甸潰");
+ console.log(currentPageReference);
+ if(currentPageReference){
+ const urvalue=currentPageReference.state.recordId;
+ if(urvalue){
+ let str=`${urvalue}`;
+ console.log('str');
+ console.log(str);
+ this.recordId=str;
+ }
+ }
+ }
+
+
+
+ connectedCallback(){
+ console.log(this.recordId);
+ init({recordId:this.recordId}).then(result=>{
+ console.log(result);
+ if(result!=null){
+ this.data=result;
+ this.cancelSubmit().then(res=>{
+ this.IsLoading=false;
+ this.dispatchEvent(new CloseActionScreenEvent());
+ });
+ }
+ }).catch(err=>{
+ console.log("error:");
+ console.log(err.message);
+ }).finally(()=>{
+
+ });
+ }
+
+
+
+ async cancelSubmit(){
+
+ let oppid = this.data.Id;
+ let decide_quote = this.data.Estimation_Decision__c;
+ let complete_day = this.data.Contract_DB_complite_day__c;
+ let if_contract_auth = this.data.Contract_Authorize__c;
+ let if_contract_lock = this.data.Contract_Authorize_Lock__c;
+ let If_Need_Authorize = this.data.If_Need_Authorize__c;
+ let Authorized_DB_No =this.data.Authorized_DB_No__c;
+ let profileId = await getProfileId({});
+ let spoURL = this.data.SPO_URL__c;
+ //SWAG-CG88AG銆愬鎵樸�戞彁鍑轰环鏍肩敵璇锋槸鍦ㄥ崗璁湁鏁堟湡鍐咃紝鍏佽WIN fy start
+ let DecidedQuoteNo = this.data.Estimation_No__c;
+ //SWAG-CG88AG銆愬鎵樸�戞彁鍑轰环鏍肩敵璇锋槸鍦ㄥ崗璁湁鏁堟湡鍐咃紝鍏佽WIN fy end
+ //2022-03-22 yjk SWAG-CCL6R7
+ let Closing_Bid_Date = this.data.Closing_Bid_Date__c;//13.涓爣鏃�
+ let Closing_Bid_Date_Bid = this.data.Closing_Bid_Date_Bid__c;
+
+ if (profileId != '00e10000000Y3o5' && profileId != '00e10000000Nab7' &&
+ profileId != '00e10000000xnpR' && profileId != '00e10000000xyK6' && profileId != '00e10000000xnpW' && profileId != '00e10000000NbCE' && profileId != '00e10000000Nb7i'
+ && profileId != '00e10000000xyK6') {
+
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"鎮ㄦ病鏈夊悎鍚岀敵璇风殑鏉冮檺銆傝鑱旂郴绯荤粺绠$悊鍛樸��"
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ if(!Closing_Bid_Date){
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"璇峰~鍐�13.涓爣鏃ャ��"
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+
+ if (decide_quote != '1') {
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'璇峰厛鍐冲畾鎶ヤ环銆�'
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ //SWAG-CG88AG銆愬鎵樸�戞彁鍑轰环鏍肩敵璇锋槸鍦ㄥ崗璁湁鏁堟湡鍐咃紝鍏佽WIN fy start
+ if (DecidedQuoteNo !="") {
+ let judg=await judgeIsAssistantAppliedOutTime({Quoteid:DecidedQuoteNo});
+ // alert('judg寰楀�硷細'+judg);
+ // return;
+ if(judg == 'false'){
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'缁忛攢鍟嗗崗璁凡杩囨湡锛岃閲嶆柊鍋氭姤浠疯绠椼��'
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ }
+ //SWAG-CG88AG銆愬鎵樸�戞彁鍑轰环鏍肩敵璇锋槸鍦ㄥ崗璁湁鏁堟湡鍐咃紝鍏佽WIN fy end
+ // 20221009 ljh SWAG-CK29AJ start
+ let ClosingBidDate =this.data.Closing_Bid_Date__c;
+ let BidDate = this.data.Bid_Date__c;
+ if( ClosingBidDate < BidDate){
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'13.涓爣鏃ヤ笉鑳芥棭浜�12.鎷涙爣鏃�'
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ // 20221009 ljh SWAG-CK29AJ end
+
+ if(If_Need_Authorize == '1' && (Authorized_DB_No == null || Authorized_DB_No == '')){
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'璇峰厛鍋氭巿鏉冪敵璇枫��'
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+
+ if (this.data.Cnt_Lost_cancel_Draft__c > 0) {
+ if(!confirm('璇环鏈夎崏妗堜腑鐨勫彇娑�/澶卞崟鎶ュ憡锛屾槸鍚︾户缁紵')){
+ return ;
+ }
+ } else if (this.data.Cnt_Lost_cancel_report__c - this.data.Cnt_Lost_cancel_Draft__c > 0) {
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'璇环鏈夊凡鎻愪氦鐨勫彇娑�/澶卞崟鎶ュ憡銆�'
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+
+ console.log("11");
+
+ // 2022-03-31 鏂拌储骞翠环鏍艰皟鏁� start
+ let decide_date = this.data.DecideQuoteDate__c;
+ let before = new Date("2022-4-1");
+ if (decide_date != null && decide_date < before) {
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'鎶ヤ环鍙樻洿锛岃閲嶆柊鍋欴ecide銆�'
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ // 2022-03-31 鏂拌储骞翠环鏍艰皟鏁� end
+ let sqlResult = await searchOpportunity({oppid:oppid});
+ let records = sqlResult;
+ console.log(records);
+ if ((complete_day != null && complete_day != '') && records.Contract_Authorize_Lock__c== 'true') {
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'鍚堝悓鐢宠宸茬粡瀹屾垚锛岃涓嶈閲嶅鎻愪氦銆�'
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ // if ('{!Opportunity.AcecideCntCheck__c}' != '1') {
+ // alert('闃胯タ璧涘璇环鍙兘鍖呭惈鍗卞寲鍝侊紝鎴栬�咃紝鏅�氳浠蜂笉鑳藉寘鍚嵄鍖栧搧銆�');
+ // return;
+ // }
+ console.log("111");
+ if ((complete_day == null || complete_day == '') && records.Contract_Authorize_Lock__c== 'true') {
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'鍚堝悓姝e湪鐢宠涓紝璇蜂笉瑕侀噸澶嶆彁浜ゃ��'
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+
+ if (this.data.IF_Submit__c == '1') {
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'涓婁紶澶辫触锛岃鑱旂郴绯荤粺绠$悊鍛�!'
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ console.log("111");
+ let angency = this.data.Agency1__c;
+ if(this.data.Trade__c == '澶栬部' || this.data.Sales_Root__c == 'OCM鐩存帴璨╁2'){
+ let rtn = await updReg({oppid:oppid});
+ } else {
+ if(this.data.Is_Corrosion__c == '1'){
+ let rtn1 = await checkDangerItem({agency1:angency});
+ if (rtn1 != 'OK') {
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:rtn1
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ }else{
+ let rtn = await oppCheck({oppid:oppid, saveFlg:'1'});
+ if (rtn != 'OK') {
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:rtn
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ }
+ }
+ console.log("222");
+
+ let flag=false;
+ await updateOppotunity({recordId:this.recordId}).then(res=>{
+ console.log(res);
+ if(res!=null&&res.success==false){
+ let messages ="";
+ flag=true;
+ messages=res.errors[0];
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"鎿嶄綔澶辫触,鎻愮ず淇℃伅:"+messages,
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ });
+ if(flag)return;
+ console.log("333");
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'鎻愪氦鎴愬姛锛佽鍦⊿PO绯荤粺涓畬鎴愬悎鍚岀敵璇枫��'
+ });
+ this.dispatchEvent(event);
+ //window.location.reload();
+ window.open(spoURL);
+ }
+
+
+
+
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.js-meta.xml b/force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.js-meta.xml
new file mode 100644
index 0000000..93e66fc
--- /dev/null
+++ b/force-app/main/default/lwc/lexContractAuthorize/lexContractAuthorize.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexContractAuthorize">
+ <apiVersion>51.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__RecordPage</target>
+ <target>lightning__AppPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexStockCancel/lexStockCancel.html b/force-app/main/default/lwc/lexStockCancel/lexStockCancel.html
index 960b41d..bf9cadc 100644
--- a/force-app/main/default/lwc/lexStockCancel/lexStockCancel.html
+++ b/force-app/main/default/lwc/lexStockCancel/lexStockCancel.html
@@ -1,5 +1,5 @@
<template>
- <div class="Holder" if:true={IsLoading}>
- <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
- </div>
+ <div class="Holder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexStockCancel/lexStockCancel.js b/force-app/main/default/lwc/lexStockCancel/lexStockCancel.js
index 608b776..35fd9b7 100644
--- a/force-app/main/default/lwc/lexStockCancel/lexStockCancel.js
+++ b/force-app/main/default/lwc/lexStockCancel/lexStockCancel.js
@@ -1,13 +1,15 @@
import { LightningElement,api, track, wire } from 'lwc';
-// {!RequireScript("/resource/CommonUtilJs")}
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
-import LightningConfirm from 'lightning/confirm';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import LightningConfirm from 'lightning/confirm';
+import init from '@salesforce/apex/LexStockCancelController.init';
+import updateOppotunity from '@salesforce/apex/LexStockCancelController.updateOppotunity';
+import submitApprovalRequest from '@salesforce/apex/LexStockCancelController.submitApprovalRequest';
export default class lexStockCancel extends LightningElement {
-
@api recordId;
- IsLoading=true
+ IsLoading=true;
+ data;
@wire(CurrentPageReference)
getStateParameters(currentPageReference){
console.log("杩涘叆椤甸潰");
@@ -24,89 +26,134 @@
}
- async connectedCallback(){
+
+ connectedCallback(){
console.log(this.recordId);
- await init({recordId:this.recordId}).then(result=>{
+ init({recordId:this.recordId}).then(result=>{
console.log(result);
if(result!=null){
-
- this.sumit().then(res=>{
- console.log("鍏抽棴绐楀彛");
+ this.data=result;
+ this.cancelSubmit().then(res=>{
this.IsLoading=false;
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(err=>{
- console.log("error:");
- console.log(err.message);
- const event = new ShowToastEvent({
- title: '鎻愮ず淇℃伅',
- message:"鎿嶄綔澶辫触,鎻愮ず淇℃伅:"+err.message,
- });
- this.dispatchEvent(event);
- //alert("鎿嶄綔澶辫触,鎻愮ず淇℃伅:"+err.message);
- });
- console.log("end");
+ });
}
}).catch(err=>{
console.log("error:");
console.log(err.message);
- console.log("鎶ラ敊缁撴潫");
}).finally(()=>{
- console.log("finally");
-
+
});
+ }
+
+
+
+ async cancelSubmit(){
+ let reason = this.data.Stock_cancel_reason__c;
+ if (reason == null || reason == '') {
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:'蹇呴』濉啓鎾ら攢澶囪揣鐞嗙敱銆�'
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+
+ // CHAN-BCS8T5 LHJ 20190604 Start
+ let stage = this.data.Whether_Upload_Question_Document__c;
+ if (stage == '0') {
+ const event = new ShowToastEvent({
+ title: "鎻愮ず淇℃伅",
+ message:'璇蜂笂浼犺川鐤戝嚱銆�'
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ // CHAN-BCS8T5 LHJ 20190604 End
+ const resul = await LightningConfirm.open({
+ message: "涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵",
+ variant: 'headerless',
+ label: '鎻愮ず淇℃伅',
+ // setting theme would have no effect
+ });
+ if (resul==false) {
+ return;
+ }
+ let flag=true;
+ await updateOppotunity({recordId:this.recordId,stStatus:"鎾ら攢濉啓瀹屾瘯"}).then(res=>{
+ console.log(res);
+ if(res!=null&&res.success==false){
+ let messages ="";
+ flag=false;
+ messages=res.errors[0];
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"鎿嶄綔澶辫触,鎻愮ず淇℃伅:"+messages
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ })
+ if(flag==false)return;
+
+ // let rac = new sforce.SObject("Opportunity");
+ // rac.Id = "{!Opportunity.Id}";
+ // rac.Stock_apply_status__c = "鎾ら攢濉啓瀹屾瘯";
+ // let result = sforce.connection.update([rac]);
+ // let messages = getConnectDMLErrorMessages(result);
+ // if (messages.length > 0) {
+ // alert(messages.join("\n"));
+ // return;
+ // }
+ let ress;
+ await submitApprovalRequest({recordId:this.recordId}).then(res=>{
+ console.log(res);
+ ress=res;
+ })
+ console.log("777");
+ if (ress != null) {
+ // let back = new window.sforce.SObject("Opportunity");
+ // back.Id = "{!Opportunity.Id}";
+ // back.Stock_apply_status__c = "鎵瑰噯";
+ // let backResult = sforce.connection.update([back]);
+ // backMessages = getConnectDMLErrorMessages(backResult);
+ // if (backMessages.length > 0) {
+ // showTost("鎻愮ず淇℃伅",backMessages.join("\n"));
+ // return;
+ // }
+
+ // let errmsg = processResults[0].errors.message.toString();
+ // showTost("鎻愮ず淇℃伅",errmsg);
+
+ await updateOppotunity({recordId:this.recordId,stStatus: "鎵瑰噯"}).then(res=>{
+ console.log(res);
+ if(res!=null&&res.success==false){
+ let messages ="";
+ flag=false;
+ messages=res.errors[0];
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:"鎿嶄綔澶辫触,鎻愮ず淇℃伅:"+messages,
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ });
+ if(flag==false)return;
+ const event = new ShowToastEvent({
+ title: '鎻愮ず淇℃伅',
+ message:ress
+ });
+ this.dispatchEvent(event);
+ return;
+ }
+ // window.location.reload();
+ };
+
+
+ showTost(title,message){
}
-
- async sumit(){
-
- // var reason = '{!Opportunity.Stock_cancel_reason__c}';
- // if (reason == null || reason == '') {
- // alert('蹇呴』濉啓鎾ら攢澶囪揣鐞嗙敱銆�');
- // return
- // }
-
- // // CHAN-BCS8T5 LHJ 20190604 Start
- // var stage = '{!Opportunity.Whether_Upload_Question_Document__c}';
- // if (stage == '0') {
- // alert('璇蜂笂浼犺川鐤戝嚱銆�');
- // return;
- // }
- // // CHAN-BCS8T5 LHJ 20190604 End
-
- // if (!confirm("涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵")) {
- // return;
- // }
-
- // var rac = new sforce.SObject("Opportunity");
- // rac.Id = "{!Opportunity.Id}";
- // rac.Stock_apply_status__c = "鎾ら攢濉啓瀹屾瘯";
- // var result = sforce.connection.update([rac]);
- // var messages = getConnectDMLErrorMessages(result);
- // if (messages.length > 0) {
- // alert(messages.join("\n"));
- // return;
- // }
-
- // var request = new sforce.ProcessSubmitRequest();
- // request.objectId = "{!Opportunity.Id}";
- // var processResults = sforce.connection.process([request]);
- // if (processResults[0].errors != null) {
- // var back = new sforce.SObject("Opportunity");
- // back.Id = "{!Opportunity.Id}";
- // back.Stock_apply_status__c = "鎵瑰噯";
- // var backResult = sforce.connection.update([back]);
- // backMessages = getConnectDMLErrorMessages(backResult);
- // if (backMessages.length > 0) {
- // alert(backMessages.join("\n"));
- // return;
- // }
-
- // var errmsg = processResults[0].errors.message.toString();
- // alert(errmsg);
- // return;
- // }
- // window.location.reload();
- // };
- }
+
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexStockCancel/lexStockCancel.js-meta.xml b/force-app/main/default/lwc/lexStockCancel/lexStockCancel.js-meta.xml
index c8794f9..e1c0fef 100644
--- a/force-app/main/default/lwc/lexStockCancel/lexStockCancel.js-meta.xml
+++ b/force-app/main/default/lwc/lexStockCancel/lexStockCancel.js-meta.xml
@@ -2,10 +2,10 @@
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexStockCancel">
<apiVersion>51.0</apiVersion>
<isExposed>true</isExposed>
- <targets>
- <target>lightning__AppPage</target>
- <target>lightning__RecordPage</target>
- <target>lightning__HomePage</target>
- <target>lightning__RecordAction</target>
- </targets>
+ <targets>
+ <target>lightning__RecordPage</target>
+ <target>lightning__AppPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/pages/AccessoryAdd.page b/force-app/main/default/pages/AccessoryAdd.page
index cfe06ea..c183632 100644
--- a/force-app/main/default/pages/AccessoryAdd.page
+++ b/force-app/main/default/pages/AccessoryAdd.page
@@ -1,83 +1,95 @@
-<apex:page controller="AccessoryAddController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true">
-<head>
-<title>闄勫睘鍝佽拷鍔�</title>
-<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
-<apex:stylesheet value="{!URLFOR($Resource.AccessoryAddCss)}"/>
-<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
-<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
-<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
-
-<script type="text/javascript">
-var heightAjustment = 120;
-var widthAjustment = 30;
-
-</script>
-</head>
- <apex:form id="allForm">
- <apex:outputPanel id="pageallPanel">
- <apex:pageBlock id="searchBlock" tabStyle="Report">
- <apex:pageBlockSection title="闄勫睘鍝佽拷鍔�">
- <apex:outputField value="{!parentObj.Rental_Apply__r.Name}"/>
- <apex:outputField value="{!parentObj.Rental_Apply__r.Demo_purpose1__c}"/>
- <apex:outputField value="{!parentObj.Rental_Apply__r.Owner.Name}"/>
- <apex:outputField value="{!parentObj.Rental_Apply__r.demo_purpose2__c}"/>
- <apex:outputField value="{!parentObj.Rental_Apply__r.Salesdept__c}"/>
- <apex:outputField value="{!parentObj.Rental_Apply__r.Product_category__c}"/>
- <apex:outputField value="{!parentObj.Rental_Apply__r.WorkPlace__c}"/>
- <apex:outputField value="{!parentObj.Rental_Apply__r.Equipment_Type_F__c}"/>
- <apex:outputField value="{!parentObj.Rental_Apply__r.Internal_asset_location_F__c}" />
- <apex:outputText />
- <apex:outputField value="{!parentObj.Rental_Apply__r.Request_shipping_day__c}"/>
- <apex:outputField value="{!parentObj.Rental_Apply__r.Request_return_day__c}"/>
- <apex:outputField value="{!parentObj.Fixture_Set__r.Fixture_Set_Body_Model_No__c}"/>
- <apex:outputField value="{!parentObj.Irreplaceable_flag__c}"/>
- <apex:outputField value="{!parentObj.Fu_Shu_Pin_Fen_Pei_Jia__c}"/>
- <apex:outputText />
- <apex:outputField value="{!parentObj.Rental_Start_Date__c}"/>
- <apex:outputField value="{!parentObj.Rental_End_Date__c}"/>
-
- <apex:pageBlockSectionItem >
- <apex:outputPanel >
- <apex:outputText value="鍏抽敭瀛�" style="width:50px"/>
- <apex:inputText value="{!keyword}" style="width:200px;margin-left: 50px;"/>
+<!-- <apex:page controller="AccessoryAddController" showHeader="false" sidebar="false" id="allPage" action="{!init}"> -->
+ <apex:page controller="AccessoryAddController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets = "true">
+ <head>
+ <title>闄勫睘鍝佽拷鍔�</title>
+ <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+ <apex:stylesheet value="{!URLFOR($Resource.AccessoryAddCss)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
+
+ <!-- 20230426 zq add style -->
+ <style>
+ body .bPageBlock .detailList .labelCol {
+ width: auto;
+ }
+ body input.btn {
+ padding: 2px 3px;
+ margin-left: 55px;
+ }
+ </style>
+ <script type="text/javascript">
+ var heightAjustment = 120;
+ var widthAjustment = 30;
+
+ </script>
+ </head>
+ <apex:form id="allForm">
+ <apex:outputPanel id="pageallPanel">
+ <apex:pageBlock id="searchBlock" tabStyle="Report">
+ <apex:pageBlockSection title="闄勫睘鍝佽拷鍔�">
+ <apex:outputField value="{!parentObj.Rental_Apply__r.Name}"/>
+ <apex:outputField value="{!parentObj.Rental_Apply__r.Demo_purpose1__c}"/>
+ <apex:outputField value="{!parentObj.Rental_Apply__r.Owner.Name}"/>
+ <apex:outputField value="{!parentObj.Rental_Apply__r.demo_purpose2__c}"/>
+ <apex:outputField value="{!parentObj.Rental_Apply__r.Salesdept__c}"/>
+ <apex:outputField value="{!parentObj.Rental_Apply__r.Product_category__c}"/>
+ <apex:outputField value="{!parentObj.Rental_Apply__r.WorkPlace__c}"/>
+ <apex:outputField value="{!parentObj.Rental_Apply__r.Equipment_Type_F__c}"/>
+ <apex:outputField value="{!parentObj.Rental_Apply__r.Internal_asset_location_F__c}" />
+ <apex:outputText />
+ <apex:outputField value="{!parentObj.Rental_Apply__r.Request_shipping_day__c}"/>
+ <apex:outputField value="{!parentObj.Rental_Apply__r.Request_return_day__c}"/>
+ <apex:outputField value="{!parentObj.Fixture_Set__r.Fixture_Set_Body_Model_No__c}"/>
+ <apex:outputField value="{!parentObj.Irreplaceable_flag__c}"/>
+ <apex:outputField value="{!parentObj.Fu_Shu_Pin_Fen_Pei_Jia__c}"/>
+ <apex:outputText />
+ <apex:outputField value="{!parentObj.Rental_Start_Date__c}"/>
+ <apex:outputField value="{!parentObj.Rental_End_Date__c}"/>
+
+ <apex:pageBlockSectionItem >
+ <apex:outputPanel >
+ <apex:outputText value="鍏抽敭瀛�" style="width:50px"/>
+ <apex:inputText value="{!keyword}" style="width:200px;margin-left: 50px;"/>
+ </apex:outputPanel>
+ <apex:commandButton value="妫�绱�" action="{!searchOpp}" onclick="blockme();" rerender="allForm" oncomplete="unblockUI();" />
+ </apex:pageBlockSectionItem>
+ </apex:pageBlockSection>
+ <table>
+ <tr>
+ <td width="20px"/>
+ <!--20230426 zq <td width="200px"> -->
+ <td width="220px">
+ <apex:outputLabel for="bieCunFangDi" value="澶囧搧瀛樻斁鍦�" />
+ <!-- <apex:outputText value="{!bieCunFangDi}"/> -->
+ <apex:selectList value="{!bieCunFangDi}" size="1" style="margin-left: 20px; width:110px" id="bieCunFangDi">
+ <apex:selectOptions value="{!bieCunFangDiOps}"/>
+ <!-- #OLY_OCM-659 澶囧搧瀛樻斁鍦� 閫夐」鍙樺寲鏃讹紝鏈儴 閫夐」鍊奸殢涔嬪彂鐢熷彉鍖� -->
+ <apex:actionSupport event="onchange" reRender="bieBenBu"/>
+ </apex:selectList>
+ </td>
+ <td width="10px"></td>
+ <!-- #OLY_OCM-654 鍥犱负MA鏈儴鍜屼骇鍝佸煿璁湰閮ㄨ繕鏄渶瑕佹绱㈡潯浠�,鎵�浠ラ渶瑕佸埆鏈儴鐨勬绱㈡潯浠� Start -->
+ <td width="180px">
+ <apex:outputLabel for="bieBenBu" value="鏈儴" />
+ <apex:selectList value="{!bieBenBu}" size="1" style="margin-left: 20px; width:110px" id="bieBenBu">
+ <apex:selectOptions value="{!bieBenBuOps}"/>
+ </apex:selectList>
+ </td>
+ <!-- #OLY_OCM-654 鍥犱负MA鏈儴鍜屼骇鍝佸煿璁湰閮ㄨ繕鏄渶瑕佹绱㈡潯浠�,鎵�浠ラ渶瑕佸埆鏈儴鐨勬绱㈡潯浠� End -->
+ </tr>
+ </table>
+ <apex:pageBlockButtons location="bottom">
+ <apex:commandButton style="float:left;" action="{!save}" onclick="blockme();" value="淇濆瓨" rerender="allForm" oncomplete="unblockUI();" />
+ <apex:commandButton style="float:right;" action="{!cancel}" value="杩斿洖" rerender="allForm"/>
+ </apex:pageBlockButtons>
+ <div style="clear:both;"></div>
+
+ <apex:outputPanel id="message">
+ <apex:pageMessages />
</apex:outputPanel>
- <apex:commandButton value="妫�绱�" action="{!searchOpp}" onclick="blockme();" rerender="allForm" oncomplete="unblockUI();" />
- </apex:pageBlockSectionItem>
- </apex:pageBlockSection>
- <table>
- <tr>
- <td width="20px"/>
- <td width="200px">
- <apex:outputLabel for="bieCunFangDi" value="澶囧搧瀛樻斁鍦�" />
- <!-- <apex:outputText value="{!bieCunFangDi}"/> -->
- <apex:selectList value="{!bieCunFangDi}" size="1" style="margin-left: 20px; width:110px" id="bieCunFangDi">
- <apex:selectOptions value="{!bieCunFangDiOps}"/>
- <!-- #OLY_OCM-659 澶囧搧瀛樻斁鍦� 閫夐」鍙樺寲鏃讹紝鏈儴 閫夐」鍊奸殢涔嬪彂鐢熷彉鍖� -->
- <apex:actionSupport event="onchange" reRender="bieBenBu"/>
- </apex:selectList>
- </td>
- <td width="10px"></td>
- <!-- #OLY_OCM-654 鍥犱负MA鏈儴鍜屼骇鍝佸煿璁湰閮ㄨ繕鏄渶瑕佹绱㈡潯浠�,鎵�浠ラ渶瑕佸埆鏈儴鐨勬绱㈡潯浠� Start -->
- <td width="180px">
- <apex:outputLabel for="bieBenBu" value="鏈儴" />
- <apex:selectList value="{!bieBenBu}" size="1" style="margin-left: 20px; width:110px" id="bieBenBu">
- <apex:selectOptions value="{!bieBenBuOps}"/>
- </apex:selectList>
- </td>
- <!-- #OLY_OCM-654 鍥犱负MA鏈儴鍜屼骇鍝佸煿璁湰閮ㄨ繕鏄渶瑕佹绱㈡潯浠�,鎵�浠ラ渶瑕佸埆鏈儴鐨勬绱㈡潯浠� End -->
- </tr>
- </table>
- <apex:pageBlockButtons location="bottom">
- <apex:commandButton style="float:left;" action="{!save}" onclick="blockme();" value="淇濆瓨" rerender="allForm" oncomplete="unblockUI();" />
- <apex:commandButton style="float:right;" action="{!cancel}" value="杩斿洖" rerender="allForm"/>
- </apex:pageBlockButtons>
- <div style="clear:both;"></div>
-
- <apex:outputPanel id="message">
- <apex:pageMessages />
+ </apex:pageBlock>
+ <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true" isRadio="true" />
</apex:outputPanel>
- </apex:pageBlock>
- <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true" isRadio="true" />
- </apex:outputPanel>
- </apex:form>
-</apex:page>
\ No newline at end of file
+ </apex:form>
+ </apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/ConsumApplySplit.page b/force-app/main/default/pages/ConsumApplySplit.page
index d6efa2c..2fe738a 100644
--- a/force-app/main/default/pages/ConsumApplySplit.page
+++ b/force-app/main/default/pages/ConsumApplySplit.page
@@ -1,4 +1,5 @@
-<apex:page controller="ConsumApplySplitController" action="{!init}" showHeader="false">
+<!--20230427 zq <apex:page controller="ConsumApplySplitController" action="{!init}" showHeader="false"> -->
+ <apex:page lightningStylesheets = "true" controller="ConsumApplySplitController" action="{!init}" showHeader="false">
<head>
<title>澶囧搧鍊熷嚭鐢宠鍒嗗崟</title>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
diff --git a/force-app/main/default/pages/ConsumAssignCancel.page b/force-app/main/default/pages/ConsumAssignCancel.page
index d3c9313..95e1d18 100644
--- a/force-app/main/default/pages/ConsumAssignCancel.page
+++ b/force-app/main/default/pages/ConsumAssignCancel.page
@@ -1,97 +1,98 @@
-<apex:page controller="ConsumAssignCancelController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
-<head>
- <title>鑰楁潗鍙栨秷鏄庣粏鐢宠</title>
- <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
- <apex:stylesheet value="{!URLFOR($Resource.AccessorySelectCss)}"/>
- <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
- <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
-</head>
-<script type="text/javascript">
- // 绶ㄩ泦銉併偋銉冦偗
- function setChangeFlg(lineno) {
- // with checkbox
- if(document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck') !=null){
-
- var nowChk = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked;
- var oldChk = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowOldCheck').checked;
- console.log(nowChk,oldChk);
- if (nowChk || (nowChk != oldChk)) {
- document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:' + lineno + ':changeFlg').value = 1;
- // reset orderNo
- document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowOldCheck').checked = nowChk;
- resetOrderNo();
- }
- if (nowChk == false && nowChk == oldChk) {
- document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked = true;
- document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowOldCheck').checked = true;
- }
- }else{
- document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked = true;
- document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:' + lineno + ':changeFlg').value = 1;
- }
- }
- function applyJs() {
- var cnt = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:currentPageRecordCnt').value;
- var Cancel_Reason = j$(escapeVfId('allPage:allForm:searchBlock:Cancel_Reason')).value();
- var cancel_count = j$(escapeVfId('allPage:allForm:searchBlock:VF_Cancel_Detail_Count')).value();
- var cancel_comment = j$(escapeVfId('allPage:allForm:searchBlock:Loaner_cancel_Remarks')).value();
- var cancel_Reasons = [];
- j$("td.dataCellBorder1.col_Cancel_Reason__c").each(function () {
- cancel_Reasons.push(j$(this))
- });
- var cancel_counts = [];
- j$("td.dataCellBorder1.col_VF_Cancel_Detail_Count__c").each(function () {
- cancel_counts.push(j$(this))
- });
- var cancel_comments = [];
- j$("td.dataCellBorder1.col_Loaner_cancel_Remarks__c").each(function () {
- cancel_comments.push(j$(this))
- });
- for (var i = 0; i < cnt; i++) {
- var lock = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + i + ':rowCheck'));
- if(lock.prop('checked') == true){
- if(Cancel_Reason !== ""){
- cancel_Reasons[i].find("Select").val(Cancel_Reason);
- }
- if(cancel_count !== ""){
- cancel_counts[i].find("input").val(cancel_count);
- }
- if(cancel_comment!==""){
- cancel_comments[i].find("input").val(cancel_comment);
+<!--20230427 zq <apex:page controller="ConsumAssignCancelController" showHeader="false" sidebar="false" id="allPage" action="{!init}"> -->
+ <apex:page lightningStylesheets = "true" controller="ConsumAssignCancelController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
+ <head>
+ <title>鑰楁潗鍙栨秷鏄庣粏鐢宠</title>
+ <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+ <apex:stylesheet value="{!URLFOR($Resource.AccessorySelectCss)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
+ </head>
+ <script type="text/javascript">
+ // 绶ㄩ泦銉併偋銉冦偗
+ function setChangeFlg(lineno) {
+ // with checkbox
+ if(document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck') !=null){
+
+ var nowChk = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked;
+ var oldChk = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowOldCheck').checked;
+ console.log(nowChk,oldChk);
+ if (nowChk || (nowChk != oldChk)) {
+ document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:' + lineno + ':changeFlg').value = 1;
+ // reset orderNo
+ document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowOldCheck').checked = nowChk;
+ resetOrderNo();
+ }
+ if (nowChk == false && nowChk == oldChk) {
+ document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked = true;
+ document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowOldCheck').checked = true;
+ }
+ }else{
+ document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked = true;
+ document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:' + lineno + ':changeFlg').value = 1;
}
}
- }
- }
-</script>
- <apex:form id="allForm">
- <apex:outputPanel id="pageallPanel">
- <apex:pageBlock id="searchBlock" tabStyle="Report">
- <apex:pageBlockSection title="鍙栨秷鏄庣粏鐢宠">
- <apex:outputField value="{!parentObj.Name}"/>
- <apex:outputField value="{!parentObj.Person_In_Charge__c}"/>
- <apex:outputField value="{!parentObj.Salesdept__c}"/>
- <apex:outputField value="{!parentObj.WorkPlace__c}"/>
- <apex:outputField value="{!parentObj.Internal_asset_location_F__c}"/>
- <apex:outputField value="{!parentObj.demo_purpose2__c}"/>
- <apex:outputField value="{!parentObj.Request_shipping_day__c}"/>
- <apex:outputField value="{!parentObj.Asset_loaner_start_date__c}"/>
- </apex:pageBlockSection>
- <apex:outputPanel >
- <apex:outputLabel value="{!SUBSTITUTE($ObjectType.Consum_Apply_Equipment_Set__c.fields.VF_Cancel_Detail_Count__c.label,'(Sys)','')}" for="VF_Cancel_Detail_Count"/>
- <apex:inputField style="margin-left: 5px;" value="{!pageCaes.VF_Cancel_Detail_Count__c}" id="VF_Cancel_Detail_Count"/>
- <apex:outputLabel style="margin-left: 30px;" value="{!$ObjectType.Consum_Apply_Equipment_Set__c.fields.Cancel_Reason__c.label}" for="Cancel_Reason"/>
- <apex:inputField style="margin-left: 5px;" value="{!pageCaes.Cancel_Reason__c}" id="Cancel_Reason"/>
- <apex:outputLabel style="margin-left: 30px;" value="{!$ObjectType.Consum_Apply_Equipment_Set__c.fields.Loaner_cancel_Remarks__c.label}" for="VF_Cancel_Detail_Count"/>
- <apex:inputField style="margin-left: 5px;" value="{!pageCaes.Loaner_cancel_Remarks__c}" id="Loaner_cancel_Remarks"/>
- <apex:commandButton style="margin-left: 30px;" rerender="allForm,checEventFrame" value="閫傜敤" onclick="applyJs(); return flase;" />
- <apex:commandButton style="margin-left: 10px;" action="{!save}" value="淇濆瓨" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="windowResize();unblockUI();" />
+ function applyJs() {
+ var cnt = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:currentPageRecordCnt').value;
+ var Cancel_Reason = j$(escapeVfId('allPage:allForm:searchBlock:Cancel_Reason')).value();
+ var cancel_count = j$(escapeVfId('allPage:allForm:searchBlock:VF_Cancel_Detail_Count')).value();
+ var cancel_comment = j$(escapeVfId('allPage:allForm:searchBlock:Loaner_cancel_Remarks')).value();
+ var cancel_Reasons = [];
+ j$("td.dataCellBorder1.col_Cancel_Reason__c").each(function () {
+ cancel_Reasons.push(j$(this))
+ });
+ var cancel_counts = [];
+ j$("td.dataCellBorder1.col_VF_Cancel_Detail_Count__c").each(function () {
+ cancel_counts.push(j$(this))
+ });
+ var cancel_comments = [];
+ j$("td.dataCellBorder1.col_Loaner_cancel_Remarks__c").each(function () {
+ cancel_comments.push(j$(this))
+ });
+ for (var i = 0; i < cnt; i++) {
+ var lock = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + i + ':rowCheck'));
+ if(lock.prop('checked') == true){
+ if(Cancel_Reason !== ""){
+ cancel_Reasons[i].find("Select").val(Cancel_Reason);
+ }
+ if(cancel_count !== ""){
+ cancel_counts[i].find("input").val(cancel_count);
+ }
+ if(cancel_comment!==""){
+ cancel_comments[i].find("input").val(cancel_comment);
+ }
+ }
+ }
+ }
+ </script>
+ <apex:form id="allForm">
+ <apex:outputPanel id="pageallPanel">
+ <apex:pageBlock id="searchBlock" tabStyle="Report">
+ <apex:pageBlockSection title="鍙栨秷鏄庣粏鐢宠">
+ <apex:outputField value="{!parentObj.Name}"/>
+ <apex:outputField value="{!parentObj.Person_In_Charge__c}"/>
+ <apex:outputField value="{!parentObj.Salesdept__c}"/>
+ <apex:outputField value="{!parentObj.WorkPlace__c}"/>
+ <apex:outputField value="{!parentObj.Internal_asset_location_F__c}"/>
+ <apex:outputField value="{!parentObj.demo_purpose2__c}"/>
+ <apex:outputField value="{!parentObj.Request_shipping_day__c}"/>
+ <apex:outputField value="{!parentObj.Asset_loaner_start_date__c}"/>
+ </apex:pageBlockSection>
+ <apex:outputPanel >
+ <apex:outputLabel value="{!SUBSTITUTE($ObjectType.Consum_Apply_Equipment_Set__c.fields.VF_Cancel_Detail_Count__c.label,'(Sys)','')}" for="VF_Cancel_Detail_Count"/>
+ <apex:inputField style="margin-left: 5px;" value="{!pageCaes.VF_Cancel_Detail_Count__c}" id="VF_Cancel_Detail_Count"/>
+ <apex:outputLabel style="margin-left: 30px;" value="{!$ObjectType.Consum_Apply_Equipment_Set__c.fields.Cancel_Reason__c.label}" for="Cancel_Reason"/>
+ <apex:inputField style="margin-left: 5px;" value="{!pageCaes.Cancel_Reason__c}" id="Cancel_Reason"/>
+ <apex:outputLabel style="margin-left: 30px;" value="{!$ObjectType.Consum_Apply_Equipment_Set__c.fields.Loaner_cancel_Remarks__c.label}" for="VF_Cancel_Detail_Count"/>
+ <apex:inputField style="margin-left: 5px;" value="{!pageCaes.Loaner_cancel_Remarks__c}" id="Loaner_cancel_Remarks"/>
+ <apex:commandButton style="margin-left: 30px;" rerender="allForm,checEventFrame" value="閫傜敤" onclick="applyJs(); return flase;" />
+ <apex:commandButton style="margin-left: 10px;" action="{!save}" value="淇濆瓨" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="windowResize();unblockUI();" />
+ </apex:outputPanel>
+ </apex:pageBlock>
+ <apex:outputPanel id="message">
+ <apex:pageMessages />
+ </apex:outputPanel>
+ <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true"/>
</apex:outputPanel>
- </apex:pageBlock>
- <apex:outputPanel id="message">
- <apex:pageMessages />
- </apex:outputPanel>
- <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true"/>
- </apex:outputPanel>
- </apex:form>
-</apex:page>
\ No newline at end of file
+ </apex:form>
+ </apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/ConsumEquipmentRentalResponsePopUp.page b/force-app/main/default/pages/ConsumEquipmentRentalResponsePopUp.page
index ac381b6..9c66aca 100644
--- a/force-app/main/default/pages/ConsumEquipmentRentalResponsePopUp.page
+++ b/force-app/main/default/pages/ConsumEquipmentRentalResponsePopUp.page
@@ -1,100 +1,102 @@
-<apex:page Controller="ConsumEquipmentRentalResponseController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
-<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
-<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
-<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
-<script>
-function savejs() {
- blockme();
- savebtn();
-}
-
-function canceljs() {
- top.window.close();
-}
-
-function refreshparent() {
- // var hasError = j$(escapeVfId('allPage:allForm:allBlock:hasError')).text();
- // if (hasError == 'false') {
- // top.window.opener.reloadjs();
- // top.window.close();
- // }
- // 20211123 ljh 搴旂瓟娌熼�� update start
- var hasError = j$(escapeVfId('allPage:allForm:hasError')).text();
- console.log(hasError);
- if (hasError == 'false') {
- window.open("/{!raid}");
- top.window.close();
- }
- // 20211123 ljh 搴旂瓟娌熼�� update end
-}
-</script>
- <apex:form id="allForm">
- <!-- 20211105 ljh 搴旂瓟娌熼�� update start -->
- <!-- <apex:actionFunction name="savebtn" action="{!saveBtn}" rerender="allPanel,message" onComplete="unblockUI();refreshparent();">
- </apex:actionFunction> -->
- <apex:actionFunction name="savebtn" action="{!saveBtn}" rerender="message" onComplete="unblockUI();refreshparent();">
- </apex:actionFunction>
- <apex:outputPanel id="message">
- <apex:pageMessages />
- <apex:outputText id="hasError" value="{!hasError}" style="display:none"/>
- </apex:outputPanel>
- <!-- 20211105 ljh 搴旂瓟娌熼�� update end -->
- <apex:outputPanel id="allPanel">
- <apex:pageBlock title="{!$ObjectType.Consum_Apply__c.fields.Response__c.label}" id="allBlock">
- <apex:pageBlockButtons location="top">
- <apex:commandButton onclick="j$(this).prop('disabled', true).addClass('btnDisabled'); savejs(); return false;" value="鍙戦��" rerender="dummy"/>
- <apex:commandButton onclick="canceljs(); return false;" value="鍙栨秷" rerender="dummy"/>
- </apex:pageBlockButtons>
+<!-- zq <apex:page Controller="ConsumEquipmentRentalResponseController" showHeader="false" sidebar="false" id="allPage" action="{!init}"> -->
+ <apex:page lightningStylesheets = "true" Controller="ConsumEquipmentRentalResponseController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
+ <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+ <script>
+ function savejs() {
+ blockme();
+ savebtn();
+ }
+
+ function canceljs() {
+ top.window.close();
+ }
+
+ function refreshparent() {
+ // var hasError = j$(escapeVfId('allPage:allForm:allBlock:hasError')).text();
+ // if (hasError == 'false') {
+ // top.window.opener.reloadjs();
+ // top.window.close();
+ // }
+ // 20211123 ljh 搴旂瓟娌熼�� update start
+ var hasError = j$(escapeVfId('allPage:allForm:hasError')).text();
+ console.log(hasError);
+ if (hasError == 'false') {
+ window.open("/{!raid}");
+ top.window.close();
+ }
+ // 20211123 ljh 搴旂瓟娌熼�� update end
+ }
+ </script>
+ <apex:form id="allForm">
<!-- 20211105 ljh 搴旂瓟娌熼�� update start -->
- <!-- <apex:outputPanel id="message">
+ <!-- <apex:actionFunction name="savebtn" action="{!saveBtn}" rerender="allPanel,message" onComplete="unblockUI();refreshparent();">
+ </apex:actionFunction> -->
+ <apex:actionFunction name="savebtn" action="{!saveBtn}" rerender="message" onComplete="unblockUI();refreshparent();">
+ </apex:actionFunction>
+ <apex:outputPanel id="message">
<apex:pageMessages />
- </apex:outputPanel> -->
-
- <apex:outputText id="raid" value="{!raid}" style="display:none"/>
- <!-- <apex:outputText id="hasError" value="{!hasError}" style="display:none"/> -->
+ <apex:outputText id="hasError" value="{!hasError}" style="display:none"/>
+ </apex:outputPanel>
<!-- 20211105 ljh 搴旂瓟娌熼�� update end -->
- <table>
- <tr>
- <td>To锛�</td>
- <td>
- <apex:outputPanel layout="none" rendered="{!IF(type='response2center', true, false)}">
- <apex:outputText value="{!ra.Loaner_centre_mail_address__c}"/>
- </apex:outputPanel>
- <apex:outputPanel layout="none" rendered="{!IF(type='response2user', true, false)}">
- <apex:outputText value="{!ra.Person_In_Charge__r.Name}"/>锛�
- <apex:outputText value="{!ra.ApplyUser__r.Name}"/>(鎿嶄綔鑰�)
- </apex:outputPanel>
- </td>
- </tr>
- <tr>
- <td>Cc锛�</td>
- <td><apex:inputField value="{!cc.JingliApprovalManager__c}"/></td>
- </tr>
- <tr>
- <td> </td>
- <td><apex:inputField value="{!cc.SalesManager__c}"/></td>
- </tr>
- <tr>
- <td> </td>
- <td><apex:inputField value="{!cc.BuchangApprovalManager__c}"/></td>
- </tr>
- <tr>
- <td> </td>
- <td><apex:inputField value="{!cc.BuchangApprovalManagerSales__c}"/></td>
- </tr>
- <tr>
- <td> </td>
- <td><apex:inputField value="{!cc.ZongjianApprovalManager__c}"/></td>
- </tr>
- <tr>
- <td> </td>
- <td>
- <apex:inputField value="{!cc.ResponseNew__c}" style="resize:none; width:500px; height:150px;"/>
- </td>
- </tr>
- </table>
-
- </apex:pageBlock>
- </apex:outputPanel>
- </apex:form>
-</apex:page>
\ No newline at end of file
+ <apex:outputPanel id="allPanel">
+ <apex:pageBlock title="{!$ObjectType.Consum_Apply__c.fields.Response__c.label}" id="allBlock">
+ <apex:pageBlockButtons location="top">
+ <apex:commandButton onclick="j$(this).prop('disabled', true).addClass('btnDisabled'); savejs(); return false;" value="鍙戦��" rerender="dummy"/>
+ <apex:commandButton onclick="canceljs(); return false;" value="鍙栨秷" rerender="dummy"/>
+ </apex:pageBlockButtons>
+ <!-- 20211105 ljh 搴旂瓟娌熼�� update start -->
+ <!-- <apex:outputPanel id="message">
+ <apex:pageMessages />
+ </apex:outputPanel> -->
+
+ <apex:outputText id="raid" value="{!raid}" style="display:none"/>
+ <!-- <apex:outputText id="hasError" value="{!hasError}" style="display:none"/> -->
+ <!-- 20211105 ljh 搴旂瓟娌熼�� update end -->
+ <table>
+ <tr>
+ <td>To锛�</td>
+ <td>
+ <apex:outputPanel layout="none" rendered="{!IF(type='response2center', true, false)}">
+ <apex:outputText value="{!ra.Loaner_centre_mail_address__c}"/>
+ </apex:outputPanel>
+ <apex:outputPanel layout="none" rendered="{!IF(type='response2user', true, false)}">
+ <apex:outputText value="{!ra.Person_In_Charge__r.Name}"/>锛�
+ <apex:outputText value="{!ra.ApplyUser__r.Name}"/>(鎿嶄綔鑰�)
+ </apex:outputPanel>
+ </td>
+ </tr>
+ <tr>
+ <td>Cc锛�</td>
+ <td><apex:inputField value="{!cc.JingliApprovalManager__c}"/></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><apex:inputField value="{!cc.SalesManager__c}"/></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><apex:inputField value="{!cc.BuchangApprovalManager__c}"/></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><apex:inputField value="{!cc.BuchangApprovalManagerSales__c}"/></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><apex:inputField value="{!cc.ZongjianApprovalManager__c}"/></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>
+ <!--zq <apex:inputField value="{!cc.ResponseNew__c}" style="resize:none; width:500px; height:150px;"/> -->
+ <apex:inputField value="{!cc.ResponseNew__c}" style="resize:none; width:500px; height:150px;margin:10px 0px;"/>
+ </td>
+ </tr>
+ </table>
+
+ </apex:pageBlock>
+ </apex:outputPanel>
+ </apex:form>
+ </apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/ConsumTrial.page b/force-app/main/default/pages/ConsumTrial.page
index c1f5089..62990ee 100644
--- a/force-app/main/default/pages/ConsumTrial.page
+++ b/force-app/main/default/pages/ConsumTrial.page
@@ -1,842 +1,843 @@
-<apex:page standardController="Consum_Apply__c" extensions="ConsumTrialController" showHeader="false" action="{!init}" id="allPage">
- <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
- <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
- <apex:stylesheet value="{!URLFOR($Resource.ConsumTrialPageCss)}"/>
- <apex:includeScript value="{!URLFOR($Resource.ReceivingNotePageJS)}"/>
- <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
-
- <script type="text/javascript">
- var txIds = [];
- var trialuserMap={};
- </script>
-
- <apex:form id="allForm">
- <style>
- table.headTable td {
- /*min-width:150px;*/
- }
- .left20 {
- margin-left: 20px;
- }
-
- body .pbBody table.list tr.headerRow td.colViewing {
- background-image:url('{!URLFOR($Resource.IconResizeMinus_5)}') ;
- background-repeat:no-repeat;
- }
- body .pbBody table.list tr.headerRow td.colUnHideIcon {
- background-image:url('{!URLFOR($Resource.IconResizePlus_5)}');
- background-repeat:no-repeat;
- }
- </style>
- <script type="text/javascript">
- var heightAjustment = 120;
- var widthAjustment = 30;
- var staticResource = JSON.parse('{!staticResource}');
+<!--20230427 zq <apex:page standardController="Consum_Apply__c" extensions="ConsumTrialController" showHeader="false" action="{!init}" id="allPage"> -->
+ <apex:page lightningStylesheets="true" standardController="Consum_Apply__c" extensions="ConsumTrialController" showHeader="false" action="{!init}" id="allPage">
+ <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+ <apex:stylesheet value="{!URLFOR($Resource.ConsumTrialPageCss)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.ReceivingNotePageJS)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
+ <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
-
- // 閫傜敤鎸夐挳
- function applyJs() {
- var appliedFlag = true;
- var selectFlag = true;
- var isCheckFlag = false;
- var ShowDemonstration = j$(escapeVfId('allPage:allForm:searchBlock:ShowDemonstration')).val(); // 灞曠ず/婕旂ず
- var OperationType = j$(escapeVfId('allPage:allForm:searchBlock:OperationType')).val(); // 鏈紡绫诲埆
- var ConsumStartDate = j$(escapeVfId('allPage:allForm:searchBlock:ConsumStartDate')).val(); // 棰勮浣跨敤鏃�
- var CaseOrAnimalOrgan = j$(escapeVfId('allPage:allForm:searchBlock:CaseOrAnimalOrgan')).val(); // 鐥呬緥/鍔ㄧ墿鑴忓櫒
- var TrialUser= j$(escapeVfId('allPage:allForm:searchBlock:TrialUser')).val(); // 璇曠敤鑰�
- var FollowerUserid = j$(escapeVfId('allPage:allForm:searchBlock:FollowerUser_lkid')).val(); // 璺熷彴鑰匢d
- var FollowerUsername = j$(escapeVfId('allPage:allForm:searchBlock:FollowerUser_lkold')).val(); // 璺熷彴鑰匩ame
-
- var ShowDemonstrations = []; // 灞曠ず/婕旂ず
- j$("td.intf.dataCellBorder1.Show_demonstration__c").each(function() {
- ShowDemonstrations.push(j$(this));
- });
- var OperationTypes = []; // 鏈紡绫诲埆
- j$("td.intf.dataCellBorder1.Operation_Type__c").each(function() {
- OperationTypes.push(j$(this));
- });
- var ConsumStartDates = []; // 澶囧搧棰勮浣跨敤鏃�
- j$("td.intf.dataCellBorder1.Consum_Start_Date__c").each(function() {
- ConsumStartDates.push(j$(this));
- });
- var CaseOrAnimalOrgans = []; // 鐥呬緥/鍔ㄧ墿鑴忓櫒
- j$("td.intf.dataCellBorder1.Case_OR_animal_organ__c").each(function() {
- CaseOrAnimalOrgans.push(j$(this));
- });
-
- var TrialUsers = []; // 璇曠敤鑰�
- j$("td.intf.dataCellBorder1.Trial_User__c").each(function() {
- TrialUsers.push(j$(this));
- });
-
- var FollowerUsers = []; // 璺熷彴鑰�:
- j$("td.intf.dataCellBorder1.Follower_User__c").each(function() {
- FollowerUsers.push(j$(this));
- });
-
- var currentPageRecordCount = j$(escapeVfId('allPage:allForm:dataBlock:currentPageRecordCnt')).val();
- for (var i = 0; i < currentPageRecordCount; i++) {
- var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
- if (checkBox.prop('checked') == true) {
- isCheckFlag = true;
- // 'x'鏃朵笉閫傜敤
- if (ShowDemonstration != 'x') {
- ShowDemonstrations[i].find("select").val(ShowDemonstration);
- appliedFlag = false;
- }
- if (OperationType != 'x') {
- OperationTypes[i].find("select").val(OperationType);
- appliedFlag = false;
- }
- if (ConsumStartDate != null && ConsumStartDate != '' && typeof(ConsumStartDate) != "undefined") {
- ConsumStartDates[i].find("input").val(ConsumStartDate);
- appliedFlag = false;
- }
- if (CaseOrAnimalOrgan != 'x') {
- CaseOrAnimalOrgans[i].find("select").val(CaseOrAnimalOrgan);
- appliedFlag = false;
- }
-
- if (TrialUser != null && TrialUser != '' && typeof(TrialUser) != "undefined") {
- TrialUsers[i].find("input").val(TrialUser);
- appliedFlag = false;
- }
-
- // if (equipmentTypes[i].find("select").val() != productCategory && productCategory != '') {
- if (FollowerUserid != null && parseInt(FollowerUserid) != 0 && typeof(FollowerUserid) != "undefined"
- && FollowerUsername != null && FollowerUsername != 'null' && typeof(FollowerUsername) != "undefined") {
- // setChangeFlg();
-
- var inputs = FollowerUsers[i].find("input");
- for (var j = 0; j < inputs.length; j++) {
- if(inputs[j].name.endsWith('_lkid')) {
- inputs[j].value = FollowerUserid;
+ <script type="text/javascript">
+ var txIds = [];
+ var trialuserMap={};
+ </script>
+
+ <apex:form id="allForm">
+ <style>
+ table.headTable td {
+ /*min-width:150px;*/
+ }
+ .left20 {
+ margin-left: 20px;
+ }
+
+ body .pbBody table.list tr.headerRow td.colViewing {
+ background-image:url('{!URLFOR($Resource.IconResizeMinus_5)}') ;
+ background-repeat:no-repeat;
+ }
+ body .pbBody table.list tr.headerRow td.colUnHideIcon {
+ background-image:url('{!URLFOR($Resource.IconResizePlus_5)}');
+ background-repeat:no-repeat;
+ }
+ </style>
+ <script type="text/javascript">
+ var heightAjustment = 120;
+ var widthAjustment = 30;
+ var staticResource = JSON.parse('{!staticResource}');
+
+
+ // 閫傜敤鎸夐挳
+ function applyJs() {
+ var appliedFlag = true;
+ var selectFlag = true;
+ var isCheckFlag = false;
+ var ShowDemonstration = j$(escapeVfId('allPage:allForm:searchBlock:ShowDemonstration')).val(); // 灞曠ず/婕旂ず
+ var OperationType = j$(escapeVfId('allPage:allForm:searchBlock:OperationType')).val(); // 鏈紡绫诲埆
+ var ConsumStartDate = j$(escapeVfId('allPage:allForm:searchBlock:ConsumStartDate')).val(); // 棰勮浣跨敤鏃�
+ var CaseOrAnimalOrgan = j$(escapeVfId('allPage:allForm:searchBlock:CaseOrAnimalOrgan')).val(); // 鐥呬緥/鍔ㄧ墿鑴忓櫒
+ var TrialUser= j$(escapeVfId('allPage:allForm:searchBlock:TrialUser')).val(); // 璇曠敤鑰�
+ var FollowerUserid = j$(escapeVfId('allPage:allForm:searchBlock:FollowerUser_lkid')).val(); // 璺熷彴鑰匢d
+ var FollowerUsername = j$(escapeVfId('allPage:allForm:searchBlock:FollowerUser_lkold')).val(); // 璺熷彴鑰匩ame
+
+ var ShowDemonstrations = []; // 灞曠ず/婕旂ず
+ j$("td.intf.dataCellBorder1.Show_demonstration__c").each(function() {
+ ShowDemonstrations.push(j$(this));
+ });
+ var OperationTypes = []; // 鏈紡绫诲埆
+ j$("td.intf.dataCellBorder1.Operation_Type__c").each(function() {
+ OperationTypes.push(j$(this));
+ });
+ var ConsumStartDates = []; // 澶囧搧棰勮浣跨敤鏃�
+ j$("td.intf.dataCellBorder1.Consum_Start_Date__c").each(function() {
+ ConsumStartDates.push(j$(this));
+ });
+ var CaseOrAnimalOrgans = []; // 鐥呬緥/鍔ㄧ墿鑴忓櫒
+ j$("td.intf.dataCellBorder1.Case_OR_animal_organ__c").each(function() {
+ CaseOrAnimalOrgans.push(j$(this));
+ });
+
+ var TrialUsers = []; // 璇曠敤鑰�
+ j$("td.intf.dataCellBorder1.Trial_User__c").each(function() {
+ TrialUsers.push(j$(this));
+ });
+
+ var FollowerUsers = []; // 璺熷彴鑰�:
+ j$("td.intf.dataCellBorder1.Follower_User__c").each(function() {
+ FollowerUsers.push(j$(this));
+ });
+
+ var currentPageRecordCount = j$(escapeVfId('allPage:allForm:dataBlock:currentPageRecordCnt')).val();
+ for (var i = 0; i < currentPageRecordCount; i++) {
+ var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
+ if (checkBox.prop('checked') == true) {
+ isCheckFlag = true;
+ // 'x'鏃朵笉閫傜敤
+ if (ShowDemonstration != 'x') {
+ ShowDemonstrations[i].find("select").val(ShowDemonstration);
+ appliedFlag = false;
+ }
+ if (OperationType != 'x') {
+ OperationTypes[i].find("select").val(OperationType);
+ appliedFlag = false;
+ }
+ if (ConsumStartDate != null && ConsumStartDate != '' && typeof(ConsumStartDate) != "undefined") {
+ ConsumStartDates[i].find("input").val(ConsumStartDate);
+ appliedFlag = false;
+ }
+ if (CaseOrAnimalOrgan != 'x') {
+ CaseOrAnimalOrgans[i].find("select").val(CaseOrAnimalOrgan);
+ appliedFlag = false;
+ }
+
+ if (TrialUser != null && TrialUser != '' && typeof(TrialUser) != "undefined") {
+ TrialUsers[i].find("input").val(TrialUser);
+ appliedFlag = false;
+ }
+
+ // if (equipmentTypes[i].find("select").val() != productCategory && productCategory != '') {
+ if (FollowerUserid != null && parseInt(FollowerUserid) != 0 && typeof(FollowerUserid) != "undefined"
+ && FollowerUsername != null && FollowerUsername != 'null' && typeof(FollowerUsername) != "undefined") {
+ // setChangeFlg();
+
+ var inputs = FollowerUsers[i].find("input");
+ for (var j = 0; j < inputs.length; j++) {
+ if(inputs[j].name.endsWith('_lkid')) {
+ inputs[j].value = FollowerUserid;
+ }
+ else if (inputs[j].name.endsWith('_lkold')
+ || inputs[j].name.endsWith('inputField')) {
+ inputs[j].value = FollowerUsername;
+ }
}
- else if (inputs[j].name.endsWith('_lkold')
- || inputs[j].name.endsWith('inputField')) {
- inputs[j].value = FollowerUsername;
- }
+ appliedFlag = false;
}
- appliedFlag = false;
}
}
- }
- j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
- // var clearApplyFlag = false;
- window.setTimeout(function () {
- if (ConsumStartDate == null
- && TrialUser == null
- && (FollowerUserid== null || FollowerUsername == null)) { // 閫傜敤鍏ュ姏妗嗗叏涓虹┖
- // alert('閫傜敤鍖鸿緭鍏ユ涓虹┖锛岃杈撳叆閫傜敤鍊笺��');
- var applyMsg = '閫傜敤鍖鸿緭鍏ユ涓虹┖锛岃杈撳叆閫傜敤鍊笺��';
- //passApplyMsgToController(applyMsg, 'Fail');
- return;
- }
- if (isCheckFlag == false) {
- // alert('鏈嬀閫変换浣曞緟閫傜敤鏁版嵁銆�');
- var applyMsg = '鏈嬀閫変换浣曞緟閫傜敤鏁版嵁銆�';
- //passApplyMsgToController(applyMsg, 'Fail');
- return;
- }
-
- if (selectFlag) {
- if (!appliedFlag) {
- var alertMsg = "閫傜敤瀹屼簡 \r\n";
- if (ConsumStartDate != null && typeof(ConsumStartDate) != "undefined") {
- var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "澶囧搧棰勮浣跨敤鏃�" + " 閫傜敤涓� " + ConsumStartDate + " \r\n";
- alertMsg += alertMsg1;
- }
- if (TrialUser != null && typeof(TrialUser) != "undefined") {
- var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "璇曠敤鑰�" + " 閫傜敤涓� " + TrialUser + " \r\n";
- alertMsg += alertMsg1;
- }
- if (FollowerUserid != null && typeof(FollowerUserid) != "undefined"
- && FollowerUsername != null && typeof(FollowerUsername) != "undefined") {
- var alertMsg2 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "璺熷彴鑰�:" + " 閫傜敤涓� " + FollowerUsername + " \r\n";
- alertMsg += alertMsg2;
- }
- // alert(alertMsg);
- // clearApplyFlag = true;
- j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
- //passApplyMsgToController(alertMsg, 'Success');
- }
- } else {
- if (!appliedFlag) {
- var alertMsg = "閫傜敤瀹屼簡 \r\n";
- if (ConsumStartDate != null && typeof(ConsumStartDate) != "undefined") {
- var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "澶囧搧棰勮浣跨敤鏃�" + " 閫傜敤涓� " + ConsumStartDate + " \r\n";
- alertMsg += alertMsg1;
- }
- if (TrialUser != null && typeof(TrialUser) != "undefined") {
- var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + " 璇曠敤鑰�" + " 閫傜敤涓� " + TrialUser + " \r\n";
- alertMsg += alertMsg1;
- }
- if (FollowerUserid != null && typeof(FollowerUserid) != "undefined"
- && FollowerUsername != null && typeof(FollowerUsername) != "undefined") {
- var alertMsg2 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "璺熷彴鑰�:" + " 閫傜敤涓� " + FollowerUsername + " \r\n";
- alertMsg += alertMsg2;
- }
- //passApplyMsgToController(alertMsg, 'Success');
- j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
- } else {
- var alertMsg = "鍏朵粬閫夐」: " + otherSelectOptionText +"涓棤姝ら�夐」鍊�" + otherSelectOptionValue + "锛屾棤娉曟洿鏂般��";
- //passApplyMsgToController(alertMsg, 'Fail');
- }
- }
- }, 5);
- }
-
- function clearApplyValue() {
- var clearApplyValueFlag = j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val();
- if(clearApplyValueFlag) {
- j$(escapeVfId('{!$Component.stockId}')).val('');
- j$(escapeVfId('{!$Component.applyEquipmentTypeId}')).val('');
- j$(escapeVfId('{!$Component.applyAssetTypeListId}')).val('');
- j$(escapeVfId('{!$Component.otherSelectionId}')).val('');
- }
- j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
- }
-
- function checkSavingJs() {
- var isSavingSuccess = j$(escapeVfId('isSavingSuccessId')).val();
- // alert(isSavingSuccess);
- if (isSavingSuccess != 'false') {
- //setSaveSuccessMsg();
- }
- }
-
- function resetMove(d, up, len) {
- var line = j$(escapeVfId(d)).find('input')[0].value;
- resetMoveUpDown(up, parseInt(line), len);
- }
-
- function moveToTop(d, up, len) {
- var line = j$(escapeVfId(d)).find('input')[0].value;
- console.log(line);
- var isSuccessful = true;
- if (up) {
- for(var i = parseInt(line) ; i > 1 && isSuccessful; i-- ) {
- isSuccessful = resetMoveUpDown(up, i, len);
- }
- }
- else {
- for(var i = parseInt(line) ; i < len && isSuccessful; i++ ) {
- isSuccessful = resetMoveUpDown(up, i, len);
- }
- }
- unblockUI();
- }
-
- function resetMoveUpDown(up, line, len) {
-
- var items = j$(".dataCellBorder2");
- var item1 = j$("td.intf.dataCellBorder1.Degree_Of_Importance__c");
- var item2 = j$("td.dataCellBorder1.col_Fixture_Model_No__c");
- var currentPageRecordCount = j$(escapeVfId('allPage:allForm:dataBlock:currentPageRecordCnt')).val();
- var isSuccessful = false;
- // alert(item1);
- var i = line - 1;
- var i1 = line + 1;
- // var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
- if (up == true){
- var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
- var trL = j$('#tableData_L').find('tbody').find('tr:eq(' + (i) + ')');
- if(line != 1) {
- var model1 = j$(item2[i - 1]).find("span").text();
- var model2 = j$(item2[i]).find("span").text();
- if (model1 != model2) {
- unblockUI();
+ j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
+ // var clearApplyFlag = false;
+ window.setTimeout(function () {
+ if (ConsumStartDate == null
+ && TrialUser == null
+ && (FollowerUserid== null || FollowerUsername == null)) { // 閫傜敤鍏ュ姏妗嗗叏涓虹┖
+ // alert('閫傜敤鍖鸿緭鍏ユ涓虹┖锛岃杈撳叆閫傜敤鍊笺��');
+ var applyMsg = '閫傜敤鍖鸿緭鍏ユ涓虹┖锛岃杈撳叆閫傜敤鍊笺��';
+ //passApplyMsgToController(applyMsg, 'Fail');
return;
}
-
- var v1 = j$(item1[i - 1]).find("input").val();
- var v2 = j$(item1[i]).find("input").val();
- setChangeFlg(i-1);
- setChangeFlg(i);
- j$(items[i - 1]).children('.ordernocls').val(line);
- j$(items[i]).children('.ordernocls').val(line - 1);
- j$(item1[i - 1]).find("input").val(v2);
- j$(item1[i]).find("input").val(v1);
-
- isSuccessful = true;
- // j$(item1[i - 1]).children('.ordernocls').val('' + line);
- // j$(item1[i]).children('.ordernocls').val('' + i);
+ if (isCheckFlag == false) {
+ // alert('鏈嬀閫変换浣曞緟閫傜敤鏁版嵁銆�');
+ var applyMsg = '鏈嬀閫変换浣曞緟閫傜敤鏁版嵁銆�';
+ //passApplyMsgToController(applyMsg, 'Fail');
+ return;
+ }
+
+ if (selectFlag) {
+ if (!appliedFlag) {
+ var alertMsg = "閫傜敤瀹屼簡 \r\n";
+ if (ConsumStartDate != null && typeof(ConsumStartDate) != "undefined") {
+ var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "澶囧搧棰勮浣跨敤鏃�" + " 閫傜敤涓� " + ConsumStartDate + " \r\n";
+ alertMsg += alertMsg1;
+ }
+ if (TrialUser != null && typeof(TrialUser) != "undefined") {
+ var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "璇曠敤鑰�" + " 閫傜敤涓� " + TrialUser + " \r\n";
+ alertMsg += alertMsg1;
+ }
+ if (FollowerUserid != null && typeof(FollowerUserid) != "undefined"
+ && FollowerUsername != null && typeof(FollowerUsername) != "undefined") {
+ var alertMsg2 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "璺熷彴鑰�:" + " 閫傜敤涓� " + FollowerUsername + " \r\n";
+ alertMsg += alertMsg2;
+ }
+ // alert(alertMsg);
+ // clearApplyFlag = true;
+ j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
+ //passApplyMsgToController(alertMsg, 'Success');
+ }
+ } else {
+ if (!appliedFlag) {
+ var alertMsg = "閫傜敤瀹屼簡 \r\n";
+ if (ConsumStartDate != null && typeof(ConsumStartDate) != "undefined") {
+ var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "澶囧搧棰勮浣跨敤鏃�" + " 閫傜敤涓� " + ConsumStartDate + " \r\n";
+ alertMsg += alertMsg1;
+ }
+ if (TrialUser != null && typeof(TrialUser) != "undefined") {
+ var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + " 璇曠敤鑰�" + " 閫傜敤涓� " + TrialUser + " \r\n";
+ alertMsg += alertMsg1;
+ }
+ if (FollowerUserid != null && typeof(FollowerUserid) != "undefined"
+ && FollowerUsername != null && typeof(FollowerUsername) != "undefined") {
+ var alertMsg2 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "璺熷彴鑰�:" + " 閫傜敤涓� " + FollowerUsername + " \r\n";
+ alertMsg += alertMsg2;
+ }
+ //passApplyMsgToController(alertMsg, 'Success');
+ j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
+ } else {
+ var alertMsg = "鍏朵粬閫夐」: " + otherSelectOptionText +"涓棤姝ら�夐」鍊�" + otherSelectOptionValue + "锛屾棤娉曟洿鏂般��";
+ //passApplyMsgToController(alertMsg, 'Fail');
+ }
+ }
+ }, 5);
+ }
+
+ function clearApplyValue() {
+ var clearApplyValueFlag = j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val();
+ if(clearApplyValueFlag) {
+ j$(escapeVfId('{!$Component.stockId}')).val('');
+ j$(escapeVfId('{!$Component.applyEquipmentTypeId}')).val('');
+ j$(escapeVfId('{!$Component.applyAssetTypeListId}')).val('');
+ j$(escapeVfId('{!$Component.otherSelectionId}')).val('');
+ }
+ j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
+ }
+
+ function checkSavingJs() {
+ var isSavingSuccess = j$(escapeVfId('isSavingSuccessId')).val();
+ // alert(isSavingSuccess);
+ if (isSavingSuccess != 'false') {
+ //setSaveSuccessMsg();
+ }
+ }
+
+ function resetMove(d, up, len) {
+ var line = j$(escapeVfId(d)).find('input')[0].value;
+ resetMoveUpDown(up, parseInt(line), len);
+ }
+
+ function moveToTop(d, up, len) {
+ var line = j$(escapeVfId(d)).find('input')[0].value;
+ console.log(line);
+ var isSuccessful = true;
+ if (up) {
+ for(var i = parseInt(line) ; i > 1 && isSuccessful; i-- ) {
+ isSuccessful = resetMoveUpDown(up, i, len);
+ }
}
else {
- j$(items[i]).children('.ordernocls').val(line);
- }
- var tr1 = j$(items[i]).parents("tr");
- tr.prev().before(tr);
- trL.prev().before(trL);
- }
- else {
- if(line < currentPageRecordCount) {
- var model1 = j$(item2[i]).find("span").text();
- var model2 = j$(item2[line]).find("span").text();
- if (model1 != model2) {
- unblockUI();
- return;
+ for(var i = parseInt(line) ; i < len && isSuccessful; i++ ) {
+ isSuccessful = resetMoveUpDown(up, i, len);
}
+ }
+ unblockUI();
+ }
+
+ function resetMoveUpDown(up, line, len) {
+
+ var items = j$(".dataCellBorder2");
+ var item1 = j$("td.intf.dataCellBorder1.Degree_Of_Importance__c");
+ var item2 = j$("td.dataCellBorder1.col_Fixture_Model_No__c");
+ var currentPageRecordCount = j$(escapeVfId('allPage:allForm:dataBlock:currentPageRecordCnt')).val();
+ var isSuccessful = false;
+ // alert(item1);
+ var i = line - 1;
+ var i1 = line + 1;
+ // var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
+ if (up == true){
var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
var trL = j$('#tableData_L').find('tbody').find('tr:eq(' + (i) + ')');
- var v1 = j$(item1[i]).find("input").val();
- var v2 = j$(item1[i + 1]).find("input").val();
- setChangeFlg(i);
- setChangeFlg(i + 1);
- j$(items[i]).children('.ordernocls').val(line + 1);
- j$(items[i + 1]).children('.ordernocls').val(line);
- j$(item1[i]).find("input").val(v2);
- j$(item1[line]).find("input").val(v1);
+ if(line != 1) {
+ var model1 = j$(item2[i - 1]).find("span").text();
+ var model2 = j$(item2[i]).find("span").text();
+ if (model1 != model2) {
+ unblockUI();
+ return;
+ }
+
+ var v1 = j$(item1[i - 1]).find("input").val();
+ var v2 = j$(item1[i]).find("input").val();
+ setChangeFlg(i-1);
+ setChangeFlg(i);
+ j$(items[i - 1]).children('.ordernocls').val(line);
+ j$(items[i]).children('.ordernocls').val(line - 1);
+ j$(item1[i - 1]).find("input").val(v2);
+ j$(item1[i]).find("input").val(v1);
+
+ isSuccessful = true;
+ // j$(item1[i - 1]).children('.ordernocls').val('' + line);
+ // j$(item1[i]).children('.ordernocls').val('' + i);
+ }
+ else {
+ j$(items[i]).children('.ordernocls').val(line);
+ }
var tr1 = j$(items[i]).parents("tr");
- tr.next().after(tr);
- trL.next().after(trL);
- isSuccessful = true;
+ tr.prev().before(tr);
+ trL.prev().before(trL);
}
else {
- j$(items[i]).children('.ordernocls').val(line);
+ if(line < currentPageRecordCount) {
+ var model1 = j$(item2[i]).find("span").text();
+ var model2 = j$(item2[line]).find("span").text();
+ if (model1 != model2) {
+ unblockUI();
+ return;
+ }
+ var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
+ var trL = j$('#tableData_L').find('tbody').find('tr:eq(' + (i) + ')');
+ var v1 = j$(item1[i]).find("input").val();
+ var v2 = j$(item1[i + 1]).find("input").val();
+ setChangeFlg(i);
+ setChangeFlg(i + 1);
+ j$(items[i]).children('.ordernocls').val(line + 1);
+ j$(items[i + 1]).children('.ordernocls').val(line);
+ j$(item1[i]).find("input").val(v2);
+ j$(item1[line]).find("input").val(v1);
+ var tr1 = j$(items[i]).parents("tr");
+ tr.next().after(tr);
+ trL.next().after(trL);
+ isSuccessful = true;
+ }
+ else {
+ j$(items[i]).children('.ordernocls').val(line);
+ }
+ }
+ unblockUI();
+ return isSuccessful;
+ }
+
+ function refopener() {
+ window.opener.location.href = '/apex/ConsumTrial?id={!parId}';
+ }
+
+ if (window.history.pushState) {
+ if (window.location.href.indexOf('&saveType=1') > -1) {
+ refopener();
+ }
+ window.history.pushState({}, "", window.location.href.replace('&saveType=1', ''));
+ }
+
+ //2022 02 24 寮犲崕寤� display PI Data start
+ var rowBList;
+ var TrialUser = {};
+ var ids = [];
+
+ function HasError(){
+ // 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 in divs[i].classList){
+ // console.log('cls = ' + cls);
+ // if (cls.indexOf('error')>-1) {
+ // return true;
+ // }
+ // }
+
+ // }
+
+ // }
+ // return false;
+
+ if(document.getElementById("allPage:allForm:message").children[0] && document.getElementById("allPage:allForm:message").children[0].children[0].className == 'message errorM3'){
+ return true;
+ }
+ return false;
+ }
+
+ function isError(){
+ if(HasError()){
+ alert('xxxx');
}
}
- unblockUI();
- return isSuccessful;
- }
-
- function refopener() {
- window.opener.location.href = '/apex/ConsumTrial?id={!parId}';
- }
-
- if (window.history.pushState) {
- if (window.location.href.indexOf('&saveType=1') > -1) {
- refopener();
- }
- window.history.pushState({}, "", window.location.href.replace('&saveType=1', ''));
- }
-
- //2022 02 24 寮犲崕寤� display PI Data start
- var rowBList;
- var TrialUser = {};
- var ids = [];
-
- function HasError(){
- // 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 in divs[i].classList){
- // console.log('cls = ' + cls);
- // if (cls.indexOf('error')>-1) {
- // return true;
- // }
- // }
-
- // }
-
- // }
- // return false;
-
- if(document.getElementById("allPage:allForm:message").children[0] && document.getElementById("allPage:allForm:message").children[0].children[0].className == 'message errorM3'){
- return true;
- }
- return false;
- }
-
- function isError(){
- if(HasError()){
- alert('xxxx');
- }
- }
-
-
-
- queryUser();
-
- function q1(){
- var p = new Promise(function(resolve, reject){
- rowBList = JSON.parse('{!rowListString}')
- var x = 0;
- var y = 0;
- let searchCallBack = function searchCallBack(result){
- let contacts = result.object;
- if(contacts == null){
- return;
+
+
+
+ queryUser();
+
+ function q1(){
+ var p = new Promise(function(resolve, reject){
+ rowBList = JSON.parse('{!rowListString}')
+ var x = 0;
+ var y = 0;
+ let searchCallBack = function searchCallBack(result){
+ let contacts = result.object;
+ if(contacts == null){
+ return;
+ }
+ let temp = {}
+ temp.trialUser = contacts.trialUser;
+ TrialUser[contacts.dataId] = temp;
+ x++;
+ };
+ for(var i=0;i<rowBList.length;i++){
+ if(rowBList[i].rnd.AWS_Data_Id__c ){
+ y++;
+ ids.push(rowBList[i].rnd.AWS_Data_Id__c + '_' + rowBList[i].rnd.Id);
+ AWSService.query(staticResource.queryUrl,rowBList[i].rnd.AWS_Data_Id__c,searchCallBack,staticResource.token);
+ }
}
- let temp = {}
- temp.trialUser = contacts.trialUser;
- TrialUser[contacts.dataId] = temp;
- x++;
- };
- for(var i=0;i<rowBList.length;i++){
- if(rowBList[i].rnd.AWS_Data_Id__c ){
- y++;
+ var id = setInterval(function(){
+ if(x == y){
+ console.log('success')
+ resolve('success');
+ clearInterval(id);
+ }
+ },500);
+ });
+ return p;
+ }
+
+ function q2(value){
+ var p = new Promise(function(resolve, reject){
+ console.log('杩涘叆q2'+value)
+ for(var i=0;i<ids.length;i++){
+ console.log('i = '+i);
+ //document.getElementById(ids[i]).children[0].children[0].children[0].value = TrialUser[ids[i].substring(0,18)].trialUser;
+ document.getElementById(ids[i]).children[0].children[0].children[0].value = TrialUser[ids[i].split('_')[0]].trialUser; //zhj 鏀瑰杽鍙栧�� 2022-12-30
+ console.log('i = '+i);
+ }
+ });
+ }
+
+ function queryUser(){
+ debugger
+ rowBList = JSON.parse('{!rowListString}')
+ console.log('pageB.fixMode = '+'{!pageB.fixMode}')
+ if('{!pageB.fixMode}' == 'true'){
+ q1().then(function(data){
+ return q2(data);
+ })
+ unblockUI();
+ }else{
+ blockme();
+ console.log(rowBList)
+ let searchCallBack = function searchCallBack(result){
+ let contacts = result.object;
+ if(contacts == null){
+ return;
+ }
+ let temp = {}
+ temp.trialUser = contacts.trialUser;
+ TrialUser[contacts.dataId] = temp;
+ };
+ for(var i=0;i<rowBList.length;i++){
ids.push(rowBList[i].rnd.AWS_Data_Id__c + '_' + rowBList[i].rnd.Id);
AWSService.query(staticResource.queryUrl,rowBList[i].rnd.AWS_Data_Id__c,searchCallBack,staticResource.token);
}
- }
- var id = setInterval(function(){
- if(x == y){
- console.log('success')
- resolve('success');
- clearInterval(id);
- }
- },500);
- });
- return p;
- }
-
- function q2(value){
- var p = new Promise(function(resolve, reject){
- console.log('杩涘叆q2'+value)
- for(var i=0;i<ids.length;i++){
- console.log('i = '+i);
- //document.getElementById(ids[i]).children[0].children[0].children[0].value = TrialUser[ids[i].substring(0,18)].trialUser;
- document.getElementById(ids[i]).children[0].children[0].children[0].value = TrialUser[ids[i].split('_')[0]].trialUser; //zhj 鏀瑰杽鍙栧�� 2022-12-30
- console.log('i = '+i);
- }
- });
- }
-
- function queryUser(){
- debugger
- rowBList = JSON.parse('{!rowListString}')
- console.log('pageB.fixMode = '+'{!pageB.fixMode}')
- if('{!pageB.fixMode}' == 'true'){
- q1().then(function(data){
- return q2(data);
- })
- unblockUI();
- }else{
- blockme();
- console.log(rowBList)
- let searchCallBack = function searchCallBack(result){
- let contacts = result.object;
- if(contacts == null){
- return;
- }
- let temp = {}
- temp.trialUser = contacts.trialUser;
- TrialUser[contacts.dataId] = temp;
- };
- for(var i=0;i<rowBList.length;i++){
- ids.push(rowBList[i].rnd.AWS_Data_Id__c + '_' + rowBList[i].rnd.Id);
- AWSService.query(staticResource.queryUrl,rowBList[i].rnd.AWS_Data_Id__c,searchCallBack,staticResource.token);
- }
- unblockUI();
- }
- }
-
- function showPIDiv(awsDataId){
- if(awsDataId.length == 0){
- return
- }
- let index = awsDataId.indexOf('_');
- console.log('show index = ' + index);
- if(TrialUser[awsDataId.substring(0,index)] == null){
- return
- }
- console.log('awsDataId Value:'+awsDataId);
- let parentNode = document.getElementById(awsDataId);
- let createDiv = document.createElement("div");
- createDiv.id = awsDataId+"_PI";
- let piInformation = TrialUser[awsDataId.substring(0,index)].trialUser
- //let piInformation = 'Name:'+contact['943114607025717249'].lastName +'\n' +'Phone:'+contact['943114607025717249'].phone
- createDiv.innerText = piInformation;
- let x=window.event.x;
- let y=window.event.y;
- createDiv.style.left=x;
- createDiv.style.top=y;
- createDiv.style.background="#dddddd";
- createDiv.style.position = "absolute";
- parentNode.appendChild(createDiv);
- parentNode.style.position = "relative";
- }
-
- function hidePIDiv(awsDataId){
- if(awsDataId.length == 0){
- return
- }
- let index = awsDataId.indexOf('_');
- console.log('show index = ' + index);
- if(TrialUser[awsDataId.substring(0,index)] == null){
- return
- }
- document.getElementById(awsDataId+'_PI').remove();
- }
-
-
- function q3(){
- var p = new Promise(function(resolve, reject){
- console.log('saveRecordJS')
- txIds = [];
- trialuserMap = {};
- var a = 0;
- var b = 0;
- debugger
- let newCallBack = function newCallBack(result,indexNumber){
- //璧嬪�糳ataId鍜宼rialUser
- document.getElementById('allPage:allForm:dataBlock:dataline_R_aws:'+indexNumber+':EditAWSDataId').value = result.object[0].dataId;
- //document.getElementById('allPage:allForm:dataBlock:dataline_R_aws:'+indexNumber+':TrialUserEncrypt').value = result.object[0].trialUserEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-30
- document.getElementById('allPage:allForm:dataBlock:dataline_R:'+indexNumber+':inputField:6:inputField').value = result.object[0].trialUser;
- // let transParameters = {
- // txId: result.txId,
- // isSuccess: 1
- // };
- // let confirmCallBack = function confirmCallBack(result){
- // console.log('confirmCallBack = '+JSON.stringify(result))
- // }
- b++;
- txIds.push(result.txId)
- //AWSService.confirmTrans(staticResource.transactionUrl,JSON.stringify(transParameters),confirmCallBack,staticResource.token)
- };
- for(var i=0;i<rowBList.length;i++){
- if(document.getElementById('allPage:allForm:dataBlock:dataline_L:'+i+':rowCheck').checked == true){
- a++;
- }
- }
- for(var i=0;i<rowBList.length;i++){
- if(document.getElementById('allPage:allForm:dataBlock:dataline_L:'+i+':rowCheck').checked == true){
- //鍔犲瘑璇曠敤鑰�
- let e = document.getElementById('allPage:allForm:dataBlock:dataline_R:'+i+':inputField:6:j_id86').children[0].children[0];
- var trialUser = e.value;
- trialuserMap['allPage:allForm:dataBlock:dataline_R:'+i+':inputField:6:j_id86'] = trialUser;
- let consumApplyPayloadList = [];
- let consumApplyPIData = new Object();
- consumApplyPIData.trialUser = trialUser;
- consumApplyPIData.sfRecordId = '';
- consumApplyPayloadList.push(consumApplyPIData);
- AWSService.postConsumTrial(staticResource.newUrl,i,JSON.stringify(consumApplyPayloadList),newCallBack,staticResource.token);
- }
- }
- var id = setInterval(function(){
- if(a == b){
- console.log('a==b success')
- resolve('success');
- clearInterval(id);
- }
- },500);
- });
- return p;
- }
-
- function q4(){
- debugger
- let b = false;
- for(var i=0;i<rowBList.length;i++){
- if(document.getElementById('allPage:allForm:dataBlock:dataline_L:'+i+':rowCheck').checked == true){
- b = true;
+ unblockUI();
}
}
- if(!b){
- //unblockUI();
- window.location.href='/apex/ConsumTrial?id=' + '{!parId}' + '&canedit=true&saveType=1';
- return;
- }
- saveRecord();
- }
-
- function Trans(){
- if(HasError()){
- unblockUI();
- for(var e in trialuserMap){
- document.getElementById(e).children[0].children[0].value = trialuserMap[e];
- }
- return;
- }
- var x = 0;
- let confirmCallBack = function confirmCallBack(result){
- console.log('confirmCallBack = '+JSON.stringify(result))
- x++;
- if(x == txIds.length){
- //refopener();
- //unblockUI();
- window.location.href='/apex/ConsumTrial?id=' + '{!parId}' + '&canedit=true&saveType=1';
- }
- }
- for(var i=0;i<txIds.length;i++){
- let transParameters = {
- txId: txIds[i],
- isSuccess: 1
- };
- AWSService.confirmTrans(staticResource.transactionUrl,JSON.stringify(transParameters),confirmCallBack,staticResource.token)
- }
- }
-
- function saveRecordJS(){
- if('{!pageB.fixMode}' != 'true'){
- unblockUI();
+
+ function showPIDiv(awsDataId){
+ if(awsDataId.length == 0){
return
}
- q3().then(function(data){
- return q4(data);
- })
- //unblockUI();
- }
- //2022 02 24 寮犲崕寤� display PI Data end
- </script>
- <apex:pageMessages id="message"/>
- <!-- oncomplete="clearApplyValue(); return false;" -->
- <apex:actionFunction name="passApplyMsgToController" action="{!showApplyMsg}" rerender="allForm">
- <apex:param name="applyMsg" value="" />
- <apex:param name="applyMsgType" value="" />
- </apex:actionFunction>
- <apex:actionFunction name="sendEmail" action="{!sendEmail}" rerender="allForm" oncomplete="unblockUI();">
- <apex:param name="emailBody" value="" />
- </apex:actionFunction>
- <apex:actionFunction name="saveRecord" action="{!saveRecord}" oncomplete="Trans();" rerender="allForm"/>
- <apex:inputHidden id="clearApplyFlagId" />
- <apex:outputPanel id="pageallPanel">
- <apex:pageBlock id="searchBlock">
- <apex:outputPanel layout="none" rendered="{!showEditButton}">
- <table class="searchTable" style="width:100%">
- <tr>
- <apex:outputPanel layout="none" rendered="{!canEdit}">
- <td>
- <!-- 灞曠ず/婕旂ず -->
- {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Show_demonstration__c.label}
- <!-- <apex:inputField id="Show_demonstration" value="{!pageB.caesdInput.Show_demonstration__c}"/> -->
- <apex:selectList id="ShowDemonstration" value="{!pageB.caesdInput.Show_demonstration__c}" size="1">
- <apex:selectOptions value="{!ShowDemonstrationOps}"/>
- </apex:selectList>
- </td>
- <td>
- <!-- 鏈紡绫诲埆 -->
- {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Operation_Type__c.label}
- <apex:selectList id="OperationType" value="{!pageB.caesdInput.Operation_Type__c}" size="1">
- <apex:selectOptions value="{!OperationTypeOps}"/>
- </apex:selectList>
- </td>
- <td>
- <!-- 棰勮浣跨敤鏃� -->
- {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Consum_Start_Date__c.label}
- <apex:inputField id="ConsumStartDate" value="{!pageB.caesdInput.Consum_Start_Date__c}"/>
- </td>
- <td>
- <!-- 鐥呬緥/鍔ㄧ墿鑴忓櫒 -->
- {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Case_OR_animal_organ__c.label}
- <apex:selectList id="CaseOrAnimalOrgan" value="{!pageB.caesdInput.Case_OR_animal_organ__c}" size="1">
- <apex:selectOptions value="{!Case_OR_animal_organOpsHead}"/>
- </apex:selectList>
- </td>
- <td>
- <!-- 璇曠敤鑰� -->
- {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Trial_User__c.label}
- <apex:inputField id="TrialUser" value="{!pageB.caesdInput.Trial_User__c}"/>
- <!-- <script>
- sfdcPage.appendToOnloadQueue(function () {
- var queryBack = function queryBack(data) {
- console.log('data = ' + data);
- document.getElementById('{!pageB.caesdInput.AWS_Data_Id__c}') = data.object.trialUser;
- };
- AWSService.query(staticResources.queryUrl, '{!pageB.caesdInput.AWS_Data_Id__c}', queryBack, staticResources.token);
- });
- </script> -->
- </td>
- <td>
- <!-- 璺熷彴鑰� -->
- {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Follower_User__c.label}:
- <apex:inputField id="FollowerUser" value="{!pageB.caesdInput.Follower_User__c}"/>
- </td>
- </apex:outputPanel>
- <!-- </tr> -->
- <!-- <tr> -->
- <td>
- <!-- </td> -->
- <!-- <td colspan="5"> -->
- <span style="margin-left: 10px;">
- <apex:commandButton value="缂栬緫" rendered="{!canEdit}" onclick="blockme();" action="{!changeFixModel}" reRender="allForm" oncomplete="unblockUI();windowResize();"/>
- <apex:commandButton value="缂栬緫" style="float: right; margin-right: 40px;" rendered="{!AND(canEdit == false, redOnly == false)}" onclick="var w = window.open('/apex/ConsumTrial?id={!parId}&canedit=true', '缂栬緫璇曠敤琛ㄧ敾闈�', 'width='+(window.screen.width-200)+',height='+(window.screen.height-200)+',left=100,top=100'); w.focus(); return false;"/>
- </span>
- <span style="margin-left: 10px;">
- <apex:commandButton value="閫傜敤" rendered="{!canEdit}" onclick="applyJs();return false;"/>
- </span>
- <span style="margin-left: 10px;">
- <apex:commandButton value="淇濆瓨" onclick="blockme();saveRecordJS(); return false;" rendered="{!canEdit}"/>
- </span>
- </td>
- </tr>
- </table>
- </apex:outputPanel>
- </apex:pageBlock>
- <apex:pageBlock id="dataBlock" tabStyle="Report">
- <apex:inputHidden id="currentPageRecordCnt" value="{!pageB.currentPageRecordCnt}"/>
- <!-- <table id="msgtable">
- <tr>
- <td>
- <apex:outputPanel id="message">
- <apex:pageMessages />
- </apex:outputPanel>
- </td>
- </tr>
- </table> -->
- <div id="out_Div_L">
- <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
- <tr class="headerRow" height="30px">
- <apex:outputPanel layout="none" rendered="{!canEdit}">
- <td class="col_chk" align="center">
- <input type='checkbox' onClick='checkAll()' id="checker" />
- </td>
- </apex:outputPanel>
- <apex:repeat value="{!outputFieldList}" var="info">
- <td class="col_{!info.value}">
- {!info.label}
- </td>
- </apex:repeat>
- </tr>
- </table>
- </div>
- <div id="out_Div" >
- <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader">
- <tr class="headerRow" height="30px">
- <apex:repeat value="{!inputFieldList}" var="info">
- <td class="col_{!info.value} colViewing" >
- {!info.label}
- </td>
- </apex:repeat>
- <td class="col_UpDown"> 鍚戜笂/鍚戜笅 </td>
- <td class="col_Scroll"></td>
- </tr>
- </table>
- </div>
- <div style="clear:both;"/>
- <div id="in_Div_L">
- <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
- <apex:variable value="{!0}" var="Cnt" />
- <apex:repeat id="dataline_L" value="{!pageB.rowBList}" var="var">
- <tr class="dataRow" id="tableData_L_{!Cnt}" style="{!IF(var.isOddnumber, 'background-color : #EFF4FC;', '')}">
+ let index = awsDataId.indexOf('_');
+ console.log('show index = ' + index);
+ if(TrialUser[awsDataId.substring(0,index)] == null){
+ return
+ }
+ console.log('awsDataId Value:'+awsDataId);
+ let parentNode = document.getElementById(awsDataId);
+ let createDiv = document.createElement("div");
+ createDiv.id = awsDataId+"_PI";
+ let piInformation = TrialUser[awsDataId.substring(0,index)].trialUser
+ //let piInformation = 'Name:'+contact['943114607025717249'].lastName +'\n' +'Phone:'+contact['943114607025717249'].phone
+ createDiv.innerText = piInformation;
+ let x=window.event.x;
+ let y=window.event.y;
+ createDiv.style.left=x;
+ createDiv.style.top=y;
+ createDiv.style.background="#dddddd";
+ createDiv.style.position = "absolute";
+ parentNode.appendChild(createDiv);
+ parentNode.style.position = "relative";
+ }
+
+ function hidePIDiv(awsDataId){
+ if(awsDataId.length == 0){
+ return
+ }
+ let index = awsDataId.indexOf('_');
+ console.log('show index = ' + index);
+ if(TrialUser[awsDataId.substring(0,index)] == null){
+ return
+ }
+ document.getElementById(awsDataId+'_PI').remove();
+ }
+
+
+ function q3(){
+ var p = new Promise(function(resolve, reject){
+ console.log('saveRecordJS')
+ txIds = [];
+ trialuserMap = {};
+ var a = 0;
+ var b = 0;
+ debugger
+ let newCallBack = function newCallBack(result,indexNumber){
+ //璧嬪�糳ataId鍜宼rialUser
+ document.getElementById('allPage:allForm:dataBlock:dataline_R_aws:'+indexNumber+':EditAWSDataId').value = result.object[0].dataId;
+ //document.getElementById('allPage:allForm:dataBlock:dataline_R_aws:'+indexNumber+':TrialUserEncrypt').value = result.object[0].trialUserEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-30
+ document.getElementById('allPage:allForm:dataBlock:dataline_R:'+indexNumber+':inputField:6:inputField').value = result.object[0].trialUser;
+ // let transParameters = {
+ // txId: result.txId,
+ // isSuccess: 1
+ // };
+ // let confirmCallBack = function confirmCallBack(result){
+ // console.log('confirmCallBack = '+JSON.stringify(result))
+ // }
+ b++;
+ txIds.push(result.txId)
+ //AWSService.confirmTrans(staticResource.transactionUrl,JSON.stringify(transParameters),confirmCallBack,staticResource.token)
+ };
+ for(var i=0;i<rowBList.length;i++){
+ if(document.getElementById('allPage:allForm:dataBlock:dataline_L:'+i+':rowCheck').checked == true){
+ a++;
+ }
+ }
+ for(var i=0;i<rowBList.length;i++){
+ if(document.getElementById('allPage:allForm:dataBlock:dataline_L:'+i+':rowCheck').checked == true){
+ //鍔犲瘑璇曠敤鑰�
+ let e = document.getElementById('allPage:allForm:dataBlock:dataline_R:'+i+':inputField:6:j_id86').children[0].children[0];
+ var trialUser = e.value;
+ trialuserMap['allPage:allForm:dataBlock:dataline_R:'+i+':inputField:6:j_id86'] = trialUser;
+ let consumApplyPayloadList = [];
+ let consumApplyPIData = new Object();
+ consumApplyPIData.trialUser = trialUser;
+ consumApplyPIData.sfRecordId = '';
+ consumApplyPayloadList.push(consumApplyPIData);
+ AWSService.postConsumTrial(staticResource.newUrl,i,JSON.stringify(consumApplyPayloadList),newCallBack,staticResource.token);
+ }
+ }
+ var id = setInterval(function(){
+ if(a == b){
+ console.log('a==b success')
+ resolve('success');
+ clearInterval(id);
+ }
+ },500);
+ });
+ return p;
+ }
+
+ function q4(){
+ debugger
+ let b = false;
+ for(var i=0;i<rowBList.length;i++){
+ if(document.getElementById('allPage:allForm:dataBlock:dataline_L:'+i+':rowCheck').checked == true){
+ b = true;
+ }
+ }
+ if(!b){
+ //unblockUI();
+ window.location.href='/apex/ConsumTrial?id=' + '{!parId}' + '&canedit=true&saveType=1';
+ return;
+ }
+ saveRecord();
+ }
+
+ function Trans(){
+ if(HasError()){
+ unblockUI();
+ for(var e in trialuserMap){
+ document.getElementById(e).children[0].children[0].value = trialuserMap[e];
+ }
+ return;
+ }
+ var x = 0;
+ let confirmCallBack = function confirmCallBack(result){
+ console.log('confirmCallBack = '+JSON.stringify(result))
+ x++;
+ if(x == txIds.length){
+ //refopener();
+ //unblockUI();
+ window.location.href='/apex/ConsumTrial?id=' + '{!parId}' + '&canedit=true&saveType=1';
+ }
+ }
+ for(var i=0;i<txIds.length;i++){
+ let transParameters = {
+ txId: txIds[i],
+ isSuccess: 1
+ };
+ AWSService.confirmTrans(staticResource.transactionUrl,JSON.stringify(transParameters),confirmCallBack,staticResource.token)
+ }
+ }
+
+ function saveRecordJS(){
+ if('{!pageB.fixMode}' != 'true'){
+ unblockUI();
+ return
+ }
+ q3().then(function(data){
+ return q4(data);
+ })
+ //unblockUI();
+ }
+ //2022 02 24 寮犲崕寤� display PI Data end
+ </script>
+ <apex:pageMessages id="message"/>
+ <!-- oncomplete="clearApplyValue(); return false;" -->
+ <apex:actionFunction name="passApplyMsgToController" action="{!showApplyMsg}" rerender="allForm">
+ <apex:param name="applyMsg" value="" />
+ <apex:param name="applyMsgType" value="" />
+ </apex:actionFunction>
+ <apex:actionFunction name="sendEmail" action="{!sendEmail}" rerender="allForm" oncomplete="unblockUI();">
+ <apex:param name="emailBody" value="" />
+ </apex:actionFunction>
+ <apex:actionFunction name="saveRecord" action="{!saveRecord}" oncomplete="Trans();" rerender="allForm"/>
+ <apex:inputHidden id="clearApplyFlagId" />
+ <apex:outputPanel id="pageallPanel">
+ <apex:pageBlock id="searchBlock">
+ <apex:outputPanel layout="none" rendered="{!showEditButton}">
+ <table class="searchTable" style="width:100%">
+ <tr>
<apex:outputPanel layout="none" rendered="{!canEdit}">
- <td class="dataCellBorder1 col_chk" align="center">
- <apex:inputCheckbox styleClass="rowchkcls" value="{!var.checked}" id="rowCheck" disabled="{!!var.canChange}"/>
+ <td>
+ <!-- 灞曠ず/婕旂ず -->
+ {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Show_demonstration__c.label}
+ <!-- <apex:inputField id="Show_demonstration" value="{!pageB.caesdInput.Show_demonstration__c}"/> -->
+ <apex:selectList id="ShowDemonstration" value="{!pageB.caesdInput.Show_demonstration__c}" size="1">
+ <apex:selectOptions value="{!ShowDemonstrationOps}"/>
+ </apex:selectList>
+ </td>
+ <td>
+ <!-- 鏈紡绫诲埆 -->
+ {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Operation_Type__c.label}
+ <apex:selectList id="OperationType" value="{!pageB.caesdInput.Operation_Type__c}" size="1">
+ <apex:selectOptions value="{!OperationTypeOps}"/>
+ </apex:selectList>
+ </td>
+ <td>
+ <!-- 棰勮浣跨敤鏃� -->
+ {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Consum_Start_Date__c.label}
+ <apex:inputField id="ConsumStartDate" value="{!pageB.caesdInput.Consum_Start_Date__c}"/>
+ </td>
+ <td>
+ <!-- 鐥呬緥/鍔ㄧ墿鑴忓櫒 -->
+ {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Case_OR_animal_organ__c.label}
+ <apex:selectList id="CaseOrAnimalOrgan" value="{!pageB.caesdInput.Case_OR_animal_organ__c}" size="1">
+ <apex:selectOptions value="{!Case_OR_animal_organOpsHead}"/>
+ </apex:selectList>
+ </td>
+ <td>
+ <!-- 璇曠敤鑰� -->
+ {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Trial_User__c.label}
+ <apex:inputField id="TrialUser" value="{!pageB.caesdInput.Trial_User__c}"/>
+ <!-- <script>
+ sfdcPage.appendToOnloadQueue(function () {
+ var queryBack = function queryBack(data) {
+ console.log('data = ' + data);
+ document.getElementById('{!pageB.caesdInput.AWS_Data_Id__c}') = data.object.trialUser;
+ };
+ AWSService.query(staticResources.queryUrl, '{!pageB.caesdInput.AWS_Data_Id__c}', queryBack, staticResources.token);
+ });
+ </script> -->
+ </td>
+ <td>
+ <!-- 璺熷彴鑰� -->
+ {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Follower_User__c.label}:
+ <apex:inputField id="FollowerUser" value="{!pageB.caesdInput.Follower_User__c}"/>
+ </td>
+ </apex:outputPanel>
+ <!-- </tr> -->
+ <!-- <tr> -->
+ <td>
+ <!-- </td> -->
+ <!-- <td colspan="5"> -->
+ <span style="margin-left: 10px;">
+ <apex:commandButton value="缂栬緫" rendered="{!canEdit}" onclick="blockme();" action="{!changeFixModel}" reRender="allForm" oncomplete="unblockUI();windowResize();"/>
+ <apex:commandButton value="缂栬緫" style="float: right; margin-right: 40px;" rendered="{!AND(canEdit == false, redOnly == false)}" onclick="var w = window.open('/apex/ConsumTrial?id={!parId}&canedit=true', '缂栬緫璇曠敤琛ㄧ敾闈�', 'width='+(window.screen.width-200)+',height='+(window.screen.height-200)+',left=100,top=100'); w.focus(); return false;"/>
+ </span>
+ <span style="margin-left: 10px;">
+ <apex:commandButton value="閫傜敤" rendered="{!canEdit}" onclick="applyJs();return false;"/>
+ </span>
+ <span style="margin-left: 10px;">
+ <apex:commandButton value="淇濆瓨" onclick="blockme();saveRecordJS(); return false;" rendered="{!canEdit}"/>
+ </span>
+ </td>
+ </tr>
+ </table>
+ </apex:outputPanel>
+ </apex:pageBlock>
+ <apex:pageBlock id="dataBlock" tabStyle="Report">
+ <apex:inputHidden id="currentPageRecordCnt" value="{!pageB.currentPageRecordCnt}"/>
+ <!-- <table id="msgtable">
+ <tr>
+ <td>
+ <apex:outputPanel id="message">
+ <apex:pageMessages />
+ </apex:outputPanel>
+ </td>
+ </tr>
+ </table> -->
+ <div id="out_Div_L">
+ <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
+ <tr class="headerRow" height="30px">
+ <apex:outputPanel layout="none" rendered="{!canEdit}">
+ <td class="col_chk" align="center">
+ <input type='checkbox' onClick='checkAll()' id="checker" />
</td>
</apex:outputPanel>
<apex:repeat value="{!outputFieldList}" var="info">
- <td class="dataCellBorder1 {!'col_' + info.value}"><apex:outputField value="{!var.rnd[info.value]}" /></td>
- </apex:repeat>
- </tr>
- <apex:variable value="{!Cnt+1}" var="Cnt" />
- </apex:repeat>
- </table>
- </div>
- <apex:repeat id="dataline_R_aws" value="{!pageB.rowBList}" var="var">
- <apex:inputHidden value="{!var.rnd.AWS_Data_Id__c}" id="EditAWSDataId"/>
- <!-- <apex:inputHidden value="{!var.rnd.Trial_User_Encrypt__c}" id="TrialUserEncrypt"/> zhj 鏂版柟妗堟敼閫� 2022-12-30 -->
- </apex:repeat>
- <div id="in_Div" style="overflow:auto;">
- <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData">
- <apex:variable value="{!0}" var="Cnt_R" />
- <apex:repeat id="dataline_R" value="{!pageB.rowBList}" var="var">
- <tr id="tableData_R_{!Cnt_R}" class="dataRow" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" style="{!IF(var.isOddnumber, 'background-color : #EFF4FC;', '')}">
- <apex:repeat value="{!inputFieldList}" var="info" id="inputField">
- <td class="dataCellBorder1 intf {!info.value} col_{!info.value}" id="{! IF(info.value=='Trial_User__c',var.rnd.AWS_Data_Id__c+'_'+var.rnd.Id,info.value)}" onmouseover="showPIDiv('{! IF(info.value=='Trial_User__c',var.rnd.AWS_Data_Id__c+'_'+var.rnd.Id,'')}')" onmouseout="hidePIDiv('{! IF(info.value=='Trial_User__c',var.rnd.AWS_Data_Id__c+'_'+var.rnd.Id,'')}')">
- <apex:outputPanel rendered="{!(contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true && info.value != 'Degree_Of_Importance__c'}">
- <!-- onchange="setChangeFlg('{!var.lineNo}')" -->
- <apex:outputPanel rendered="{!info.value != 'Case_OR_animal_organ__c'}">
- <apex:inputField id="inputField" value="{!var.rnd[info.value]}" onchange="setChangeFlg('{!var.lineNo - 1}')" style="{!IF(info.value == 'Follower_User__c', 'width: 75%; ', '')}"/>
- <script>
- if( document.getElementById('{!$Component.inputField}' + ':inputField_mlktp')){
- document.getElementById('{!$Component.inputField}' + ':inputField_mlktp').style.display="none" ;
- }
- </script>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!info.value == 'Case_OR_animal_organ__c'}">
- <apex:selectList value="{!var.rnd.Case_OR_animal_organ__c}" multiselect="false" size="1">
- <apex:selectOptions value="{!Case_OR_animal_organOps}"/>
- </apex:selectList>
- </apex:outputPanel>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!(contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true && info.value == 'Degree_Of_Importance__c'}">
- <input id="Degree_Of_Importance__c" value="{!var.rnd[info.value]}" disabled="true"/>
- <apex:inputHidden value="{!var.rnd[info.value]}"/>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!((contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true) == false}">
- <apex:outputField value="{!var.rnd[info.value]}"/>
- </apex:outputPanel>
+ <td class="col_{!info.value}">
+ {!info.label}
</td>
</apex:repeat>
- <td class="dataCellBorder2 col_UpDown" id="row{!Cnt_R}">
- <apex:outputPanel rendered="{!pageB.fixMode}">
- <button value="鈫戔啈" id="top" onclick="blockme(); moveToTop('row{!Cnt_R}', true, '{!var.maxDegree_Of_Importance}'); return false;">鈫戔啈</button>
- <button value="鈫�" id="up" onclick="blockme(); resetMove('row{!Cnt_R}', true, '{!var.maxDegree_Of_Importance}'); return false;">鈫�</button>|
- <button value="鈫�" id="down" onclick="blockme(); resetMove('row{!Cnt_R}', false, '{!var.maxDegree_Of_Importance}'); return false;">鈫�</button>
- <button value="鈫撯啌" id="bottom" onclick="blockme(); moveToTop('row{!Cnt_R}', false, '{!var.maxDegree_Of_Importance}'); return false;">鈫撯啌</button>
- </apex:outputPanel>
- <apex:inputText value="{!var.lineNo}" styleClass="ordernocls" style="display:none;"/>
- <!-- <apex:inputHidden value="{!var.rnd.Degree_Of_Importance__c}"/> -->
- </td>
- <td class="col_Scroll"></td>
-
</tr>
- <apex:variable value="{!Cnt_R+1}" var="Cnt_R" />
-
- </apex:repeat>
- </table>
- </div>
- </apex:pageBlock>
- <script type="text/javascript">
- function runSFDCAddRemote(MetadataConnectionWarning) {
- if (MetadataConnectionWarning) SFDCAddRemote('{!$Api.Session_ID}');
- }
- function sortTableJs(key) {
- // blockme();
- sortTablefunc(key);
- }
-
- j$(function() {
- var tableWidth = 0;
- j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
- var colClass = getColClassName(this);
- if (colClass != 'col_Scroll') {
- var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
- tableWidth += headerCol.width();
+ </table>
+ </div>
+ <div id="out_Div" >
+ <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader">
+ <tr class="headerRow" height="30px">
+ <apex:repeat value="{!inputFieldList}" var="info">
+ <td class="col_{!info.value} colViewing" >
+ {!info.label}
+ </td>
+ </apex:repeat>
+ <td class="col_UpDown"> 鍚戜笂/鍚戜笅 </td>
+ <td class="col_Scroll"></td>
+ </tr>
+ </table>
+ </div>
+ <div style="clear:both;"/>
+ <div id="in_Div_L">
+ <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
+ <apex:variable value="{!0}" var="Cnt" />
+ <apex:repeat id="dataline_L" value="{!pageB.rowBList}" var="var">
+ <tr class="dataRow" id="tableData_L_{!Cnt}" style="{!IF(var.isOddnumber, 'background-color : #EFF4FC;', '')}">
+ <apex:outputPanel layout="none" rendered="{!canEdit}">
+ <td class="dataCellBorder1 col_chk" align="center">
+ <apex:inputCheckbox styleClass="rowchkcls" value="{!var.checked}" id="rowCheck" disabled="{!!var.canChange}"/>
+ </td>
+ </apex:outputPanel>
+ <apex:repeat value="{!outputFieldList}" var="info">
+ <td class="dataCellBorder1 {!'col_' + info.value}"><apex:outputField value="{!var.rnd[info.value]}" /></td>
+ </apex:repeat>
+ </tr>
+ <apex:variable value="{!Cnt+1}" var="Cnt" />
+ </apex:repeat>
+ </table>
+ </div>
+ <apex:repeat id="dataline_R_aws" value="{!pageB.rowBList}" var="var">
+ <apex:inputHidden value="{!var.rnd.AWS_Data_Id__c}" id="EditAWSDataId"/>
+ <!-- <apex:inputHidden value="{!var.rnd.Trial_User_Encrypt__c}" id="TrialUserEncrypt"/> zhj 鏂版柟妗堟敼閫� 2022-12-30 -->
+ </apex:repeat>
+ <div id="in_Div" style="overflow:auto;">
+ <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData">
+ <apex:variable value="{!0}" var="Cnt_R" />
+ <apex:repeat id="dataline_R" value="{!pageB.rowBList}" var="var">
+ <tr id="tableData_R_{!Cnt_R}" class="dataRow" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" style="{!IF(var.isOddnumber, 'background-color : #EFF4FC;', '')}">
+ <apex:repeat value="{!inputFieldList}" var="info" id="inputField">
+ <td class="dataCellBorder1 intf {!info.value} col_{!info.value}" id="{! IF(info.value=='Trial_User__c',var.rnd.AWS_Data_Id__c+'_'+var.rnd.Id,info.value)}" onmouseover="showPIDiv('{! IF(info.value=='Trial_User__c',var.rnd.AWS_Data_Id__c+'_'+var.rnd.Id,'')}')" onmouseout="hidePIDiv('{! IF(info.value=='Trial_User__c',var.rnd.AWS_Data_Id__c+'_'+var.rnd.Id,'')}')">
+ <apex:outputPanel rendered="{!(contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true && info.value != 'Degree_Of_Importance__c'}">
+ <!-- onchange="setChangeFlg('{!var.lineNo}')" -->
+ <apex:outputPanel rendered="{!info.value != 'Case_OR_animal_organ__c'}">
+ <apex:inputField id="inputField" value="{!var.rnd[info.value]}" onchange="setChangeFlg('{!var.lineNo - 1}')" style="{!IF(info.value == 'Follower_User__c', 'width: 75%; ', '')}"/>
+ <script>
+ if( document.getElementById('{!$Component.inputField}' + ':inputField_mlktp')){
+ document.getElementById('{!$Component.inputField}' + ':inputField_mlktp').style.display="none" ;
+ }
+ </script>
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!info.value == 'Case_OR_animal_organ__c'}">
+ <apex:selectList value="{!var.rnd.Case_OR_animal_organ__c}" multiselect="false" size="1">
+ <apex:selectOptions value="{!Case_OR_animal_organOps}"/>
+ </apex:selectList>
+ </apex:outputPanel>
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!(contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true && info.value == 'Degree_Of_Importance__c'}">
+ <input id="Degree_Of_Importance__c" value="{!var.rnd[info.value]}" disabled="true"/>
+ <apex:inputHidden value="{!var.rnd[info.value]}"/>
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!((contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true) == false}">
+ <apex:outputField value="{!var.rnd[info.value]}"/>
+ </apex:outputPanel>
+ </td>
+ </apex:repeat>
+ <td class="dataCellBorder2 col_UpDown" id="row{!Cnt_R}">
+ <apex:outputPanel rendered="{!pageB.fixMode}">
+ <button value="鈫戔啈" id="top" onclick="blockme(); moveToTop('row{!Cnt_R}', true, '{!var.maxDegree_Of_Importance}'); return false;">鈫戔啈</button>
+ <button value="鈫�" id="up" onclick="blockme(); resetMove('row{!Cnt_R}', true, '{!var.maxDegree_Of_Importance}'); return false;">鈫�</button>|
+ <button value="鈫�" id="down" onclick="blockme(); resetMove('row{!Cnt_R}', false, '{!var.maxDegree_Of_Importance}'); return false;">鈫�</button>
+ <button value="鈫撯啌" id="bottom" onclick="blockme(); moveToTop('row{!Cnt_R}', false, '{!var.maxDegree_Of_Importance}'); return false;">鈫撯啌</button>
+ </apex:outputPanel>
+ <apex:inputText value="{!var.lineNo}" styleClass="ordernocls" style="display:none;"/>
+ <!-- <apex:inputHidden value="{!var.rnd.Degree_Of_Importance__c}"/> -->
+ </td>
+ <td class="col_Scroll"></td>
+
+ </tr>
+ <apex:variable value="{!Cnt_R+1}" var="Cnt_R" />
+
+ </apex:repeat>
+ </table>
+ </div>
+ </apex:pageBlock>
+ <script type="text/javascript">
+ function runSFDCAddRemote(MetadataConnectionWarning) {
+ if (MetadataConnectionWarning) SFDCAddRemote('{!$Api.Session_ID}');
+ }
+ function sortTableJs(key) {
+ // blockme();
+ sortTablefunc(key);
+ }
+
+ j$(function() {
+ var tableWidth = 0;
+ j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
+ var colClass = getColClassName(this);
+ if (colClass != 'col_Scroll') {
+ var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
+ tableWidth += headerCol.width();
+ }
+ });
+ j$('table#tableData').css('width', (1260 + 2) + 'px');
+ j$('table#tableHeader').css('width', (1260 + 2) + 'px');
+
+ // list 銇� headerRow 銇� td銇� toggleWidth() 銈掕拷鍔�
+ bindTdToggleWidth();
+ if( document.getElementById('allPage:allForm:searchBlock:FollowerUser_mlktp')){
+ document.getElementById('allPage:allForm:searchBlock:FollowerUser_mlktp').style.display="none" ;
}
});
- j$('table#tableData').css('width', (1260 + 2) + 'px');
- j$('table#tableHeader').css('width', (1260 + 2) + 'px');
-
- // list 銇� headerRow 銇� td銇� toggleWidth() 銈掕拷鍔�
- bindTdToggleWidth();
- if( document.getElementById('allPage:allForm:searchBlock:FollowerUser_mlktp')){
- document.getElementById('allPage:allForm:searchBlock:FollowerUser_mlktp').style.display="none" ;
- }
- });
- // var elements = document.getElementsByTagName("select");
- // for (i = 0; i < elements.length; i++) {
- // var id = elements[i].id;
- // if (id.length > 5 && id.substring(id.length - 5, id.length) == 'mlktp') {
- // elements[i].style.display = "none";
- // }
- // }
- // var tbl_l = document.getElementById("tableData_L");
- // var input_l = tbl_l.getElementsByTagName("input");
- // for (i = 0; i < input_l.length; i++) {
- // var id = input_l[i].id + '_lkid';
- // if (document.getElementById(id) != null) {
- // input_l[i].style.width = "75%";
- // }
- // }
- // var tbl = document.getElementById("tableData");
- // var input = tbl.getElementsByTagName("input");
- // for (i = 0; i < input.length; i++) {
- // var id = input[i].id + '_lkid';
- // if (document.getElementById(id) != null) {
- // input[i].style.width = "75%";
- // }
- // }
- //a銈掋偗銉儍銈仚銈嬮殯銇�乼d銈ゃ儥銉炽儓銈掑疅瑁呫仐銇亜
- // j$("a[name='out_Div_a']").bind("click",function(event){
- // event.stopPropagation();
- // });
- windowResize();
- j$("td.dataCellBorder1 input").change(function(){
- var names = this.name.split(':');
- var i = names[names.length - 4];
- j$("input.rowchkcls")[i].checked = true;
- })
- </script>
- </apex:outputPanel>
- </apex:form>
-</apex:page>
\ No newline at end of file
+ // var elements = document.getElementsByTagName("select");
+ // for (i = 0; i < elements.length; i++) {
+ // var id = elements[i].id;
+ // if (id.length > 5 && id.substring(id.length - 5, id.length) == 'mlktp') {
+ // elements[i].style.display = "none";
+ // }
+ // }
+ // var tbl_l = document.getElementById("tableData_L");
+ // var input_l = tbl_l.getElementsByTagName("input");
+ // for (i = 0; i < input_l.length; i++) {
+ // var id = input_l[i].id + '_lkid';
+ // if (document.getElementById(id) != null) {
+ // input_l[i].style.width = "75%";
+ // }
+ // }
+ // var tbl = document.getElementById("tableData");
+ // var input = tbl.getElementsByTagName("input");
+ // for (i = 0; i < input.length; i++) {
+ // var id = input[i].id + '_lkid';
+ // if (document.getElementById(id) != null) {
+ // input[i].style.width = "75%";
+ // }
+ // }
+ //a銈掋偗銉儍銈仚銈嬮殯銇�乼d銈ゃ儥銉炽儓銈掑疅瑁呫仐銇亜
+ // j$("a[name='out_Div_a']").bind("click",function(event){
+ // event.stopPropagation();
+ // });
+ windowResize();
+ j$("td.dataCellBorder1 input").change(function(){
+ var names = this.name.split(':');
+ var i = names[names.length - 4];
+ j$("input.rowchkcls")[i].checked = true;
+ })
+ </script>
+ </apex:outputPanel>
+ </apex:form>
+ </apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/Maintenance.page b/force-app/main/default/pages/Maintenance.page
index f3eeac9..d806108 100644
--- a/force-app/main/default/pages/Maintenance.page
+++ b/force-app/main/default/pages/Maintenance.page
@@ -1,3 +1,3 @@
-<apex:page standardController="Account">
+<apex:page standardController="Account" lightningStylesheets="true">
<h1>姝e湪缁存姢涓�</h1>
</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/OFSRepairConsignPDFOuter.page b/force-app/main/default/pages/OFSRepairConsignPDFOuter.page
index 79df56f..7af0ea6 100644
--- a/force-app/main/default/pages/OFSRepairConsignPDFOuter.page
+++ b/force-app/main/default/pages/OFSRepairConsignPDFOuter.page
@@ -1,4 +1,4 @@
-<apex:page controller="OFSRepairConsignPDFOuterController" showHeader="false" sidebar="false" action="{!init}" applyHtmlTag="false" id="Page">
+<apex:page controller="OFSRepairConsignPDFOuterController" showHeader="false" sidebar="false" action="{!init}" applyHtmlTag="false" id="Page" lightningStylesheets="true">
<head>
<meta name="viewport" content="user-scalable=yes" />
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
diff --git a/force-app/main/default/pages/PAEDecisionRecord.page b/force-app/main/default/pages/PAEDecisionRecord.page
index 6332d41..0660da2 100644
--- a/force-app/main/default/pages/PAEDecisionRecord.page
+++ b/force-app/main/default/pages/PAEDecisionRecord.page
@@ -1,4 +1,4 @@
-<apex:page action="{!init}" extensions="PAEDecisionRecordController" id="allPage" showheader="false" sidebar="false" standardcontroller="PAE_DecisionRecord__c" title="PAE鍒ゅ畾璁板綍">
+<apex:page action="{!init}" extensions="PAEDecisionRecordController" id="allPage" showheader="false" sidebar="false" standardcontroller="PAE_DecisionRecord__c" title="PAE鍒ゅ畾璁板綍" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}">
</apex:stylesheet>
<apex:includescript value="{!URLFOR($Resource.jquery183minjs)}">
@@ -70,6 +70,23 @@
blockme();
InsertRow();
+ }
+ var selectedSize = 0;
+ var pageLimit = {!pageLimit};
+ function CheckSize(j){
+ var a = j.id;
+ var productCount = j$(escapeVfId(a)).attr('checked');
+ if (productCount == 'checked') {
+ if(selectedSize >= pageLimit){
+ window.alert("椤甸潰鎵�閫夋暟鎹笉鑳借秴杩�500鏉�");
+ j$(escapeVfId(a)).attr('checked',false);
+ return;
+ }
+ selectedSize ++;
+ } else {
+ selectedSize --;
+ }
+ //alert(selectedSize);
}
// 淇濆瓨骞跺叧闂�
function SaveAndCloses(onlySave) {
@@ -172,12 +189,12 @@
td.columuslowercolour {
background-color: red;
- text-align: right;
+ text-align: left;
}
td.columuscuperolour {
background-color: yellow;
- text-align: right;
+ text-align: left;
}
</style>
<apex:form id="allForm">
@@ -210,35 +227,22 @@
<apex:outputpanel id="allPanel">
<apex:pageblock id="allBlock">
<apex:pageblock id="unEditable" rendered="{!editAble}" title="{!IF(RecordTypeName = 'ASRCDecision' , 'Intake universal code 缂栬緫鐢婚潰', 'Final universal code 缂栬緫鐢婚潰')}">
- <table cellspacing="10">
+ <table cellspacing="8">
<colgroup>
- <col width="7%">
- </col>
- <col width="10%">
- </col>
- <col width="7%">
- </col>
- <col width="7%">
- </col>
- <col width="7%">
- </col>
- <col width="7%">
- </col>
- <col width="7%">
- </col>
- <col width="7%">
- </col>
- <col width="7%">
- </col>
- <col width="7%">
- </col>
- <col width="7%">
- </col>
+ <col width="15%"/>
+ <col width="10%"/>
+ <col width="15%"/>
+ <col width="15%"/>
+ <col width="15%"/>
+ <col width="10%"/>
+ <col width="15%"/>
+ <col width="15%"/>
+ <col width="15%"/>
+ <col width="15%"/>
+ <col width="15%"/>
<apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASACDecision' , true, false)}">
- <col width="15%">
- </col>
- <col width="10%">
- </col>
+ <col width="15%"/>
+ <col width="15%"/>
</apex:outputpanel>
</colgroup>
<tr>
@@ -257,12 +261,12 @@
<!-- 2020/07/28 taoqz end -->
<apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' , true, false)}">
<!-- <th>AS-RC</th> -->
- <td align="right">
+ <td align="left">
{!$ObjectType.Repair__c.fields.Repair_ConfirmationDate__c.label}锛�
</td>
</apex:outputpanel>
<apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASACDecision' , true, false)}">
- <td align="right">
+ <td align="left">
{!$ObjectType.Repair__c.fields.OCSM_RC_CordingDate__c.label}锛�
</td>
</apex:outputpanel>
@@ -272,13 +276,13 @@
</td>
<apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' , true, false)}">
<!-- <th>AS-RC</th> -->
- <td align="right">
+ <td align="left">
{!$ObjectType.Repair__c.fields.Repair_Authenticator__c.label}锛�
</td>
</apex:outputpanel>
<apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASACDecision' , true, false)}">
<!-- <th>AS-AC</th> -->
- <td align="right">
+ <td align="left">
{!$ObjectType.Repair__c.fields.OCSM_RC_CordingUser__c.label}锛�
</td>
</apex:outputpanel>
@@ -288,7 +292,7 @@
</td>
<apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' && repa != null, true, false)}">
<!-- <th>AS-RC</th> -->
- <td align="right">
+ <td align="left">
{!$ObjectType.Repair__c.fields.SAP_Transfer_time__c.label}锛�
</td>
<td align="left">
@@ -297,7 +301,7 @@
</td>
</apex:outputpanel>
<apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASACDecision' , true, false)}">
- <td align="right">
+ <td align="left">
鍐嶇幇缁撴灉纭锛�
</td>
<td align="left" style="{!IF(rdRecord.PAE_reappear_confirm__c = '鏈‘璁�' , 'color: red;font-weight: 800;', '')}">
@@ -321,14 +325,14 @@
</td>
</apex:outputpanel>
<!-- <apex:outputPanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' , true, false)}">
- <td align="right" > 杩涜淇悊鐨勫垽瀹氱粨鏋滐細</td>
+ <td align="left" > 杩涜淇悊鐨勫垽瀹氱粨鏋滐細</td>
<td align="left" >
<apex:InputField value="{!repa.Repair_Determine_result__c}"/>
</td>
</apex:outputPanel> -->
<!-- update by rentongxiao 2020-09-21 start -->
<!-- <apex:outputPanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision', true, false)}">
- <td align="right" > {!$ObjectType.Repair__c.fields.if_Repair_Allowed__c.label}锛�</td>
+ <td align="left" > {!$ObjectType.Repair__c.fields.if_Repair_Allowed__c.label}锛�</td>
<td align="left" >
<apex:InputField id="repairDetermineResult" value="{!repa.if_Repair_Allowed__c}" rendered="{!isOSH}"/>
<apex:outputField id="repairDetermineResultout" value="{!repa.if_Repair_Allowed__c}" rendered="{!!isOSH}"/>
@@ -337,7 +341,7 @@
</apex:outputPanel>
<apex:outputPanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision', true, false)}">
- <td align="right" > {!$ObjectType.Repair__c.fields.NotAllowedReason__c.label}锛�</td>
+ <td align="left" > {!$ObjectType.Repair__c.fields.NotAllowedReason__c.label}锛�</td>
<td align="left" colspan="3">
<apex:InputField id="NotAllowedReason" value="{!repa.NotAllowedReason__c}" rendered="{!isOSH}"/>
<apex:outputField id="NotAllowedReasontout" value="{!repa.NotAllowedReason__c}" rendered="{!!isOSH}"/>
@@ -345,7 +349,7 @@
</apex:outputPanel> -->
<apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' && repa != null, true, false)}">
- <td align="right">
+ <td align="left">
{!$ObjectType.Repair__c.fields.if_Repair_Allowed__c.label}锛�
</td>
<td align="left">
@@ -356,7 +360,7 @@
</td>
</apex:outputpanel>
<apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' && repa != null, true, false)}">
- <td align="right">
+ <td align="left">
{!$ObjectType.Repair__c.fields.NotAllowedReason__c.label}锛�
</td>
<td align="left" colspan="3">
@@ -369,8 +373,6 @@
<!-- update by rentongxiao 2020-09-21 end -->
</tr>
<tr>
- <td colspan="4">
- </td>
<apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASRCDecision' && repa != null , true, false)}">
<!-- <th>AS-RC</th> -->
<td align="left">
@@ -394,43 +396,63 @@
</tr>
</table>
<apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASACDecision'&& rdRecord.PAE_reappear_confirm__c = '鏈‘璁�',false , true)}">
- <table style="width:100%; {!IF(RecordTypeName = 'ASACDecision'&& rdRecord.PAE_reappear_confirm__c = '鏈‘璁�', 'display: none;', '')}">
+ <table style="width:100%; {!IF(RecordTypeName = 'ASACDecision'&& rdRecord.PAE_reappear_confirm__c = '鏈‘璁�', 'display: none;', '')}" cellspacing="8">
+ <colgroup>
+ <col width="1%"/>
+ <col width="1%"/>
+ <col width="1%"/>
+ <col width="1%"/>
+ <col width="1%"/>
+ <col width="1%"/>
+ <col width="25%"/>
+ <col width="25%"/>
+ <col width="15%"/>
+ <col width="15%"/>
+ <col width="15%"/>
+ </colgroup>
<tr>
<td>
- <!-- <apex:commandButton onclick="SaveAndCloses(false);" value="1淇濆瓨骞跺叧闂�" style="margin-left:30px;width:80px;float:right" rerender="unEditable,message" oncomplete="unblockUI();"/> -->
- <apex:commandbutton onclick="ReturnRepairInterface();return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:80px;float:right" value="鍏抽棴">
+ <!-- <apex:commandButton onclick="SaveAndCloses(false);" value="1淇濆瓨骞跺叧闂�" style="margin-left:30px;width:80px;float:left" rerender="unEditable,message" oncomplete="unblockUI();"/> -->
+ <apex:commandbutton onclick="ReturnRepairInterface();return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:80px;float:left" value="鍏抽棴">
</apex:commandbutton>
- <apex:commandbutton disabled="{!IF(((repa.ETQ_UPLOAD_ERROR_GROUP__c != 'Intake') || editFlag) && savebuton == false && !(RecordTypeName='ASRCDecision'&&OCSM_QARA='1'),true,false)}" onclick="SaveAndCloses(1);return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:80px;float:right" value="淇濆瓨">
+ </td>
+ <td>
+ <apex:commandbutton disabled="{!IF(((repa.ETQ_UPLOAD_ERROR_GROUP__c != 'Intake') || editFlag) && savebuton == false && !(RecordTypeName='ASRCDecision'&&OCSM_QARA='1'),true,false)}" onclick="SaveAndCloses(1);return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:80px;float:left" value="淇濆瓨">
</apex:commandbutton>
- <!-- <apex:commandButton value="淇濆瓨骞跺叧闂�" disabled="{!editFlag}" rendered="{!IF((!isOSH && OCSM_QARA != '1' && RecordTypeName = 'ASRCDecision' && repa != null) || (RecordTypeName = 'ASACDecision') || (RecordTypeName = 'ASACDecision' && QISReportId != null),true,false)}" style="margin-left:30px;width:80px;float:right" onclick="SaveAndCloses(2);return false;" rerender="unEditable,message" oncomplete="unblockUI();" /> -->
+ </td>
+ <!-- <apex:commandButton value="淇濆瓨骞跺叧闂�" disabled="{!editFlag}" rendered="{!IF((!isOSH && OCSM_QARA != '1' && RecordTypeName = 'ASRCDecision' && repa != null) || (RecordTypeName = 'ASACDecision') || (RecordTypeName = 'ASACDecision' && QISReportId != null),true,false)}" style="margin-left:30px;width:80px;float:left" onclick="SaveAndCloses(2);return false;" rerender="unEditable,message" oncomplete="unblockUI();" /> -->
<!-- 20200810 Gzw 淇敼淇濆瓨骞跺叧闂寜閽紝Final鏃舵樉绀�
- <apex:commandButton value="淇濆瓨骞跺叧闂�" disabled="{!editFlag}" rendered="{!IF(((repa != null && !((repa.Repair_Determine__c = '瑕�' && isOSH)||repa.Repair_Determine__c != '瑕�')) || (RecordTypeName = 'ASACDecision')),true,false)}" style="margin-left:30px;width:80px;float:right" onclick="SaveAndCloses(2);return false;" rerender="unEditable,message" oncomplete="unblockUI();" /> -->
- <apex:commandbutton disabled="{!editFlag}" onclick="SaveAndCloses(2);return false;" oncomplete="unblockUI();" rendered="{!IF(repa != null && RecordTypeName = 'ASACDecision',true,false)}" rerender="unEditable,message" style="margin-left:30px;width:80px;float:right" value="淇濆瓨骞跺叧闂�">
+ <apex:commandButton value="淇濆瓨骞跺叧闂�" disabled="{!editFlag}" rendered="{!IF(((repa != null && !((repa.Repair_Determine__c = '瑕�' && isOSH)||repa.Repair_Determine__c != '瑕�')) || (RecordTypeName = 'ASACDecision')),true,false)}" style="margin-left:30px;width:80px;float:left" onclick="SaveAndCloses(2);return false;" rerender="unEditable,message" oncomplete="unblockUI();" /> -->
+ <td>
+ <apex:commandbutton disabled="{!editFlag}" onclick="SaveAndCloses(2);return false;" oncomplete="unblockUI();" rendered="{!IF(repa != null && RecordTypeName = 'ASACDecision',true,false)}" rerender="unEditable,message" style="margin-left:30px;width:80px;float:left" value="淇濆瓨骞跺叧闂�">
</apex:commandbutton>
+ </td>
<!-- When 瑕佷笉瑕佽繘琛屼慨鐞嗙殑鍒ゅ畾=瑕� -->
<!-- OSH screen锛歔纭畾骞禨AP鐢宠] -->
<!-- OCSM QARA screen [纭畾骞跺叧闂璢 -->
<!-- update by rentx 2020-10-26 start -->
- <!-- <apex:commandButton rendered="{!IF(((repa.Repair_Determine__c = '瑕�' && isOSH)||repa.Repair_Determine__c != '瑕�') && repa != null && RecordTypeName='ASRCDecision',true,false)}" value="纭畾骞禨AP鐢宠" style="margin-left:30px;width:100px;float:right" onclick="sendToSAPJS(2);return false;" rerender="unEditable,message" oncomplete="unblockUI();" disabled="{!IF(repa.SAP_Transfer_time__c != null || editFlag,true,false)}" /> -->
+ <!-- <apex:commandButton rendered="{!IF(((repa.Repair_Determine__c = '瑕�' && isOSH)||repa.Repair_Determine__c != '瑕�') && repa != null && RecordTypeName='ASRCDecision',true,false)}" value="纭畾骞禨AP鐢宠" style="margin-left:30px;width:100px;float:left" onclick="sendToSAPJS(2);return false;" rerender="unEditable,message" oncomplete="unblockUI();" disabled="{!IF(repa.SAP_Transfer_time__c != null || editFlag,true,false)}" /> -->
-
- <apex:commandbutton disabled="{!IF(repa.SAP_Transfer_time__c != null || editFlag,true,false)}" onclick="sendToSAPJS(2);return false;" oncomplete="unblockUI();" rendered="{!IF(((repa.Repair_Determine__c = '瑕�' && isOSH)||repa.Repair_Determine__c != '瑕�') && repa != null && RecordTypeName='ASRCDecision',true,false)}" rerender="unEditable,message" style="margin-left:30px;width:100px;float:right" value="纭畾骞禨AP鐢宠">
+ <td>
+ <apex:commandbutton disabled="{!IF(repa.SAP_Transfer_time__c != null || editFlag,true,false)}" onclick="sendToSAPJS(2);return false;" oncomplete="unblockUI();" rendered="{!IF(((repa.Repair_Determine__c = '瑕�' && isOSH)||repa.Repair_Determine__c != '瑕�') && repa != null && RecordTypeName='ASRCDecision',true,false)}" rerender="unEditable,message" style="margin-left:30px;width:120px;float:left" value="纭畾骞禨AP鐢宠">
</apex:commandbutton>
-
-
-
-
- <apex:commandbutton disabled="{!editFlag}" onclick="SaveAndCloses(2);return false;" oncomplete="unblockUI();" rendered="{!IF((repa.Repair_Determine__c = '瑕�' && OCSM_QARA == '1' && RecordTypeName = 'ASRCDecision' && repa != null) || (RecordTypeName = 'ASRCDecision' && QISReportId != null),true,false)}" rerender="unEditable,message" style="margin-left:30px;width:100px;float:right" value="纭畾骞跺叧闂�">
+ </td>
+ <td>
+ <apex:commandbutton disabled="{!editFlag}" onclick="SaveAndCloses(2);return false;" oncomplete="unblockUI();" rendered="{!IF((repa.Repair_Determine__c = '瑕�' && OCSM_QARA == '1' && RecordTypeName = 'ASRCDecision' && repa != null) || (RecordTypeName = 'ASRCDecision' && QISReportId != null),true,false)}" rerender="unEditable,message" style="margin-left:30px;width:100px;float:left" value="纭畾骞跺叧闂�">
</apex:commandbutton>
+ </td>
<!-- OCSM_QARA : {!OCSM_QARA}
OSH : {!isOSH} -->
<!-- update by rentx 2020-10-26 start -->
- <!-- <apex:commandButton value="鎻掑叆琛�" disabled="{!IF((RecordTypeName='ASRCDecision'&&OCSM_QARA='0')||(RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) || (RecordTypeName='ASRCDecision' && repa.SAP_Transfer_time__c != null),true,false)}" style="margin-left:30px;width:60px;float:right" onclick="InsertRows();return false;" rerender="unEditable,message" oncomplete="unblockUI();"/>
- <apex:commandButton value="鍙栨秷琛�" disabled="{!IF((RecordTypeName='ASRCDecision'&&OCSM_QARA='0')||(RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) || (RecordTypeName='ASRCDecision' && repa.SAP_Transfer_time__c != null),true,false)}" style="margin-left:30px;width:60px;float:right" onclick="SaveAndCloses(3);return false;" rerender="unEditable,message" oncomplete="unblockUI();"/> -->
- <apex:commandbutton disabled="{!IF((RecordTypeName = 'ASRCDecision' && OCSM_QARA = '0') && ((RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) && (repa.ETQ_UPLOAD_ERROR_GROUP__c != 'Intake')),true,false)}" onclick="InsertRows();return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:60px;float:right" value="鎻掑叆琛�">
+ <!-- <apex:commandButton value="鎻掑叆琛�" disabled="{!IF((RecordTypeName='ASRCDecision'&&OCSM_QARA='0')||(RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) || (RecordTypeName='ASRCDecision' && repa.SAP_Transfer_time__c != null),true,false)}" style="margin-left:30px;width:60px;float:left" onclick="InsertRows();return false;" rerender="unEditable,message" oncomplete="unblockUI();"/>
+ <apex:commandButton value="鍙栨秷琛�" disabled="{!IF((RecordTypeName='ASRCDecision'&&OCSM_QARA='0')||(RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) || (RecordTypeName='ASRCDecision' && repa.SAP_Transfer_time__c != null),true,false)}" style="margin-left:30px;width:60px;float:left" onclick="SaveAndCloses(3);return false;" rerender="unEditable,message" oncomplete="unblockUI();"/> -->
+ <td>
+ <apex:commandbutton disabled="{!IF((RecordTypeName = 'ASRCDecision' && OCSM_QARA = '0') && ((RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) && (repa.ETQ_UPLOAD_ERROR_GROUP__c != 'Intake')),true,false)}" onclick="InsertRows();return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:80px;float:left" value="鎻掑叆琛�">
</apex:commandbutton>
- <apex:commandbutton disabled="{!IF((RecordTypeName = 'ASRCDecision' && OCSM_QARA = '0') && ((RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) && (repa.ETQ_UPLOAD_ERROR_GROUP__c != 'Intake')),true,false)}" onclick="SaveAndCloses(3);return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:60px;float:right" value="鍙栨秷琛�">
+ </td>
+ <td>
+ <apex:commandbutton disabled="{!IF((RecordTypeName = 'ASRCDecision' && OCSM_QARA = '0') && ((RecordTypeName='ASACDecision'&&OCSM_Cording='0')||(editFlag) && (repa.ETQ_UPLOAD_ERROR_GROUP__c != 'Intake')),true,false)}" onclick="SaveAndCloses(3);return false;" oncomplete="unblockUI();" rerender="unEditable,message" style="margin-left:30px;width:80px;float:left" value="鍙栨秷琛�">
</apex:commandbutton>
<!-- update by rentx 2020-10-26 end -->
</td>
@@ -438,7 +460,7 @@
</table>
</apex:outputpanel>
<apex:outputpanel layout="none" rendered="{!IF(RecordTypeName = 'ASACDecision'&& rdRecord.PAE_reappear_confirm__c = '鏈‘璁�',true , false)}">
- <p style="text-align: right;padding-bottom: 10px;width:100%;font-weight: 800;">
+ <p style="text-align: left;padding-bottom: 10px;width:100%;font-weight: 800;">
鍐嶇幇缁撴灉鏈‘璁�,璇风偣鍑籌ntake universal code 缂栬緫 鎸夐挳鍓嶅幓纭
</p>
</apex:outputpanel>
diff --git a/force-app/main/default/pages/PAEDecisionRecordjump.page b/force-app/main/default/pages/PAEDecisionRecordjump.page
index 1adbfe8..c8b05f5 100644
--- a/force-app/main/default/pages/PAEDecisionRecordjump.page
+++ b/force-app/main/default/pages/PAEDecisionRecordjump.page
@@ -1,4 +1,4 @@
-<apex:page standardController="PAE_DecisionRecordDetail__c" sidebar="true">
+<apex:page standardController="PAE_DecisionRecordDetail__c" sidebar="true" lightningStylesheets="true">
<apex:form >
<apex style="font-size: 18px;">涓嶈兘鎵ц缂栬緫鎴栬�呭垹闄ゆ寚浠�</apex><br/>
<apex style="font-size: 18px;">璇风偣鍑�<apex:commandLink action="{!cancel}" value=" 杩欓噷 " style="color: blue;font-size: 20px;" />杩斿洖涓婚〉闈㈠悗鐐瑰嚮鎸夐挳 Intake universal code缂栬緫鍜孶niversal failure code缂栬緫鎿嶄綔</apex>
diff --git a/force-app/main/default/pages/PAEListjump.page b/force-app/main/default/pages/PAEListjump.page
index 753b058..d504f06 100644
--- a/force-app/main/default/pages/PAEListjump.page
+++ b/force-app/main/default/pages/PAEListjump.page
@@ -1,4 +1,4 @@
-<apex:page standardController="PAE_DecisionRecord__c" sidebar="true">
+<apex:page standardController="PAE_DecisionRecord__c" sidebar="true" lightningStylesheets="true">
<apex:form >
<apex style="font-size: 18px;">涓嶈兘鎵ц缂栬緫鎴栬�呭垹闄ゆ寚浠�</apex><br/>
<apex style="font-size: 18px;">璇风偣鍑�<apex:commandLink action="{!cancel}" value=" 杩欓噷 " style="color: blue;font-size: 20px;" />杩斿洖涓婚〉闈㈠悗鐐瑰嚮鎸夐挳 Intake universal code缂栬緫鍜孶niversal failure code缂栬緫鎿嶄綔</apex>
diff --git a/force-app/main/default/pages/RentalAgencyReceived.page b/force-app/main/default/pages/RentalAgencyReceived.page
index 1152ee6..f2cbd46 100644
--- a/force-app/main/default/pages/RentalAgencyReceived.page
+++ b/force-app/main/default/pages/RentalAgencyReceived.page
@@ -1,361 +1,362 @@
-<apex:page controller="RentalAgencyReceivedController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="鍔炰簨澶勬瑺鍝佺‘璁�">
- <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
- <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
- <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
- <apex:includeScript value="{!URLFOR($Resource.instascan)}"/>
- <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
-<style type="text/css">
- .hideDropdown select{
- display: none
- }
- .modal {
- display:none;
- position: fixed; /* Stay in place */
- z-index: 10; /* Sit on top */
- left: 0;
- top: 0;
- width: 100%; /* Full width */
- height: 100%; /* Full height */
- overflow: auto; /* Enable scroll if needed */
- background-color: rgb(0,0,0); /* Fallback color */
- background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
- }
-
- /* Modal Content/Box */
- .modal-content {
- background-color: #fefefe;
- margin-left: 6px;
- margin-top: 100px;
- padding: 20px;
- border: 1px solid #888;
- right: 5%;
- position: absolute;
- width: 200px;
- }
- table.list td{
- width:100px;
- border-width: 1px;
- }
- table.list td.col_chk {
- width:30px;
- }
- body .pbBody table.list tr.headerRow td, body .pbBody table.list tr.headerRow th {
- border-width: 1px;
- }
- .col_stockin {
- position: relative;
- display: inline-block;
- border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
- }
-
- /* Tooltip text */
- .col_stockin .tooltiptext {
- visibility: hidden;
- width: 200px;
- /*background-color: #fefdba;*/
- /*color: #fff;*/
- text-align: center;
- padding: 5px 0;
- border-radius: 6px;
-
- /* Position the tooltip text - see examples below! */
- position: absolute;
- z-index: 1;
- }
-
- /* Show the tooltip text when you mouse over the tooltip container */
- .col_stockin:hover .tooltiptext {
- visibility: visible;
- }
-</style>
-<script type="text/javascript">
-function checkMessage() {
- if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
- alert("淇濆瓨鎴愬姛");
- }
-}
-function filljsQR(qrcode) {
- if(!qrcode) return;
- // blockme();
- if(scanType == 1){
- j$("input[name$='SlipNo']").val(qrcode);
- }
- else{
- scanAndCheck(qrcode);
- }
- j$("#scanedqr").append("<li>"+qrcode+"</li>");
- j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
- // unblockUI();
-}
-
-function checkAll() {
- var checked = j$("input#checker").prop('checked')
- j$("table#tableData_L td.col_chk input[type=checkbox]:enabled:visible").each(function(){
- this.checked = checked;
- })
- if(checked) {
- // blockme();
- checkAllOK();
- }
-}
-var globalChecked = false;
-function checkGlobal() {
- globalChecked = !globalChecked;
- j$("table#tableData_L td.col_chk input[type=checkbox]:enabled:visible").each(function(){
- this.checked = globalChecked;
- })
- j$("input#checker").prop('checked', globalChecked);
- if(globalChecked) {
- // blockme();
- checkAllOK();
- }
-}
-function checkAllOK() {
- j$("#tableData_L td.col_chk input[name=qrcode]").each(function() {
- scanAndCheck(this.value);
- })
-}
-// 娆犲搧纭鍜宑ds杩炲姩
-function changeCDS(lostResult, follow) {
- var cds = j$(lostResult).parent().parent().find('td.col_cds select');
- if(lostResult.value == 'OK'){
- if(!lostResult.disabled) {
- cds.prop('disabled', false);
+<!-- 20230427 zq <apex:page controller="RentalAgencyReceivedController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="鍔炰簨澶勬瑺鍝佺‘璁�"> -->
+ <apex:page lightningStylesheets = "true" controller="RentalAgencyReceivedController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="鍔炰簨澶勬瑺鍝佺‘璁�">
+ <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.instascan)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
+ <style type="text/css">
+ .hideDropdown select{
+ display: none
}
- if(lostResult.value == 'OK' && follow) {
- cds.val('OK');
+ .modal {
+ display:none;
+ position: fixed; /* Stay in place */
+ z-index: 10; /* Sit on top */
+ left: 0;
+ top: 0;
+ width: 100%; /* Full width */
+ height: 100%; /* Full height */
+ overflow: auto; /* Enable scroll if needed */
+ background-color: rgb(0,0,0); /* Fallback color */
+ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
+ }
+
+ /* Modal Content/Box */
+ .modal-content {
+ background-color: #fefefe;
+ margin-left: 6px;
+ margin-top: 100px;
+ padding: 20px;
+ border: 1px solid #888;
+ right: 5%;
+ position: absolute;
+ width: 200px;
+ }
+ table.list td{
+ width:100px;
+ border-width: 1px;
+ }
+ table.list td.col_chk {
+ width:30px;
+ }
+ body .pbBody table.list tr.headerRow td, body .pbBody table.list tr.headerRow th {
+ border-width: 1px;
+ }
+ .col_stockin {
+ position: relative;
+ display: inline-block;
+ border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
+ }
+
+ /* Tooltip text */
+ .col_stockin .tooltiptext {
+ visibility: hidden;
+ width: 200px;
+ /*background-color: #fefdba;*/
+ /*color: #fff;*/
+ text-align: center;
+ padding: 5px 0;
+ border-radius: 6px;
+
+ /* Position the tooltip text - see examples below! */
+ position: absolute;
+ z-index: 1;
+ }
+
+ /* Show the tooltip text when you mouse over the tooltip container */
+ .col_stockin:hover .tooltiptext {
+ visibility: visible;
+ }
+ </style>
+ <script type="text/javascript">
+ function checkMessage() {
+ if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
+ alert("淇濆瓨鎴愬姛");
}
}
- else {
- cds.val('');
- cds.prop('disabled', true);
+ function filljsQR(qrcode) {
+ if(!qrcode) return;
+ // blockme();
+ if(scanType == 1){
+ j$("input[name$='SlipNo']").val(qrcode);
+ }
+ else{
+ scanAndCheck(qrcode);
+ }
+ j$("#scanedqr").append("<li>"+qrcode+"</li>");
+ j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
+ // unblockUI();
}
-}
-// 淇敼閫夋嫨椤规椂琛岄鑷姩鎵撳嬀
-function checkLine(raesId) {
- j$("td[name=" + raesId + "]").children("input:enabled:visible")[0].checked=true;
-}
-// 鎵爜鍚庢暣涓竴瑙堜笅鍏ㄩ儴OK
-function scanAndCheck(qrcode) {
- var raesId = j$("input[name='qrcode'][value='" + qrcode + "']").parent().attr('name');
- if(raesId == undefined) {
- alert("璁惧涓嶅瓨鍦紒");
- return;
+
+ function checkAll() {
+ var checked = j$("input#checker").prop('checked')
+ j$("table#tableData_L td.col_chk input[type=checkbox]:enabled:visible").each(function(){
+ this.checked = checked;
+ })
+ if(checked) {
+ // blockme();
+ checkAllOK();
+ }
}
- // 鍙搷浣滅殑涓嬫媺妗嗛�塐K
- j$("#tableData_L tr").each(function() {
- if(j$(this).find('td.col_chk').attr('name') == raesId) {
- j$(this).find('td select:enabled:visible').val('OK');
- }
- })
- // cds杩炲姩OK
- j$('td.col_lost select').each(function(){
- changeCDS(this, true);
- })
- // 琛岄鎵撳嬀
- checkLine(raesId);
-}
-
-</script>
-<div id="myModal" class="modal">
- <!-- Modal content -->
- <div class="modal-content">
- <span class="close" onclick="stopScan()">×</span>
- <p>鎵弿涓�</p>
- <p>Code:<input type="text" id="qrcode"/></p>
- <video playsinline="true" id="preview" style="width: 100%;z-index: 11;transform: scaleX(-1);margin-top: 10px;"></video>
- 鎵爜灞ュ巻锛�
- <ul id="scanedqr" style="list-style-type: none; text-align: center;padding: 0;width: 100%; height: 100px; overflow: auto">
- </ul>
- </div>
-</div>
-<apex:form id="allForm" styleclass="pbBody">
- <apex:actionFunction name="changeStep" rerender="allForm" oncomplete="unblockUI();"/>
- <apex:actionFunction name="redirectPag" action="{!redirectPag}"/>
- <apex:inputHidden value="{!done_flg}" id="done_flg"/>
-
- <apex:pageBlock id="searchBlock" tabStyle="Report" title="鍔炰簨澶勬瑺鍝佺‘璁�">
- <apex:pageBlockButtons location="top">
- 鍥炲簱
- <apex:selectList size="1" value="{!stepName}" onchange="blockme();changeStep();">
- <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
- <apex:selectOption itemValue="娆犲搧纭&CDS" itemLabel="娆犲搧纭&CDS"/>
- <apex:selectOption itemValue="鍥炲簱纭" itemLabel="鍥炲簱纭"/>
- </apex:selectList>
- <apex:commandButton value="鎵竴鎵�" onclick="qrscan(0);return false;" disabled="{!readOnly || stepName == '' }"/>
- <apex:commandButton value="鍏ㄩ��/鍙栨秷鍏ㄩ��" onclick="checkGlobal(); return false;" disabled="{!readOnly}"/>
- <apex:commandButton value="娆犲搧纭&CDS" action="{!lostAndCDS}" onclick="blockme()" disabled="{!readOnly || stepName != '娆犲搧纭&CDS' }" reRender="allForm" oncomplete="unblockUI();checkMessage();"/>
- <apex:commandButton value="鍥炲簱" action="{!stockup}" onclick="blockme();" rerender="allForm" disabled="{! !stockupActive || stepName != '鍥炲簱纭'}" oncomplete="unblockUI();checkMessage();"/>
- </apex:pageBlockButtons>
- 娆犲搧纭
- <apex:selectList size="1" value="{!lostResult}">
- <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
- <apex:selectOption itemValue="OK" itemLabel="OK"/>
- <apex:selectOption itemValue="娆犲搧" itemLabel="娆犲搧"/>
- </apex:selectList>
- CDS缁撴灉
- <apex:selectList size="1" value="{!cdsResult}">
- <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
- <apex:selectOption itemValue="OK" itemLabel="OK"/>
- </apex:selectList>
-
- <apex:commandButton value="妫�绱�" onclick="blockme();" action="{!filter}" reRender="allForm" oncomplete="unblockUI();"/>
- <apex:commandButton value="娓呴櫎" onclick="blockme();" action="{!clearFilter}" reRender="allForm" oncomplete="unblockUI();"/>
- </apex:pageBlock>
- <apex:outputPanel id="message">
- <apex:pageMessages />
- </apex:outputPanel>
- <div id="out_Div_L">
- <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
- <tr class="headerRow" height="30px">
- <td class="col_chk" align="center">
- 鍏ㄩ��<input type='checkbox' onClick='checkAll();' id="checker"/>
- </td>
- <td>鍨嬪彿</td>
- <td>鍥哄畾璧勪骇缂栧彿(Key)</td>
- <td>鏈鸿韩缂栧彿</td>
- <td style="{!IF(stepName='娆犲搧纭&CDS','background-color: #cfeef9','')}">娆犲搧纭</td>
- <td style="{!IF(stepName='娆犲搧纭&CDS','background-color: #cfeef9','')}">CDS</td>
- <!-- <td style="width: 110px;" class="onetoone"> 涓�瀵逛竴涓讳綋 </td> -->
- <td style="{!IF(stepName='鍥炲簱纭','background-color: #cfeef9','')}">鍥炲簱纭</td>
- </tr>
- </table>
+ var globalChecked = false;
+ function checkGlobal() {
+ globalChecked = !globalChecked;
+ j$("table#tableData_L td.col_chk input[type=checkbox]:enabled:visible").each(function(){
+ this.checked = globalChecked;
+ })
+ j$("input#checker").prop('checked', globalChecked);
+ if(globalChecked) {
+ // blockme();
+ checkAllOK();
+ }
+ }
+ function checkAllOK() {
+ j$("#tableData_L td.col_chk input[name=qrcode]").each(function() {
+ scanAndCheck(this.value);
+ })
+ }
+ // 娆犲搧纭鍜宑ds杩炲姩
+ function changeCDS(lostResult, follow) {
+ var cds = j$(lostResult).parent().parent().find('td.col_cds select');
+ if(lostResult.value == 'OK'){
+ if(!lostResult.disabled) {
+ cds.prop('disabled', false);
+ }
+ if(lostResult.value == 'OK' && follow) {
+ cds.val('OK');
+ }
+ }
+ else {
+ cds.val('');
+ cds.prop('disabled', true);
+ }
+ }
+ // 淇敼閫夋嫨椤规椂琛岄鑷姩鎵撳嬀
+ function checkLine(raesId) {
+ j$("td[name=" + raesId + "]").children("input:enabled:visible")[0].checked=true;
+ }
+ // 鎵爜鍚庢暣涓竴瑙堜笅鍏ㄩ儴OK
+ function scanAndCheck(qrcode) {
+ var raesId = j$("input[name='qrcode'][value='" + qrcode + "']").parent().attr('name');
+ if(raesId == undefined) {
+ alert("璁惧涓嶅瓨鍦紒");
+ return;
+ }
+ // 鍙搷浣滅殑涓嬫媺妗嗛�塐K
+ j$("#tableData_L tr").each(function() {
+ if(j$(this).find('td.col_chk').attr('name') == raesId) {
+ j$(this).find('td select:enabled:visible').val('OK');
+ }
+ })
+ // cds杩炲姩OK
+ j$('td.col_lost select').each(function(){
+ changeCDS(this, true);
+ })
+ // 琛岄鎵撳嬀
+ checkLine(raesId);
+ }
+
+ </script>
+ <div id="myModal" class="modal">
+ <!-- Modal content -->
+ <div class="modal-content">
+ <span class="close" onclick="stopScan()">×</span>
+ <p>鎵弿涓�</p>
+ <p>Code:<input type="text" id="qrcode"/></p>
+ <video playsinline="true" id="preview" style="width: 100%;z-index: 11;transform: scaleX(-1);margin-top: 10px;"></video>
+ 鎵爜灞ュ巻锛�
+ <ul id="scanedqr" style="list-style-type: none; text-align: center;padding: 0;width: 100%; height: 100px; overflow: auto">
+ </ul>
+ </div>
</div>
- <apex:outputPanel id="detail">
- <div id="in_Div_L">
- <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
- <apex:variable value="{!0}" var="Cnt" />
- <apex:repeat id="dataline_L" value="{!esdList}" var="esdInfo">
- <tr class="" id="tableData_L_{!Cnt}" style="{!IF(esdInfo.hidden,'display: none','')}">
- <td class="dataCellBorder1 col_chk" align="center" name="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}">
- <apex:inputCheckbox styleClass="rowchkcls" value="{!esdInfo.checked}" rendered="{!esdInfo.rec.Is_Body__c}"
- id="rowCheck"
- onchange="if(this.checked) {scanAndCheck('{!esdInfo.rec.Fixture_QRCode_F__c}');}"/>
- <input type="hidden" name="qrcode" value="{!esdInfo.rec.Fixture_QRCode_F__c}"/>
- </td>
- <td>{!esdInfo.rec.Fixture_Model_No__c}</td>
- <td>{!esdInfo.rec.Internal_Asset_number_c__c}</td>
- <td>{!esdInfo.rec.SerialNumber_F__c}</td>
- <td class="col_lost" style="{!IF(stepName='娆犲搧纭&CDS','background-color: #cfeef9','')}">
- <apex:selectList size="1" value="{!esdInfo.lostFinished}" disabled="{!!esdInfo.editable || stepName!='娆犲搧纭&CDS' || esdInfo.rec.Arrival_in_wh__c}"
- onchange="changeCDS(this, true);checkLine('{!esdInfo.rec.Rental_Apply_Equipment_Set__c}');">
- <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
- <apex:selectOption itemValue="OK" itemLabel="OK"/>
- <apex:selectOption itemValue="娆犲搧" itemLabel="娆犲搧"/>
- </apex:selectList>
- </td>
- <td class="col_cds" style="{!IF(stepName='娆犲搧纭&CDS','background-color: #cfeef9','')}">
- <apex:selectList size="1" value="{!esdInfo.cdsFinished}" disabled="{!!esdInfo.editable || stepName!='娆犲搧纭&CDS' || esdInfo.rec.Arrival_in_wh__c}"
- onchange="checkLine('{!esdInfo.rec.Rental_Apply_Equipment_Set__c}');">
- <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
- <apex:selectOption itemValue="OK" itemLabel="OK"/>
- </apex:selectList>
- </td>
- <td class="col_stockin" style="{!IF(stepName='鍥炲簱纭','background-color: #cfeef9','')}">
- <apex:selectList size="1" value="{!esdInfo.rec.Arrival_wh_Result_Agency__c}"
- disabled="{!NOT(esdInfo.editable && stepName=='鍥炲簱纭' && esdInfo.cdsFinished=='OK' && esdInfo.canChangeResult)}"
- onchange="checkLine('{!esdInfo.rec.Rental_Apply_Equipment_Set__c}');">
- <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
- <apex:selectOption itemValue="OK" itemLabel="OK"/>
- <apex:selectOption itemValue="绉昏嚦鎶ュ簾鍖�" itemLabel="绉昏嚦鎶ュ簾鍖�"/>
- <apex:selectOption itemValue="寰呬慨鐞�" itemLabel="寰呬慨鐞�"/>
- </apex:selectList>
- <span class="tooltiptext">{!esdInfo.errorInfo}</span>
- </td>
- </tr>
- <apex:variable value="{!Cnt+1}" var="Cnt" />
- </apex:repeat>
+ <apex:form id="allForm" styleclass="pbBody">
+ <apex:actionFunction name="changeStep" rerender="allForm" oncomplete="unblockUI();"/>
+ <apex:actionFunction name="redirectPag" action="{!redirectPag}"/>
+ <apex:inputHidden value="{!done_flg}" id="done_flg"/>
+
+ <apex:pageBlock id="searchBlock" tabStyle="Report" title="鍔炰簨澶勬瑺鍝佺‘璁�">
+ <apex:pageBlockButtons location="top">
+ 鍥炲簱
+ <apex:selectList size="1" value="{!stepName}" onchange="blockme();changeStep();">
+ <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
+ <apex:selectOption itemValue="娆犲搧纭&CDS" itemLabel="娆犲搧纭&CDS"/>
+ <apex:selectOption itemValue="鍥炲簱纭" itemLabel="鍥炲簱纭"/>
+ </apex:selectList>
+ <apex:commandButton value="鎵竴鎵�" onclick="qrscan(0);return false;" disabled="{!readOnly || stepName == '' }"/>
+ <apex:commandButton value="鍏ㄩ��/鍙栨秷鍏ㄩ��" onclick="checkGlobal(); return false;" disabled="{!readOnly}"/>
+ <apex:commandButton value="娆犲搧纭&CDS" action="{!lostAndCDS}" onclick="blockme()" disabled="{!readOnly || stepName != '娆犲搧纭&CDS' }" reRender="allForm" oncomplete="unblockUI();checkMessage();"/>
+ <apex:commandButton value="鍥炲簱" action="{!stockup}" onclick="blockme();" rerender="allForm" disabled="{! !stockupActive || stepName != '鍥炲簱纭'}" oncomplete="unblockUI();checkMessage();"/>
+ </apex:pageBlockButtons>
+ 娆犲搧纭
+ <apex:selectList size="1" value="{!lostResult}">
+ <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
+ <apex:selectOption itemValue="OK" itemLabel="OK"/>
+ <apex:selectOption itemValue="娆犲搧" itemLabel="娆犲搧"/>
+ </apex:selectList>
+ CDS缁撴灉
+ <apex:selectList size="1" value="{!cdsResult}">
+ <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
+ <apex:selectOption itemValue="OK" itemLabel="OK"/>
+ </apex:selectList>
+
+ <apex:commandButton value="妫�绱�" onclick="blockme();" action="{!filter}" reRender="allForm" oncomplete="unblockUI();"/>
+ <apex:commandButton value="娓呴櫎" onclick="blockme();" action="{!clearFilter}" reRender="allForm" oncomplete="unblockUI();"/>
+ </apex:pageBlock>
+ <apex:outputPanel id="message">
+ <apex:pageMessages />
+ </apex:outputPanel>
+ <div id="out_Div_L">
+ <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
+ <tr class="headerRow" height="30px">
+ <td class="col_chk" align="center">
+ 鍏ㄩ��<input type='checkbox' onClick='checkAll();' id="checker"/>
+ </td>
+ <td>鍨嬪彿</td>
+ <td>鍥哄畾璧勪骇缂栧彿(Key)</td>
+ <td>鏈鸿韩缂栧彿</td>
+ <td style="{!IF(stepName='娆犲搧纭&CDS','background-color: #cfeef9','')}">娆犲搧纭</td>
+ <td style="{!IF(stepName='娆犲搧纭&CDS','background-color: #cfeef9','')}">CDS</td>
+ <!-- <td style="width: 110px;" class="onetoone"> 涓�瀵逛竴涓讳綋 </td> -->
+ <td style="{!IF(stepName='鍥炲簱纭','background-color: #cfeef9','')}">鍥炲簱纭</td>
+ </tr>
</table>
</div>
- </apex:outputPanel>
- <apex:outputPanel id="checEventFrame">
- <script>
- j$('td.col_lost select').each(function(){
- changeCDS(this, false);
- })
- </script>
- </apex:outputPanel>
-</apex:form>
-<script type="text/javascript">
- var standalone = window.navigator.standalone,
- userAgent = window.navigator.userAgent.toLowerCase(),
- safari = /safari/.test( userAgent ),
- ios = /iphone|ipod|ipad/.test( userAgent ),
- ver = '';
- if (ios) {
- ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
+ <apex:outputPanel id="detail">
+ <div id="in_Div_L">
+ <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
+ <apex:variable value="{!0}" var="Cnt" />
+ <apex:repeat id="dataline_L" value="{!esdList}" var="esdInfo">
+ <tr class="" id="tableData_L_{!Cnt}" style="{!IF(esdInfo.hidden,'display: none','')}">
+ <td class="dataCellBorder1 col_chk" align="center" name="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}">
+ <apex:inputCheckbox styleClass="rowchkcls" value="{!esdInfo.checked}" rendered="{!esdInfo.rec.Is_Body__c}"
+ id="rowCheck"
+ onchange="if(this.checked) {scanAndCheck('{!esdInfo.rec.Fixture_QRCode_F__c}');}"/>
+ <input type="hidden" name="qrcode" value="{!esdInfo.rec.Fixture_QRCode_F__c}"/>
+ </td>
+ <td>{!esdInfo.rec.Fixture_Model_No__c}</td>
+ <td>{!esdInfo.rec.Internal_Asset_number_c__c}</td>
+ <td>{!esdInfo.rec.SerialNumber_F__c}</td>
+ <td class="col_lost" style="{!IF(stepName='娆犲搧纭&CDS','background-color: #cfeef9','')}">
+ <apex:selectList size="1" value="{!esdInfo.lostFinished}" disabled="{!!esdInfo.editable || stepName!='娆犲搧纭&CDS' || esdInfo.rec.Arrival_in_wh__c}"
+ onchange="changeCDS(this, true);checkLine('{!esdInfo.rec.Rental_Apply_Equipment_Set__c}');">
+ <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
+ <apex:selectOption itemValue="OK" itemLabel="OK"/>
+ <apex:selectOption itemValue="娆犲搧" itemLabel="娆犲搧"/>
+ </apex:selectList>
+ </td>
+ <td class="col_cds" style="{!IF(stepName='娆犲搧纭&CDS','background-color: #cfeef9','')}">
+ <apex:selectList size="1" value="{!esdInfo.cdsFinished}" disabled="{!!esdInfo.editable || stepName!='娆犲搧纭&CDS' || esdInfo.rec.Arrival_in_wh__c}"
+ onchange="checkLine('{!esdInfo.rec.Rental_Apply_Equipment_Set__c}');">
+ <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
+ <apex:selectOption itemValue="OK" itemLabel="OK"/>
+ </apex:selectList>
+ </td>
+ <td class="col_stockin" style="{!IF(stepName='鍥炲簱纭','background-color: #cfeef9','')}">
+ <apex:selectList size="1" value="{!esdInfo.rec.Arrival_wh_Result_Agency__c}"
+ disabled="{!NOT(esdInfo.editable && stepName=='鍥炲簱纭' && esdInfo.cdsFinished=='OK' && esdInfo.canChangeResult)}"
+ onchange="checkLine('{!esdInfo.rec.Rental_Apply_Equipment_Set__c}');">
+ <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
+ <apex:selectOption itemValue="OK" itemLabel="OK"/>
+ <apex:selectOption itemValue="绉昏嚦鎶ュ簾鍖�" itemLabel="绉昏嚦鎶ュ簾鍖�"/>
+ <apex:selectOption itemValue="寰呬慨鐞�" itemLabel="寰呬慨鐞�"/>
+ </apex:selectList>
+ <span class="tooltiptext">{!esdInfo.errorInfo}</span>
+ </td>
+ </tr>
+ <apex:variable value="{!Cnt+1}" var="Cnt" />
+ </apex:repeat>
+ </table>
+ </div>
+ </apex:outputPanel>
+ <apex:outputPanel id="checEventFrame">
+ <script>
+ j$('td.col_lost select').each(function(){
+ changeCDS(this, false);
+ })
+ </script>
+ </apex:outputPanel>
+ </apex:form>
+ <script type="text/javascript">
+ var standalone = window.navigator.standalone,
+ userAgent = window.navigator.userAgent.toLowerCase(),
+ safari = /safari/.test( userAgent ),
+ ios = /iphone|ipod|ipad/.test( userAgent ),
+ ver = '';
+ if (ios) {
+ ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
+ }
+
+ let scanner = new Instascan.Scanner({ video: document.getElementById('preview'), scanPeriod: 5 ,mirror: false});
+ scanner.addListener('scan', function (content) {
+ filljsQR(content);
+ });
+
+ function qrscan(stype) {
+ scanType = stype;
+ if (!standalone && !safari && ios) {
+ window.location.href="sfqr://scan";
+ } else {
+ j$(".modal").show();
+ Instascan.Camera.getCameras().then(function (cameras) {
+ if (cameras.length > 0) {
+ if (ver >= 13) {
+ scanner.start(cameras[1]);
+ } else {
+ scanner.start(cameras[0]);
+ }
+ } else {
+ console.error('No cameras found.');
+ }
+ }).catch(function (e) {
+ console.error(e);
+ });
+ }
}
-
- let scanner = new Instascan.Scanner({ video: document.getElementById('preview'), scanPeriod: 5 ,mirror: false});
- scanner.addListener('scan', function (content) {
- filljsQR(content);
- });
-
- function qrscan(stype) {
- scanType = stype;
- if (!standalone && !safari && ios) {
- window.location.href="sfqr://scan";
- } else {
- j$(".modal").show();
- Instascan.Camera.getCameras().then(function (cameras) {
- if (cameras.length > 0) {
- if (ver >= 13) {
- scanner.start(cameras[1]);
- } else {
- scanner.start(cameras[0]);
- }
- } else {
- console.error('No cameras found.');
- }
- }).catch(function (e) {
- console.error(e);
+
+ function stopScan() {
+ scanner.stop().then(function () {
+ j$(".modal").hide();
});
+ j$("#scanedqr").children().remove();
}
- }
-
- function stopScan() {
- scanner.stop().then(function () {
- j$(".modal").hide();
+ j$(document).ready(function(){
+ j$( '#qrcode' ).unbind();
+ j$( '#qrcode' ).keypress( function ( e ) {
+ if ( e.which == 13 ) {
+ filljsQR(j$( '#qrcode' ).val());
+ return false;
+ }
+ });
});
- j$("#scanedqr").children().remove();
- }
- j$(document).ready(function(){
- j$( '#qrcode' ).unbind();
- j$( '#qrcode' ).keypress( function ( e ) {
- if ( e.which == 13 ) {
- filljsQR(j$( '#qrcode' ).val());
- return false;
- }
- });
- });
-
- //wangweipeng 2021/09/01 SFDC-C4H4BM start
- window.onload = function popupWarn(){
- hintNoReceiptForm();
- }
-
- //濡傛灉鏄粠鍗曪紝骞朵笖浠庡崟娌℃湁涓婁紶绛炬敹鍗曪紝閭d箞寮瑰嚭涓�涓彁绀烘
- function hintNoReceiptForm(){
- var isImportReceiptForm = {!isImportReceiptForm};
- if(isImportReceiptForm){
- var hintContent = '';
- var isAdvocateFollow = {!isAdvocateFollow};
- if(isAdvocateFollow){
- hintContent = '鐢宠鍗曞皻鏈笂浼犵鏀跺崟锛屾槸鍚︾户缁�';
- }else{
- hintContent = '涓诲崟灏氭湭涓婁紶绛炬敹鍗曪紝鏄惁缁х画';
- }
- if(!confirm(hintContent)){
- //鍒ゆ柇鏄惁鏄痯ad绔�
- if (!standalone && !safari && ios) {
- //涓婁竴姝�
- window.history.back(-1);
+
+ //wangweipeng 2021/09/01 SFDC-C4H4BM start
+ window.onload = function popupWarn(){
+ hintNoReceiptForm();
+ }
+
+ //濡傛灉鏄粠鍗曪紝骞朵笖浠庡崟娌℃湁涓婁紶绛炬敹鍗曪紝閭d箞寮瑰嚭涓�涓彁绀烘
+ function hintNoReceiptForm(){
+ var isImportReceiptForm = {!isImportReceiptForm};
+ if(isImportReceiptForm){
+ var hintContent = '';
+ var isAdvocateFollow = {!isAdvocateFollow};
+ if(isAdvocateFollow){
+ hintContent = '鐢宠鍗曞皻鏈笂浼犵鏀跺崟锛屾槸鍚︾户缁�';
}else{
- redirectPag();
+ hintContent = '涓诲崟灏氭湭涓婁紶绛炬敹鍗曪紝鏄惁缁х画';
+ }
+ if(!confirm(hintContent)){
+ //鍒ゆ柇鏄惁鏄痯ad绔�
+ if (!standalone && !safari && ios) {
+ //涓婁竴姝�
+ window.history.back(-1);
+ }else{
+ redirectPag();
+ }
}
}
}
- }
- //wangweipeng 2021/09/01 SFDC-C4H4BM end
-</script>
-</apex:page>
\ No newline at end of file
+ //wangweipeng 2021/09/01 SFDC-C4H4BM end
+ </script>
+ </apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/SearchProduct.page b/force-app/main/default/pages/SearchProduct.page
index 9156c41..4bf9b30 100644
--- a/force-app/main/default/pages/SearchProduct.page
+++ b/force-app/main/default/pages/SearchProduct.page
@@ -1,4 +1,4 @@
-<apex:page id="Page" standardController="Product2" action="{!searchNameisNUll}" extensions="SearchProductController" sidebar="false" showHeader="false" lightningStylesheets="true" >
+<apex:page id="Page" standardController="Product2" extensions="SearchProductController" sidebar="false" showHeader="false" lightningStylesheets="true" >
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
@@ -6,19 +6,7 @@
<apex:includeScript value="/soap/ajax/32.0/apex.js"/>
<script>
- window.onload = showToast();
- function showToast() {
- console.log('11111');
- console.log(sforce);
- console.log(sforce.one);
- sforce.one.showToast({
- "title": "Attenzione",
- "message": "Test Message.",
- "type": "warning"
- });
-
- }
- var QuoteEntryMaxLine = {!maxLen} ;
+ var QuoteEntryMaxLine =window.opener.QuoteEntryMaxLine ;
function setProductList() {
var nextLine = top.window.opener.getLastLineNoNext(window.opener.document);
var hasCheckedCnt = 0;
diff --git a/force-app/main/default/pages/SelectAsset.page b/force-app/main/default/pages/SelectAsset.page
index 0003767..b47eddf 100644
--- a/force-app/main/default/pages/SelectAsset.page
+++ b/force-app/main/default/pages/SelectAsset.page
@@ -1,4 +1,4 @@
-<apex:page standardcontroller="Asset" extensions="SelectAssetExtension" showHeader="true" id="allPage">
+<apex:page standardcontroller="Asset" extensions="SelectAssetExtension" showHeader="true" id="allPage" lightningStylesheets="true">
<script>
var productCount={!productCount};
diff --git a/force-app/main/default/pages/UnderConstruct.page b/force-app/main/default/pages/UnderConstruct.page
index 2ab74f1..14da675 100644
--- a/force-app/main/default/pages/UnderConstruct.page
+++ b/force-app/main/default/pages/UnderConstruct.page
@@ -1,3 +1,3 @@
-<apex:page showHeader="false" sidebar="false">
+<apex:page showHeader="false" sidebar="false" lightningStylesheets="true">
寮�鍙戜腑
</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/YouCantDeleteQuote.page b/force-app/main/default/pages/YouCantDeleteQuote.page
index 9763201..222bc60 100644
--- a/force-app/main/default/pages/YouCantDeleteQuote.page
+++ b/force-app/main/default/pages/YouCantDeleteQuote.page
@@ -1,4 +1,4 @@
-<apex:page standardController="quote">
+<apex:page standardController="quote" lightningstylesheets="true">
<div style="position: relative; margin-top: 10px; margin-left: 10px;">
<span style="font-weight: bold; font-size: 12pt;">{!$Label.YouCantDeleteEvent1}</span>
--
Gitblit v1.9.1