From 9f5874fcd8657ade15b4fc73c924813684f3a9a8 Mon Sep 17 00:00:00 2001
From: LiJinHuan <lijinhuan@prec-tech.com>
Date: 星期二, 08 八月 2023 19:19:35 +0800
Subject: [PATCH] 备品最近优化代码

---
 force-app/main/default/classes/FixtureSetDetailHandler.cls                      |   29 
 force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls.bak |  254 +
 force-app/main/default/pages/RentalFixtureSetAssign.page                        |   21 
 force-app/main/default/staticresources/TransferShippmentReceivedcss.css.bak     |  109 
 force-app/main/default/classes/MainFixtureSelectController.cls                  |   13 
 force-app/main/default/staticresources/RelationListPagingCmpCss.css             |   10 
 force-app/main/default/classes/FixtureSetDetailHandler.cls.bak                  |   26 
 force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css.bak |  109 
 force-app/main/default/staticresources/ReceivingNotePageCss.css.bak             |   88 
 force-app/main/default/components/RelationListPagingCmp.component               |   36 
 force-app/main/default/pages/MainFixtureSelect.page.bak                         |  695 +++++
 force-app/main/default/pages/ReantalApplySeriesNo.page.bak                      |  156 +
 force-app/main/default/pages/QueuePageByAssetId.page                            |    1 
 force-app/main/default/staticresources/RelationListPagingCmpJS.js               |   49 
 force-app/main/default/classes/MainFixtureSelectController.cls.bak              | 2259 ++++++++++++++++
 force-app/main/default/pages/RentalApplySplit.page                              |    8 
 force-app/main/default/pages/RentalFixtureSetAssignAgency.page.bak              |  558 ++++
 force-app/main/default/pages/RentalApplySequence.page                           |    4 
 force-app/main/default/components/RelationListPagingCmp.component.bak           |  483 +++
 force-app/main/default/classes/FixtureSetHandler.cls.bak                        |   26 
 force-app/main/default/staticresources/RentalFixtureSetDetilSelectCss.css       |    1 
 force-app/main/default/classes/FixtureRentalPDFController.cls.bak               |  833 ++++++
 force-app/main/default/pages/RentalFixtureSetAssign.page.bak                    |  642 ++++
 force-app/main/default/pages/ReantalApplySeriesNo.page                          |   35 
 force-app/main/default/staticresources/ReceivingNotePageCss.css                 |    6 
 force-app/main/default/classes/EquipmentRentalCancelController.cls.bak          |  241 +
 force-app/main/default/pages/MainFixtureSelect.page                             |    7 
 force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css     |  203 +
 force-app/main/default/pages/RentalApplyExtensions.page                         |    6 
 force-app/main/default/staticresources/TransferShippmentReceivedcss.css         |  136 
 force-app/main/default/pages/RentalApplyExtensions.page.bak                     |   56 
 force-app/main/default/pages/RentalFixtureSetAssignAgency.page                  |    4 
 force-app/main/default/staticresources/StyleUtilCss.css                         |    9 
 force-app/main/default/pages/RentalApplySequence.page.bak                       |  452 +++
 force-app/main/default/classes/EquipmentRentalCancelController.cls              |    5 
 force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls     |   38 
 force-app/main/default/pages/RentalApplySplit.page.bak                          |  176 +
 force-app/main/default/classes/FixtureSetHandler.cls                            |   57 
 force-app/main/default/staticresources/StyleUtilCss.css.bak                     |   39 
 force-app/main/default/pages/QueuePageByAssetId.page.bak                        |  184 +
 40 files changed, 7,892 insertions(+), 172 deletions(-)

diff --git a/force-app/main/default/classes/EquipmentRentalCancelController.cls b/force-app/main/default/classes/EquipmentRentalCancelController.cls
index 1a053a0..a3407bb 100644
--- a/force-app/main/default/classes/EquipmentRentalCancelController.cls
+++ b/force-app/main/default/classes/EquipmentRentalCancelController.cls
@@ -141,7 +141,10 @@
             //}
             if (line.isSelect == true) {
                 Rental_Apply_Equipment_Set__c upd = new Rental_Apply_Equipment_Set__c();
-                upd = line.raes;
+                // 20230706 ljh DB202306220097 start 
+                // upd = line.raes;
+                upd.Id = line.raes.Id;
+                // 20230706 ljh DB202306220097 end 
                 upd.Cancel_Select__c = true;
                 upd.Cancel_Date__c = Date.today();
                 upd.Cancel_Time__c = MainFixtureSelectController.getCurrentTime();
diff --git a/force-app/main/default/classes/EquipmentRentalCancelController.cls.bak b/force-app/main/default/classes/EquipmentRentalCancelController.cls.bak
new file mode 100644
index 0000000..1a053a0
--- /dev/null
+++ b/force-app/main/default/classes/EquipmentRentalCancelController.cls.bak
@@ -0,0 +1,241 @@
+//TestClass: RentalFixtureManage5Test, RentalFixtureManage2Test
+public with sharing class EquipmentRentalCancelController {
+    // 澶囧搧鐢宠涔�
+    public Rental_Apply__c rentalApply { get; set; }
+    // 鏄庣粏琛岄」鐩�
+    public List<LineInfo> lineInfoList { get; set; }
+    //澶囧搧鐢宠涔D
+    public String rentalApplyId { get; private set; }
+    public Boolean hasError { get; private set; }
+    public Boolean saveBtn { get; private set; }
+    //鐜版湁澶囧搧鏁伴噺锛堝熀浜庡鍝佷竴瑙堟暟閲忥級
+    public Integer EquipmentSetCnt{get;set;}
+    public EquipmentRentalCancelController() {
+        //Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8');
+        rentalApplyId = ApexPages.currentPage().getParameters().get('raid');
+    }
+
+    // 鐢婚潰鍒濆鍖�
+    public PageReference init() {
+        saveBtn = false;
+        hasError = false;
+        rentalApply = new Rental_Apply__c();
+        lineInfoList = new List<LineInfo>();
+
+        if (rentalApplyId != null && rentalApplyId.length() > 0) {
+            // 澶囧搧鍊熷嚭鐢宠鍙栧緱
+            List<Rental_Apply__c> raList = [
+                select Id, Status__c, RA_Status__c
+                  from Rental_Apply__c
+                 where Id = :rentalApplyId];
+
+            if (raList.size() > 0) {
+                rentalApply = raList[0];
+            } else {
+                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '澶囧搧鐢宠涔︿笉瀛樺湪锛岃纭銆�'));
+                saveBtn = true;
+                return null;
+            }
+        } else {
+            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '澶囧搧鐢宠涔︿笉瀛樺湪锛岃纭銆�'));
+            saveBtn = true;
+            return null;
+        }
+
+        // 澶囧搧鍊熷嚭澶囧搧set涓�瑙堝彇寰� 
+        List<Rental_Apply_Equipment_Set__c> raesList = [
+            select id, Name, Fixture_Set__c, Fixture_Set__r.Name, Fixture_Set__r.Loaner_code__c, RAES_Status__c, Rental_Start_Date__c, Final_reply_day__c, Yi_StockDown__c,
+                   StockDown_time__c, Shippment_loaner_time2__c, Cancel_Select__c, Cancel_Reason__c, Cancel_Mem__c, Loaner_cancel_Remarks__c, Fixture_Set__r.Loaner_name__c,
+                   First_RAESD__r.Asset__c,Loaner_cancel_reason__c //20210708 SFDC-C448KZ you start
+              from Rental_Apply_Equipment_Set__c
+             where Rental_Apply__c = :rentalApply.Id
+               and Cancel_Select__c = false
+               and Yi_loaner_arranged__c = 0];
+
+        if (raesList.size() == 0) {
+            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '澶囧搧鐢宠涔︽湭鍒嗛厤鏄庣粏锛屼笉鑳藉彇娑堝垎閰嶃��'));
+            saveBtn = true;
+            return null;
+        }else{
+            EquipmentSetCnt = raesList.size();
+        }
+
+        // 鏄庣粏琛屽仛鎴�
+        for (Rental_Apply_Equipment_Set__c raes : raesList) {
+            LineInfo lineInfo = new LineInfo(raes);
+            lineInfoList.add(lineInfo);
+        }
+
+        return null;
+    }
+
+    // 淇濆瓨鎸夐挳
+    // https://sohobb.backlog.jp/view/OLY_OCM-152#comment-20041467
+    // TODO OLY_OCM-206 select from 涓�瀵句竴Link, 鎶� 鍒嗛厤鏁� 娓� 0
+    public PageReference saveBtn() {
+        List<Rental_Apply_Equipment_Set__c> delList = new List<Rental_Apply_Equipment_Set__c>();
+        List<Rental_Apply_Equipment_Set__c> updList = new List<Rental_Apply_Equipment_Set__c>();
+        Set<Id> esIdSet = new Set<Id>();
+
+        // 鏄庣粏琛宑heck
+        Integer cntSelect = 0;
+        hasError = false;
+        for (LineInfo line : lineInfoList) {
+            if (line.isSelect == true) {
+                // 鍏ュ姏瑕忓墖銈掑埄鐢ㄣ仐銇�
+                //String reason = line.raes.Cancel_Reason__c;
+                //if (line.status == 'canCancel' && (reason == null || reason.length() == 0)) {
+                //    line.raes.Cancel_Reason__c.addError('蹇呴』杈撳叆鍙栨秷鐞嗙敱銆�');
+                //    hasError = true;
+                //}
+                //20210708 SFDC-C448KZ you start
+                if (String.isBlank(line.raes.Cancel_Reason__c)) {
+                      line.raes.Cancel_Reason__c.addError('璇疯緭鍏ュ彇娑堢悊鐢�');
+                      hasError = true;
+                  }
+                  if (String.isBlank(line.raes.Loaner_cancel_reason__c)) {
+                      line.raes.Loaner_cancel_reason__c.addError('璇疯緭鍏ヤ竴瑙堝彇娑堢悊鐢�');
+                      hasError = true;
+                  }
+
+                  if (String.isNotBlank(line.raes.Loaner_cancel_reason__c) && line.raes.Loaner_cancel_reason__c=='鍏朵粬' && String.isBlank(line.raes.Loaner_cancel_Remarks__c)) {
+                     line.raes.Loaner_cancel_Remarks__c.addError('璇疯緭鍏ュ彇娑堢悊鐢卞娉�');
+                      hasError = true;
+                  }
+                //20210708 SFDC-C448KZ you end
+                cntSelect += 1;
+            }
+        }
+        if (cntSelect == 0) {
+            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '鏈�夋嫨鍙栨秷鍒嗛厤鐨勬槑缁嗐��'));
+            hasError = true;
+        }
+        if (hasError == true) {
+            system.debug('=====hasError');
+            return null;
+        }
+
+        Set<Id> raesdIdSet = new Set<Id>();
+
+        // 淇濆瓨閫昏緫
+        for (LineInfo line : lineInfoList) {
+            //if (line.isSelect == true && line.status == 'canCancel') {
+            //    Rental_Apply_Equipment_Set__c upd = new Rental_Apply_Equipment_Set__c(Id = line.raes.Id);
+            //    // delList.add(del);
+            //    // esIdSet.add(line.raes.Fixture_Set__c);
+            //    upd.Cancel_Select__c = true;
+            //    upd.Cancel_Date__c = Date.today();
+            //    upd.Cancel_Reason__c = line.raes.Cancel_Reason__c;
+            //    upd.Loaner_cancel_Remarks__c = line.raes.Loaner_cancel_Remarks__c;
+            //    updList.add(upd);
+            //}
+            //if (line.isSelect == true && line.status == 'OnStock_Pre_Inspection') {
+            //    Rental_Apply_Equipment_Set__c upd = new Rental_Apply_Equipment_Set__c(Id = line.raes.Id);
+            //    //upd.OnStock_Pre_Inspection__c = true;
+            //    upd.Cancel_Select__c = true;
+            //    upd.Cancel_Date__c = Date.today();
+            //    upd.Cancel_Reason__c = line.raes.Cancel_Reason__c;
+            //    upd.Loaner_cancel_Remarks__c = line.raes.Loaner_cancel_Remarks__c;
+            //    updList.add(upd);
+            //    //esIdSet.add(line.raes.Fixture_Set__c);
+            //}
+            if (line.isSelect == true) {
+                Rental_Apply_Equipment_Set__c upd = new Rental_Apply_Equipment_Set__c();
+                upd = line.raes;
+                upd.Cancel_Select__c = true;
+                upd.Cancel_Date__c = Date.today();
+                upd.Cancel_Time__c = MainFixtureSelectController.getCurrentTime();
+                upd.Cancel_Reason__c = line.raes.Cancel_Reason__c;
+                //20210708 SFDC-C448KZ you start
+                upd.Loaner_cancel_reason__c = line.raes.Loaner_cancel_reason__c;
+                upd.Loaner_cancel_Remarks__c = line.raes.Loaner_cancel_Remarks__c==null ? line.raes.Loaner_cancel_reason__c : line.raes.Loaner_cancel_Remarks__c;
+                //20210708 SFDC-C448KZ you end
+                if (String.isNotBlank(upd.First_RAESD__r.Asset__c)) {
+                    raesdIdSet.add(upd.First_RAESD__r.Asset__c);
+                }
+                updList.add(upd);
+            }
+        }
+
+        // 淇濆瓨
+        Savepoint sp = Database.setSavepoint();
+        try {
+            // if  (   delList.size()  >   0   )   delete  delList;
+            if (!raesdIdSet.isEmpty()) {
+                List<Fixture_OneToOne_Link__c> fotos = [Select Id From Fixture_OneToOne_Link__c
+                        Where Main_Asset__c =: raesdIdSet
+                        for update];
+                if (!fotos.isEmpty()) {
+                    for (Fixture_OneToOne_Link__c foto : fotos) {
+                        foto.Select_Accessory_Asset_Cnt__c = 0;
+                    }
+                    FixtureUtil.withoutUpdate(fotos);
+                }
+            }
+            if  (   updList.size()  >   0   ) {
+                Set<Id> assetIdSet = new Set<Id>();
+                for (Rental_Apply_Equipment_Set_Detail__c raesd : [SELECT Id, Asset__c
+                                                                     FROM Rental_Apply_Equipment_Set_Detail__c
+                                                                    WHERE Rental_Apply_Equipment_Set__c = :updList FOR UPDATE]
+                ) {
+                    if (String.isNotBlank(raesd.Asset__c)) {
+                        assetIdSet.add(raesd.Asset__c);
+                    }
+                }
+                if (assetIdSet.size() > 0) {
+                    List<Asset> assetList = [SELECT Id
+                             FROM Asset
+                            WHERE Id = :assetIdSet FOR UPDATE];
+                }
+                FixtureUtil.withoutUpdate(updList);
+            }
+            // system.debug(EquipmentSetCnt+'2223333'+updList.size()   );
+            // if  ((  updList.size()  ==  EquipmentSetCnt ||  
+            //         delList.size()  ==  EquipmentSetCnt ||
+            //         delList.size()  +   updList.size()  ==  EquipmentSetCnt )
+            //         &&  EquipmentSetCnt !=  0
+            //         &&  (   rentalApply.Status__c =='寮曞綋瀹屼簡'  
+            //             ||  rentalApply.Status__c =='鍑哄簱鎸囩ず瀹屼簡'      )){
+            //     Rental_Apply__c RaUpdate    =   new Rental_Apply__c();
+            //     RaUpdate.id =   rentalApplyId;
+            //     RaUpdate.Status__c  =   '宸叉壒鍑�';
+            //     update  RaUpdate;
+            // }
+//bp2            ControllerUtil.setEquipmentSetProvisionFlg(esIdSet);
+        }   catch (Exception ex)    {
+            system.debug('=====' + ex.getMessage());
+            hasError = true;
+            ApexPages.addMessages(ex);
+            Database.rollback(sp);
+            return null;
+        }
+        return null;
+    }
+
+    @TestVisible
+    class LineInfo {
+        // 閫夋嫨
+        public boolean isSelect { get; set; }
+        // 鍊熷嚭澶囧搧set涓�瑙�
+        public Rental_Apply_Equipment_Set__c raes { get; set; }
+        // 鐘舵�侊細鍙互鍒犻櫎銆佸彲浠ュ彇娑堛�佷笉鑳藉彇娑�
+        //public String status { get; private set; }
+        public String esName { get; private set; }
+        public String loanerCode { get; private set; }
+        public LineInfo(Rental_Apply_Equipment_Set__c r) {
+            isSelect = false;
+            raes = r;
+            loanerCode = r.Fixture_Set__r.Loaner_name__c;
+            ////cancel
+            //if (r.Yi_StockDown__c > 0) {
+            //    status = 'canCancel';
+            ////涓嬫灦浠ュ悗鏀规垚寰呬笂鏋剁殑checkbox
+            ////cancel
+            //} else {
+            //    status = 'OnStock_Pre_Inspection';
+            //}
+            esName = r.Fixture_Set__r.Name;
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls b/force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls
index cb40d1f..bea0f09 100644
--- a/force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls
+++ b/force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls
@@ -123,8 +123,9 @@
                 select AssetName__c, SerialNumber_F__c, Repair_Status_F__c, OnStock_By_Cancel__c, Inspection_Comment__c,Inspection_result_after_Final__c, Inspection_result_after_NG_Final__c, Check_lost_Item_F__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, Fixture_QRCode_F__c, Rental_Apply_Equipment_Set__r.Name, Pre_inspection_time__c, StockDown__c, StockDown_time__c, Id, Name, Asset__c, Asset__r.Name, Asset__r.SerialNumber, Asset__r.Product_Serial_No__c,
                        Asset__r.Remark__c, Asset__r.ImageAsset__c, Asset__r.ImageSerial__c, Asset__r.ImageAssetUploadedTime__c, Asset__r.ImageSerialUploadedTime__c,
                        Loaner_CDS_Info__c, Inspection_result__c, Check_lost_Item__c, Pre_disinfection__c, Water_leacage_check__c, Inspection_result_after__c, Arrival_in_wh__c,
-                       Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c,
-                       Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c
+                       Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c, Rental_Apply__r.Name, Rental_Apply__r.Hospital__c, Rental_Apply__r.Hospital__r.Name,
+                       Rental_Apply__r.Person_In_Charge__c, Rental_Apply__r.Person_In_Charge__r.Name, Rental_Apply__r.demo_purpose2__c, Rental_Apply__r.WorkPlace__c, Rental_Apply__r.OCM_dept_category__c, Fixture_Model_No__c,
+                       Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c, Is_Body__c
                   from Rental_Apply_Equipment_Set_Detail__c
                  where Rental_Apply_Equipment_Set__c in :esIds
                    and ((Shipment_request_time2__c <> null and Cancel_Select__c = False ) or Repair_Status_F__c = '淇悊瀹屾瘯')
@@ -232,6 +233,17 @@
         // 鍥炲簱銇疭et鍗樹綅銇с�佹槑绱颁竴銇や竴銇ゃ伄quickCheck瑕併倝銇亜
         public boolean quickCheck { get; set; }
         public boolean editable { get; set; }
+        // 澶囧搧鍊熷嚭鐢宠鏁呴殰鎶ュ憡 鎸夐挳鏄剧ず閫昏緫
+        public boolean showFaultRepor { get; set;}
+        public String faultReportFlag { get; set;}
+        public String personInChargeId { get; set;}
+        public String personInChargeName { get; set;}
+        public String demoPurpose2 { get; set;}
+        public String raName { get; set;}
+        public String hospitalId { get; set;}
+        public String hospitalName { get; set;}
+        public String workPlace { get; set;}
+        public String deptCategory { get; set;}
 
         public EsdInfo(Rental_apply_equipment_Set_Detail__c rec) {
             this.rec = rec;
@@ -249,6 +261,28 @@
             if (rec.Asset__r.ImageSerialUploadedTime__c != null) {
                 imageSerialUploadedTime = rec.Asset__r.ImageSerialUploadedTime__c.format('yyyy/MM/dd HH:mm');
             }
+            //褰撴槑缁� 璁惧涓轰富浣� 涓� NG鏃� 鏄剧ず鎸夐挳
+            if (rec.Is_Body__c == true && rec.Inspection_result_after__c == 'NG'){
+                showFaultRepor = true;
+            }
+
+            List<Rental_Apply_Fault__c> rafList = [SELECT Id ,status__c ,Rental_Apply_Equipment_Set_Detail__c from Rental_Apply_Fault__c where Rental_Apply_Equipment_Set_Detail__c = :rec.Id Order By CreatedDate DESC LIMIT 1];
+            
+            
+            if( rafList != null && rafList.size() > 0 ){         
+                this.faultReportFlag = rafList[0].Id;    
+            }else {
+                this.faultReportFlag = '涓嶅瓨鍦ㄦ晠闅滄姤鍛婂崟';
+            }
+
+            personInChargeId = rec.Rental_Apply__r.Person_In_Charge__c;
+            personInChargeName = rec.Rental_Apply__r.Person_In_Charge__r.Name;
+            demoPurpose2 = rec.Rental_Apply__r.demo_purpose2__c;
+            raName = rec.Rental_Apply__r.Name;
+            hospitalId = rec.Rental_Apply__r.Hospital__c;
+            hospitalName = rec.Rental_Apply__r.Hospital__r.Name;
+            workPlace = rec.Rental_Apply__r.WorkPlace__c;
+            deptCategory = rec.Rental_Apply__r.OCM_dept_category__c;
         }
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls.bak b/force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls.bak
new file mode 100644
index 0000000..cb40d1f
--- /dev/null
+++ b/force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls.bak
@@ -0,0 +1,254 @@
+// xudan 20160106 Arrival_wh_time__c -> Arrival_wh_time2__c锛堝洖搴撱伅Set鍗樹綅銇伄銇с�佺銇夸笂銇掗爡鐩娇銈忋仛锛�
+public without sharing class EquipmentSetShippmentReceived5Controller {
+    public Rental_Apply_Equipment_Set__c es { get; set; }
+    public String crossRegion {get;set;}
+    private Map<String, String> roleRegionMap {get;set;}
+    public List<EsdInfo> esdList { get; set; }
+    public boolean done_flg {get;set;}
+    public Boolean saveBtnDisabled { get; private set; }
+    public boolean ReturnRefuse {get;private set;}
+    public String ErrorMessage {get; set;}
+    public String CDSFinished {get;set;}
+    public boolean LostFlg {get;set;}
+    public String SR_status { get; private set; }
+    public String Step_status { get; private set; }
+    public Boolean needCDS { get; private set; }
+    public String open_type { get; private set; }
+    public String Raid {get;set;}
+    private String Id;
+    
+    public Integer getEsdListSize() {
+        return esdList.size();
+    }
+    
+    public EquipmentSetShippmentReceived5Controller() {
+//        Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8');
+        Id = ApexPages.currentPage().getParameters().get('id');
+        if (SR_status == null) {
+            SR_status = ApexPages.currentPage().getParameters().get('type');
+        }
+        if (Step_status == null) {
+            Step_status = ApexPages.currentPage().getParameters().get('step');
+        }
+        if (open_type == null) {
+            open_type = ApexPages.currentPage().getParameters().get('open');
+        }
+        roleRegionMap = new Map<String, String> {
+            '澶囧搧涓績鍖楁柟绠$悊鎴愬憳' => '鍖椾含 澶囧搧涓績',
+            '澶囧搧涓績鍗庝笢绠$悊鎴愬憳' => '涓婃捣 澶囧搧涓績',
+            '澶囧搧涓績鍗楁柟绠$悊鎴愬憳' => '骞垮窞 澶囧搧涓績'
+        };
+    }
+    
+    // 鐢婚潰鍒濆鍖�
+    public PageReference init() {
+        done_flg = false;
+        es = new Rental_Apply_Equipment_Set__c();
+        esdList = new List<EsdInfo>();
+        Set<Id> esIds = new Set<Id>();
+        saveBtnDisabled = false;
+        ReturnRefuse = true;
+        ErrorMessage = '';
+        crossRegion = '';
+        if (Id != null) {
+            List<String> ids = Id.split(',');
+            // 褰撳墠User
+            String userid = Userinfo.getUserId();
+            User user = [select Id,Name,UserRole.Name from User where Id = :userid];
+            // 澶囧搧set
+            List<Rental_Apply_Equipment_Set__c> esList = [select Rental_Apply__c, Id, RAES_Status__c, Name, Shippment_loaner_time2__c
+                                                               , Rental_Apply__r.Cross_Region_Assign__c
+                                            from Rental_Apply_Equipment_Set__c
+                                           where (Rental_Apply__r.Name in :ids or Id in :ids)
+                                             //and Cancel_Select__c = False
+                                             ];
+
+            //List<Fixture_Set__c> esList = [select Id, Name, CDS_staff__c, Shippment_loaner_time__c, Received_loaner_time__c, 
+            //                                       delivery_company__c, Return_to_wh_staff__c, Return_to_wh_staff__r.Name, Fedex_number__c, Distributor_method__c,
+            //                                       Return_delivery_company__c,Return_wh_chenk_staff__c, Received_confirmation_staff__c, Received_confirmation_staff__r.Name, Return_Fedex_number__c, Return_Distributor_method__c,
+            //                                       Arrival_wh_time2__c, Asset_return_time__c,
+            //                                       CDS_complete__c, Arrival_in_wh__c, StockDown__c,
+            //                                       Lost_item_check_time__c,Last_Reserve_Rental_Apply_Fixture_Set__c,
+            //                                       StockDown_time__c
+            //                                  from Fixture_Set__c where Name = :Id];
+            if (esList.size() > 0) {
+                //es = esList[0];
+                for (Rental_Apply_Equipment_Set__c raes : esList) {
+                    esIds.add(raes.Id);
+                    Raid = raes.Rental_Apply__c;
+                    if(String.isNotBlank(raes.Rental_Apply__r.Cross_Region_Assign__c)){
+                        crossRegion = raes.Rental_Apply__r.Cross_Region_Assign__c;
+                        if(roleRegionMap.containsKey(user.UserRole.Name)
+                            && roleRegionMap.get(user.UserRole.Name) == raes.Rental_Apply__r.Cross_Region_Assign__c) {
+                                crossRegion = ''; 
+                        }
+                    }
+                }
+            } else {
+                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '澶囧搧涓嶅瓨鍦�'));
+                saveBtnDisabled = true;
+                return null;
+            }
+            //妫�鏌ラ獙璇佽鍒欎慨鐞嗘渶缁堟娴嬫棩
+            /*   todo
+            List<Rental_Apply_Equipment_Set__c> CheckRAES = [select id,Name,RAES_Status__c,Rental_Apply__c,Rental_Apply__r.Repair__c,Cancel_Date__c,Fixture_Set__c 
+                    from Rental_Apply_Equipment_Set__c where id=:es.Last_Reserve_Rental_Apply_Equipment_Set__c];
+            Rental_Apply_Equipment_Set__c Ra_c = new Rental_Apply_Equipment_Set__c();
+            Rental_Apply__c Rac = new Rental_Apply__c();
+            if(CheckRAES.size()>0){
+                Ra_c = CheckRAES[0];
+                Raid = Ra_c.Rental_Apply__c;
+            }
+            system.debug(Ra_c.Rental_Apply__r.Repair__c );
+            List<Rental_Apply__c> CheckError = new List<Rental_Apply__c>();
+            CheckError = [Select id,name,repair__c,repair__r.Return_Without_Repair_Date__c,repair__r.Repair_Final_Inspection_Date__c,repair__r.Repair_Shipped_Date__c,
+                                Campaign__c,Campaign__r.Status
+                                            from Rental_Apply__c where id=:Ra_c.Rental_Apply__c
+                                            and RA_Status__c !='鍙栨秷'
+                                            and RA_Status__c !='鍒犻櫎'];
+            if(CheckError.size()>0){
+                Rac = CheckError[0];
+            }
+            */
+            
+            //system.debug('All::::'+Rac.repair__r.Repair_Final_Inspection_Date__c);
+            // system.debug('All::::'+Rac.repair__c);
+            //  system.debug('All::::'+Ra_c.RAES_Status__c);
+            // 鏈暘鏆備笉涓婄嚎璇ュ姛鑳斤紝鍚敤鍚庝笉鑳藉叆搴撴搷浣滄劅瑙変笉瀵�
+            
+        }
+
+        // 澶囧搧set鏄庣粏
+        List<Rental_Apply_Equipment_Set_Detail__c> eList = [
+                select AssetName__c, SerialNumber_F__c, Repair_Status_F__c, OnStock_By_Cancel__c, Inspection_Comment__c,Inspection_result_after_Final__c, Inspection_result_after_NG_Final__c, Check_lost_Item_F__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, Fixture_QRCode_F__c, Rental_Apply_Equipment_Set__r.Name, Pre_inspection_time__c, StockDown__c, StockDown_time__c, Id, Name, Asset__c, Asset__r.Name, Asset__r.SerialNumber, Asset__r.Product_Serial_No__c,
+                       Asset__r.Remark__c, Asset__r.ImageAsset__c, Asset__r.ImageSerial__c, Asset__r.ImageAssetUploadedTime__c, Asset__r.ImageSerialUploadedTime__c,
+                       Loaner_CDS_Info__c, Inspection_result__c, Check_lost_Item__c, Pre_disinfection__c, Water_leacage_check__c, Inspection_result_after__c, Arrival_in_wh__c,
+                       Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c,
+                       Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c
+                  from Rental_Apply_Equipment_Set_Detail__c
+                 where Rental_Apply_Equipment_Set__c in :esIds
+                   and ((Shipment_request_time2__c <> null and Cancel_Select__c = False ) or Repair_Status_F__c = '淇悊瀹屾瘯')
+                 order by Rental_Apply_Equipment_Set__r.Name, Rental_Apply_Equipment_Set__c, Name
+        ];
+
+        for (Rental_Apply_Equipment_Set_Detail__c esd : eList) {
+            EsdInfo ei = new EsdInfo(esd);
+            if ((esd.Check_lost_Item_F__c == 'OK' || esd.Repair_Status_F__c == '淇悊瀹屾瘯')
+                    && !esd.Arrival_in_wh__c) {
+                ei.editable = true;
+            }
+            esdList.add(ei);
+        }
+
+        if (esdList.size() <= 0) {
+            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '娌℃湁澶囧搧set鏄庣粏'));
+            saveBtnDisabled = true;
+            return null;
+        }
+        Step_status = '鍥炴敹鍚庢娴�';
+        SR_status = 'Shippment';
+        system.debug('=====' + Step_status);
+        system.debug('=====' + open_type);
+
+        return null;
+    }
+
+    // Step 鍒囥倞鏇裤亪銉溿偪銉炽�佸彂璐у墠-妫�娴�
+    public PageReference Shippment1() {
+        Step_status = '鍙戣揣鍓�';
+        return new PageReference('/apex/EquipmentSetShippmentReceived2?id=' + this.Id + '&type=' + this.SR_status + '&step=' + this.Step_status + '&open=' + this.open_type);
+    }
+
+    // Step 鍒囥倞鏇裤亪銉溿偪銉炽�佸彂璐�-鍙戣揣杩愯緭鍗曞彿 绛�
+    public PageReference Shippment2() {
+        Step_status = '鍙戣揣';
+        return new PageReference('/apex/EquipmentSetShippmentReceived6?id=' + this.Id);
+    }
+
+    // 淇濆瓨鎸夐挳
+    public PageReference save() {
+
+        String userid = Userinfo.getUserId();
+        List<Rental_Apply_Equipment_Set_Detail__c> eList = new List<Rental_Apply_Equipment_Set_Detail__c>();
+        for (EsdInfo esdInfo : esdList) {
+            Rental_Apply_Equipment_Set_Detail__c esd = esdInfo.rec;
+            if (esdInfo.editable) {
+                eList.add(esd);
+            }
+        }
+        Boolean needSaveSet = false;
+        Boolean needSaveDetail = false;
+        
+        
+        // TODO 娌″彉鍖栦笉瀛�
+        if (Step_status == '鍥炴敹鍚庢娴�') {
+            
+            for (Rental_Apply_Equipment_Set_Detail__c esd : eList) {
+                if (String.isNotBlank(esd.Inspection_result_after_Final__c)) {
+                    //esd.After_Inspection_time_Final__c = System.now();
+                    //esd.Inspection_staff_After_Final__c = userid;
+                } else {
+                    esd.After_Inspection_time_Final__c = null;
+                    esd.Inspection_staff_After_Final__c = null;
+                    if (String.isNotBlank(esd.Inspection_result_after__c)) {
+                        //esd.After_Inspection_time__c = System.now();
+                        //esd.Inspection_staff_After__c = userid;
+                    } else {
+                        esd.After_Inspection_time__c = null;
+                        esd.Inspection_staff_After__c = null;
+                    }
+                }
+            }
+            needSaveDetail = true;
+        }
+        
+        Savepoint sp = Database.setSavepoint();
+        try {
+            //if (needSaveSet) ControllerUtil.upRAdEquipmentSet(es);
+            //if (needSaveDetail) ControllerUtil.updRAEquipmentSetDetail(eList);
+            if (needSaveDetail) FixtureUtil.withoutUpsertObjects(eList);
+            
+            //PageReference ref = new Pagereference('/apex/EquipmentSetShippmentReceived5?id=' + Id + '&type=' + SR_status + '&step=' + this.Step_status + '&open=' + this.open_type);
+            //ref.setRedirect(true);
+            //return ref;
+            done_flg = true;
+            return null;
+        } catch (Exception ex) {
+            system.debug('=====' + ex.getMessage());
+            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, ex.getDmlMessage(0)));
+            //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, ex.getDmlMessage(0)+'( '+Step_status+' )'));
+            Database.rollback(sp);
+            done_flg = false;
+            return null;
+        }
+        
+        return null;
+    }
+    
+    public class EsdInfo {
+        public Rental_Apply_Equipment_Set_Detail__c rec { get; set; }
+        public String imageAssetUploadedTime { get; set; }
+        public String imageSerialUploadedTime { get; set; }
+        // 鍥炲簱銇疭et鍗樹綅銇с�佹槑绱颁竴銇や竴銇ゃ伄quickCheck瑕併倝銇亜
+        public boolean quickCheck { get; set; }
+        public boolean editable { get; set; }
+
+        public EsdInfo(Rental_apply_equipment_Set_Detail__c rec) {
+            this.rec = rec;
+            this.editable = false;
+            
+            if (rec.Asset__r.Pre_Reserve_RAES_Detail__c != null && rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c != null) {
+                this.quickCheck = Datetime.now() < rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c + 30 ? true : false;
+            } else {
+                this.quickCheck = false;
+            }
+            
+            if (rec.Asset__r.ImageAssetUploadedTime__c != null) {
+                imageAssetUploadedTime = rec.Asset__r.ImageAssetUploadedTime__c.format('yyyy/MM/dd HH:mm');
+            }
+            if (rec.Asset__r.ImageSerialUploadedTime__c != null) {
+                imageSerialUploadedTime = rec.Asset__r.ImageSerialUploadedTime__c.format('yyyy/MM/dd HH:mm');
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/FixtureRentalPDFController.cls.bak b/force-app/main/default/classes/FixtureRentalPDFController.cls.bak
new file mode 100644
index 0000000..0c0d353
--- /dev/null
+++ b/force-app/main/default/classes/FixtureRentalPDFController.cls.bak
@@ -0,0 +1,833 @@
+public without sharing class FixtureRentalPDFController {
+
+    private static Integer MAXLINEHRIGHT = 25;
+    private static Integer MAXPAGECOUNT = 22; //32
+
+    private String rentalApplyIdIMG;
+    // private String rentalApplyId;//20201120 ljh 
+
+    private List<String> rentalApplyId;
+    // private List<String> raesidList;  纰鸿獚
+
+    public List<PDFInfo> records { get; set; }
+    public Integer pageCnt { get; set; }
+    public Integer pageNum { get; set; }
+    public integer AllSum {get;set;}
+    public String RentalApplyName  { get; set; }
+    public String BorrowTimeString { get; set; }
+    public Rental_Apply__c ApplyHeadShow { get; set; }
+    public List<lineInfo> DetailsAllList { get; set;}
+    public Map<String,String> AssetModelNoMap {get;set;}
+    public List<PDFInfoIMG> recordsIMG { get; set; }
+    public List<PDFInfoIMG> recordsIMGfist { get; set; }
+    public Integer pageCntIMG { get; set; }
+    public String headerLength {get;set;}
+    public List<List<String>> PageCutList { get; set; }
+    public String HospitalName { get; set;}//鍖荤枟鏈烘瀯
+    public String Shippmentadress { get; set;}//鍙戣揣鍦板潃
+    public Integer mainCnt { get; private set;}//涓讳綋浠舵暟
+    public Integer accessoryCnt { get; private set;}//闄勫睘鍝佷欢鏁�
+    public String centreAddress { get; set; }
+    public Boolean IsShowLU { get; set; } //鏄惁鏄剧ず绛炬敹鍗曞乏涓婅鏂囧瓧 true鏄剧ず 20201119 LJH OCSM_BP5-61 add
+    public Boolean IsMain; //鏄惁鏄幇鍦板垎閰嶇殑涓诲崟 20201120 LJH OCSM_BP5-61 add
+    
+    public string staticResource { get; private set; }
+    public string staticResourceFile { get; private set; }
+    public Boolean addFlag { get; private set; }//鏁忔劅鍦板潃浣跨敤鏍囪
+    public String qrcode { get; private set; }
+    public String barcode { get; private set; }
+    // 20220413 ljh 鎶ご鏄剧ず add start
+    public String AgencyAddressName { get; private set; } 
+    public Boolean isAgencyOrCenter { get; private set; } 
+    public String AgencyOrCenterAddress { get; private set; }
+    // 20220413 ljh 鎶ご鏄剧ず add end
+
+    public FixtureRentalPDFController() {
+        pageNum = Integer.valueOf(ApexPages.currentPage().getParameters().get('page'));
+        rentalApplyIdIMG = ApexPages.currentPage().getParameters().get('raid');
+        //Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8');
+        // rentalApplyId = ApexPages.currentPage().getParameters().get('raid');//20201120 ljh 
+        String tempStr = ApexPages.currentPage().getParameters().get('raid');
+        
+        addFlag = false;
+        rentalApplyId = new List<String>();
+        if(tempStr != null){
+           rentalApplyId.add(tempStr); 
+        }
+        
+        ApplyHeadShow = new Rental_Apply__c();
+        IsShowLU = true;//20201119 LJH OCSM_BP5-61 add
+        IsMain = false;//20201123 LJH OCSM_BP5-61 add
+    }
+
+    // 鐢婚潰鍒濆鍖�
+    public void init() {
+        staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Rental_Apply__c'));
+        staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));
+        // 鏂拌濂ユ灄宸存柉澶囧搧绛炬敹鍗昉DF鐢婚潰鍒濆鍖�
+        PageCutList = new List<List<String>>();
+        List<Rental_Apply__c> ApplyList = new List<Rental_Apply__c>();
+        Map<String,String>  AgencyAddressIdMap = new Map<String,String>(); //20201124 LJH OCSM_BP5-61 add 鍑哄�烮d,鍦板潃Id
+        if(rentalApplyId!=null){
+            ApplyList = [select id,
+                                name,
+                                Name_No__c, // 20211209 ljh SFDC-C923SR add 
+                                Shippment_loaner_time__c,
+                                WorkPlace__c,
+                                Salesdept__c,
+                                Demo_purpose1__c,
+                                Demo_purpose2__c,
+                                Bollow_Date__c,
+                                Campaign__r.EndDate,
+                                Follow_UP_Opp__c,
+                                Repair__r.Repair_Shipped_Date__c,
+                                Return_dadeline_final__c,
+                                Shipment_address__r.Post_Code__c,
+                                Person_In_Charge__r.Name,Post_Code__c,
+                                Shippment_adress_detail__c,
+                                Person_In_Charge__r.Phone,
+                                Phone_number__c,
+                                Hospital__r.Name,Account__r.Department_name__c,
+                                Account__r.Name,
+                                Direct_shippment_address__c,
+                                Dealer__r.Postal_Code__c,
+                                ApplyUser__r.Name,
+                                applyUser__r.Phone,
+                                Loaner_medical_Staff__r.Name,
+                                Loaner_medical_Staff__r.Phone,
+                                Loaner_received_staff__c,
+                                Loaner_received_staff_phone__c,
+                                Asset_loaner_start_date__c,
+                                Asset_loaner_start_day__c,
+                                ApplyPerson_Phone__c,
+                                Loaner_centre_mail_address__c,
+                              // Main_Cnt__c,
+                              // Accessory_Cnt__c,
+                                Old_Rental_Apply__c,//20201120 LJH OCSM_BP5-61 add
+                                Split_Apply_Reason__c,//20201120 LJH OCSM_BP5-61 add
+                                RecordType.DeveloperName,//20201120 LJH OCSM_BP5-61 add
+                                Request_shipping_day__c,//20201120 LJH OCSM_BP5-61 add
+                                ToAgency__c,//20201123 LJH OCSM_BP5-61 add
+                                Agency_Address_Id__c,//20201124 LJH OCSM_BP5-61 add
+                                Root_Rental_Apply__c,//20210617 ljh 1732 add
+                                BRId__c, // 20211209 ljh SFDC-C923SR add 
+                         		direct_send__c,
+                                QRImg__c,
+                                QRId__c,
+                                AWS_Data_Id__c,//20220304 
+                                Direct_Shippment_Address_Encrypt__c,//20220304
+                                Phone_Number_Encrypt__c//20220304
+                        from  Rental_Apply__c
+                        where id = :rentalApplyId];
+        }
+
+        if(ApplyList.size()>0){
+            ApplyHeadShow = ApplyList[0];
+            qrcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.QRId__c);
+            barcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.BRId__c);
+        }
+        //澧炲姞鍊熷嚭澶囧搧SET涓�瑙圠ist锛屼负浜嗚幏鍙栧�熷嚭澶囧搧SET涓�瑙堟槑缁�
+        List<String> RAESSearchList = New List<String>();
+        //20201201 ljh  OCSM_BP5-76 add start
+        String centerAddressInfo;
+        bp3_Setting__c conf = bp3_Setting__c.getOrgDefaults();
+        //20201201 ljh  OCSM_BP5-76 add end
+        //鏍规嵁澶囧搧涓績閭鍒ゆ柇澶囧搧涓績
+        if(ApplyHeadShow.Loaner_centre_mail_address__c=='OCM_Asset@olympus.com.cn'){
+          centreAddress = '璇峰皢澶囧搧鍥炲瘎鑷冲寳浜鍝佷腑蹇�';
+          centerAddressInfo = 'BeiJingCenter';
+        }else if(ApplyHeadShow.Loaner_centre_mail_address__c=='OCM_AssetSH@olympus.com.cn'){
+          centreAddress = '璇峰皢澶囧搧鍥炲瘎鑷充笂娴峰鍝佷腑蹇�';
+          centerAddressInfo = 'ShangHaiCenter';
+        }else if(ApplyHeadShow.Loaner_centre_mail_address__c=='OCM_AssetGZ@olympus.com.cn'){
+          centreAddress = '璇峰皢澶囧搧鍥炲瘎鑷冲箍宸炲鍝佷腑蹇�';
+          centerAddressInfo = 'GuangZhouCenter';
+        }
+        //20201120 LJH OCSM_BP5-61 add start
+        //鐜板湴绠$悊鍒嗗崟 涓诲崟&浠庡崟
+        //20210617 ljh 1732 update start
+        if(ApplyHeadShow.RecordType.DeveloperName == 'AgencyRequest'){
+            //璁板綍绫诲瀷鍔炰簨澶�
+            IsShowLU = false;
+            String tempStr = ApplyHeadShow.Agency_Address_Id__c;
+            if(String.isNotBlank(tempStr)){
+                AgencyAddressIdMap.put(ApplyHeadShow.Id,tempStr.substring(0,15));
+            }
+            if(String.isBlank(ApplyHeadShow.Old_Rental_Apply__c)){
+                List<Rental_Apply__c> ApplyCopyList = [select Id, Name from  Rental_Apply__c where Root_Rental_Apply__c = :ApplyHeadShow.id  and Split_Apply_Reason__c = '鐜板湴绠$悊鍒嗗崟']; //20210611 ljh 1732 update Root_Rental_Apply__c
+                if(ApplyCopyList.size()>0){
+                    for(Rental_Apply__c ac:ApplyCopyList){
+                        String tempId = ac.Id;
+                        rentalApplyId.add(tempId);
+                    }  
+                }
+
+            }else{
+                List<Rental_Apply__c> ApplyCopyList = [select Id, Name from  Rental_Apply__c where ((Root_Rental_Apply__c = :ApplyHeadShow.Root_Rental_Apply__c and id != :ApplyHeadShow.id and Split_Apply_Reason__c = '鐜板湴绠$悊鍒嗗崟')  OR id = :ApplyHeadShow.Root_Rental_Apply__c) ]; //20210611 ljh 1732 update Root_Rental_Apply__c
+                if(ApplyCopyList.size()>0){
+                    for(Rental_Apply__c ac:ApplyCopyList){
+                        String tempId = ac.Id;
+                        rentalApplyId.add(tempId); 
+                    }   
+                }
+            }
+        }else{
+            if(String.isBlank(ApplyHeadShow.Old_Rental_Apply__c)){
+                //鏄惁 鐜板湴绠$悊鍒嗗崟 涓诲崟
+                List<Rental_Apply__c> ApplyCopyList = [select Id, Name from  Rental_Apply__c where Root_Rental_Apply__c = :ApplyList[0].id  and Split_Apply_Reason__c = '鐜板湴绠$悊鍒嗗崟']; //20210611 ljh 1732 update Root_Rental_Apply__c
+                if(ApplyCopyList.size()>0){
+                    IsShowLU = false;
+                    IsMain = true;
+                    for(Rental_Apply__c ac:ApplyCopyList){
+                        String tempId = ac.Id;
+                        rentalApplyId.add(tempId);
+                    }    
+                }
+            }
+        }
+        List<Shipment_address__c> ShipmentAddressList = [select Id,Name,Address__c from Shipment_address__c where Id in :AgencyAddressIdMap.values()];
+        Map<String,String> ShipmentAddressMap = new Map<String,String>();
+        for(Shipment_address__c sa : ShipmentAddressList){
+            String tempStr = sa.Id;
+            ShipmentAddressMap.put(tempStr.substring(0,15),sa.Address__c);
+        }
+        Set<String> keySet = AgencyAddressIdMap.keySet();
+        for(String ks:keySet){
+            AgencyAddressIdMap.put(ks,ShipmentAddressMap.get(AgencyAddressIdMap.get(ks)));
+        }
+        //20201120 LJH OCSM_BP5-61 add end
+        //鍖荤枟鏈烘瀯鍚嶅垎琛屾樉绀�
+        if(ApplyHeadShow.Hospital__r.Name != null){
+            String HospOrgan = ApplyHeadShow.Hospital__r.Name;
+            Integer HospSize = HospOrgan == null ? 0 : HospOrgan.length();
+            if(HospSize <=19){
+                HospitalName = HospOrgan;
+            }else{
+                HospitalName = HospOrgan.substring(0,19)+'\n'+HospOrgan.substring(19,HospSize);
+            }
+        }
+
+        //鍙戣揣鍦板潃鍒嗚鏄剧ず
+        String ShippMentAdr = null;
+        if (ApplyHeadShow.Shippment_adress_detail__c != null) {
+            ShippMentAdr = ApplyHeadShow.Shippment_adress_detail__c;
+        } else {
+            ShippMentAdr = ApplyHeadShow.Direct_shippment_address__c;
+            addFlag = true;
+        }
+
+        Integer ShipAdrSize = ShippMentAdr == null ? 0 : ShippMentAdr.length();
+        if (ShipAdrSize <= 26) {
+            Shippmentadress = ShippMentAdr;
+        } else if (ShipAdrSize > 26 && ShipAdrSize <= 52) {
+            Shippmentadress = ShippMentAdr.substring(0,26)+ '\n' +ShippMentAdr.substring(26,ShipAdrSize);
+        } else {
+            Shippmentadress = ShippMentAdr.substring(0,26)+'\n'+ShippMentAdr.substring(26,52) + '\n'+ShippMentAdr.substring(52,ShipAdrSize);
+        }
+
+        // 澧炲姞鍖婚櫌鍊熺敤鏈熼檺锛岃緭鍑哄瓧娈垫牸寮忓寲
+        if (ApplyHeadShow.Asset_loaner_start_date__c != null) {
+            if (ApplyHeadShow.Demo_purpose2__c      == '浜у搧璇曠敤'
+                ||  ApplyHeadShow.Demo_purpose2__c  ==  '鏂颁骇鍝佽瘎浠�'
+                ||  ApplyHeadShow.Demo_purpose2__c  ==  FixtureUtil.raDemo_purpose2MAP.get('shiyongwuxunjia')
+                ||  ApplyHeadShow.Demo_purpose2__c  ==  FixtureUtil.raDemo_purpose2MAP.get('shiyongyouxunjia')
+                ||  ApplyHeadShow.Demo_purpose2__c  ==  '鍏朵粬'
+                ||  ApplyHeadShow.Demo_purpose2__c  ==  '鍗忚鍊熺敤') {
+                BorrowTimeString = String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) + ' ~ '
+                                 + String.valueOf(ApplyHeadShow.Return_dadeline_final__c)
+                                 + '鍓嶅埌杈惧ゥ鏋楀反鏂鍝佷腑蹇�';
+            } else if (ApplyHeadShow.Demo_purpose2__c == '瀛︿細灞曚細') {
+                if (ApplyHeadShow.Campaign__r.EndDate != null){
+                    BorrowTimeString = String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) + ' ~ '
+                                     + String.valueOf(ApplyHeadShow.Campaign__r.EndDate.addDays(5))
+                                     + '鍓嶅埌杈惧ゥ鏋楀反鏂鍝佷腑蹇�';
+                                     // 2018骞�7鏈�31鏃� SWAG-B36CY6 by 寮犵帀灞� start
+                    } else if (ApplyHeadShow.Campaign__r.EndDate == null) {
+                       // 2018骞�7鏈�31鏃� SWAG-B36CY6 by 寮犵帀灞� end
+                        BorrowTimeString = '瀛︿細缁撴潫鏃ヤ负绌猴紝鏃犳硶纭畾鍖婚櫌鍊熺敤鏈熼檺';
+                    }else{
+                        BorrowTimeString = 'ApexClass104:鏃犳硶鑾峰彇鏁版嵁锛岃鑱旂郴寮�鍙戠粍';
+                    }
+
+            } else if (ApplyHeadShow.Demo_purpose2__c == '宸茶喘寰呰揣') {
+                BorrowTimeString = String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) + ' ~ '
+                                 + '鏂板搧鍙戣揣鏃ヨ捣14澶╁唴'
+                                 + '鍒拌揪濂ユ灄宸存柉澶囧搧涓績';
+            } else if (ApplyHeadShow.Demo_purpose2__c == '鏁呴殰鎺掓煡') {
+                BorrowTimeString = '鍒ゅ畾鏈夋晠闅滄椂锛�' + String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c)
+                                 + '~淇悊鍝佽繑閫佹棩璧�14澶╁唴鍒拌揪濂ユ灄宸存柉澶囧搧涓績\n'
+                                 + '鍒ゅ畾鏃犳晠闅滄椂锛�' + String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c)
+                                 + '~鍑哄簱鏃ヨ捣10涓伐浣滄棩鍐呭埌杈惧ゥ鏋楀反鏂鍝佷腑蹇�';
+            } else if (ApplyHeadShow.Demo_purpose1__c == '缁翠慨浠g敤') {
+                BorrowTimeString = String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) + ' ~ '
+                                 + '淇悊鍝佽繑閫佹棩璧�14澶╁唴'
+                                 + '鍒拌揪濂ユ灄宸存柉澶囧搧涓績';
+            } else {
+                BorrowTimeString = '鏈瀹氬綊杩樻湡闄�';
+            }
+
+        } else {
+            BorrowTimeString = '澶囧搧棰勮鍑鸿揣鏃ヤ负绌猴紝鏃犳硶纭畾鍖婚櫌鍊熺敤鏈熼檺';
+        }
+
+        system.debug(' ApplyHeadShow.Demo_purpose1__c'+ ApplyHeadShow.Demo_purpose1__c);
+
+        // 澧炲姞鍖婚櫌鍊熺敤鏈熼檺锛岃緭鍑哄瓧娈垫牸寮忓寲
+        // system.debug('娴嬭瘯浣嶇疆1+raesidList'+raesidList);
+        records = new List<PDFInfo>();
+        List<Rental_Apply_Equipment_Set__c> raesList = new List<Rental_Apply_Equipment_Set__c>();
+        // List<String> esidList = new List<String>();
+        //ToDo Where 纰鸿獚
+        String soql =  'select Id, Name, Rental_Apply__c, Fixture_Set__r.Name'
+               + ', Rental_Apply__r.Name, Request_owner__c, Rental_Apply__r.Salesdept__c'
+               + ', Rental_Apply__r.WorkPlace__c, Account__c, Rental_Apply__r.Campaign__r.Name'
+               + ', Rental_Apply__r.Request_shipping_day__c, Rental_Apply__r.Loaner_received_staff__c'
+               + ', Rental_Apply__r.Loaner_received_staff_phone__c, Rental_Apply__r.Shippment_adress_detail__c'
+               + ', Rental_End_Date__c, Rental_Apply__r.direct_shippment_address__c'
+               + ' from Rental_Apply_Equipment_Set__c'
+               + ' where Rental_Apply__c = :rentalApplyId'
+               + ' AND Cancel_Select__c = false'
+               + ' AND Yi_Shipment_request__c > 0';
+
+        //ToDo鏉′欢纰鸿獚
+        //soql += 'and RAES_Status__c != \'寮曞綋娓圽' and RAES_Status__c != \'鍙栨秷鍒嗛厤\'';
+
+        //浠婂洖鍊嬪垾銇〃绀恒伅銇椼仾銇勩伄銇с偝銉°兂銉堛偄銈︺儓銇椼伨銇�
+        // if (raesidListIMG.size() > 0) {
+        //     soql += ' AND Id in : raesidListIMG ';
+        // }
+
+        // if(ApplyHeadShow.Shippment_loaner_time__c != null) {
+        //     soql += ' AND Shippment_loaner_time__c != null';
+        // }
+
+        soql += ' order by Name';
+        raesList = Database.query(soql);
+        //20201120 LJH OCSM_BP5-61 add start
+        //鐢宠鍗�-鐢宠涓�瑙圠ist
+        Map<Id,List<Rental_Apply_Equipment_Set__c>> raRaesMap = new  Map<Id,List<Rental_Apply_Equipment_Set__c>>();
+        //20201120 LJH OCSM_BP5-61 add end
+        if (raesList.size() > 0) {
+            for (Rental_Apply_Equipment_Set__c raes : raesList) {
+                //ToDo RentalApplyName鍙栥倞鏂广亴澶�
+                //RentalApplyName = raes.Rental_Apply__r.Name;
+                //寰幆鑾峰緱RAES_id
+                RAESSearchList.add(raes.id);
+                //20201120 LJH OCSM_BP5-61 add start
+                if(!raRaesMap.containsKey(raes.Rental_Apply__c)){
+                    raRaesMap.put(raes.Rental_Apply__c,new Rental_Apply_Equipment_Set__c[]{raes});
+                }else{
+                    raRaesMap.get(raes.Rental_Apply__c).add(raes);
+                }
+                //20201120 LJH OCSM_BP5-61 add end
+            }
+            RentalApplyName = raesList[0].Rental_Apply__r.Name;
+        }
+
+        Map<String, List<Rental_Apply_Equipment_Set_Detail__c>> raesdMap = new Map<String, List<Rental_Apply_Equipment_Set_Detail__c>>();
+
+        String NextName = '';
+        if(RAESSearchList.size()>0){
+            List<Rental_Apply_Equipment_Set_Detail__c> RAESDLine = New List<Rental_Apply_Equipment_Set_Detail__c>();
+            RAESDLine = [
+                    select id, Equipment_SetD_Borrowed__c,
+                        EquipmentSet_Managment_Code_formula__c,
+                        Rental_Apply_Equipment_Set__c,
+                        Rental_Apply_Equipment_Set__r.Name,
+                        Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name,
+                        Rental_Apply_Equipment_Set__r.Loaner_code__c,
+                        FSD_Name_CHN__c,
+                        Fixture_Name_text__c,
+                        Fixture_Model_No_F__c,
+                        Fixture_Model_No_text__c,
+                        Loaner_asset_no__c,
+                        Internal_Asset_number_c__c,
+                        ProductName__c,
+                        Asset__r.Product2.Image_DocumentID__c,
+                        Asset__r.OwnershipMachine_No__c,
+                        Asset__r.Name,
+                        Asset__r.Loaner_accsessary__c,
+                        Asset__r.WH_location__c,
+                        SerialNumber__c,
+                        SerialNumber_text__c,
+                        Is_Body__c,
+                        // Rental_Apply_Equipment_Set__r.SerialNumber_text__c,
+                        Rental_Apply_Equipment_Set__r.Loaner_code_text__c
+                    from Rental_Apply_Equipment_Set_Detail__c
+                    where Rental_Apply_Equipment_Set__r.Id in :RAESSearchList
+                and Cancel_Select__c = False
+                AND asset__c != null
+                AND Cancel_Select__c = false
+                AND Shipment_request_time2__c != null
+                    order by Rental_Apply_Equipment_Set__c, Name, ProductName__c asc nulls last, Asset__r.Loaner_accsessary__c];
+            mainCnt = 0;
+            accessoryCnt = 0;
+            for (Rental_Apply_Equipment_Set_Detail__c ra : RAESDLine) {
+                if (ra.Is_Body__c) {
+                    mainCnt += 1;
+                } else {
+                    accessoryCnt += 1;
+                }
+                if (raesdMap.containsKey(ra.Rental_Apply_Equipment_Set__c)) {
+                    raesdMap.get(ra.Rental_Apply_Equipment_Set__c).add(ra);
+                } else {
+                    List<Rental_Apply_Equipment_Set_Detail__c> rsd = new List<Rental_Apply_Equipment_Set_Detail__c>();
+                    rsd.add(ra);
+                    raesdMap.put(ra.Rental_Apply_Equipment_Set__c,rsd);
+                }
+            }
+            //20201125 LJH OCSM_BP5-61 add start
+            raesList = null;
+            raesList = raRaesMap.get(rentalApplyId[0]);
+            //20201125 LJH OCSM_BP5-61 add end
+        }
+        DetailsAllList = new List<lineInfo>();
+        recordsIMG = new List<PDFInfoIMG>();
+        //璁$畻琛岄珮鎬绘暟锛岀敤浜庡垎椤�
+        integer LineNum = 0;
+
+        System.debug('raesListsize is' + raesList.size());
+
+        for (Integer i = 0; i < raesList.size(); i++) {
+            Rental_Apply_Equipment_Set__c raes = raesList[i];
+            Map<String,integer> DLSM = new Map<String,integer>();
+            Map<String,String> LoanerCodeSM = new Map<String,String>();
+            Map<String,String> DetailsLineMap = new Map<String,String>();
+            Set<String> AllSet = new Set<String>();
+            String DetailsLine = '';
+            List<Rental_Apply_Equipment_Set_Detail__c> LineOrderList = raesdMap.get(raes.Id);
+            // system.debug('LineOrderList娴嬭瘯'+LineOrderList.size());
+
+            if (LineOrderList!=null) {
+                boolean LotFlag = true;
+                for (Rental_Apply_Equipment_Set_Detail__c Ec : LineOrderList) {
+                    // LoanerCodeSM.put(Ec.Equipment_Set__r.Loaner_code__c, Ec.Equipment_Set__r.Loaner_code__c);
+                    system.debug('LoanerCodeSM鏄剧ず'+LoanerCodeSM);
+                    //鍏堟暟鍑烘潵鏈夊灏戦噸澶嶇殑
+                    //DetailsLine = DetailsLine + Ec.Asset__r.OwnershipMachine_No__c+' ; ';
+                    if (DLSM.containsKey(Ec.Asset__r.OwnershipMachine_No__c)) {
+                       //OCM鍐呴儴浜у搧鍨嬪彿 OwnershipMachine_No__c
+                       integer j = DLSM.get(Ec.Asset__r.OwnershipMachine_No__c)+1;
+                       DLSM.put(Ec.Asset__r.OwnershipMachine_No__c, j);
+                    } else {
+                       DLSM.put(Ec.Asset__r.OwnershipMachine_No__c, 1);
+                    }
+
+                    if (Ec.Asset__r.Loaner_accsessary__c == false) {
+                       //鏈変富鏈�
+                       LotFlag = false;
+                    }
+
+                    //鍘绘帀閲嶅鐨� ToDo鏉′欢纭
+                    // if (Ec.Asset__r.Loaner_accsessary__c == true) {
+                        //if(Ec.SerialNumber__c == ''||Ec.SerialNumber__c==null){
+                       AllSet.add(Ec.Asset__r.OwnershipMachine_No__c);
+                    // }
+                }
+
+                system.debug('DLSM:::::'+DLSM);
+                system.debug('AllSet:::::'+AllSet);
+                for (String Ecc : AllSet) {
+                    //鐒跺悗鍋氭垚瀛楃涓�
+                    if (LotFlag) {
+                        //閮戒负闄勫睘鍝�
+                        if(DLSM.get(Ecc)==1) {
+                            DetailsLine = DetailsLine + Ecc + ' ; ';
+                        } else {
+                            DetailsLine = DetailsLine + Ecc + '*' + DLSM.get(Ecc) + ' ; ';
+                        }
+                    } else {
+                        if (DLSM.get(Ecc)==1&&!LoanerCodeSM.containsKey(Ecc)) {
+                            DetailsLine = DetailsLine + Ecc+' ; ';
+                        } else if (DLSM.get(Ecc)!=1) {
+                            DetailsLine = DetailsLine + Ecc+'*'+DLSM.get(Ecc)+' ; ';
+                        }
+                    }
+                }
+
+                if (DetailsLine.length()>0) {
+                    DetailsLine = DetailsLine.substring(0, DetailsLine.length()-2);
+                }
+
+                // List<Rental_Apply_Equipment_Set_Detail__c> LinJar = raesdMap.get(raes.Equipment_Set__c);
+                // Rental_Apply_Equipment_Set_Detail__c LineOrder = new Rental_Apply_Equipment_Set_Detail__c();
+                // if (LinJar.size()>0) {
+                Integer k = i;
+                for (Rental_Apply_Equipment_Set_Detail__c LineOrder : LineOrderList) {
+                        // LineOrder = raesdMap.get(raes.Equipment_Set__c)[0];
+                        // system.debug('LineOrder::::::'+LineOrder);
+                        lineInfo Li = new lineInfo(LineOrder, LotFlag, k);
+                        Li.AssetModelNo = DetailsLine;
+                        //杞藉叆琛岄珮 姣忚44
+                        if (DetailsLine.length() != 0) {
+                            Li.LineHeight = (DetailsLine.length()/44) + (Math.mod(DetailsLine.length(), 44) > 0 ? 1 : 0);
+                        } else {
+                            Li.LineHeight = 1;
+                        }
+
+                        Li.height = Li.LineHeight * MAXLINEHRIGHT;
+
+                        LineNum = LineNum + Li.LineHeight;
+                        DetailsAllList.add(Li);
+                        k = null;
+                }
+
+                // }
+                // for (Rental_Apply_Equipment_Set_Detail__c raesd : LineOrderList) {
+                    PDFInfoIMG infoIMG = new PDFInfoIMG(raes, LineOrderList);
+                    recordsIMG.add(infoIMG);
+                // }
+            }
+        }
+
+  //      //鍒嗛〉 15琛屼竴椤碉紝瀹為檯鏄剧ず14琛岋紝鍒ゆ柇绗�14琛屾槸鍚︿负鍙屽�嶉珮搴�
+  //      //鏄庣粏鎬婚〉鏁�
+        integer PageAllNum = integer.valueOf(Math.ceil( LineNum / (MAXPAGECOUNT+1))+1+'');
+
+        pageCnt = integer.valueOf(Math.ceil( DetailsAllList.size() / 17 ) +1+'');
+        //for(Integer j = 0 ; j< PageAllNum ;j++){
+        //鏂板缓涓�椤�
+        
+        PDFInfo info = new PDFInfo(new Rental_Apply__c(),New List<Rental_Apply_Equipment_Set_Detail__c>());
+        // 20220413 ljh  鎶ご鏄剧ず update start
+        //20201120 LJH OCSM_BP5-61 update start
+        // if(!IsShowLU){
+        //     if(!IsMain){
+        //         info.isAgencyOrCenter = true;//鍔炰簨澶�
+        //         info.AgencyAddressName = '璇峰皢澶囧搧鍥炲瘎鑷�';
+        //         info.AgencyAddressName += ApplyHeadShow.ToAgency__c == null ? '' : ApplyHeadShow.ToAgency__c;
+        //         info.AgencyAddressName += '鍔炰簨澶�';
+        //         info.AgencyOrCenterAddress = AgencyAddressIdMap.get(ApplyHeadShow.Id);
+        //     }else{
+        //         info.isAgencyOrCenter = false;//澶囧搧涓績
+        //         info.AgencyOrCenterAddress = centerAddressInfo;
+        //     }   
+        // }else{
+        //     info.isAgencyOrCenter = false;//澶囧搧涓績
+        //     info.AgencyOrCenterAddress = centerAddressInfo;
+        // }
+        //20201120 LJH OCSM_BP5-61 update  end
+        if(!IsShowLU){
+            if(!IsMain){
+                isAgencyOrCenter = true;//鍔炰簨澶�
+                AgencyAddressName = '璇峰皢澶囧搧鍥炲瘎鑷�';
+                AgencyAddressName += ApplyHeadShow.ToAgency__c == null ? '' : ApplyHeadShow.ToAgency__c;
+                AgencyAddressName += '鍔炰簨澶�';
+                AgencyOrCenterAddress = AgencyAddressIdMap.get(ApplyHeadShow.Id);
+            }else{
+                isAgencyOrCenter = false;//澶囧搧涓績
+                AgencyOrCenterAddress = centerAddressInfo;
+            }   
+        }else{
+            isAgencyOrCenter = false;//澶囧搧涓績
+            AgencyOrCenterAddress = centerAddressInfo;
+        }
+        // 20220413 ljh  鎶ご鏄剧ず update end
+        integer PageCut = 0;
+        if (PageAllNum>=7) {
+           PageAllNum=7;
+        }
+
+        Integer count = DetailsAllList.size() / MAXPAGECOUNT;
+        if (Math.mod(DetailsAllList.size(), MAXPAGECOUNT) > 0) {
+        count += 1;
+        }
+
+
+        for (Integer K = 0; K < count*MAXPAGECOUNT ; K++) {
+            if (DetailsAllList.size()>k) {
+               info.lineList.add(DetailsAllList[K]);
+               PageCut = PageCut +DetailsAllList[K].LineHeight-1;
+
+            } else {
+               info.lineList.add(new lineInfo(new Rental_Apply_Equipment_Set_Detail__c(), false, null));
+            }
+            System.debug('info.lineList is' + info.lineList);
+            if (records.size() < PageAllNum) {
+               PageCut = PageCut+1;
+            }
+            system.debug('PageCut[K]' + PageCut);
+
+            if (info.lineList.size() >= MAXPAGECOUNT) {
+               records.add(info);
+               system.debug('records鍐呭::::::::'+records);
+               info = new PDFInfo(new Rental_Apply__c(),New List<Rental_Apply_Equipment_Set_Detail__c>());
+               List<String> G = new List<String>();
+               G.add('ANY element');
+               PageCutList.add(G);
+               PageCut=0;
+            }
+        }
+
+       // for (Integer K = 0; K < PageAllNum*MAXPAGECOUNT ; K++) {
+       //     if (DetailsAllList.size()>k) {
+       //         info.lineList.add(DetailsAllList[K]);
+       //         PageCut = PageCut +DetailsAllList[K].LineHeight-1;
+
+       //     } else {
+       //         info.lineList.add(new lineInfo(new Rental_Apply_Equipment_Set_Detail__c(), false, null));
+       //     }
+       //     System.debug('info.lineList is' + info.lineList);
+       //     if (records.size() < PageAllNum) {
+       //         PageCut = PageCut+1;
+       //     }
+       //     system.debug('PageCut[K]' + PageCut);
+
+       //     if (PageCut >= MAXPAGECOUNT) {
+       //         records.add(info);
+       //         system.debug('records鍐呭::::::::'+records);
+       //         info = new PDFInfo(new Rental_Apply__c(),New List<Rental_Apply_Equipment_Set_Detail__c>());
+       //         List<String> G = new List<String>();
+       //         G.add('ANY element');
+       //         PageCutList.add(G);
+       //         PageCut=0;
+       //     }
+       // }
+
+  //      system.debug('records鍐呭'+records);
+        pageCnt = records.size();
+        AllSum = DetailsAllList.size();
+  
+  //      //pageNum
+        recordsIMGfist = new List<PDFInfoIMG>();
+
+        for (integer J = pageNum * 10; J<pageNum * 10 +10; J++) {
+            if (J < recordsIMG.size()) {
+               recordsIMGfist.add(recordsIMG.get(J));
+            }
+        }
+
+        pageCntIMG = recordsIMGfist.size();
+    }
+    // Data Bean
+    class PDFInfo {
+        public String eSetName { get; private set; } //澶囧搧涓績绠$悊鍗曞彿
+        // 20220413 ljh  鎶ご鏄剧ず update start
+        // public String AgencyAddressName { get; private set; } //鍥炲瘎鍦板潃 20201123 LJH OCSM_BP5-61 add
+        // public Boolean isAgencyOrCenter { get; private set; } //澶囧搧涓績锛熷姙浜嬪 20201123 LJH OCSM_BP5-61 add
+        // public String AgencyOrCenterAddress { get; private set; }//20201124 LJH OCSM_BP5-61 add
+        // 20220413 ljh  鎶ご鏄剧ず update end
+        public String requestOwner { get; private set; } //鐢宠浜�
+        public String salesDept { get; private set; } //鎵�灞炴湰閮�
+        public String workPlace { get; private set; } //鎵�灞炲姙浜嬪
+        public String acc { get; private set; } //鍊熺敤鍗曚綅
+        public String shippingDay { get; private set; } //甯屾湜鍒拌揣鏃�
+        public String receivedStaff { get; private set; } //鏀朵欢浜�
+        public String receivedStaffPhone { get; private set; } //鏀朵欢浜虹數璇�
+        public String shippmentAdress { get; private set; } //鍙戦�佸湴鍧�
+        public String HospitalEndDate { get; private set; } //鍦ㄥ尰闄娇鐢ㄦ湡闄�
+        public String LoanerCode {get;private set;} //鍌欏搧鍨嬬暘
+        public List<lineInfo> lineList { get; private set; }
+        public String AssetModelNo {get;private set;} //OCM鍐呴儴浜у搧鍨嬪彿(鐣ョО)
+        public PDFInfo(Rental_Apply__c raes, List<Rental_Apply_Equipment_Set_Detail__c> raesdList) {
+            eSetName = raes.Name;
+            requestOwner = raes.Person_In_Charge__c;
+            salesDept = raes.Salesdept__c;
+            workPlace = raes.WorkPlace__c;
+            acc = raes.Account__c == null && raes.Campaign__c != null ? raes.Campaign__c : raes.Account__c;
+            shippingDay = raes.Request_shipping_day__c == null ? '' : raes.Request_shipping_day__c.format();
+            receivedStaff = raes.Loaner_received_staff__c;
+            receivedStaffPhone = raes.Loaner_received_staff_phone__c;
+            shippmentAdress = raes.Shippment_adress_detail__c == null ? raes.direct_shippment_address__c : raes.Shippment_adress_detail__c;
+            if (raesdList == null) {
+                raesdList = new List<Rental_Apply_Equipment_Set_Detail__c>();
+            }
+            lineList = new List<lineInfo>();
+        }
+    }
+
+    class lineInfo {
+        //bp2
+        public String index { get; private set; }  //  搴忓彿
+        public String setName { get; private set; }  //  澶囧搧set鍨嬪彿
+        public String dModelNo { get; private set; }  //  澶囧搧閰嶅鏄庣粏鍨嬪彿
+        public String dChinaName { get; private set; }  //  涓枃鍚嶇О
+        public String dSerialNumber { get; private set; }  //  鏈鸿韩鍙�
+        public String dLoaner_asset_no { get; private set; }  //  鍥哄畾璧勪骇鍙风爜
+        public String dManagementnumber { get; private set; }  //  绠$悊鍙风爜
+        public String dQRCode { get; private set; }  //  浜岀淮鐮�
+        private Integer maxLineContact;
+        public String wh_location { get; private set; }  //  璐т綅鍙�
+
+
+        public String name1 { get; private set; }
+        public String productName1 { get; private set; }
+        public String serialNumber1 { get; private set; }
+        public String name2 { get; private set; }
+        public String productName2 { get; private set; }
+        public String serialNumber2 { get; private set; }
+        public String LoanerCode {get;private set;} //鍌欏搧鍨嬬暘
+        public String AssetModelNo {get;private set;} //OCM鍐呴儴浜у搧鍨嬪彿(鐣ョО)
+        public List<String> AssetModelNoList {get;private set;}//OCM鍐呴儴浜у搧鍨嬪彿(鐣ョО) 闆嗗悎
+        public integer LineHeight {get;private set;} //璁板綍琛岄珮
+        public integer height {get;private set;}
+        // public lineInfo(Equipment_Set_Detail__c esd1, Equipment_Set_Detail__c esd2) {
+        //    AssetModelNoList = new List<String>();
+        //    name1 = esd1.Equipment_Set__r.Name == null ? '銆�' : esd1.Equipment_Set__r.Name;
+        //    productName1 = esd1.Asset__r.Name;
+        //    serialNumber1 = esd1.SerialNumber__c;
+        //    name2 = esd2.Name == null ? '銆�' : esd2.Name;
+        //    productName2 = esd2.Asset__r.Name;
+        //    serialNumber2 = esd2.SerialNumber__c;
+        //    height = height ==null ? 25: height;
+        //    LoanerCode = esd1.Equipment_Set__r.Loaner_code__c;
+        // }
+// MAXINDEXCOUNT = 26;
+// MAXDCHINNAMECOUNT = 2
+// MAXDMODELNOCOUNT = 26
+// MAXDSERIALNUMBERCOUNT
+// MAXDLANCOUNT = 26;
+// MAXDMMCOUNT = 26;
+        public lineInfo(Rental_Apply_Equipment_Set_Detail__c raesd, boolean LotFlag, Integer inde) {
+           AssetModelNoList = new List<String>();
+            //bp2
+            maxLineContact = 0;
+            index = inde == null ? '' : String.valueOf(inde + 1);
+            dChinaName = raesd.Fixture_Name_text__c;
+            // dChinaName = '457100: 瀛斿彛鎺㈠ご锛孋OTTLE鍨嬶紝甯﹀伐涓氶噾鍒氱煶锛�20.5 cm锛堝伐涓氶噾鍒氱煶鐮旂(琛ㄩ潰鍙栦唬浜嗕紶缁熺殑閽㈢汗锛岃繖浣垮緱鎿嶄綔鐪佸姏锛屾洿绠�鏄擄紝鍚屾椂鑾峰緱浜嗘洿楂樼殑绮剧‘搴︺�傚畠鑳戒互鏋侀珮鐨勭簿鍑嗗害鍒囧壊鎴栫爺纾ㄨ緝澶ч缁勭粐锛夈��';
+            // dChinaName = '瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛鎺㈠ご瀛斿彛';
+            dModelNo = raesd.Fixture_Model_No_text__c;
+            dSerialNumber = raesd.SerialNumber_text__c;
+            // dLoaner_asset_no = raesd.Loaner_asset_no__c;
+            // OLY_OCM-321 鍙戣揣纭鍗曪細鍥哄畾璧勪骇鍙峰瓧娈典慨鏀规樉绀轰负鍥哄畾璧勪骇缂栧彿(Key) _c__c?
+            dLoaner_asset_no = raesd.Internal_Asset_number_c__c;
+            dManagementnumber = raesd.EquipmentSet_Managment_Code_formula__c == null ? '銆�' : raesd.EquipmentSet_Managment_Code_formula__c;
+
+
+
+
+           name1 = raesd.Equipment_SetD_Borrowed__c == null ? '銆�' : raesd.Equipment_SetD_Borrowed__c;
+           productName1 = raesd.Asset__r.Name;
+           setName = raesd.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name;
+           if(LotFlag){
+               serialNumber1 = ' ';
+               LoanerCode = ' ';
+           }else{
+               // serialNumber1 = raesd.Rental_Apply_Equipment_Set__r.SerialNumber_text__c;
+               LoanerCode = raesd.Rental_Apply_Equipment_Set__r.Loaner_code_text__c;
+           }
+           //name2 = esd2.Name == null ? '銆�' : esd2.Name;
+           //productName2 = esd2.Asset__r.Name;
+           //serialNumber2 = esd2.SerialNumber__c;
+           height = height ==null ? MAXLINEHRIGHT: height;
+           wh_location = raesd.Asset__r.WH_location__c;
+        }
+    }
+    // Data Bean
+    class PDFInfoIMG {
+        public String eSetName { get; private set; }
+        // public Equipment_Set__c es { get; private set; }
+        public Fixture_Set__c es { get; private set; }
+
+        public Rental_Apply_Equipment_Set__c raesc { get; private set; }
+        public List<lineInfoIMG> lineList { get; private set; }
+        public List<lineInfoIMGrase> lineListIMG { get; private set; }
+
+        //public PDFInfoIMG(Rental_Apply_Equipment_Set__c raes, List<Equipment_Set_Detail__c> esdl) {
+        //    eSetName = raes.Equipment_Set__r.Name;
+        //    es = raes.Equipment_Set__r;
+        //    raesc = raes;
+        //    if (esdl == null) {
+        //        esdl = new List<Equipment_Set_Detail__c>();
+        //    }
+        //    lineList = new List<lineInfoIMG>();
+        //    if (esdl.Size() >= 20) {
+        //        for (Integer i = 0; i < 5; i++) {
+        //            lineList.add(new lineInfoIMG(esdl[i*4],esdl[i*4+1],esdl[i*4+2],esdl[i*4+3]));
+        //        }
+        //    } else {
+        //        Integer size = esdl.Size();
+        //        for (Integer i = 0; i < 20 - size; i++) {
+        //            esdl.add(new Equipment_Set_Detail__c(Name='銆�'));
+        //        }
+        //        for (Integer i = 0; i < 5; i++) {
+        //            lineList.add(new lineInfoIMG(esdl[i*4],esdl[i*4+1],esdl[i*4+2],esdl[i*4+3]));
+        //        }
+        //    }
+        // }
+        public PDFInfoIMG(Rental_Apply_Equipment_Set__c raes, List<Rental_Apply_Equipment_Set_Detail__c> raesdcl) {
+           eSetName = raes.Fixture_Set__r.Name;
+           es = raes.Fixture_Set__r;
+           if (raesdcl == null) {
+               raesdcl = new List<Rental_Apply_Equipment_Set_Detail__c>();
+           }
+           lineListIMG = new List<lineInfoIMGrase>();
+           if (raesdcl.Size() >= 20) {
+               for (Integer i = 0; i < 5; i++) {
+                   lineListIMG.add(new lineInfoIMGrase(raesdcl[i*4],raesdcl[i*4+1],raesdcl[i*4+2],raesdcl[i*4+3]));
+               }
+           } else {
+               Integer size = raesdcl.Size();
+               for (Integer i = 0; i < 20 - size; i++) {
+                   raesdcl.add(new Rental_Apply_Equipment_Set_Detail__c());
+               }
+               for (Integer i = 0; i < 5; i++) {
+                   lineListIMG.add(new lineInfoIMGrase(raesdcl[i*4],raesdcl[i*4+1],raesdcl[i*4+2],raesdcl[i*4+3]));
+               }
+           }
+        }
+    }
+
+    class lineInfoIMG {
+        //public List<esdInfo> esdl { get; private set; }
+
+        //public lineInfoIMG(Equipment_Set_Detail__c e1, Equipment_Set_Detail__c e2, Equipment_Set_Detail__c e3, Equipment_Set_Detail__c e4) {
+        //    esdl = new List<esdInfo>();
+        //    esdl.add(new esdInfo(e1));
+        //    esdl.add(new esdInfo(e2));
+        //    esdl.add(new esdInfo(e3));
+        //    esdl.add(new esdInfo(e4));
+        //    //esdl.add(e5);
+        //}
+    }
+    class lineInfoIMGrase {
+        public List<esdInfo> esdl { get; private set; }
+
+        public lineInfoIMGrase(Rental_Apply_Equipment_Set_Detail__c e1, Rental_Apply_Equipment_Set_Detail__c e2, Rental_Apply_Equipment_Set_Detail__c e3, Rental_Apply_Equipment_Set_Detail__c e4) {
+           esdl = new List<esdInfo>();
+           esdl.add(new esdInfo(e1));
+           esdl.add(new esdInfo(e2));
+           esdl.add(new esdInfo(e3));
+           esdl.add(new esdInfo(e4));
+           //esdl.add(e5);
+        }
+    }
+
+    class esdInfo {
+        // public Rental_Apply_Equipment_Set_Detail__c esd { get; private set; }
+        public Rental_Apply_Equipment_Set_Detail__c raesl { get; private set; }
+        public Integer nameLength { get; private set; }
+        public String ProductName { get; private set; }
+
+
+        public esdInfo(Rental_Apply_Equipment_Set_Detail__c e) {
+            raesl = e;
+            String name = e.ProductName__c;
+            nameLength = name == null ? 0 : name.length();
+
+            if(nameLength <= 21){
+               //涓�琛�
+               ProductName = name;
+            }else if(nameLength > 21 && nameLength <= 74){
+               //涓よ
+               if(nameLength <= 42){
+                   //7px
+                   //for(Integer i = 0; i < 2 ; i++){
+                       ProductName = name.substring(0,21)+'<br/>'+name.substring(21,nameLength);
+                   //}
+               }else{
+                   //4px
+                   //for(Integer i = 0; i < 2 ; i++){
+                       ProductName = name.substring(0,37)+'<br/>'+name.substring(37,nameLength);
+                   //}
+               }
+                
+            }else{
+               //涓夎
+               //for(Integer i = 0; i < 3 ; i++){
+                       ProductName = name.substring(0,37)+'<br/>' + name.substring(37,74)+'<br/>'+name.substring(74,nameLength);
+               //}
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/FixtureSetDetailHandler.cls b/force-app/main/default/classes/FixtureSetDetailHandler.cls
index 6ce370b..d5d5ad0 100644
--- a/force-app/main/default/classes/FixtureSetDetailHandler.cls
+++ b/force-app/main/default/classes/FixtureSetDetailHandler.cls
@@ -19,8 +19,37 @@
     }
 
     private void beforeSetValue() {
+        Map<String,Fixture_Set_Detail__c> fsdMap = new Map<String,Fixture_Set_Detail__c>();
         for (Fixture_Set_Detail__c nObj : newList) {
             nObj.Name_CHN_Created__c = nObj.Name_CHN__c;
+            // 20230727 ljh 备品类型I和备品类型II放到保有设备上显示 start
+            if(nObj.Loaner_category__c){
+                fsdMap.put(nObj.Fixture_Model_No_F__c,nObj);
+            }
         }
+        // 20230727 ljh 备品类型I和备品类型II放到保有设备上显示 start
+        if(fsdMap.size() > 0){
+            List<Product2>  Product2List = [SELECT Id,Fixture_Model_No_T__c,Loaner_categoryI__c,Loaner_categoryII__c 
+                                                 FROM Product2 
+                                                WHERE Fixture_Model_No_T__c IN :fsdMap.keySet()];
+            if(Product2List.size() > 0){
+                Map<String,Product2> updateMap = new Map<String,Product2>();
+                for(Product2 pro:Product2List){
+                    Product2 p2 = new Product2();
+                    p2.Id = pro.Id;
+                    p2.Loaner_categoryI__c = fsdMap.get(pro.Fixture_Model_No_T__c).Loaner_categoryI__c;
+                    p2.Loaner_categoryII__c =fsdMap.get(pro.Fixture_Model_No_T__c).Loaner_categoryII__c;
+                    if(((String.isNotBlank(p2.Loaner_categoryI__c) && p2.Loaner_categoryI__c.equals(pro.Loaner_categoryI__c)) || (String.isBlank(p2.Loaner_categoryI__c)&&String.isBlank(pro.Loaner_categoryI__c)))
+                        && ((String.isNotBlank(p2.Loaner_categoryII__c) && p2.Loaner_categoryII__c.equals(pro.Loaner_categoryII__c)) || (String.isBlank(p2.Loaner_categoryII__c)&&String.isBlank(pro.Loaner_categoryII__c)))){
+                        continue;
+                    }
+                    updateMap.put(pro.Id,p2);
+                }
+                if(updateMap.size() > 0){
+                    update updateMap.values();
+                }
+            }
+        }
+        // 20230727 ljh 备品类型I和备品类型II放到保有设备上显示 start
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/classes/FixtureSetDetailHandler.cls.bak b/force-app/main/default/classes/FixtureSetDetailHandler.cls.bak
new file mode 100644
index 0000000..6ce370b
--- /dev/null
+++ b/force-app/main/default/classes/FixtureSetDetailHandler.cls.bak
@@ -0,0 +1,26 @@
+public without sharing class FixtureSetDetailHandler extends Oly_TriggerHandler {
+	private Map<Id, Fixture_Set_Detail__c> newMap;
+    private Map<Id, Fixture_Set_Detail__c> oldMap;
+    private List<Fixture_Set_Detail__c> newList;
+    private List<Fixture_Set_Detail__c> oldList;
+
+    public FixtureSetDetailHandler() {
+        this.newMap = (Map<Id, Fixture_Set_Detail__c>) Trigger.newMap;
+        this.oldMap = (Map<Id, Fixture_Set_Detail__c>) Trigger.oldMap;
+        this.newList = (List<Fixture_Set_Detail__c>) Trigger.new;
+        this.oldList = (List<Fixture_Set_Detail__c>) Trigger.old;
+    }
+
+    protected override void beforeInsert() {
+        beforeSetValue();
+    }
+    protected override void beforeUpdate() {
+        beforeSetValue();
+    }
+
+    private void beforeSetValue() {
+        for (Fixture_Set_Detail__c nObj : newList) {
+            nObj.Name_CHN_Created__c = nObj.Name_CHN__c;
+        }
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/FixtureSetHandler.cls b/force-app/main/default/classes/FixtureSetHandler.cls
index a7769f2..de1e5f8 100644
--- a/force-app/main/default/classes/FixtureSetHandler.cls
+++ b/force-app/main/default/classes/FixtureSetHandler.cls
@@ -1,3 +1,4 @@
+// FixtureSetHandlerTest
 public without sharing class FixtureSetHandler extends Oly_TriggerHandler {
     private Map<Id, Fixture_Set__c> newMap;
     private Map<Id, Fixture_Set__c> oldMap;
@@ -16,6 +17,7 @@
     }
     protected override void beforeUpdate() {
         beforeSetValue();
+        upToAsset();// 20230719 ljh DB202306212211 p9
     }
 
     private void beforeSetValue() {
@@ -23,4 +25,59 @@
             nObj.Loaner_code__c = nObj.Name;
         }
     }
+    /**
+     * @Author: [lijinhuan]
+     * @description: 备品类型I和备品类型II放到保有设备上显示
+     * @return {*}
+     */
+    private void upToAsset() {
+        Map<String,Fixture_Set__c> fsMap= new Map<String,Fixture_Set__c>();
+        // Set<String> ModelNoSet = new  Set<String>();
+        for (Fixture_Set__c nObj : newList) {
+            Fixture_Set__c oObj;
+            if (Trigger.isUpdate) {
+                oObj = oldMap.get(nObj.Id);
+            }
+            // 发生改变
+            if( (String.isNotBlank(nObj.Loaner_categoryI__c) && nObj.Loaner_categoryI__c != oObj.Loaner_categoryI__c)
+                || (String.isBlank(nObj.Loaner_categoryI__c) && String.isNotBlank(oObj.Loaner_categoryI__c))
+                || (String.isNotBlank(nObj.Loaner_categoryII__c) && nObj.Loaner_categoryII__c != oObj.Loaner_categoryII__c)
+                || (String.isBlank(nObj.Loaner_categoryII__c) && String.isNotBlank(oObj.Loaner_categoryII__c))
+            ){
+                if(String.isNotBlank(nObj.Fixture_Set_Body_Model_No__c)){
+                    String model = nObj.Fixture_Set_Body_Model_No__c.toUpperCase();
+                    fsMap.Put(model,nObj);
+                }
+                
+            }
+            // if(Trigger.isDelete && String.isNotBlank(oObj.Fixture_Set_Body_Model_No__c ) && (String.isNotBlank(oObj.Loaner_categoryI__c)||String.isNotBlank(oObj.Loaner_categoryII__c))){
+            //     ModelNoSet.add(oObj.Fixture_Set_Body_Model_No__c);
+            // }
+        }
+        // if(fsMap.size() > 0 || ModelNoSet.size() > 0){
+        if(fsMap.size() > 0){
+            // 查询这个配套的产品,赋值给产品
+            List<Product2>  Product2List = [SELECT Id,Fixture_Model_No_T__c,Loaner_categoryI__c,Loaner_categoryII__c 
+                                                 FROM Product2 
+                                                // WHERE Fixture_Model_No_T__c IN :fsMap.keySet() OR Fixture_Model_No_T__c IN :ModelNoSet ];
+                                                WHERE Fixture_Model_No_T__c IN :fsMap.keySet() ];
+            if(Product2List.size() > 0){
+                Map<String,Product2> updateMap = new Map<String,Product2>();
+                for(Product2 pro:Product2List){
+                    Product2 p2 = new Product2();
+                    p2.Id = pro.Id;
+                    p2.Loaner_categoryI__c = fsMap.get(pro.Fixture_Model_No_T__c.toUpperCase()).Loaner_categoryI__c;
+                    p2.Loaner_categoryII__c = fsMap.get(pro.Fixture_Model_No_T__c.toUpperCase()).Loaner_categoryII__c;
+                    if(((String.isNotBlank(p2.Loaner_categoryI__c) && p2.Loaner_categoryI__c.equals(pro.Loaner_categoryI__c)) || (String.isBlank(p2.Loaner_categoryI__c)&&String.isBlank(pro.Loaner_categoryI__c)))
+                        && ((String.isNotBlank(p2.Loaner_categoryII__c) && p2.Loaner_categoryII__c.equals(pro.Loaner_categoryII__c)) || (String.isBlank(p2.Loaner_categoryII__c)&&String.isBlank(pro.Loaner_categoryII__c)))){
+                        continue;
+                    }
+                    updateMap.put(pro.Id,p2);
+                }
+                if(updateMap.size() > 0){
+                    update updateMap.values();
+                }
+            }
+        }
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/classes/FixtureSetHandler.cls.bak b/force-app/main/default/classes/FixtureSetHandler.cls.bak
new file mode 100644
index 0000000..a7769f2
--- /dev/null
+++ b/force-app/main/default/classes/FixtureSetHandler.cls.bak
@@ -0,0 +1,26 @@
+public without sharing class FixtureSetHandler extends Oly_TriggerHandler {
+    private Map<Id, Fixture_Set__c> newMap;
+    private Map<Id, Fixture_Set__c> oldMap;
+    private List<Fixture_Set__c> newList;
+    private List<Fixture_Set__c> oldList;
+
+    public FixtureSetHandler() {
+        this.newMap = (Map<Id, Fixture_Set__c>) Trigger.newMap;
+        this.oldMap = (Map<Id, Fixture_Set__c>) Trigger.oldMap;
+        this.newList = (List<Fixture_Set__c>) Trigger.new;
+        this.oldList = (List<Fixture_Set__c>) Trigger.old;
+    }
+
+    protected override void beforeInsert() {
+        beforeSetValue();
+    }
+    protected override void beforeUpdate() {
+        beforeSetValue();
+    }
+
+    private void beforeSetValue() {
+        for (Fixture_Set__c nObj : newList) {
+            nObj.Loaner_code__c = nObj.Name;
+        }
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/MainFixtureSelectController.cls b/force-app/main/default/classes/MainFixtureSelectController.cls
index b19d8ba..66417ab 100644
--- a/force-app/main/default/classes/MainFixtureSelectController.cls
+++ b/force-app/main/default/classes/MainFixtureSelectController.cls
@@ -141,7 +141,7 @@
     public Set<String> benbuSet;
     public Set<String> cunfangdiSet;
     public static String wrapperStr{set;get;}
-
+    public String QueueNumber { set; get; }  //鎺掗槦
     public MainFixtureSelectController() {
 
         //isNeedCheckEvent = true;
@@ -205,7 +205,10 @@
                     parentObj = parentObjs.get(0);
 
                     // 宸叉帓闃熺殑鎯呭喌涓嬶紝鍒濆鍖栨椂鍔犺浇鎺掗槦鐢婚潰
-                    if (sonObj.ExternalKey__c != null) {
+                    // 20230610 ljh 鍒ゆ柇椤甸潰鏄剧ず start
+                    QueueNumber = String.valueOf(sonObj.Queue_Number__c);
+                    // if (sonObj.ExternalKey__c != null) {
+                    if (String.isNotBlank(QueueNumber)) {
                         // QueuePageByAssetId鐨刄RL, 鍔犺浇鎺掗槦鐢婚潰鐢�
                         queueByAsset = '/apex/QueuePageByAssetId?parentId=' + parentObj.Id + '&isNotShow=' + true;
                     }
@@ -1378,9 +1381,11 @@
                         viewList[viewList.size() - 1].canEdit = false;
                     }
                     groupByTargetList.add(rsdObj);
-
                     // QueuePageByAssetId鐨刄RL, 鍔犺浇鎺掗槦鐢婚潰鐢�
-                    queueByAsset = '/apex/QueuePageByAssetId?parentId=' + rsdObj.Rental_Apply_Equipment_Set__c + '&isNotShow=' + true;
+                    // 20230610 ljh 鍒ゆ柇椤甸潰鏄剧ず 
+                    if (String.isNotBlank(QueueNumber)) {
+                        queueByAsset = '/apex/QueuePageByAssetId?parentId=' + rsdObj.Rental_Apply_Equipment_Set__c + '&isNotShow=' + true;
+                    }
                     assetId  = rsdObj.Asset__c;
                     rentalId = rsdObj.Rental_Apply_Equipment_Set__c;
                     modelNo  = rsdObj.Fixture_Model_No_text__c;
diff --git a/force-app/main/default/classes/MainFixtureSelectController.cls.bak b/force-app/main/default/classes/MainFixtureSelectController.cls.bak
new file mode 100644
index 0000000..b19d8ba
--- /dev/null
+++ b/force-app/main/default/classes/MainFixtureSelectController.cls.bak
@@ -0,0 +1,2259 @@
+/**
+ * 涓讳綋澶囧搧閫夋嫨銇ō瀹�
+ * TestClass
+ * MainFixtureSelectControllerTest
+ * RentalFixtureManage1Test
+ * RentalFixtureManage4Test
+ */
+global without sharing class MainFixtureSelectController extends CreateRelationListPagingCtrlBase {
+    public override Integer getSearchNumMax() {
+        //鍚勩儦銉笺偢銇埗寰°亗銈屻伆銆佹渶澶т欢鏁般倰鎸囧畾銇欍倠
+        // searchNumMax = Integer.valueOf(Label.Product_Select_Limit);
+        // searchNumMax = 20;
+        pagesize = '20';
+        return searchNumMax;
+    }
+
+    /* 閬告姙銇曘倢銇熴儑銉笺偪鍙栧緱鐢⊿oql銆�From銇嬨倝*/
+    public override String getSelectedDataSql() {
+        // 銈儢銈搞偋銈儓API鍚�
+        selectedDataSql = ' From Rental_Apply_Equipment_Set_Detail__c';
+        selectedDataSql += ' where Rental_Apply_Equipment_Set__c = \'' + String.escapeSingleQuotes(parentId) + '\'';
+        selectedDataSql += '   and Is_Body__c = true';
+        selectedDataSql += '   and Cancel_Select__c = false';
+        selectedDataSql += '   and ApplyPersonAppended_F__c = false';
+        selectedDataSql += ' order by Equipment_Type__c DESC  nulls last, FSD_Fixture_Model_No__c ASC nulls last';
+        return selectedDataSql;
+    }
+
+    public override String getOriginObjName() {
+        // 銈儢銈搞偋銈儓API鍚�
+        originObjName = 'Asset';
+        return originObjName;
+    }
+    public override String getOriginObjColumns() {
+        // 闋呯洰銈汇儍銉�
+        originObjColumns = 'Id, Last_Reserve_RAES_Detail__c, Last_Reserve_RAES_Detail__r.Rental_Apply_Equipment_Set__c';
+        return originObjColumns;
+    }
+
+    public override String getObjName() {
+        // 銈儢銈搞偋銈儓API鍚�
+        objName = 'Rental_Apply_Equipment_Set_Detail__c';
+        return objName;
+    }
+    public override String getColumnLeftFieldSetName() {
+        // 宸︺伄闋呯洰銈汇儍銉�
+        columnLeftFieldSetName = 'MainFixtureSelect_LeftFieldSet';
+        return columnLeftFieldSetName;
+    }
+    public override String getColumnRightFieldSetName() {
+        // 鍙炽伄闋呯洰銈汇儍銉�
+        columnRightFieldSetName = 'MainFixtureSelect_RightFieldSet';
+        return columnRightFieldSetName;
+    }
+
+    public override List<String> getColumnFieldList() {
+        // strColumus 閲屽姞 field
+        // FixtureUtil#raesdGroupByAssetId()銇爡鐩倐蹇呰
+        return new List<String>{'Id', 'Rental_Apply_Equipment_Set__c', 'FSD_Id__c', 'Select_Time__c', 'Rental_Apply_Equipment_Set__r.Final_reply_day_text__c',
+                'IndexFromUniqueKey__c', 'Queue_Number__c', 'SalesProvince__c', 'Fixture_Model_No_text__c', 'DeliverySlip__c', 'StockDown__c', 'Fixture_Model_No_F__c',
+                'Rental_Apply__r.Internal_asset_location_F__c', 'Rental_Apply__r.Salesdept__c', 'Rental_Apply__r.Equipment_Type_F__c', 'Rental_Apply__r.Salesdepartment__c',
+                'RAESD_Status__c', 'FSD_Fixture_Model_No__c', 'Is_Body_F__c', 'FSD_OneToOneAccessory_Cnt__c', 'Internal_asset_location__c',
+                'Asset__r.Last_Reserve_RAES_Detail__r.Rental_Apply_Equipment_Set__c', 'Asset__r.Last_Reserve_RAES_Detail__r.Select_Time__c',
+                'Asset__r.Fixture_Status__c', 'Asset__r.Last_Reserve_RAES_Detail__c', 'Asset__r.Main_OneToOne__c', 'Asset__r.You_Xiao_Ku_Cun__c',
+                'Rental_Apply__r.demo_purpose2__c','Rental_Apply__r.Follow_UP_Opp__r.Shipping_Finished_Day_Func__c',
+                'Rental_Apply__r.next_action__c','Rental_Apply__r.QIS_number__r.ReplaceDeliveryDate__c', 'ExternalKey__c'
+        };
+    }
+
+    public override String getFKColumnField() {
+        // getObjName 杩� getOriginObjName 鐨� FK
+        return 'Asset__c';
+    }
+
+    public override String getRecordTypeId() {
+        //銉氥兗銈搞儸銈ゃ偄銈︺儓銈掑弾寰椼仚銈嬨伄銉偝銉笺儔銈裤偆銉�
+        recordTypeId = '';
+        return recordTypeId;
+    }
+
+    // 銉氥兗銈搞偝銉炽儓銉兗銉┿伀妞滅储鍑︾悊銇�乄hereSoql浣滄垚銇伩銆併儜銉┿儭銉笺偪銇ㄣ仐銇︺�併偝銉炽儩銉笺儘銉炽儓銇浮銇曘倢銈�
+    public override String getSqlWhereStr() {
+        sqlWhereStr = '';
+
+        if (getIsNeedRunSearch()) {
+            sqlWhereStr = this.makeSoql(keywdSort);
+        }
+
+        return sqlWhereStr;
+    }
+
+    public override String getOrderbyStr() {
+        String ordStr = '';
+        if (isFirstTime) {
+            ordStr = ', Equipment_Type__c DESC  nulls last';
+            isFirstTime = false;
+        }
+        return 'order by Ji_Zhong_Guan_Li_Ku_Cun__c DESC, Pre_Arrival_wh_time__c ASC NULLS FIRST, Last_Reserve_RAES_Detail__r.Asset_return_Day__c ASC' + ordStr;
+    }
+
+    public override Boolean getIsNeedRunSearch() {
+        return true;
+    }
+
+    // ClickEvent鐢║RL
+    public String queueByAsset {
+        get {
+            return queueByAsset;
+        }
+        set;
+    }
+
+    /*****************妞滅储鐢�******************/
+
+
+    /*****************銈姐兗銉堟檪鍐嶆绱㈡潯浠讹紙鐢婚潰銇嬨倝銇叆鍔涙潯浠躲倰鐒¤銇欍倠銇熴倎锛�******************/
+    private String keywdSort = null;
+    public String keyword { get; set; }
+    public String assetId { get; set; }
+    public String rentalId { get; set; }
+    public String raesdId { get; set; }
+    public String modelNo { get; set; }
+
+    public String saveType { get; set; }
+
+    public Rental_Apply_Equipment_Set__c parentObj { get; private set; }
+    public Rental_Apply_Equipment_Set_Detail__c sonObj { get; set; }
+
+    public Boolean bieField { get; set; }   //鍒渷銆佸埆鏈儴銆佸埆瀛樻斁鍦般�佸埆鐢ㄩ��
+
+    public String bieCunFangDi { get; set; }     //鍒瓨鏀惧湴
+    public String bieBenBu { get; set; }         //鍒湰閮�
+    public String bieChanPinFenLei { get; set; } //浜у搧鍒嗙被 Test鐢�
+    public String campaignType { get; set; } //瀛︿細绫诲瀷
+    public String bieBeiPinFenLei { get; set; }  //鍒鍝佸垎绫�
+    public Boolean changeCampaignType { set; get; }  //瀛︿細绫诲瀷鏀瑰彉Flag
+    //public List<String> bieBeiPinFenLeiList { get; set; }  //鍒鍝佸垎绫�
+    public Boolean isFirstTime = true;
+    public Boolean is2B1 = true;
+    public String pCunFangDi;
+    public Set<String> benbuSet;
+    public Set<String> cunfangdiSet;
+    public static String wrapperStr{set;get;}
+
+    public MainFixtureSelectController() {
+
+        //isNeedCheckEvent = true;
+        parentId = ApexPages.currentPage().getParameters().get('pt_recid');
+        //bieBeiPinFenLeiList = new List<String>();
+        is2B1 = UserInfo.getProfileId() == System.Label.ProfileId_EquipmentCenter;
+        benbuSet = new Set<String>();
+        cunfangdiSet = new Set<String>();
+        this.bieField = true;
+        changeCampaignType = false;
+
+        //鍊熷嚭澶囧搧涓�瑙堛伄鎯呭牨銈掑彇寰�
+        if (!String.isBlank(this.parentId)) {
+            List<Rental_Apply_Equipment_Set_Detail__c> raesdObjs = [
+                    SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c, Queue_Day__c,
+                           FSD_Fixture_Model_No__c, Fixture_Model_No_text__c, QuenType__c,
+                           Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c, ExternalKey__c,Rental_Apply__c,
+                           Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,
+                           Salesdepartment__c, Product_category_F__c, Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,
+                           Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c,
+                           Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
+                           Salesdepartment_before__c, Equipment_Type_text__c, Product_category_text__c
+                     FROM Rental_Apply_Equipment_Set_Detail__c
+                    WHERE Rental_Apply_Equipment_Set__c = :parentId
+                      and Is_Body__c = true
+                      and Cancel_Select__c = false];
+
+            if (!raesdObjs.isEmpty()) {
+                sonObj = raesdObjs[0];
+
+                List<Rental_Apply_Equipment_Set__c> parentObjs = [
+                        SELECT Id, Rental_Apply__r.Name,
+                               Rental_Apply__r.Owner.Name,
+                               Rental_Apply__r.Owner.Profile.Name,
+                               Rental_Apply__r.Salesdept__c,
+                               Rental_Apply__r.WorkPlace__c,
+                               Rental_Apply__r.Request_shipping_day__c,
+                               Fu_Shu_Pin_Fen_Pei_Jia__c,
+                               Rental_Apply__r.Demo_purpose1__c,
+                               Rental_Apply__r.demo_purpose2__c,
+                               Rental_Apply__r.CampaignType__c,
+                               Fixture_Set__r.Product_Category_GI_SP__c,
+                               Fixture_Set__r.Equipment_Type__c,
+                               Rental_Apply__r.Request_return_day__c,
+                               Rental_Apply__r.Salesdepartment__c,
+                               Rental_Apply__r.Equipment_Type_F__c,
+                               Rental_Apply__r.Internal_asset_location_F__c,
+                               Fixture_Set__r.Fixture_Set_Body_Model_No__c,
+                               Rental_Apply__r.Product_category__c,
+                               Rental_Apply__r.Loaner_centre_mail_address__c,
+                               First_RAESD__r.Is_Body__c,
+                               Irreplaceable_flag__c,
+                               Rental_Start_Date__c,
+                               Rental_End_Date__c,
+                               Rental_Apply__c,
+                               Fixture_Set__c,
+                               RequestNoJoinStr2__c
+                        FROM Rental_Apply_Equipment_Set__c
+                        where Id = :parentId];
+                if (!parentObjs.isEmpty()) {
+                    parentObj = parentObjs.get(0);
+
+                    // 宸叉帓闃熺殑鎯呭喌涓嬶紝鍒濆鍖栨椂鍔犺浇鎺掗槦鐢婚潰
+                    if (sonObj.ExternalKey__c != null) {
+                        // QueuePageByAssetId鐨刄RL, 鍔犺浇鎺掗槦鐢婚潰鐢�
+                        queueByAsset = '/apex/QueuePageByAssetId?parentId=' + parentObj.Id + '&isNotShow=' + true;
+                    }
+
+                    bieCunFangDi = parentObj.Rental_Apply__r.Internal_asset_location_F__c;
+                    pCunFangDi = bieCunFangDi;
+                    // 鏈儴鍒濆鍊�
+                    bieBenBu = parentObj.Rental_Apply__r.Salesdepartment__c;
+                    /*if (String.isNotBlank(sonObj.QuenType__c) && String.isNotBlank(sonObj.Salesdepartment_before__c)) {
+                        bieBenBu = sonObj.Salesdepartment_before__c;
+                    } else {
+                        bieBenBu = parentObj.Rental_Apply__r.Salesdepartment__c;
+                    }*/
+
+                    // 澶囧搧鍒嗙被鍒濆鍊�
+                    bieBeiPinFenLei = parentObj.Rental_Apply__r.Equipment_Type_F__c;
+                    /*if (String.isNotBlank(sonObj.QuenType__c) && String.isNotBlank(sonObj.Equipment_Type_text__c)) {
+                        bieBeiPinFenLei = sonObj.Equipment_Type_text__c;
+                    } else {
+                        bieBeiPinFenLei = parentObj.Rental_Apply__r.Equipment_Type_F__c;
+                    }*/
+
+                    // 浜у搧鍒嗙被鍒濆鍊�
+                    bieChanPinFenLei = parentObj.Rental_Apply__r.Product_category__c;
+                    /*if (String.isNotBlank(sonObj.QuenType__c) && String.isNotBlank(sonObj.Product_category_text__c)) {
+                        if (sonObj.Product_category_text__c == 'GI,SP') {
+                            bieChanPinFenLei = '';
+                        } else {
+                            bieChanPinFenLei = sonObj.Product_category_text__c;
+                        }
+                    } else {
+                        bieChanPinFenLei = parentObj.Rental_Apply__r.Product_category__c;
+                    }*/
+                    // bieBeiPinFenLeiList = FixtureUtil.setAssetRAESEquipment_Type(parentObj.Rental_Apply__r.demo_purpose2__c);
+                    //if (bieBeiPinFenLeiList.size() == 0 && String.isNotBlank(parentObj.Rental_Apply__r.Equipment_Type_F__c)) {
+                    //    for (String et : parentObj.Rental_Apply__r.Equipment_Type_F__c.split(',')) {
+                    //        bieBeiPinFenLeiList.add(et);
+                    //    }
+                    //}
+                    // benbuList = FixtureUtil.setAssetRAESSalesdepartment(parentObj.Rental_Apply__r.demo_purpose2__c);
+                    // fenleiList = FixtureUtil.setAssetRAESEquipment_Type(parentObj.Rental_Apply__r.demo_purpose2__c);
+                    // System.debug(fenleiList);
+                    campaignType = parentObj.Rental_Apply__r.CampaignType__c;
+                }
+                if (String.isBlank(bieCunFangDi)) {
+                    throw new ControllerUtil.myException('涓嶈兘鏄庣‘瀛樻斁鍦�, 璇风‘璁ゆ暟鎹��');
+                }
+            } else {
+                throw new ControllerUtil.myException('娌℃湁鍙互鎿嶄綔鐨勪富浣撳鍝佹垨鑰呬富浣撴暟鎹笉姝g‘銆�');
+            }
+        } else {
+            // OLY_OCM-721 Bug fix 閫夋嫨閰嶅鏃舵姤閿�: null point
+            // 杩藉姞parentId鏄惁涓虹┖鐨勬鏌ワ紝濡傛灉URL鍙傛暟鐨刾arentId涓虹┖灏辨姤閿�: 鍙傛暟閿欒锛氳鎸囧畾Id銆傘��
+            throw new ControllerUtil.myException('鍙傛暟閿欒锛氳鎸囧畾Id銆�');
+        }
+    }
+
+    public void init() {
+        isNeedSearchFirst = true;
+        //isNeedCheckEvent = true;
+
+        searchOppSetParam();
+
+        getSqlWhereStr();
+    }
+
+    //鍒瓨鏀惧湴 SelectOption
+    public List<SelectOption> getbieCunFangDiOps() {
+        //澶囧搧瀛樻斁鍦�(鐜板湪)
+        // return FixtureUtil.bieCunFangDiOpsMap.get(sonObj.Internal_asset_location__c);
+        // return new List<SelectOption>{
+        //     new SelectOption(sonObj.Rental_Apply__r.Internal_asset_location_F__c, sonObj.Rental_Apply__r.Internal_asset_location_F__c)
+        // };
+        cunfangdiSet = new Set<String>();
+        List<SelectOption> opList;
+        if (UserInfo.getProfileId() == System.Label.ProfileId_SystemAdmin
+                || System.Label.ProfileId_EquCenAdmin.contains(UserInfo.getProfileId())
+                || is2B1) {
+            opList = FixtureUtil.bieCunFangDiOpsMap.get('澶囧搧绠$悊涓績');
+        } else {
+            if (String.isBlank(bieCunFangDi)) {
+                opList = FixtureUtil.bieCunFangDiOpsMap.get('澶囧搧绠$悊涓績');
+            } else {
+                opList = new List<SelectOption>{
+                    new SelectOption(bieCunFangDi, bieCunFangDi)
+                };
+            }
+        }
+
+        for (SelectOption op : opList) {
+            if (String.isNotBlank(op.getValue())) {
+                cunfangdiSet.add(op.getValue());
+            }
+        }
+        return opList;
+    }
+
+    //鍒湰閮� SelectOption
+    public List<SelectOption> getbieBenBuOps() {
+        //鎵�鍦ㄥ湴鍖�(鏈儴) 鐜板湪
+        // return FixtureUtil.bieBenBuOpsMap.get(sonObj.Salesdepartment__c);
+        benbuSet = new Set<String>();
+        List<SelectOption> opList;
+        List<SelectOption> retList = new List<SelectOption>();
+        if (String.isBlank(bieCunFangDi)) {
+            opList = FixtureUtil.bieBenBuOpsMap.get('All');
+        } else {
+            opList = FixtureUtil.bieBenBuOpsMap.get(bieCunFangDi);
+        }
+        retList.add(new SelectOption('鍏ㄩ儴', '--鍏ㄩ儴--'));
+        for (SelectOption op : opList) {
+            if (String.isNotBlank(op.getValue())) {
+                benbuSet.add(op.getValue());
+                retList.add(new SelectOption(op.getValue(),op.getLabel()));
+            }
+        }
+        return retList;
+    }
+
+    //浜у搧鍒嗙被 SelectOption
+    public List<SelectOption> getbieChanPinFenLeiOps() {
+        //浜у搧鍒嗙被(GI/SP) F Product_category_F__c
+        // return FixtureUtil.bieChanPinFenLeiOpsMap.get(sonObj.Product_category_F__c);
+        // return FixtureUtil.bieChanPinFenLeiOpsMap.get('GISP');
+        List<SelectOption> pickListValuesList = FixtureUtil.bieChanPinFenLeiOpsMap.get('GISP');
+        return pickListValuesList;
+    }
+
+    //鍒鍝佸垎绫� SelectOption
+    public List<SelectOption> getbieBeiPinFenLeiOps() {
+        //澶囧搧鍒嗙被(鐜板湪) Equipment_Type__c
+        // return FixtureUtil.bieBeiPinFenLeiOpsMap.get(sonObj.Equipment_Type__c);
+        return FixtureUtil.bieBeiPinFenLeiOpsMap.get('澶囧搧鍒嗙被');
+    }
+
+    //瀛︿細绫诲瀷 SelectOption
+    public List<SelectOption> getcampaignTypeOps() {
+        //瀛︿細绫诲瀷 CampaignType__c
+        return FixtureUtil.getPlickList('Rental_Apply__c', 'CampaignType__c');
+    }
+
+    private void searchOppSetParam() {
+        keywdSort = keyword;
+    }
+
+    public PageReference searchOpp() {
+        searchOppSetParam();
+
+        if (!getIsNeedRunSearch()) {
+            return null;
+        }
+
+        // 閬告姙娓堛伩銇=鍝併倰鍙栧緱
+        myComponentController.getSelectedDataInfo();
+
+        getSqlWhereStr();
+        // 銈炽兂銉濄兗銉嶃兂銉堛伀Soql銈掔櫤琛屻仐銇︺�併儦銉笺偢銉炽偘銇欍倠
+        myComponentController.searchAndPaging();
+        return null;
+    }
+
+    //鑾峰彇褰撳墠鏃堕棿 getCurrentTime
+    public static Time getCurrentTime() {
+        DateTime now = DateTime.now();
+        System.debug('GMT: ' + now);
+        Integer hours = now.hour();
+        Integer minutes = now.minute();
+        Integer seconds = now.second();
+        Integer milliseconds = now.millisecond();
+        System.debug('local time: ' + hours + ':' + minutes + ':' + seconds + ':' + milliseconds);
+        Time currentTime = Time.newInstance(hours, minutes, seconds, milliseconds);
+        return currentTime;
+    }
+    /*
+     * MainFixture鐨勬帓闃�  // TODO 4銇ゃ伄闋呯洰銇э紤銇ゃ伄block銇с仚
+     * @param raseId Rental_Apply_Equipment_Set__c銇甀d
+     * @param astId Asset銇甀d
+     * @return map {code: message:}
+     */
+    @RemoteAction
+    global static Map<String, String> queue(Id raseId, Id assetId) {
+        // 杩斿洖瀵硅薄
+        Map<String, String> responseMap = new Map<String, String>();
+        // 妞滅储鏉′欢
+        Date dateToday = Date.today();
+        System.debug('娴嬭瘯queue鐨剅aseId:' + raseId);
+        System.debug('娴嬭瘯queue鐨刟ssetId:' + assetId);
+
+        Savepoint sp = Database.setSavepoint();
+        try {
+            // 鎺掗槦鏃朵笉鏄互Asset.Id涓烘绱㈠熀鍑嗙殑,鏄互褰撳墠閫変腑杩欎竴鏉$殑鍥涗釜鍒瓧娈靛拰鍚屼竴浜у搧鍨嬪彿涓烘潯浠舵潵鎿嶄綔鐨�
+            // 鍏堟绱㈠綋鍓嶉�変腑杩欐潯鏁版嵁鐨勫洓涓埆瀛楁鍜� F__c
+            List<Asset> aSetSelect = [Select Id, Fixture_Model_No_F__c,
+                    Salesdepartment__c, SalesProvince__c, Product_category__c, Equipment_Type__c, Internal_asset_location__c
+                     From Asset
+                    Where Id = :assetId
+                      FOR Update];
+
+            if (aSetSelect.size() == 0) {
+                throw new ControllerUtil.myException('閫夋嫨鐨勬暟鎹湁闂锛岃閲嶈瘯');
+            }
+            // 鎿嶄綔瀵捐薄
+            List<Rental_Apply_Equipment_Set_Detail__c> rasedList = [
+                    SELECT Id, Asset__c, Fixture_Model_No_text__c,
+                           Salesdepartment_before__c, Product_category_text__c, Equipment_Type_text__c,
+                           Queue_Number__c,
+                           Queue_Day__c,
+                           Select_Time__c,
+                           UniqueKey__c,
+                           StockDown__c,
+                           Internal_asset_location_before__c
+                    FROM Rental_Apply_Equipment_Set_Detail__c
+                    where Rental_Apply_Equipment_Set__c = :raseId
+                      and Cancel_Select__c = false
+                      and Is_Body__c = true
+                      FOR Update];
+            if (rasedList.size() == 0) {
+                throw new ControllerUtil.myException('鎺掗槦鏁版嵁涓嶅瓨鍦�');
+            }
+            Rental_Apply_Equipment_Set_Detail__c raesd = rasedList[0];
+            // 涓嬫灦鍚庝笉鑳芥帓闃熴�佸叆鍔涜鍓� Cannot_Change_Asset 銇仸銉併偋銉冦偗娓堛伩
+            // 鎺掗槦鐨勬暟鎹�, 涓嶈兘鍐嶆鎺掕嚜宸�
+            if(raesd.Fixture_Model_No_text__c == aSetSelect[0].Fixture_Model_No_F__c
+                    && raesd.Salesdepartment_before__c == aSetSelect[0].Salesdepartment__c
+                    && raesd.Product_category_text__c == aSetSelect[0].Product_category__c
+                    && raesd.Equipment_Type_text__c == aSetSelect[0].Equipment_Type__c
+                    && raesd.Internal_asset_location_before__c == aSetSelect[0].Internal_asset_location__c
+                    // 鎺掗槦涓殑鏄庣粏鎵嶄細鎶ヤ互涓嬮敊璇�
+                    && raesd.Queue_Number__c > 0
+                    && raesd.Queue_Day__c != null) {
+                throw new ControllerUtil.myException('宸茬粡鎺掍簡杩欎釜鍨嬪彿,涓嶉渶瑕佹帓闃�');
+            }
+            Map<String, Rental_Apply_Equipment_Set_Detail__c> mfUpsert = new Map<String, Rental_Apply_Equipment_Set_Detail__c>();
+            mfUpsert.put(raesd.UniqueKey__c, raesd);
+            // 鍥犱负鎺掕繃闃熺殑鍐嶆鎺掗槦鍙楀埌鏈夋晥搴撳瓨鏁板奖鍝嶆墍浠ラ渶瑕佹竻绌�
+            // 鎺掗槦銇椼仧銇牬鍚堛�併伨銇氭帓闃熴仐銇亜銇撱仺銇鏇�
+            if (raesd.queue_Day__c != null) {
+                raesd.Queue_User__c   = null;
+                raesd.Queue_Number__c = null;
+                raesd.Queue_Day__c    = null;
+                raesd.Queue_Time__c   = null;
+                raesd.Asset__c        = null;
+            }
+            // 鍒嗛厤銇椼仧銇牬鍚堛�併伨銇氬垎閰嶃仐銇亜銇撱仺銇鏇�
+            else if (raesd.Select_Time__c != null) {
+                raesd.Select_Time__c  = null;
+                raesd.Asset__c        = null;
+                // 宸插嚭搴撴寚绀虹殑鎺掗槦鍚庢竻闄ゅ嚭搴撴寚绀轰俊鎭�
+                raesd.Shipment_request_time2__c = null;
+                raesd.Shipment_request__c = false;
+            }
+            if (!mfUpsert.isEmpty()) {
+                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
+                FixtureUtil.withoutUpsertRaesd(mfUpsert.values());
+                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
+            }
+            // 銇撱亾銇俱仹 銇俱仩 銈炽儫銉冦儓銇椼仸銇勩仾銇勩仯銇с仚銆�
+            String soqlStr = 'Select Id, Last_Reserve_RAES_Detail__c, Fixture_Model_No_F__c, You_Xiao_Ku_Cun__c,'
+                        + ' Salesdepartment__c, SalesProvince__c, Product_category__c, Equipment_Type__c, Internal_asset_location__c'
+                         + ' From Asset '
+                        + ' Where Asset_Owner__c = \'Olympus\''
+                        + ' and Asset_loaner_category__c != \'鑰楁潗\''
+                        + ' and RecordTypeId = \'01210000000kOPR\''
+                        + ' and Delete_Flag__c = False'
+                        + ' and Freeze_sign_Abandoned_Flag__c = False'
+                        + ' and Product2.Fixture_Model_No_T__c = ' + FixtureUtil.getSoqlString(aSetSelect[0].Fixture_Model_No_F__c)
+                        + ' and Salesdepartment__c = ' + FixtureUtil.getSoqlString(aSetSelect[0].Salesdepartment__c)
+                        + ' and Internal_asset_location__c = ' + FixtureUtil.getSoqlString(aSetSelect[0].Internal_asset_location__c)
+                        // + ' and SalesProvince__c = ' + FixtureUtil.getSoqlString(aSetSelect[0].SalesProvince__c)
+                        + ' and Product_category__c = ' + FixtureUtil.getSoqlString(aSetSelect[0].Product_category__c)
+                        + ' and Equipment_Type__c = ' + FixtureUtil.getSoqlString(aSetSelect[0].Equipment_Type__c)
+                        + ' and ' + FixtureUtil.getAssetSoqlBase()
+                        + ' order by Id';
+            // 妫�绱㈢鍚堣繖鍥涗釜鍒瓧娈靛拰鍚屼竴浜у搧鍨嬪彿鐨勬暟鎹瓨鍦ㄤ笌鍚�
+            List<Asset> aSetCheck = Database.query(soqlStr);
+            // List<Asset> aSetCheck = [Select Id, Last_Reserve_RAES_Detail__c, Fixture_Model_No_F__c, You_Xiao_Ku_Cun__c,
+            //         Salesdepartment__c, SalesProvince__c, Product_category__c, Equipment_Type__c, Internal_asset_location__c
+            //          From Asset
+            //         Where Asset_Owner__c = 'Olympus'
+            //           and Asset_loaner_category__c != '鑰楁潗'
+            //           and RecordTypeId = '01210000000kOPR'
+            //           and Delete_Flag__c = False
+            //           and Freeze_sign_Abandoned_Flag__c = False
+            //           and Product2.Fixture_Model_No_T__c = :aSetSelect[0].Fixture_Model_No_F__c
+            //           and Salesdepartment__c = :aSetSelect[0].Salesdepartment__c
+            //           and SalesProvince__c = :aSetSelect[0].SalesProvince__c
+            //           and Product_category__c = :aSetSelect[0].Product_category__c
+            //           and Equipment_Type__c = :aSetSelect[0].Equipment_Type__c
+            //         order by Id];
+
+            for (Asset ass : aSetCheck) {
+                if (ass.Last_Reserve_RAES_Detail__c == null && ass.You_Xiao_Ku_Cun__c > 0) {
+                    throw new ControllerUtil.myException('鏈夊彲浠ュ垎閰嶄富浣撲笉闇�瑕佹帓闃�');
+                }
+            }
+
+            // 涓嶅瓨鍦ㄥ垯鐢婚潰鎻愮ず閿欒淇℃伅
+            if (aSetCheck.size() == 0) {
+                throw new ControllerUtil.myException('鎺掗槦閫夋嫨涓讳綋鏁版嵁涓嶅瓨鍦�');
+            }
+            // 涔嬪墠鍥犱负鍙槸鍋欳heck,涓嶆槸瀹為檯鐨勬帓闃熸搷浣�,涓峳ollback鐨勮瘽鍚庨潰鐨勬帓闃熸暟涓嶅
+            Database.rollback(sp);
+            // OLY_OCM-1157 鍥犱负鏆傛椂鐩磋鐨勪繚鏈夎澶囩殑鍙橀噺鏈夊奖鍝�,鎵�浠ユ槑缁咹andler鍏堜笉娓呯┖(鏈夊奖鍝嶇殑鍦版柟鏄槑缁嗗拰淇濇湁璁惧鐨凥andler)
+            AssetHandler.queueRaesdMap = null;
+            // lock 绗﹀悎鏉′欢鐨勭涓�鏉sset鏁版嵁銆佽繘琛屾帓闃熴��
+            List<Asset> aSet = [Select Id, Name, Last_Reserve_RAES_Detail__c, Fixture_Model_No_F__c,
+                    Salesdepartment__c, SalesProvince__c, Product_category__c, Equipment_Type__c,
+                    Internal_asset_location__c, EquipmentSet_Managment_Code__c
+                     From Asset
+                    Where Id = :aSetCheck[0].Id
+                    FOR Update];
+
+            if (aSet.size() == 0) {
+                throw new ControllerUtil.myException('鏁版嵁姝e湪琚叾浠栫敤鎴锋搷浣滐紝璇烽噸璇�');
+            }
+            // 鎿嶄綔瀵捐薄
+            rasedList = [
+                    SELECT Id, Asset__c, Fixture_Model_No_text__c,
+                           Salesdepartment_before__c, Product_category_text__c, Equipment_Type_text__c,
+                           Queue_Number__c,
+                           Queue_Day__c,
+                           Select_Time__c,
+                           UniqueKey__c,
+                           StockDown__c
+                    FROM Rental_Apply_Equipment_Set_Detail__c
+                    where Rental_Apply_Equipment_Set__c = :raseId
+                      and Cancel_Select__c = false
+                      and Is_Body__c = true
+                      FOR Update];
+            if (rasedList.size() == 0) {
+                throw new ControllerUtil.myException('鎺掗槦鏁版嵁涓嶅瓨鍦�');
+            }
+            raesd = rasedList[0];
+            mfUpsert.put(raesd.UniqueKey__c, raesd);
+            String modelNo = aSet[0].Fixture_Model_No_F__c;
+
+            System.debug('queue aSet is:' + aSet);
+
+            //鍊熷嚭澶囧搧閰嶅涓�瑙堟槑缁� Rental_Apply_Equipment_Set_Detail__c  Asset__c
+            //鎺掗槦椤� Queue_Number__c
+            //鎺掗槦鏃� Queue_Day__c
+            AggregateResult[] queueMaxNumbers = [
+                    SELECT max(Queue_Number__c) maxr, min(Queue_Number__c) minr
+                    FROM Rental_Apply_Equipment_Set_Detail__c
+                    where Id != :raesd.Id
+                    and Fixture_Model_No_text__c = :modelNo
+                    and Select_Time__c = null
+                    and Queue_Day__c != null
+                    and Queue_Number__c != null
+                    and Queue_Number__c > 0
+                    and Salesdepartment_before__c = :aSet[0].Salesdepartment__c     // 鎵�鍦ㄥ湴鍖�(鏈儴) 鍊熷嚭鏃�
+                    and Product_category_text__c  = :aSet[0].Product_category__c    // 浜у搧鍒嗙被(GI/SP)(鍊熷嚭鏃�)
+                    and Equipment_Type_text__c    = :aSet[0].Equipment_Type__c      // 澶囧搧鍒嗙被(鍊熷嚭鏃�)
+                    and Internal_asset_location_before__c = :aSet[0].Internal_asset_location__c      // 澶囧搧瀛樻斁鍦�
+            ];
+
+            // 涓�瑙堟槑缁嗙殑Asset__c淇濈暀涓嬫潵,鍚庨潰鐨勫鐞嗛渶瑕佷娇鐢�
+            Id oldAssId = raesd.Asset__c;
+
+            //鏆傚畾鍒嗛厤銇牬鍚堟帓闃熶腑澶夋洿锛孴rigger銇ф柊銇椼亜銇殏瀹氬垎閰嶃倰瑷畾
+            if (raesd.Queue_Number__c == 0 && raesd.Queue_Day__c != null) {
+                raesd.Queue_User__c   = UserInfo.getUserId();
+                raesd.Queue_Number__c = Integer.valueOf(queueMaxNumbers[0].get('minr'));
+                raesd.Queue_Day__c    = Date.today();
+                raesd.Queue_Time__c   = getCurrentTime();
+                raesd.Select_Time__c  = null;
+                raesd.Asset__c        = null;
+                // 宸插嚭搴撴寚绀虹殑鎺掗槦鍚庢竻闄ゅ嚭搴撴寚绀轰俊鎭�
+                raesd.Shipment_request_time2__c = null;
+                raesd.Shipment_request__c = false;
+            } else {
+
+                Integer queueMaxNumber = 1;
+                if (queueMaxNumbers.isEmpty()) {
+                    queueMaxNumber = 0;
+                } else if (queueMaxNumbers[0].get('maxr') != null) {
+                    queueMaxNumber = Integer.valueOf(queueMaxNumbers[0].get('maxr')) + 1;
+                }
+
+                // 鎺掗槦鎴愬姛銆佹洿鏂癉B
+                raesd.Queue_User__c   = UserInfo.getUserId();
+                raesd.Queue_Number__c = queueMaxNumber;
+                raesd.Queue_Day__c    = Date.today();
+                raesd.Queue_Time__c   = getCurrentTime();
+                // 澶囧搧閰嶅鏄庣粏鍨嬪彿(鍊熷嚭鏃�)
+                raesd.Fixture_Model_No_text__c = aSet[0].Fixture_Model_No_F__c;
+                // 鎵�鍦ㄥ湴鍖�(鏈儴) 鍊熷嚭鏃�
+                raesd.Salesdepartment_before__c = aSet[0].Salesdepartment__c;
+                // 鎵�鍦ㄥ湴鍖�(鐪�) 鍊熷嚭鏃�
+                raesd.SalesProvince_before__c = aSet[0].SalesProvince__c;
+                // 浜у搧鍒嗙被(GI/SP)(鍊熷嚭鏃�)
+                raesd.Product_category_text__c = aSet[0].Product_category__c;
+                // 澶囧搧鍒嗙被(鍊熷嚭鏃�)
+                raesd.Equipment_Type_text__c = aSet[0].Equipment_Type__c;
+                // 澶囧搧瀛樻斁鍦�(鍊熷嚭鏃�)
+                raesd.Internal_asset_location_before__c = aSet[0].Internal_asset_location__c;
+                // 澶囧搧鍚嶇О(鍊熷嚭鏃�) clear 銇椼仾銇勩�佺敵璜嬫檪 鍊よō瀹氥仚銈嬨伄銇с��
+                // 浠婃帓闃熶繚瀛樻帓闃熶俊鎭椂,鍒殑鍜岄厤濂楁槑缁嗙浉杩炵殑瀛楁閮戒繚鐣欎簡鎺掗槦鐨勪俊鎭�,涓轰簡閫昏緫鐨勭粺涓�鎬�,杩欎釜瀛楁涔熼渶瑕佷繚瀛�
+                raesd.Fixture_Name_text__c = aSet[0].Name;
+                raesd.Select_Time__c  = null;
+                raesd.Asset__c        = null;
+                // 宸插嚭搴撴寚绀虹殑鎺掗槦鍚庢竻闄ゅ嚭搴撴寚绀轰俊鎭�
+                raesd.Shipment_request_time2__c = null;
+                raesd.Shipment_request__c = false;
+
+                // OLY_OCM-243 杩藉姞瀛楁瀵瑰簲 澶囧搧绠$悊缂栫爜(鍊熷嚭鏃�) 鎺掗槦鏃舵竻闄や笌asset鐩歌繛鐨勫�熷嚭鏃剁浉鍏崇殑瀛楁
+                raesd.EquipmentSet_Managment_Code_text__c = null;
+                // 鏈鸿韩缂栧彿锛堝�熷嚭鏃讹級
+                raesd.SerialNumber_text__c = null;
+                // 澶囧搧鎴愭湰(鍊熷嚭鏃�)
+                raesd.Asset_cost_del_before__c = null;
+            }
+
+            Map<Id, Fixture_OneToOne_Link__c> fOtoMap = new Map<Id, Fixture_OneToOne_Link__c>();
+            // 姝ゅ鍏遍�氬寲澶勭悊,鍦ㄨ皟鐢� FixtureUtil.clearOneToOneAccessory()鏂规硶
+            FixtureUtil.clearOneToOneAccessory(raseId, mfUpsert, oldAssId, fOtoMap);
+
+            // FixtureUtil.withoutUpdate(new Rental_Apply_Equipment_Set_Detail__c[]{raesd});
+            if (!mfUpsert.isEmpty()) {
+                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
+                FixtureUtil.withoutUpsertRaesd(mfUpsert.values());
+                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
+            }
+
+            //鏇存柊涓�瀵逛竴
+            if (!fOtoMap.isEmpty()) {
+                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
+                FixtureUtil.withoutUpdate(fOtoMap.values());
+                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
+            }
+
+            responseMap.put('code', '0');
+            responseMap.put('message', '鎺掗槦鎴愬姛');
+            return responseMap;
+
+        } catch (DmlException ex) {
+            Database.rollback(sp);
+            // 锛戜欢鐩伄銈ㄣ儵銉笺伄銇胯〃绀�
+            responseMap.put('code', '1');
+            responseMap.put('message', ex.getDmlMessage(0));
+            System.debug(Logginglevel.ERROR, ex.getMessage());
+            System.debug(Logginglevel.ERROR, ex.getStackTraceString());
+            return responseMap;
+        } catch (Exception e) {
+            Database.rollback(sp);
+            responseMap.put('code', '1');
+            responseMap.put('message', e.getMessage());
+            System.debug(Logginglevel.ERROR, e.getMessage());
+            System.debug(Logginglevel.ERROR, e.getStackTraceString());
+            return responseMap;
+        }
+    }
+
+    public PageReference save() {
+
+        //20170906 upsert by UniqueKey__c
+        Map<String, Rental_Apply_Equipment_Set_Detail__c> mfUpsert = new Map<String, Rental_Apply_Equipment_Set_Detail__c>();
+        Map<Id, Fixture_OneToOne_Link__c> fOtoMap = new Map<Id, Fixture_OneToOne_Link__c>();
+        Savepoint sp = Database.setSavepoint();
+        Set<String> clearUniqueKeySet = new Set<String>();
+
+        try {
+            // Asset鐨凩ast_Reserve_RAES_Detail__c璁惧��:鏈繚瀛樼殑鎯呭喌涓�,robj.Id鏄痭ull銆傞渶瑕佸厛淇濆瓨鍚庤鍊�
+            //List<Rental_Apply_Equipment_Set_Detail__c> rasedList = new List<Rental_Apply_Equipment_Set_Detail__c>();
+            //List<Asset> aSetList = new List<Asset>();
+//Do it in Trigger            Map<Id, Asset> assetUpdateMap = new Map<Id, Asset>();
+
+            for (Integer indexNum = 0; indexNum < viewList.size(); indexNum++) {
+                WrapperInfo wprInfo = viewList[indexNum];
+                Rental_Apply_Equipment_Set_Detail__c robj = (Rental_Apply_Equipment_Set_Detail__c) wprInfo.sobj;
+                //娓呯┖Id锛屽洜涓鸿鏈塈d涓嶈兘閲嶆柊璁剧疆涓诲瓧娈靛鍝佸�熷嚭涓�瑙�
+                robj.Id = null;
+                //璁剧疆涓�瑙堜负褰撳墠涓讳綋鐨勪竴瑙�
+                robj.Rental_Apply_Equipment_Set__c = sonObj.Rental_Apply_Equipment_Set__c;
+                // 鐢婚潰涓娿伀銉併偋銉冦偗銇椼仧銆�1浠躲仐銇嬨仾銇�
+                if (wprInfo.check) {
+                    // 鎿嶄綔瀵捐薄
+                    List<Rental_Apply_Equipment_Set_Detail__c> rasedList = [
+                            SELECT Id, Asset__c, Asset__r.Main_OneToOne__c,
+                                   Queue_Number__c, ExternalKey__c,
+                                   Queue_Day__c
+                            FROM Rental_Apply_Equipment_Set_Detail__c
+                            where Id = :sonObj.id
+                              FOR Update];
+                    if (rasedList.isEmpty()) {
+                        throw new ControllerUtil.myException('鍒嗛厤鐨勪富浣撳鍝佷笉瀛樺湪锛岃鍒锋柊鐢婚潰鍚庨噸鏂版搷浣�');
+                    }
+                    //1822 yc 20211021 宸茶喘寰呰揣鐩殑锛屾柊鍝佸凡鏈夊彂璐ф棩涓嶈兘鍑哄簱 start
+                    if(robj.Rental_Apply__r.demo_purpose2__c=='宸茶喘寰呰揣' && robj.Rental_Apply__r.Follow_UP_Opp__r.Shipping_Finished_Day_Func__c!= null){
+                        throw new ControllerUtil.myException('宸茶喘寰呰揣鐩殑锛屾柊鍝佸凡鏈夊彂璐ф棩锛屼笉鑳界户缁簡銆�');
+                    }
+                    if(robj.Rental_Apply__r.demo_purpose2__c=='绱㈣禂QIS' && robj.Rental_Apply__r.next_action__c=='鏃犲伩鏇存崲' && robj.Rental_Apply__r.QIS_number__r.ReplaceDeliveryDate__c!= null){
+                        throw new ControllerUtil.myException('绱㈣禂QIS鐩殑锛孮IS宸叉湁鏂板搧鍙戣揣鏃ワ紝涓嶈兘缁х画浜嗐��');
+                    }
+                    //1822 yc 20211021 宸茶喘寰呰揣鐩殑锛屾柊鍝佸凡鏈夊彂璐ф棩涓嶈兘鍑哄簱 end
+
+                    // 鍒嗛厤
+                    if (robj.Select_Time__c == null || rasedList[0].Asset__c != robj.Asset__c) {
+                        // Last_Reserve_RAES_Detail__c 鏈�鏂板鍝佺敵璇峰�熷嚭鏄庣粏鍘嗗彶
+                        // 1浠躲仐銇嬨仾銇�
+                        List<Asset> aSetList =
+                                [Select Id, Quantity,
+                                        Out_of_wh__c,
+                                        Manage_type__c,
+                                        You_Xiao_Ku_Cun__c,
+                                        Last_Reserve_RAES_Detail__c,
+                                        Last_Reserve_RAES_Detail__r.Select_Time__c
+                                   From Asset
+                                  where Id = :robj.Asset__c
+                                   AND (Last_Reserve_RAES_Detail__c = null OR Last_Reserve_RAES_Detail__r.Select_Time__c = null)
+                                   // 鍥犱负鏈夋殏瀹氬垎閰� 鎵�浠here 閲屼笉鍔犺繖涓潯浠� AND You_Xiao_Ku_Cun__c > 0 // 鏈夋晥搴撳瓨
+                                    for Update];
+                        // 涓嶈兘lock鍒版暟鎹殑鏃跺��
+                        if (aSetList.isEmpty()) {
+                            throw new ControllerUtil.myException('璇烽�夋嫨鏈垎閰嶇殑涓讳綋澶囧搧锛岃鍒锋柊鐢婚潰鍚庨噸鏂版搷浣�');
+                        }
+                        // 澶囧搧鏈夋晥搴撳瓨 鐨� check
+                        // 鏆傚畾鍒嗛厤, 娌℃湁鏈夋晥搴撳瓨鐨勬椂鍊� 涓嶆姤閿�
+                        if (String.isNotBlank(aSetList[0].Last_Reserve_RAES_Detail__c)
+                                && aSetList[0].Last_Reserve_RAES_Detail__r.Select_Time__c == null
+                                && aSetList[0].You_Xiao_Ku_Cun__c <= 0
+                                && aSetList[0].Last_Reserve_RAES_Detail__c == sonObj.Id
+                        ) {
+                        }
+                        // 鏈夋湁鏁堝簱瀛樼殑鏃跺�� 涓嶆姤閿�
+                        else if (aSetList[0].You_Xiao_Ku_Cun__c > 0) {
+                        }
+                        else {
+                            throw new ControllerUtil.myException('绗�' + (indexNum + 1) +'琛岋紝娌℃湁瓒冲鏈夋晥搴撳瓨锛岃鍒锋柊鐢婚潰鍚庨噸鏂版搷浣�');
+                        }
+                        Asset aSet = aSetList[0];
+
+                        robj.Select_Time__c = System.now();
+
+                        // 鍒嗛厤鏅� 鏇存柊 Out_of_wh__c
+                        if (aSet.Out_of_wh__c == null || aSet.Out_of_wh__c == 0) {
+                            aSet.Out_of_wh__c = 0;
+                        }
+// Handler銇仸 鍊よō瀹氥仚銈�
+//                        aSet.Out_of_wh__c = aSet.Out_of_wh__c + 1;
+//                        assetUpdateMap.put(aSet.Id, aSet);
+
+                        String uniqueKeyStr = parentObj.RequestNoJoinStr2__c + ':'+ robj.Rental_Apply_Equipment_Set__c
+                                + ':' + robj.FSD_Id__c + ':' + robj.IndexFromUniqueKey__c;
+                        robj.UniqueKey__c = uniqueKeyStr;
+                        robj.Queue_Number__c = null;
+                        robj.Queue_Day__c = null;
+                        robj.Queue_Time__c = null;
+                        robj.Shipment_request_time2__c = null;
+                        robj.Shipment_request__c = false;
+                        robj.ExternalKey__c = null;
+                        mfUpsert.put(robj.UniqueKey__c, robj);
+// Handler銇仸 鍊よō瀹氥仚銈�
+//                        if (String.isBlank(aSet.Last_Reserve_RAES_Detail__c)){
+//                            aSet.Last_Reserve_RAES_Detail__c = robj.Id;
+//                            assetUpdateMap.put(aSet.Id, aSet);
+//                        } else if (aSet.Last_Reserve_RAES_Detail__c != robj.Id) {
+//                            aSet.Last_Reserve_RAES_Detail__c = robj.Id;
+//                            assetUpdateMap.put(aSet.Id, aSet);
+//                        }
+                        // 涓�瀵逛竴鐨勬儏鍐�,涓讳綋澶囧搧鍜岄厤濂楃殑闄勫睘鍝佷竴璧峰垎閰�
+                        if (robj.FSD_OneToOneAccessory_Cnt__c > 0) {
+
+                            // 1. select from Rental_Apply_Equipment_Set_Detail__c 鎵惧嚭闇�瑕佸垎閰嶇殑瀵硅薄
+                            // 姝ゅ鍏遍�氬寲澶勭悊,璋冪敤 FixtureUtil.clearOneToOneAccessory()鏂规硶
+                            //   a.鏈垎閰嶆椂,Asset__c杩樻病鍊�,鎵�浠ヤ笉鐢ㄥ垽鏂璒neToOne_Flag__c
+                            //   b.浠庝竴瀵逛竴鐨�, 鏀瑰埌涓嶆槸涓�瀵逛竴鐨勬儏鍐�,涓�瀵逛竴鍒嗛厤鐨勯檮灞炲搧瀛楁娓呴櫎閫昏緫,闇�瑕佸垽鏂璒neToOne_Flag__c
+                            //   c.娓呴櫎涓�瀵逛竴link琛ㄧ殑鐩稿叧閫昏緫
+                            //   d.fOtoMap 涔嬪墠鐨勪竴瀵逛竴鍒嗛厤鏁颁篃闇�瑕佷竴璧锋竻绌� + 浠婂洖銇洿鏂颁竴瀵逛竴鍒嗛厤鐨凩ink琛�
+                            List<Rental_Apply_Equipment_Set_Detail__c> raesdList
+                                    = FixtureUtil.clearOneToOneAccessory(parentId, mfUpsert, sonObj.Asset__c, fOtoMap);
+                            // 鍒嗛厤鐨勬槸涓�瀵逛竴鐨勬椂鍊�
+                            if (robj.Asset__r.Main_OneToOne__c) {
+                                // 2. SELECT Fixture_OneToOne_Link__c where Main_Asset__c = robj.Asset__c
+                                // 琚垎閰嶅璞� {Fixture_Model_No_F__c: [Asset.Id]}
+                                Map<String, List<Fixture_OneToOne_Link__c>> oneToOneListMap = new Map<String, List<Fixture_OneToOne_Link__c>>();
+                                Map<Id, Asset> assetKuCunMap = new Map<Id, Asset>();
+                                List<Fixture_OneToOne_Link__c> fo2oList = [
+                                        SELECT Id, Main_Asset__c,
+                                               Accessory_Asset__c,
+                                               Accessory_Asset__r.Fixture_Model_No_F__c,
+                                               Quantity__c, Inventory_Frozen_Quantity__c
+                                          FROM Fixture_OneToOne_Link__c
+                                         WHERE Accessory_Asset__c != null                   // 蹇点伄銇熴倎
+                                           AND Main_Asset__c = :robj.Asset__c];
+                                for (Fixture_OneToOne_Link__c fo2o : fo2oList) {
+                                    if (!oneToOneListMap.containsKey(fo2o.Accessory_Asset__r.Fixture_Model_No_F__c)) {
+                                        oneToOneListMap.put(fo2o.Accessory_Asset__r.Fixture_Model_No_F__c, new List<Fixture_OneToOne_Link__c>());
+                                    }
+                                    assetKuCunMap.put(fo2o.Accessory_Asset__c, null);
+                                    List<Fixture_OneToOne_Link__c> oneToOneAsetIdList = oneToOneListMap.get(fo2o.Accessory_Asset__r.Fixture_Model_No_F__c);
+                                    fo2o.Quantity__c = fo2o.Quantity__c == null ? 1 : fo2o.Quantity__c;
+// OCSM_BP3-29 鍒嗛厤涓�瀵逛竴闄勫睘鍝佺殑鏃跺�� 鑰冭檻 鐩樼偣鍐荤粨鏁� start
+                                    Integer fo2oQty = (fo2o.Quantity__c - (fo2o.Inventory_Frozen_Quantity__c == null ? 0 : fo2o.Inventory_Frozen_Quantity__c)).intValue();
+//                                    for (Integer qty = 0; qty < fo2o.Quantity__c; qty++) {
+                                    for (Integer qty = 0; qty < fo2oQty; qty++) {
+// OCSM_BP3-29 鍒嗛厤涓�瀵逛竴闄勫睘鍝佺殑鏃跺�� 鑰冭檻 鐩樼偣鍐荤粨鏁� end
+                                        oneToOneAsetIdList.add(fo2o);
+                                    }
+                                    oneToOneListMap.put(fo2o.Accessory_Asset__r.Fixture_Model_No_F__c, oneToOneAsetIdList);
+                                }
+                                assetKuCunMap = new Map<Id, Asset>(
+                                        [Select Id, Quantity,
+                                                Out_of_wh__c,
+                                                Manage_type__c,
+                                                You_Xiao_Ku_Cun__c
+                                           From Asset
+                                          where Id IN :assetKuCunMap.keyset()
+                                            for Update]);
+                                // 瀵� raesdList 杩涜涓�瀵逛竴鍒嗛厤
+                                Map<Id, Rental_Apply_Equipment_Set_Detail__c> cancelCopyOldMap = new Map<Id, Rental_Apply_Equipment_Set_Detail__c>();
+                                oneToOneSelect(raesdList, oneToOneListMap, assetKuCunMap, fOtoMap
+                                        , robj.Select_Time__c
+                                        , mfUpsert, cancelCopyOldMap);
+                                // 鏈� cancelCopyOldMap 鐨勮瘽, 鍋氶噸鏂板垎閰�, 鐒跺悗缁х画鍒嗛厤
+                                if (cancelCopyOldMap.size() > 0) {
+                                    FixtureUtil.withoutUpdate(cancelCopyOldMap.values());
+                                    // 瑕佸仛涓�瀵逛竴鍒嗛厤鐨勬槑缁�, 鍙傝�� clearOneToOneAccessory sql
+                                    raesdList = [SELECT Id, UniqueKey__c, Asset__c,
+                                                FSD_Fixture_Model_No__c, FSD_Name_CHN__c, Fixture_OneToOne_Link_Id__c,
+                                                Select_Time__c, Shipment_request_time2__c, Shipment_request__c, OneToOne_Flag__c, StockDown__c, DeliverySlip__c
+                                            from Rental_Apply_Equipment_Set_Detail__c
+                                            where Rental_Apply_Equipment_Set__c = :parentId
+                                            and Cancel_Select__c = false
+                                            and FSD_Is_OneToOne__c = true
+                                            and UniqueKey__c != null
+                                            and Is_Body__c = false
+                                            and Canceled__c IN :cancelCopyOldMap.keySet()
+                                            order by FSD_Fixture_Model_No__c];
+                                    oneToOneSelect(raesdList, oneToOneListMap, assetKuCunMap, fOtoMap
+                                            , robj.Select_Time__c
+                                            , mfUpsert, cancelCopyOldMap);
+
+                                }
+                            }
+                        }
+
+                        if (String.isBlank(robj.Id)
+                                && !String.isBlank(uniqueKeyStr)) {
+                            // 鏂拌銇牬鍚堛�併亾銇撳崢绱斻伀 Id 銇仸鍒ゆ柇
+                            clearUniqueKeySet.add(uniqueKeyStr);
+                        }
+
+//Do it in Trigger
+//                        // Asset 1浠躲仐銇嬨仾銇�
+//                        update assetUpdateMap.values();
+
+                        // 鍒ゆ柇鍒嗛厤鐨勬槑缁嗘槸鍚﹀凡缁忔帓闃燂紝濡傛灉宸叉帓闃燂紝闇�瑕佹竻闄ゅ鍝佸�熷嚭鎺掗槦搴忓垪琛ㄤ腑瀵瑰簲鐨勬暟鎹�
+                        if (String.isNotBlank(rasedList[0].ExternalKey__c)) {
+                            List<Rental_Apply_Sequence__c> rasList = [
+                                    SELECT Id
+                                    FROM Rental_Apply_Sequence__c 
+                                    WHERE Apply_Set_Detail__c =: rasedList[0].Id
+                                      AND Invalid_Flag__c = false];
+
+                            // 鏇存柊澶囧搧鍊熷嚭鎺掗槦搴忓垪琛�
+                            if (!rasList.isEmpty()) {
+                                FixtureUtil.withoutDelete(rasList);
+                            }
+                        }
+                    }
+
+                    // 涓讳綋1浠躲仐銇嬨仾銇�
+                    break;
+                }
+            }
+
+            System.debug(mfUpsert);
+            // Upsert
+            if (!mfUpsert.isEmpty()) {
+                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
+                FixtureUtil.withoutUpsertRaesd(mfUpsert.values());
+                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
+//Do it in Trigger
+//Do it in Trigger 鍒嗛厤鏅� 鏇存柊 Out_of_wh__c
+//                for (Rental_Apply_Equipment_Set_Detail__c robj : mfUpsert) {
+//                    if (robj.Is_Body_F__c) {
+//                        System.debug('娴嬭瘯robj.Is_Body_F__c' + robj.Is_Body_F__c);
+//                        Asset aSet = aSetList[0];
+//                        if (String.isBlank(aSet.Last_Reserve_RAES_Detail__c)){
+//                            aSet.Last_Reserve_RAES_Detail__c = robj.Id;
+//                            assetUpdateMap.put(aSet.Id, aSet);
+//                        } else if (aSet.Last_Reserve_RAES_Detail__c != robj.Id) {
+//                            aSet.Last_Reserve_RAES_Detail__c = robj.Id;
+//                            assetUpdateMap.put(aSet.Id, aSet);
+//                        }
+//                        // 1浠躲仐銇嬨仾銇�
+//                        update assetUpdateMap.values();
+//                        break;
+//                    }
+//                }
+            }
+
+            //鏇存柊涓�瀵逛竴
+            if (!fOtoMap.isEmpty()) {
+                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
+                FixtureUtil.withoutUpdate(fOtoMap.values());
+                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
+            }
+
+        } catch (Exception ex) {
+            System.debug('娴嬭瘯bug');
+            System.debug(ex.getStackTraceString());
+            ApexPages.addMessages(ex);
+            Database.rollback(sp);
+            // Id 銈掋偗銉偄
+            for (Rental_Apply_Equipment_Set_Detail__c robj : mfUpsert.values()) {
+                if (clearUniqueKeySet.contains(robj.UniqueKey__c)) {
+                    robj.Id = null;
+                }
+            }
+            return null;
+        }
+
+        if (saveType == '1') {
+            searchOpp();
+            saveType = '';
+            return null;
+        } else if (saveType == '2') {
+            // 銈姐兗銉堟檪銇鏇淬亗銈�
+            myComponentController.sortTable();
+            saveType = '';
+            return null;
+        } else {
+            //闄勫睘鍝侀�夋嫨鐢婚潰
+            PageReference pg = new PageReference('/apex/AccessorySelect');
+            pg.getParameters().put('pt_recid',parentId);
+            pg.setRedirect(true);
+            return pg;
+        }
+    }
+
+    // https://sohobb.backlog.jp/view/OLY_OCM-152#comment-20041467
+    // 1. G9 銇牬鍚堛�� 銈傘仐銆佷竴瀵句竴 鍒嗛厤銇椼仧 鏈綋銇牬鍚堛�佷粯灞炲搧锛堜竴瀵句竴浠樺睘鍝侊級銈備竴绶掋伀 銈儯銉炽偦銉仐銇俱仚銇嬶紵
+    // 鈫� 涓�瀵句竴Link銇屻亗銈嬪牬鍚堛伅銆佷粯灞炲搧銈備竴绶掋伀鍙栥倞娑堛仐銇俱仚銆傘仢銇嗐仚銈屻伆G10銇ㄧ煕鐩俱仐銇俱仜銈撱倛銇��
+    // 涓嬫灦鍚� 鎵嶈兘鍙栨秷涓讳綋 OLY_OCM-173
+    public PageReference cancel() {
+        Savepoint sp = Database.setSavepoint();
+        try{
+            List<Rental_Apply_Equipment_Set_Detail__c> raesds = new List<Rental_Apply_Equipment_Set_Detail__c>();
+            List<Id> delIds = new List<Id>();
+            for (WrapperInfo wprInfo : viewList) {
+                Rental_Apply_Equipment_Set_Detail__c robj = (Rental_Apply_Equipment_Set_Detail__c) wprInfo.sobj;
+                //鍑哄簱鍚庝笉鑳藉彇娑�
+                //鍏宠仈涓讳綋鍒嗛厤鐢婚潰,涓�瑙圚andler
+                //闄勫睘鍝佸垎閰嶇敾闈�
+                if (wprInfo.check) {
+                    if (String.isNotBlank(robj.DeliverySlip__c)) {
+                        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '宸茬粡鍙戣揣鐨勬槑缁嗕笉鑳藉彇娑�'));
+                        return null;
+                    } else if (robj.StockDown__c == false) {
+                        if (robj.Cancel_Reason__c == '閲嶆柊鍒嗛厤') {
+                            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '涓嬫灦鍓嶉噸鏂板垎閰嶏紝鐩存帴浠庣敾闈㈤噸鏂伴�夋嫨鍗冲彲'));
+                            return null;
+                        } else {
+                            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '涓嬫灦鍓嶅彇娑堜富浣擄紝璇峰彇娑堝鍝侀厤濂�'));
+                            return null;
+                        }
+                    } else if (robj.Cancel_Reason__c != '閲嶆柊鍒嗛厤') {
+                        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '涓嶆槸 [閲嶆柊鍒嗛厤]锛屼笉鑳藉崟鐙彇娑堜富浣擄紝璇峰彇娑堝鍝侀厤濂�'));
+                        return null;
+                    } else {
+                        // 鐘舵�佷负寰呭垎閰�,澶囧搧涓績created鐨勬槑缁�,鍙互delete;鍏朵綑鐨勪笉鍙互鍒犻櫎
+                        if (robj.CreatedBy.ProfileId == System.Label.ProfileId_EquipmentCenter && robj.Select_Time__c == null) {
+                            // 鍒犻櫎鏄庣粏Id<List>
+                            delIds.add(robj.Id);
+                            // 鍒犻櫎鏄庣粏锛屼細瀵瑰簲鐨勫垹闄ょ浉鍏崇殑澶囧搧鍊熷嚭鎺掗槦搴忓垪琛ㄦ暟鎹紝涓嶇敤鐗瑰埆鍔犲鐞�
+
+                        } else {
+                            if (String.isBlank(robj.Cancel_Reason__c)) {
+                                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '璇疯緭鍏ュ彇娑堢悊鐢�'));
+                                return null;
+                            }
+
+                            //20210818 SFDC-C448KZ ljh start
+                            if (String.isBlank(robj.Loaner_cancel_reason__c)) {
+                                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '璇疯緭鍏ユ槑缁嗗彇娑堢悊鐢�'));
+                                return null;
+                            }
+                            if (robj.Loaner_cancel_reason__c=='鍏朵粬' && String.isBlank(robj.Loaner_cancel_Remarks__c)) {
+                                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '璇疯緭鍏ュ彇娑堢悊鐢卞娉�'));
+                                return null;
+                            }
+                            // if (String.isBlank(robj.Loaner_cancel_Remarks__c)) {
+                            //     ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '璇疯緭鍏ュ鍝佺敵璇峰彇娑堢悊鐢卞娉�'));
+                            //     return null;
+                            // }
+                            //20210818 SFDC-C448KZ ljh end
+
+                            wprInfo.check = false;
+                            // 鍙栨秷鍒嗛厤
+                            robj.Cancel_Select__c = true;
+                            // 澶囧搧鐢宠鍙栨秷鏃堕棿
+                            robj.Cancel_Date__c = Date.today();
+                            robj.Cancel_Time__c = getCurrentTime();
+                            // 鍙栨秷鑰�
+                            robj.Cancel_Mem__c = UserInfo.getUserId();
+                            // 鍙栨秷鐞嗙敱澶囨敞
+                            //robj.Loaner_cancel_Remarks__c
+                            robj.Loaner_cancel_Remarks__c = robj.Loaner_cancel_Remarks__c==null ? robj.Loaner_cancel_reason__c : robj.Loaner_cancel_Remarks__c;
+                            //20210818 SFDC-C448KZ ljh end
+
+                            // 鍒ゆ柇鍒嗛厤鐨勬槑缁嗘槸鍚﹀凡缁忔帓闃燂紝濡傛灉宸叉帓闃燂紝闇�瑕佹竻闄ゅ鍝佸�熷嚭鎺掗槦搴忓垪琛ㄤ腑瀵瑰簲鐨勬暟鎹�
+                            if (String.isNotBlank(robj.ExternalKey__c)) {
+                                List<Rental_Apply_Sequence__c> rasList = [
+                                        SELECT Id
+                                        FROM Rental_Apply_Sequence__c 
+                                        WHERE Apply_Set_Detail__c =: robj.Id
+                                          AND Invalid_Flag__c = false];
+
+                                // 鏇存柊澶囧搧鍊熷嚭鎺掗槦搴忓垪琛�
+                                if (!rasList.isEmpty()) {
+                                    FixtureUtil.withoutDelete(rasList);
+                                }
+                            }
+                            robj.ExternalKey__c = null;
+
+                            //鈥诲凡缁忓垎閰嶇殑鍫村悎  銉堛儶銇屻仹銈勩倞銇俱仚
+                            //if(!String.isBlank(robj.Asset__c) && robj.Select_Time__c != null) {
+                                //鍊熷嚭澶囧搧Set涓�瑙堟槑缁� trigger 閲� clear Asset__c
+                                //鍊熷嚭澶囧搧Set涓�瑙堟槑缁�.鍒嗛厤鏃堕棿
+                                // if (robj.Select_Time__c != null) {
+                                //     robj.Select_Time__c = null;
+                                // }
+                            //}
+
+                            raesds.add(robj);
+                        }
+                    }
+                }
+            }
+
+            if (delIds.size() > 0) {
+                // 鍓婇櫎
+                FixtureUtil.delRAESDByIds(parentObj, delIds);
+            }
+
+            if (raesds.size() > 0) {
+                FixtureUtil.withoutUpdate(raesds);
+
+                // 鍙栨秷鎿嶄綔,鍙槸鍙栨秷宸查�夋嫨鐨勫垎閰�,鐢婚潰鍒锋柊
+                PageReference pg = new PageReference('/apex/MainFixtureSelect');
+                pg.getParameters().put('pt_recid',parentId);
+                pg.setRedirect(true);
+                return pg;
+            }
+        }
+        catch (Exception e) {
+            ApexPages.addMessages(e);
+            Database.rollback(sp);
+            return null;
+        }
+        return null;
+    }
+
+    public PageReference turnback() {
+        PageReference ret = null;
+        if (!String.isBlank(this.parentId)) {
+            ret = new PageReference('/' + this.parentId);
+        }
+        return ret;
+    }
+
+    /**
+    *#OLY_OCM-668 鍙栨秷涓讳綋鍒嗛厤
+    *@return PageReferences 鍒锋柊涓讳綋閫夋嫨鐢婚潰
+    */
+    public PageReference unassign(){
+        Map<String, Rental_Apply_Equipment_Set_Detail__c> mfUpsert = new Map<String, Rental_Apply_Equipment_Set_Detail__c>();
+        Map<Id, Fixture_OneToOne_Link__c> fOtoMap = new Map<Id, Fixture_OneToOne_Link__c>();
+        Savepoint sp = Database.setSavepoint();
+        Set<String> clearUniqueKeySet = new Set<String>();
+        try{
+            Integer checkCount = 0;
+            for (Integer indexNum = 0; indexNum < viewList.size(); indexNum++) {
+                WrapperInfo wprInfo = viewList[indexNum];
+                Rental_Apply_Equipment_Set_Detail__c robj = (Rental_Apply_Equipment_Set_Detail__c) wprInfo.sobj;
+                robj.Id = null;
+                robj.Rental_Apply_Equipment_Set__c = sonObj.Rental_Apply_Equipment_Set__c;
+                if (wprInfo.check) {
+                    checkCount += 1;
+                    // 鎿嶄綔瀵捐薄
+                    List<Rental_Apply_Equipment_Set_Detail__c> raesdList = [
+                            SELECT Id, StockDown_time__c,Cancel_Date__c,
+                                UniqueKey__c,
+                                Fixture_OneToOne_Link_Id__c,
+                                Asset__c,
+                                Select_Time__c,
+                                Shipment_request_time2__c,
+                                Shipment_request__c ,
+                                Fixture_Model_No_text__c ,
+                                FSD_Fixture_Model_No__c,
+                                SerialNumber_text__c,
+                                SalesProvince_before__c,
+                                Salesdepartment_before__c,
+                                Product_category_text__c,
+                                Equipment_Type_text__c,
+                                Asset_cost_del_before__c,
+                                Internal_asset_location_before__c,
+                                Fixture_Name_text__c ,
+                                FSD_Name_CHN__c,
+                                EquipmentSet_Managment_Code_text__c
+                            FROM Rental_Apply_Equipment_Set_Detail__c
+                            where Id = :sonObj.Id
+                            FOR Update];
+                    if (raesdList.isEmpty()) {
+                        throw new ControllerUtil.myException('娌℃湁涓嬫灦鍓嶅凡鍒嗛厤鐨勪富浣�');
+                    }
+                    Rental_Apply_Equipment_Set_Detail__c robjOnline = raesdList[0];
+
+                    if(robjOnline.Cancel_Date__c != null){
+                        throw new ControllerUtil.myException('绗�' + (indexNum + 1) +'琛岋紝宸茬粡鍙栨秷鐢宠浜嗭紝涓嶈兘鍙栨秷鍒嗛厤');
+                    }
+                    if(robjOnline.StockDown_time__c != null){
+                        throw new ControllerUtil.myException('绗�' + (indexNum + 1) +'琛岋紝宸蹭笅鏋讹紝涓嶅彲浠ュ彇娑堝垎閰�');
+                    }
+                    if(robjOnline.Asset__c == null){
+                        throw new ControllerUtil.myException('绗�' + (indexNum + 1) +'琛岋紝杩樻病鏈夎鍒嗛厤锛屼笉鍙互鍙栨秷鍒嗛厤');
+                    }
+
+                    // 宸插垎閰嶄笖鏈笅鏋舵墠鍙墽琛屽彇娑�
+                    List<Asset> aSetList =
+                            [SELECT Id, Quantity,
+                                    Out_of_wh__c,
+                                    Manage_type__c,
+                                    You_Xiao_Ku_Cun__c,
+                                    Last_Reserve_RAES_Detail__c,
+                                    Last_Reserve_RAES_Detail__r.Select_Time__c
+                               FROM Asset
+                              WHERE Id = :robj.Asset__c
+                                FOR UPDATE
+                            ];
+                    // 涓嶈兘lock鍒版暟鎹殑鏃跺��
+                    if (aSetList.isEmpty()) {
+                        throw new ControllerUtil.myException('绗�' + (indexNum + 1) +'琛岋紝涓嶆槸鏈夋晥鐨勪富浣擄紝璇峰埛鏂扮敾闈㈠悗閲嶆柊鎿嶄綔');
+                    }
+                    // 鐩稿叧瀛楁缃负 null
+                    robj.Asset__c = null;
+                    robj.Select_Time__c = null;
+                    robj.Shipment_request_time2__c = null;
+                    robj.Shipment_request__c = false;
+                    // 澶囧搧閰嶅鏄庣粏鍨嬪彿(鍊熷嚭鏃�)
+                    robj.Fixture_Model_No_text__c = robj.FSD_Fixture_Model_No__c;
+                    // 鏈鸿韩缂栧彿锛堝�熷嚭鏃讹級
+                    robj.SerialNumber_text__c = null;
+                    // 鎵�鍦ㄥ湴鍖�(鐪�) 鍊熷嚭鏃�
+                    robj.SalesProvince_before__c = null;
+                    // 鎵�鍦ㄥ湴鍖�(鏈儴) 鍊熷嚭鏃�
+                    robj.Salesdepartment_before__c = null;
+                    // 浜у搧鍒嗙被(GI/SP)(鍊熷嚭鏃�)
+                    robj.Product_category_text__c = null;
+                    // 澶囧搧鍒嗙被(鍊熷嚭鏃�)
+                    robj.Equipment_Type_text__c = null;
+                    // 澶囧搧鎴愭湰(鍊熷嚭鏃�)
+                    robj.Asset_cost_del_before__c = null;
+                    // 澶囧搧瀛樻斁鍦�(鍊熷嚭鏃�)
+                    robj.Internal_asset_location_before__c = null;
+                    //澶囧搧鍚嶇О(鍊熷嚭鏃�)
+                    robj.Fixture_Name_text__c = robj.FSD_Name_CHN__c;
+                    // 澶囧搧绠$悊缂栫爜(鍊熷嚭鏃�)
+                    robj.EquipmentSet_Managment_Code_text__c = null;
+                    // 娓呯┖鎺掗槦淇℃伅
+                    robj.Queue_Conment__c = null;
+                    robj.Queue_Day__c = null;
+                    robj.Queue_User__c = null;
+                    //鍙栨秷鍒嗛厤 update byrentx 20210809 start 鍙栨秷鍒嗛厤鏃朵笉娓呯┖ 鎺掗槦鏃�(棣栨)
+                    // robj.Queue_Day_Text__c = null;
+                    //鍙栨秷鍒嗛厤 update byrentx 20210809 end 鍙栨秷鍒嗛厤鏃朵笉娓呯┖ 鎺掗槦鏃�(棣栨)
+
+                    robj.Queue_Number__c = null;
+
+                    // 鍒ゆ柇鍒嗛厤鐨勬槑缁嗘槸鍚﹀凡缁忔帓闃燂紝濡傛灉宸叉帓闃燂紝闇�瑕佹竻闄ゅ鍝佸�熷嚭鎺掗槦搴忓垪琛ㄤ腑瀵瑰簲鐨勬暟鎹�
+                    if (String.isNotBlank(robj.ExternalKey__c)) {
+                        List<Rental_Apply_Sequence__c> rasList = [
+                                SELECT Id
+                                FROM Rental_Apply_Sequence__c 
+                                WHERE Apply_Set_Detail__c =: robjOnline.Id
+                                  AND Invalid_Flag__c = false];
+
+                        // 鏇存柊澶囧搧鍊熷嚭鎺掗槦搴忓垪琛�
+                        if (!rasList.isEmpty()) {
+                            FixtureUtil.withoutDelete(rasList);
+                        }
+                    }
+                    robj.ExternalKey__c = null;
+
+                    String uniqueKeyStr = parentObj.RequestNoJoinStr2__c + ':'+ robj.Rental_Apply_Equipment_Set__c
+                            + ':' + robj.FSD_Id__c + ':' + robj.IndexFromUniqueKey__c;
+                    robj.UniqueKey__c = uniqueKeyStr;
+
+                    // 涓�瀵逛竴鐨勬儏鍐�,涓讳綋澶囧搧鍜岄厤濂楃殑闄勫睘鍝佷竴璧峰彇娑�
+                    if (robj.FSD_OneToOneAccessory_Cnt__c > 0) {
+                        // 1. select from Rental_Apply_Equipment_Set_Detail__c 鎵惧嚭闇�瑕佸垎閰嶇殑瀵硅薄
+                        // 姝ゅ鍏遍�氬寲澶勭悊,璋冪敤 FixtureUtil.clearOneToOneAccessory()鏂规硶
+                        //   a.鏈垎閰嶆椂,Asset__c杩樻病鍊�,鎵�浠ヤ笉鐢ㄥ垽鏂璒neToOne_Flag__c
+                        //   b.浠庝竴瀵逛竴鐨�, 鏀瑰埌涓嶆槸涓�瀵逛竴鐨勬儏鍐�,涓�瀵逛竴鍒嗛厤鐨勯檮灞炲搧瀛楁娓呴櫎閫昏緫,闇�瑕佸垽鏂璒neToOne_Flag__c
+                        //   c.娓呴櫎涓�瀵逛竴link琛ㄧ殑鐩稿叧閫昏緫
+                        //   d.fOtoMap 涔嬪墠鐨勪竴瀵逛竴鍒嗛厤鏁颁篃闇�瑕佷竴璧锋竻绌� + 浠婂洖銇洿鏂颁竴瀵逛竴鍒嗛厤鐨凩ink琛�
+                        robj.Fixture_OneToOne_Link_Id__c = null;
+                        raesdList = FixtureUtil.clearOneToOneAccessory(parentId, mfUpsert, sonObj.Asset__c, fOtoMap);
+                    }
+                    mfUpsert.put(robj.UniqueKey__c, robj);
+
+                    if (String.isBlank(robj.Id)
+                            && !String.isBlank(uniqueKeyStr)) {
+                        // 鏂拌銇牬鍚堛�併亾銇撳崢绱斻伀 Id 銇仸鍒ゆ柇
+                        clearUniqueKeySet.add(uniqueKeyStr);
+                    }
+                    break;
+                }
+            }
+            // 娌℃湁浠讳綍鍕鹃��
+            if (checkCount == 0){
+                throw new ControllerUtil.myException('璇烽�夋嫨宸插垎閰嶇殑涓讳綋澶囧搧');
+            }
+
+            if (!mfUpsert.isEmpty()) {
+                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
+                FixtureUtil.withoutUpsertRaesd(mfUpsert.values());
+                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
+            }
+            //鏇存柊涓�瀵逛竴
+            if (!fOtoMap.isEmpty()) {
+                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
+                FixtureUtil.withoutUpdate(fOtoMap.values());
+                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
+            }
+        } catch (Exception ex) {
+            ApexPages.addMessages(ex);
+            Database.rollback(sp);
+            // Id 銈掋偗銉偄
+            for (Rental_Apply_Equipment_Set_Detail__c robj : mfUpsert.values()) {
+                if (clearUniqueKeySet.contains(robj.UniqueKey__c)) {
+                    robj.Id = null;
+                }
+            }
+            return null;
+        }
+
+        //鍒锋柊鐢婚潰
+        PageReference pg = new PageReference('/apex/MainFixtureSelect');
+        pg.getParameters().put('pt_recid',parentId);
+        pg.setRedirect(true);
+        return pg;
+
+    }
+
+    private String makeSoql(String keyword) {
+        // 妞滅储鏉′欢
+        String dateToday = String.valueOf(Date.today());
+
+        // from asset
+        String soql ='';
+        soql += 'where Asset_Owner__c = \'Olympus\' AND ' + FixtureUtil.getAssetSoqlBase();
+        soql += '  and Asset_loaner_category__c != \'鑰楁潗\'';
+        soql += '  and RecordTypeId = \'01210000000kOPR\'';
+        soql += '  and Quantity > 0';
+        soql += '  and (Abandoned_Inventory__c = 0 OR Abandoned_Inventory__c = null)'; // 寰呭簾寮冩暟(涓㈠け/鐩樹簭)
+        soql += '  and (Abandoned_RealThing__c = 0 OR Abandoned_RealThing__c = null)'; // 寰呭簾寮冩暟(瀹炵墿)
+        soql += '  and (Frozen_Quantity__c = 0 OR Frozen_Quantity__c = null)'; // 鍐荤粨鏁�
+        soql += '  and Loaner_accsessary__c = false';
+        soql += '  and Equipment_Type__c != \'妫�娴嬬敤澶囧搧\'';
+        soql += '  and Delete_Flag__c = False ';
+        soql += '  and Freeze_sign_Abandoned_Flag__c = False';
+        soql += '  and Internal_asset_location__c != null';
+        soql += '  and (Consumable_Guaranteen_end__c = null or Consumable_Guaranteen_end__c >=' + dateToday + ')';
+//鍊熷嚭涓殑Asset涔熻鍑烘樉绀哄嚭鏉�
+//        soql += '  and Last_Reserve_RAES_Detail__c = null';
+        // Fixture_OneToOne_Link__c, 褰撻厤濂楃殑Mst瀹氫箟鎴� 涓�瀵逛竴 鐨勬椂鍊�
+        if (sonObj != null && sonObj.FSD_Is_OneToOne__c) {
+            soql += '  and Fixture_OneToOne_Link__c <> null';
+        }
+
+        // 涓嶆绱eledted鐨勬暟鎹�  鍦� CreateRelationListPagingCmpCtrl 閲� 宸茬粡 鍘婚櫎浜� selectedFKIdList
+        if (sonObj != null && !String.isBlank(sonObj.Asset__c)) {
+            soql += '  and Id != \'' + String.escapeSingleQuotes(sonObj.Asset__c) + '\'';
+        }
+
+        //鑷繁鐘舵��
+        // soql += '';
+
+        if (!String.isBlank(keyword)) {
+            String[] vals = keyword.split(' ');
+             soql += ' and (';
+             String fmodelno = '';
+            for (String v : vals) {
+                v = String.escapeSingleQuotes(v.replace('%', '\\%').replace('*', '%'));
+                fmodelno += ' Product2.Fixture_Model_No_T__c like \'' + v + '\' ';
+                fmodelno += ' or Product2.Name like \'' + v + '\' ';
+                fmodelno += 'or';
+            }
+            fmodelno = fmodelno.removeEnd('or');
+            soql += fmodelno + ' )';
+        } else {
+            soql += ' and Product2.Fixture_Model_No_T__c = \'' + String.escapeSingleQuotes(sonObj.FSD_Fixture_Model_No__c) + '\'';
+        }
+
+        //// TODO 鏆傛椂娉ㄩ噴 鐢婚潰銇嬨倝鍒渷鍒湰閮ㄥ埆搴撳瓨銇垽鏂�
+
+        //鍒瓨鏀惧湴
+        if (String.isNotBlank(bieCunFangDi) && bieCunFangDi != 'All') {
+            soql += ' and Internal_asset_location__c = \'' + String.escapeSingleQuotes(bieCunFangDi) + '\'';
+        }
+        // else {
+        //     String cunfangdiStr = '';
+        //     for (String cunfangdi : cunfangdiSet) {
+        //         cunfangdiStr += ' Internal_asset_location__c = \'' + String.escapeSingleQuotes(cunfangdi) + '\' OR';
+        //     }
+        //     soql += ' and (' + cunfangdiStr.removeEnd('OR') + ')';
+        // }
+        //鍒湰閮�
+        if (String.isNotBlank(bieBenBu) && !bieBenBu.contains('鍏ㄩ儴')) {
+            // soql += ' and Salesdepartment__c = \'' + String.escapeSingleQuotes(bieBenBu) + '\'';
+            List<String> bieBenBuList = bieBenBu.split(',');
+            soql += RentalFixtureSetAssignController.setSoql('Salesdepartment__c', bieBenBuList);
+            /*String benbuStr = '';
+            for (String benbu : bieBenBuList) {
+                benbuStr += ' Salesdepartment__c = \'' + String.escapeSingleQuotes(benbu) + '\' OR';
+            }
+            soql += ' and (' + benbuStr.removeEnd('OR') + ')';*/
+        }
+        else if (benbuSet.size() > 0) {
+            String benbuStr = '';
+            for (String benbu : benbuSet) {
+                benbuStr += ' Salesdepartment__c = \'' + String.escapeSingleQuotes(benbu) + '\' OR';
+            }
+            soql += ' and (' + benbuStr.removeEnd('OR') + ')';
+        }
+        //浜у搧鍒嗙被
+        if (String.isNotBlank(bieChanPinFenLei)) {
+            soql += ' and Product_category__c = \'' + String.escapeSingleQuotes(bieChanPinFenLei) + '\'';
+        }
+        //鍒鍝佸垎绫�
+        if (String.isNotBlank(bieBeiPinFenLei) && !bieBeiPinFenLei.contains('鍏ㄩ儴')) {
+            List<String> bieBeiPinFenLeiList = bieBeiPinFenLei.split(',');
+            soql += RentalFixtureSetAssignController.setSoql('Equipment_Type__c', bieBeiPinFenLeiList);
+        }
+        // 璺宠繃宸茬粡閫夋嫨鐨勫鍝乻et鏄庣粏
+        // where not in selectedFKIdList 鍏遍�氥伀浣溿倠 銇撱亾銇с亜銈夈仾銇�
+        system.debug(soql);
+        //system.assertEquals('qyj',soql);
+        return soql;
+    }
+
+    public override void setViewList(List<sObject> queryList) {
+        viewList = new List<WrapperInfo>();
+        List<Rental_Apply_Equipment_Set_Detail__c> groupByTargetList = new List<Rental_Apply_Equipment_Set_Detail__c>();
+
+        if (selectedData.size() == 0) {
+            // 鍥犱负鏄富浣�,鑲畾鏈夋暟鎹�,涓讳綋娌℃湁鐨勬儏鍐�,鎻愮ず閿欒淇℃伅
+            throw new ControllerUtil.myException('涓讳綋涓嶅瓨鍦�,璇烽�夋嫨鏈変富浣撶殑鏁版嵁銆�');
+        }
+
+        // 鑷繁鐨勬暟鎹墦鍕撅紝琚绱㈠嚭鏉ョ殑鏁版嵁涓嶆墦鍕�
+        // 閬告姙娓堛伩銇槑缁嗐倰viewList銇拷鍔�
+        if (selectedData.size() > 0) {
+            for (Integer i = 0; i < selectedData.size(); i++) {
+                /* not include the selected data num */
+                // 501銈掕秴銇堛仧鍫村悎鍓�500銇伩銈掑嚭銇�
+                //if (i == getSearchNumMax()) continue;
+                Rental_Apply_Equipment_Set_Detail__c rsdObj = (Rental_Apply_Equipment_Set_Detail__c) selectedData[i];
+                System.debug('rsdObj.Asset__c' + rsdObj.Asset__c);
+                if (!String.isBlank(rsdObj.Asset__c)) {
+
+                    viewList.add(new WrapperInfo(rsdObj, myComponentController));
+                    viewList[viewList.size() - 1].lineNo = viewList.size() - 1;
+                    viewList[viewList.size() - 1].check = true;
+                    viewList[viewList.size() - 1].oldCheck = true;
+                    if (is2B1 && pCunFangDi != rsdObj.Internal_asset_location__c) {
+                        viewList[viewList.size() - 1].canEdit = false;
+                    }
+                    groupByTargetList.add(rsdObj);
+
+                    // QueuePageByAssetId鐨刄RL, 鍔犺浇鎺掗槦鐢婚潰鐢�
+                    queueByAsset = '/apex/QueuePageByAssetId?parentId=' + rsdObj.Rental_Apply_Equipment_Set__c + '&isNotShow=' + true;
+                    assetId  = rsdObj.Asset__c;
+                    rentalId = rsdObj.Rental_Apply_Equipment_Set__c;
+                    modelNo  = rsdObj.Fixture_Model_No_text__c;
+                    raesdId = rsdObj.Id;
+                }
+            }
+        }
+
+        // queryList 銇� 鏁板紡闋呯洰銈掑彇寰�
+        Savepoint sp = Database.setSavepoint();
+        // 涓嬨伀rollback銇屻亗銈娿伨銇�
+        System_UserSetting__c config = System_UserSetting__c.getInstance(UserInfo.getUserId());
+        config.RentalApply_ByPass__c = true;
+        // 绲勭箶銇偒銈广偪銉犺ō瀹氥亴浣滄垚銇椼仸銇亜銇彲鑳芥�с亴銇傘倞銇俱仚銇仹銇撱亾銇psert
+        FixtureUtil.withoutUpsertObjects(new System_UserSetting__c[]{config});
+
+        //娌℃湁鏈�鏂伴璁¤繑鍥炴棩鐢ㄧ殑涓�瑙�
+        Rental_Apply_Equipment_Set__c raes = new Rental_Apply_Equipment_Set__c(
+            Rental_Apply__c = parentObj.Rental_Apply__c,
+            Fixture_Set__c = parentObj.Fixture_Set__c,
+            DataMigration_Flag__c = true);
+        FixtureUtil.withoutInsert(new Rental_Apply_Equipment_Set__c[]{raes});
+
+        // 鏁板紡闋呯洰鍊ゃ倰鍙栥倢銈嬨伄銇熴倎銇�佷竴鍥濱nsert銇欍倠
+        List<Rental_Apply_Equipment_Set_Detail__c> tempList = new List<Rental_Apply_Equipment_Set_Detail__c>();
+        for (Integer i = 0; i < queryList.size(); i++) {
+            // 501銈掕秴銇堛仧鍫村悎鍓�500銇伩銈掑嚭銇�
+            if (i == getSearchNumMax()) { break; }
+            // 涓�瑕с伄size
+            // 銇撱亾new銇с伅銇亜銆乵akeSelectedDataInfo銇甦ata銈抍lone銇椼仸銇忋仩銇曘亜銆�
+            Rental_Apply_Equipment_Set_Detail__c mf = ((Rental_Apply_Equipment_Set_Detail__c) selectedData[0]).clone(false);
+
+            // ****************娉ㄦ剰:杩欓噷涓嶈兘闅忔剰娓呯┖瀛楁,濡傛灉瑕佹竻绌轰竴瀹氳鎱庨噸鍐嶆厧閲�,鍥犱负淇濆瓨鐨勬椂鍊欏彲鑳戒細鎶婃湁鍊肩殑瀛楁娓呯┖鎺�
+            // 鍥犱负妫�绱㈢殑鏃跺�欓渶瑕佹樉绀烘绱㈠嚭鏉ョ殑Asset淇℃伅锛屾墍浠ラ渶瑕佹竻闄lone鍑烘潵鐨勫�硷紝濂借鏁版嵁鍙互鐨凥andler閲岄潰璧嬫垚褰撳墠Asset鍊�
+            // mf.Fixture_Model_No_text__c = null; OLY_OCM-431 涓嶈瀹氾紝 璁惧畾鐨勮瘽 鐢婚潰浼氭樉绀烘垚 浠f浛鍝�
+            mf.SerialNumber_text__c = null;
+            mf.SalesProvince_before__c = null;
+            mf.Salesdepartment_before__c = null;
+            mf.Product_category_text__c = null;
+            mf.Equipment_Type_text__c = null;
+            mf.Asset_cost_del_before__c = null;
+            mf.Internal_asset_location_before__c = null;
+            mf.Fixture_Name_text__c = mf.FSD_Name_CHN__c;
+            mf.EquipmentSet_Managment_Code_text__c = null;
+
+            Asset ass = (Asset)queryList[i];
+            mf.Asset__c                             = ass.Id;
+            /* ---------------- OLY_OCM-603 Start 鏈�鏂伴瀹氬綊杩樻棩鏄剧ず淇濇湁璁惧鏂板缓鐨勫叕寮忓瓧娈� */
+            // if (ass.Last_Reserve_RAES_Detail__c != null) {
+                //鏈塴ast鐨勮瘽涓�瑙堜负鏈�鏂板�熷嚭涓�瑙堟槑缁嗙殑涓�瑙�(鏄剧ず鏈�鏂伴璁″綊杩樻棩)
+                // mf.Rental_Apply_Equipment_Set__c = ass.Last_Reserve_RAES_Detail__r.Rental_Apply_Equipment_Set__c;
+            // } else {
+                //娌℃湁last鐨勮瘽涓�瑙堜负鏂板缓鐨勪竴瑙�(鏈�鏂伴璁″綊杩樻棩涓虹┖)
+                mf.Rental_Apply_Equipment_Set__c = raes.Id;
+            // }
+            /* ---------------- OLY_OCM-603 End */
+            mf.DataMigration_Flag__c                = true;
+            tempList.add(mf);
+        }
+
+        Database.SaveResult[] results = FixtureUtil.withoutInsert(tempList, false);
+
+        final String soqlStr = 'Select {0} {1} ';
+        String whereStr = ' FROM Rental_Apply_Equipment_Set_Detail__c WHERE ID in: tempList';
+        String soql = String.format(soqlStr, new String[] {myComponentController.strColumus , whereStr});
+
+        tempList = FixtureUtil.queryTempList(soql, tempList);
+        if (queryList.size() != tempList.size()) {
+            //error message 妞滅储鍑︾悊姝c仐銇忋亗銈娿伨銇涖倱銆併偡銈广儐銉犵鐞嗚�呫伀閫g怠銇椼仸銇忋仩銇曘亜銆�
+            for (Integer i = 0; i < results.size(); i ++) {
+                Database.SaveResult dmlResult = results[i];
+                if (!dmlResult.isSuccess()) {
+                    System.debug(System.LoggingLevel.ERROR, '绗琜' + (i + 1) + ']鏉� insert error:' + dmlResult);
+                    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,
+                    '绗琜' + (i + 1) + ']鏉� insert error:' + dmlResult));
+                    // 1浠剁洰銇犮亼log銇嚭銇�
+                    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,
+                        System.Label.CreateRelationListSearchError));
+                    Database.rollback(sp);
+                    return;
+                }
+            }
+        }
+        // 寮峰埗銉兗銉儛銉冦偗銇椼伨銇欍亴銆佹暟寮忋伄鍊ゃ亴鍙栥倢銇熴偆銉炽偣銈裤兂銈广亴fsDMap銇繚鎸�
+        Database.rollback(sp);
+
+        Map<String, SObject> fsDMap = new Map<String, SObject>();
+        for (Rental_Apply_Equipment_Set_Detail__c fsd : tempList) {
+            Rental_Apply_Equipment_Set_Detail__c robj = fsd.clone(false);
+            robj.DataMigration_Flag__c = false;
+            fsDMap.put(fsd.Asset__c, robj);
+        }
+
+        // queryList銇╢sDMap銈堛倞new WrapperInfo()銇椼仸銆乿iewList銇拷鍔�
+        for (Integer i = 0; i < queryList.size(); i++) {
+            // 501銈掕秴銇堛仧鍫村悎鍓�500銇伩銈掑嚭銇�
+            if (i == getSearchNumMax()) { break; }
+
+            Rental_Apply_Equipment_Set_Detail__c mf = (Rental_Apply_Equipment_Set_Detail__c) fsDMap.get(queryList[i].Id);
+
+            viewList.add(new WrapperInfo(mf, myComponentController));
+            viewList[viewList.size() - 1].lineNo = viewList.size() - 1;
+            if (is2B1 && pCunFangDi != mf.Internal_asset_location__c) {
+                viewList[viewList.size() - 1].canEdit = false;
+            }
+            groupByTargetList.add(mf);
+        }
+system.debug('鈼忊棌鈼忊棌鈼� setViewList END ' );
+
+        // 涓�瑕с伀瀵俱仐銇︺�乬roupby銇爡鐩伄鍊ゃ倰鍙栧緱
+        Map<Id, Map<String, FixtureUtil.groupBean>> rsdMap = FixtureUtil.raesdGroupByAssetId(
+                groupByTargetList, myComponentController.columus);
+
+        for (Rental_Apply_Equipment_Set_Detail__c rsdObj : groupByTargetList) {
+
+            Map<String, FixtureUtil.groupBean> rsdGroupInfo = rsdMap.get(rsdObj.Asset__c);
+
+            for (String apikey : rsdGroupInfo.keySet()){
+                if (apikey.indexOf('_Jia__c') >= 0) {
+                    if (apikey == 'Fu_Shu_Pin_Fen_Pei_Jia__c' || apikey == 'Zhu_Ti_Fen_Pei_Jia__c') {
+                        // 鍒ラ�旇ō瀹氥仚銈�
+                        continue;
+                    } else {
+                        rsdObj.put(apikey, rsdGroupInfo.get(apikey).gnum);
+                    }
+                }
+            }
+
+            // 鑷繁:鍒嗛厤 鎴栬�� 鏆傚畾鍒嗛厤 浜嗙殑 灏辨槸杩欎釜asset鐨勬椂鍊�
+            if (sonObj.Asset__c == rsdObj.Asset__c) {
+                // RAESD_Status__c 閲屽彲鑳戒細鍑� 鏆傚畾鍒嗛厤
+                rsdObj.Zhu_Ti_Fen_Pei_Jia__c = rsdObj.RAESD_Status__c;
+            }
+            // 鑷繁鏄帓闃熶腑 and 鐪嬪埆浜烘槸宸插垎閰�, 鐨勬椂鍊�
+            else if (sonObj.Queue_Number__c > 0
+                    && rsdObj.Asset__r.Last_Reserve_RAES_Detail__r.Select_Time__c != null) {
+                // 鑷繁鏄剧ず Mei_You_Ku_Cun
+                rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Mei_You_Ku_Cun.ordinal());
+            }
+            // 鑷繁涓嶆槸鎺掗槦涓� and 鐪嬪埆浜烘槸宸插垎閰�, 鐨勬椂鍊�
+            else if ((sonObj.Queue_Number__c == 0 || sonObj.Queue_Number__c == null)
+                    && rsdObj.Asset__r.Last_Reserve_RAES_Detail__r.Select_Time__c != null) {
+                // 鑷繁鏄剧ず Mei_You_Ku_Cun
+                rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Mei_You_Ku_Cun.ordinal());
+            }
+            // 鑷繁鏄帓闃熶腑 and 鐪嬪埆浜烘槸 娌℃湁鍒嗛厤 鐨勬椂鍊�
+            else if (sonObj.Queue_Number__c > 0
+                    && String.isBlank(rsdObj.Asset__r.Last_Reserve_RAES_Detail__c)
+            ) {
+                if (rsdObj.Asset__r.You_Xiao_Ku_Cun__c > 0) {
+                    // 鑷繁鏄剧ず Ke_Yi_Fen_Pei
+                    rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal());
+                } else {
+                    // 鑷繁鏄剧ず Mei_You_Ku_Cun
+                    rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Mei_You_Ku_Cun.ordinal());
+                }
+            }
+            // 鑷繁涓嶆槸鎺掗槦涓� and 鐪嬪埆浜烘槸 娌℃湁鍒嗛厤 鐨勬椂鍊�
+            else if ((sonObj.Queue_Number__c == 0 || sonObj.Queue_Number__c == null)
+                    && String.isBlank(rsdObj.Asset__r.Last_Reserve_RAES_Detail__c)
+            ) {
+                if (rsdObj.Asset__r.You_Xiao_Ku_Cun__c > 0) {
+                    // 鑷繁鏄剧ず Ke_Yi_Fen_Pei
+                    rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal());
+                } else {
+                    // 鑷繁鏄剧ず Mei_You_Ku_Cun
+                    rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Mei_You_Ku_Cun.ordinal());
+                }
+            }
+            // 鑷繁鏄帓闃熶腑 and 鐪嬪埆浜烘槸 鏆傚畾鍒嗛厤 鐨勬椂鍊�
+            else if (sonObj.Queue_Number__c > 0
+                    && String.isNotBlank(rsdObj.Asset__r.Last_Reserve_RAES_Detail__c)
+                    && rsdObj.Asset__r.Last_Reserve_RAES_Detail__r.Select_Time__c == null
+            ) {
+                // 鑷繁鏄剧ず Ke_Yi_Fen_Pei
+                rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal());
+            }
+            // 鑷繁涓嶆槸鎺掗槦涓� and 鐪嬪埆浜烘槸 鏆傚畾鍒嗛厤 鐨勬椂鍊�
+            else if ((sonObj.Queue_Number__c == 0 || sonObj.Queue_Number__c == null)
+                    && String.isNotBlank(rsdObj.Asset__r.Last_Reserve_RAES_Detail__c)
+                    && rsdObj.Asset__r.Last_Reserve_RAES_Detail__r.Select_Time__c == null
+            ) {
+                // 鑷繁鏄剧ず Ke_Yi_Fen_Pei
+                rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal());
+            }
+
+            // else: 瑕佸仛鍒� 鍘熷垯涓嶄細鍙戠敓  // 浼氬悗杩欎釜 TODO 鏈夊叧鑱� ?? TODO why瑕佺湅? 瑕佺湅鐨勮瘽 鍙﹀3涓埆瀛楁涓嶇湅鍚�?
+            else {
+                // 浠ヤ笅銇� 蹇点伄銇熴倎銇儹銈搞儍銈�
+                // 鐪嬪埆浜烘槸 (鏆傚畾鍒嗛厤 or 娌℃湁鍒嗛厤), 鐨勬椂鍊�
+                if (rsdObj.Asset__r.You_Xiao_Ku_Cun__c > 0
+                        && (String.isBlank(rsdObj.Asset__r.Last_Reserve_RAES_Detail__c)
+                                || rsdObj.Asset__r.Last_Reserve_RAES_Detail__r.Select_Time__c == null)
+                ) {
+                    // 鑷繁鏄剧ず Ke_Yi_Fen_Pei
+                    rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal());
+                }
+                else {
+                    // 鑷繁鏄剧ず Mei_You_Ku_Cun
+                    rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Mei_You_Ku_Cun.ordinal());
+                }
+            }
+            // if (rsdObj.Select_Time__c != null) {
+            //     rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.HistoryStatus.Yi_Fen_Pei.ordinal());
+            // } else if (rsdObj.Queue_Number__c == 0 && rsdObj.Queue_Day__c != null) {
+            // // 鏆傚畾鍒嗛厤 鏈垎閰嶅苟涓旀帓闃熺殑绗竴涓�
+            //     rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.HistoryStatus.Zan_Ding_Fen_Pei.ordinal());
+            // }else if (rsdObj.Queue_Number__c > 0) {
+            //     //宸叉帓闃熺姸鎬佽鍊�
+            //     rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Pai_Dui_Zhong.ordinal());
+            // } else if (rsdObj.Cancel_Select__c) {
+            //     rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Qu_Xiao.ordinal());
+            // }else {
+            //     rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(subjectStatus);
+            // }
+       }
+
+       wrapperStr = JSON.serialize(viewList);
+       System.debug(LoggingLevel.INFO, '*** wrapperStr: ' + wrapperStr);
+system.debug('鈼忊棌鈼忊棌鈼� raesdGroupByAssetId END ' );
+    }
+
+    public String getWrapperJSON(){
+        System.debug(LoggingLevel.INFO, '*** wrapperStr: ' + wrapperStr);
+        return wrapperStr;
+    }
+
+    /**
+     * OLY_OCM-431 raesdList 鏄竴瀵逛竴鍒嗛厤瀵硅薄, 浣嗘槸閲岄潰鏈変箣鍓嶆槸鎵嬪姩鍒嗛厤鐨勫凡涓嬫灦鏄庣粏
+     * 瀵� raesdList 杩涜涓�瀵逛竴鍒嗛厤
+     * @param raesdList select from Rental_Apply_Equipment_Set_Detail__c 鎵惧嚭闇�瑕佸垎閰嶇殑瀵硅薄
+     * @param oneToOneListMap 琚垎閰嶅璞� {Fixture_Model_No_F__c: [Asset.Id]}
+     * @param assetKuCunMap 鍒嗛厤鍓嶇殑 Asset 鐨勬湁鏁堝簱瀛� (You_Xiao_Ku_Cun__c) {Id<Asset>: Asset{You_Xiao_Ku_Cun__c}}
+     * @param fOtoMap 涔嬪墠鐨勪竴瀵逛竴鍒嗛厤鏁颁篃闇�瑕佷竴璧锋竻绌� + 浠婂洖銇洿鏂颁竴瀵逛竴鍒嗛厤鐨凩ink琛�
+     * @param selectTime 涓讳綋鐨勫垎閰嶆椂闂�
+     * @param rtnMfUpsert 鏇存柊鐢�, 鏈夎繑鍥炵殑鍔熻兘
+     * @param rtnOldMap 閲嶆柊鍒嗛厤 瀵硅薄Map, 鏈夎繑鍥炵殑鍔熻兘
+     */
+    private void oneToOneSelect(List<Rental_Apply_Equipment_Set_Detail__c> raesdList
+            , Map<String, List<Fixture_OneToOne_Link__c>> oneToOneListMap
+            , Map<Id, Asset> assetKuCunMap
+            , Map<Id, Fixture_OneToOne_Link__c> fOtoMap
+            , Datetime selectTime
+            , Map<String, Rental_Apply_Equipment_Set_Detail__c> rtnMfUpsert
+            , Map<Id, Rental_Apply_Equipment_Set_Detail__c> rtnOldMap) {
+
+        List<Rental_Apply_Equipment_Set_Detail__c> rtnOldList = new List<Rental_Apply_Equipment_Set_Detail__c>();
+        for (Rental_Apply_Equipment_Set_Detail__c accessoryObj : raesdList) {
+            List<Fixture_OneToOne_Link__c> oneToOneAsetIdList = oneToOneListMap.get(accessoryObj.FSD_Fixture_Model_No__c);
+            if (oneToOneAsetIdList == null || oneToOneAsetIdList.isEmpty()) {
+                // 娌℃湁涓�瀵逛竴浜�, 涓嶅垎閰�
+            } else {
+                // 鏈変竴瀵逛竴瀹氫箟鐨勯檮灞炲搧
+                // 澶囧搧鏈夋晥搴撳瓨
+                Integer num = Integer.valueof(assetKuCunMap.get(oneToOneAsetIdList[0].Accessory_Asset__c).You_Xiao_Ku_Cun__c);
+                // TODO if (num < oneToOneAsetIdList.size()) {
+                if (num < 1) {
+                    // [' + accessoryObj.FSD_Fixture_Model_No__c + '] 鐨勪竴瀵逛竴瀹氫箟娌℃湁瓒冲搴撳瓨锛岃纭涓�瀵逛竴瀹氫箟');
+                    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING, '涓�瀵逛竴娌℃湁鍏ㄩ儴鍒嗛厤'));
+                }
+                else {
+                    // 宸蹭笅鏋�, 娌℃湁鍑哄簱鐨勮瘽鐨勮瘽, 瑕佸厛鍋� 閲嶆柊鍒嗛厤
+                    if (accessoryObj.StockDown__c && String.isBlank(accessoryObj.DeliverySlip__c)) {
+                        // 鍦ㄥ韩銇俱仛銇裤仾銇�
+                        rtnOldList.add(accessoryObj);
+                        rtnOldMap.put(accessoryObj.Id, accessoryObj);
+                        accessoryObj.Cancel_Select__c = true;
+                        accessoryObj.Cancel_Reason__c = '閲嶆柊鍒嗛厤';
+                        accessoryObj.Loaner_cancel_Remarks__c = '涓嬫灦鍚庝竴瀵逛竴閲嶆柊鍒嗛厤';
+                    }
+                    // 涓嶆槸宸蹭笅鏋剁殑璇�, 鍙互鍒嗛厤
+                    else {
+                        if (!fOtoMap.containsKey(oneToOneAsetIdList[0].Id)) {
+                            oneToOneAsetIdList[0].Select_Accessory_Asset_Cnt__c = 0;
+                            fOtoMap.put(oneToOneAsetIdList[0].Id, oneToOneAsetIdList[0]);
+                        }
+                        // 鏈� 涓�瀵逛竴 闄勫睘鍝�
+                        // accessoryObj.UniqueKey__c   // and UniqueKey__c != null
+                        accessoryObj.Fixture_OneToOne_Link_Id__c = oneToOneAsetIdList[0].Id; // 鏈� remove(0), 鎵�浠ュ彇[0]
+                        accessoryObj.Asset__c = oneToOneAsetIdList[0].Accessory_Asset__c;
+                        accessoryObj.Select_Time__c = selectTime;      // 涓讳綋鐨勫垎閰嶆椂闂�
+                        accessoryObj.Shipment_request_time2__c = null;
+                        accessoryObj.Shipment_request__c = false;
+                        rtnMfUpsert.put(accessoryObj.UniqueKey__c, accessoryObj);
+                        Fixture_OneToOne_Link__c fot = fOtoMap.get(oneToOneAsetIdList[0].Id);
+                        fot.Select_Accessory_Asset_Cnt__c += 1;
+                        fOtoMap.put(oneToOneAsetIdList[0].Id, fot);
+                        oneToOneAsetIdList.remove(0);
+                    }
+                }
+            }
+        }
+        // 纭 rtnOldMap 杩樿兘涓嶈兘涓�瀵逛竴鍒嗛厤
+        for (Rental_Apply_Equipment_Set_Detail__c accessoryObj : rtnOldList) {
+            List<Fixture_OneToOne_Link__c> oneToOneAsetIdList = oneToOneListMap.get(accessoryObj.FSD_Fixture_Model_No__c);
+            if (oneToOneAsetIdList == null || oneToOneAsetIdList.isEmpty()) {
+                // 娌℃湁涓�瀵逛竴浜�, 涓嶅垎閰�
+                rtnOldMap.remove(accessoryObj.Id);
+            } else {
+                // 鏈変竴瀵逛竴瀹氫箟鐨勯檮灞炲搧
+            }
+        }
+    }
+
+    //鐗规畩鎺掗槦
+    public PageReference specialScheduel(){
+        List<Rental_Apply_Equipment_Set__c> mfUpdate = new List<Rental_Apply_Equipment_Set__c>();
+        Savepoint sp = Database.setSavepoint();
+        try {
+            // 鍏堝垽鏂綋鍓嶆搷浣滅敤鎴风殑瀛樻斁鍦板拰鐢宠鍗曠殑瀛樻斁鍦版槸鍚︿竴鑷�
+            if (!enableRunCheck()) {
+                throw new ControllerUtil.myException('鏃犳潈闄愭搷浣滃綋鍓嶅崟鎹繘琛屾帓闃燂紒');
+            }
+
+            if(String.isEmpty(bieCunFangDi)){
+                throw new ControllerUtil.myException('鐗规畩鎺掗槦鏃讹紝璇烽�夋嫨澶囧搧瀛樻斁鍦�');
+            }
+            if(bieCunFangDi != parentObj.Rental_Apply__r.Internal_asset_location_F__c){
+                throw new ControllerUtil.myException('鐗规畩鎺掗槦鏃讹紝涓嶈兘璺ㄥ鍝佸瓨鏀惧湴鎺掗槦');
+            }
+            /*if(String.isEmpty(bieChanPinFenLei)){
+                throw new ControllerUtil.myException('鐗规畩鎺掗槦鏃讹紝浜у搧鍒嗙被蹇呭~锛�');
+            }*/
+            if(String.isEmpty(bieBeiPinFenLei)){
+                throw new ControllerUtil.myException('鐗规畩鎺掗槦鏃讹紝璇烽�夋嫨澶囧搧鍒嗙被');
+            }
+            if(bieBeiPinFenLei.contains('鍏ㄩ儴')){
+                throw new ControllerUtil.myException('鐗规畩鎺掗槦鏃讹紝澶囧搧鍒嗙被涓嶈兘閫夋嫨鍏ㄩ儴锛�');
+            }
+            if(String.isEmpty(bieBenBu)){
+                throw new ControllerUtil.myException('鐗规畩鎺掗槦鏃讹紝璇烽�夋嫨鏈儴');
+            }
+            if(bieBenBu.contains('鍏ㄩ儴')){
+                throw new ControllerUtil.myException('鐗规畩鎺掗槦鏃讹紝鏈儴涓嶈兘閫夋嫨鍏ㄩ儴锛�');
+            }
+            if(parentObj.Rental_Apply__r.Demo_purpose1__c == '缁翠慨浠g敤' || parentObj.Rental_Apply__r.Demo_purpose1__c == '鍗忚鍊熺敤'){
+                 throw new ControllerUtil.myException('褰撳墠浣跨敤鐩殑涓嶅厑璁哥壒娈婃帓闃�!');
+            }
+            // 褰撶敵璇蜂汉=FSE銆佷娇鐢ㄧ洰鐨�2=瀛︿細灞曚細鏃讹紝涓嶅彲浠ユ搷浣滅壒娈婃帓闃�
+            if(parentObj.Rental_Apply__r.demo_purpose2__c == '瀛︿細灞曚細' && parentObj.Rental_Apply__r.Owner.Profile.Name.contains('FSE')){
+                 throw new ControllerUtil.myException('鏈嶅姟鍩硅/瀛︿細鐢宠鍗曟棤鐗规畩鎺掗槦!');
+            }
+            if((bieBenBu.contains('MA鏈儴') || bieBenBu.contains('浜у搧鍩硅')) && (bieBenBu.countMatches('鏈儴') > 1 || bieBenBu.contains('澶囧搧涓績'))){
+                throw new ControllerUtil.myException('MA鏈儴/浜у搧鍩硅鏈儴涓嶈兘涓庡叾浠栨湰閮ㄥ悓鏃堕�夋嫨!');
+            }
+            if((bieBeiPinFenLei.contains('浜у搧璇曠敤') && bieBeiPinFenLei.contains('鍗忚鍊熺敤')) 
+                || (bieBeiPinFenLei.contains('鍗忚鍊熺敤') && bieBeiPinFenLei.contains('缁翠慨'))
+                || (bieBeiPinFenLei.contains('浜у搧璇曠敤') && bieBeiPinFenLei.contains('缁翠慨'))){
+                throw new ControllerUtil.myException('缁翠慨绫汇�佽瘯鐢ㄧ被銆佸崗璁�熺敤绫讳笉鑳藉悓鏃堕�夋嫨!');
+            }
+            if(parentObj.Rental_Apply__r.Demo_purpose1__c == '浜у搧璇曠敤' 
+                && (bieBeiPinFenLei.contains('鍗忚鍊熺敤') || bieBeiPinFenLei.contains('缁翠慨'))){
+                throw new ControllerUtil.myException('浜у搧璇曠敤鐨勭敵璇峰崟锛屼笉鍙互閫夋嫨缁翠慨绫汇�佸崗璁�熺敤绫荤殑澶囧搧鍒嗙被');
+            }
+            if((parentObj.Rental_Apply__r.demo_purpose2__c == '璇曠敤锛堟棤璇环锛�' 
+                    || parentObj.Rental_Apply__r.demo_purpose2__c == '璇曠敤锛堟湁璇环锛�'
+                    || parentObj.Rental_Apply__r.demo_purpose2__c == '宸茶喘寰呰揣' 
+                    || parentObj.Rental_Apply__r.demo_purpose2__c == '鏂颁骇鍝佽瘎浠�') 
+                && sonObj.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c == '鏂颁骇鍝�') {
+                throw new ControllerUtil.myException('涓嶈兘鍙備笌鐗规畩鎺掗槦');
+            }
+            startQueue('鐗规畩鎺掗槦');
+            if(allSpecialQueue() && parentObj.Rental_Apply__r.CampaignType__c != null){
+                Rental_Apply__c raObj = new Rental_Apply__c();
+                raObj.Id = parentObj.Rental_Apply__c;
+                raObj.CampaignType__c = null;
+                update raObj;
+            }
+        } catch (Exception e) {
+            System.debug('e.getMessage()***'+ e.getMessage());
+            ApexPages.addMessages(e);
+            Database.rollback(sp);
+            return null;
+        }
+        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM,'鎺掗槦鎴愬姛'));
+        // 鎺掗槦鎴愬姛鍚庯紝鍔犺浇鎺掗槦鐢婚潰
+        queueByAsset = '/apex/QueuePageByAssetId?parentId=' + parentObj.Id + '&isNotShow=' + true;
+
+        // 鎺掗槦鎴愬姛鍚庯紝闇�瑕侀噸鏂拌幏鍙杝onObj鍜宲arentObj
+        List<Rental_Apply_Equipment_Set_Detail__c> raesdObjs = [
+                SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c, Queue_Day__c,
+                       FSD_Fixture_Model_No__c, Fixture_Model_No_text__c, QuenType__c,
+                       Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c, ExternalKey__c,Rental_Apply__c,
+                       Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,
+                       Salesdepartment__c, Product_category_F__c, Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,
+                       Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c,
+                       Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
+                       Salesdepartment_before__c, Equipment_Type_text__c, Product_category_text__c
+                 FROM Rental_Apply_Equipment_Set_Detail__c
+                WHERE Rental_Apply_Equipment_Set__c = :parentId
+                  and Is_Body__c = true
+                  and Cancel_Select__c = false];
+
+        if (!raesdObjs.isEmpty()) {
+            sonObj = raesdObjs[0];
+
+            List<Rental_Apply_Equipment_Set__c> parentObjs = [
+                    SELECT Id, Rental_Apply__r.Name,
+                           Rental_Apply__r.Owner.Name,
+                           Rental_Apply__r.Owner.Profile.Name,
+                           Rental_Apply__r.Salesdept__c,
+                           Rental_Apply__r.WorkPlace__c,
+                           Rental_Apply__r.Request_shipping_day__c,
+                           Fu_Shu_Pin_Fen_Pei_Jia__c,
+                           Rental_Apply__r.Demo_purpose1__c,
+                           Rental_Apply__r.demo_purpose2__c,
+                           Rental_Apply__r.CampaignType__c,
+                           Fixture_Set__r.Product_Category_GI_SP__c,
+                           Fixture_Set__r.Equipment_Type__c,
+                           Rental_Apply__r.Request_return_day__c,
+                           Rental_Apply__r.Salesdepartment__c,
+                           Rental_Apply__r.Equipment_Type_F__c,
+                           Rental_Apply__r.Internal_asset_location_F__c,
+                           Fixture_Set__r.Fixture_Set_Body_Model_No__c,
+                           Rental_Apply__r.Product_category__c,
+                           Rental_Apply__r.Loaner_centre_mail_address__c,
+                           First_RAESD__r.Is_Body__c,
+                           Irreplaceable_flag__c,
+                           Rental_Start_Date__c,
+                           Rental_End_Date__c,
+                           Rental_Apply__c,
+                           Fixture_Set__c,
+                           RequestNoJoinStr2__c
+                    FROM Rental_Apply_Equipment_Set__c
+                    where Id = :parentId];
+            if (!parentObjs.isEmpty()) {
+                parentObj = parentObjs.get(0);
+            }
+        }
+        
+        return null;
+    }
+
+    //榛樿鎺掗槦
+    public PageReference defaultScheduel(){
+        Savepoint sp = Database.setSavepoint();
+        try {
+            // 鍏堝垽鏂綋鍓嶆搷浣滅敤鎴风殑瀛樻斁鍦板拰鐢宠鍗曠殑瀛樻斁鍦版槸鍚︿竴鑷�
+            if (!enableRunCheck()) {
+                throw new ControllerUtil.myException('鏃犳潈闄愭搷浣滃綋鍓嶅崟鎹繘琛屾帓闃燂紒');
+            }
+
+            if(parentObj.Rental_Apply__r.demo_purpose2__c == '瀛︿細灞曚細' 
+                && !(parentObj.Rental_Apply__r.Salesdepartment__c.contains('MA鏈儴') 
+                    || parentObj.Rental_Apply__r.Salesdepartment__c.contains('浜у搧鍩硅')) 
+                && String.isEmpty(campaignType)){
+                throw new ControllerUtil.myException('璇烽�夋嫨瀛︿細绫诲瀷锛�');
+            }
+            if(sonObj.QuenType__c == '榛樿鎺掗槦' 
+                && sonObj.Queue_Number__c > 0 
+                && sonObj.Queue_Day__c != null 
+                && campaignType == parentObj.Rental_Apply__r.CampaignType__c){
+                throw new ControllerUtil.myException('宸插弬涓庨粯璁ゆ帓闃�');
+            }
+            startQueue('榛樿鎺掗槦');
+
+        }
+        catch (Exception e) {
+            System.debug('e.getMessage()***'+ e.getMessage());
+            ApexPages.addMessages(e);
+            Database.rollback(sp);
+            return null;
+        }
+        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM,'鎺掗槦鎴愬姛'));
+        // 鎺掗槦鎴愬姛鍚庯紝鍔犺浇鎺掗槦鐢婚潰
+        queueByAsset = '/apex/QueuePageByAssetId?parentId=' + parentObj.Id + '&isNotShow=' + true;
+        
+        // 鎺掗槦鎴愬姛鍚庯紝闇�瑕侀噸鏂拌幏鍙杝onObj鍜宲arentObj
+        List<Rental_Apply_Equipment_Set_Detail__c> raesdObjs = [
+                SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c, Queue_Day__c,
+                       FSD_Fixture_Model_No__c, Fixture_Model_No_text__c, QuenType__c,
+                       Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c, ExternalKey__c,Rental_Apply__c,
+                       Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,
+                       Salesdepartment__c, Product_category_F__c, Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,
+                       Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c,
+                       Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
+                       Salesdepartment_before__c, Equipment_Type_text__c, Product_category_text__c
+                 FROM Rental_Apply_Equipment_Set_Detail__c
+                WHERE Rental_Apply_Equipment_Set__c = :parentId
+                  and Is_Body__c = true
+                  and Cancel_Select__c = false];
+
+        if (!raesdObjs.isEmpty()) {
+            sonObj = raesdObjs[0];
+
+            List<Rental_Apply_Equipment_Set__c> parentObjs = [
+                    SELECT Id, Rental_Apply__r.Name,
+                           Rental_Apply__r.Owner.Name,
+                           Rental_Apply__r.Owner.Profile.Name,
+                           Rental_Apply__r.Salesdept__c,
+                           Rental_Apply__r.WorkPlace__c,
+                           Rental_Apply__r.Request_shipping_day__c,
+                           Fu_Shu_Pin_Fen_Pei_Jia__c,
+                           Rental_Apply__r.Demo_purpose1__c,
+                           Rental_Apply__r.demo_purpose2__c,
+                           Rental_Apply__r.CampaignType__c,
+                           Fixture_Set__r.Product_Category_GI_SP__c,
+                           Fixture_Set__r.Equipment_Type__c,
+                           Rental_Apply__r.Request_return_day__c,
+                           Rental_Apply__r.Salesdepartment__c,
+                           Rental_Apply__r.Equipment_Type_F__c,
+                           Rental_Apply__r.Internal_asset_location_F__c,
+                           Fixture_Set__r.Fixture_Set_Body_Model_No__c,
+                           Rental_Apply__r.Product_category__c,
+                           Rental_Apply__r.Loaner_centre_mail_address__c,
+                           First_RAESD__r.Is_Body__c,
+                           Irreplaceable_flag__c,
+                           Rental_Start_Date__c,
+                           Rental_End_Date__c,
+                           Rental_Apply__c,
+                           Fixture_Set__c,
+                           RequestNoJoinStr2__c
+                    FROM Rental_Apply_Equipment_Set__c
+                    where Id = :parentId];
+            if (!parentObjs.isEmpty()) {
+                parentObj = parentObjs.get(0);
+            }
+        }
+        
+        return null;
+    }
+
+    // 鍒ゆ柇褰撳墠鎿嶄綔鐢ㄦ埛鐨勫瓨鏀惧湴鍜岀敵璇峰崟鐨勫瓨鏀惧湴鏄惁涓�鑷�
+    public Boolean enableRunCheck() {
+        // 鐢ㄦ埛鍒嗗叕鍙革細鍖椾含锛屼笂娴凤紝骞垮窞
+        User u = [SELECT Id, Branch__c FROM User WHERE Id =:UserInfo.getUserId() Limit 1];
+        // 鐢宠鍗� 鐢宠鑰匛mail
+        if (FixtureUtil.locationMap.get(u.Branch__c + ' 澶囧搧涓績') != parentObj.Rental_Apply__r.Loaner_centre_mail_address__c) {
+            return false;
+        } else {
+            return true;
+        }
+
+        return false;
+    }
+
+    //鎺掗槦No缃《
+    public PageReference topInLine(){
+        Savepoint sp = Database.setSavepoint();
+        try {
+            QueuePageByAssetIdController qpbaController = new QueuePageByAssetIdController();
+            qpbaController.saveQueue(sonObj, 1, true, false);
+        }
+        catch (Exception e) {
+            System.debug('e.getMessage()***'+ e.getMessage()+e.getLineNumber());
+            ApexPages.addMessages(e);
+            Database.rollback(sp);
+            return null;
+        }
+        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM,'鎺掗槦缃《鎴愬姛'));
+        return null;
+    }
+
+    // 濡傛灉榛樿鍒嗛厤鏀逛负鐗规畩鎺掗槦浜嗭紝闇�瑕佺‘璁ょ敵璇峰崟涓墍鏈夌殑涓�瑙堟槸鍚﹂兘娌℃湁榛樿鎺掗槦
+    public Boolean allSpecialQueue(){
+        List<Rental_Apply_Equipment_Set_Detail__c> details = [SELECT Id
+                                                                FROM Rental_Apply_Equipment_Set_Detail__c
+                                                                WHERE Rental_Apply__c =: parentObj.Rental_Apply__c
+                                                                  AND Cancel_Select__c = false
+                                                                  AND Is_Body__c = true
+                                                                  AND QuenType__c = '榛樿鎺掗槦'];
+        if (details != null && details.size() > 0) {
+            return false;
+        }
+        return true;
+    }
+
+    public void startQueue(String queuetype){
+        System.debug(LoggingLevel.INFO, '*** queuetype: ' + queuetype);
+
+        // 鏌ヨ鎺掗槦闇�瑕佸鐞嗙殑鏁版嵁
+        List<Rental_Apply_Equipment_Set_Detail__c> raesdObjs = [
+                SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
+                       FSD_Fixture_Model_No__c, Fixture_Model_No_text__c,Rental_Apply__r.demo_purpose2__c,Queue_Day__c,ExternalKey__c,
+                       Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,Allow_Adjust_Queue_Flag__c,
+                       Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,Fixture_Model_No__c,Rental_Apply__c,
+                       Internal_asset_location_before__c,Salesdepartment__c, Product_category_F__c, Product_category_text__c,Equipment_Type_text__c,
+                       Salesdepartment_before__c,Rental_Apply__r.Request_shipping_day__c,QuenType__c,IsAdjust__c,Rental_Apply__r.Request_approval_time__c,
+                       Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c,
+                       Queue_Time_F__c, IndexFromUniqueKey__c 
+                FROM Rental_Apply_Equipment_Set_Detail__c
+                WHERE Rental_Apply_Equipment_Set__c =:parentObj.Id
+                AND Cancel_Select__c = false
+                AND Is_Body__c = true
+                FOR Update];
+
+        if(queuetype == '榛樿鎺掗槦'){
+            if(changeCampaignType){
+                List<Rental_Apply_Equipment_Set_Detail__c> oldQueenList = [
+                        SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
+                               FSD_Fixture_Model_No__c, Fixture_Model_No_text__c,Rental_Apply__r.demo_purpose2__c,Queue_Day__c,ExternalKey__c,
+                               Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,Allow_Adjust_Queue_Flag__c,
+                               Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,Fixture_Model_No__c,Rental_Apply__c,
+                               Internal_asset_location_before__c,Salesdepartment__c, Product_category_F__c, Product_category_text__c,Equipment_Type_text__c,
+                               Salesdepartment_before__c,Rental_Apply__r.Request_shipping_day__c,QuenType__c,IsAdjust__c,Rental_Apply__r.Request_approval_time__c,
+                               Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c,
+                               Queue_Time_F__c, IndexFromUniqueKey__c 
+                        FROM Rental_Apply_Equipment_Set_Detail__c
+                        WHERE Rental_Apply__c =: parentObj.Rental_Apply__c
+                        AND Id !=: sonObj.Id 
+                        AND QuenType__c = '榛樿鎺掗槦' 
+                        AND Queue_Number__c > 0
+                        AND Cancel_Select__c = false
+                        AND Is_Body__c = true 
+                        FOR Update];
+
+                raesdObjs.addAll(oldQueenList);
+            }
+
+            // 瀛︿細绫诲瀷鍙戠敓鍙樺寲鏃讹紝鏇存柊鐢宠鍗�
+            if (campaignType != parentObj.Rental_Apply__r.CampaignType__c) {
+                Rental_Apply__c raObj = new Rental_Apply__c();
+                raObj.Id = parentObj.Rental_Apply__c;
+                raObj.CampaignType__c = campaignType;
+                update raObj;
+            }
+        }
+
+        List<String> modelList = new List<String>();
+        List<String> departmentsList = new List<String>();
+        List<String> departmentList = new List<String>();
+        List<String> locationList = new List<String>();
+        List<String> categoryList = new List<String>();
+        List<String> equipmentList = new List<String>();
+        List<String> equipmentsList = new List<String>();
+        List<String> locationsetList = new List<String>();
+        List<String> sequencekeylist = new List<String>();
+        List<String> detailIds = new List<String>();
+        List<String> queuekeyList = new List<String>();
+        List<Rental_Apply_Sequence__c> allsequenceList = new List<Rental_Apply_Sequence__c>();
+        Map<String,List<Rental_Apply_Equipment_Set_Detail__c>> detailMap = new Map<String,List<Rental_Apply_Equipment_Set_Detail__c>>();
+        List<String> queueIds = new List<String>();
+        List<Rental_Apply_Equipment_Set_Detail__c> updateList = new List<Rental_Apply_Equipment_Set_Detail__c>();
+        List<String> changeddetailIds = new List<String>();
+
+        for (Rental_Apply_Equipment_Set_Detail__c raesd : raesdObjs) {
+            String oldKey = raesd.ExternalKey__c;
+            // 鏀瑰彉瀛︿細绫诲瀷锛屼細鏀瑰彉鏈敵璇峰崟涓凡榛樿鎺掗槦鐨勫叾浣欎竴瑙堬紝鎵�浠ユ牎楠屾斁鍦ㄦ澶�
+            String modelType = raesd.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c;
+            if(modelType == null && queuetype == '榛樿鎺掗槦' 
+                && (parentObj.Rental_Apply__r.demo_purpose2__c == '璇曠敤锛堟棤璇环锛�' 
+                    || parentObj.Rental_Apply__r.demo_purpose2__c == '璇曠敤锛堟湁璇环锛�'
+                    || parentObj.Rental_Apply__r.demo_purpose2__c == '宸茶喘寰呰揣' 
+                    || parentObj.Rental_Apply__r.demo_purpose2__c == '鏂颁骇鍝佽瘎浠�' 
+                    || (parentObj.Rental_Apply__r.demo_purpose2__c == '瀛︿細灞曚細' && campaignType == '钀ヤ笟鏈儴瀛︿細'))){
+                throw new ControllerUtil.myException('澶囧搧浜у搧绫诲瀷涓虹┖锛�');
+            }
+
+            RentalFixtureSetAssignController.KeyObj obj = null;
+            if(queuetype == '榛樿鎺掗槦'){
+                RentalFixtureSetAssignController.ApplyObj applyObj = new RentalFixtureSetAssignController.ApplyObj();
+                applyObj.location = parentObj.Rental_Apply__r.Internal_asset_location_F__c;
+                applyObj.productType = parentObj.Rental_Apply__r.Product_category__c;
+                applyObj.salesdepartment = parentObj.Rental_Apply__r.Salesdepartment__c ;
+                applyObj.purpose1 = parentObj.Rental_Apply__r.Demo_purpose1__c;
+                applyObj.purpose2 = parentObj.Rental_Apply__r.demo_purpose2__c;
+                applyObj.campaignType = campaignType;
+                obj = RentalFixtureSetAssignController.getdefultInfo(raesd,applyObj,bieCunFangDi);
+                // 鎺掗槦鍚庯紝榛樿鎺掗槦鍊奸渶瑕佸湪鐢婚潰绔樉绀�  鏈儴
+                bieBenBu = obj.salesdepartments;
+                // 鎺掗槦鍚庯紝榛樿鎺掗槦鍊奸渶瑕佸湪鐢婚潰绔樉绀�  澶囧搧鍒嗙被
+                bieBeiPinFenLei = obj.equipmenttypes;
+                // 澶囧搧瀛樻斁鍦板拰浜у搧鍒嗙被榛樿鏄敵璇峰崟涓婄殑鏁版嵁锛屼笉鐢ㄧ壒鎰忚缃�
+            }else{
+                RentalFixtureSetAssignController.KeyObj keyObj = new RentalFixtureSetAssignController.KeyObj();
+                keyObj.model = raesd.Fixture_Model_No__c;
+                keyObj.location = parentObj.Rental_Apply__r.Internal_asset_location_F__c;
+                keyObj.productType = String.isBlank(bieChanPinFenLei)?'GI,SP':bieChanPinFenLei;
+                System.debug('bieBeiPinFenLei===========================' + bieBeiPinFenLei);
+                keyObj.equipmenttypes = bieBeiPinFenLei;
+                keyObj.salesdepartments = bieBenBu;
+                RentalFixtureSetAssignController.getsequencekeyList(keyObj);
+                obj = keyObj;
+                System.debug('obj.equipmenttypes===========================' + obj.equipmenttypes);
+                System.debug('obj.sequencekeyList===========================' + obj.sequencekeyList);
+            }
+            queueIds.add(raesd.Id);
+            // keyObjMap.put(raesd.Id,obj);
+            modelList.add(obj.model);
+            departmentsList.addAll(obj.salesdepartmentList);
+            locationList.add(obj.location);
+            equipmentsList.addAll(obj.equipmentList);
+            categoryList.addAll(obj.productTypes);
+            sequencekeylist.addAll(obj.sequencekeylist);
+            String key = obj.model + obj.location + obj.salesdepartments + obj.equipmenttypes + obj.productType;
+            if(key == oldKey){
+                changeddetailIds.add(raesd.Id);
+            }
+            
+            // 澶囧搧閰嶅鏄庣粏鍨嬪彿(鍊熷嚭鏃�)
+            raesd.Fixture_Model_No_text__c = obj.model;
+            // 鎵�鍦ㄥ湴鍖�(鏈儴) 鍊熷嚭鏃�
+            raesd.Salesdepartment_before__c = obj.salesdepartments;
+            
+            // 浜у搧鍒嗙被(GI/SP)(鍊熷嚭鏃�)
+            raesd.Product_category_text__c = obj.productType;
+            // 澶囧搧鍒嗙被(鍊熷嚭鏃�)
+            raesd.Equipment_Type_text__c = obj.equipmenttypes;
+            // 澶囧搧瀛樻斁鍦�(鍊熷嚭鏃�)
+            raesd.Internal_asset_location_before__c = obj.location;
+            raesd.ExternalKey__c = key;
+            raesd.QuenType__c = queuetype;
+
+            raesd.Queue_User__c   = UserInfo.getUserId();
+            raesd.Queue_Day__c    = Date.today();
+            raesd.Queue_Time__c   = getCurrentTime();
+            raesd.Select_Time__c  = null;
+            raesd.Asset__c        = null;
+            // 宸插嚭搴撴寚绀虹殑鎺掗槦鍚庢竻闄ゅ嚭搴撴寚绀轰俊鎭�
+            raesd.Shipment_request_time2__c = null;
+            raesd.Shipment_request__c = false;
+            raesd.Queue_Number__c = -1;
+            raesd.IsAdjust__c     = false;
+
+            // OLY_OCM-243 杩藉姞瀛楁瀵瑰簲 澶囧搧绠$悊缂栫爜(鍊熷嚭鏃�) 鎺掗槦鏃舵竻闄や笌asset鐩歌繛鐨勫�熷嚭鏃剁浉鍏崇殑瀛楁
+            raesd.EquipmentSet_Managment_Code_text__c = null;
+            // 鏈鸿韩缂栧彿锛堝�熷嚭鏃讹級
+            raesd.SerialNumber_text__c = null;
+            // 澶囧搧鎴愭湰(鍊熷嚭鏃�)
+            raesd.Asset_cost_del_before__c = null;
+            detailIds.add(raesd.Id);
+            updateList.add(raesd);
+            // KeyObj obj = keyObjMap.get(raesd.Id);
+            System.debug(LoggingLevel.INFO, '*** KeyObj obj: ' + obj);
+            for(String sales:obj.salesdepartmentList){
+            
+                for(String equip:obj.equipmentList){
+                    for(String type:obj.productTypes){
+                        Rental_Apply_Sequence__c newSequence = new Rental_Apply_Sequence__c();
+                        newSequence.ExternalKey__c = obj.model + obj.location + sales + equip + type;
+                        newSequence.Demo_Purpose2__c = raesd.Rental_Apply__r.demo_purpose2__c;
+                        newSequence.Apply_Set_Detail__c = raesd.Id;
+                        newSequence.Series_No__c = raesd.Queue_Number__c;
+                        newSequence.Salesdepartment__c = sales;
+                        newSequence.Product_category__c = type;
+                        newSequence.Rental_Apply__c = raesd.Rental_Apply__c;
+                        newSequence.Internal_asset_location__c = obj.location;
+                        newSequence.Fixture_Model_No__c = obj.model;
+                        newSequence.Equipment_Type__c = equip;
+                        
+                        allsequenceList.add(newSequence);
+                    }
+                }
+            }
+           
+            queuekeyList.add(key);
+            departmentList.addAll(RentalFixtureSetAssignController.transferStringToList(obj.salesdepartments));
+            equipmentList.addAll(RentalFixtureSetAssignController.transferStringToList(obj.equipmenttypes));
+        }
+        System.debug(LoggingLevel.INFO, '**1111* updateList: ' + updateList);
+        System.debug(LoggingLevel.INFO, '*** queueIds: ' + queueIds);
+        System.debug(LoggingLevel.INFO, '*** modelList: ' + modelList);
+        System.debug(LoggingLevel.INFO, '*** departmentsList: ' + departmentsList);
+        System.debug(LoggingLevel.INFO, '*** locationList: ' + locationList);
+        System.debug(LoggingLevel.INFO, '*** categoryList: ' + categoryList);
+        System.debug(LoggingLevel.INFO, '*** equipmentList: ' + equipmentList);
+        String soqlStr = 'Select Id, Last_Reserve_RAES_Detail__c, Fixture_Model_No_F__c, You_Xiao_Ku_Cun__c,'
+                    + ' Salesdepartment__c, SalesProvince__c, Product_category__c, Equipment_Type__c, Internal_asset_location__c'
+                     + ' From Asset '
+                    + ' Where Asset_Owner__c = \'Olympus\''
+                    + ' and Asset_loaner_category__c != \'鑰楁潗\''
+                    + ' and RecordTypeId = \'01210000000kOPR\''
+                    + ' and Delete_Flag__c = False'
+                    + ' and Freeze_sign_Abandoned_Flag__c = False'
+                    + ' and Product2.Fixture_Model_No_T__c IN:modelList'
+                    + ' and Salesdepartment__c IN: departmentsList'
+                    + ' and Internal_asset_location__c IN: locationList'
+                    + ' and Product_category__c IN:categoryList'
+                    + ' and Equipment_Type__c IN: equipmentList'
+                    + ' and ' + FixtureUtil.getAssetSoqlBase()
+                    + ' order by Id';
+        // 妫�绱㈢鍚堣繖鍥涗釜鍒瓧娈靛拰鍚屼竴浜у搧鍨嬪彿鐨勬暟鎹瓨鍦ㄤ笌鍚�
+        System.debug(LoggingLevel.INFO, '*** soqlStr: ' + soqlStr);
+        List<Asset> aSetCheck = Database.query(soqlStr);
+
+        for (Asset ass : aSetCheck) {
+            String key = ass.Fixture_Model_No_F__c + ass.Internal_asset_location__c + ass.Salesdepartment__c + ass.Equipment_Type__c + ass.Product_category__c;
+            System.debug(LoggingLevel.INFO, '*** key: ' + key);
+
+            if (ass.Last_Reserve_RAES_Detail__c == null && ass.You_Xiao_Ku_Cun__c > 0) {
+                throw new ControllerUtil.myException(ass.Fixture_Model_No_F__c +' 鏈夊彲浠ュ垎閰嶄富浣撲笉闇�瑕佹帓闃�');
+            }
+        }
+        System.debug(LoggingLevel.INFO, '*** queuekeyList: ' + queuekeyList);
+
+        Map<String,List<Rental_Apply_Equipment_Set_Detail__c>> queueMap = new Map<String,List<Rental_Apply_Equipment_Set_Detail__c>>();
+        List<Rental_Apply_Equipment_Set_Detail__c> queueList = [SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
+                                                                   FSD_Fixture_Model_No__c, Fixture_Model_No_text__c,Externalkey__c,Rental_Apply__r.demo_purpose2__c,Equipment_Type_text__c,
+                                                                   Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,Fixture_Model_No__c,
+                                                                   Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,IsAdjust__c,Queue_Day__c,Queue_Time__c,
+                                                                   Salesdepartment__c, Product_category_F__c, Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,
+                                                                   Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c ,Rental_Apply__r.Request_shipping_day__c,Rental_Apply__r.Request_approval_time__c,
+                                                                   Queue_Time_F__c,IndexFromUniqueKey__c
+                                                            FROM Rental_Apply_Equipment_Set_Detail__c
+                                                            WHERE Externalkey__c IN :queuekeyList
+                                                            AND Cancel_Select__c = false
+                                                            AND Is_Body__c = true
+                                                            AND Id NOT IN:queueIds
+                                                            AND Queue_Number__c > 0
+                                                            FOR Update];
+
+        updateList.addAll(queueList);
+        System.debug(LoggingLevel.INFO, '***old updateList: ' + updateList.size());
+        updateList = Batch_QueueAllDetail.getSortDetailList(updateList);
+        System.debug(LoggingLevel.INFO, '*** updateList: ' + updateList.size());
+        update updateList;
+
+        System.debug(LoggingLevel.INFO, '*** allsequenceList: ' + allsequenceList.size());
+        List<Rental_Apply_Sequence__c> oldSequenceList = [SELECT Id,ExternalKey__c,Fixture_Model_No__c FROM Rental_Apply_Sequence__c
+                                                        WHERE Apply_Set_Detail__c IN:detailIds];
+        System.debug(LoggingLevel.INFO, '*** oldSequenceList.size(): ' + oldSequenceList.size());
+        Set<String> keys = new Set<String>();
+        for(Rental_Apply_Sequence__c se:oldSequenceList){
+            keys.add(se.ExternalKey__c);
+        }
+        Integer count = [SELECT count() FROM Rental_Apply_Sequence__c WHERE ExternalKey__c IN:keys];
+        if(updateList.size() + count + oldSequenceList.size() > 9900){
+            throw new ControllerUtil.myException('褰撳墠鎺掗槦鏁版嵁閲忚繃澶э紝璇风◢鍚庢搷浣�');
+        }
+        List<Rental_Apply_Sequence__c> olddleteSequenceList = [SELECT Id,ExternalKey__c,Fixture_Model_No__c FROM Rental_Apply_Sequence__c
+                                                        WHERE Apply_Set_Detail__c IN:changeddetailIds];
+
+        delete olddleteSequenceList;
+        if(updateList.size() + count + oldSequenceList.size() + allsequenceList.size() > 9900){
+            throw new ControllerUtil.myException('褰撳墠鎺掗槦鏁版嵁閲忚繃澶э紝璇风◢鍚庢搷浣�');
+        }
+        insert allsequenceList;
+        List<String> newSequenceIds = new List<String>();
+        for(Rental_Apply_Sequence__c se:allsequenceList){
+            newSequenceIds.add(se.Id);
+        }
+        allsequenceList = [SELECT Id,ExternalKey__c,Demo_Purpose2__c,Rental_Apply__r.Request_shipping_day__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,
+                                    Apply_Set_Detail__c,Apply_Set_Detail_ExternalKey__c,Rental_Apply__r.Request_approval_time__c,Apply_Set_Detail__r.IsAdjust__c,
+                                    Series_No__c,Salesdepartment__c,Product_category__c,Apply_Set_Detail__r.Queue_Day__c,Apply_Set_Detail__r.Queue_Time__c,
+                                    Rental_Apply__c,Internal_asset_location__c,Series_Unequal_Queue_Flag__c,
+                                    Apply_Set_Detail__r.Queue_Number__c,
+                                    Fixture_Model_No__c,Equipment_Type__c,
+                                    Apply_Set_Detail__r.Queue_Time_F__c, 
+                                    Apply_Set_Detail__r.IndexFromUniqueKey__c
+                            FROM Rental_Apply_Sequence__c
+                            WHERE Id IN:newSequenceIds];
+
+        List<String> nodusequencekeylist = new List<String>(new Set<String>(sequencekeylist));
+        System.debug(LoggingLevel.INFO, '*** nodusequencekeylist: ' + JSON.serialize(nodusequencekeylist));
+        
+        System.debug(LoggingLevel.INFO, '*** nodusequencekeylist.size(): ' + nodusequencekeylist.size());
+        if(nodusequencekeylist.size() > 950){
+            throw new ControllerUtil.myException('褰撳墠鎺掗槦鏁版嵁閲忚繃澶э紝璇烽�夋嫨鍗曚釜涓讳綋鎿嶄綔');
+        }
+        List<Rental_Apply_Sequence__c> updateSequenceList = new List<Rental_Apply_Sequence__c>();
+        List<Rental_Apply_Sequence__c> newSequenceList = new List<Rental_Apply_Sequence__c>();
+        List<Rental_Apply_Sequence__c> applysequenceList = [SELECT Id,ExternalKey__c,Demo_Purpose2__c,Rental_Apply__r.Request_shipping_day__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,
+                                                                Apply_Set_Detail__c,Apply_Set_Detail_ExternalKey__c,Rental_Apply__r.Request_approval_time__c,Apply_Set_Detail__r.IsAdjust__c,
+                                                                Series_No__c,Salesdepartment__c,Product_category__c,Apply_Set_Detail__r.Queue_Day__c,Apply_Set_Detail__r.Queue_Time__c,
+                                                                Rental_Apply__c,Internal_asset_location__c,Series_Unequal_Queue_Flag__c,
+                                                                Apply_Set_Detail__r.Queue_Number__c,
+                                                                Fixture_Model_No__c,Equipment_Type__c,
+                                                                Apply_Set_Detail__r.Queue_Time_F__c, 
+                                                                Apply_Set_Detail__r.IndexFromUniqueKey__c
+                                                        FROM Rental_Apply_Sequence__c
+                                                        WHERE ExternalKey__c IN: nodusequencekeylist
+                                                        AND Series_No__c > 0
+                                                        AND Invalid_Flag__c = false
+                                                        FOR Update];
+        // System.debug(LoggingLevel.INFO, '*** JSON.serialize(applysequenceList): ' + JSON.serialize(applysequenceList));
+        newSequenceList.addAll(applysequenceList);
+        newSequenceList.addAll(allsequenceList);
+        System.debug(LoggingLevel.INFO, '*** newSequenceList.size(): ' + newSequenceList.size());
+        newSequenceList = Batch_QueueAllDetail.getSortSequenceList(newSequenceList);
+        if(updateList.size() + count + oldSequenceList.size() + allsequenceList.size() + newSequenceList.size() > 9900){
+            throw new ControllerUtil.myException('褰撳墠鎺掗槦鏁版嵁閲忚繃澶э紝璇烽�夋嫨鍗曚釜涓讳綋鎿嶄綔');
+        }
+        System.debug(LoggingLevel.INFO, '*** newSequenceList: ' + newSequenceList);
+        upsert newSequenceList;
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/components/RelationListPagingCmp.component b/force-app/main/default/components/RelationListPagingCmp.component
index fe2b49f..49b6327 100644
--- a/force-app/main/default/components/RelationListPagingCmp.component
+++ b/force-app/main/default/components/RelationListPagingCmp.component
@@ -379,24 +379,19 @@
         sbwidth = scrollbarWidth();
         i++;
         tableWidth = j$('body .pbBody table#tableHeader').width();
-        // var widthTemp = 0;
-        j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
-            var colClass = getColClassName(this);
-            if (colClass != 'col_Scroll') {
-                var temp = j$('body .pbBody table.list tr.headerRow td.' + colClass).width();
-                listColClassWidthMap[colClass] = temp;
-                //widthTemp += temp;
-            }
-        });
-        var blockWidthNew = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width()-sbwidth;
-        // console.log(widthTemp+'~'+blockWidthNew+'~'+tableWidth);
+        // var blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width()-sbwidth;
+        var blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width() - widthAjustment - sbwidth - 20;
         var tableHeader_L =  j$(escapeVfId('tableHeader_L')).width();
+        console.log('~'+tableHeader_L);
         j$('div#in_Div_L').css('width', tableHeader_L+ 'px'); 
         j$('table#tableData_L').css('width', tableHeader_L + 'px');
-        // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
-        if(tableWidth > blockWidthNew){
-            j$('div#in_Div').css('width', blockWidthNew + 'px'); // 20230519 ljh 
-            j$('div#out_Div').css('width', blockWidthNew + 'px'); // 20230519 ljh
+        console.log('tableWidth:'+tableWidth+'blockWidth:'+blockWidth);
+        if(tableWidth > blockWidth){
+            console.log('111');
+            j$('div#in_Div').css('width', blockWidth+ 'px'); // 20230519 ljh +20
+            j$('div#out_Div').css('width', blockWidth + 'px'); // 20230519 ljh 
+            j$('table#tableHeader').css('width', tableWidth + 'px'); // 20230725 ljh
+            j$('table#tableData').css('width', tableWidth + 'px'); // 20230725 ljh 
         }
         j$('div#in_Div').scroll(function() {
             j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
@@ -407,6 +402,15 @@
         });
         j$('div#in_Div_L').scroll(function() {
             j$('div#in_Div').scrollTop(j$(this).scrollTop());
+        });
+
+        j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
+            var colClass = getColClassName(this);
+            if (colClass != 'col_Scroll') {
+                var temp = j$('body .pbBody table.list tr.headerRow td.' + colClass).width();
+                console.log('colClass'+temp);
+                listColClassWidthMap[colClass] = temp;
+            }
         });
        
     }
@@ -480,4 +484,4 @@
 </script>
         </apex:outputPanel>
     <!-- </apex:form> -->
-</apex:component>
+</apex:component>
\ No newline at end of file
diff --git a/force-app/main/default/components/RelationListPagingCmp.component.bak b/force-app/main/default/components/RelationListPagingCmp.component.bak
new file mode 100644
index 0000000..fe2b49f
--- /dev/null
+++ b/force-app/main/default/components/RelationListPagingCmp.component.bak
@@ -0,0 +1,483 @@
+<apex:component controller="CreateRelationListPagingCmpCtrl" allowDML="true" id="cmpinnerid" >
+
+    <!-- <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> -->
+    <apex:stylesheet value="{!URLFOR($Resource.RelationListPagingCmpCss)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
+
+    <style>
+        /*URLFOR($Resource 銇伄銇elationListPagingCmpCss銇叆銈屻伨銇涖倱*/
+        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>
+
+    <apex:attribute name="pgController"
+        type="CreateRelationListPagingCtrlBase"
+        assignTo="{!pageController}"
+        required="true"
+        description="The controller for the page." />
+    <apex:attribute name="hasCheckbox"
+        type="Boolean"
+        assignTo="{!hasChkBox}"
+        required="true"
+        description="Set If List Row able to be checked." />
+    <apex:attribute name="noSort"
+        type="Boolean"
+        assignTo="{!noSortHeader}"
+        required="false"
+        default="true"
+        description="Set If Dont need Sort" />
+    <apex:attribute name="isRadio"
+        type="Boolean"
+        assignTo="{!isRadioBox}"
+        required="false"
+        description="Set if need selectRadio not inputCheckbox" />
+    <apex:attribute name="bottomSpace"
+        type="Integer"
+        assignTo="{!bottomSp}"
+        required="false"
+        description="Set if need more bottomSpace" />
+    <apex:attribute name="tabStyle"
+        type="String"
+        assignTo="{!tabS}"
+        required="false"
+        description="Set if need Set dataBlock's tabStyle" />
+    <apex:attribute name="userCPaging"
+        type="Boolean"
+        assignTo="{!userCustomPaging}"
+        required="false"
+        default="false"
+        description="Set if need Set Use CustomPaging" />
+
+    <!-- <apex:form id="allForm"> -->
+        <apex:actionFunction action="{!init}" name="init" rerender="allPanel, message, checEventFrame, canGoPage" oncomplete="unblockUI();windowResize();runSFDCAddRemote({!MetadataConnectionWarning});"/>
+        <apex:actionFunction action="{!searchPrevious}" name="searchPrevious" rerender="allPanel, message, checEventFrame" status="statusPreload"  oncomplete="unblockUI();windowResize();"/>
+        <apex:actionFunction action="{!searchNext}" name="searchNext" rerender="allPanel, message, checEventFrame" status="statusPreload"  oncomplete="unblockUI();windowResize();"/>
+        <apex:actionFunction action="{!searchGoPage}" name="searchGoPage" rerender="allPanel, message, checEventFrame" status="statusPreload"  oncomplete="unblockUI();windowResize();"/>
+        <!-- ToDo銈ㄣ儵銉艰〃绀虹⒑瑾峬essage -->
+        <apex:actionFunction name="sortTablefunc" action="{!sortTable}" rerender="allPanel, message, checEventFrame" status="statusPreload" onComplete="unblockUI();windowResize();">
+            <apex:param name="sortKey" value="" />
+        </apex:actionFunction>
+
+        <apex:outputPanel id="allPanel">
+            <apex:pageBlock id="dataBlock" tabStyle="{!IF(tabS<>null,tabS,'Report')}">
+                <apex:outputPanel >
+                    <!-- 绶忎欢鏁� -->
+                    <apex:inputHidden id="recordAllCount" value="{!recordAllCount}"/> <!-- recordAllCount鐢婚潰涓娿仹瑷畾銇椼伨銇欙紵銇椼仾銇戙倢銇癷nputHidden銈掍娇銈忋仾銇勩仹銇忋仩銇曘亜 -->
+                    <apex:inputHidden id="currentPageRecordCnt" value="{!currentPageRecordCnt}"/>
+                    <!-- 宸︺��銉樸儍銉� -->
+                    <div id="out_Div_L">
+                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed" border="" id="tableHeader_L">
+                            <!-- 20230511 ljh lightning start -->
+                            <!-- <tr class="dataRow" height="1px">
+<apex:outputPanel layout="none" rendered="{!hasChkBox}">
+                                <td class="col_chk"></td>
+</apex:outputPanel>
+<apex:outputPanel layout="none" rendered="{!Not(hasChkBox)}">
+                                
+                                <td class="col_noChk"></td>                                
+</apex:outputPanel>
+<apex:variable value="{!0}" var="cnt" />
+<apex:repeat value="{!titleLeft}" var="t">
+                                <td class="col_{!columnLeftCss[cnt]}"></td>
+    <apex:variable value="{!cnt + 1}" var="cnt" />
+</apex:repeat>
+                            <tr> -->
+                            <!-- 20230511 ljh lightning end -->
+                            <tr class="headerRow" height="30px">
+<apex:outputPanel layout="none" rendered="{!hasChkBox}">
+    <apex:outputPanel layout="none" rendered="{!Not(isRadioBox)}">
+                                <!-- 20230511 ljh lightning start -->
+                                <!-- <td style="width:20px" class="col_chk" align="center"> -->
+                                <td style="width:32px" class="col_chk" align="center">
+                                <!-- 20230511 ljh lightning end -->
+                                    <input type='checkbox' onClick='checkAll()' id='checker'/>
+                                </td>
+    </apex:outputPanel>
+</apex:outputPanel>
+
+<apex:outputPanel layout="none" rendered="{!isRadioBox}">
+                            <!-- 20230511 ljh lightning start -->
+                             <!-- <td class="col_chk"></td> -->
+                             <td style="width:32px;" class="col_chk"></td>
+                             <!-- 20230511 ljh lightning start -->
+</apex:outputPanel>
+
+<apex:outputPanel layout="none" rendered="{!Not(hasChkBox)}">
+                                <!-- 20230511 ljh lightning start-->
+                                <!-- <td class="col_noChk"></td> -->
+                                <td class="col_noChk" style="display:none"></td>
+                                <!-- 20230511 ljh lightning end-->
+</apex:outputPanel>
+<apex:variable value="{!0}" var="cnt" />
+<apex:repeat value="{!titleLeft}" var="t">
+                                <td class="col_{!columnLeftCss[cnt]}">
+                                    <apex:outputPanel layout="none" rendered="{!Not(noSortHeader)}">
+                                      <a href="#" name="out_Div_a" onclick="sortTableJs('{!cnt}');return false;" style="text-decoration: underline;">
+                                        <!-- 20220107 ljh update start -->
+                                        <!-- <apex:outputText value="{!SUBSTITUTE(t,'(Sys)','')}"/> -->
+                                        <apex:outputText value="{!IF(t=='鎵瑰噯鏃堕棿(鐢宠鎻愪氦鏃堕棿)', '鎵瑰噯鏃堕棿', IF(t=='鎺掗槦鏃堕棿F', '鎺掗槦鏃堕棿', SUBSTITUTE(t,'(Sys)','')))}"/>
+                                        <!-- 20220107 ljh update end -->
+                                    </a>{!sortOrder[cnt]}
+                                    </apex:outputPanel>
+                                    <apex:outputPanel layout="none" rendered="{!noSortHeader}">
+                                    <!-- 20220107 ljh update start -->
+                                      <!-- <apex:outputText value="{!SUBSTITUTE(t,'(Sys)','')}"/> -->
+                                      <apex:outputText value="{!IF(t=='鎵瑰噯鏃堕棿(鐢宠鎻愪氦鏃堕棿)', '鎵瑰噯鏃堕棿', IF(t=='鎺掗槦鏃堕棿F', '鎺掗槦鏃堕棿', SUBSTITUTE(t,'(Sys)','')))}"/>
+                                      <!-- 20220107 ljh update end -->
+                                    </apex:outputPanel>
+                                </td>
+    <apex:variable value="{!cnt + 1}" var="cnt" />
+</apex:repeat>
+                            </tr>
+                        </table>
+                    </div>
+                    <!-- 鍙炽��銉樸儍銉� -->
+                    <div id="out_Div">
+                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed;" border="" id="tableHeader">
+                            <!-- 20230512 ljh lightning start-->
+                            <!-- <tr class="dataRow" height="1px">
+                            <apex:variable value="{!0}" var="cnt" />
+                            <apex:repeat value="{!titleRight}" var="t">
+                                <td class="col_{!columnRightCss[cnt]}"></td>
+                                <apex:variable value="{!cnt + 1}" var="cnt" />
+                            </apex:repeat>
+                            <td class="col_Scroll"></td> 
+                            </tr>-->
+                            <!-- 20230512 ljh lightning end-->
+                            <tr class="headerRow" height="30px">
+                            <apex:variable value="{!0}" var="cnt" />
+                            <apex:repeat value="{!titleRight}" var="t">
+                                <!-- 20230511 ljh lightning start -->
+                                <!-- <td class="col_{!columnRightCss[cnt]} "> -->
+                                <td class="col_{!columnRightCss[cnt]} colViewing" onclick ="ToggleWidth(this);return false;">
+                                <!-- 20230511 ljh lightning end -->
+                                    <apex:outputPanel layout="none" rendered="{!Not(noSortHeader)}">
+                                      <a href="#" name="out_Div_a" onclick="sortTableJs('{!cnt + titleLeft.size}');return false;" style="text-decoration: underline;">
+                                        <!-- 20220107 ljh update start -->
+                                        <!-- <apex:outputText value="{!SUBSTITUTE(t,'(Sys)','')}"/> -->
+                                        <apex:outputText value="{!IF(t=='鎵瑰噯鏃堕棿(鐢宠鎻愪氦鏃堕棿)', '鎵瑰噯鏃堕棿', IF(t=='鎺掗槦鏃堕棿F', '鎺掗槦鏃堕棿', SUBSTITUTE(t,'(Sys)','')))}"/>
+                                        <!-- 20220107 ljh update end -->
+                                    </a>{!sortOrder[cnt + titleLeft.size]}
+                                    </apex:outputPanel>
+                                    <apex:outputPanel layout="none" rendered="{!noSortHeader}">
+                                    <!-- 20220107 ljh update start -->
+                                      <!-- <apex:outputText value="{!SUBSTITUTE(t,'(Sys)','')}"/> -->
+                                      <apex:outputText value="{!IF(t=='鎵瑰噯鏃堕棿(鐢宠鎻愪氦鏃堕棿)', '鎵瑰噯鏃堕棿', IF(t=='鎺掗槦鏃堕棿F', '鎺掗槦鏃堕棿', SUBSTITUTE(t,'(Sys)','')))}"/>
+                                    <!-- 20220107 ljh update end -->
+                                    </apex:outputPanel>
+                                </td>
+                                <apex:variable value="{!cnt + 1}" var="cnt" />
+                            </apex:repeat>
+                            <td class="col_Scroll"></td>
+                            </tr>
+                        </table>
+                    </div>    <!-- out_Div -->
+                    <div style="clear:both;height:0px;"></div>
+                    <!--銆�宸� 銉囥兗銈裤儶銈广儓 -->
+                    <div id="in_Div_L">
+                        <!-- 20230512 ljh lightning add table-layout:fixed" -->
+                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed;" border="" id="tableData_L">
+<apex:variable value="{!1}" var="cnt" />
+<apex:repeat value="{!pageController.viewList}" var="or" id="oppTable_L">
+                            <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
+
+    <apex:outputPanel layout="none" rendered="{!hasChkBox}">
+                                <!-- 20230512 ljh lightning add style="width:32px;" -->
+                                <td class="dataCellBorder1" style="width:32px;height:38px;" align="center">
+        <apex:outputPanel layout="none" rendered="{!Not(isRadioBox)}">
+                                  <apex:inputCheckbox value="{!or.check}" id="rowCheck" styleClass="rowchkcls" disabled="{!!or.canEdit}" onchange="setChangeFlg('{!or.lineNo}')"/>
+        </apex:outputPanel>
+        <apex:outputPanel layout="none" rendered="{!isRadioBox}">
+                                  <apex:inputCheckbox value="{!or.check}" id="rowRadioCheck" styleClass="rowchkcls" disabled="{!!or.canEdit}" onchange="setRadioChangeFlg(this, '{!or.lineNo}', '{!isNeedCheckEvent}')"/>
+        </apex:outputPanel>
+                                  <apex:inputCheckbox value="{!or.oldCheck}" id="rowOldCheck" style="display:none"/>
+                                  <apex:inputText value="{!or.orderNo}" styleClass="ordernocls" style="display:none"/>
+                                </td>
+    </apex:outputPanel>
+    <apex:outputPanel layout="none" rendered="{!Not(hasChkBox)}">
+                                <!-- 20230602 ljh 楂樺害鍥哄畾 38px; -->
+                                <td class="col_noChk" style="height: 38px;">
+                                  <apex:inputCheckbox value="{!or.check}" styleClass="rowchkcls" style="display:none"/>
+                                  <apex:inputText value="{!or.orderNo}" styleClass="ordernocls" style="display:none"/>
+                                </td>
+    </apex:outputPanel>
+
+    <apex:variable value="{!0}" var="cnt_2" />
+    <apex:repeat value="{!columnsLeftApi}" var="c">
+                                <!-- 20230602 ljh 楂樺害鍥哄畾 38px; -->
+                                <td class="dataCellBorder1 col_{!columnLeftCss[cnt_2]}" style="height: 38px;">
+        <apex:outputPanel rendered="{!(c.size==1 && columnLeftRW[c[0]]=='r')}" layout="none">
+            <!-- in_Div_L銇瓵ccount鍚嶃伅鐗规畩瀵惧繙銆併儶銉炽偗銇仚銈� -->
+            <apex:outputPanel rendered="{!c[0]=='Name'}" layout="none">
+                                  <apex:outputLink value="/{!or.sobj.Id}" target="LINK_{!or.sobj.Id}"><apex:outputField value="{!or.sobj[c[0]]}" /></apex:outputLink>
+            </apex:outputPanel>
+            <apex:outputPanel rendered="{!c[0]<>'Name'}" layout="none">
+                                  <apex:outputField value="{!or.sobj[c[0]]}"/>
+            </apex:outputPanel>
+        </apex:outputPanel>
+        <apex:outputPanel rendered="{!(c.size==2 && or.sobj[c[0]] != null)}" layout="none">
+                                  <apex:outputField value="{!or.sobj[c[0]][c[1]]}"/>
+        </apex:outputPanel>
+        <apex:outputPanel rendered="{!(c.size==1 && columnLeftRW[c[0]]=='w')}" layout="none">
+                                  <apex:inputField value="{!or.sobj[c[0]]}" onchange="setChangeFlg('{!or.lineNo}');if(typeof onFieldChanged == 'function') {onFieldChanged(this, {!or.lineNo});}"/>
+        </apex:outputPanel>
+        <apex:outputPanel rendered="{!(c.size==1 && columnLeftRW[c[0]]=='wm')}" layout="none">
+                                  <div class="requiredInput"><div class="requiredBlock"></div><apex:inputField value="{!or.sobj[c[0]]}" onchange="setChangeFlg('{!or.lineNo}');if(typeof onFieldChanged == 'function') {onFieldChanged(this, {!or.lineNo});}"/></div>
+        </apex:outputPanel>
+                                </td>
+        <apex:variable value="{!cnt_2 + 1}" var="cnt_2" />
+    </apex:repeat>
+                            </tr>
+    <apex:variable value="{!cnt + 1}" var="cnt" />
+</apex:repeat>
+                        </table>
+                    </div>
+                    <!--銆�鍙� 銉囥兗銈裤儶銈广儓 -->
+                    <div id="in_Div">
+                        <!-- 20230512 ljh lightning add table-layout:fixed" -->
+                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed;" border="" id="tableData">
+                            <apex:variable value="{!1}" var="cnt" />
+                            <apex:repeat value="{!pageController.viewList}" var="or" id="oppTable">
+                                <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
+                                <apex:variable value="{!0}" var="cnt_3" />
+                                <apex:repeat value="{!columnsRightApi}" var="c">
+                                    <td class="dataCellBorder1 col_{!columnRightCss[cnt_3]}" style="height: 38px;">
+                                    <apex:outputPanel rendered="{!(c.size==1 && columnRightRW[c[0]]=='r')}" layout="none">
+                                        <apex:outputField value="{!or.sobj[c[0]]}"/>
+                                    </apex:outputPanel>
+                                    <apex:outputPanel rendered="{!(c.size==2 && or.sobj[c[0]] != null)}" layout="none" >
+                                        <apex:outputField value="{!or.sobj[c[0]][c[1]]}"/>
+                                    </apex:outputPanel>
+                                    <apex:outputPanel rendered="{!(c.size==1 && columnRightRW[c[0]]=='w')}" layout="none">
+                                        <apex:inputField value="{!or.sobj[c[0]]}" onchange="setChangeFlg('{!or.lineNo}');if(typeof onFieldChanged == 'function') {onFieldChanged(this, {!or.lineNo});}"/>
+                                    </apex:outputPanel>
+                                    <apex:outputPanel rendered="{!(c.size==1 && columnRightRW[c[0]]=='wm')}" layout="none">
+                                        <div class="requiredInput"><div class="requiredBlock"></div><apex:inputField value="{!or.sobj[c[0]]}" onchange="setChangeFlg('{!or.lineNo}');if(typeof onFieldChanged == 'function') {onFieldChanged(this, {!or.lineNo});}"/></div>
+                                    </apex:outputPanel>
+                                    <apex:variable value="{!cnt_3 + 1}" var="cnt_3" />
+                                    </td>
+                                </apex:repeat>
+                                <td class="dataRow col_Scroll">
+                                    <apex:repeat value="{!columnsHiddenApi}" var="c">
+                                        <input name="{!c}" value="{!or.additionalInfoMap[c]}" type="hidden" />
+                                    </apex:repeat>
+                                    <apex:inputHidden value="{!or.changeFlg}" id="changeFlg"/>
+                                    
+                                    <script type="text/javascript">
+                                        if ("{!or.canEdit}" == "false") {
+                                            var right = j$("#tableData").find("tr").eq({!cnt-1});
+                                            var rightline = j$(right).find("td");
+                                            for (var i=0; i<rightline.length; i++) {
+                                                j$(rightline[i]).find("input").each(function(){
+                                                    j$(this).attr("disabled",true);
+                                                });
+                                                j$(rightline[i]).find("select").each(function(){
+                                                    j$(this).attr("disabled",true);
+                                                });
+                                                j$(rightline[i]).find("a").each(function(){
+                                                    j$(this).attr("href","#");
+                                                });
+                                            }
+                                        }
+                                        if ("{!or.hasError}" == "true") {
+                                            var left = j$("#tableData_L").find("tr").eq({!cnt-1});
+                                            var leftFirst = j$(left).find("td").eq(1);
+                                            j$(leftFirst).css("background-color", "gray");
+                                        }
+                                        if ("{!or.hasFieldError}" == "true") {
+                                            var left = j$("#tableData_L").find("tr").eq({!cnt-1});
+                                            var leftFirst = j$(left).find("td").eq(1);
+                                            j$(leftFirst).css("background-color", "red");
+                                        }
+
+                                    </script>
+                                </td>
+                                </tr>
+                                <apex:variable value="{!cnt + 1}" var="cnt" />
+                            </apex:repeat>
+                        </table>
+                    </div><!-- /in_Div -->
+                </apex:outputPanel>
+                <!-- 20230523  ljh lightning 鍒嗛〉 浠g爜鎹綅缃�  start -->
+                <!-- <apex:outputPanel layout="none" rendered="{!isDisplayPaging}">
+
+                    <apex:outputPanel layout="none" rendered="{!hasPrevious}">
+                        <button onclick="if('{!userCustomPaging}' == 'true') {searchPreviousCustom();} else {searchPreviousJs();}return false;" class="btn">鍓嶃伕</button>
+                    </apex:outputPanel>
+                    <apex:outputPanel layout="none" rendered="{!!hasPrevious}">
+                        <button class="btn" disabled="disabled"
+                                style="cursor: default;border-color: #e5e5e5; background: #f0f0f0;color: #a8a8a8;">鍓嶃伕</button>
+                    </apex:outputPanel>
+
+                    <span class="count">{!page}</span><span>|</span>
+                    <span class="count">{!maxPage}</span>
+                    <apex:outputPanel layout="none" rendered="{!hasNext}">
+                        <button onclick="if('{!userCustomPaging}' == 'true') {searchNextCustom();} else {searchNextJs();}return false;" class="btn" >娆°伕</button>
+                    </apex:outputPanel>
+                    <apex:outputPanel layout="none" rendered="{!!hasNext}">
+                        <button class="btn" disabled="disabled"
+                        style="cursor: default;border-color: #e5e5e5; background: #f0f0f0;color: #a8a8a8;">娆°伕</button>
+                    </apex:outputPanel>
+    &nbsp;&nbsp;
+                    <apex:outputPanel id="canGoPage" layout="none" rendered="{!canGoPage}">
+                        <apex:selectList value="{!goPageInt}" size="1" style="width:50px" id="goPageInt"><apex:selectOptions value="{!pageNumList}" id="pageNumList"/></apex:selectList>銆�
+                        <button onclick="if('{!userCustomPaging}' == 'true') {searchGoPageCustom();} else {searchGoPageJs();}return false;" class="btn">go</button>
+                    </apex:outputPanel>
+                </apex:outputPanel> -->
+                <!-- 20230523  ljh lightning 鍒嗛〉 浠g爜鎹綅缃�  end -->
+            </apex:pageBlock>
+            <!-- 20230523  ljh lightning 鍒嗛〉 浠g爜鎹綅缃�  start -->
+            <apex:outputPanel layout="none" rendered="{!isDisplayPaging}">
+                <apex:outputPanel layout="none" rendered="{!hasPrevious}">
+                    <button onclick="if('{!userCustomPaging}' == 'true') {searchPreviousCustom();} else {searchPreviousJs();}return false;" class="btn">鍓嶃伕</button>
+                </apex:outputPanel>
+                <apex:outputPanel layout="none" rendered="{!!hasPrevious}">
+                    <button class="btn" disabled="disabled"
+                            style="cursor: default;border-color: #e5e5e5; background: #f0f0f0;color: #a8a8a8;">鍓嶃伕</button>
+                </apex:outputPanel>
+
+                <span class="count">{!page}</span><span>|</span>
+                <span class="count">{!maxPage}</span>
+                <apex:outputPanel layout="none" rendered="{!hasNext}">
+                    <button onclick="if('{!userCustomPaging}' == 'true') {searchNextCustom();} else {searchNextJs();}return false;" class="btn" >娆°伕</button>
+                </apex:outputPanel>
+                <apex:outputPanel layout="none" rendered="{!!hasNext}">
+                    <button class="btn" disabled="disabled"
+                    style="cursor: default;border-color: #e5e5e5; background: #f0f0f0;color: #a8a8a8;">娆°伕</button>
+                </apex:outputPanel>
+&nbsp;&nbsp;
+                <apex:outputPanel id="canGoPage" layout="none" rendered="{!canGoPage}">
+                    <apex:selectList value="{!goPageInt}" size="1" style="width:50px" id="goPageInt"><apex:selectOptions value="{!pageNumList}" id="pageNumList"/></apex:selectList>銆�
+                    <button onclick="if('{!userCustomPaging}' == 'true') {searchGoPageCustom();} else {searchGoPageJs();}return false;" class="btn">go</button>
+                </apex:outputPanel>
+            </apex:outputPanel>
+            <!-- 20230523  ljh lightning 鍒嗛〉 浠g爜鎹綅缃�  end -->
+<script type="text/javascript">
+var heightAjustment = 120;
+var widthAjustment = 30;
+var bottomspace = '{!bottomSp}';
+var i = 0;
+j$(document).ready(function(){
+    console.log({!isFirstRefresh});
+    if({!isFirstRefresh}){
+      blockme();
+      init();
+    }
+    // 20230523  ljh lightning start 
+    if(i == 0){
+        sbwidth = scrollbarWidth();
+        i++;
+        tableWidth = j$('body .pbBody table#tableHeader').width();
+        // var widthTemp = 0;
+        j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
+            var colClass = getColClassName(this);
+            if (colClass != 'col_Scroll') {
+                var temp = j$('body .pbBody table.list tr.headerRow td.' + colClass).width();
+                listColClassWidthMap[colClass] = temp;
+                //widthTemp += temp;
+            }
+        });
+        var blockWidthNew = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width()-sbwidth;
+        // console.log(widthTemp+'~'+blockWidthNew+'~'+tableWidth);
+        var tableHeader_L =  j$(escapeVfId('tableHeader_L')).width();
+        j$('div#in_Div_L').css('width', tableHeader_L+ 'px'); 
+        j$('table#tableData_L').css('width', tableHeader_L + 'px');
+        // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
+        if(tableWidth > blockWidthNew){
+            j$('div#in_Div').css('width', blockWidthNew + 'px'); // 20230519 ljh 
+            j$('div#out_Div').css('width', blockWidthNew + 'px'); // 20230519 ljh
+        }
+        j$('div#in_Div').scroll(function() {
+            j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
+            j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
+        });
+        j$('div#out_Div').scroll(function() {
+            j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
+        });
+        j$('div#in_Div_L').scroll(function() {
+            j$('div#in_Div').scrollTop(j$(this).scrollTop());
+        });
+       
+    }
+    // windowResize();
+    // 銈广偗銉兗銉�e嫊
+    // j$('div#in_Div').scroll(function() {
+    //     j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
+    //     j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
+    // });
+    // j$('div#out_Div').scroll(function() {
+    //     j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
+    // });
+    // j$('div#in_Div_L').scroll(function() {
+    //     j$('div#in_Div').scrollTop(j$(this).scrollTop());
+    // });
+    // 20230523  ljh lightning end 
+});
+
+function runSFDCAddRemote(MetadataConnectionWarning) {
+    if (MetadataConnectionWarning) SFDCAddRemote('{!$Api.Session_ID}');
+}
+function sortTableJs(key) {
+  // blockme();
+  sortTablefunc(key);
+}
+// 20230523  ljh lightning start 
+// 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', (tableWidth + 2) + 'px');
+//     j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
+
+//     // list 銇� headerRow 銇� td銇� toggleWidth() 銈掕拷鍔�
+//     bindTdToggleWidth();
+// });
+// 20230523  ljh lightning end 
+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(); // 20230523 ljh lightning
+</script>
+        </apex:outputPanel>
+    <!-- </apex:form> -->
+</apex:component>
diff --git a/force-app/main/default/pages/MainFixtureSelect.page b/force-app/main/default/pages/MainFixtureSelect.page
index 9598fcd..13fc4df 100644
--- a/force-app/main/default/pages/MainFixtureSelect.page
+++ b/force-app/main/default/pages/MainFixtureSelect.page
@@ -33,7 +33,7 @@
         right: 0;
         left: 0;
         margin: 0;
-        z-index: 9999;
+        z-index: 2;
         display: inline-block;
         background-color: white;
         border-radius: 0.25rem;/*20230607 ljh lightning*/
@@ -68,6 +68,10 @@
         white-space: nowrap;
         overflow: hidden;
         text-overflow: ellipsis;
+    }
+    /* 20230628 ljh */
+    .menu ul li:first-child{
+        padding-left: 0.75rem;
     }
 </style>
 
@@ -503,6 +507,7 @@
                         </td>
                         <td style="width:50%">
                             <div style="text-align: center;">
+                                <input type="hidden" name="hidden" /> <!-- 20230706 ljh 涓轰簡鎸夐挳瀵归綈 -->
                                 <apex:commandButton action="{!save}" value="淇濆瓨" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="unblockUI();" />
                                 <apex:commandButton style="margin-left:20px;" onclick="clickunassign(); return false;" value="鍙栨秷鍒嗛厤" rerender="allForm,checEventFrame"/>
                                 <apex:commandButton style="margin-left:20px;" value="鍙栨秷" onclick="clickCancel(); return false;"/>
diff --git a/force-app/main/default/pages/MainFixtureSelect.page.bak b/force-app/main/default/pages/MainFixtureSelect.page.bak
new file mode 100644
index 0000000..9598fcd
--- /dev/null
+++ b/force-app/main/default/pages/MainFixtureSelect.page.bak
@@ -0,0 +1,695 @@
+<!-- 20230529 ljh lightning -->
+<!-- <apex:page controller="MainFixtureSelectController" showHeader="false" sidebar="false" id="allPage" action="{!init}"> -->
+<apex:page controller="MainFixtureSelectController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true">
+<head>
+<title>涓讳綋澶囧搧閫夋嫨</title>
+<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+<apex:stylesheet value="{!URLFOR($Resource.MainFixtureSelectCss)}"/>
+<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->    
+<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
+
+<style type="text/css">
+    .hideDropdown select{
+        display: none
+    }
+    /*浠ヤ笅鏄笅鎷夊閫夋鐨勬牱寮�  start*/
+    * {
+        margin: 0;
+        padding: 0;
+        box-sizing: border-box;
+    }
+    .nav {
+        width: 170px;/*20230606 ljh*/
+        line-height: 30px;/*20230606 ljh*/
+        /* border: 1px solid #000; *//*20230610 ljh lightning*/
+        -webkit-user-select: none;
+        -moz-user-select: none;
+        -ms-user-select: none;
+        user-select: none;
+        position: absolute;
+        top: -15px;/*20230606 ljh*/
+        right: 0;
+        left: 0;
+        margin: 0;
+        z-index: 9999;
+        display: inline-block;
+        background-color: white;
+        border-radius: 0.25rem;/*20230607 ljh lightning*/
+        border: 1px solid rgb(201, 201, 201);/*20230610 ljh lightning*/
+    }
+    ul,
+    li {
+        list-style: none;
+    }
+    .nav li input {
+        margin: 0px 3px 0px 3px;
+    }
+
+    .nav li p:hover {
+        background: #1e90ff;
+        color: #fff;
+    }
+    .nav_a li input {
+        margin: 0px 3px 0px 3px;
+    }
+
+    .nav_a li p:hover {
+        background: #1e90ff;
+        color: #fff;
+    }
+    #classification {
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+    #classification_a {
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+</style>
+
+<script type="text/javascript">
+var heightAjustment = 120;
+var widthAjustment = 30;
+
+function clickCancel(){
+    if (confirm('鏄惁鎿嶄綔鍙栨秷锛�')) {
+        blockme();
+        cancel();
+    }
+}
+
+function clickunassign(){
+    if (confirm('鏄惁鎿嶄綔鍙栨秷鍒嗛厤锛�')) {
+        blockme();
+        unassign();
+    }
+}
+
+//涓嬫媺澶氶�夋  strat
+j$(document).bind("click",function(e){
+    var e = e || window.event;    //浜嬩欢瀵硅薄锛屽吋瀹笽E
+    var target = e.target || e.srcElement;  //婧愬璞★紝鍏煎鐏嫄鍜孖E
+    while(target){
+        // console.log(target.id);
+        if (target.id && (target.id == "nav" ||target.id == "nav_a")){   
+         //寰幆鍒ゆ柇鑷虫牴鑺傜偣锛岄槻姝㈢偣鍑荤殑鏄�#selected鍜屽畠鐨勫瓙鍏冪礌
+            return;
+        }
+       target = target.parentNode;
+    }
+    j$("#selectCheckId").hide();   //鐐瑰嚮鐨勪笉鏄�#selected鍜屽畠鐨勫瓙鍏冪礌锛岄殣钘忎笅鎷夎彍鍗�
+    j$("#selectCheckId_a").hide();
+})
+
+//閫夋嫨澶囧搧瀛樻斁鍦� 涓嬫媺妗嗗�兼湁鍙樺姩浠ュ悗瑙﹀彂
+function reloadBenBu(Obj){
+    var selectId = Obj.value;
+    //濡傛灉澶囧搧瀛樻斁鍦伴�夋嫨鏃�
+    // console.log('00:'+selectId);
+    //娑堥櫎閫夋嫨鐨勫叾浠栭�夐」
+    if(j$("#classification").children().text() != "--鏃�--"){
+        j$("#classification").children().remove();
+        j$("#classification").append("<span class='valClass_CF' id='initial'>--鏃�--</span>");
+    }
+    var inputObj = j$(".li-input");
+    if(inputObj != null){
+        for(var i = 0; i < inputObj.length;i++){
+            if(inputObj[i].checked){
+                inputObj[i].checked = false;
+            }
+        }
+    }
+    j$("#selectCheckId").show();
+    // j$("#selectCheckId_a").hide();        
+}
+//鐐瑰嚮 鏈儴閫夋嫨
+function selectBenBu(obj,name){
+    var checked1 = j$(obj).prop("checked");
+    if (checked1 == true) {
+        j$("#classification").children("#initial").remove();
+        var idTemp = j$(obj).value().trim();
+        idTemp = 'Id'+idTemp.split('.')[0];
+        j$("#classification").append("<span class='valClass' id='" + (idTemp) + "'>" + (j$(obj)
+            .value().trim() + ",") + "</span>");
+    } else {
+        var idTemp = 'Id'+name.split('.')[0];
+        j$("#classification").children("#" + (idTemp)).remove();
+        var length = j$("#classification").html().length;
+        if (length === 0) {
+            j$("#classification").append("<span class='valClass' id='initial'>--鏃�--</span>");
+        }
+    }
+    var optioncheck = j$(".valClass");
+    var hint = '';
+    for(var i = 0;i<optioncheck.length;i++){
+        if(optioncheck[i].innerText != '--鏃�--'){
+            hint +=optioncheck[i].innerText;
+        }
+    }
+    console.log(hint);
+    // j$(escapeVfId('allPage:allForm:searchBlock:mainSection:ApplyBB:bieBenBu')).val(hint);
+    j$(escapeVfId('allPage:allForm:searchBlock:bieBenBu')).val(hint);
+    
+}
+function navClose(){
+    j$("#selectCheckId").toggle();
+}
+
+// 澶囧搧鍒嗙被鐐瑰嚮閫夋嫨
+function selectAgency(obj,name){
+    var checked1 = j$(obj).prop("checked");
+    if (checked1 == true) {
+        j$("#classification_a").children("#initial_a").remove();
+        var idTemp = j$(obj).value().trim();
+        idTemp = 'Id'+idTemp.split('.')[0];
+        j$("#classification_a").append("<span class='valClass_a' id='" + (idTemp) + "'>" + (j$(obj)
+            .value().trim() + ",") + "</span>");
+    } else {
+        var idTemp = 'Id'+name.split('.')[0];
+        j$("#classification_a").children("#" + (idTemp)).remove();
+        var length = j$("#classification_a").html().length;
+        if (length === 0) {
+            j$("#classification_a").append("<span class='valClass_a' id='initial_a'>--鏃�--</span>");
+        }
+    }
+    var optioncheck = j$(".valClass_a");
+    var hint = '';
+    for(var i = 0;i<optioncheck.length;i++){
+        if(optioncheck[i].innerText != '--鏃�--' ){
+            hint +=optioncheck[i].innerText;
+        }
+    }
+    // j$(escapeVfId('allPage:allForm:searchBlock:mainSection:ApplyAA:bieBeiPinFenLei')).val(hint);
+    j$(escapeVfId('allPage:allForm:searchBlock:bieBeiPinFenLei')).val(hint);
+}
+function navClose_a(){
+    j$("#selectCheckId_a").toggle();
+}
+
+function searchJs() {
+    blockme();
+    searchfunc();
+}
+function checkEventJs(obj){
+    blockme();
+    j$(escapeVfId('allPage:allForm:checkEventId')).val(obj);
+    checkEvent();
+}
+</script>
+</head>
+    <apex:form id="allForm">
+        <apex:inputHidden id="changeCampaignType" value="{!changeCampaignType}"/>
+        <apex:actionFunction name="saveAndSearch" action="{!save}" rerender="allForm,checEventFrame" oncomplete="unblockUI();">
+            <apex:param name="firstParam" assignTo="{!saveType}" value="" />
+        </apex:actionFunction>
+        <apex:actionFunction name="saveAndSort" action="{!save}" rerender="allForm,checEventFrame" oncomplete="unblockUI();">
+            <apex:param name="firstParam" assignTo="{!saveType}" value="" />
+            <apex:param name="secondParam" assignTo="{!sortKey}" value="" />
+        </apex:actionFunction>
+        <apex:actionFunction name="searchOpp" action="{!searchOpp}" rerender="allForm,checEventFrame" oncomplete="unblockUI();">
+        </apex:actionFunction>
+        <apex:actionFunction action="{!cancel}" name="cancel" rerender="allForm,checEventFrame" oncomplete="unblockUI();"/>
+        <apex:actionFunction action="{!unassign}" name="unassign" rerender="allForm,checEventFrame" oncomplete="unblockUI();"/>
+        <apex:actionFunction name="changebenbu" rerender="S_bieBenBuApply" oncomplete="unblockUI();"/>
+
+
+        <apex:outputPanel id="pageallPanel">
+            <apex:pageBlock id="searchBlock" tabStyle="Report">
+                <apex:pageBlockSection title="涓讳綋澶囧搧閫夋嫨" id="mainSection">
+                    <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:outputField value="{!parentObj.Irreplaceable_flag__c}"/>
+                    <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.Rental_End_Date__c}"/>
+                    <apex:outputField value="{!parentObj.Fu_Shu_Pin_Fen_Pei_Jia__c}"/>
+                    <apex:outputField value="{!parentObj.Rental_Start_Date__c}"/>
+                    <!-- 20230605 ljh lightning start -->
+                    <!-- <apex:pageBlockSectionItem >
+                        <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="澶囧搧瀛樻斁鍦�" />
+                        <apex:selectList value="{!bieCunFangDi}" onchange="blockme(); changebenbu(); reloadBenBu(this);return false" size="1" style="margin-left: 0px; width:110px" id="bieCunFangDi">
+                            <apex:selectOptions value="{!bieCunFangDiOps}"/>
+                        </apex:selectList>
+                    </apex:pageBlockSectionItem>
+
+                    <apex:pageBlockSectionItem >
+                        <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="浜у搧鍒嗙被(GI/SP)" />
+                            <apex:selectList value="{!bieChanPinFenLei}" size="1" style="margin-left: 0px; width:60px" id="bieChanPinFenLei">
+                                <apex:selectOptions value="{!bieChanPinFenLeiOps}"/>
+                            </apex:selectList>
+                    </apex:pageBlockSectionItem>
+
+                    <apex:pageBlockSectionItem id="ApplyBB">
+                        <apex:outputLabel for="S_bieBenBuApply" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="鏈儴" />
+                        <apex:outputPanel style="position: relative; " id="S_bieBenBuApply">
+                            <apex:inputHidden id="bieBenBu" value="{!bieBenBu}" />
+                            <ul class="nav" id="nav" style="left:0px;">
+                                <li id="classification" class="transparent_class" style="margin-left:0px;height:20px;" onclick="navClose();return false;">
+                                    <span id="initial">--鏃�--</span>
+                                </li>
+                                <li id="selectCheckId" style="margin-left:0px;display: none;">
+                                    <ul style="background-color: #FFFFFF;">
+                                        <apex:repeat value="{!bieBenBuOps}" var="orr" id="selSD">
+                                            <li class="sdclass" style="margin-left:0px">
+                                                <p class="ul-nav" name="cate_id[]" >
+                                                    <input type="checkbox" value="{!orr.label}" class="li-input" onclick="selectBenBu(this,'{!orr.label}');" style="display: inline-block;vertical-align: middle;" />
+                                                    <font style="">{!orr.label}</font>
+                                                </p>
+                                            </li>
+                                        </apex:repeat>
+                                    </ul>
+                                </li>
+                            </ul>
+                            <div class="nav_close"></div>
+
+                            <script>
+                                initShowBenbu();
+                                function initShowBenbu() {
+                                    var bieBenBuTemp = '{!bieBenBu}';
+                                    if (bieBenBuTemp != null && bieBenBuTemp != undefined && bieBenBuTemp != "") {
+                                        j$("#classification").children("#initial").remove();
+                                        var bieBenBuList = bieBenBuTemp.split(',');
+                                        for(var i=0; i< bieBenBuList.length; i++) {
+                                            var idTemp = bieBenBuList[i].trim();
+                                            idTemp = 'Id'+idTemp.split('.')[0];
+                                            j$("#classification").append("<span class='valClass' id='" + (idTemp) + "'>" + (bieBenBuList[i].trim() + ",") + "</span>");
+                                        }
+
+                                        var inputObj = j$(".li-input");
+                                        if(inputObj != null){
+                                            for(var i = 0; i < inputObj.length;i++){
+                                                if(bieBenBuTemp.includes(inputObj[i].value)){
+                                                    inputObj[i].checked = true;
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
+                            </script>
+                        </apex:outputPanel>
+                    </apex:pageBlockSectionItem>
+
+                    <apex:pageBlockSectionItem id="ApplyAA" >
+                        <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="澶囧搧鍒嗙被" />
+                        <apex:outputPanel style="position: relative;" id="S_AgencyApply">
+                            <apex:inputHidden id="bieBeiPinFenLei" value="{!bieBeiPinFenLei}" />
+                            <ul class="nav" id="nav_a" style="left:0px;">
+                                <li id="classification_a" class="transparent_class" style="margin-left:0px;height:20px;" onclick="navClose_a();return false;">
+                                    <span id="initial_a">--鏃�--</span>
+                                </li>
+                                <li id="selectCheckId_a" style="margin-left:0px;display: none;">
+                                    <ul style="background-color: #FFFFFF;">
+                                        <apex:repeat value="{!bieBeiPinFenLeiOps}" var="orr" id="selSD">
+                                            <li class="sdclass" style="margin-left:0px">
+                                                <p class="ul-nav" name="cate_id[]" >
+                                                    <input type="checkbox" value="{!orr.label}" class="li-input_a" onclick="selectAgency(this,'{!orr.label}');" style="display: inline-block;vertical-align: middle;" />
+                                                    <font style="">{!orr.label}</font>
+                                                </p>
+                                            </li>
+                                        </apex:repeat>
+                                    </ul>
+                                </li>
+                            </ul>
+
+                            <script>
+                                initShowFenlei();
+                                function initShowFenlei() {
+                                    var bieBeiPinFenLeiTemp = '{!bieBeiPinFenLei}';
+                                    if (bieBeiPinFenLeiTemp != null && bieBeiPinFenLeiTemp != undefined && bieBeiPinFenLeiTemp != "") {
+                                        j$("#classification_a").children("#initial_a").remove();
+                                        var bieBeiPinFenLeiList = bieBeiPinFenLeiTemp.split(',');
+                                        for(var i=0; i< bieBeiPinFenLeiList.length; i++) {
+                                            var idTemp = bieBeiPinFenLeiList[i].trim();
+                                            idTemp = 'Id'+idTemp.split('.')[0];
+                                            j$("#classification_a").append("<span class='valClass_a' id='" + (idTemp) + "'>" + (bieBeiPinFenLeiList[i].trim() + ",") + "</span>");
+                                        }
+
+                                        var inputObj = j$(".li-input_a");
+                                        if(inputObj != null){
+                                            for(var i = 0; i < inputObj.length;i++){
+                                                if(bieBeiPinFenLeiTemp.includes(inputObj[i].value)){
+                                                    inputObj[i].checked = true;
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
+                            </script>
+                        </apex:outputPanel>
+                    </apex:pageBlockSectionItem>-->
+                </apex:pageBlockSection> 
+            
+
+                <table style="width:100%;margin:10px 0;">
+                    <!-- <tr/><tr/><tr/><tr/><tr/><tr/><tr/><tr/>
+                    <tr>
+                        <td width="50px">鍏抽敭瀛�</td>
+                        <td><apex:inputText value="{!keyword}" style="width:200px"/></td>
+                        <td width="20px"/>
+                        <td><apex:commandButton value="妞滅储" onclick=" searchOppJs(); return false;"/></td>
+                    </tr>
+                    <tr/><tr/><tr/><tr/><tr/><tr/> -->
+                    <colgroup>
+                        <col width="6%" />
+                        <col width="12%" />
+                        <col width="12%" />
+                        <col width="6%" />
+                        <col width="6%"/>
+                        <col width="12%"/>
+                        <col width="6%"/>
+                        <col width="12%"/>
+                        <col width="6%"/>
+                        <col width="12%"/>
+                        <col width="10%"/>
+                    </colgroup>
+                    <tr>
+                        <td align="right" style="padding-right:5px;" >澶囧搧瀛樻斁鍦�</td>
+                        <td align="left">
+                            <apex:selectList value="{!bieCunFangDi}" onchange="blockme(); changebenbu(); reloadBenBu(this);return false" size="1" style="margin-left: 0px; width:110px" id="bieCunFangDi">
+                                <apex:selectOptions value="{!bieCunFangDiOps}"/>
+                            </apex:selectList>
+                        </td>
+                        <td align="right" style="padding-right:5px;">浜у搧鍒嗙被(GI/SP)</td>
+                        <td align="left">
+                            <apex:selectList value="{!bieChanPinFenLei}" size="1" style="margin-left: 0px; width:60px" id="bieChanPinFenLei">
+                                <apex:selectOptions value="{!bieChanPinFenLeiOps}"/>
+                            </apex:selectList>
+                        </td>
+                        <td align="right" style="padding-right:5px;" >鏈儴</td>
+                        <td align="left">
+                            <apex:outputPanel style="position: absolute;" id="S_bieBenBuApply">
+                            <apex:inputHidden id="bieBenBu" value="{!bieBenBu}" />
+                            <ul class="nav" id="nav" style="left:0px;">
+                                <li id="classification" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose();return false;">
+                                    <span id="initial">--鏃�--</span>
+                                </li>
+                                <li id="selectCheckId" style="margin-left:0px;display: none;">
+                                    <ul style="background-color: #FFFFFF;margin-left: 0;">
+                                        <apex:repeat value="{!bieBenBuOps}" var="orr" id="selSDBB">
+                                            <li class="sdclass" style="margin-left:0px">
+                                                <p class="ul-nav" name="cate_id[]" >
+                                                    <input type="checkbox" value="{!orr.label}" class="li-input" onclick="selectBenBu(this,'{!orr.label}');" style="display: inline-block;vertical-align: middle;" />
+                                                    <font style="">{!orr.label}</font>
+                                                </p>
+                                            </li>
+                                        </apex:repeat>
+                                    </ul>
+                                </li>
+                            </ul>
+                            <script>
+                                initShowBenbu();
+                                function initShowBenbu() {
+                                    var bieBenBuTemp = '{!bieBenBu}';
+                                    if (bieBenBuTemp != null && bieBenBuTemp != undefined && bieBenBuTemp != "") {
+                                        j$("#classification").children("#initial").remove();
+                                        var bieBenBuList = bieBenBuTemp.split(',');
+                                        for(var i=0; i< bieBenBuList.length; i++) {
+                                            var idTemp = bieBenBuList[i].trim();
+                                            idTemp = 'Id'+idTemp.split('.')[0];
+                                            j$("#classification").append("<span class='valClass' id='" + (idTemp) + "'>" + (bieBenBuList[i].trim() + ",") + "</span>");
+                                        }
+
+                                        var inputObj = j$(".li-input");
+                                        if(inputObj != null){
+                                            for(var i = 0; i < inputObj.length;i++){
+                                                if(bieBenBuTemp.includes(inputObj[i].value)){
+                                                    inputObj[i].checked = true;
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
+                            </script>
+                        </apex:outputPanel>
+                        </td>
+                        <td align="right" style="padding-right:5px;" >澶囧搧鍒嗙被</td>
+                        <td align="left" >
+                            <apex:outputPanel style="position: absolute;" id="S_AgencyApply">
+                            <apex:inputHidden id="bieBeiPinFenLei" value="{!bieBeiPinFenLei}" />
+                            <ul class="nav" id="nav_a" style="left:0px;">
+                                <li id="classification_a" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_a();return false;">
+                                    <span id="initial_a">--鏃�--</span>
+                                </li>
+                                <li id="selectCheckId_a" style="margin-left:0px;display: none;">
+                                    <ul style="background-color: #FFFFFF;margin-left: 0;">
+                                        <apex:repeat value="{!bieBeiPinFenLeiOps}" var="orr" id="selSD">
+                                            <li class="sdclass" style="margin-left:0px">
+                                                <p class="ul-nav" name="cate_id[]" >
+                                                    <input type="checkbox" value="{!orr.label}" class="li-input_a" onclick="selectAgency(this,'{!orr.label}');" style="display: inline-block;vertical-align: middle;" />
+                                                    <font style="">{!orr.label}</font>
+                                                </p>
+                                            </li>
+                                        </apex:repeat>
+                                    </ul>
+                                </li>
+                            </ul>
+
+                            <script>
+                                initShowFenlei();
+                                function initShowFenlei() {
+                                    var bieBeiPinFenLeiTemp = '{!bieBeiPinFenLei}';
+                                    if (bieBeiPinFenLeiTemp != null && bieBeiPinFenLeiTemp != undefined && bieBeiPinFenLeiTemp != "") {
+                                        j$("#classification_a").children("#initial_a").remove();
+                                        var bieBeiPinFenLeiList = bieBeiPinFenLeiTemp.split(',');
+                                        for(var i=0; i< bieBeiPinFenLeiList.length; i++) {
+                                            var idTemp = bieBeiPinFenLeiList[i].trim();
+                                            idTemp = 'Id'+idTemp.split('.')[0];
+                                            j$("#classification_a").append("<span class='valClass_a' id='" + (idTemp) + "'>" + (bieBeiPinFenLeiList[i].trim() + ",") + "</span>");
+                                        }
+
+                                        var inputObj = j$(".li-input_a");
+                                        if(inputObj != null){
+                                            for(var i = 0; i < inputObj.length;i++){
+                                                if(bieBeiPinFenLeiTemp.includes(inputObj[i].value)){
+                                                    inputObj[i].checked = true;
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
+                            </script>
+                        </apex:outputPanel>
+                        </td>
+                        <td  align="right" style="padding-right:5px;">鍏抽敭瀛�</td>
+                        <td align="left" ><apex:inputText value="{!keyword}"/></td>
+                        <td style="padding-left:20px;"><apex:commandButton value="妞滅储" onclick=" searchOppJs(); return false;"/></td>
+                    </tr>
+                </table>
+                <!-- 20230605 ljh lightning end -->
+                <table style="width:100%">
+                    <tr>
+                        <td style="width:40%">
+                            <apex:outputPanel rendered="{!parentObj.Rental_Apply__r.demo_purpose2__c=='瀛︿細灞曚細'&&NOT((contains(parentObj.Rental_Apply__r.Salesdepartment__c,'MA鏈儴')||contains(parentObj.Rental_Apply__r.Salesdepartment__c,'浜у搧鍩硅')))}">
+                                <apex:outputLabel for="campaignType" value="瀛︿細绫诲瀷" style="font-weight: bold;font-family: Arial,Helvetica,sans-serif;font-size: 91%;color: #4a4a56;" />
+                                <apex:selectList value="{!campaignType}" size="1" style="margin-left: 20px; width:120px;" id="campaignType">
+                                    <apex:selectOptions value="{!campaignTypeOps}"/>
+                                </apex:selectList>
+                            </apex:outputPanel>
+                            <apex:commandButton style="margin-left:5px;" action="{!defaultScheduel}" disabled="{!parentObj.Rental_Apply__r.Demo_purpose1__c=='鍏朵粬'||(sonObj.Asset__c!=''&&sonObj.Select_Time__c!=null)||(sonObj.Asset__c!=''&&sonObj.Queue_Number__c==0)}" onclick="if(!confirmDefualt()) return false;blockme();" oncomplete="unblockUI();" value="榛樿鎺掗槦" rerender="allForm,checEventFrame"/>
+                            <apex:commandButton style="margin-left:20px;" action="{!specialScheduel}" disabled="{!parentObj.Rental_Apply__r.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Rental_Apply__r.Demo_purpose1__c=='鍗忚鍊熺敤'||(sonObj.Asset__c!=''&&sonObj.Select_Time__c!=null)||(sonObj.Asset__c!=''&&sonObj.Queue_Number__c==0)}" onclick="if(!confirmSpecial()) return false;blockme();" oncomplete="unblockUI();" value="鐗规畩鎺掗槦" rerender="message,checEventFrame"/>
+                            <apex:commandButton style="margin-left:20px;" action="{!topInLine}" disabled="{!(sonObj.Asset__c!=''&&sonObj.Select_Time__c!=null)||(sonObj.Asset__c!=''&&sonObj.Queue_Number__c==0)}" onclick="blockme();" oncomplete="unblockUI();" value="鎺掗槦No.缃《" rerender="allForm,checEventFrame"/>
+                        </td>
+                        <td style="width:50%">
+                            <div style="text-align: center;">
+                                <apex:commandButton action="{!save}" value="淇濆瓨" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="unblockUI();" />
+                                <apex:commandButton style="margin-left:20px;" onclick="clickunassign(); return false;" value="鍙栨秷鍒嗛厤" rerender="allForm,checEventFrame"/>
+                                <apex:commandButton style="margin-left:20px;" value="鍙栨秷" onclick="clickCancel(); return false;"/>
+                            </div>
+                        </td>
+                        <td>
+                            <div style="text-align: right;">
+                                <apex:commandButton action="{!turnback}" value="杩斿洖" rerender="allForm,checEventFrame"/>
+                            </div>
+                        </td>
+                    </tr>
+                </table>
+
+                <div style="clear:both;"></div>
+                
+                <apex:outputPanel id="message">
+                    <apex:pageMessages />
+                </apex:outputPanel>
+            
+            </apex:pageBlock>
+            <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true" isRadio="true"/>
+        </apex:outputPanel>
+    </apex:form>
+    <apex:outputPanel id="checEventFrame">
+        <apex:form >
+            <!-- <apex:inputHidden id="assetId" value="{!assetId}" />
+            <apex:inputHidden id="rentalId" value="{!rentalId}" /> -->
+<!--             <apex:inputHidden id="modelNo" value="{!modelNo}" />
+            <apex:inputHidden id="raesdId" value="{!raesdId}" /> -->
+            
+        </apex:form>
+        <apex:iframe id="theIframe" rendered="{!IF(!ISBLANK(queueByAsset),true,false)}" title="鎺掗槦涓�瑙�" src="{!queueByAsset}"/>
+
+        <!-- add by rentx 20210813 start SFDC-C448KZ -->
+        <script>
+            addlinkbutton();
+            function addlinkbutton(){
+              // 娆°伄鐢婚潰閬风Щclick
+              var ele = j$(".dataCellBorder1.col_Asset__r_Fixture_Status__c");
+              var isShowButton = '{!(sonObj.Asset__c!=''&&sonObj.Select_Time__c!=null)||(sonObj.Asset__c!=''&&sonObj.Queue_Number__c==0)}';
+              // alert(ele.length);
+              if(ele.length) {
+                var i = 0;
+
+                ele.each(function () {
+                    j$(this).css('align-items','center');
+                    console.log(j$(this).children("span")[0].innerText);
+                    var value = j$(this).children("span")[0].innerText;
+                    if(value == '鏆傚畾鍒嗛厤'){
+                        if (isShowButton=='false') {
+                            j$(this).append('<input type="button" style="width: auto;" value="鎶㈠ず鏆傚畾鍒嗛厤" onclick="derectlyAssign('+i+');" />');
+                        } else {
+                            j$(this).append('<input type="button" style="width: auto;" value="鎶㈠ず鏆傚畾鍒嗛厤" onclick="derectlyAssign('+i+');" disabled="true" />');
+                        }
+                    }
+                    i = i + 1;
+                })
+              }
+            }
+
+            function derectlyAssign(index) {
+                // var viewList = JSONCODE(viewListStr);
+                var viewList = eval("({!JSENCODE(WrapperJSON)})");
+                var targetId = '{!parentId}';
+
+                console.log(viewList[index]);
+                var rasdId = viewList[index].sobj.Asset__r.Last_Reserve_RAES_Detail__r.Rental_Apply_Equipment_Set__c;
+                window.location.href = '/apex/DirectAssign?oldquenId=' + rasdId + '&targetId=' + targetId;
+            }
+
+            function confirmDefualt() {
+                var queenType = '{!sonObj.QuenType__c}';
+                if (queenType=='鐗规畩鎺掗槦') {
+                    if (confirm("宸插弬涓庣壒娈婃帓闃燂紝鏄惁缁х画锛�")) {
+                        var campaignTemp1 = '{!parentObj.Rental_Apply__r.CampaignType__c}';
+                        var campaignTemp2 = j$(escapeVfId('allPage:allForm:searchBlock:campaignType')).value();
+                        if (campaignTemp1 !="" && campaignTemp1 != undefined && campaignTemp1 != campaignTemp2) {
+                            if(confirm("閫夋嫨鐨勫浼氱被鍨嬩笌鐢宠鍗曚腑鐨勫浼氱被鍨嬩笉涓�鑷达紝璇风‘璁ゆ槸鍚︽洿鏂帮紵")){
+                                j$("[id*='changeCampaignType']").val(true);
+                            } else {
+                                j$("[id*='changeCampaignType']").val(false);
+                            }
+                        }
+                        return true;
+                    }
+                } else {
+                    if (confirm("鏄惁榛樿鎺掗槦锛�")) {
+                        var campaignTemp1 = '{!parentObj.Rental_Apply__r.CampaignType__c}';
+                        var campaignTemp2 = j$(escapeVfId('allPage:allForm:searchBlock:campaignType')).value();
+                        if (campaignTemp1 !="" && campaignTemp1 != undefined && campaignTemp1 != campaignTemp2) {
+                            if (confirm("閫夋嫨鐨勫浼氱被鍨嬩笌鐢宠鍗曚腑鐨勫浼氱被鍨嬩笉涓�鑷达紝璇风‘璁ゆ槸鍚︽洿鏂帮紵")) {
+                                j$("[id*='changeCampaignType']").val(true);
+                            } else {
+                                j$("[id*='changeCampaignType']").val(false);
+                            }
+                        }
+                        return true;
+                    }
+                }
+                return false;
+            }
+
+            function confirmSpecial() {
+                var queenType = '{!sonObj.QuenType__c}';
+                if (queenType=='鐗规畩鎺掗槦') {
+                    if(confirm("宸插弬涓庣壒娈婃帓闃燂紝鏄惁缁х画锛�")){
+                        return true;
+                    }
+                } else if (queenType=='榛樿鎺掗槦') {
+                    if(confirm("宸插弬涓庨粯璁ゆ帓闃燂紝鏄惁缁х画锛�")){
+                        return true;
+                    }
+                } else {
+                    if(confirm("鏄惁鐗规畩鎺掗槦锛�")){
+                        return true;
+                    }
+                }
+                return false;
+            }
+
+            // 20210817 ljh add
+            function changeCancleReasonJs(){
+                var Cancel_Reason = j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Cancel_Reason')).value();
+                if((Cancel_Reason != null && Cancel_Reason == '涓诲姩鍙栨秷') || Cancel_Reason == ''){
+                    j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).val('');
+                    j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).attr('disabled',true);
+                }else if(Cancel_Reason != null && Cancel_Reason == '閲嶆柊鍒嗛厤'){
+                    j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).attr('disabled',false);
+                }
+            }
+            function changeReasonJs(){
+                var reason = j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_reason')).value();
+                if(reason != null && reason == '鍏朵粬'){
+                    j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).attr('disabled',false);
+                }else{
+                    j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).val('');
+                    j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).attr('disabled',true);
+                }    
+            }
+            // 20210817 ljh add end
+            //add by rentx 20210813 start SFDC-C448KZ
+            //1.榛樿璁剧疆"鍙栨秷澶囨敞鐞嗙敱"涓嶅彲缂栬緫
+            j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).attr('disabled',true);
+            //璁剧疆鏄庣粏琛岀殑涓嶅彲缂栬緫
+            j$(".dataCellBorder1.col_Loaner_cancel_Remarks__c input").each(function () {
+                //璁剧疆鍙
+                j$(this).prop('disabled', true)
+            });
+            //2.璁剧疆鍙湁鏄庣粏鍙栨秷鐞嗙敱涓� '鍏朵粬' 鏃� 鍙栨秷鐞嗙敱澶囨敞 鍙紪杈�
+            //璁剧疆褰撴槑缁嗗彇娑堝師鍥犱负 鍏朵粬鏃跺彲缂栬緫
+            j$(".dataCellBorder1.col_Loaner_cancel_reason__c span").each(function () {
+                //鍒ゆ柇褰撳墠鏍囩涓嬬殑select鏍囩鍊兼槸鍚︿负鍙栨秷--
+                // var aaa = j$(this);
+                var Loaner_cancel_reason = j$(this).children()[0].value;
+                if (Loaner_cancel_reason == '鍏朵粬') {
+                    //鎷垮埌杈撳叆妗� 璁剧疆鍙互缂栬緫
+                    j$(this).parent().parent().find("input[type=text]").prop("disabled",false);
+                    j$(this).parent().parent().find("input[type=text]").prop("required","required");
+                }
+            });
+
+            //涓烘槑缁嗗彇娑堝師鍥犳坊鍔燾hange鏃堕棿 濡傛灉鍙樹负鍏朵粬 鍒欒缃彲缂栬緫 鍙嶄箣璁剧疆涓嶅彲缂栬緫
+            j$(".dataCellBorder1.col_Cancel_Reason__c").on("change", function () {
+                //鍒ゆ柇褰撳墠鏍囩涓嬬殑select鏍囩鍊兼槸鍚︿负鍙栨秷--
+                var Cancel_Reason = j$(this).children()[0].value;
+                if((Cancel_Reason != null && Cancel_Reason == '涓诲姩鍙栨秷') ||Cancel_Reason == ''){
+                    //娓呯┖杈撳叆妗� 璁剧疆涓嶅彲缂栬緫
+                    j$(this).parent().find("input[type=text]").val('');
+                    j$(this).parent().find("input[type=text]").prop("disabled",true);
+                }else if(Cancel_Reason != null && Cancel_Reason == '閲嶆柊鍒嗛厤'){
+                    j$(this).parent().find("input[type=text]").prop("disabled",false);
+                }
+            });
+            j$(".dataCellBorder1.col_Loaner_cancel_reason__c span").on("change", function () {
+                //鍒ゆ柇褰撳墠鏍囩涓嬬殑select鏍囩鍊兼槸鍚︿负鍙栨秷--
+                var Loaner_cancel_reason = j$(this).children()[0].value;
+                if (Loaner_cancel_reason == '鍏朵粬') {
+                    //鎷垮埌杈撳叆妗� 璁剧疆鍙互缂栬緫
+                    j$(this).parent().parent().find("input[type=text]").prop("disabled",false);
+                }else{
+                    //娓呯┖杈撳叆妗� 璁剧疆涓嶅彲缂栬緫
+                    j$(this).parent().parent().find("input[type=text]").val('');
+                    j$(this).parent().parent().find("input[type=text]").prop("disabled",true);
+                }
+            });
+        </script>
+        <!-- add by rentx 20210813 end SFDC-C448KZ -->
+    </apex:outputPanel>
+
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/QueuePageByAssetId.page b/force-app/main/default/pages/QueuePageByAssetId.page
index c35e4f5..5530ad9 100644
--- a/force-app/main/default/pages/QueuePageByAssetId.page
+++ b/force-app/main/default/pages/QueuePageByAssetId.page
@@ -61,6 +61,7 @@
             </apex:pageBlockSection>
             <!-- <apex:commandButton onclick="lineMoveUp();return false;" value="涓�"/> -->
             <!-- <apex:commandButton onclick="lineMoveDown();return false;" value="涓�"/> -->
+            <input type="hidden" name="hidden" /> <!-- 20230610 ljh 涓轰簡鎸夐挳瀵归綈 -->
             <apex:commandButton onclick="lineMoveTopUp();return false;" value="缃《"/>
             <apex:commandButton onclick="lineMoveTopDown();return false;" value="缃簳"/>
             <apex:commandButton value="鐢宠鍗曠疆椤�" reRender="allForm,message" onclick="blockme();" action="{!upRentalApply}" oncomplete="unblockUI();" rendered="{!!isNotShow}" />
diff --git a/force-app/main/default/pages/QueuePageByAssetId.page.bak b/force-app/main/default/pages/QueuePageByAssetId.page.bak
new file mode 100644
index 0000000..c35e4f5
--- /dev/null
+++ b/force-app/main/default/pages/QueuePageByAssetId.page.bak
@@ -0,0 +1,184 @@
+<!-- 20230526 ljh lightning -->
+<!-- <apex:page controller="QueuePageByAssetIdController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true"> -->
+<apex:page controller="QueuePageByAssetIdController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true">
+    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+    <apex:stylesheet value="{!URLFOR($Resource.QueuePageByAssetIdCss)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
+    <style>
+        /* 20230526 ljh lightning start */
+        /* table.list{
+            width: 100%!important;
+        } */
+        body .detailList .dataCol input[type="text"]{min-width: 60px;width:60px;}
+        /* 20230526 ljh lightning end */
+    </style>
+    <script type="text/javascript">
+        var heightAjustment = 120;
+        var widthAjustment = 30;
+    </script>
+    <apex:form id="allForm">
+    <apex:outputPanel id="message">
+        <apex:pageMessages />
+    </apex:outputPanel>
+    <!-- <apex:actionFunction action="{!saveQueue}" name="saveQueue();" oncomplete="unblockUI();"/> -->
+    <apex:inputHidden value="{!inputUpDownFlag}" id="hiddenFlag"/>
+    <apex:inputHidden value="{!inptNum}" id="hiddenNum"/>
+    <apex:outputPanel id="pageallPanel">
+        <apex:pageBlock id="searchBlock" tabStyle="Asset">
+            <apex:pageBlockSection columns="3" id="aa">
+                <apex:outputPanel >
+                <apex:outputText value="闃熷垪淇℃伅:"/>
+                </apex:outputPanel>
+                <apex:outputPanel >
+                </apex:outputPanel>
+                <apex:outputPanel >
+                </apex:outputPanel>
+                <!-- ++++ -->
+                <apex:outputPanel >
+                    <!-- 20211104 ljh 鎺掗槦 start-->
+                    <!-- <apex:outputText value="{!$ObjectType.Asset.Fields.Fixture_Model_No_F__c.Label + ':'}"/><apex:outputField value="{!aset.Fixture_Model_No_F__c}"/> -->
+                    <apex:outputText value="{!$ObjectType.Asset.Fields.Fixture_Model_No_F__c.Label + ':'}"/><apex:outputField value="{!raesd.Fixture_Model_No_F__c}"/>
+                    <!-- 20211104 ljh 鎺掗槦 end-->
+                </apex:outputPanel>
+                <apex:outputPanel >
+                    <apex:outputText value="澶囧搧瀛樻斁鍦�:"/><apex:outputField value="{!raesd.Internal_asset_location_before__c}"/>
+                </apex:outputPanel>
+                <apex:outputPanel >
+                    <apex:outputText value="浜у搧鍒嗙被(GI/SP):"/><apex:outputField value="{!raesd.Product_category_text__c}"/>
+                </apex:outputPanel>
+                <apex:outputPanel >
+                    <apex:outputText value="鎵�鍦ㄥ湴鍖�(鏈儴):"/><apex:outputField value="{!raesd.Salesdepartment_before__c}"/>
+                </apex:outputPanel>
+                <apex:outputPanel >
+                    <apex:outputText value="澶囧搧鍒嗙被:"/><apex:outputField value="{!raesd.Equipment_Type_text__c}"/>
+                </apex:outputPanel>
+                <apex:outputPanel >
+                    <apex:outputText value="鎸囧畾鎺掗槦NO.:"/><apex:inputText id="strNum" value="{!inptNumStr}" onChange="changeNum();return false;"/>
+                </apex:outputPanel>
+                <!-- 20211104  鎺掗槦 add end-->
+            </apex:pageBlockSection>
+            <!-- <apex:commandButton onclick="lineMoveUp();return false;" value="涓�"/> -->
+            <!-- <apex:commandButton onclick="lineMoveDown();return false;" value="涓�"/> -->
+            <apex:commandButton onclick="lineMoveTopUp();return false;" value="缃《"/>
+            <apex:commandButton onclick="lineMoveTopDown();return false;" value="缃簳"/>
+            <apex:commandButton value="鐢宠鍗曠疆椤�" reRender="allForm,message" onclick="blockme();" action="{!upRentalApply}" oncomplete="unblockUI();" rendered="{!!isNotShow}" />
+            <apex:commandButton value="淇濆瓨鎺掗槦" reRender="allForm,message" onclick="blockme();" style="margin-left:400px;" action="{!saveQueue}" oncomplete="unblockUI();"/>
+        </apex:pageBlock>
+        
+        <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true" isRadio="true" tabStyle="Report" />
+    </apex:outputPanel>
+    </apex:form>
+    <script type="text/javascript">
+        /*function disableCheckboxJs(){
+            var ele = j$(".dataCellBorder1.col_Allow_Adjust_Queue_Flag__c");
+            if (ele.length) {
+                var i = 0;
+
+                ele.each(function () {
+                    var value = j$(this).children("span")[0].innerText;
+                    if(value == 'false'){
+                        j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + i + ':rowRadioCheck')).disabled = true;
+                    }
+                    i = i + 1;
+                })
+            }
+        }*/
+
+        function lineMoveUp() {
+            var i = 1;
+            var line = 0;
+            var nowitem;
+            j$(".rowchkcls:checkbox").each(function() {
+                nowitem = j$(this);
+                if (this.checked == true) {
+                    line = i;
+                    //break;
+                    return false
+                }
+                i++;
+            });
+            if (line > 0) {
+                var hiddenFlag = document.getElementById('allPage:allForm:hiddenFlag');
+                var hiddenNum = document.getElementById('allPage:allForm:hiddenNum');
+                hiddenNum.value = i - 1;
+                hiddenFlag.value = true;
+                return resetOrderNoMoveUpDown(true, line);
+            }
+        }
+        function lineMoveDown() {
+            var i = 1;
+            var line = 0;
+            j$(".rowchkcls:checkbox").each(function() {
+                nowitem = j$(this);
+                if (this.checked == true) {
+                    line = i;
+                    //break;
+                    return false
+                }
+                i++;
+            });
+            if (line > 0) {
+                var hiddenFlag = document.getElementById('allPage:allForm:hiddenFlag');
+                var hiddenNum = document.getElementById('allPage:allForm:hiddenNum');
+                hiddenNum.value = i + 1;
+                hiddenFlag.value = false;
+                return resetOrderNoMoveUpDown(false, line);
+            }
+        }
+        function lineMoveTopUp() {
+            var i = 1;
+            var line = 0;
+            var nowitem;
+            j$(".rowchkcls:checkbox").each(function() {
+                nowitem = j$(this);
+                if (this.checked == true) {
+                    line = i;
+                    //break;
+                    return false
+                }
+                i++;
+            });
+            if (line > 0) {
+                var hiddenFlag = document.getElementById('allPage:allForm:hiddenFlag');
+                var hiddenNum = document.getElementById('allPage:allForm:hiddenNum');
+                hiddenNum.value = 1;
+                hiddenFlag.value = true;
+                return resetOrderNoMoveTopUpDown(true, line);
+            }
+        }
+        function lineMoveTopDown() {
+            var i = 1;
+            var line = 0;
+            j$(".rowchkcls:checkbox").each(function() {
+                nowitem = j$(this);
+                if (this.checked == true) {
+                    line = i;
+                    //break;
+                    return false
+                }
+                i++;
+            });
+            if (line > 0) {
+                var hiddenFlag = document.getElementById('allPage:allForm:hiddenFlag');
+                var hiddenNum = document.getElementById('allPage:allForm:hiddenNum');
+                // 涓轰簡鍖哄垎淇濆瓨鎺掗槦澶囨敞鐨勬儏鍐碉紝姝ゅ缁欐帓闃烴o璁剧疆锛屼絾鍚庡彴澶勭悊鏃朵笉浣跨敤
+                hiddenNum.value = 99;
+                hiddenFlag.value = false;
+                return resetOrderNoMoveTopUpDown(false, line);
+            }
+        }
+        function changeNum() {
+            var numStr = document.getElementById('allPage:allForm:searchBlock:aa:strNum').value;
+            if (numStr === undefined || numStr === '') {
+                return;
+            } else {
+                var hiddenFlag = document.getElementById('allPage:allForm:hiddenFlag');
+                var hiddenNum = document.getElementById('allPage:allForm:hiddenNum');
+                hiddenNum.value = numStr;
+                hiddenFlag.value = true;
+            }
+        }
+    </script>
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/ReantalApplySeriesNo.page b/force-app/main/default/pages/ReantalApplySeriesNo.page
index 5907b92..a3f1bf6 100644
--- a/force-app/main/default/pages/ReantalApplySeriesNo.page
+++ b/force-app/main/default/pages/ReantalApplySeriesNo.page
@@ -1,12 +1,11 @@
 <!-- <apex:page controller="ReantalApplySeriesNoController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="搴忓垪鏌ョ湅"> -->
 <apex:page controller="ReantalApplySeriesNoController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="搴忓垪鏌ョ湅" lightningStylesheets="true">
 <!-- 20230525 ljh lightning -->
-<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
     <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
     <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
-    <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
-    <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
-    <apex:stylesheet value="{!URLFOR($Resource.listTable)}"/><!-- 20230525 ljh lightning  -->
+    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+    <apex:stylesheet value="{!URLFOR($Resource.listTable)}"/>
+    <!-- 20230525 ljh lightning  -->
     <style type="text/css">
     .bPageBlock .detailList .dataCol {
         width: auto;
@@ -26,6 +25,7 @@
         }
     </script>
     <apex:form id="allForm">
+        <apex:outputPanel id="pageallPanel">
         <apex:pageBlock id="searchBlock" title="搴忓垪淇℃伅">
             <!-- 20230525 ljh lightning start -->
             <!-- <apex:pageBlockSection columns="3" id="mainSection">
@@ -54,26 +54,27 @@
                     <apex:outputText value="{!IF(Isadmix,'娣峰悎','鍗曚竴')}"/>
                 </apex:pageBlockSectionItem>
             </apex:pageBlockSection> -->
-            <table style="width:100%;margin:10px 0;" >
+            <table style="width:100%;margin:10px 0;" class="detailList" border="0" cellpadding="0" cellspacing="0" >
                 <tr>
-                    <td>鍨嬪彿:</td>
-                    <td>{!raq.Fixture_Model_No__c}</td>
-                    <td>澶囧搧瀛樻斁鍦�:</td>
-                    <td>{!raq.Internal_asset_location__c}</td>
-                    <td>鏈儴:</td>
-                    <td>{!raq.Salesdepartment__c}</td>
+                    <td align="right" style="padding-right:5px;">鍨嬪彿:</td>
+                    <td align="left" >{!raq.Fixture_Model_No__c}</td>
+                    <td align="right" style="padding-right:5px;">澶囧搧瀛樻斁鍦�:</td>
+                    <td align="left" >{!raq.Internal_asset_location__c}</td>
+                    <td align="right" style="padding-right:5px;">鏈儴:</td>
+                    <td align="left" >{!raq.Salesdepartment__c}</td>
                 </tr>
                 <tr>
-                    <td>澶囧搧鍒嗙被:</td>
-                    <td>{!raq.Equipment_Type__c}</td>
-                    <td>浜у搧鍒嗙被:</td>
-                    <td>{!raq.Product_category__c}</td>
-                    <td>搴忓垪绫诲瀷:</td>
-                    <td>{!IF(Isadmix,'娣峰悎','鍗曚竴')}</td>
+                    <td align="right" style="padding-right:5px;">澶囧搧鍒嗙被:</td>
+                    <td align="left" >{!raq.Equipment_Type__c}</td>
+                    <td align="right" style="padding-right:5px;">浜у搧鍒嗙被:</td>
+                    <td align="left" >{!raq.Product_category__c}</td>
+                    <td align="right" style="padding-right:5px;" >搴忓垪绫诲瀷:</td>
+                    <td align="left" >{!IF(Isadmix,'娣峰悎','鍗曚竴')}</td>
                 </tr>
             </table>
             <!-- 20230525 ljh lightning end -->
         </apex:pageBlock>
+        </apex:outputPanel>
         <apex:outputPanel id="message">
             <apex:pageMessages />
         </apex:outputPanel>
diff --git a/force-app/main/default/pages/ReantalApplySeriesNo.page.bak b/force-app/main/default/pages/ReantalApplySeriesNo.page.bak
new file mode 100644
index 0000000..5907b92
--- /dev/null
+++ b/force-app/main/default/pages/ReantalApplySeriesNo.page.bak
@@ -0,0 +1,156 @@
+<!-- <apex:page controller="ReantalApplySeriesNoController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="搴忓垪鏌ョ湅"> -->
+<apex:page controller="ReantalApplySeriesNoController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="搴忓垪鏌ョ湅" lightningStylesheets="true">
+<!-- 20230525 ljh lightning -->
+<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
+    <apex:stylesheet value="{!URLFOR($Resource.listTable)}"/><!-- 20230525 ljh lightning  -->
+    <style type="text/css">
+    .bPageBlock .detailList .dataCol {
+        width: auto;
+    }
+    .table-head{padding-right:17px;}
+    .tablehead0{padding-right:0;}
+    .table-body table tr:nth-child(2n){background-color:#f2f2f2;}
+    </style>
+    <script>
+        // window.onload = () => {
+        window.onload = function gunzhou(){
+            if(j$('#tablebody').height() >= 270){
+                j$('#table-head').addClass("table-head");
+            }else{
+                j$('#table-head').addClass("tablehead0");
+            }
+        }
+    </script>
+    <apex:form id="allForm">
+        <apex:pageBlock id="searchBlock" title="搴忓垪淇℃伅">
+            <!-- 20230525 ljh lightning start -->
+            <!-- <apex:pageBlockSection columns="3" id="mainSection">
+                <apex:pageBlockSectionItem >
+                    <apex:outputLabel value="鍨嬪彿:" />
+                    <apex:outputField value="{!raq.Fixture_Model_No__c}"/>
+                </apex:pageBlockSectionItem>
+                <apex:pageBlockSectionItem >
+                    <apex:outputLabel value="澶囧搧瀛樻斁鍦�:"/>
+                    <apex:outputField value="{!raq.Internal_asset_location__c}"/>
+                </apex:pageBlockSectionItem>
+                <apex:pageBlockSectionItem >
+                    <apex:outputLabel value="鏈儴:"/>
+                    <apex:outputField value="{!raq.Salesdepartment__c}"/>
+                </apex:pageBlockSectionItem>
+                <apex:pageBlockSectionItem >
+                    <apex:outputLabel value="澶囧搧鍒嗙被:"/>
+                    <apex:outputField value="{!raq.Equipment_Type__c}"/>
+                </apex:pageBlockSectionItem>
+                <apex:pageBlockSectionItem >
+                    <apex:outputLabel value="浜у搧鍒嗙被:"/>
+                    <apex:outputField value="{!raq.Product_category__c}"/>
+                </apex:pageBlockSectionItem>
+                <apex:pageBlockSectionItem >
+                    <apex:outputLabel value="搴忓垪绫诲瀷:"/>
+                    <apex:outputText value="{!IF(Isadmix,'娣峰悎','鍗曚竴')}"/>
+                </apex:pageBlockSectionItem>
+            </apex:pageBlockSection> -->
+            <table style="width:100%;margin:10px 0;" >
+                <tr>
+                    <td>鍨嬪彿:</td>
+                    <td>{!raq.Fixture_Model_No__c}</td>
+                    <td>澶囧搧瀛樻斁鍦�:</td>
+                    <td>{!raq.Internal_asset_location__c}</td>
+                    <td>鏈儴:</td>
+                    <td>{!raq.Salesdepartment__c}</td>
+                </tr>
+                <tr>
+                    <td>澶囧搧鍒嗙被:</td>
+                    <td>{!raq.Equipment_Type__c}</td>
+                    <td>浜у搧鍒嗙被:</td>
+                    <td>{!raq.Product_category__c}</td>
+                    <td>搴忓垪绫诲瀷:</td>
+                    <td>{!IF(Isadmix,'娣峰悎','鍗曚竴')}</td>
+                </tr>
+            </table>
+            <!-- 20230525 ljh lightning end -->
+        </apex:pageBlock>
+        <apex:outputPanel id="message">
+            <apex:pageMessages />
+        </apex:outputPanel>
+        <apex:pageBlock id="raqList" title="鏌ョ湅搴忓垪鎯呭喌">
+        <div class="" id="table-head">
+            <table class="list" border="0" cellpadding="0" cellspacing="0" width="100%" >
+                <colgroup>
+                <col width="4%" />
+                <col width="4%" />
+                <col width="10%" />
+                <col width="10%"/>
+                <col width="8%"/>
+                <col width="8%"/>
+                <col width="7%"/>
+                <col width="10%"/>
+                <col width="8%"/>
+                <col width="5%"/>
+                <col width="13%"/>
+                <col width="13%"/>
+                </colgroup>
+                <thead>
+                <tr class="headerRow" >
+                    <th style="padding-bottom: 6px;">搴忓垪鍙�</th>
+                    <th style="padding-bottom: 6px;">鎺掗槦NO.</th> 
+                    <th style="padding-bottom: 6px;">鐢宠鍗昇O.</th> 
+                    <th style="padding-bottom: 6px;">鎺掗槦鏃堕棿</th>
+                    <th style="padding-bottom: 6px;">鐢宠鑰呭姙浜嬪</th> 
+                    <th style="padding-bottom: 6px;">澶囧搧鍑哄�熸媴褰�</th> 
+                    <th style="padding-bottom: 6px;">甯屾湜鍒拌揣鏃�</th>
+                    <th style="padding-bottom: 6px;">鎵瑰噯鏃堕棿</th> 
+                    <th style="padding-bottom: 6px;">浣跨敤鐩殑2</th> 
+                    <th style="padding-bottom: 6px;">璐熻矗浜�</th>
+                    <th style="padding-bottom: 6px;">鍖婚櫌</th> 
+                    <th style="padding-bottom: 6px;">瀛︿細</th> 
+                </tr>
+                </thead>
+                </table>
+            </div>
+            <div class="table-body" id="table-body" style="height: 270px;overflow-y:auto;">
+            <table class="list" border="0" cellpadding="0" cellspacing="0" id="tablebody">
+                <colgroup>
+                <col width="4%" />
+                <col width="4%" />
+                <col width="10%" />
+                <col width="10%"/>
+                <col width="8%"/>
+                <col width="8%"/>
+                <col width="7%"/>
+                <col width="10%"/>
+                <col width="8%"/>
+                <col width="5%"/>
+                <col width="13%"/>
+                <col width="13%"/>
+                </colgroup>
+                <tbody>
+                <apex:repeat value="{!raqList}" var="info"  id="info">
+                <tr height="48px">
+                <!-- <apex:outputLink value="/{!info.Id}">{!info.Series_No__c}</apex:outputLink>-->
+                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Series_No__c}"/></td>
+                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Apply_Set_Detail__r.Queue_Number__c}"/></td>            
+                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__c}"/></td>
+                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Apply_Set_Detail__r.Queue_Time_F__c}"/></td>
+                    <apex:outputPanel layout="none"> 
+                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.WorkPlace__c}"/></td>
+                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.Person_In_Charge__c}"/></td>
+                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.Request_shipping_day__c}"/></td>
+                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.Request_approval_time__c}"/></td>
+                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.demo_purpose2__c}"/></td>
+                    </apex:outputPanel>
+                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Apply_Set_Detail__r.Queue_User__c}"/></td>
+                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.Hospital__c}"/></td>
+                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.Campaign__c}"/></td>
+                </tr>
+                </apex:repeat>
+                </tbody>
+            </table>
+        </div>
+        </apex:pageBlock>
+    </apex:form>
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/RentalApplyExtensions.page b/force-app/main/default/pages/RentalApplyExtensions.page
index bc2787f..6457952 100644
--- a/force-app/main/default/pages/RentalApplyExtensions.page
+++ b/force-app/main/default/pages/RentalApplyExtensions.page
@@ -9,12 +9,12 @@
         <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
         <!-- 20230614 ljh lightning start -->
         <style type="text/css">
-            table.list .col_Name  {width:150px;}
-            table.list .col_First_RAESD_Model_No_F__c  {width:100px;}
+            table.list .col_Name  {width:200px;}
+            table.list .col_First_RAESD_Model_No_F__c  {width:140px;}
             table.list .col_Set_Managment_Code__c  {width:90px;}
             table.list .col_SerialNumber_F__c  {width:80px;}
             table.list .col_Loaner_Set_No__c  {width:90px;}
-            table.list .col_RAES_Status__c  {width:90px;} 
+            table.list .col_RAES_Status__c  {width:150px;} 
             body .pbSubsection{
                 padding-bottom: 0;
                 padding-top: 0;
diff --git a/force-app/main/default/pages/RentalApplyExtensions.page.bak b/force-app/main/default/pages/RentalApplyExtensions.page.bak
new file mode 100644
index 0000000..bc2787f
--- /dev/null
+++ b/force-app/main/default/pages/RentalApplyExtensions.page.bak
@@ -0,0 +1,56 @@
+<!--20230420 zq 鍔犲3  <apex:page controller="RentalApplyExtensionsController" showHeader="false" sidebar="false" action="{!init}" id="allPage" > -->
+<apex:page controller="RentalApplyExtensionsController" showHeader="false" sidebar="false" action="{!init}" id="allPage" lightningStylesheets="true">
+    <head>
+        <title>澶囧搧鍊熷嚭鐢宠寤舵湡</title>
+        <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+        <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+        <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+        <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
+        <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
+        <!-- 20230614 ljh lightning start -->
+        <style type="text/css">
+            table.list .col_Name  {width:150px;}
+            table.list .col_First_RAESD_Model_No_F__c  {width:100px;}
+            table.list .col_Set_Managment_Code__c  {width:90px;}
+            table.list .col_SerialNumber_F__c  {width:80px;}
+            table.list .col_Loaner_Set_No__c  {width:90px;}
+            table.list .col_RAES_Status__c  {width:90px;} 
+            body .pbSubsection{
+                padding-bottom: 0;
+                padding-top: 0;
+            }
+            body .pbSubsection > .detailList:first-child{
+                margin-top: 0;
+            }
+        </style>
+        <!-- 20230614 ljh lightning end -->
+    </head>
+    <apex:form id="allForm">
+        <apex:outputPanel id="message">
+            <apex:pageMessages />
+        </apex:outputPanel>
+        <apex:actionFunction name="submitExtensionRequest" action="{!submitExtensionRequest}" rerender="allForm" oncomplete="unblockUI();"/>
+        <apex:outputPanel id="pageallPanel">
+            <apex:pageBlock id="searchBlock" tabStyle="Report">
+                <apex:pageBlockSection title="澶囧搧鍊熷嚭鐢宠" id="mainSection">
+                </apex:pageBlockSection>
+                <table style="width:800px;float:right;margin-top: 8px" >
+                    <tr>
+                        <td style="width:450px;">
+                            <apex:commandButton value="鎻愪氦寤舵湡鐢宠" onclick="if (window.confirm('鏄惁鎻愪氦寤舵湡鐢宠?')) {blockme(); submitExtensionRequest();}return false;"/>
+                        </td>
+                        <td style="width:450px;">
+                            <apex:outputPanel rendered="{!if( buttonFlag , 'true','false')}" > 
+                                <input type="submit" value="鍏抽棴" class="btn" onclick="window.close();"/>
+                            </apex:outputPanel>
+                            <apex:outputPanel rendered="{!if( buttonFlag , 'false','true')}" > 
+                                <apex:commandButton value="杩斿洖" action="{!comeBack}" />
+                            </apex:outputPanel>
+                        </td>
+                    </tr>
+                </table>
+            </apex:pageBlock>
+            <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true" isRadio="false"/>
+        </apex:outputPanel>
+    </apex:form>
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/RentalApplySequence.page b/force-app/main/default/pages/RentalApplySequence.page
index 699fdfa..d6c1e6c 100644
--- a/force-app/main/default/pages/RentalApplySequence.page
+++ b/force-app/main/default/pages/RentalApplySequence.page
@@ -73,6 +73,10 @@
         overflow: hidden;
         text-overflow: ellipsis;
     }
+    /* 20230802 ljh */
+    body .bPageBlock .detailList .dataCol{
+        width: 8%;
+    }
 </style>
 <script>
     // 婊氳酱鏄惁鏄剧ず
diff --git a/force-app/main/default/pages/RentalApplySequence.page.bak b/force-app/main/default/pages/RentalApplySequence.page.bak
new file mode 100644
index 0000000..699fdfa
--- /dev/null
+++ b/force-app/main/default/pages/RentalApplySequence.page.bak
@@ -0,0 +1,452 @@
+<!--
+ * @Description: 澶囧搧鎺掗槦灞曠ず鍖呭惈闃熷垪淇℃伅鍜屽簭鍒椾俊鎭�
+ * @Author: [lijinhuan]
+ * @Date: 2021-10-26 14:15:03
+ * @LastEditors: [lijinhuan]
+ * @LastEditTime: 2023-06-06 13:04:33
+-->
+<!-- 20230522 ljh lightning  -->
+<!-- <apex:page controller="RentalApplySequenceController"  showHeader="false" sidebar="false" id="allPage" action="{!init}" title="鎺掗槦鏌ョ湅"> -->
+<apex:page controller="RentalApplySequenceController"  showHeader="false" sidebar="false" id="allPage" action="{!init}" title="鎺掗槦鏌ョ湅" lightningStylesheets="true">  
+<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230525 ljh lightning  -->
+<style type="text/css">
+    .hideDropdown select{
+        display: none
+    }
+    .table-head{padding-right:17px;}
+    .tablehead0{padding-right:0;}
+    .table-body table tr:nth-child(2n){background-color:#f2f2f2;}
+    /*浠ヤ笅鏄笅鎷夊閫夋鐨勬牱寮�  start*/
+    * {
+        margin: 0;
+        padding: 0;
+        box-sizing: border-box;
+    }
+    .nav {
+        width: 180px;/*20230606 ljh*/
+        line-height: 30px;/*20230606 ljh*/
+        /* border: 1px solid #000; *//*20230610 ljh*/
+        -webkit-user-select: none;
+        -moz-user-select: none;
+        -ms-user-select: none;
+        user-select: none;
+        position: absolute;
+        top: 0;
+        right: 0;
+        left: 0;
+        margin: 0;
+        z-index: 9999;
+        display: inline-block;
+        border-radius: 0.25rem;/*20230607 ljh*/
+        border: 1px solid rgb(201, 201, 201);/*20230610 ljh lightning*/
+    }
+    ul,
+    li {
+        list-style: none;
+    }
+    .nav li input {
+        margin: 0px 3px 0px 3px;
+    }
+
+    .nav li p:hover {
+        background: #1e90ff;
+        color: #fff;
+    }
+    .nav_a li input {
+        margin: 0px 3px 0px 3px;
+    }
+
+    .nav_a li p:hover {
+        background: #1e90ff;
+        color: #fff;
+    }
+    #classification {
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+    #classification_a {
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+</style>
+<script>
+    // 婊氳酱鏄惁鏄剧ず
+    window.onload = function gunzhou(){
+    // window.onload = () => {
+        gzShow();
+    }
+    function gzShow(){
+        // console.log(j$('#tablebody').height());
+        if(j$('#tablebody').height() >= 270){
+            j$('#table-head').addClass("table-head");
+        }else{
+            j$('#table-head').addClass("tablehead0");
+        }
+    }
+    //涓嬫媺澶氶�夋  strat
+    j$(document).bind("click",function(e){
+        var e = e || window.event;    //浜嬩欢瀵硅薄锛屽吋瀹笽E
+        var target = e.target || e.srcElement;  //婧愬璞★紝鍏煎鐏嫄鍜孖E
+        while(target){
+            // console.log(target.id);
+            if (target.id && (target.id == "nav" ||target.id == "nav_a")){   
+             //寰幆鍒ゆ柇鑷虫牴鑺傜偣锛岄槻姝㈢偣鍑荤殑鏄�#selected鍜屽畠鐨勫瓙鍏冪礌
+                return;
+            }
+           target = target.parentNode;
+        }
+        j$("#selectCheckId").hide();   //鐐瑰嚮鐨勪笉鏄�#selected鍜屽畠鐨勫瓙鍏冪礌锛岄殣钘忎笅鎷夎彍鍗�
+        j$("#selectCheckId_a").hide();
+    })
+    
+    //閫夋嫨澶囧搧瀛樻斁鍦� 涓嬫媺妗嗗�兼湁鍙樺姩浠ュ悗瑙﹀彂
+    function selectCunFangDiJs(Obj){
+        var selectId = Obj.value;
+        //濡傛灉澶囧搧瀛樻斁鍦伴�夋嫨鏃�
+        // console.log('00:'+selectId);
+        //娑堥櫎閫夋嫨鐨勫叾浠栭�夐」
+        if(j$("#classification").children().text() != "--鏃�--"){
+            j$("#classification").children().remove();
+            j$("#classification").append("<span class='valClass_CF' id='initial'>--鏃�--</span>");
+        }
+        var inputObj = j$(".li-input");
+        if(inputObj != null){
+            for(var i = 0; i < inputObj.length;i++){
+                if(inputObj[i].checked){
+                    inputObj[i].checked = false;
+                }
+            }
+        }
+        j$("#selectCheckId").show();
+        // j$("#selectCheckId_a").hide();        
+    }
+    //鐐瑰嚮 鏈儴閫夋嫨
+    function selectBenBu(obj,name){
+        var checked1 = j$(obj).prop("checked");
+        if (checked1 == true) {
+            j$("#classification").children("#initial").remove();
+            var idTemp = j$(obj).value().trim();
+            idTemp = 'Id'+idTemp.split('.')[0];
+            j$("#classification").append("<span class='valClass' id='" + (idTemp) + "'>" + (j$(obj)
+                .value().trim() + ",") + "</span>");
+        } else {
+            var idTemp = 'Id'+name.split('.')[0];
+            j$("#classification").children("#" + (idTemp)).remove();
+            var length = j$("#classification").html().length;
+            if (length === 0) {
+                j$("#classification").append("<span class='valClass' id='initial'>--鏃�--</span>");
+            }
+        }
+        var optioncheck = j$(".valClass");
+        var hint = '';
+        for(var i = 0;i<optioncheck.length;i++){
+            if(optioncheck[i].innerText != '--鏃�--'){
+                hint +=optioncheck[i].innerText;
+            }
+        }
+        // console.log(hint);
+        j$(escapeVfId('allPage:allForm:searchBlock:mainSection:ApplyBB:S_ApplyBenBu')).val(hint);
+    }
+    function navClose(){
+        j$("#selectCheckId").toggle();
+    }
+
+    // 鍔炰簨澶勭偣鍑婚�夋嫨
+    function selectAgency(obj,name){
+        var checked1 = j$(obj).prop("checked");
+        if (checked1 == true) {
+            j$("#classification_a").children("#initial_a").remove();
+            var idTemp = j$(obj).value().trim();
+            idTemp = 'Id'+idTemp.split('.')[0];
+            j$("#classification_a").append("<span class='valClass_a' id='" + (idTemp) + "'>" + (j$(obj)
+                .value().trim() + ",") + "</span>");
+        } else {
+            var idTemp = 'Id'+name.split('.')[0];
+            j$("#classification_a").children("#" + (idTemp)).remove();
+            var length = j$("#classification_a").html().length;
+            if (length === 0) {
+                j$("#classification_a").append("<span class='valClass_a' id='initial_a'>--鏃�--</span>");
+            }
+        }
+        var optioncheck = j$(".valClass_a");
+        var hint = '';
+        for(var i = 0;i<optioncheck.length;i++){
+            if(optioncheck[i].innerText != '--鏃�--' ){
+                hint +=optioncheck[i].innerText;
+            }
+        }
+        j$(escapeVfId('allPage:allForm:searchBlock:mainSection:ApplyAA:S_Agency')).val(hint);
+    }
+    function navClose_a(){
+        j$("#selectCheckId_a").toggle();
+    }
+
+    function searchJs() {
+        blockme();
+        searchfunc();
+    }
+    function checkEventJs(obj){
+        blockme();
+        j$(escapeVfId('allPage:allForm:checkEventId')).val(obj);
+        checkEvent();
+    }
+</script>
+<apex:form id="allForm">
+    <apex:actionFunction name="changeCunfangdi" rerender="S_bieBenBuApply" oncomplete="unblockUI();"/>
+    <!-- <apex:actionFunction name="changebenbu" rerender="S_AgencyApply" oncomplete="unblockUI();"/> -->
+    <apex:actionFunction name="searchfunc" action="{!searchBtn}" rerender="MySequence,checEventFrame" onComplete="gzShow();unblockUI();"/>
+    <apex:actionFunction name="recordNumChangeAction" action="{!recordNumChange}" rerender="MySequence" oncomplete="unblockUI();">
+    </apex:actionFunction>
+    <apex:actionFunction name="checkEvent" action="{!checkEvent}" rerender="checEventFrame" oncomplete="window.scrollTo(0, 200);unblockUI();">
+    </apex:actionFunction>
+    <apex:inputHidden id="checkEventId" value="{!checkEventId}" /> 
+    <apex:pageBlock id="searchBlock" title="鏌ョ湅鎺掗槦鎯呭喌">
+        <apex:pageBlockSection title="妫�绱�" id="mainSection" columns="4"  >
+             <apex:pageBlockSectionItem >
+                <apex:outputLabel value="鐢宠鍗曞彿" />
+                <apex:inputText id="S_raName" value="{!S_raName}"/>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem >
+                <apex:outputLabel value="鍨嬪彿" />
+                <apex:inputText id="S_Fixture_Model_No" value="{!S_Fixture_Model_No}"/>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem >
+                <apex:outputLabel value="澶囧搧鍑哄�熸媴褰�" />
+                <apex:inputField id="S_Person_In_Charge" value="{!S_Ra_Person.Person_In_Charge__c}" styleClass="hideDropdown" />
+            </apex:pageBlockSectionItem>
+        
+            <apex:pageBlockSectionItem rendered="{!isEquipmentCenter}">
+                <apex:outputLabel for="S_bieBenBu" value="闃熷垪鎵�鍦ㄥ湴鍖烘湰閮�" />
+                <apex:inputText id="S_bieBenBu" value="{!S_bieBenBu}"/>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem rendered="{!isEquipmentCenter}">
+                <apex:outputLabel for="S_bieCunFangDi" value="澶囧搧瀛樻斁鍦�" />
+                <apex:selectList value="{!S_bieCunFangDi}"  onchange="blockme(); changeCunfangdi();selectCunFangDiJs(this);return false;" size="1" style="width:160px" id="S_bieCunFangDi">
+                <apex:selectOptions value="{!bieCunFangDiOps}"/>
+                </apex:selectList>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem rendered="{!!isEquipmentCenter}"></apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem id="ApplyBB">
+                <apex:outputLabel for="S_bieBenBuApply" value="鐢宠浜烘墍灞炴湰閮�" />
+                <apex:outputPanel style="position: absolute; " id="S_bieBenBuApply">
+                    <apex:inputHidden id="S_ApplyBenBu" value="{!S_ApplyBenBu}" />
+                    <ul class="nav" id="nav" style="background-color: #FFFFFF;left:0px;">
+                        <li id="classification" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose();return false;">
+                            <span id="initial">--鏃�--</span>
+                        </li>
+                        <li id="selectCheckId" style="margin-left:0px;display: none;">
+                            <ul style="margin-left:0px;">
+                            <apex:repeat value="{!SApplyBenBu}" var="orr" id="selSD">
+                            <li class="sdclass" style="margin-left:0px">
+                                <p class="ul-nav" name="cate_id[]" >
+                                    <input type="checkbox" value="{!orr.parameterName}" class="li-input" onclick="selectBenBu(this,'{!orr.parameterName}');" style="display: inline-block;vertical-align: middle;" />
+                                    <font style="">{!orr.parameterName}</font>
+                                </p>
+                            </li>
+                            </apex:repeat>
+                            </ul>
+                        </li>
+                    </ul>
+                </apex:outputPanel>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem id="ApplyAA" >
+                <apex:outputLabel for="S_AgencyApply" value="鐢宠鑰呭姙浜嬪" />
+                <apex:outputPanel style="position: absolute; " id="S_AgencyApply">
+                <apex:inputHidden id="S_Agency" value="{!S_Agency}" />
+                <ul class="nav" id="nav_a" style="background-color: #FFFFFF;left:0px;">
+                    <li id="classification_a" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_a();return false;">
+                        <span id="initial_a">--鏃�--</span>
+                    </li>
+                    <li id="selectCheckId_a" style="margin-left:0px;display: none;">
+                        <ul style="margin-left:0px;">
+                        <apex:repeat value="{!SApplyAgency}" var="orr" id="selSD">
+                        <li class="sdclass" style="margin-left:0px">
+                            <p class="ul-nav" name="cate_id[]" >
+                                <input type="checkbox" value="{!orr.parameterName}" class="li-input" onclick="selectAgency(this,'{!orr.parameterName}');" style="display: inline-block;vertical-align: middle;" />
+                                <font style="">{!orr.parameterName}</font>
+                            </p>
+                        </li>
+                        </apex:repeat>
+                        </ul>
+                    </li>
+                </ul>
+            </apex:outputPanel>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem rendered="{!isEquipmentCenter}" >
+                <apex:outputLabel for="S_bieBeiPinFenLei" value="澶囧搧鍒嗙被" />
+                    <apex:selectList value="{!S_bieBeiPinFenLei}" size="1" id="bieBeiPinFenLei" style="width:180px">
+                        <apex:selectOptions value="{!bieBeiPinFenLeiOps}"/>
+                    </apex:selectList>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem rendered="{!isEquipmentCenter}" >
+                <apex:outputLabel for="S_Product_category" value="浜у搧鍒嗙被(GI/SP)" />
+                <apex:selectList value="{!S_Product_category}" size="1" style="width:60px" id="S_Product_category">
+                <apex:selectOptions value="{!bieChanPinFenLeiOps}"/>
+                </apex:selectList>
+            </apex:pageBlockSectionItem>
+            
+            <apex:pageBlockSectionItem >
+                <apex:commandButton style="" value="妫�绱�" onclick="searchJs(); return false;"/>
+            </apex:pageBlockSectionItem> 
+        </apex:pageBlockSection>
+        <!-- 鏁版嵁 -->
+    </apex:pageBlock>
+    <apex:pageBlock id="MySequence">
+    <apex:outputPanel id="message">
+        <apex:pageMessages />
+    </apex:outputPanel>
+    <apex:pageBlockButtons location="top" id="pageBlockButton1">
+    <table align="right" style="width: 700px;">
+        <tr>
+            <td>{!(currPage-1)*selctRecordNum}&nbsp;-&nbsp;{!IF(currPage*selctRecordNum > totalRecords, totalRecords, currPage*selctRecordNum)}</td>
+            <td>&nbsp;&nbsp;鍏眥!totalRecords}涓�</td>
+            <td align="right" width="150px">鏄剧ず
+                <apex:selectList value="{!selRecordOption}" id="selRecordOption" size="1" onchange="blockme();recordNumChangeAction();" disabled="{!IF(totalRecords<20,true,false)}"><apex:selectOptions value="{!recordNum}"/></apex:selectList>鏉¤褰�
+            </td>
+            <td align="right" width="55px">绗瑊!currPage}椤�</td>
+            <td align="right" width="45px">
+                <apex:commandLink action="{!firstPage}" value="棣栭〉" id="firstPg" onclick="blockme();" oncomplete="unblockUI();" reRender="MySequence" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
+                <apex:outputText value="棣栭〉" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
+            </td>
+            <td align="right" width="55px">
+                <apex:commandLink action="{!previousPage}" value="涓婁竴椤�" id="previous" onclick="blockme();" oncomplete="unblockUI();" reRender="MySequence" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
+                <apex:outputText value="涓婁竴椤�" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
+            </td>
+            <td width="3px"></td>
+            <td align="left" width="55px">
+                <apex:commandLink action="{!nextPage}" value="涓嬩竴椤�" id="next" onclick="blockme();" oncomplete="gzShow();unblockUI();" reRender="MySequence" style="{!IF(totalPage==currPage ||totalPage == 0,'display: none;','')}color: blue;"/>
+                <apex:outputText value="涓嬩竴椤�" style="{!IF(totalPage!=currPage && totalPage != 0,'display: none;','')}color: gray;"></apex:outputText>
+            </td>
+            <td align="left" width="45px">
+                <apex:commandLink action="{!endPage}" value="灏鹃〉" id="endPg" onclick="blockme();" oncomplete="gzShow();unblockUI();" reRender="MySequence" style="{!IF(totalPage==currPage||totalPage == 0,'display: none;','')}color: blue;"/>
+                <apex:outputText value="灏鹃〉" style="{!IF(totalPage!=currPage
+                    && totalPage != 0,'display: none;','')}color: gray;"></apex:outputText>
+            </td>
+            <!-- HWAG-B4R3SS  END 20181026-->
+            <td align="left">鍏眥!totalPage}椤�</td>
+        </tr>
+    </table>
+    </apex:pageBlockButtons>
+    <!-- <div  style="height: 270px;overflow-y:auto;"> -->
+        <div class="" id="table-head">
+        <table class="list" border="0" cellpadding="0" cellspacing="0" width="100%"  >
+            <!-- style="table-layout: fixed;" -->
+            <colgroup style="{!IF(isEquipmentCenter,'','display:none;')}" >
+            <col width="10%" />
+            <col width="10%" />
+            <col width="8%" />
+            <!-- 2022015 -->
+            <col width="6%" />
+            <col width="10%"/>
+            <col width="4%"/>
+            <col width="8%"/>
+            <col width="6%"/>
+            <col width="6%"/>
+            <col width="6%"/>
+            <col width="6%"/>
+            <col width="4%"/>
+            <col width="16%"/>
+            </colgroup> 
+            <colgroup style="{!IF(isEquipmentCenter,'display:none;','')}" >
+            <col width="16%" />
+            <col width="16%" />
+            <col width="16%" />
+            <col width="12%" />
+            <col width="10%"/>
+            <col width="10%"/>
+            <col width="10%"/>
+            <col width="10%"/>
+            </colgroup>   
+            <thead>
+            <tr class="headerRow">
+                <th style="padding-bottom: 6px;">鐢宠鍗曞彿No.</th>
+                <th style="padding-bottom: 6px;">涓�瑙圢o.</th>
+                <th style="padding-bottom: 6px;">鍨嬪彿</th>
+                <th style="padding-bottom: 6px;">鎺掗槦澶囧搧<br/>棰勮鍑哄簱鏃堕棿</th> 
+                <th style="padding-bottom: 6px; {!IF(isEquipmentCenter,'','display:none;')}">闃熷垪鎵�鍦ㄥ湴鍖烘湰閮�</th> <!-- 鐢宠浜虹湅涓嶅埌  -->
+                <th style="padding-bottom: 6px;{!IF(isEquipmentCenter,'','display:none;')}">浜у搧鍒嗙被<br/>(GI/SP)</th> <!-- 鐢宠浜虹湅涓嶅埌 -->
+                <th style="padding-bottom: 6px;{!IF(isEquipmentCenter,'','display:none;')}">澶囧搧鍒嗙被</th> <!-- 鐢宠浜虹湅涓嶅埌 -->
+                <th style="padding-bottom: 6px;{!IF(isEquipmentCenter,'','display:none;')}">澶囧搧瀛樻斁鍦�</th> <!-- 鐢宠浜虹湅涓嶅埌 -->
+                <th style="padding-bottom: 6px;">鐢宠鑰�<br/>閿�鍞湰閮�</th>
+                <th style="padding-bottom: 6px;">鐢宠鑰�<br/>鍔炰簨澶�</th> 
+                <th style="padding-bottom: 6px;">澶囧搧鍑哄�熸媴褰�</th> 
+                <th style="padding-bottom: 6px;">鎺掗槦NO.</th> 
+                <th style="padding-bottom: 6px;{!IF(isEquipmentCenter,'','display:none;')}">搴忓垪NO.</th> <!-- 鐢宠浜虹湅涓嶅埌 -->
+            </tr>
+            </thead>
+        </table>
+        </div>
+        <div class="table-body" id="table-body" style="height: 270px;overflow-y:auto;">
+        <table class="list" border="0" cellpadding="0" cellspacing="0" id="tablebody" style="table-layout:fixed;" >
+            <colgroup style="{!IF(isEquipmentCenter,'','display:none;')}" >
+            <col width="10%" />
+            <col width="10%" />
+            <col width="8%" />
+            <!-- 2022015 -->
+            <col width="6%" />
+            <col width="10%"/>
+            <col width="4%"/>
+            <col width="8%"/>
+            <col width="6%"/>
+            <col width="6%"/>
+            <col width="6%"/>
+            <col width="6%"/>
+            <col width="4%"/>
+            <col width="16%"/>
+            </colgroup> 
+            <colgroup style="{!IF(isEquipmentCenter,'display:none;','')}" >
+            <col width="16%" />
+            <col width="16%" />
+            <col width="16%" />
+            <col width="12%" />
+            <col width="10%"/>
+            <col width="10%"/>
+            <col width="10%"/>
+            <col width="10%"/>
+            </colgroup>  
+            <tbody>
+            <apex:repeat value="{!raesInfoListList[currPage-1]}" var="info"  id="Sequence" >
+            <tr height="48px">
+                <td><apex:outputField value="{!info.raesd.Rental_Apply__c}"/></td>
+                <!-- <span><apex:outputLink value="/{!rased.Id}"> <apex:outputField value="{!rased.Rental_Apply__c}" id="opname"/></apex:outputLink></span> -->
+                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply_Equipment_Set__c}"/></td>
+                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Fixture_Model_No__c}"/></td>
+                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply_Equipment_Set__r.QueueShippmentDateNew__c}"/></td>
+                <apex:outputPanel rendered="{!isEquipmentCenter}" layout="none"> 
+                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Salesdepartment_before__c}"/></td>
+                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Product_category_text__c}"/></td>
+                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Equipment_Type_text__c}"/></td>
+                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Internal_asset_location_before__c}"/></td>
+                </apex:outputPanel>
+                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply__r.Salesdepartment_text__c}"/></td>
+                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply__r.WorkPlace__c}"/></td>
+                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply__r.Person_In_Charge__c}"/></td>
+                <td style="white-space: pre-wrap;word-wrap:break-word;">
+                    <apex:outputField value="{!info.raesd.Queue_Number__c}" rendered="{!!isEquipmentCenter}" />
+                    <apex:outputLink value="" rendered="{!isEquipmentCenter}" onclick="checkEventJs('1;{!info.raesd.Rental_Apply_Equipment_Set__c}');return false;"> {!info.raesd.Queue_Number__c}</apex:outputLink>
+                </td>
+                <apex:outputPanel rendered="{!isEquipmentCenter}" layout="none"> 
+                <td>
+                    <apex:repeat value="{!info.raqList}" var="qL"  id="SeriesNo" >
+                    <apex:outputLink value="" onclick="checkEventJs('2;{!qL.Id}');return false;">{!qL.Salesdepartment__c};{!qL.Equipment_Type__c};{!qL.Product_category__c};<font style="color: red;font-weight: 800;">{!qL.Series_No__c}</font>
+                    </apex:outputLink><br/>
+                    </apex:repeat>
+                </td>
+                </apex:outputPanel>
+            </tr>
+            </apex:repeat>
+            </tbody>
+        </table>
+    </div>
+    </apex:pageBlock>
+</apex:form>
+
+<apex:outputPanel id="checEventFrame">
+    <apex:iframe id="theIframe" rendered="{!IF(!ISBLANK(frameUrl),true,false)}" title="鎺掗槦涓�瑙�" src="{!frameUrl}"/>
+</apex:outputPanel>
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/RentalApplySplit.page b/force-app/main/default/pages/RentalApplySplit.page
index 1777502..236fc75 100644
--- a/force-app/main/default/pages/RentalApplySplit.page
+++ b/force-app/main/default/pages/RentalApplySplit.page
@@ -59,6 +59,14 @@
         body .pbBody table.list tr.headerRow td, body .pbBody table.list tr.headerRow th {
             border-width: 1px;
         }*/
+        /* 20230613 ljh lightning start */
+        body .detailList .dataCol input[type="text"],body .detailList .dataCol select{
+            min-width: 180px;
+        }
+        .pbBody{
+            width:600px;
+        }
+        /* 20230613 ljh lightning start */
     </style>
     <apex:form id="allForm">
         <script type="text/javascript">
diff --git a/force-app/main/default/pages/RentalApplySplit.page.bak b/force-app/main/default/pages/RentalApplySplit.page.bak
new file mode 100644
index 0000000..1777502
--- /dev/null
+++ b/force-app/main/default/pages/RentalApplySplit.page.bak
@@ -0,0 +1,176 @@
+<apex:page controller="RentalApplySplitController" action="{!init}" showHeader="false" id="allPage" lightningStylesheets="true">
+    <head>
+      <title>澶囧搧鍊熷嚭鐢宠鍒嗗崟</title>
+      <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+      <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+      <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+    </head>
+    <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 */
+        }
+        span.dateFormat {
+            display: none;
+        }
+
+        /* 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;
+        }
+        .modal-content-cancel {
+           background-color: #fefefe;
+           margin-left: -150px;
+           margin-top: 100px;
+           padding: 20px;
+           border: 1px solid #888;
+           left: 50%;
+           position: absolute;
+           width: 300px;
+        }
+        body .slds-vf-data-table thead th{
+            background: none;
+        }
+        /*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;
+        }*/
+    </style>
+    <apex:form id="allForm">
+        <script type="text/javascript">
+            function back() {
+                window.opener.parent.location.href = "/{!ra.Id}";
+                top.window.close();
+            }
+
+            function checkSaveStatus() {
+                var saveStatus = document.getElementById('{!$Component.allForm.saveStatus}').value;
+                if (saveStatus == 'ok') {
+                    //20210609 ljh update 1732  start
+                    var temp = '{!cloneRas.Id}';
+                    console.log(temp);
+                    if( temp == null || temp == '' ){
+                        window.open("/{!ra.Id}");
+                    }else{
+                        window.open("/{!cloneRas.Id}");    
+                    }
+                    //20210609 ljh update 1732 end
+                    top.window.close();
+                }
+            }
+            //鐜板湴绠$悊鍒嗗崟 202100609 ljh update 1732
+            function changeSplitApplyReason(){
+                var reason = j$(escapeVfId('allPage:allForm:searchBlock:split:split0:Split_Apply_Reason')).value();
+                console.log(reason);
+                var RecordTypeIsAgency = j$(escapeVfId('allPage:allForm:RecordTypeIsAgency')).value();
+                if(reason != null && (reason == '鐜板湴绠$悊鍒嗗崟' 
+                    || (eval(RecordTypeIsAgency) && reason == '鍒拌揣NG鍒嗗崟'))
+                    ){
+                    //鍔炰簨澶勫繀椤诲~鍐�
+                    j$(escapeVfId('allPage:allForm:searchBlock:split:ToAgency0:ToAgency')).attr('disabled',false);
+                    j$(escapeVfId('allPage:allForm:searchBlock:split:ToAgency0:ToAgency')).attr('required',true);
+                }else{
+                    if(!(eval(RecordTypeIsAgency) && reason != null && reason == '鍒拌揣NG鍒嗗崟')){
+                        //鍔炰簨澶勬竻绌� 鍙
+                        j$(escapeVfId('allPage:allForm:searchBlock:split:ToAgency0:ToAgency')).val(null);
+                        j$(escapeVfId('allPage:allForm:searchBlock:split:ToAgency0:ToAgency')).attr('disabled',true);
+                    } 
+                }
+            }
+            function allSplitShow(){
+                var allSplitShow = j$(escapeVfId('allPage:allForm:allSplitShow')).value();
+                if(eval(allSplitShow)){
+                    j$('#AllSplitModal').show();
+                }
+            }
+        </script>
+        <apex:pageMessages />
+        <apex:inputHidden value="{!saveStatus}" id="saveStatus"/>
+        <!-- 20210609 ljh add 1732  start-->
+        <apex:inputHidden value="{!allSplitShow}" id="allSplitShow"/>
+        <apex:inputHidden value="{!RecordTypeIsAgency}" id="RecordTypeIsAgency"/> 
+        <div id="AllSplitModal" class="modal">
+            <div class="modal-content-cancel">
+                <table>
+                    <tr>
+                        <td colspan="2"> 
+                        鏄惁瑕佹暣鍗曞垎{!IF(SplitNum == 1,'鍥炲鍝佷腑蹇冿紵',IF(SplitNum == 2,'缁欏叾浠栧姙浜嬪锛�',IF(SplitNum == 3,'缁欏姙浜嬪锛�','')))}                     
+                        </td>
+                    </tr>
+                    <tr>
+                        <td colspan="2" align="center">
+                            <apex:commandButton style="margin: 0 20px;" value="纭畾"  action="{!saveSplitAll}" oncomplete="checkSaveStatus();unblockUI();" onclick="j$('#AllSplitModal').hide();blockme();" rerender="allForm"
+                            />
+                            <apex:commandButton style="margin: 0 20px;" value="鍙栨秷" onclick="j$('#AllSplitModal').hide();return false;"/>
+                        </td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+        <!-- 20210609 ljh add 1732  end-->
+        <apex:pageBlock id="searchBlock" tabStyle="Report">
+            <apex:pageBlockSection title="澶囧搧鍊熷嚭鐢宠鍒嗗崟" collapsible="false" id="split">
+                <apex:pageBlockSectionItem >
+                    <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Name.label}" for="Name"/>
+                    <apex:outputField value="{!ra.Name}" id="Name"/>
+                </apex:pageBlockSectionItem>
+                <!-- 20201119 ljh update start -->
+                <apex:pageBlockSectionItem id="split0">
+                    <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Split_Apply_Reason__c.label}" for="Split_Apply_Reason"/>
+                    <apex:inputField value="{!cloneRas.Split_Apply_Reason__c}" id="Split_Apply_Reason" required="true"  onchange="changeSplitApplyReason();"/>
+                </apex:pageBlockSectionItem>
+                <!-- 20201117 ljh add start --> 
+                <apex:pageBlockSectionItem id="ToAgency0">
+                    <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.ToAgency__c.label}" for="Name"/>
+                    <apex:inputField value="{!cloneRas.ToAgency__c}" id="ToAgency"  />
+                </apex:pageBlockSectionItem>
+                <apex:pageBlockSectionItem html-style="display: none;">
+                <apex:inputField value="{!cloneRas.SalesdeptSelect__c}" id="SalesdeptSelect" style="display: none;" />
+              </apex:pageBlockSectionItem>
+                <!-- 20201117 ljh add end -->
+            </apex:pageBlockSection>
+            
+            <apex:dataTable value="{!raesList}" var="raes" id="raesLists" border="allPage" cellpadding="5">
+              <apex:column >
+                <apex:facet name="header">鍊熷嚭澶囧搧閰嶅涓�瑙圢o.</apex:facet>
+                <apex:outputText value="{!raes.Name}" />
+              </apex:column>
+              <apex:column >
+                <apex:facet name="header">鍊熷嚭閰嶅鍨嬪彿</apex:facet>
+                <apex:outputText value="{!raes.Loaner_code_F__c}" />
+              </apex:column>
+              <apex:column >
+                <apex:facet name="header">鍊熷嚭澶囧搧閰嶅涓�瑙堢姸鎬�</apex:facet>
+                <apex:outputText value="{!raes.RAES_Status__c}" />
+              </apex:column>
+            </apex:dataTable>
+            <div style="height: 15px"></div>
+            <apex:commandButton value="纭鍒嗗崟" action="{!saveSplit}" oncomplete="allSplitShow();checkSaveStatus();unblockUI();" onclick="blockme();" rerender="allForm" />
+            <apex:commandButton value="杩斿洖" onclick="back(); return false;" rerender="allForm" oncomplete="unblockUI();" />
+          </apex:pageBlock>
+        </apex:form>
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/RentalFixtureSetAssign.page b/force-app/main/default/pages/RentalFixtureSetAssign.page
index 01cf21e..8a88a16 100644
--- a/force-app/main/default/pages/RentalFixtureSetAssign.page
+++ b/force-app/main/default/pages/RentalFixtureSetAssign.page
@@ -132,17 +132,17 @@
         j$("#classification_f").children("#initial_f").remove();
         var idTemp = j$(obj).value().trim();
         idTemp = 'Id'+idTemp.split('.')[0];
-        j$("#classification_f").append("<span class='valClass' id='" + (idTemp) + "'>" + (j$(obj)
+        j$("#classification_f").append("<span class='valClassf' id='" + (idTemp) + "'>" + (j$(obj)
             .value().trim() + ",") + "</span>");
     } else {
         var idTemp = 'Id'+name.split('.')[0];
         j$("#classification_f").children("#" + (idTemp)).remove();
         var length = j$("#classification_f").html().length;
         if (length === 0) {
-            j$("#classification_f").append("<span class='valClass' id='initial_f'>--鏃�--</span>");
+            j$("#classification_f").append("<span class='valClassf' id='initial_f'>--鏃�--</span>");
         }
     }
-    var optioncheck = j$(".valClass");
+    var optioncheck = j$(".valClassf");
     var hint = '';
     for(var i = 0;i<optioncheck.length;i++){
         if(optioncheck[i].innerText != '--鏃�--'){
@@ -377,7 +377,8 @@
                     <apex:outputField value="{!parentObj.Product_category__c}"/>
                     <apex:pageBlockSectionItem id="SelectOP"  rendered="{!!(parentObj.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Demo_purpose1__c=='鍗忚鍊熺敤')}">
                     <!-- 20220106 ljh 鏀惧紑 鏈嶅姟鍩硅/瀛︿細 parentObj.CampaignType__c=='鏈嶅姟鍩硅/瀛︿細'|| -->
-                    <apex:outputLabel for="bieBeiPinFenLei" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="澶囧搧鍒嗙被" />
+                    <!-- <apex:outputLabel for="bieBeiPinFenLei" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="澶囧搧鍒嗙被" /> -->
+                    <apex:outputLabel for="bieBeiPinFenLei" value="澶囧搧鍒嗙被" />
                     <apex:outputPanel style="position:absolute; " id="S_bieFenLei">
                         <ul class="nav" id="nav_f" style="background-color: #FFFFFF;left:0px;top:-5px;">
                             <li id="classification_f" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_f();return false;">
@@ -400,7 +401,8 @@
                     </apex:pageBlockSectionItem>
                     <apex:pageBlockSectionItem id="Selectsalesd" rendered="{!!(parentObj.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Demo_purpose1__c=='鍗忚鍊熺敤')}">
                         <!-- 20220106 ljh 鏀惧紑 鏈嶅姟鍩硅/瀛︿細 parentObj.CampaignType__c=='鏈嶅姟鍩硅/瀛︿細'|| -->
-                        <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="鏈儴" />
+                        <!-- <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="鏈儴" /> -->
+                        <apex:outputLabel for="salesd"  value="鏈儴" />
                         <apex:outputPanel style="position:absolute; " id="S_bieBenBu">
                             <ul class="nav" id="nav_b" style="background-color: #FFFFFF;left:0px;">
                                 <li id="classification_b" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_b();return false;">
@@ -426,7 +428,7 @@
                 </apex:pageBlockSection>
                  <!-- 20230526 ljh lightning start-->
                 <!-- <table style="width: 450px;margin: auto;float: left;margin-top: 1.5%;" > -->
-                <table style="width: 450px;margin: auto;float: left;" >
+                <table style="width: 550px;margin: auto;float: left;" >
                     <tr><td colspan="{!IF(parentObj.demo_purpose2__c == '瀛︿細灞曚細'&&!(contains(parentObj.Salesdepartment__c,'MA鏈儴')||contains(parentObj.Salesdepartment__c,'浜у搧鍩硅')),4,2)}">
                         &nbsp;</td>
                     </tr>
@@ -459,11 +461,10 @@
                         </td>
                     </tr>
                 </table>
-                <table style="width:800px;float:right;" >
+                <table style="width:700px;float:right;" >
                   <tr>
                     
-                      <td style="width:450px;">
-                    </td>
+                    <td style="width:350px;"></td>
                     <!-- <td style="width:180px;">
                     </td> -->
                     <th>{!$ObjectType.Rental_Apply__c.fields.Asset_loaner_start_day__c.label}</th>
@@ -471,7 +472,7 @@
                   </tr>
                   <tr>
                     
-                    <td style="width:450px;">
+                    <td style="width:350px;">
                       <apex:commandButton action="{!save}" value="淇濆瓨" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="unblockUI();"  />
                       <apex:commandButton style="margin-left:150px;" action="{!cancel}" value="杩斿洖" />
                     </td>
diff --git a/force-app/main/default/pages/RentalFixtureSetAssign.page.bak b/force-app/main/default/pages/RentalFixtureSetAssign.page.bak
new file mode 100644
index 0000000..01cf21e
--- /dev/null
+++ b/force-app/main/default/pages/RentalFixtureSetAssign.page.bak
@@ -0,0 +1,642 @@
+<apex:page lightningStylesheets="true" controller="RentalFixtureSetAssignController" showHeader="false" sidebar="false" id="allPage" action="{!init}" >
+<head>
+<title>澶囧搧鍑哄�熷垎閰嶈澶�</title>
+<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+<apex:stylesheet value="{!URLFOR($Resource.RentalFixtureSetAssignCss)}"/>
+<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
+<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
+<!-- <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
+<apex:includeScript value="{!URLFOR($Resource.apex20)}"/> -->
+<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 */
+    }
+    span.dateFormat {
+        display: none;
+    }
+
+    /* 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;
+    }
+    .modal-content-cancel {
+        background-color: #fefefe;
+        margin-left: -150px;
+        margin-top: 100px;
+        padding: 20px;
+        border: 1px solid #888;
+        left: 50%;
+        position: absolute;
+        width: 300px;
+    }
+    /* 20230606 ljh lightning start */
+    body .detailList .dataCol input[type="text"],body .detailList .dataCol select{
+        min-width: 180px;
+    }
+    /* body .bPageBlock .detailList .dataCol{
+        width: 8%;
+    } */
+    body .bPageBlock .detailList .dataCol input[type="checkbox"]:first-child{
+        margin-top: 0;
+    }
+    body .detailList td{
+        position: static;
+    }
+    /*浠ヤ笅鏄笅鎷夊閫夋鐨勬牱寮�  start*/
+    * {
+        margin: 0;
+        padding: 0;
+        box-sizing: border-box;
+    }
+    .nav {
+        width: 180px;/*20230606 ljh*/
+        line-height: 30px;/*20230606 ljh*/
+        /* border: 1px solid #000; *//*20230610 ljh*/
+        -webkit-user-select: none;
+        -moz-user-select: none;
+        -ms-user-select: none;
+        user-select: none;
+        position: absolute;
+        top: 0;
+        right: 0;
+        left: 0;
+        margin: 0;
+        /* z-index: 9999; */
+        z-index: 2;
+        display: inline-block;
+        border-radius: 0.25rem;/*20230607 ljh lightning*/
+        border: 1px solid rgb(201, 201, 201);/*20230610 ljh lightning*/
+    }
+    ul,li {
+        list-style: none;
+    }
+    .nav li input {
+        margin: 0px 3px 0px 3px;
+    }
+
+    .nav li p:hover {
+        background: #1e90ff;
+        color: #fff;
+    }
+    #classification_f,#classification_b {
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }      
+</style>
+<script type="text/javascript">
+var heightAjustment = 120;
+var widthAjustment = 30;
+var clickLineNo;
+var iszhu;
+// 20230607 ljh lightning start
+j$(document).bind("click",function(e){
+    var e = e || window.event;    //浜嬩欢瀵硅薄锛屽吋瀹笽E
+    var target = e.target || e.srcElement;  //婧愬璞★紝鍏煎鐏嫄鍜孖E
+    while(target){
+        // console.log(target.id);
+        if (target.id && (target.id == "nav_f" ||target.id == "nav_b")){   
+            //寰幆鍒ゆ柇鑷虫牴鑺傜偣锛岄槻姝㈢偣鍑荤殑鏄�#selected鍜屽畠鐨勫瓙鍏冪礌
+            return;
+        }
+        target = target.parentNode;
+    }
+    j$("#selectCheckId_f").hide();   //鐐瑰嚮鐨勪笉鏄�#selected鍜屽畠鐨勫瓙鍏冪礌锛岄殣钘忎笅鎷夎彍鍗�
+    j$("#selectCheckId_b").hide();
+})
+//鐐瑰嚮 鍒嗙被閫夋嫨
+function selectFenLei(obj,name){
+    var checked1 = j$(obj).prop("checked");
+    if (checked1 == true) {
+        j$("#classification_f").children("#initial_f").remove();
+        var idTemp = j$(obj).value().trim();
+        idTemp = 'Id'+idTemp.split('.')[0];
+        j$("#classification_f").append("<span class='valClass' id='" + (idTemp) + "'>" + (j$(obj)
+            .value().trim() + ",") + "</span>");
+    } else {
+        var idTemp = 'Id'+name.split('.')[0];
+        j$("#classification_f").children("#" + (idTemp)).remove();
+        var length = j$("#classification_f").html().length;
+        if (length === 0) {
+            j$("#classification_f").append("<span class='valClass' id='initial_f'>--鏃�--</span>");
+        }
+    }
+    var optioncheck = j$(".valClass");
+    var hint = '';
+    for(var i = 0;i<optioncheck.length;i++){
+        if(optioncheck[i].innerText != '--鏃�--'){
+            hint +=optioncheck[i].innerText;
+        }
+    }
+    j$("[id*='equipmenttypes']").val(hint);
+}
+//鐐瑰嚮 鏈儴閫夋嫨
+function selectBenBu(obj,name){
+    var checked1 = j$(obj).prop("checked");
+    if (checked1 == true) {
+        j$("#classification_b").children("#initial_b").remove();
+        var idTemp = j$(obj).value().trim();
+        idTemp = 'Id'+idTemp.split('.')[0];
+        j$("#classification_b").append("<span class='valClass' id='" + (idTemp) + "'>" + (j$(obj)
+            .value().trim() + ",") + "</span>");
+    } else {
+        var idTemp = 'Id'+name.split('.')[0];
+        j$("#classification_b").children("#" + (idTemp)).remove();
+        var length = j$("#classification_b").html().length;
+        if (length === 0) {
+            j$("#classification_b").append("<span class='valClass' id='initial_b'>--鏃�--</span>");
+        }
+    }
+    var optioncheck = j$(".valClass");
+    var hint = '';
+    for(var i = 0;i<optioncheck.length;i++){
+        if(optioncheck[i].innerText != '--鏃�--'){
+            hint +=optioncheck[i].innerText;
+        }
+    }
+    j$("[id*='salesdepartments']").val(hint);
+}
+// 鍒嗙被
+function navClose_f(){
+    j$("#selectCheckId_f").toggle();
+}
+// 鏈儴
+function navClose_b(){
+    j$("#selectCheckId_b").toggle();
+}
+// 20230607 ljh lightning end
+function saveGoPageJs(clickLineNo1, iszhu1) {
+    blockme();
+    clickLineNo = clickLineNo1;
+    iszhu = iszhu1;
+    //濡傛灉褰撳墠鎿嶄綔鐨勮娌℃湁閫変腑,鐩存帴鎵撳嬀閫変腑
+    var lock = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + clickLineNo + ':rowCheck'));
+    lock.prop('checked', true);
+    saveGoPageJs_save();
+}
+function saveGoPageJsComplete() {
+    var errorFlag = j$(escapeVfId('allPage:allForm:hasError')).value();
+    if(errorFlag == 'false'){
+       // 璺宠浆URL閫昏緫
+       checkEvent(clickLineNo, iszhu);
+    }
+}
+
+// 璁$畻鑷劧鏃�
+function getDays(date1,date2){
+    var dayCount = 0;
+    if(date1 && date2){
+        //灏嗘椂闂村瓧绗︿覆杞寲涓鸿窛绂�1970骞�1鏈�1鏃ュ崍澶滈浂鏃剁殑鏃堕棿闂撮殧鐨勬绉掓暟
+        var time1 = Date.parse(date1);
+        var time2 = Date.parse(date2);
+
+        //灏嗕袱涓椂闂寸浉鍑�,姹傚嚭鐩搁殧鐨勫ぉ鏁�
+        var dayCount = (Math.ceil(time2 - time1))/1000/60/60/24;
+    }
+    return dayCount;
+}
+
+function setAsset_loaner_closed_day(date1, daysId, demo_purpose2, Campaign_EndDate_F, dId) {
+    var demo2 = j$(escapeVfId(demo_purpose2)).value();
+    var days = 0;
+    var date = date1;
+    if (demo2 == '璇曠敤锛堟棤璇环锛�'
+            || demo2 == '璇曠敤锛堟湁璇环锛�'
+            || demo2 == '鏂颁骇鍝佽瘎浠�'
+            || demo2 == '鍏朵粬'
+            || demo2 == '鍗忚鍊熺敤') {
+        days = j$(escapeVfId(daysId)).value();
+        if (days != null && days != '' && days > 0) {
+            days = days;
+        }
+    }
+    else if (demo2 == '涓�鑸敤鎴�'
+            || demo2 == '淇濅慨鐢ㄦ埛'
+            || demo2 == '甯傚満澶氬勾淇濅慨'
+            || demo2 == '鍐嶄慨鐞�'
+            || demo2 == '绱㈣禂QIS'
+            || demo2 == '宸茶喘寰呰揣'
+            || demo2 == '鏁呴殰鎺掓煡') {
+        days = 30;
+    }
+    else if (demo2 == '瀛︿細灞曚細') {
+        date = '{!parentObj.Campaign_EndDate_F__c}';
+        days = 5;
+    }
+    j$(escapeVfId(dId)).val(dateAddDays(date, days));
+}
+function dateAddDays(dataStr,dayCount) {
+    var strdate=dataStr;
+    //鏃ユ湡瀛楃涓�
+    var isdate = new Date(strdate.replace(/-/g,"/"));
+    //鎶婃棩鏈熷瓧绗︿覆杞崲鎴愭棩鏈熸牸寮�
+    isdate = new Date((isdate/1000+(86400*dayCount))*1000);
+    //鏃ユ湡鍔�1澶�
+    var pdate = isdate.getFullYear()+"/"+(isdate.getMonth()+1)+"/"+(isdate.getDate());
+    //鎶婃棩鏈熸牸寮忚浆鎹㈡垚瀛楃涓�
+    return pdate; 
+}
+function confirmSpecial() {
+    if(confirm("鏄惁鐗规畩鎺掗槦锛�")){
+        var needconfirm = false;
+        var confirmMsg = '';
+        var count = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:currentPageRecordCnt')).val();
+        for(var i = 0;i < count;i ++){
+            var lock = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + i + ':rowCheck')).prop('checked');
+            if(lock){
+                var QueueType = j$("input[name=QueueType__c][type=hidden]")[i].value;
+                console.log(QueueType);
+                // var type = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:'+ i +':queueType')).val();
+                if(QueueType != undefined && QueueType != '' ){
+                    var model = j$("input[name=First_RAESD_Model_No_F__c][type=hidden]")[i].value;
+                    confirmMsg +=   '绗�' + (i + 1) + '琛� '+ model+' 宸茬粡' + QueueType + '; ' + '\n' ;
+                    needconfirm = true;
+                }
+            }
+            
+        }
+
+        console.log(needconfirm);
+        if(needconfirm){
+            return confirm(confirmMsg + '鏄惁缁х画锛�');
+        }else{
+            return true;
+        }
+        
+    }
+    return false;
+}
+// 20220105 ljh update start
+/*function defualtconfirm() {
+    if(confirm("鏄惁榛樿鎺掗槦锛�")){
+        var oldtype = j$("[id*='OldCampaignType']").val();
+        var campaignType = j$("[id*='campaignType']").val();
+        if(oldtype !="" && oldtype != undefined && oldtype != campaignType){
+            if(confirm("鎮ㄦ湰娆¢�夋嫨鐨勫浼氱被鍨嬩笌宸叉帓闃熺殑涓嶄竴鑷达紝璇风‘璁ゆ槸鍚︽洿鏂�")){
+                j$("[id*='changeCampaignType']").val(true);
+            }else{
+                j$("[id*='changeCampaignType']").val(false);
+            }
+        }
+        return true;
+    }
+    return false;
+}*/
+function defualtconfirm() {
+    if(confirm("鏄惁榛樿鎺掗槦锛�")){
+        var needconfirm = false;
+        var confirmMsg = '';
+        var count = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:currentPageRecordCnt')).val();
+        for(var i = 0;i < count;i ++){
+            var lock = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + i + ':rowCheck')).prop('checked');
+            if(lock){
+                var QueueType = j$("input[name=QueueType__c][type=hidden]")[i].value;
+                console.log(QueueType);
+                // var type = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:'+ i +':queueType')).val();
+                if(QueueType != undefined && QueueType != '' ){
+                    var model = j$("input[name=First_RAESD_Model_No_F__c][type=hidden]")[i].value;
+                    confirmMsg +=   '绗�' + (i + 1) + '琛� '+ model+' 宸茬粡' + QueueType + '; ' + '\n' ;
+                    needconfirm = true;
+                }
+            }
+            
+        }
+
+        console.log(needconfirm);
+        if(needconfirm){
+            if(confirm(confirmMsg + '鏄惁缁х画锛�')){
+                var oldtype = j$("[id*='OldCampaignType']").val();
+                var campaignType = j$("[id*='campaignType']").val();
+                console.log(oldtype+campaignType);
+                if(oldtype !="" && oldtype != undefined && oldtype != campaignType){
+                    if(confirm("鎮ㄦ湰娆¢�夋嫨鐨勫浼氱被鍨嬩笌宸叉帓闃熺殑涓嶄竴鑷达紝璇风‘璁ゆ槸鍚︽洿鏂�")){
+                        j$("[id*='changeCampaignType']").val(true);
+                    }else{
+                        j$("[id*='changeCampaignType']").val(false);
+                    }
+                }
+                return true;
+            }
+        }else{
+            return true;
+        }
+    }
+}
+// 20220105 ljh update end
+</script>
+</head>
+    <apex:form id="allForm">
+        <apex:inputHidden id="salesdepartments" value="{!salesdepartments}" />
+        <apex:inputHidden id="equipmenttypes" value="{!equipmenttypes}" />
+        <apex:inputHidden id="changeCampaignType" value="{!changeCampaignType}"/>
+        <apex:inputHidden id="OldCampaignType" value="{!oldCampaignType}"/>
+        <apex:actionFunction name="save" action="{!save}" rerender="allForm,checEventFrame" onComplete="unblockUI();">
+        </apex:actionFunction>
+        <apex:actionFunction name="saveGoPageJs_save" action="{!save}" rerender="allForm,checEventFrame" onComplete="unblockUI();saveGoPageJsComplete();">
+        </apex:actionFunction>
+        <apex:actionFunction name="checkEvent" action="{!checkEvent}" rerender="allForm,checEventFrame" onComplete="unblockUI();window.open(j$(escapeVfId('{!$Component.checkEventUrl}')).value());">
+            <apex:param name="firstParam" assignTo="{!clickLineNo}" value="" />
+            <apex:param name="isZhu" value="" />
+        </apex:actionFunction>
+        <apex:inputHidden id="checkEventUrl" value="{!checkEventUrl}" />
+        <apex:inputHidden id="Hope_Lonaer_date_Num" value="{!parentObj.Hope_Lonaer_date_Num__c}" />
+        <apex:inputHidden id="demo_purpose2" value="{!parentObj.demo_purpose2__c}"/>
+        <apex:outputText id="hasError" value="{!hasError}" style="display:none"/>
+        <apex:outputPanel id="pageallPanel">
+            <apex:pageBlock id="searchBlock" tabStyle="Report">
+                <apex:pageBlockSection title="鍒嗛厤鐢婚潰">
+                    <apex:outputField value="{!parentObj.Name}"/>
+                    <apex:outputField value="{!parentObj.Demo_purpose1__c}"/>
+                    <apex:outputField value="{!parentObj.Salesdept__c}"/>
+                    <apex:outputField value="{!parentObj.demo_purpose2__c}"/>
+                    <apex:outputField value="{!parentObj.Internal_asset_location_F__c}"/>
+                    <apex:outputField value="{!parentObj.Equipment_Type_F__c}"/>
+                    <apex:outputField value="{!parentObj.Request_shipping_day__c}"/>
+                    <apex:outputField value="{!parentObj.Request_return_day__c}"/>
+                    <apex:outputField value="{!parentObj.Product_category__c}"/>
+                    <apex:pageBlockSectionItem id="SelectOP"  rendered="{!!(parentObj.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Demo_purpose1__c=='鍗忚鍊熺敤')}">
+                    <!-- 20220106 ljh 鏀惧紑 鏈嶅姟鍩硅/瀛︿細 parentObj.CampaignType__c=='鏈嶅姟鍩硅/瀛︿細'|| -->
+                    <apex:outputLabel for="bieBeiPinFenLei" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="澶囧搧鍒嗙被" />
+                    <apex:outputPanel style="position:absolute; " id="S_bieFenLei">
+                        <ul class="nav" id="nav_f" style="background-color: #FFFFFF;left:0px;top:-5px;">
+                            <li id="classification_f" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_f();return false;">
+                                <span id="initial_f">--鏃�--</span>
+                            </li>
+                            <li id="selectCheckId_f" style="margin-left:0px;display: none;">
+                                <ul style="margin-left:0px;">
+                                <apex:repeat value="{!bieBeiPinFenLeiOps}" var="orr" id="selFL">
+                                <li class="sdclass" style="margin-left:0px">
+                                    <p class="ul-nav" name="cate_id[]" >
+                                        <input type="checkbox" value="{!orr.value}" onclick="selectFenLei(this,'{!orr.value}');"  class="li-input" style="display: inline-block;vertical-align: middle;"/>
+                                        <font style="">{!orr.label}</font>
+                                    </p>
+                                </li>
+                                </apex:repeat>
+                                </ul>
+                            </li>
+                        </ul>
+                    </apex:outputPanel>
+                    </apex:pageBlockSectionItem>
+                    <apex:pageBlockSectionItem id="Selectsalesd" rendered="{!!(parentObj.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Demo_purpose1__c=='鍗忚鍊熺敤')}">
+                        <!-- 20220106 ljh 鏀惧紑 鏈嶅姟鍩硅/瀛︿細 parentObj.CampaignType__c=='鏈嶅姟鍩硅/瀛︿細'|| -->
+                        <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="鏈儴" />
+                        <apex:outputPanel style="position:absolute; " id="S_bieBenBu">
+                            <ul class="nav" id="nav_b" style="background-color: #FFFFFF;left:0px;">
+                                <li id="classification_b" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_b();return false;">
+                                    <span id="initial_b">--鏃�--</span>
+                                </li>
+                                <li id="selectCheckId_b" style="margin-left:0px;display: none;">
+                                    <ul style="margin-left:0px;">
+                                    <apex:repeat value="{!bieBenBuOps}" var="orr" id="selSD">
+                                    <li class="sdclass" style="margin-left:0px">
+                                        <p class="ul-nav" name="cate_id[]" >
+                                            <input type="checkbox" value="{!orr.value}" onclick="selectBenBu(this,'{!orr.value}');"  class="li-input" style="display: inline-block;vertical-align: middle;"/>
+                                            <font style="">{!orr.label}</font>
+                                        </p>
+                                    </li>
+                                    </apex:repeat>
+                                    </ul>
+                                </li>
+                            </ul>
+                        </apex:outputPanel>
+                    </apex:pageBlockSectionItem>
+                    <apex:inputField rendered="{!!(parentObj.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Demo_purpose1__c=='鍗忚鍊熺敤')}" id="product_category" value="{!parentObj.Product_category_Sys__c}" />
+                    <!-- 20220106 ljh 鏀惧紑 鏈嶅姟鍩硅/瀛︿細 parentObj.CampaignType__c=='鏈嶅姟鍩硅/瀛︿細'|| -->
+                </apex:pageBlockSection>
+                 <!-- 20230526 ljh lightning start-->
+                <!-- <table style="width: 450px;margin: auto;float: left;margin-top: 1.5%;" > -->
+                <table style="width: 450px;margin: auto;float: left;" >
+                    <tr><td colspan="{!IF(parentObj.demo_purpose2__c == '瀛︿細灞曚細'&&!(contains(parentObj.Salesdepartment__c,'MA鏈儴')||contains(parentObj.Salesdepartment__c,'浜у搧鍩硅')),4,2)}">
+                        &nbsp;</td>
+                    </tr>
+                    <tr>
+                        <apex:outputPanel rendered="{!parentObj.demo_purpose2__c == '瀛︿細灞曚細'&&!(contains(parentObj.Salesdepartment__c,'MA鏈儴')||contains(parentObj.Salesdepartment__c,'浜у搧鍩硅'))}">
+                            <td style="width:50px;font-weight: bold;font-family: Arial,Helvetica,sans-serif;font-size: 91%;color: #4a4a56;">
+                                {!$ObjectType.Rental_Apply__c.fields.CampaignType__c.label}
+                            </td>
+                             <td style="width:80px;">
+                                <apex:inputField id="campaignType" value="{!parentObj.CampaignType__c}" />
+                            </td>
+                        </apex:outputPanel>
+                        <!-- 20230526 ljh lightning start-->
+                        <!-- <td colspan="2" style="text-align:end;"> -->
+                        <td style="text-align:end;">
+                        <!-- 20230526 ljh lightning end-->
+                            <apex:commandButton action="{!defaultScheduel}" disabled="{!parentObj.Demo_purpose1__c=='鍏朵粬'||parentObj.Status__c!='宸叉壒鍑�'}" onclick="if(!defualtconfirm()) return false;blockme();" oncomplete="unblockUI();"  value="榛樿鎺掗槦" rerender="message,campaignType"/>
+                            <!-- 20220105 ljh rerender add cmpid -->
+                        </td>
+                        <!-- 20230526 ljh lightning start-->
+                        <!-- <td style="width:190px;"> -->
+                        <td>
+                        <!-- 20230526 ljh lightning end-->
+                            <apex:outputPanel rendered="{!!(parentObj.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Demo_purpose1__c=='鍗忚鍊熺敤'||parentObj.Status__c!='宸叉壒鍑�')}">
+                                <apex:commandButton style="margin-left:20px;" onclick="if(!confirmSpecial()) return false;blockme();"  action="{!specialScheduel}" disabled="{parentObj.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Demo_purpose1__c=='鍗忚鍊熺敤'||parentObj.Status__c!='宸叉壒鍑�'}" value="鐗规畩鎺掗槦" rerender="cmpid,checEventFrame,message,campaignType" oncomplete="unblockUI();"  />
+                            </apex:outputPanel>
+                            <!-- 20220106 ljh 鏀惧紑 鏈嶅姟鍩硅/瀛︿細 !parentObj.CampaignType__c=='鏈嶅姟鍩硅/瀛︿細'|| -->
+                            <!-- 20220105 ljh rerender add cmpid -->
+                            <apex:commandButton style="margin-left:20px;" disabled="{!parentObj.Status__c!='宸叉壒鍑�'}" action="{!topInLine}" value="鎺掗槦NO.缃《" onclick="blockme();" oncomplete="unblockUI();" rerender="cmpid,checEventFrame,message"  />
+                        </td>
+                    </tr>
+                </table>
+                <table style="width:800px;float:right;" >
+                  <tr>
+                    
+                      <td style="width:450px;">
+                    </td>
+                    <!-- <td style="width:180px;">
+                    </td> -->
+                    <th>{!$ObjectType.Rental_Apply__c.fields.Asset_loaner_start_day__c.label}</th>
+                    <th>{!$ObjectType.Rental_Apply__c.fields.Asset_loaner_closed_day__c.label}</th>
+                  </tr>
+                  <tr>
+                    
+                    <td style="width:450px;">
+                      <apex:commandButton action="{!save}" value="淇濆瓨" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="unblockUI();"  />
+                      <apex:commandButton style="margin-left:150px;" action="{!cancel}" value="杩斿洖" />
+                    </td>
+                    <td id="special"><apex:inputField id="rentalStartDate" value="{!parentObj.Asset_loaner_start_day__c}" onchange="setAsset_loaner_closed_day(this.value, '{!$Component.Hope_Lonaer_date_Num}', '{!$Component.demo_purpose2}', '{!$Component.Campaign_EndDate_F}', '{!$Component.rentalEndDate}'); return false"></apex:inputField></td>
+                    <td id="special"><apex:inputField id="rentalEndDate" value="{!parentObj.Asset_loaner_closed_day__c}" html-disabled="true" ></apex:inputField></td>
+                    <td><apex:commandButton action="{!checkDate}" reRender="allForm,checEventFrame" value="閫傜敤" oncomplete="applyJs()" />
+                      <script type="text/javascript">
+                        function applyJs() {
+                          var errorFlag = j$(escapeVfId('{!$Component.hasError}')).value();
+                          if(errorFlag == 'false'){
+                            var cnt = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:currentPageRecordCnt').value;
+                            var rentalStartDate = j$(escapeVfId('{!$Component.rentalStartDate}')).value();
+                            var rentalEndDate = j$(escapeVfId('{!$Component.rentalEndDate}')).value();
+                            //绠楀嚭鍊熷嚭鏃堕棿(澶�) = 澶囧搧棰勮鍥炴敹鏃� - 澶囧搧棰勮鍑鸿揣鏃�
+                            var days = getDays(rentalStartDate, rentalEndDate);
+
+                            var td_start = [];
+                            j$("td.dataCellBorder1.col_Rental_Start_Date__c").each(function () {
+                              td_start.push(j$(this))
+                            });
+                            var td_end = [];
+                            j$("td.dataCellBorder1.col_Rental_End_Date__c").each(function () {
+                              td_end.push(j$(this))
+                            });
+                            var td_days = [];
+                            j$("td.dataCellBorder1.col_Jie_Chu_Shi_Jian_Jia__c").each(function () {
+                              td_days.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){
+                                td_start[i].find("input").val(rentalStartDate);
+                                td_end[i].find("input").val(rentalEndDate);
+                                td_days[i].find("span").text(days);
+                              }
+                            }
+                          }
+                        }
+                      </script>
+                    </td>
+                  </tr>
+                </table>
+                <div style="clear:both;"></div>
+
+            <apex:outputPanel id="message">
+                <apex:pageMessages />
+            </apex:outputPanel>
+        </apex:pageBlock>
+        <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true"/>
+        </apex:outputPanel>
+        <div id="AllSplitModal" class="modal">
+            <div class="modal-content-cancel">
+                <table>
+                    <tr>
+                        <td style="width:300px;text-align: center;" colspan="2"> 
+                        鏄惁鐗规畩鎺掗槦                  
+                        </td>
+                    </tr>
+                    <tr>
+                        <td colspan="2" align="center">
+                            <apex:commandButton style="margin: 0 20px;" value="纭畾"   rerender="allForm"
+                            />
+                            <apex:commandButton style="margin: 0 20px;" value="鍙栨秷" onclick="j$('#AllSplitModal').hide();return false;"/>
+                        </td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+    </apex:form>
+    <apex:outputPanel id="checEventFrame">
+        <script>
+        addlinkbutton();
+        function addlinkbutton(){
+          // 娆°伄鐢婚潰閬风Щclick
+          var ele = j$(".dataCellBorder1.col_Zhu_Ti_Fen_Pei_Jia__c");
+          var ele1 = j$(".dataCellBorder1.col_Fu_Shu_Pin_Fen_Pei_Jia__c");
+          var showButton = eval("({!JSENCODE(bodyModelNoJson)})");
+          // alert(ele.length);
+          if(ele.length){
+            var i = 0;
+
+            ele.each(function () {
+              var showmap = showButton[i];
+              if (showmap['ZHU']) {
+                j$(this).css('align-items','center');
+                j$(this).append('<input type="button" style="width: auto;" value="鍒嗛厤" onclick="saveGoPageJs('+i+', true);"/>');
+                console.log(j$(this).children("span")[0].innerText);
+                var value = j$(this).children("span")[0].innerText;
+                if(value == '鏆傚畾鍒嗛厤'){
+                    j$(this).append('<input type="button" style="width: auto;" value="鎸囧畾鏆傚畾鍒嗛厤" onclick="derectlyAssign('+i+');"/>');
+                }
+                
+              }
+              i = i + 1;
+            })
+          }
+
+          if(ele1.length){
+            var i = 0;
+
+            ele1.each(function () {
+              var showmap = showButton[i];
+              if (showmap['FU']) {
+                j$(this).css('align-items','center');
+                // j$(this).css('display','inline-flex').css('align-items','center');
+                j$(this).append('<input type="button" style="width: auto;" value="鍒嗛厤" onclick="saveGoPageJs('+i+', false);"/>');
+              }
+              i = i + 1;
+            })
+          }
+
+          j$("td.dataCellBorder1.col_Rental_Start_Date__c").on("change", function() {
+            var from = j$(this).find("input").val();
+            var to = j$(this).next().find("input").val();
+            //绠楀嚭鍊熷嚭鏃堕棿(澶�) = 澶囧搧棰勮鍥炴敹鏃� - 澶囧搧棰勮鍑鸿揣鏃�
+            var days = getDays(from, to);
+            j$(this).next().next().find("span").text(days);
+          })
+          j$("td.dataCellBorder1.col_Rental_End_Date__c").on("change", function() {
+            var from = j$(this).prev().find("input").val();
+            var to = j$(this).find("input").val();
+            //绠楀嚭鍊熷嚭鏃堕棿(澶�) = 澶囧搧棰勮鍥炴敹鏃� - 澶囧搧棰勮鍑鸿揣鏃�
+            var days = getDays(from, to);
+            j$(this).next().find("span").text(days);
+          })
+
+        }
+
+        showDate();
+        function showDate() {
+            var cnt = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:currentPageRecordCnt').value;
+            var td_start = [];
+            j$("td.dataCellBorder1.col_Rental_Start_Date__c").each(function () {
+              td_start.push(j$(this))
+            });
+            var td_end = [];
+            j$("td.dataCellBorder1.col_Rental_End_Date__c").each(function () {
+              td_end.push(j$(this))
+            });
+            var td_days = [];
+            j$("td.dataCellBorder1.col_Jie_Chu_Shi_Jian_Jia__c").each(function () {
+              td_days.push(j$(this))
+            });
+
+            for (var i = 0; i < cnt; i++) {
+                var days = getDays(td_start[i].find("input").val(), td_end[i].find("input").val());
+                td_days[i].find("span").text(days);
+            }
+        }
+
+        function derectlyAssign(index) {
+           
+            // var viewList = JSONCODE(viewListStr);
+            var viewList = eval("({!JSENCODE(WrapperJSON)})");
+            // console.log('{!wrapperStr}');
+            console.log('index***',index);
+            console.log(viewList);
+            console.log(viewList[index].sobj.Id);
+            var rasdId = viewList[index].sobj.Id;
+            window.location.href = '/apex/DirectAssign?oldquenId='+ rasdId;
+        }
+        
+
+        </script>
+    </apex:outputPanel>
+    
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/RentalFixtureSetAssignAgency.page b/force-app/main/default/pages/RentalFixtureSetAssignAgency.page
index f5262f5..5c742aa 100644
--- a/force-app/main/default/pages/RentalFixtureSetAssignAgency.page
+++ b/force-app/main/default/pages/RentalFixtureSetAssignAgency.page
@@ -37,7 +37,9 @@
        border: 1px solid #888;
        right: 5%;
        position: absolute;
-       width: 200px;
+       /* 20230628 ljh */
+       /* width: 200px; */
+       width: 300px;
     }
     .modal-content-cancel {
        background-color: #fefefe;
diff --git a/force-app/main/default/pages/RentalFixtureSetAssignAgency.page.bak b/force-app/main/default/pages/RentalFixtureSetAssignAgency.page.bak
new file mode 100644
index 0000000..f5262f5
--- /dev/null
+++ b/force-app/main/default/pages/RentalFixtureSetAssignAgency.page.bak
@@ -0,0 +1,558 @@
+<!-- 20230524 ljh lightning  -->
+<!-- <apex:page controller="RentalFixtureSetAssignAgencyController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="鍔炰簨澶勫垎閰�/鍙戣揣"> -->
+<apex:page controller="RentalFixtureSetAssignAgencyController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="鍔炰簨澶勫垎閰�/鍙戣揣" lightningStylesheets="true">
+<!-- 20210624 ljh update SFDC-C448GR --><!-- 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)}"/>
+    <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230525 ljh lightning  -->
+<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 */
+    }
+    span.dateFormat {
+        display: none;
+    }
+
+    /* 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;
+    }
+    .modal-content-cancel {
+       background-color: #fefefe;
+       margin-left: -150px;
+       margin-top: 100px;
+       padding: 20px;
+       border: 1px solid #888;
+       left: 50%;
+       position: absolute;
+       width: 300px;
+    }
+    table.list td{
+        width:100px;
+        border-width: 1px;
+    }
+    table.list td.col_chk {
+        width:30px;
+    }
+    /* 20230524 ljh lightning start  */
+    /* body .pbBody table.list tr.headerRow td, body .pbBody table.list tr.headerRow th {
+        border-width: 1px;
+    } */
+    /* 20230524 ljh lightning end  */
+</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);
+    }
+    //20210513 ljh 1829 add start
+    else if(scanType.indexOf('2;') != -1){ 
+        scanAndMatch(qrcode+';'+scanType);
+    }
+    //20210513 ljh 1829 add end
+    else{
+        scanAndMatch(qrcode);
+    }
+    j$("#scanedqr").append("<li>"+qrcode+"</li>");
+    j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
+    unblockUI();
+}
+function checkAll() {
+    j$("table td.dataCellBorder1.col_chk input").each(function(){
+        if(!this.disabled) {
+            this.checked = j$("input#checker").prop('checked');
+        }
+    })
+}
+var globalChecked = false;
+function checkGlobal() {
+    globalChecked = !globalChecked;
+    j$("table td.col_chk input[type=checkbox]:enabled").each(function(){
+        this.checked = globalChecked;
+    })
+}
+/**
+20210707 SFDC-C448KZ you start
+function cancelModalConfirm() {
+    //妫�鏌ュ彇娑堢悊鐢卞拰鍙栨秷鐞嗙敱澶囨敞
+    var reason = j$.trim(j$("select[name$=cancelReason]").val());
+    var remark = j$.trim(j$("input[name$=cancelReasonRemark]").val());
+    //20210420 ljh 1711 update start
+    //if(reason == "" || remark == "") {
+    if(reason == "" && remark == "") {
+        j$("#errormessage span").html('鍙栨秷鐞嗙敱鍜屽彇娑堢悊鐢卞娉ㄤ笉鍙负绌猴紒');
+        j$("#errormessage").css('display', '');
+    }
+    else if(reason == "") {
+        j$("#errormessage span").html('鍙栨秷鐞嗙敱涓嶅彲涓虹┖锛�');
+        j$("#errormessage").css('display', '');
+    }
+    else if(remark == "") {
+        j$("#errormessage span").html('鍙栨秷鐞嗙敱澶囨敞涓嶅彲涓虹┖锛�');
+        j$("#errormessage").css('display', '');
+    }
+    //20210420 ljh 1711 update end
+    else {
+        j$("#errormessage").css('display', 'none');
+        blockme();
+        cancelSet();
+    }
+}
+**/
+function cancelModalConfirm() {
+   //妫�鏌ュ彇娑堢悊鐢卞拰鍙栨秷鐞嗙敱澶囨敞   cancle Reason Lcr
+    var reason = j$(escapeVfId('allPage:allForm:Cancel_Reason')).value();
+    var remark = j$(escapeVfId('allPage:allForm:Loaner_cancel_reason')).value();
+    var Lcr = j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).value();
+    if(reason == "" && remark == "") {
+        j$("#errormessage span").html('鍙栨秷鐞嗙敱鍜屽鍝佺敵璇峰彇娑堢悊鐢变笉鍙负绌猴紒');
+        j$("#errormessage").css('display', ''); 
+    }
+    else if(reason == "") {
+        j$("#errormessage span").html('鍙栨秷鐞嗙敱涓嶅彲涓虹┖锛�');
+        j$("#errormessage").css('display', '');
+    }
+    else if(remark == "") {
+        j$("#errormessage span").html('涓�瑙堝彇娑堢悊鐢变笉鍙负绌猴紒');
+        j$("#errormessage").css('display', '');
+    }else if(remark == "鍏朵粬" && Lcr =="") {
+        j$("#errormessage span").html('鍙栨秷鐞嗙敱澶囨敞涓嶅彲涓虹┖锛�');
+        j$("#errormessage").css('display', '');
+    }
+    else {
+        j$("#errormessage").css('display', 'none');
+        blockme();
+        cancelSet();
+    }
+}
+/**20210707 SFDC-C448KZ you end**/
+
+function showCancelModal() {
+    var hasChecked = false;
+    j$("table td.dataCellBorder1.col_chk input").each(function(){
+        if(this.checked) {
+            hasChecked = true;
+        }
+    })
+    if(!hasChecked) {
+        alert('鏈�夋嫨鍙栨秷鐨勪竴瑙堬紒');
+        return;
+    }
+    j$('#cancelModal').show();
+    j$('#searchBlock1').show();
+    
+}
+/** 20210707 SFDC-C448KZ you start**/
+ function changeCancleReasonJs(){
+    var Cancel_Reason = j$(escapeVfId('allPage:allForm:Cancel_Reason')).value();
+    if(Cancel_Reason != '琚姩鍙栨秷'){
+        j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).val('');
+        j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).attr('disabled',true);
+    }    
+}
+function changeReasonJs(){
+    var reason = j$(escapeVfId('allPage:allForm:Loaner_cancel_reason')).value();
+    if(reason != null && reason == '鍏朵粬'){
+        j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).attr('disabled',false);
+    }else{
+        j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).val('');
+        j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).attr('disabled',true);
+    }    
+}
+/** 20210707 SFDC-C448KZ you end**/
+</script>
+<div id="myModal" class="modal">
+  <!-- Modal content -->
+  <div class="modal-content">
+    <span class="close" onclick="stopScan()">&times;</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: 60px; overflow: auto">
+    </ul>
+  </div>
+</div>
+
+<apex:form id="allForm" styleclass="pbBody">
+    <!-- 20210624 ljh update SFDC-C448GR -->
+    <!-- <apex:actionFunction name="stockDown" action="{!stockDown}" rerender="detail,message,done_flg"  oncomplete="unblockUI();checkMessage();checEventFrame();"/> -->
+    <apex:actionFunction name="scanAndMatch" action="{!scanAndMatch}" rerender="detail,message,done_flg"  oncomplete="unblockUI();checkMessage();checEventFrame();">
+        <apex:param name="firstParam" assignTo="{!qrcode}" value="" />
+    </apex:actionFunction>
+    <apex:actionFunction name="cancelSet" action="{!cancelSet}" rerender="allForm"  oncomplete="unblockUI();checkMessage();checEventFrame();j$('#cancelModal').hide();"/>
+    <apex:actionFunction name="changeStep" rerender="allForm"  oncomplete="unblockUI();"/>
+
+    <apex:inputHidden value="{!done_flg}" id="done_flg"/>
+    <apex:inputHidden value="{!readOnly}" id="readOnly"/>
+    <div id="cancelModal" class="modal">
+        <div class="modal-content-cancel">
+            <table>
+                <tr>
+                    <td colspan="2" align="center">
+                        <apex:commandButton style="margin: 0 20px;" value="纭畾" onclick="cancelModalConfirm(); return false;" />
+                        <apex:commandButton style="margin: 0 20px;" value="鍙栨秷" onclick="j$('#errormessage').css('display', 'none');j$('#cancelModal').hide();return false;"/>
+                    </td>
+                </tr>
+                <tr style="display: none;" id="errormessage">
+                    <td colspan="2">
+                        <span style="color: #F00; font-weight:bold"></span>
+                    </td>
+                </tr>
+                <!--
+                <tr>
+                    <td>
+                        <apex:outputLabel value="鍙栨秷鐞嗙敱"/>
+                    </td>
+                    <td>
+                        <apex:selectList id="cancelReason" size="1" value="{!cancelReason}">
+                            <apex:selectOption itemValue="" itemLabel="--鏃�--"/>
+                            <apex:selectOption itemValue="涓诲姩鍙栨秷" itemLabel="涓诲姩鍙栨秷"/>
+                            <apex:selectOption itemValue="琚姩鍙栨秷" itemLabel="琚姩鍙栨秷"/>
+                        </apex:selectList>
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        <apex:outputLabel value="鍙栨秷鐞嗙敱澶囨敞"/> 
+                    </td>
+                    <td>
+                        <apex:inputText id="cancelReasonRemark" value="{!cancelReasonRemark}"/>
+                    </td>
+                </tr>
+            -->
+            <!--  20210707 SFDC-C448KZ you start-->
+            <tr>
+                <td>
+                    <apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Cancel_Reason__c.label}" />
+                </td>
+                <td>
+                <apex:inputField value="{!parentObj.Cancel_Reason__c}" id="Cancel_Reason" onchange="changeCancleReasonJs();"/>
+                </td>
+            </tr>            
+            <tr rendered="true">
+                <td>
+                    <apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_reason__c.label}" for="Loaner_cancel_reason"/>
+                </td>
+                <td>
+                    <apex:inputField value="{!parentObj.Loaner_cancel_reason__c}" id="Loaner_cancel_reason"  onchange="changeReasonJs();"/>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    <apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_Remarks__c.label}" for="Loaner_cancel_request"/>
+                </td>
+                <td>
+                 <apex:inputField value="{!parentObj.Loaner_cancel_request__c}" id="Loaner_cancel_request" html-disabled="true"/>
+                </td>
+            </tr>
+            <!--  20210707 SFDC-C448KZ you end-->
+            <!--<tr>  20210707 SFDC-C448KZ you start-->
+            <!-- <apex:pageBlock id="searchBlock1" tabStyle="Report">
+            <apex:pageBlockSection title="澶囧搧鍊熷嚭鐢宠涓�瑙堝彇娑�" collapsible="false" id="cancle">
+               <apex:pageBlockSectionItem id="CR">
+                    <apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Cancel_Reason__c.label}" />
+                    <apex:inputField value="{!parentObj.Cancel_Reason__c}" id="Cancel_Reason" onchange="changeCancleReasonJs();"/>
+                </apex:pageBlockSectionItem>
+                
+                <apex:pageBlockSectionItem ></apex:pageBlockSectionItem>              
+                <apex:pageBlockSectionItem rendered="true" id="Reason">
+                    <apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_reason__c.label}" for="Loaner_cancel_reason"/>
+                    <apex:inputField value="{!parentObj.Loaner_cancel_reason__c}" id="Loaner_cancel_reason"  onchange="changeReasonJs();"/>
+                </apex:pageBlockSectionItem>
+                <apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
+                <apex:pageBlockSectionItem id="Lcr">
+                    <apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_Remarks__c.label}" for="Loaner_cancel_request"/>
+                    <apex:inputField value="{!parentObj.Loaner_cancel_request__c}" id="Loaner_cancel_request" html-disabled="true"/>
+                </apex:pageBlockSectionItem>
+            </apex:pageBlockSection>
+            </apex:pageBlock>   -->
+            <!-- 20210707 SFDC-C448KZ you end
+            </tr>--> 
+            </table>
+        </div>
+    </div>
+
+    <apex:pageBlock id="searchBlock" tabStyle="Report">
+        <apex:pageBlockButtons location="top">
+            棰勮鍑鸿揣鏃�
+            <apex:inputField id="rentalStartDate" value="{!parentObj.Asset_loaner_start_day__c}"/>
+            <apex:commandButton value="閫傜敤" action="{!applyDate}" onclick="blockme();" reRender="allForm" disabled="{!readOnly}" oncomplete="unblockUI();checkMessage();checEventFrame();"/>
+            &nbsp; &nbsp;
+            鍑哄簱
+            <apex:selectList size="1" value="{!stepName}" onchange="blockme();changeStep();return false;">
+                <apex:selectOption itemValue="鏃�" itemLabel="鏃�"/>
+                <apex:selectOption itemValue="鍒嗛厤" itemLabel="鍒嗛厤"/>
+                <!-- 20210624 ljh update SFDC-C448GR -->
+                <!-- <apex:selectOption itemValue="涓嬫灦" itemLabel="涓嬫灦"/> -->
+                <apex:selectOption itemValue="鍙戣揣" itemLabel="鍙戣揣"/>
+            </apex:selectList>
+            &nbsp; &nbsp;
+            <!-- 20210517 ljh update 1829 start -->
+            <!-- <apex:commandButton value="鎵竴鎵�" onclick="qrscan();return false;" disabled="{!readOnly || stepName!='鍒嗛厤'}"/> -->
+            <apex:commandButton value="鎵竴鎵�" onclick="qrscan(0);return false;" disabled="{!readOnly || stepName!='鍒嗛厤'}"/>
+            <!-- 20210517 ljh update 1829 end -->
+            <apex:commandButton value="鍒嗛厤" action="{!assign}" onclick="blockme();" reRender="allForm" disabled="{!readOnly || stepName!='鍒嗛厤'}" oncomplete="unblockUI();checkMessage();checEventFrame();"/>
+            <!-- 20210624 ljh update SFDC-C448GR -->
+            <!-- <apex:commandButton value="涓嬫灦" action="{!stockdown}" onclick="blockme();" reRender="allForm" disabled="{!readOnly || stepName!='涓嬫灦'}" oncomplete="unblockUI();checkMessage();checEventFrame();"/> -->
+            <apex:commandButton value="鍙戣揣" action="{!shipment}" onclick="blockme();" reRender="allForm" disabled="{!readOnly || stepName!='鍙戣揣'}" oncomplete="unblockUI();checkMessage();checEventFrame();"/>
+            &nbsp; &nbsp;
+            <apex:commandButton value="鍏ㄩ��/鍙栨秷鍏ㄩ��" onclick="checkGlobal(); return false;" disabled="{!readOnly}"/>
+            <apex:commandButton value="鍙栨秷" onclick="showCancelModal(); return false;" disabled="{!readOnly}"/>
+        </apex:pageBlockButtons>
+        <apex:pageBlockSection title="鍔炰簨澶勫垎閰�">
+            <apex:pageBlockSectionItem >
+                <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Name.Label}"/>
+                <apex:outputField value="{!parentObj.Name}"/>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem >
+                <apex:outputLabel value="涓诲崟棰勮鍑鸿揣鏃�"/>
+                <apex:outputText value="{0,date, yyyy/MM/dd}">
+                    <apex:param value="{!masterDate}"/>
+                </apex:outputText>
+            </apex:pageBlockSectionItem>
+            <!-- 20210508 ljh add 1672 start -->
+            <apex:pageBlockSectionItem >
+                <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.demo_purpose2__c.Label}"/>
+                <apex:outputField value="{!parentObj.demo_purpose2__c}"/>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem >
+            &nbsp;&nbsp;&nbsp;&nbsp;
+            </apex:pageBlockSectionItem>
+            <!-- 20210508 ljh add 1672 end -->
+            <apex:pageBlockSectionItem >
+                <apex:outputLabel value="鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.Name.Label}"/>
+                <apex:outputPanel >
+                    <apex:inputField value="{!slip.Name}" id="SlipNo" rendered="{!slipEnabled && stepName == '鍙戣揣'}"/>
+                    <apex:outputField value="{!slip.Name}" rendered="{!NOT(slipEnabled && stepName == '鍙戣揣')}"/>
+                    <apex:commandButton value="鎵繍杈撳崟" onclick="qrscan(1);return false;" disabled="{!NOT(slipEnabled && stepName == '鍙戣揣')}"/>
+                    <apex:commandButton value="妫�绱�" action="{!searchSlip}" onclick="blockme();" reRender="allForm" disabled="{!NOT(slipEnabled && stepName == '鍙戣揣')}" oncomplete="unblockUI();checEventFrame();"/>
+                </apex:outputPanel>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem >
+                <apex:outputLabel value="鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryType__c.Label}"/>
+                <apex:outputPanel >
+                    <apex:inputField value="{!slip.DeliveryType__c}" id="deliveryType" rendered="{!slipEnabled && stepName == '鍙戣揣'}"/>
+                    <apex:outputField value="{!slip.DeliveryType__c}"  rendered="{!NOT(slipEnabled && stepName == '鍙戣揣')}"/>
+                </apex:outputPanel>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem >
+                <apex:outputLabel value="鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.Distributor_method__c.Label}"/>
+                <apex:outputPanel >
+                    <apex:inputField value="{!slip.Distributor_method__c}" id="distributorMethod" rendered="{!slipEnabled && stepName == '鍙戣揣'}"/>
+                    <apex:outputField value="{!slip.Distributor_method__c}" rendered="{!NOT(slipEnabled && stepName == '鍙戣揣')}"/>
+                </apex:outputPanel>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem >
+                <apex:outputLabel value="鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryCompany__c.Label}"/>
+                <apex:outputPanel >
+                    <apex:inputField value="{!slip.DeliveryCompany__c}" id="deliveryCompany" rendered="{!slipEnabled && stepName == '鍙戣揣'}"/>
+                    <apex:outputField value="{!slip.DeliveryCompany__c}" rendered="{!NOT(slipEnabled && stepName == '鍙戣揣')}"/>
+                </apex:outputPanel>
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem >
+                <apex:outputLabel value="鍙戣揣-{!$ObjectType.FixtureDeliverySlip__c.fields.Wh_Staff__c.Label}"/>
+                <apex:outputPanel >
+                    <apex:inputField value="{!slip.Wh_Staff__c}" styleClass="hideDropdown" rendered="{!slipEnabled && stepName == '鍙戣揣'}"/>
+                    <apex:outputField value="{!slip.Wh_Staff__c}" rendered="{!NOT(slipEnabled && stepName == '鍙戣揣')}"/>
+                </apex:outputPanel>
+            </apex:pageBlockSectionItem>
+            <!-- 20201209 ljh add start-->
+            <apex:pageBlockSectionItem >
+                <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Delivery_Agency__c.Label}"/>
+                <!-- 20210624 ljh update SFDC-C448GR start-->
+                <!-- <apex:outputPanel >
+                    <apex:inputField value="{!parentObj.Delivery_Agency__c}" styleClass="hideDropdown" rendered="{!parentObj.StockDown_ng_num__c == 0 && stepName == '鍙戣揣'}" />
+                    <apex:outputField value="{!parentObj.Delivery_Agency__c}" rendered="{!NOT(parentObj.StockDown_ng_num__c == 0 && stepName == '鍙戣揣')}"/>
+                </apex:outputPanel> -->
+                <apex:outputPanel >
+                    <apex:inputField value="{!parentObj.Delivery_Agency__c}" styleClass="hideDropdown" rendered="{!parentObj.Wei_Assigned_Cnt__c == 0 && stepName == '鍙戣揣'}" />
+                    <apex:outputField value="{!parentObj.Delivery_Agency__c}" rendered="{!NOT(parentObj.Wei_Assigned_Cnt__c == 0 && stepName == '鍙戣揣')}"/>
+                </apex:outputPanel>
+                <!-- 20210624 ljh update SFDC-C448GR end-->
+            </apex:pageBlockSectionItem>
+            <apex:pageBlockSectionItem html-style="display: none;">
+                <apex:inputField value="{!parentObj.SalesdeptSelect__c}"  style="display: none;" />
+            </apex:pageBlockSectionItem>
+            <!-- 20201209 ljh add end-->
+        </apex:pageBlockSection>
+    </apex:pageBlock>
+    <apex:outputPanel id="message">
+        <apex:pageMessages />
+    </apex:outputPanel>
+
+    <apex:outputPanel id="detail">
+    <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> 瀛樻斁鍦� </td>
+                    <td> 鍥哄畾璧勪骇缂栧彿(Key) </td>
+                    <td> 鏈鸿韩缂栧彿 </td>
+                    <td> 棰勮鍑鸿揣鏃� </td>
+                    <td style="{!IF(stepName='鍒嗛厤','background-color: #cfeef9','')}"> 鍒嗛厤 </td>
+                    <!-- 20210624 ljh update SFDC-C448GR -->
+                    <!-- <td style="{!IF(stepName='涓嬫灦','background-color: #cfeef9','')}"> 涓嬫灦 </td> -->
+                    <td> 鍊熷嚭澶囧搧涓�瑙堟槑缁嗙姸鎬� </td>
+                    <td> 澶囧搧鍒嗙被 </td><!-- 20210508 ljh add 1672  -->
+                    <td> 鎿嶄綔 </td> 
+                    <!-- 20210510 ljh add 1829 -->
+                </tr>
+                <apex:variable value="{!0}" var="Cnt" />
+                <apex:repeat id="dataline_L" value="{!esdList}" var="esdInfo">
+                    <tr class="" id="tableData_L_{!Cnt}" style="{!IF(esdInfo.rec.AgencyTempCancel__c, 'display: none','')}">
+                        <td class="dataCellBorder1 col_chk" align="center">
+                            <apex:inputCheckbox styleClass="rowchkcls" rendered="{!esdInfo.rec.Is_Body__c}" value="{!esdInfo.checked}" id="rowCheck" disabled="{!!esdInfo.editable}" html-qrscan="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
+                            <!-- 20210514 ljh 1829 add html-qrscan -->
+                        </td>
+                        <td> <apex:outputText value="{!esdInfo.tempModel}"/> </td>
+                        <td> {!esdInfo.tempLocation} </td>
+                        <td> {!esdInfo.tempKey}</td>
+                        <td> {!esdInfo.tempSerial} </td>
+                        <td>
+                            <apex:inputField value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Start_Date__c}" rendered="{!esdInfo.editable && stepName=='鍒嗛厤'}"/>
+                            <apex:outputText value="{0,date, yyyy/MM/dd}" rendered="{!NOT(esdInfo.editable && stepName=='鍒嗛厤')}">
+                                <apex:param value="{!esdInfo.tempDate}"/>
+                            </apex:outputText>
+                        </td>
+                        <td style="{!IF(stepName='鍒嗛厤','background-color: #cfeef9','')}">
+                            {!esdInfo.tempStatus}
+                        </td>
+                        <!-- 20210624 ljh update SFDC-C448GR -->
+                        <!-- <td style="{!IF(stepName='涓嬫灦','background-color: #cfeef9','')}">
+                            <apex:outputField value="{!esdInfo.rec.StockDown__c}"/>
+                        </td> -->
+                        <td> <apex:outputText value="{!esdInfo.tempDetailStatus}"/> </td>
+                        <td> {!esdInfo.tempEquipmentType}</td>
+                        <!-- 20210508 ljh add 1672  -->
+                        <td>
+                            <apex:commandButton rendered="{!esdInfo.rec.Is_Body__c}" value="鍒嗛厤浠f浛鍝�" onclick="qrscan('2;{!esdInfo.rec.Rental_Apply_Equipment_Set__c}');return false;" disabled="{!readOnly || esdInfo.IsCanSub || stepName != '鍒嗛厤'}"/>
+                        </td>
+                        <!-- 20210508 ljh add 1829  -->
+                    </tr>
+                    <apex:variable value="{!Cnt+1}" var="Cnt" />
+                </apex:repeat>
+            </table>
+        </div>
+    </apex:outputPanel>
+    <apex:outputPanel id="checEventFrame">
+        <script>
+            checEventFrame();
+        </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.toString();//20210518 ljh update toString 1829
+        //20210514 ljh add 1829 start
+        //console.log(scanType+':~'+scanType.indexOf('2;'));
+        if(scanType.indexOf('2;') != -1){
+            j$("input[type=checkbox][qrscan='"+scanType.split('2;')[1]+"']").prop("checked", true);
+        }
+        //20210514 ljh add 1829 end
+        if (!standalone && !safari && ios) {
+            window.location.href="sfqr://scan";
+        } else {
+            j$("#myModal").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$("#myModal").hide();
+        });
+        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;
+            }
+        });
+    });
+    function checEventFrame() {
+        j$('select[name$="deliveryType"]').val('鍙戣揣');
+        j$('select[name$="deliveryType"]').prop('disabled', true);
+        j$("input[name=onetoone]").siblings("input[type=checkbox]").each(function(){
+            this.disabled = true;
+        })
+        if (j$(escapeVfId('allPage:allForm:readOnly')).val() == 'true') {
+            j$("input#checker").attr('disabled', 'disabled');
+        }
+        else {
+            j$("input#checker").removeAttr('disabled');
+        }
+        setTimeout(function() {
+            j$('select[name$="distributorMethod"]').children('option[value="绌鸿繍"]').remove();
+            j$('select[name$="deliveryCompany"]').children('option[value="鑾辨瘮鐗�"],option[value="鍢夐噷澶ч��"]').remove();
+            if (j$(escapeVfId('allPage:allForm:readOnly')).val() == 'true') {
+                j$("input[type=text],select").each(function(){
+                    this.disabled = true;
+                })
+            }
+        }, 500);
+
+    }
+    // checEventFrame();
+</script>
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css b/force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css
index 1e909b0..2e1b9a1 100644
--- a/force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css
+++ b/force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css
@@ -1,109 +1,186 @@
 @charset "utf-8";
 
 .detail {
-   margin-left:5px;
-   width:310px;
+    /* margin-left:5px;*/
+    /*width:310px;*/
 }
 
 .menu {
-   padding:0px;
-   border-left:1px solid #D1D1D1;
-   border-right:1px solid #D1D1D1;
+    padding:0px;
+    border-left:1px solid #D1D1D1;
+    border-right:1px solid #D1D1D1;
 }
 
 .menu h2{
-   margin:0;
-   padding:0;
-   font-size:14px;
+    margin:0;
+    padding:0;
+    font-size:16px;
 }
 
 .menu h2 div {
-	width: 308px;
-	text-align: left;
-	margin: 0;
-	background:#DCDCDC;
+    /*width: 308px;*//*20230615 ljh*/
+    text-align: left;
+    margin: 0;
+    background:#DCDCDC;
 }
-	
+
 .menu ul{
-   margin:0;
-   padding:1px;
-   list-style: none;
-   border-top:1px solid #ddd;
+    margin:0;
+    padding:1px;
+    list-style: none;
+    border-top:1px solid #ddd;
 }
 
 .menu li {
-   padding:0;
-   font-size:14px;
-   line-height:1.0;
-   /* 2023-04-23   zyh   lightning鍗囩骇   start */
-   height:33px;
-   /* height:23px; */
-   /* 2023-04-23   zyh   lightning鍗囩骇   end */
-   clear:both;
-   /*border-bottom: 1px dotted #999;*/
+    padding:0;
+    font-size:16px;
+    /* line-height:1.0; */
+    /* 2023-04-23   zyh   lightning鍗囩骇   start */
+    /* height:33px; */
+    /* height:23px; */
+    /* 2023-04-23   zyh   lightning鍗囩骇   end */
+    clear:both;
+    /*border-bottom: 1px dotted #999;*/
+    border-bottom: var(--lwc-borderWidthThin,1px) solid var(--slds-g-color-border-base-1, var(--lwc-colorBorder,rgb(229, 229, 229)))
 }
 
-.menu li span {
-	width: 140px;
-	text-align: right;
-	float: left;
-	margin: 5px 0px 0px 0px;
-}
+/* .menu li span {
+    width: 140px;
+    text-align: right;
+    float: left;
+    margin: 5px 0px 0px 0px;
+    height: 33px;
+    line-height:33px;
+} */
 
 .menu li span span{
-	text-align: left;
-	margin-left: 3px;
-	margin-top: 0px;
+    text-align: left;
+    margin-left: 3px;
+    margin-top: 0px;
 }
 
 .commandbutton {
-   font-size: 13px !important;
+    font-size: 13px !important;
 }
 
 .tabsize {
-   font-size: 14px !important;
+    font-size: 14px !important;
 }
 
 .detailtab {
-   font-size: 14px;
+    font-size: 16px;
 }
 
 .detailhander {
-   font-size: 16px;
+    font-size: 16px;
 }
 
 .deliveryslip {
-   font-size: 15px;
+    font-size: 15px;
 }
 
 .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 */
+    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;
-   width: 265px; /* Could be more or less, depending on screen size */
+    background-color: #fefefe;
+    margin-left: 6px;
+    margin-top: 100px;
+    padding: 20px;
+    border: 1px solid #888;
+    width: 265px; /* Could be more or less, depending on screen size */
 }
 
 .freezehander {
-   position: fixed;
-   top: 0px;
-   background-color:
-   white;
-   width: 320px;
-   z-index: 1;
-}
\ No newline at end of file
+    /*20230615 ljh*/
+    position: fixed;
+    top: 0px;
+    background-color:white;
+    /*width: 320px;*/
+    z-index: 1;
+    /*20230615 ljh*/
+}
+
+/***********************/
+.menu ul{
+    /* display: flex; */
+    list-style: none;
+    margin-bottom: 5px;
+}
+.menu ul li{
+   /*  flex: 1;
+    height: 55px;
+    max-width:200px;  */
+    width: calc(50% - 30px);
+    display: inline-block;
+    margin-left: 0;
+}
+.menu ul li Span{
+    /* display:inline-block; */
+    height: 50px;
+    line-height:50px;
+}
+.menu ul li input[type="checkbox"]{
+    width:16px;
+    height:16px;
+}
+.myBtn .btn{
+    margin: 1px 20px;
+}
+body .btn{
+    -webkit-appearance: none;
+    position: relative;
+    // margin: 1px 20px;
+    display: inline-block;
+    border: 1px solid transparent;
+    font-size: .75rem;
+    line-height: 1.875rem;
+    text-decoration: none;
+    white-space: normal;
+    border-radius: 0.25rem;
+    background: transparent;
+    background-clip: border-box;
+    color: rgba(1, 118, 211, 1);
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+    -webkit-transition: color .05s linear,background-color .05s linear;
+    transition: color .05s linear,background-color .05s linear;
+    padding-left: 1rem;
+    padding-right: 1rem;
+    text-align: center;
+    vertical-align: middle;
+    border: 1px solid rgb(201, 201, 201);
+    -webkit-transition: border 0.15s linear;
+    transition: border 0.15s linear;
+    border-color: rgb(201, 201, 201);
+    background-color: rgb(255, 255, 255);
+}
+body input.btn{
+    padding: 4px 1rem;
+}
+body input[type="text"],body select,span select{
+    border: 1px solid rgb(201, 201, 201);
+    border-radius: 0.25rem;
+    display: inline-block;
+    padding: 0 1rem 0 0.75rem;
+    min-height: calc(1.875rem + (1px * 2)) !important;
+    line-height: 1.875rem !important;
+    /* background-color: rgb(255, 255, 255); */
+    transition: border .1s linear,background-color .1s linear;
+    max-width: 100%;
+    color: rgb(24, 24, 24);
+}
+/***********************/
\ No newline at end of file
diff --git a/force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css.bak b/force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css.bak
new file mode 100644
index 0000000..1e909b0
--- /dev/null
+++ b/force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css.bak
@@ -0,0 +1,109 @@
+@charset "utf-8";
+
+.detail {
+   margin-left:5px;
+   width:310px;
+}
+
+.menu {
+   padding:0px;
+   border-left:1px solid #D1D1D1;
+   border-right:1px solid #D1D1D1;
+}
+
+.menu h2{
+   margin:0;
+   padding:0;
+   font-size:14px;
+}
+
+.menu h2 div {
+	width: 308px;
+	text-align: left;
+	margin: 0;
+	background:#DCDCDC;
+}
+	
+.menu ul{
+   margin:0;
+   padding:1px;
+   list-style: none;
+   border-top:1px solid #ddd;
+}
+
+.menu li {
+   padding:0;
+   font-size:14px;
+   line-height:1.0;
+   /* 2023-04-23   zyh   lightning鍗囩骇   start */
+   height:33px;
+   /* height:23px; */
+   /* 2023-04-23   zyh   lightning鍗囩骇   end */
+   clear:both;
+   /*border-bottom: 1px dotted #999;*/
+}
+
+.menu li span {
+	width: 140px;
+	text-align: right;
+	float: left;
+	margin: 5px 0px 0px 0px;
+}
+
+.menu li span span{
+	text-align: left;
+	margin-left: 3px;
+	margin-top: 0px;
+}
+
+.commandbutton {
+   font-size: 13px !important;
+}
+
+.tabsize {
+   font-size: 14px !important;
+}
+
+.detailtab {
+   font-size: 14px;
+}
+
+.detailhander {
+   font-size: 16px;
+}
+
+.deliveryslip {
+   font-size: 15px;
+}
+
+.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;
+   width: 265px; /* Could be more or less, depending on screen size */
+}
+
+.freezehander {
+   position: fixed;
+   top: 0px;
+   background-color:
+   white;
+   width: 320px;
+   z-index: 1;
+}
\ No newline at end of file
diff --git a/force-app/main/default/staticresources/ReceivingNotePageCss.css b/force-app/main/default/staticresources/ReceivingNotePageCss.css
index 92f7e3b..d41c546 100644
--- a/force-app/main/default/staticresources/ReceivingNotePageCss.css
+++ b/force-app/main/default/staticresources/ReceivingNotePageCss.css
@@ -11,7 +11,7 @@
   position:relative;
   overflow: hidden;
   float:left;
-  width:32768px;
+  /* width:32768px; *//*20230705 ljh*/
 }
 div#out_Div_L {
   position:relative;
@@ -22,7 +22,7 @@
   position:relative;
   overflow: auto;  /*銈广偗銉兗銉儛銉�*/
   float:left;
-  width:32768px;
+  /* width:32768px; *//*20230705 ljh*/
   height: 100px; /* tbody銈掕〃绀恒仚銈嬮珮銇曘�佸緦銇s銇仸瑾挎暣 */
 }
 div#in_Div_L {
@@ -60,7 +60,7 @@
 table.list td {width:100px;}
 table.list td.col_noChk {width:0px;}
 table.list td select {width:95%;}
-table.list td input {width:95%;}
+/* table.list td input {width:95%;} *//*20230705 ljh*/
 table.list td.col_Fixture_Model_No__c {width:230px;}
 table.list td.col_ProductName__c {width:230px;}
 table.list td.col_Fixture_Model_No_F__c {width:230px;}
diff --git a/force-app/main/default/staticresources/ReceivingNotePageCss.css.bak b/force-app/main/default/staticresources/ReceivingNotePageCss.css.bak
new file mode 100644
index 0000000..ffae7e2
--- /dev/null
+++ b/force-app/main/default/staticresources/ReceivingNotePageCss.css.bak
@@ -0,0 +1,88 @@
+td .dateFormat  {
+    display: none;
+}
+div.inline { float:left; }
+.clearBoth { clear:both; }
+div.reportBlock table.list {
+  width:auto;
+}
+
+div#out_Div { /* 銇撱亾銇儤銉冦儉銈掓牸绱� */
+  position:relative;
+  overflow: hidden;
+  float:left;
+  /* width:32768px; *//*20230705 ljh*/
+}
+div#out_Div_L {
+  position:relative;
+  overflow: hidden;
+  float:left;
+}
+div#in_Div {/* tbody銇屽叆銇c仸銇勩倠銆傘亾銇撱亴銈广偗銉兗銉璞�*/
+  position:relative;
+  overflow: auto;  /*銈广偗銉兗銉儛銉�*/
+  float:left;
+  /* width:32768px; *//*20230705 ljh*/
+  height: 100px; /* tbody銈掕〃绀恒仚銈嬮珮銇曘�佸緦銇s銇仸瑾挎暣 */
+}
+div#in_Div_L {
+  position:relative;
+  overflow: hidden;
+  float:left;
+  height: 100px;
+}
+
+body .pbBody table.list tr.headerRow td {
+  box-sizing: border-box;
+  text-align:center;font-weight:normal;
+  padding:0px 0px 0px 1px;
+}
+body .pbBody table.list tr.headerRow td.header1 {
+  text-align:center;font-weight:normal;
+  padding:0px 0px 0px 0px;
+}
+body .pbBody table.list tr.dataRow td {
+  box-sizing: border-box;
+  padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all;
+}
+body .pbBody table.list tr.dataRow td.dataCellBorder  {
+  /* 銇勩倝銇亜銆佷娇銇c仸銇勩仾銇� */
+  padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all;
+}
+body .pbBody table.list tr.dataRow td.dataCellBorder1 {
+  padding:0px 0px 0px 1px;
+  border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all;
+}
+@-moz-document url-prefix() {
+body .pbBody table.list tr.dataRow td.dataCellBorder1 {padding:0px 0px 0px 0px; border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all;}
+}
+
+table.list td {width:100px;}
+table.list td.col_noChk {width:0px;}
+table.list td select {width:95%;}
+table.list td input {width:95%;}
+table.list td.col_Fixture_Model_No__c {width:230px;}
+table.list td.col_ProductName__c {width:230px;}
+table.list td.col_Fixture_Model_No_F__c {width:230px;}
+table.list td.col_Fixture_Model_Name_F__c  {width:230px;}
+table.list td textarea {
+  height:50px;
+  width:90%;
+}
+
+/*URLFOR($Resource 銇伄銇elationListPagingCmpCss銇叆銈屻伨銇涖倱*/
+/*
+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;
+}
+*/
+
+body .pbBody table.list tr.headerRow td.col_Scroll {width:0px; padding:0px; border-width:0px;}
+body .pbBody table.list tr.dataRow td.col_Scroll {width:0px; padding:0px; border-width:0px;}
\ No newline at end of file
diff --git a/force-app/main/default/staticresources/RelationListPagingCmpCss.css b/force-app/main/default/staticresources/RelationListPagingCmpCss.css
index 6b092c2..4a4961f 100644
--- a/force-app/main/default/staticresources/RelationListPagingCmpCss.css
+++ b/force-app/main/default/staticresources/RelationListPagingCmpCss.css
@@ -12,7 +12,6 @@
   overflow: hidden;
   float:left;
   /* width:32768px; */ /* 20230523 ljh lightning */
-  /* width: 1200px; */
 }
 div#out_Div_L {
   position:relative;
@@ -24,14 +23,13 @@
   overflow: auto;  /*銈广偗銉兗銉儛銉�*/
   float:left;
   /* width:32768px; */ /* 20230523 ljh lightning */
-  height: 100px; /* tbody銈掕〃绀恒仚銈嬮珮銇曘�佸緦銇s銇仸瑾挎暣 */
-  /* width: 1200px; */
+  /* height: 100px; *//* tbody銈掕〃绀恒仚銈嬮珮銇曘�佸緦銇s銇仸瑾挎暣 */ /*20230607 ljh lightning*/
 }
 div#in_Div_L {
   position:relative;
   overflow: hidden;
   float:left;
-  height: 100px;
+  /* height: 100px; *//*20230607 ljh lightning*/
 }
 
 body .pbBody table.list tr.headerRow td {
@@ -110,10 +108,10 @@
   color: #000;
   white-space:normal;
 }
-table#tableData{
+/* table#tableData{
   width: 1000px;
 }
 table#tableHeader{
   width: 1000px;
-}
+} */
 /* 20230508 ljh lightning鍒囨崲 start */
diff --git a/force-app/main/default/staticresources/RelationListPagingCmpJS.js b/force-app/main/default/staticresources/RelationListPagingCmpJS.js
index ffe2bb4..c836700 100644
--- a/force-app/main/default/staticresources/RelationListPagingCmpJS.js
+++ b/force-app/main/default/staticresources/RelationListPagingCmpJS.js
@@ -338,8 +338,9 @@
 
     sbwidth = scrollbarWidth();
     // 20230531 ljh start 
-    // blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width() - widthAjustment - sbwidth - 20;
-    blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width()- sbwidth;
+    blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width() - widthAjustment - sbwidth - 20;
+    // blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width()- sbwidth;
+    var tableWidth = j$('table#tableData').width();
     // 20230531 ljh end 
     //銈炽兂銉濄儘銉笺儓銇伄銇D銈掑鏇�
     // 20230519 ljh start
@@ -377,7 +378,8 @@
         // j$('div#out_Div').css('width', (blockWidth + sbwidth) + 'px');
         // j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px');
         // 20230704 ljh start
-        if(blockWidth > 1000){
+        /*if(blockWidth > 1000){
+            console.log('333');
             // j$('div#out_Div').css('width', (blockWidth) + 'px');
             // j$('div#in_Div').css('width', (blockWidth) + 'px');
             if (j$('table#tableData').width() > j$('div#in_Div').width()) {
@@ -385,18 +387,34 @@
                 j$('div#in_Div').css('width', (blockWidth) + 'px');
             }
         }else{
+            console.log('222');
             j$('table#tableData').css('width', (blockWidth) + 'px');
             j$('table#tableHeader').css('width', (blockWidth) + 'px');
+            tableWidth = blockWidth; // 20230725 ljh
+        }*/
+        if (j$('table#tableData').width() > j$('div#in_Div').width()) {
+            j$('div#out_Div').css('width', (blockWidth) + 'px');
+            j$('div#in_Div').css('width', (blockWidth) + 'px');
+            j$('table#tableData').css('width', (tableWidth) + 'px');
+            j$('table#tableHeader').css('width', (tableWidth) + 'px');           
         }
-        // if (j$('table#tableData').width() > j$('div#in_Div').width()) {
-        //     j$('div#out_Div').css('width', (blockWidth) + 'px');
-        //     j$('div#in_Div').css('width', (blockWidth) + 'px');
-        // }
         // 20230704 ljh end
     }
     if (j$('table#tableData').width() > j$('div#in_Div').width()) {
         j$('div#in_Div').css('height', (blockHeight + sbwidth) +'px');
     }
+
+    j$('div#in_Div').scroll(function() {
+        j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
+        j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
+    });
+    j$('div#out_Div').scroll(function() {
+        j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
+    });
+    j$('div#in_Div_L').scroll(function() {
+        j$('div#in_Div').scrollTop(j$(this).scrollTop());
+    });
+
 }
 
 function expandAll(){
@@ -422,29 +440,40 @@
 
 function rerenderColWidth(colClass, isFirst) {
     // tableWidth = j$('body .pbBody table#tableHeader').width();// 20230519 ljh lightning add
+    console.log('555'+tableWidth);
     var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
     if (headerCol.hasClass("colUnHideIcon")) {
         listColClassMap[colClass] = "colUnHideIcon";
         // 20230519 ljh lightning start
         // tableWidth -= headerCol.width();
+        console.log('666'+listColClassWidthMap[colClass]);
         tableWidth -= listColClassWidthMap[colClass];
         // 20230519 ljh lightning end
         // 鍏ㄩ儴鏈�灏忓寲銇欍倠
         j$('body .pbBody table.list td.' + colClass).children().hide();
-        j$('body .pbBody table.list td.' + colClass).width(7).css("font-size", "0");
+        // 20230728 ljh 浼樺寲
+        // j$('body .pbBody table.list td.' + colClass).width(7).css("font-size", "0");
+        j$('body .pbBody table.list td.' + colClass).outerWidth(10).css("font-size", "0");
     } else {
         listColClassMap[colClass] = "colViewing";
+        console.log('888'+tableWidth);
         // if (isFirst == false) { // 20230519 ljh lightning  鍘绘帀鍒ゆ柇
             var hiddenWidth = headerCol.width();
             j$('body .pbBody table.list td.' + colClass).width("").css("font-size", "");
             j$('body .pbBody table.list td.' + colClass).children().show();
             tableWidth += listColClassWidthMap[colClass] + 2 - hiddenWidth;    // 2 is border
         // }
+        console.log('777'+listColClassWidthMap[colClass]);
     }
+    console.log('444'+tableWidth);
+    // 20230725 ljh start
+    // if(tableWidth < 1000){
+    //     j$('div#in_Div').css('width', tableWidth + 'px'); 
+    //     j$('div#out_Div').css('width', tableWidth + 'px');
+    // }
+    // 20230725 ljh start
     j$('table#tableData').css('width', (tableWidth + 2) + 'px');
     j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
-
-
 }
 function getColClassName(pObj) {
 
diff --git a/force-app/main/default/staticresources/RentalFixtureSetDetilSelectCss.css b/force-app/main/default/staticresources/RentalFixtureSetDetilSelectCss.css
index a5d6f18..da34568 100644
--- a/force-app/main/default/staticresources/RentalFixtureSetDetilSelectCss.css
+++ b/force-app/main/default/staticresources/RentalFixtureSetDetilSelectCss.css
@@ -16,4 +16,5 @@
 /* 20230517 ljh lightning start */
 table.list .col_IndexFromUniqueKey_Text__c {width:70px;}
 table.list .col_Fixture_Set_Detail__r_Quantity__c {width:70px;}
+table.list .col_Product_Status_Flag_F__c{width:100px;}
 /* 20230517 ljh lightning end */
\ No newline at end of file
diff --git a/force-app/main/default/staticresources/StyleUtilCss.css b/force-app/main/default/staticresources/StyleUtilCss.css
index 07a0d50..7fe6081 100644
--- a/force-app/main/default/staticresources/StyleUtilCss.css
+++ b/force-app/main/default/staticresources/StyleUtilCss.css
@@ -14,7 +14,7 @@
 /*淇℃伅鎻愮ず棰滆壊*/
 body .bPageBlock .pbSubheader, .slds-vf-scope .bPageBlock .pbSubheader{
 	background-color: #08107b !important;;
-    color: #FFF !important;;
+    color: #FFF !important;
 }
 body .infoM2, body .infoM3, body .infoM4, .slds-vf-scope .infoM2, .slds-vf-scope .infoM3, .slds-vf-scope .infoM4 {
     background-color: #08107b !important;
@@ -25,14 +25,13 @@
 body .pbButton{
     text-align: left;
 }
-
+.message .messageText{
+    color: #FFF !important;
+}
 /*妫�绱㈡涓嶄贡*/
 body .detailList .dataCol input[type="text"],body .detailList .dataCol select{
     min-width: 180px;
     padding: 0;
-}
-body .bPageBlock .detailList .dataCol{
-    width: 8%;
 }
 body .detailList td{
     position: static;
diff --git a/force-app/main/default/staticresources/StyleUtilCss.css.bak b/force-app/main/default/staticresources/StyleUtilCss.css.bak
new file mode 100644
index 0000000..07a0d50
--- /dev/null
+++ b/force-app/main/default/staticresources/StyleUtilCss.css.bak
@@ -0,0 +1,39 @@
+/* 20230616 ljh start lightning */
+/* 琛ㄦ牸琛ㄦ牸鍜屾*/
+body .pbBody table.list tr th, body .pbBody table.list tr td {
+    border: 1px solid #ededed;
+    white-space: normal;
+}
+body .pbBody table.list tr.headerRow td,body .pbBody table.list tr.headerRow th {
+    background: #f2f3f3;
+    border-width: 0 0 1px 1px;
+    border-color: #e0e3e5;
+    font-size: .9em;
+    font-weight: bold;
+}
+/*淇℃伅鎻愮ず棰滆壊*/
+body .bPageBlock .pbSubheader, .slds-vf-scope .bPageBlock .pbSubheader{
+	background-color: #08107b !important;;
+    color: #FFF !important;;
+}
+body .infoM2, body .infoM3, body .infoM4, .slds-vf-scope .infoM2, .slds-vf-scope .infoM3, .slds-vf-scope .infoM4 {
+    background-color: #08107b !important;
+}
+body .message, .slds-vf-scope .message{
+    background-color: #08107b !important;
+}
+body .pbButton{
+    text-align: left;
+}
+
+/*妫�绱㈡涓嶄贡*/
+body .detailList .dataCol input[type="text"],body .detailList .dataCol select{
+    min-width: 180px;
+    padding: 0;
+}
+body .bPageBlock .detailList .dataCol{
+    width: 8%;
+}
+body .detailList td{
+    position: static;
+}
diff --git a/force-app/main/default/staticresources/TransferShippmentReceivedcss.css b/force-app/main/default/staticresources/TransferShippmentReceivedcss.css
index 1b4e949..75a99d4 100644
--- a/force-app/main/default/staticresources/TransferShippmentReceivedcss.css
+++ b/force-app/main/default/staticresources/TransferShippmentReceivedcss.css
@@ -1,53 +1,54 @@
 @charset "utf-8";
 
 .detail {
-   margin-left:5px;
-   width:310px;
+    /* margin-left:5px;*/
+    /*width:310px;*/
 }
 
 .menu {
-   padding:0px;
-   border-left:1px solid #D1D1D1;
-   border-right:1px solid #D1D1D1;
+    padding:0px;
+    border-left:1px solid #D1D1D1;
+    border-right:1px solid #D1D1D1;
 }
 
 .menu h2{
-   margin:0;
-   padding:0;
-   font-size:14px;
+    margin:0;
+    padding:0;
+    font-size:16px;
 }
 
 .menu h2 div {
-	width: 308px;
-	text-align: left;
-	margin: 0;
-	background:#DCDCDC;
+    /*width: 308px;*//*20230615 ljh*/
+    text-align: left;
+    margin: 0;
+    background:#DCDCDC;
 }
 	
 .menu ul{
-   margin:0;
-   padding:1px;
-   list-style: none;
-   border-top:1px solid #ddd;
+    margin:0;
+    padding:1px;
+    list-style: none;
+    border-top:1px solid #ddd;
 }
 
 .menu li {
-   padding:0;
-   font-size:14px;
-   line-height:1.0;
-   /* 20230423 ljh lightning 鍗囩骇 start */
-   /* height:23px; */
-   height:33px;
-   /* 20230423 ljh lightning 鍗囩骇 end */
-   clear:both;
-   /*border-bottom: 1px dotted #999;*/
+    padding:0;
+    font-size:16px;
+    /*line-height:1.0;*/
+    /* 20230423 ljh lightning 鍗囩骇 start */
+    /* height:23px; */
+    /*height:33px;*/
+    /* 20230423 ljh lightning 鍗囩骇 end */
+    clear:both;
+    /*border-bottom: 1px dotted #999;*/
+    border-bottom: var(--lwc-borderWidthThin,1px) solid var(--slds-g-color-border-base-1, var(--lwc-colorBorder,rgb(229, 229, 229)))
 }
 
 .menu li span {
-	width: 140px;
+	/*width: 140px;
 	text-align: right;
 	float: left;
-	margin: 5px 0px 0px 0px;
+	margin: 5px 0px 0px 0px;*/
 }
 
 .menu li span span{
@@ -65,7 +66,7 @@
 }
 
 .detailtab {
-   font-size: 14px;
+   font-size: 16px;
 }
 
 .detailhander {
@@ -104,6 +105,81 @@
    top: 0px;
    background-color:
    white;
-   width: 320px;
+   /*width: 320px;*/
    z-index: 1;
-}
\ No newline at end of file
+}
+
+/***********************/
+.menu ul{
+    /* display: flex; */
+    list-style: none;
+    margin-bottom: 5px;
+}
+.menu ul li{
+    /* flex: 1;
+    height: 55px;
+    max-width:200px;  */
+    width: calc(50% - 30px);
+    display: inline-block;
+    margin-left: 0;
+}
+/* .menu ul li Span{ */
+.menu ul li span{
+    /* // display:inline-block; */
+    /* // display:inline-block; */
+    height: 50px;
+    line-height:50px;
+}
+.menu ul li input[type="checkbox"]{
+    width:16px;
+    height:16px;
+}
+.myBtn .btn{
+    margin: 1px 20px;
+}
+body .btn{
+    -webkit-appearance: none;
+    position: relative;
+    // margin: 1px 20px;
+    display: inline-block;
+    border: 1px solid transparent;
+    font-size: .75rem;
+    line-height: 1.875rem;
+    text-decoration: none;
+    white-space: normal;
+    border-radius: 0.25rem;
+    background: transparent;
+    background-clip: border-box;
+    color: rgba(1, 118, 211, 1);
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+    -webkit-transition: color .05s linear,background-color .05s linear;
+    transition: color .05s linear,background-color .05s linear;
+    padding-left: 1rem;
+    padding-right: 1rem;
+    text-align: center;
+    vertical-align: middle;
+    border: 1px solid rgb(201, 201, 201);
+    -webkit-transition: border 0.15s linear;
+    transition: border 0.15s linear;
+    border-color: rgb(201, 201, 201);
+    background-color: rgb(255, 255, 255);
+}
+body input.btn{
+    padding: 4px 1rem;
+}
+body input[type="text"],body select,span select{
+    border: 1px solid rgb(201, 201, 201);
+    border-radius: 0.25rem;
+    display: inline-block;
+    padding: 0 1rem 0 0.75rem;
+    min-height: calc(1.875rem + (1px * 2)) !important;
+    line-height: 1.875rem !important;
+    /* background-color: rgb(255, 255, 255); */
+    transition: border .1s linear,background-color .1s linear;
+    max-width: 100%;
+    color: rgb(24, 24, 24);
+}
+/***********************/
\ No newline at end of file
diff --git a/force-app/main/default/staticresources/TransferShippmentReceivedcss.css.bak b/force-app/main/default/staticresources/TransferShippmentReceivedcss.css.bak
new file mode 100644
index 0000000..1b4e949
--- /dev/null
+++ b/force-app/main/default/staticresources/TransferShippmentReceivedcss.css.bak
@@ -0,0 +1,109 @@
+@charset "utf-8";
+
+.detail {
+   margin-left:5px;
+   width:310px;
+}
+
+.menu {
+   padding:0px;
+   border-left:1px solid #D1D1D1;
+   border-right:1px solid #D1D1D1;
+}
+
+.menu h2{
+   margin:0;
+   padding:0;
+   font-size:14px;
+}
+
+.menu h2 div {
+	width: 308px;
+	text-align: left;
+	margin: 0;
+	background:#DCDCDC;
+}
+	
+.menu ul{
+   margin:0;
+   padding:1px;
+   list-style: none;
+   border-top:1px solid #ddd;
+}
+
+.menu li {
+   padding:0;
+   font-size:14px;
+   line-height:1.0;
+   /* 20230423 ljh lightning 鍗囩骇 start */
+   /* height:23px; */
+   height:33px;
+   /* 20230423 ljh lightning 鍗囩骇 end */
+   clear:both;
+   /*border-bottom: 1px dotted #999;*/
+}
+
+.menu li span {
+	width: 140px;
+	text-align: right;
+	float: left;
+	margin: 5px 0px 0px 0px;
+}
+
+.menu li span span{
+	text-align: left;
+	margin-left: 3px;
+	margin-top: 0px;
+}
+
+.commandbutton {
+   font-size: 13px !important;
+}
+
+.tabsize {
+   font-size: 14px !important;
+}
+
+.detailtab {
+   font-size: 14px;
+}
+
+.detailhander {
+   font-size: 16px;
+}
+
+.deliveryslip {
+   font-size: 15px;
+}
+
+.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;
+   width: 265px; /* Could be more or less, depending on screen size */
+}
+
+.freezehander {
+   position: fixed;
+   top: 0px;
+   background-color:
+   white;
+   width: 320px;
+   z-index: 1;
+}
\ No newline at end of file

--
Gitblit v1.9.1