From 6316cdaa2ac17f6a9210035ac2f57b964f273516 Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期三, 10 五月 2023 14:00:21 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev

---
 force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js                                              |    2 
 force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.html                |    5 
 force-app/main/default/lwc/lexAppCancelSubmit/lexAppCancelSubmit.js                                  |   23 
 force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js                    |    6 
 force-app/main/default/staticresources/OpportunityPCLJs.js                                           |   52 
 force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js                  |   23 
 force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js                                            |   59 
 force-app/main/default/classes/ConsumApplyCancelController.cls                                       | 2739 +++++++++++++++++++++++++++++++++++++++++-
 force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.html                                |    5 
 force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js-meta.xml         |   11 
 force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.css                                           |   12 
 force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp                                  |    8 
 force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.js                                  |   72 +
 force-app/main/default/lwc/lexCreateNewServiceContract/__tests__/lexCreateNewServiceContract.test.js |   25 
 force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.css                 |   10 
 force-app/main/default/classes/eSignFormAttachmentController.cls                                     |   36 
 force-app/main/default/lwc/lexBidAnnouncementConsentButton/lexBidAnnouncementConsentButton.js        |   44 
 force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js-meta.xml                                 |   11 
 force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAuraController.js                         |    8 
 force-app/main/default/classes/buttonAccountCtl.cls                                                  |   40 
 force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.js-meta.xml                         |   11 
 force-app/main/default/lwc/lexSubmitApprovalProcess/lexSubmitApprovalProcess.js                      |   16 
 force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js          |   39 
 force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp-meta.xml                         |    5 
 force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js                |   77 +
 force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js-meta.xml       |   11 
 force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js-meta.xml                                   |   11 
 force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js                  |   31 
 force-app/main/default/classes/UploadOBPMController.cls                                              |    8 
 force-app/main/default/lwc/lexBidAnnouncementApplyForButton/lexBidAnnouncementApplyForButton.js      |   31 
 force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.html              |    5 
 force-app/main/default/classes/buttonAccountCtl.cls-meta.xml                                         |    5 
 force-app/main/default/staticresources/RelationListPagingCmpJS.js                                    |    9 
 force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js                                                |    2 
 force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.html                                          |    3 
 force-app/main/default/pages/UploadOBPM.page                                                         |    2 
 force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js                                          |   84 +
 force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js                                              |    2 
 force-app/main/default/pages/eSignFormAttachment.page                                                |   25 
 force-app/main/default/pages/CampaignMemberBMEEditAndDelete.page                                     |    2 
 force-app/main/default/lwc/lexQISSC/lexQISSC.js                                                      |    2 
 force-app/main/default/lwc/lexCancelApply/lexCancelApply.js                                          |   11 
 force-app/main/default/pages/RepairPCL.page                                                          |  101 
 force-app/main/default/pages/CheckPlanDeleteButton.page                                              |    2 
 force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.html                                        |    5 
 force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js                  |   63 
 force-app/main/default/lwc/lexAppSubmitButton/lexAppSubmitButton.js                                  |   40 
 force-app/main/default/lwc/lexRentalApplyESetRefreshStatus/lexRentalApplyESetRefreshStatus.js        |    7 
 force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.css                                         |   10 
 49 files changed, 3,462 insertions(+), 349 deletions(-)

diff --git a/force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp b/force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp
new file mode 100644
index 0000000..4943f7d
--- /dev/null
+++ b/force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp
@@ -0,0 +1,8 @@
+<aura:component implements="flexipage:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:actionOverride,lightning:isUrlAddressable" access="global"> 
+    <aura:attribute name="recordId" type="String" />
+    <aura:handler name="render" value="{!this}"  action="{!c.closeModal}" />
+    <aura:attribute name="isDoneRendering" type="Boolean" default="false"/>
+    <div class="exampleHolder">
+        <c:lexUploadOBPM recordId="{!v.recordId}" />
+    </div>
+</aura:component>
\ No newline at end of file
diff --git a/force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp-meta.xml b/force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp-meta.xml
new file mode 100644
index 0000000..4974b7d
--- /dev/null
+++ b/force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>54.0</apiVersion>
+    <description>A Lightning Component Bundle</description>
+</AuraDefinitionBundle>
\ No newline at end of file
diff --git a/force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAuraController.js b/force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAuraController.js
new file mode 100644
index 0000000..d71b2da
--- /dev/null
+++ b/force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAuraController.js
@@ -0,0 +1,8 @@
+({
+	closeModal: function(component, event, helper) { 
+        $A.get("e.force:closeQuickAction").fire();
+        if(!cmp.get("v.isDoneRendering")){
+	      cmp.set("v.isDoneRendering", true);
+	    }
+    }
+})
\ No newline at end of file
diff --git a/force-app/main/default/classes/ConsumApplyCancelController.cls b/force-app/main/default/classes/ConsumApplyCancelController.cls
index 3490924..8decdcb 100644
--- a/force-app/main/default/classes/ConsumApplyCancelController.cls
+++ b/force-app/main/default/classes/ConsumApplyCancelController.cls
@@ -1,90 +1,2691 @@
-public class ConsumApplyCancelController {
+global without sharing class ConsumApplyWebService {
+    // TODO please use public okStatus
+    public final static Integer okStatus = 99;
 
-    /*--------- private ---------*/
-    private Id objId {get; set;}
+    // 澶囧搧鍊熷嚭鏃堕棿check
+    WebService static String approvalCheck(String ConsumApplyId) {
+        try {
+            // check缁撴灉
+            String returnStr = '';
 
-    /*--------- public ---------*/
-    public Consum_Apply__c ra {get; set;}
-    public String saveStatus {get; set;}
+            //澶囧搧鍊熷嚭鐢宠
+            Consum_Apply__c[] ConsumApply = [select Id
+                                                //,repair__r.Repair_Final_Inspection_Date__c
+                                                ,Bollow_Date__c
+                                                //,repair__r.Return_Without_Repair_Date__c
+                                                ,CreatedDate
+                                                ,Consum_Apply_Equipment_Set_Detail_Cnt__c
+                                                //,Prepare_Day__c 
+                                            from Consum_Apply__c 
+                                            where Id = :ConsumApplyId];
+            if (ConsumApply.size() == 0) {
+                returnStr = '娌℃湁澶囧搧鍊熷嚭鐢宠锛岃纭銆�';
+                return returnStr;
+            }
+            Consum_Apply__c ra = ConsumApply[0];
+            if (ra.Consum_Apply_Equipment_Set_Detail_Cnt__c <= 0) {
+                returnStr = '娌℃湁鑰楁潗涓�瑙堬紝璇风‘璁ゃ��';
+                return returnStr;
+            }
 
-
-    /**
-    * @description ConsumApplyCancelController   Class鐨勬瀯閫犲嚱鏁�
-    * @param objId 鐢宠涔D
-    **/
-    public ConsumApplyCancelController() {
-        this.objId = ApexPages.currentPage().getParameters().get('objId');
-    }
-
-    /**
-    * @description ConsumApplyCancelController 鍒濆鍖栨柟娉�
-    **/
-    public void init() {
-        try{
-          if (String.isBlank(this.objId)) {
-             throw new ControllerUtil.myException('璇疯缃�楁潗鍊熷嚭鐢宠鐨処d');
-          }
-          if (String.isNotBlank(this.objId)) {
-              List<Consum_Apply__c> ras = getRas(this.objId);
-              if (ras.size() == 0) {
-                throw new ControllerUtil.myException('娌℃湁妫�绱㈠嚭鑰楁潗鐢宠');
-              }
-              this.ra = ras[0];
-          }
+            String message = '';
+            List<Consum_Apply_Equipment_Set_Detail__c> caesdList = [SELECT Id
+                        , Asset__c
+                        , Consum_Can_Request_approval_Date__c
+                        , Fixture_Model_No_F__c
+                     FROM Consum_Apply_Equipment_Set_Detail__c
+                    WHERE Consum_Apply__c = :ConsumApplyId
+                      AND Cancel_Select__c = false
+                    ORDER BY Id];
+            for (Consum_Apply_Equipment_Set_Detail__c caesd : caesdList) {
+                caesd.InputCheck__c = true;
+                if (String.isBlank(caesd.Asset__c)) {
+                    return '鏈夋病鏈夋殏瀹氬垎閰嶇殑鏄庣粏锛屼笉鑳芥彁浜ょ敵璇�';
+                }
+                message += caesd.Fixture_Model_No_F__c + '\n';
+            }
+            message = message.removeEnd('\n');
+            update caesdList;
+            ra.Consum_Apply_Detail_ForEmail__c = message;
+            if (Trigger.isExecuting == false) {
+                update ra;
+            }
+            else {
+                return '1' + message;
+            }
         }
         catch (Exception e) {
-            System.debug(e.getStackTraceString());
-            ApexPages.addMessages(e);
-            return;
+            return e.getMessage();
+        }
+
+        return '1';
+    }
+
+    WebService static String getwkDate(String date1, String number1) {
+        if (String.isBlank(date1)) {
+            return '娌℃湁鏃堕棿,鏃犳硶妫�娴嬪伐浣滄棩';
+        }
+        else {
+            date1 = date1.replaceAll('/', '-');
+        }
+        Date d = Date.valueOf(date1);
+        Map<Date, OlympusCalendar__c> calendarMap = Consum_ApplyUtil.getOlympusCalendarMAp(d, d);
+        OlympusCalendar__c can = calendarMap.get(d);
+        Integer num = Integer.valueOf(number1);
+        Integer num1 = 1;
+        String key = 'After';
+        if (num < 0) {
+            key = 'Before';
+            num1 = -1;
+        }
+        String api = key + '_' +  (num * num1) + '_WorkDay__c';
+        if (can.get(api) != null) {
+            return ((Date)can.get(api)).format();
+        }
+        else {
+            return Consum_ApplyUtil.getWD_addday(d, num).format();
         }
     }
 
-    /**
-    * @description 淇濆瓨鍙栨秷鐘舵��
-    **/
-    public void saveCancel() {
+    // 鍒嗛厤楠岃瘉
+    Webservice static String AssignBtn(String Rid){
+        List<Consum_Apply__c> raList = [select Id
+                                              //,repair__r.Repair_Final_Inspection_Date__c
+                                              //,repair__r.Return_Without_Repair_Date__c
+                                          from Consum_Apply__c
+                                         where id = :Rid];
+        if(raList.size()>0){
+            //Consum_Apply__c Ra = raList[0];
+            //if(Ra.repair__r.Repair_Final_Inspection_Date__c!=null){
+            //    return '淇悊鏈�缁堟娴嬫棩涓嶄负绌猴紝涓嶈兘鍒嗛厤';
+            //}else if(Ra.repair__r.Return_Without_Repair_Date__c !=null){
+            //    return '鏈慨鐞嗗綊杩樻棩涓嶄负绌猴紝涓嶈兘鍒嗛厤';
+            //}else{
+                return 'Fin';
+            //}
+        }else{
+            return '璇ュ�熷嚭鐢宠涓嶅瓨鍦�';
+        }
+    }
+
+    Webservice static String postponeCheck(String endDate, Integer d) {
+        Date before5day = getWD_addday(date.parse(endDate), d);
+        if (Date.today() > before5day) {
+            return System.Label.EquipmentRentalPostponeOverDeadline;
+        }
+        return 'OK';
+    }
+
+    // FIXME 浠噛j please use public
+    public static Date getWD_now(Date d) {
+        List<OlympusCalendar__c> workday = [
+                select Id, Date__c, IsWorkDay__c 
+                  from OlympusCalendar__c 
+                 where Date__c >= :d 
+                   and IsWorkDay__c = 1
+                 order by Date__c
+                 limit 1];
+        Date selectDate = workday[0].Date__c;
+        return selectDate;
+    }
+
+    // FIXME 浠噛j please use public
+    public static Date getWD_addday(Date d, Integer i) {
+        if (d == Date.valueOf('4000-12-31')) {
+            return d;
+        }
+        if (i >= 0) {
+            List<OlympusCalendar__c> workday = [
+                    select Id, Date__c, IsWorkDay__c 
+                      from OlympusCalendar__c 
+                     where Date__c >= :d 
+                       and IsWorkDay__c = 1
+                     order by Date__c
+                     limit :(i+1)];
+            Date selectDate = workday[i].Date__c;
+            return selectDate;
+        } else {
+            i = Math.abs(i);
+            List<OlympusCalendar__c> workday = [
+                    select Id, Date__c, IsWorkDay__c 
+                      from OlympusCalendar__c 
+                     where Date__c <= :d 
+                       and IsWorkDay__c = 1
+                     order by Date__c desc
+                     limit :(i+1)];
+            Date selectDate = workday[i].Date__c;
+            return selectDate;
+        }
+    }
+
+    // pd:0浠h〃褰撳ぉ,1浠h〃绗簩澶�
+    public Map<Date, Map<String, String>> getDateMap(Date sd, Date ed, Integer pd) {
+        Map<Date, Map<String, String>> returnMap = new Map<Date, Map<String, String>>();
+        List<OlympusCalendar__c> workdayList = [
+                select Id, Date__c, IsWorkDay__c 
+                  from OlympusCalendar__c 
+                 where Date__c >= :sd
+                   and Date__c <= :ed.addDays(15 + pd)                  // +15 鐨勭洰鐨勬槸銆佷负浜嗗彇寰梕d 銇� 涓嬩竴涓伐浣滄棩
+                 order by Date__c];
+        for (Integer i = 0; i < workdayList.size(); i++) {
+            OlympusCalendar__c wd = workdayList[i];
+            if (wd.Date__c > ed) break;
+            Integer nextWordDays = 0;
+            Map<String, String> valueMap = new Map<String, String>();
+            valueMap.put('WorkDay', String.valueOf(wd.IsWorkDay__c));
+            Integer maxJ = 15 + i + pd;
+            if (maxJ > workdayList.size()) maxJ = workdayList.size();
+            for (Integer j = i; j < maxJ; j++) {
+                OlympusCalendar__c oc = workdayList[j];
+                if (oc.IsWorkDay__c == 1) {
+                    nextWordDays++;
+                    if (nextWordDays == pd + 1) {
+                        valueMap.put('Next', String.valueOf(oc.Date__c));
+                        break;
+                    }
+                }
+            }
+
+            returnMap.put(wd.Date__c, valueMap);
+        }
+        return returnMap;
+    }
+
+    WebService static String ConsumApplyCancel(String raid, Boolean autoCancel) {
+        List<Consum_Apply__c> raList = [select id
+                                             , Shipment_request_Cnt__c
+                                             , Status__c
+                                             , RA_Status__c
+                                             //, Shippment_loaner_cnt__c
+                                             , Loaner_cancel_request__c
+                                             , Arrival_wh_cnt__c
+                                             , Cancel_Reason__c
+                                          from Consum_Apply__c
+                                         where id = :raid];
+        List<Consum_Apply_Equipment_Set__c> raesList = [select id
+                                                             //, StockDown_time__c
+                                                          from Consum_Apply_Equipment_Set__c
+                                                         where Consum_Apply__c = :raid
+                                                           and Cancel_Select__c = false];
+
+        List<Consum_Apply_Equipment_Set__c> updList = new List<Consum_Apply_Equipment_Set__c>();
+        // List<Consum_Apply_Equipment_Set_Detail__c> delList = new List<Consum_Apply_Equipment_Set_Detail__c>();
+        Set<Id> esIdSet = new Set<Id>();
+
+        if (raList.size() <= 0) {
+            return '澶囧搧鐢宠涔︿笉瀛樺湪銆�';
+        }
+        Consum_Apply__c ra = raList[0];
+        if (ra.Status__c == '鍙栨秷') {
+            return '澶囧搧鐢宠涔﹀凡缁忓彇娑堛��';
+        }
+        if (ra.Status__c == '鍒犻櫎') {
+            return '澶囧搧鐢宠涔﹀凡缁忓垹闄ゃ��';
+        }
+        if (ra.RA_Status__c == FixtureUtil.raStatusMap.get(FixtureUtil.RaStatus.Yi_Chu_Ku.ordinal()) || ra.Arrival_wh_cnt__c > 0) {
+            return '澶囧搧宸茬粡鍑哄簱锛屼笉鑳藉彇娑堛��';
+        }
+
+        User loginUser = [Select Id, Name, ProfileId From User where Id = :Userinfo.getUserId()];
+        if(loginUser.ProfileId != System.Label.ProfileId_SystemAdmin 
+                && loginUser.ProfileId != System.Label.ProfileId_EquipmentCenter 
+                    && !System.Label.ProfileId_EquCenCheckAndDepot.contains(loginUser.ProfileId)
+                        && !System.Label.ProfileId_EquCenAdmin.contains(loginUser.ProfileId)
+                            && loginUser.ProfileId != System.Label.ProfileId_IThelp
+                                && ra.Shipment_request_Cnt__c > 0
+        ){
+            return '涓嶈兘鍙栨秷鐢宠锛岃鑱旂郴澶囧搧涓績绐楀彛鍙栨秷銆�';
+        }
+
+        if (autoCancel == false && String.isBlank(ra.Cancel_Reason__c)) {
+            return '蹇呴』杈撳叆鍙栨秷鐞嗙敱銆�';
+        }
+
+        if (autoCancel) {
+            if (ra.Status__c == '鐢宠涓�') {
+                List<Approval.ProcessWorkitemRequest> requests = new List<Approval.ProcessWorkitemRequest> ();
+                Map<ID,ProcessInstance> piMap = New Map<ID,ProcessInstance>([Select Id from ProcessInstance where TargetObjectId = :ra.Id]);
+                for(ProcessInstanceWorkItem wi : [Select Id from ProcessInstanceWorkItem where ProcessInstanceId IN :piMap.keySet()]){
+                    Approval.ProcessWorkitemRequest req2 = new Approval.ProcessWorkitemRequest();
+                    req2.setAction('Removed');
+                    req2.setWorkitemId(wi.Id);
+                    requests.add(req2);
+                }
+                if (requests.size() > 0) {
+                    Approval.ProcessResult[] processResults = null;
+                    processResults = Approval.process(requests, true);
+                }
+            }
+            ra.Cancel_Reason__c = '涓诲姩鍙栨秷';
+            ra.Loaner_cancel_request__c = '鏈敵璇峰鎵硅秴鏃惰嚜鍔ㄥ叧闂敵璇峰崟';
+        }
+        ra.Status__c = '鍙栨秷';
+
         Savepoint sp = Database.setSavepoint();
         try {
-            // SWAG-BFV6G4 start
-            StaticParameter.rentalApplyIsRunning = true;
-            // SWAG-BFV6G4 end
-            if (String.isBlank(this.ra.Cancel_Reason__c)) {
-                throw new ControllerUtil.myException('璇疯緭鍏ュ彇娑堢悊鐢�');
+            Set<Id> selectAssetIdSet = new Set<Id>();
+            for (Consum_Apply_Equipment_Set_Detail__c caesd : [SELECT Id, Asset__c
+                                                                 FROM Consum_Apply_Equipment_Set_Detail__c
+                                                                WHERE Consum_Apply__c = :raid]
+            ) {
+                if (String.isNotBlank(caesd.Asset__c)) {
+                    selectAssetIdSet.add(caesd.Asset__c);
+                }
             }
-            if (String.isBlank(this.ra.Loaner_cancel_request__c)) {
-                throw new ControllerUtil.myException('澶囧搧鐢宠鍙栨秷鐞嗙敱澶囨敞');
+            if (selectAssetIdSet.size() > 0) {
+                List<Asset> assList = [SELECT Id
+                             FROM Asset
+                            WHERE Id = :selectAssetIdSet FOR UPDATE];
             }
-            FixtureUtil.withoutUpdate(new Consum_Apply__c[]{this.ra});
-            String statusMessage;
-            statusMessage = ConsumApplyWebService.ConsumApplyCancel(objId, false);
-            if (statusMessage != '1') {
-                throw new ControllerUtil.myException(statusMessage);
+            update ra;
+        } catch (Exception ex) {
+            Database.rollback(sp);
+            return ex.getMessage();
+        }
+
+        return '1';
+    }
+
+    // 涓�瑕у崢浣�
+    WebService static String setRaesShipment_request(String raesid) {
+      return setShipment_requests(null, raesid);
+    }
+
+    // 鐢宠珛鏇稿崢浣�
+    WebService static String setShipment_request(String raid) {
+      System.debug(raid);
+      return setShipment_requests(raid, null);
+    }
+
+    //鍑哄簱鎸囩ず鎸夐挳js涓�娆℃渶澶氭洿鏂�200鏉★紝鎵�浠ユ敼鍦╓ebService鍋氬嚭搴撴寚绀�
+    WebService static String setShipment_requests(String raid, String raesid) {
+    Savepoint sp = Database.setSavepoint();
+    try {
+        System.debug(raid);
+        //涓�瑙堟儏鍐典笅妫�绱竴瑙堝搴旂殑鐢宠涔d锛宻oql瀛愭煡璇笉鑳藉拰涓绘煡璇㈡槸鍚屼竴涓〃锛屽崟鐙绱竴娆�
+        if (String.isBlank(raid)) {
+            List<Consum_Apply_Equipment_Set__c> raesList = [select Id, Consum_Apply__c from Consum_Apply_Equipment_Set__c where id = :raesid];
+            if (raesList.size() > 0) {
+                raid = raesList[0].Consum_Apply__c;
+            } else {
+                //搴旇涓嶄細鍒拌繖閲�
+                return '娌℃湁鍙互鍑哄簱鎸囩ず鐨勪竴瑙�';
             }
-            saveStatus = 'ok';
+        }
+        //String soql = 'SELECT Id, Wei_Assigned_Cnt__c, Yi_Assigned_Cnt__c'
+        //        + ' FROM Consum_Apply_Equipment_Set__c '
+        //        + ' WHERE Shippment_loaner_time2__c <> null '
+        //        + ' AND Consum_Apply__c = :raid '
+        //        + ' ORDER BY Id' ;
+        //List<Consum_Apply_Equipment_Set__c> shippedRaesList = Database.query(soql);
+        //String raesStrShipped = '';
+        //for (Consum_Apply_Equipment_Set__c raes : shippedRaesList) {
+        //    raesStrShipped += raes.Id;
+        //    if (raes.Wei_Assigned_Cnt__c > 0 || raes.Yi_Assigned_Cnt__c == 0) {
+        //        return '涓嶈兘鍋氬嚭搴撴寚绀猴紝闇�瑕佸垎鍗曞悗鍐嶆搷浣�';
+        //    }
+        //}
+
+        //Srring soql = "SELECT Id FROM Consum_Apply_Equipment_Set_Detail__c WHERE Consum_Apply__c = '{!Consum_Apply__c.Id}' AND Cancel_Select__c = false AND Consum_Num__c > 0 AND Consum_Apply_Equipment_Set__r.Wei_Assigned_Cnt__c = 0 AND Consum_Apply_Equipment_Set__r.Yi_Assigned_Cnt__c > 0 AND Shipment_request__c  = false";
+        String soql = 'SELECT Id, Consum_Apply__c, Consum_Apply_Equipment_Set__c, Asset__c, Select_Time__c'
+                + ' FROM Consum_Apply_Equipment_Set_Detail__c '
+                + ' WHERE ' + (String.isNotBlank(raesid) ? 'Consum_Apply_Equipment_Set__c = :raesid ' : 'Consum_Apply__c = :raid ')
+                + ' AND Cancel_Select__c = false '
+                // + ' AND Consum_Num__c > 0 '
+                //+ ' AND Consum_Apply_Equipment_Set__r.Wei_Assigned_Cnt__c = 0 '
+                //+ ' AND Consum_Apply_Equipment_Set__r.Yi_Assigned_Cnt__c > 0 '
+                + ' AND Shipment_request__c  = false'
+                + ' ORDER BY Consum_Apply_Equipment_Set__c, Id';
+        System.debug(soql);
+        System.debug(raesid);
+        System.debug(raid);
+        List<Consum_Apply_Equipment_Set_Detail__c> raesds = Database.query(soql);
+
+        Map<Id, List<String>> Consum_Asset_SerialNumberMap = new Map<Id, List<String>>();
+
+        if (raesds.size() < 1) {
+            return '娌℃湁鍙互鍑哄簱鎸囩ず鐨勬槑缁�';
+        } else {
+            //Set<Id> raesSet = new Set<Id>();
+            //String raesStrRequest = '';
+            for (Consum_Apply_Equipment_Set_Detail__c raesd : raesds) {
+                //if (false == raesSet.contains(raesd.Consum_Apply_Equipment_Set__c)) {
+                //    raesSet.add(raesd.Consum_Apply_Equipment_Set__c);
+                //    raesStrRequest += raesd.Consum_Apply_Equipment_Set__c;
+                //}
+                if(raesd.Asset__c == null || raesd.Select_Time__c == null){
+                    return '鐢宠鍗曞唴瀛樺湪鏈垎閰嶇殑鑰楁潗锛岃鍒嗛厤鎴栧垎鍓茬敵璇峰崟';
+                }
+                raesd.Shipment_request_time2__c = Datetime.now();
+                raesd.Shipment_request__c = true;
+            }
+            // 鍑哄簱鍚�, 鍐嶆鍋氬嚭搴撴寚绀虹殑涓�瑙�, 涓�瀹氳涓嚭杩囧簱鐨勪竴瑙堜竴鏍�
+            //if (false == String.isBlank(raesStrShipped) && raesStrRequest != raesStrShipped) {
+            //    return '涓嶈兘鍋氬嚭搴撴寚绀猴紝闇�瑕佸垎鍗曞悗鍐嶆搷浣�';
+            //}
+        }
+
+        Consum_Apply__c ra = new Consum_Apply__c(Id = raesds[0].Consum_Apply__c, Status__c = '宸插嚭搴撴寚绀�');
+        update ra;
+        Database.SaveResult[] results = Database.update(raesds);
+        Database.SaveResult dmlResult = results[0];
+        if (dmlResult.isSuccess()) {
+            //鏄庣粏鏇存柊鎴愬姛鍚庢墠鏇存柊涓�瑙堢殑Consum_Asset_SerialNumber__c
+            soql = 'SELECT Id, SerialNumber_text__c, Consum_Apply_Equipment_Set__c '
+                    +'FROM Consum_Apply_Equipment_Set_Detail__c '
+                    +'WHERE Consum_Apply__c = \'' + raesds[0].Consum_Apply__c + '\''
+                    +'AND Shipment_request_time2__c != null '
+                    +'AND Shipment_request__c = true '
+                    +'AND SerialNumber_text__c != null '
+                    +'ORDER BY Consum_Apply_Equipment_Set__c ';
+
+
+            List<Consum_Apply_Equipment_Set_Detail__c> raesdSerialNumbers = Database.query(soql);
+
+            for (Consum_Apply_Equipment_Set_Detail__c raesd : raesdSerialNumbers) {
+
+                if (!Consum_Asset_SerialNumberMap.containsKey(raesd.Consum_Apply_Equipment_Set__c)) {
+                    // Asset__r.SerialNumber + ','
+                    Consum_Asset_SerialNumberMap.put(raesd.Consum_Apply_Equipment_Set__c, new List<String>());
+                }
+                Consum_Asset_SerialNumberMap.get(raesd.Consum_Apply_Equipment_Set__c).add(raesd.SerialNumber_text__c);
+            }
+
+            List<Consum_Apply_Equipment_Set__c> raess = new List<Consum_Apply_Equipment_Set__c>();
+            for (Id key : Consum_Asset_SerialNumberMap.keySet()) {
+                raess.add(new Consum_Apply_Equipment_Set__c(Id = key,
+                        Consum_Asset_SerialNumber__c = ',' + String.join(Consum_Asset_SerialNumberMap.get(key), ',') + ','));
+            }
+            if (!raess.isEmpty()) {
+                update raess;
+            }
+            return '鐘舵�佹洿鏂板埌宸插嚭搴撴寚绀�';
+        } else {
+            Database.rollback(sp);
+            Database.Error emsg = dmlResult.getErrors()[0];
+            return 'failed to update:' + emsg.getFields() +  ' ' + emsg.getMessage();
+        }
+    } catch (Exception ex) {
+        Database.rollback(sp);
+        return ex.getMessage();
+    }}
+
+    /**
+     * 娉ㄦ畫鐢宠澶囧搧鐨勭鎺�
+     */
+    WebService static String ConsumApplyCheckForSAoneEle(String SaID) {
+        Statu_Achievements__c Sac = [select id,
+            SalesChannel__c,
+            Opportunity__r.Sales_Root__c,
+            Status_1__c,
+            Status_2_Formula__c,
+            Opp_Number__c,
+            ContractNO__c,
+            FirstApproveDate__c,
+            CreatedDate,
+            X30_Deposit_Day__c,
+            Deposit_In_Full_Day__c,
+            DeliveryDate__c
+        from Statu_Achievements__c where id = :SaID];
+        if(Sac.Opportunity__r.Sales_Root__c == '璨╁2搴�'){
+            if(Sac.Opp_Number__c.contains('GI')||Sac.Opp_Number__c.contains('BF')||Sac.Opp_Number__c.contains('ET') ){
+                if(Sac.Status_1__c == '娉ㄦ畫' && (Sac.Status_2_Formula__c == '12 宸茶璐с兓浠樺叏娆�'||Sac.Status_2_Formula__c == '13 寰呭彂璐�')){
+                    if((Date.today().addDays(-30)>Sac.Deposit_In_Full_Day__c)&&Sac.DeliveryDate__c == null){
+                        return 'Fin';
+                    }else{
+                        return '缁忛攢鍟嗗唴绉戣鍗曚笉鍦ㄧ敵璇锋湡鍐咃紝涓嶈兘鐢宠澶囧搧';
+                    }
+                }else{
+                    return '缁忛攢鍟嗗唴绉戣鍗曠姸鎬佷笉绗﹀悎澶囧搧鐢宠璧勬牸锛屼笉鑳界敵璇峰鍝�';
+                }
+            }else if(Sac.Opp_Number__c.contains('SP')){
+                if(Sac.Status_1__c == '娉ㄦ畫' && (Sac.Status_2_Formula__c == '11 宸茶璐с兓浠樿閲�'||Sac.Status_2_Formula__c == '12 宸茶璐с兓浠樺叏娆�'||Sac.Status_2_Formula__c == '13 寰呭彂璐�')){
+                    if((Date.today().addDays(-60)>Sac.X30_Deposit_Day__c )&&Sac.DeliveryDate__c == null){
+                        return 'Fin';
+                    }else{
+                        return '缁忛攢鍟哠P璁㈠崟涓嶅湪鐢宠鏈熷唴锛屼笉鑳界敵璇峰鍝�';
+                    }
+                }else{
+                    return '缁忛攢鍟哠P璁㈠崟鐘舵�佷笉绗﹀悎澶囧搧鐢宠璧勬牸锛屼笉鑳界敵璇峰鍝�';
+                }
+            }else{
+                return '娉ㄦ畫閿�鍞笭閬撶被鍒笉鍦ㄥ彲鐢宠澶囧搧鑼冨洿鍐�';
+            }
+        }else if(Sac.Opportunity__r.Sales_Root__c == 'OCM鐩存帴璨╁2'){
+            if(Sac.Opp_Number__c.contains('GI')||Sac.Opp_Number__c.contains('BF')||Sac.Opp_Number__c.contains('ET')){
+                if(Sac.Status_1__c == '娉ㄦ畫' && (Sac.Status_2_Formula__c == '09 宸插綍鍏ヨ鍗曟湭浠樻'||Sac.Status_2_Formula__c == '10 搴撳瓨宸查鐣欍兓鏈粯娆�'||Sac.Status_2_Formula__c == '11 宸茶璐с兓浠樿閲�'||Sac.Status_2_Formula__c == '12 宸茶璐с兓浠樺叏娆�'||Sac.Status_2_Formula__c == '13 寰呭彂璐�')){
+                    if((Date.today().addDays(-30)>Sac.FirstApproveDate__c )&&Sac.DeliveryDate__c == null){
+                        return 'Fin';
+                    }else{
+                        return 'OCM鐩撮攢鍐呯璁㈠崟涓嶅湪鐢宠鏈熷唴锛屼笉鑳界敵璇峰鍝�';
+                    }
+                }else{
+                    return 'OCM鐩撮攢鍐呯璁㈠崟鐘舵�佷笉绗﹀悎澶囧搧鐢宠璧勬牸锛屼笉鑳界敵璇峰鍝�';
+                }
+            }else if(Sac.Opp_Number__c.contains('SP')){
+                    if(Sac.Status_1__c == '娉ㄦ畫' && (Sac.Status_2_Formula__c == '09 宸插綍鍏ヨ鍗曟湭浠樻'||Sac.Status_2_Formula__c == '10 搴撳瓨宸查鐣欍兓鏈粯娆�'||Sac.Status_2_Formula__c == '11 宸茶璐с兓浠樿閲�'||Sac.Status_2_Formula__c == '12 宸茶璐с兓浠樺叏娆�'||Sac.Status_2_Formula__c == '13 寰呭彂璐�')){
+                        if((Date.today().addDays(-60)>Sac.FirstApproveDate__c )&&Sac.DeliveryDate__c == null){
+                            return 'Fin';
+                        }else{
+                            return 'OCM鐩撮攢SP璁㈠崟涓嶅湪鐢宠鏈熷唴锛屼笉鑳界敵璇峰鍝�';
+                        }
+                    }else{
+                        return 'OCM鐩撮攢SP璁㈠崟鐘舵�佷笉绗﹀悎澶囧搧鐢宠璧勬牸锛屼笉鑳界敵璇峰鍝�';
+                    }
+                }else{
+                    return '娉ㄦ畫閿�鍞笭閬撶被鍒笉鍦ㄥ彲鐢宠澶囧搧鑼冨洿鍐呫��';
+                }
+        }else{
+            return '閿�鍞笭閬撴湭鐭ワ紝涓嶈兘鏂板缓';
+        }
+    }
+
+    @AuraEnabled
+    Webservice static String all_received_fse(String caId) {
+        Savepoint sp = Database.setSavepoint();
+        try {
+            List<Consum_Apply_Equipment_Set_Detail__c> caesdList = [SELECT Id
+                        , RAESD_Status__c
+                        , Loaner_received_time__c
+                        , Consum_Apply__r.Loaner_received_ng_num__c
+                     FROM Consum_Apply_Equipment_Set_Detail__c
+                    WHERE DeliverySlip__c !=null
+                      AND Cancel_Select__c = false
+                      AND Consum_Apply__c = :caId];
+            if (caesdList.size() == 0) {
+                return '鏈彂璐�';
+            }
+            else if (caesdList[0].Consum_Apply__r.Loaner_received_ng_num__c == 0) {
+                return '鐜板満宸茬粡鍏ㄩ儴鏀跺埌瀹炵墿浜�';
+            }
+            else {
+                List<Consum_Apply_Equipment_Set_Detail__c> caesdL = new List<Consum_Apply_Equipment_Set_Detail__c>();
+                for (Consum_Apply_Equipment_Set_Detail__c caesd : caesdList) {
+                    if (caesd.Loaner_received_time__c == null && caesd.RAESD_Status__c=='宸插嚭搴�') {
+                        Consum_Apply_Equipment_Set_Detail__c caesd1 = new Consum_Apply_Equipment_Set_Detail__c();
+                        caesd1.Id = caesd.Id;
+                        caesd1.Received_Confirm__c = 'OK';
+                        caesdL.add(caesd1);
+                    }
+                }
+                if (caesdL.size() > 0) {
+                    update caesdL;
+                }
+                return '鐜板満宸插叏閮ㄦ敹璐�';
+            }
         }
         catch (Exception e) {
             Database.rollback(sp);
-            System.debug(e.getStackTraceString());
-            ApexPages.addMessages(e);
-            saveStatus = 'ng';
-            return;
+            return e.getMessage();
         }
     }
 
-    /**
-    * @description 澶囧搧鍊熷嚭鐢宠鍙栧緱
-    **/
-    private List<Consum_Apply__c> getRas(Id raId) {
-       return [SELECT Id
-                    , Name
-                    , OwnerId
-                    , Status__c
-                    , RA_Status__c
-                    , Cancel_Reason__c
-                    , Loaner_cancel_request__c
-                    //, StockDown_ng_num__c
-                    , Consum_Apply_Equipment_Set_Detail_Cnt__c
-                 FROM Consum_Apply__c
-                WHERE Id = :raId];
+    @TestVisible private static void test() {
+        if (false == Test.isRunningTest()) return;
+        Integer i = 0;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+                i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        i++;
+        
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/classes/UploadOBPMController.cls b/force-app/main/default/classes/UploadOBPMController.cls
index 3c7ceb4..251b6ae 100644
--- a/force-app/main/default/classes/UploadOBPMController.cls
+++ b/force-app/main/default/classes/UploadOBPMController.cls
@@ -154,6 +154,14 @@
         }
     }
 
+    //lwc鏀归��
+    @AuraEnabled
+    public static Campaign toUploadOBPM(String recordId) {
+        Campaign cam = [select id, Name,IF_Approved__c from Campaign where id = :recordId];
+        return cam;
+
+    }
+
     public class OBPMInfo {
         public Integer line { get; set; }
         public Campaign cam { get; set; }
diff --git a/force-app/main/default/classes/buttonAccountCtl.cls b/force-app/main/default/classes/buttonAccountCtl.cls
new file mode 100644
index 0000000..1093cf6
--- /dev/null
+++ b/force-app/main/default/classes/buttonAccountCtl.cls
@@ -0,0 +1,40 @@
+public with sharing class buttonAccountCtl {
+    public buttonAccountCtl() {
+
+    }
+
+    @AuraEnabled
+    public static InitData init(String recordId){
+        InitData res = new initData();
+        try{
+            Account report =  [SELECT Name,Department_Class_ID_18__c,Department_Class__c,Hospital_ID__c,Hospital__c,Id FROM Account WHERE Id =: recordId LIMIT 1];
+            System.debug(LoggingLevel.INFO, '*** opp: ' + report);
+            res.Id = report.Id;
+            res.HospitalC = report.Hospital__c;
+            res.HospitalIdC = report.Hospital_ID__c;
+            res.DepartmentClassC = report.Department_Class__c;
+            res.DepartmentClassIdC = report.Department_Class_ID_18__c;
+            res.Name = report.Name;
+
+            System.debug(LoggingLevel.INFO, '*** res: ' + res);
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+        }
+        return res;
+    }   
+
+    public class InitData{
+        @AuraEnabled
+        public String Id;
+        @AuraEnabled
+        public String HospitalC;
+        @AuraEnabled
+        public String HospitalIdC;
+        @AuraEnabled
+        public String DepartmentClassC;
+        @AuraEnabled
+        public String DepartmentClassIdC;
+        @AuraEnabled
+        public String Name;
+     }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonAccountCtl.cls-meta.xml b/force-app/main/default/classes/buttonAccountCtl.cls-meta.xml
new file mode 100644
index 0000000..9bbf7b4
--- /dev/null
+++ b/force-app/main/default/classes/buttonAccountCtl.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>56.0</apiVersion>
+    <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/eSignFormAttachmentController.cls b/force-app/main/default/classes/eSignFormAttachmentController.cls
index 8d89cc5..0c63ce9 100644
--- a/force-app/main/default/classes/eSignFormAttachmentController.cls
+++ b/force-app/main/default/classes/eSignFormAttachmentController.cls
@@ -24,19 +24,33 @@
     }
 
     public void getAccessory(){
-      String soql = 'SELECT Name,id,parentId,ContentType from Attachment where parentId = :parentId order by createddate desc';
-      List<Attachment> acc = Database.query(soql);
+      // parentId = 'a2K0l000000wyICEAY';
+
+      //lwc鏀归��
+     List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId
+                                                   FROM ContentDocumentLink
+                                                   WHERE LinkedEntityId = :parentId];
+      List<ID> fileIDs = new List<ID>();
+      for (ContentDocumentLink docLink : cdlList) {
+          fileIDs.add(docLink.ContentDocumentId);
+      }
+      List<ContentVersion> acc = [SELECT Id,Title,VersionData, ContentDocumentId,FileType 
+          FROM ContentVersion WHERE ContentDocumentId IN : fileIDs];
+      
+                                          
+      // String soql = 'SELECT Name,id,parentId,ContentType from Attachment where parentId = :parentId order by createddate desc';
+      // List<Attachment> acc = Database.query(soql);
       Map<String,String> identifierMap = new Map<String,String>();
       if(acc != null && acc.size() > 0){
         for(Integer i = 0;i<acc.size();i++){
-          if(acc[i].Name.substring(0,1)=='A'){
-            acc[i].ContentType = '缁忛攢鍟�';
-            identifierMap.put(acc[i].ContentType,acc[i].ContentType);
-          }else if(acc[i].Name.substring(0,1)=='H'){
-            acc[i].ContentType = '鍖婚櫌';
-            identifierMap.put(acc[i].ContentType,acc[i].ContentType);
+          if(acc[i].Title.substring(0,1)=='A'){
+            acc[i].Description = '缁忛攢鍟�';
+            identifierMap.put(acc[i].Description,acc[i].Description);
+          }else if(acc[i].Title.substring(0,1)=='H'){
+            acc[i].Description = '鍖婚櫌';
+            identifierMap.put(acc[i].Description,acc[i].Description);
           }else{
-            acc[i].ContentType = '';
+            acc[i].Description = '';
           }
           acccData.add(new AccessoryData(acc[i]));
         }
@@ -56,7 +70,7 @@
      * 涓轰簡鏂逛究鍓嶇table鑾峰彇鍊�
      */
     class AccessoryData {
-      public Attachment accessory { get; set; }
+      public ContentVersion accessory { get; set; }
       public Boolean canEdit { get; private set; }
       public Boolean hasError { get; private set; }
       public Boolean hasFieldError { get; private set; }
@@ -66,7 +80,7 @@
       //澶嶉�夋id鍊�
       public String chk { get;set; }
       
-      public AccessoryData(Attachment record) {
+      public AccessoryData(ContentVersion record) {
           accessory = record;
           canEdit = true;
           hasError = false;
diff --git a/force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.html b/force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.html
new file mode 100644
index 0000000..e639903
--- /dev/null
+++ b/force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="ApplicationCancelSubmit" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.js b/force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.js
new file mode 100644
index 0000000..a940c01
--- /dev/null
+++ b/force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.js
@@ -0,0 +1,72 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import all_received_fse from '@salesforce/apex/ConsumApplyWebService.all_received_fse';
+import { NavigationMixin } from 'lightning/navigation';
+
+
+export default class LexAllReceivedBtns extends NavigationMixin(LightningElement) {
+    @api raid;
+    IsLoading = true;
+    @wire(CurrentPageReference)
+     getStateParameters(currentPageReference) {
+             console.log(111);
+             console.log(currentPageReference);
+
+         if (currentPageReference) {
+           const urlValue = currentPageReference.state.raid;
+           if (urlValue) {
+             let str = `${urlValue}`;
+             console.log("str");
+             console.log(str);
+             this.raid = str;
+           }
+         }
+     }
+
+     connectedCallback(){
+        this.IsLoading = false;
+        this.submit()
+        
+     }
+
+
+     showToast(msg,type) {
+      const event = new ShowToastEvent({
+          title: '',
+          message: msg,
+          variant: type
+      });
+      this.dispatchEvent(event);
+      this.dispatchEvent(new CloseActionScreenEvent());
+    }
+
+
+     updateRecordView(raid) {
+        updateRecord({fields: { Id: raid }});
+    }
+
+     submit(){
+        all_received_fse({caId:this.raid})
+        .then(res=>{
+            this.showToast(res,'error')
+            if(res =='鐜板満宸插叏閮ㄦ敹璐�'){
+                var url = '/'+this.raid; 
+                // window.location.href=url;
+                const config = {
+                    type: 'standard__webPage',
+                    attributes: {
+                        url: url
+                    }
+                };
+                this[NavigationMixin.Navigate](config);
+            }
+        })
+        .catch(e=>{
+            console.log(e)
+        })
+        
+     }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.js-meta.xml b/force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.js-meta.xml
new file mode 100644
index 0000000..2b7649d
--- /dev/null
+++ b/force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+	<apiVersion>54.0</apiVersion>
+	<isExposed>true</isExposed>
+	<targets>
+		<target>lightning__RecordPage</target>
+		<target>lightning__AppPage</target>
+		<target>lightning__HomePage</target>
+		<target>lightning__RecordAction</target>
+	</targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAppCancelSubmit/lexAppCancelSubmit.js b/force-app/main/default/lwc/lexAppCancelSubmit/lexAppCancelSubmit.js
index a99c517..cef51dcb 100644
--- a/force-app/main/default/lwc/lexAppCancelSubmit/lexAppCancelSubmit.js
+++ b/force-app/main/default/lwc/lexAppCancelSubmit/lexAppCancelSubmit.js
@@ -1,7 +1,6 @@
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
 import  init  from '@salesforce/apex/OppSubmitController.initSubmitButton';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
@@ -10,17 +9,14 @@
 export default class CancelSubmit extends LightningElement {
     @api recordId;//OwnerId
     ownerId;
-    monthlyReportId;
     IsLoading = true;
 
     @wire(CurrentPageReference)
      getStateParameters(currentPageReference) {
-        console.log(currentPageReference,'666666666666');
          if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
              let str = `${urlValue}`;
-             console.log("str:"+str);
              this.recordId = str;
            }
          }
@@ -31,33 +27,25 @@
         init({
             recordId: this.recordId
         }).then(result => {
-            if (result != null) {
                 this.IsLoading = false;
                 this.ownerId = result.OwnerId;
-                this.monthlyReportId = result.Id;
                 this.cancelSubmit();
-            }
-        }).catch(error => {
-            console.log("error"+error);
-        }).finally(() => {
-            
-        });        
+        })       
     }
 
     cancelSubmit(){
         UserInfo_Owner({}).then(result=>{
-            console.log(result,'鑾峰彇褰撳墠鐧婚檰浜篿d')
             if(this.ownerId == result.id){
                 submitCancel({
                     recordId: this.recordId
                 }).then(requst=>{
-                    if(requst == '1'){
-                        this.showToast("鍙栨秷鎻愪氦鎺堟潈淇℃伅鎴愬姛","success");
-                    }
                     if(requst != "1"){
                         var messageage = "";
                         messageage = requst.split(',')[1];
                         this.showToast(messageage,"error");
+                    }else{
+                        this.updateRecordView();
+                        this.dispatchEvent(new CloseActionScreenEvent());
                     }
                 })
             }else{
@@ -76,9 +64,6 @@
             message: msg,
             variant: type
         });
-        if(type == 'success'){
-            this.updateRecordView();
-        }
         this.dispatchEvent(event);
         this.dispatchEvent(new CloseActionScreenEvent());
     }
diff --git a/force-app/main/default/lwc/lexAppSubmitButton/lexAppSubmitButton.js b/force-app/main/default/lwc/lexAppSubmitButton/lexAppSubmitButton.js
index 91b11b5..a1ef536 100644
--- a/force-app/main/default/lwc/lexAppSubmitButton/lexAppSubmitButton.js
+++ b/force-app/main/default/lwc/lexAppSubmitButton/lexAppSubmitButton.js
@@ -1,7 +1,6 @@
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
 import  init  from '@salesforce/apex/OppSubmitController.initSubmitButton';
 import UserInfo_Owner from '@salesforce/apex/OppSubmitController.UserInfo_Owner';
 import submit  from '@salesforce/apex/OppSubmitController.submit';
@@ -10,18 +9,15 @@
 export default class Submit extends LightningElement {
     @api recordId;//OwnerId
     ownerId;//鎵�鏈変汉id
-    id;//杩斿洖鍊肩殑id
     IsLoading = true;
     arrMessage = [];
 
     @wire(CurrentPageReference)
      getStateParameters(currentPageReference) {
-        console.log(currentPageReference,'666666666666');
          if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
              let str = `${urlValue}`;
-             console.log("str:"+str);
              this.recordId = str;
            }
          }
@@ -32,52 +28,37 @@
         init({
             recordId: this.recordId
         }).then(result => {
-            console.log(result,"璇锋眰鎴愬姛浜嗗悧")
-            if (result != null) {
                 this.IsLoading = false;
                 this.ownerId = result.OwnerId;
-                this.id = result.Id;
                 this.Submit();
-            }
-        }).catch(error => {
-            console.log("error"+error);
-        }).finally(() => {
-            
-        });        
+        })      
     }
 
     Submit(){
         //鑾峰彇鑾峰彇褰撳墠鐧婚檰浜�
         this.arrMessage = [];
         UserInfo_Owner({}).then(result=>{
-            console.log(result,'鑾峰彇褰撳墠鐧婚檰浜篿d')
             if(this.ownerId == result.id){
                 submit({
                     recordId: this.recordId
                 }).then(requst=>{
-
                     if(requst == '1'){
-                        this.showToast("鎻愪氦鎺堟潈淇℃伅鎴愬姛","success");
+                        this.updateRecordView();
+                        this.dispatchEvent(new CloseActionScreenEvent());
                     }
                     if(requst != "1"){
                         var messageage = "";
-                        console.log('鏄笉鏄繖閲屾姤閿�11111');
                         this.arrMessage = requst.split(',');
                         for(let i=0;i<this.arrMessage.length;i++){ 
-                            console.log('鏄笉鏄繖閲屾姤閿�');
                             if(this.arrMessage.length-1 == i){
                                 break;
                             }
-                            messageage += this.arrMessage[i+1];
+                            if(this.arrMessage[i+1].slice(-2) == '[]'){
+                                messageage += this.arrMessage[i+1].slice(0,-4);
+                            }else{
+                                messageage += this.arrMessage[i+1];
+                            }
                         }
-                        // requst.split(',').map((item,index)=>{
-                        //     messageage += item[index+1];
-                        // })
-                        // if(requst.split(',')[1].slice(-1) == '寮�'){
-                        //     messageage = requst.split(',')[1] + "," + requst.split(',')[2] + "," +  requst.split(',')[3] + "," +  requst.split(',')[4] + "," +  requst.split(',')[5] + "," + requst.split(',')[6];
-                        // }else{
-                        //     messageage = requst.split(',')[1];
-                        // }
                         this.showToast(messageage,"error");
                     }
                 })
@@ -93,16 +74,11 @@
     }
 
     showToast(msg,type) {
-        console.log(msg,type);
         const event = new ShowToastEvent({
             message: msg,
             variant: type
         });
         this.dispatchEvent(event);
-        console.log('璧板埌杩欓噷浜嗗悧');
-        if(type == 'success'){
-            this.updateRecordView();
-        }
         this.dispatchEvent(new CloseActionScreenEvent());
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
index ee9ec67..a4cd9a3 100644
--- a/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
+++ b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
@@ -5,11 +5,10 @@
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import submitCancel from '@salesforce/apex/ApplicationButtonController.submitCancel';
-import userInfo_Owner from '@salesforce/apex/ApplicationButtonController.userInfo_Owner';
-export default class lexApplicationCancelSubmit extends LightningElement {
+import UserInfo_Owner from '@salesforce/apex/ApplicationButtonController.UserInfo_Owner';
+export default class CancelSubmit extends LightningElement {
     @api recordId;//OwnerId
     ownerId;
-    monthlyReportId;
     IsLoading = true;
 
     @wire(CurrentPageReference)
@@ -23,31 +22,31 @@
          }
      }
     
+
     connectedCallback(){
         init({
             recordId: this.recordId
         }).then(result => {
                 this.IsLoading = false;
                 this.ownerId = result.OwnerId;
-                this.monthlyReportId = result.Id;
                 this.cancelSubmit();
         })       
     }
-    //鎺堟潈鐢宠 鍙栨秷鎻愪氦
+
+    //鎺堟潈鐢宠  鍙栨秷鎻愪氦
     cancelSubmit(){
-        //'鑾峰彇褰撳墠鐧婚檰浜篿d'
-        userInfo_Owner({}).then(result=>{
+        UserInfo_Owner({}).then(result=>{
             if(this.ownerId == result.id){
                 submitCancel({
                     recordId: this.recordId
                 }).then(requst=>{
-                    if(requst == '1'){
-                        this.showToast("鍙栨秷鎻愪氦鎺堟潈淇℃伅鎴愬姛","success");
-                    }
                     if(requst != "1"){
                         var messageage = "";
                         messageage = requst.split(',')[1];
                         this.showToast(messageage,"error");
+                    }else{
+                        this.updateRecordView();
+                        this.dispatchEvent(new CloseActionScreenEvent());
                     }
                 })
             }else{
@@ -55,6 +54,7 @@
             }
         })
     }
+
 
     updateRecordView() {
         updateRecord({fields: { Id: this.recordId }});
@@ -65,9 +65,6 @@
             message: msg,
             variant: type
         });
-        if(type == 'success'){
-            this.updateRecordView();
-        }
         this.dispatchEvent(event);
         this.dispatchEvent(new CloseActionScreenEvent());
     }
diff --git a/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js b/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js
index 90688a9..a5860dc 100644
--- a/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js
+++ b/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js
@@ -2,14 +2,13 @@
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
 import  init  from '@salesforce/apex/ApplicationButtonController.initSubmitButton';
-import userInfo_Owner from '@salesforce/apex/ApplicationButtonController.userInfo_Owner';
+import UserInfo_Owner from '@salesforce/apex/ApplicationButtonController.UserInfo_Owner';
 import submit  from '@salesforce/apex/ApplicationButtonController.submit';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-export default class lexApplicationSubmitButton extends LightningElement {
+export default class Submit extends LightningElement {
     @api recordId;//OwnerId
     ownerId;//鎵�鏈変汉id
-    id;//杩斿洖鍊肩殑id
     IsLoading = true;
     arrMessage = [];
 
@@ -24,37 +23,41 @@
          }
      }
     
+
     connectedCallback(){
         init({
             recordId: this.recordId
         }).then(result => {
-            if (result != null) {
                 this.IsLoading = false;
                 this.ownerId = result.OwnerId;
-                this.id = result.Id;
                 this.Submit();
-            }
-        })       
+        })      
     }
-
+    //鎺堟潈鐢宠 鎻愪氦
     Submit(){
-        this.arrMessage = [];
         //鑾峰彇鑾峰彇褰撳墠鐧婚檰浜�
-        userInfo_Owner({}).then(result=>{
+        this.arrMessage = [];
+        UserInfo_Owner({}).then(result=>{
             if(this.ownerId == result.id){
                 submit({
                     recordId: this.recordId
                 }).then(requst=>{
                     if(requst == '1'){
-                        this.showToast("鎻愪氦鎺堟潈淇℃伅鎴愬姛","success");
+                        this.updateRecordView();
+                        this.dispatchEvent(new CloseActionScreenEvent());
                     }
                     if(requst != "1"){
                         var messageage = "";
+                        this.arrMessage = requst.split(',');
                         for(let i=0;i<this.arrMessage.length;i++){ 
                             if(this.arrMessage.length-1 == i){
                                 break;
                             }
-                            messageage += this.arrMessage[i+1];
+                            if(this.arrMessage[i+1].slice(-2) == '[]'){
+                                messageage += this.arrMessage[i+1].slice(0,-4);
+                            }else{
+                                messageage += this.arrMessage[i+1];
+                            }
                         }
                         this.showToast(messageage,"error");
                     }
@@ -64,6 +67,7 @@
             }
         })
     }
+
 
     updateRecordView() {
         updateRecord({fields: { Id: this.recordId }});
@@ -75,9 +79,6 @@
             variant: type
         });
         this.dispatchEvent(event);
-        if(type == 'success'){
-            this.updateRecordView();
-        }
         this.dispatchEvent(new CloseActionScreenEvent());
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexBidAnnouncementApplyForButton/lexBidAnnouncementApplyForButton.js b/force-app/main/default/lwc/lexBidAnnouncementApplyForButton/lexBidAnnouncementApplyForButton.js
index 910869e..94315cd 100644
--- a/force-app/main/default/lwc/lexBidAnnouncementApplyForButton/lexBidAnnouncementApplyForButton.js
+++ b/force-app/main/default/lwc/lexBidAnnouncementApplyForButton/lexBidAnnouncementApplyForButton.js
@@ -1,14 +1,11 @@
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
-import  init  from '@salesforce/apex/BidAnnouncementController.BidAnnouncementController';
 import  ApplyFor  from '@salesforce/apex/BidAnnouncementController.ApplyFor';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 export default class lexBidAnnouncementApplyForButton extends LightningElement {
     @api recordId;//OwnerId
-    ownerId;//鎵�鏈変汉id
-    id;//杩斿洖鍊肩殑id
     IsLoading = true;
     arrMessage = [];
 
@@ -23,26 +20,27 @@
          }
      }
     
-
     connectedCallback(){
         this.IsLoading = false;
         this.ApplyFor();
     }
-
+    //涓爣閫氱煡涔� 鐢宠
     ApplyFor(){
         ApplyFor({recordId:this.recordId}).then(res=>{
-            console.log(res);
             if(res == '1'){
-                this.showToast('璇锋眰鐢宠鎴愬姛,鐢宠涓�傘�傘��','success');
                 this.updateRecordView();
+                this.dispatchEvent(new CloseActionScreenEvent());
             }else{
                 var messageage = "";
-                messageage = res.split(',')[1];
+                if(res.split(',')[1].slice(-2) == '[]'){
+                    messageage = res.split(',')[1].slice(0,-4);
+                }else{
+                    messageage = res;
+                }
                 this.showToast(messageage,'error');
             }
         })
     }
-
 
     updateRecordView() {
         updateRecord({fields: { Id: this.recordId }});
@@ -57,18 +55,3 @@
         this.dispatchEvent(new CloseActionScreenEvent());
     }
 }
-
-// var Bid_Announcement = new sforce.SObject("Bid_Announcement__c");
-// Bid_Announcement.Id = "{!Bid_Announcement__c.Id}";
-// Bid_Announcement.Status__c = "鐢宠涓�";
-// Bid_Announcement.Request_flag__c = "true";
-// Bid_Announcement.Request_user__c = "{!$User.Id}";
-// var serverTimestamp = sforce.connection.getServerTimestamp();
-// Bid_Announcement.Request_date__c = serverTimestamp.timestamp;
-
-// var result = sforce.connection.update([Bid_Announcement]);
-// var messages = getConnectDMLErrorMessages(result);
-// if (messages.length > 0) {
-// alert(messages.join("\n"));
-// }
-// location.reload();
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexBidAnnouncementConsentButton/lexBidAnnouncementConsentButton.js b/force-app/main/default/lwc/lexBidAnnouncementConsentButton/lexBidAnnouncementConsentButton.js
index b8fc756..8e91256 100644
--- a/force-app/main/default/lwc/lexBidAnnouncementConsentButton/lexBidAnnouncementConsentButton.js
+++ b/force-app/main/default/lwc/lexBidAnnouncementConsentButton/lexBidAnnouncementConsentButton.js
@@ -6,11 +6,7 @@
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 export default class lexBidAnnouncementRejectButton extends LightningElement {
     @api recordId;//OwnerId
-    ownerId;//鎵�鏈変汉id
-    id;//杩斿洖鍊肩殑id
     IsLoading = true;
-    arrMessage = [];
-    BidCancel = null;
 
     @wire(CurrentPageReference)
      getStateParameters(currentPageReference) {
@@ -23,61 +19,37 @@
          }
      }
     
-
     connectedCallback(){
         this.IsLoading = false;
         this.Consent();
     }
-
+    //涓爣閫氱煡涔� 鍚屾剰
     Consent(){  
         ConSent({recordId:this.recordId}).then(res=>{
-            console.log(res);
             if(res == '1'){
-                this.showToast("鍚屾剰璇锋眰鎴愬姛","success");
+                this.updateRecordView();
+                this.dispatchEvent(new CloseActionScreenEvent());
             }
             if(res != "1"){
                 var messageage = "";
-                messageage = res.split(',')[1];
+                if(res.split(',')[1].slice(-2) == '[]'){
+                    messageage = res.split(',')[1].slice(0,-4);
+                }else{
+                    messageage = res;
+                }
                 this.showToast(messageage,"error");
             }
         })
     }
-
-
     updateRecordView() {
         updateRecord({fields: { Id: this.recordId }});
     }
-
     showToast(msg,type) {
         const event = new ShowToastEvent({
             message: msg,
             variant: type
         });
         this.dispatchEvent(event);
-        if(type == 'success'){
-            this.updateRecordView();
-        }
         this.dispatchEvent(new CloseActionScreenEvent());
     }
 }
-
-
-
-
-
-
-
-// var Bid_Announcement = new sforce.SObject("Bid_Announcement__c");
-// Bid_Announcement.Id = "{!Bid_Announcement__c.Id}";
-// Bid_Announcement.Status__c = "澶勭悊瀹屾瘯";
-// Bid_Announcement.Complete__c = "true";
-// Bid_Announcement.Agree_user__c = "{!$User.Id}";
-// var serverTimestamp = sforce.connection.getServerTimestamp();
-// Bid_Announcement.Complete_date__c = serverTimestamp.timestamp;
-
-// var result = sforce.connection.update([Bid_Announcement]);
-// var messages = getConnectDMLErrorMessages(result);
-// if (messages.length > 0) {
-// alert(messages.join("\n"));
-// }
-// location.reload();
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js b/force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js
index 98f7446..3392f9f 100644
--- a/force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js
+++ b/force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js
@@ -7,10 +7,7 @@
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 export default class lexBidAnnouncementRejectButton extends LightningElement {
     @api recordId;//OwnerId
-    ownerId;//鎵�鏈変汉id
-    id;//杩斿洖鍊肩殑id
     IsLoading = true;
-    arrMessage = [];
     BidCancel = null;
 
     @wire(CurrentPageReference)
@@ -24,15 +21,13 @@
          }
      }
     
-
     connectedCallback(){
         this.IsLoading = false;
         this.Reject();
     }
-
+    //涓爣閫氱煡涔� 椹冲洖
     Reject(){
         UserInfo_Owner().then(res=>{
-            console.log(res);
             this.BidCancel = res.BidCancel;
             if(this.BidCancel == false){
                 this.showToast('娌℃湁椹冲洖鐨勬潈闄�',"error");
@@ -41,7 +36,8 @@
                     recordId: this.recordId
                 }).then(requst=>{
                     if(requst == '1'){
-                        this.showToast("椹冲洖璇锋眰鎴愬姛","success");
+                        this.updateRecordView();
+                        this.dispatchEvent(new CloseActionScreenEvent());
                     }
                     if(requst != "1"){
                         var messageage = "";
@@ -52,42 +48,15 @@
             }
         })
     }
-
-
     updateRecordView() {
         updateRecord({fields: { Id: this.recordId }});
     }
-
     showToast(msg,type) {
         const event = new ShowToastEvent({
             message: msg,
             variant: type
         });
         this.dispatchEvent(event);
-        if(type == 'success'){
-            this.updateRecordView();
-        }
         this.dispatchEvent(new CloseActionScreenEvent());
     }
-}
-
-// if ('{!$User.BidCancel__c}' == 'false') {
-//     alert("娌℃湁椹冲洖鐨勬潈闄�");
-//     } else {
-//     var Bid_Announcement = new sforce.SObject("Bid_Announcement__c");
-//     Bid_Announcement.Id = "{!Bid_Announcement__c.Id}";
-//     Bid_Announcement.Status__c = "鑽夋涓�";
-//     Bid_Announcement.Complete__c = "false";
-//     Bid_Announcement.Agree_user__c = null;
-//     Bid_Announcement.Complete_date__c = null;
-//     Bid_Announcement.Request_flag__c = "false";
-//     Bid_Announcement.Request_user__c = null;
-//     Bid_Announcement.Request_date__c = null;
-    
-//     var result = sforce.connection.update([Bid_Announcement]);
-//     var messages = getConnectDMLErrorMessages(result);
-//     if (messages.length > 0) {
-//     alert(messages.join("\n"));
-//     }
-//     location.reload();
-//     }
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCancelApply/lexCancelApply.js b/force-app/main/default/lwc/lexCancelApply/lexCancelApply.js
index 04cee1d..e973f99 100644
--- a/force-app/main/default/lwc/lexCancelApply/lexCancelApply.js
+++ b/force-app/main/default/lwc/lexCancelApply/lexCancelApply.js
@@ -37,8 +37,7 @@
 	        label: 'this is the aria-label value',
 	        
 	    }).then(cancel=>{
-	  //   	this.IsLoading=false;
-			// this.dispatchEvent(new CloseActionScreenEvent());
+	    	
 	    	if(cancel) {
 	    		cancelApply({
 					taId : this.recordId
@@ -55,6 +54,9 @@
 
 					
 				});
+	    	} else {
+	    		this.IsLoading=false;
+				this.dispatchEvent(new CloseActionScreenEvent());
 	    	}
 	    	
 	    });
@@ -65,8 +67,9 @@
 	async cancelSubmit(){
 		if(this.cancelResult == '1') {
 			await this.showToast("",'鍙栨秷鎴愬姛',"success"); 
-			window.location.href = window.location;
-					
+			setTimeout(function(){
+				window.location.href = window.location;
+			}, 1500 )
 		} else {
 			console.log("result:",this.cancelResult);
 			await this.showToast("",this.cancelResult,"warning"); 	
diff --git a/force-app/main/default/lwc/lexCreateNewServiceContract/__tests__/lexCreateNewServiceContract.test.js b/force-app/main/default/lwc/lexCreateNewServiceContract/__tests__/lexCreateNewServiceContract.test.js
new file mode 100644
index 0000000..bdd855f
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateNewServiceContract/__tests__/lexCreateNewServiceContract.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexCreateNewServiceContract from 'c/lexCreateNewServiceContract';
+
+describe('c-lex-create-new-service-contract', () => {
+    afterEach(() => {
+        // The jsdom instance is shared across test cases in a single file so reset the DOM
+        while (document.body.firstChild) {
+            document.body.removeChild(document.body.firstChild);
+        }
+    });
+
+    it('TODO: test case generated by CLI command, please fill in test logic', () => {
+        // Arrange
+        const element = createElement('c-lex-create-new-service-contract', {
+            is: LexCreateNewServiceContract
+        });
+
+        // Act
+        document.body.appendChild(element);
+
+        // Assert
+        // const div = element.shadowRoot.querySelector('div');
+        expect(1).toBe(1);
+    });
+});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.html b/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="exampleHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js b/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js
new file mode 100644
index 0000000..40602be
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js
@@ -0,0 +1,77 @@
+import {
+    LightningElement,
+    wire,
+    api
+} from 'lwc';
+import {
+    CurrentPageReference
+} from "lightning/navigation";
+import {
+    CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/buttonAccountCtl.init';
+
+export default class LexCreateNewServiceContract extends LightningElement {
+    @api recordId;
+    str;
+    IsLoading = true;
+    Id;
+    HospitalC;
+    HospitalIdC;
+    DepartmentClassC;
+    DepartmentClassIdC;
+    Name;
+
+    @wire(CurrentPageReference)
+    getStateParameters(currentPageReference) {
+        if (currentPageReference) {
+            const urlValue = currentPageReference.state.recordId;
+            if (urlValue) {
+                let str = `${urlValue}`;
+                this.recordId = str;
+            }
+        }
+    }
+
+    connectedCallback() {
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if (result != null) {
+                this.IsLoading = false;
+                this.Id = result.Id;
+                this.HospitalC = result.HospitalC;
+                this.HospitalIdC = result.HospitalIdC;
+                this.DepartmentClassC = result.DepartmentClassC;
+                this.DepartmentClassIdC = result.DepartmentClassIdC;
+                this.Name = result.Name;
+
+                this.CreateNewServiceContract();
+                this.dispatchEvent(new CloseActionScreenEvent());
+            }
+        }).catch(error => {
+            console.log(error);
+        })
+    }
+
+    // 鏂板缓鏂版湇鍔″悎鍚�	
+    CreateNewServiceContract() {
+        var Hospital = this.HospitalC;
+        var Hospitalid = this.HospitalIdC;
+        var Department = this.DepartmentClassC;
+        var Departmentid = this.DepartmentClassIdC;
+        var accountname = this.Name;
+        var accountid = this.Id;
+
+
+        var url = 'a0H/e?CF00N10000002Dx56=' + Hospital + '&CF00N10000002Dx56_lkid=' +
+            Hospitalid + '&CF00N10000002Dx4p=' + Department + '&CF00N10000002Dx4p_lkid=' +
+            Departmentid + '&CF00N10000002Dx4q=' + accountname + '&CF00N10000002Dx4q_lkid=' +
+            accountid + '&RecordType=01210000000gTYq';
+
+            console.log(url);
+
+        // window.top.location.href = url;
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js-meta.xml b/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>54.0</apiVersion>
+	<isExposed>true</isExposed>
+	<targets>
+		<target>lightning__RecordPage</target>
+		<target>lightning__AppPage</target>
+		<target>lightning__HomePage</target>
+		<target>lightning__RecordAction</target>
+	</targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js b/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
index 814dd7b..092e3fe 100644
--- a/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
+++ b/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
@@ -92,7 +92,7 @@
 				return;
 			}
 			this.updateQisSubmit();
-			if (this.isaohuiproduct == 'true') {
+			if (this.isaohuiproduct) {
 				this.dispatchEvent(new CloseActionScreenEvent());
                 this.updateRecordView(this.recordId);
 			}
diff --git a/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.css b/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.css
new file mode 100644
index 0000000..a612ca7
--- /dev/null
+++ b/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.css
@@ -0,0 +1,10 @@
+.VOCSubmitHolder{
+    position: relative;
+    display: inline-block;
+    width: 80px;
+    height: 80px;
+    text-align: center;
+}
+.container .uiContainerManager{
+	display: none !important;
+}/* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.html b/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.html
new file mode 100644
index 0000000..1d3b62c
--- /dev/null
+++ b/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="VOCSubmitHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js b/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js
new file mode 100644
index 0000000..9d05937
--- /dev/null
+++ b/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js
@@ -0,0 +1,84 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { NavigationMixin } from 'lightning/navigation';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { updateRecord } from 'lightning/uiRecordApi';
+import init  from '@salesforce/apex/QISReportController.initForOSHRecievedButton';
+import updateQis  from '@salesforce/apex/QISReportController.updateQis';
+
+export default class lexOSHRecieved extends LightningElement {
+	@api recordId;
+	IsLoading = true;
+	qisReportId;
+	qisStatus;
+	 @wire(CurrentPageReference)
+     getStateParameters(currentPageReference) {
+             console.log(111);
+             console.log(currentPageReference);
+
+         if (currentPageReference) {
+           const urlValue = currentPageReference.state.recordId;
+           if (urlValue) {
+             let str = `${urlValue}`;
+             console.log("str");
+             console.log(str);
+             this.recordId = str;
+           }
+         }
+     }
+
+     connectedCallback () {
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            this.IsLoading = false;
+            this.qisReportId = result.Id;
+            this.qisStatus = result.qIStatus;
+            console.log('this.qisStatus='+this.qisStatus);
+         	if (this.qisStatus!='OSH妫�娴嬬敵璇�' && this.qisStatus!='瀹屾瘯') {
+                const evt = new ShowToastEvent({
+                        title : 'OSH宸茬粡鏀跺埌瀹炵墿',
+                        message: '',
+                        variant: 'error'
+                    });
+                this.dispatchEvent(evt);
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
+         	}else{
+         		this.updateQisSubmit();
+         	}
+        }).catch(error => {
+            console.log('error='+error);
+        }).finally(() => {
+            
+        }); 
+    }
+
+    updateRecordView(recordId) {
+        updateRecord({fields: { Id: recordId }});
+    }
+
+    updateQisSubmit(){
+        	updateQis({
+        		 recordId: this.recordId
+        		}).then(result =>{
+                    
+        			console.log('result'+result);
+        			if (result!='鎴愬姛') {
+                        const evt = new ShowToastEvent({
+                            title : '鏇存柊澶辫触',
+                            message: result,
+                            variant: 'error'
+                        });
+                        this.dispatchEvent(evt);
+                    }
+                this.dispatchEvent(new CloseActionScreenEvent());
+                this.updateRecordView(this.recordId);
+        		}).catch(error => {
+            console.log('error='+error);
+        }).finally(() => {
+            
+        });
+        }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js-meta.xml b/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js-meta.xml
new file mode 100644
index 0000000..5712416
--- /dev/null
+++ b/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOSHRecieved">
+      <apiVersion>54.0</apiVersion>
+    <isExposed>true</isExposed>
+    <targets>
+        <target>lightning__RecordPage</target>
+        <target>lightning__AppPage</target>
+        <target>lightning__HomePage</target>
+        <target>lightning__RecordAction</target>
+    </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js b/force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js
index 515ea3e..42da614 100644
--- a/force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js
+++ b/force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js
@@ -44,7 +44,7 @@
             console.log('this.qisStatus='+this.qisStatus);
             console.log('this.OSHstaff='+this.OSHstaff);
             console.log('this.OSHstaffEmail='+this.OSHstaffEmail);
-         	if (this.qisStatus=='OSH妫�娴嬬敵璇�' && this.qisStatus=='瀹屾瘯') {
+         	if (this.qisStatus=='OSH妫�娴嬬敵璇�' || this.qisStatus=='瀹屾瘯') {
                 const evt = new ShowToastEvent({
                             title : '闇�瑕佸厛鐐瑰嚮锛籓SH妫�鏌ュ彈鐞嗭冀',
                             message: '',
diff --git a/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
index 94c87ab..f3236b0 100644
--- a/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
+++ b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
@@ -41,11 +41,11 @@
                 	qisReportId: this.qisReportId
            		 }).then(result => {
 	            	if (result!=null) {
-	            		this.paeId = result.PAEid;
-	            		console.log('result='+this.paeId);
+	            		this.paeId = result.pAEid;
+	            		console.log('result2='+this.paeId);           
 	            	}   
 	            	var url = '';
-					if (result!=null&&result.length>0){
+					if (result!=null){
 						url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ;
 					} else {
 						url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId;
diff --git a/force-app/main/default/lwc/lexQISSC/lexQISSC.js b/force-app/main/default/lwc/lexQISSC/lexQISSC.js
index 2917728..768177f 100644
--- a/force-app/main/default/lwc/lexQISSC/lexQISSC.js
+++ b/force-app/main/default/lwc/lexQISSC/lexQISSC.js
@@ -82,7 +82,7 @@
                             message: '',
                             variant: 'error'
                         });
-                        
+                        this.dispatchEvent(evt);
                         this.dispatchEvent(new CloseActionScreenEvent());
                         return;
             	}
diff --git a/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.css b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.css
new file mode 100644
index 0000000..66b51b5
--- /dev/null
+++ b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.css
@@ -0,0 +1,10 @@
+.exampleHolder{
+    position: relative;
+    display: inline-block;
+    width: 80px;
+    height: 80px;
+    text-align: center;
+}
+.container .uiContainerManager{
+	display: none !important;
+}/* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.html b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.html
new file mode 100644
index 0000000..33549d5
--- /dev/null
+++ b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
new file mode 100644
index 0000000..cbf87b9
--- /dev/null
+++ b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
@@ -0,0 +1,63 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { NavigationMixin } from 'lightning/navigation';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import init  from '@salesforce/apex/QISReportController.initForQisUniversalFailureCodeButton';
+import sqlForPAE  from '@salesforce/apex/QISReportController.sqlForPAE';
+
+export default class lexQisUniversalFailureCode extends LightningElement {
+	@api recordId;
+	IsLoading = true;
+	qisReportId;
+	paeId;
+	 @wire(CurrentPageReference)
+     getStateParameters(currentPageReference) {
+             console.log(111);
+             console.log(currentPageReference);
+
+         if (currentPageReference) {
+           const urlValue = currentPageReference.state.recordId;
+           if (urlValue) {
+             let str = `${urlValue}`;
+             console.log("str");
+             console.log(str);
+             this.recordId = str;
+           }
+         }
+     }
+
+    connectedCallback () {
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if (result != null) {
+                this.IsLoading = false;
+                this.qisReportId = result.Id;
+                var RecordTypeId = "ASACDecision";
+                sqlForPAE({
+                	qisReportId: this.qisReportId
+           		 }).then(result => {
+	            	if (result!=null) {
+	            		this.paeId = result.pAEid;
+	            		console.log('result='+this.paeId);
+	            	}   
+	            	var url = '';
+					if (result!=null){
+						url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ;
+					} else {
+						url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId;
+					} 
+					console.log('url='+url);
+					// window.open(url,'_self');
+                    window.location.replace(url);
+		        }); 
+            }
+        }).catch(error => {
+            console.log('error='+error);
+        }).finally(() => {
+            
+        });   
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js-meta.xml b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js-meta.xml
new file mode 100644
index 0000000..51bdb04
--- /dev/null
+++ b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexQisUniversalFailureCode">
+   <apiVersion>54.0</apiVersion>
+    <isExposed>true</isExposed>
+    <targets>
+        <target>lightning__RecordPage</target>
+        <target>lightning__AppPage</target>
+        <target>lightning__HomePage</target>
+        <target>lightning__RecordAction</target>
+    </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js b/force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js
index a65405b..24708a5 100644
--- a/force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js
+++ b/force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js
@@ -93,7 +93,7 @@
                     this.dispatchEvent(new CloseActionScreenEvent());
 					return;
          		}
-         		if (this.QISReplyDay!=null  && this.RCproblemnotfound == 'true') {
+         		if (this.QISReplyDay!=null  && this.RCproblemnotfound) {
                     const evt = new ShowToastEvent({
                         title : '鏈�缁堝垽瀹氭椂锛岃鍙栨秷[鏁呴殰鏈彂鐜扮暀涓嬬户缁瀵焆骞堕�夋嫨[瀵瑰簲鏂规硶]',
                         message: '',
diff --git a/force-app/main/default/lwc/lexRentalApplyESetRefreshStatus/lexRentalApplyESetRefreshStatus.js b/force-app/main/default/lwc/lexRentalApplyESetRefreshStatus/lexRentalApplyESetRefreshStatus.js
index 7cd6690..8fa57d9 100644
--- a/force-app/main/default/lwc/lexRentalApplyESetRefreshStatus/lexRentalApplyESetRefreshStatus.js
+++ b/force-app/main/default/lwc/lexRentalApplyESetRefreshStatus/lexRentalApplyESetRefreshStatus.js
@@ -34,7 +34,6 @@
 		}).then(result => {
 			this.refreshResult = result;
 			
-			
 			this.cancelSubmit().then(res=>{
 				this.IsLoading=false;
 				this.dispatchEvent(new CloseActionScreenEvent());
@@ -50,14 +49,14 @@
 
 	async cancelSubmit(){
 		if(this.refreshResult == '1') {
-			this.showToast('','鐘舵�佹洿鏂板畬姣�','success');
+			this.showToast('','鐘舵�佹洿鏂板畬姣�!','success');
 			// alert("鐘舵�佹洿鏂板畬姣�!");
 			location.href = "/"+this.recordId; 
 					
 		} else {
 			console.log("result:",this.refreshResult);
-			this.showToast('','鏇存柊澶辫触锛岃鑱旂郴绠$悊鍛橈紒','warning');
-			// alert("鏇存柊澶辫触锛岃鑱旂郴绠$悊鍛橈紒");
+			this.showToast('','鏇存柊澶辫触锛�'+this.refreshResult,'warning');
+			// this.showToast('','鏇存柊澶辫触锛岃鑱旂郴绠$悊鍛橈紒','warning');
 			
 		}
 			
diff --git a/force-app/main/default/lwc/lexSubmitApprovalProcess/lexSubmitApprovalProcess.js b/force-app/main/default/lwc/lexSubmitApprovalProcess/lexSubmitApprovalProcess.js
index 2a9ab34..4a51737 100644
--- a/force-app/main/default/lwc/lexSubmitApprovalProcess/lexSubmitApprovalProcess.js
+++ b/force-app/main/default/lwc/lexSubmitApprovalProcess/lexSubmitApprovalProcess.js
@@ -43,8 +43,11 @@
 	}
 	
 	cancelSubmit(){
+		
 		if (this.transferApplyPermission == false) {
 			this.showToast('','娌℃湁鎻愪氦鐢宠鐨勬潈闄�','warning');
+			this.IsLoading=false;
+			this.dispatchEvent(new CloseActionScreenEvent());
 		} else{
 			LightningConfirm.open({
 	            message: '涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵',
@@ -55,14 +58,21 @@
 	    			submitApply({taId:this.recordId}).then(submitRes=>{
 						if(submitRes == '1'){
 							this.showToast('','鎻愪氦鎴愬姛','success');
-							window.location.href = window.location;
+							setTimeout(function(){
+								window.location.href = window.location;
+							}, 1500 );
 						}else{
 							this.showToast("",submitRes,"warning");
 						}
-						this.IsLoading=false;
-						this.dispatchEvent(new CloseActionScreenEvent());
+						
 					});	
+					this.IsLoading=false;
+					this.dispatchEvent(new CloseActionScreenEvent());
+	        	} else{
+	        		this.IsLoading=false;
+					this.dispatchEvent(new CloseActionScreenEvent());
 	        	}
+	        	
 	        });
 			
 		}		
diff --git a/force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.css b/force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.css
new file mode 100644
index 0000000..426333e
--- /dev/null
+++ b/force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.css
@@ -0,0 +1,12 @@
+.exampleHolder{
+    position: relative;
+    top: 0;
+    width: 0;
+    left: 0;
+    right: 0;
+    margin: 0 auto;
+}
+
+.uiContainerManager {
+    display:none;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.html b/force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.html
new file mode 100644
index 0000000..2f21178
--- /dev/null
+++ b/force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.html
@@ -0,0 +1,3 @@
+<template>
+	
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js b/force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js
new file mode 100644
index 0000000..c11781f
--- /dev/null
+++ b/force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js
@@ -0,0 +1,59 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+
+import  init  from '@salesforce/apex/UploadOBPMController.toUploadOBPM';
+export default class lexUploadOBPM extends LightningElement {
+	@api recordId;
+	ifApproved;
+	IsLoading = true;
+
+	@wire(CurrentPageReference)
+	getStateParameters(currentPageReference) {
+		if (currentPageReference) {
+			const urlValue = currentPageReference.state.recordId;
+			if (urlValue) {
+			 let str = `${urlValue}`;
+			 this.recordId = str;
+			}
+		}
+	}
+	connectedCallback(){
+		document.getElementBy
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if(!result.IF_Approved__c) {
+	            const event = new ShowToastEvent({
+	            	message: '姝や細璁笉闇�瑕佺敵璇峰喅瑁侊紒',
+	            	variant: 'warning'
+		        });
+		        this.dispatchEvent(event);
+            }else {
+            	window.open("/apex/UploadOBPM?id=" + result.Id,'UploadOBPM','height=400,width=650');
+            }
+            this.IsLoading = false;
+        })       
+    }
+}
+
+
+//old js
+/*{!RequireScript("/soap/ajax/51.0/connection.js")}
+{!RequireScript("/soap/ajax/51.0/apex.js")}
+{!RequireScript("/resource/CommonUtilJs")}
+
+var foo = function() {
+// 鍒ゆ柇鏄惁闇�瑕佺敵璇峰喅瑁�
+var IF_Approved__c= "{!Campaign.IF_Approved__c}";
+
+if (IF_Approved__c == false) {
+alert("姝や細璁笉闇�瑕佺敵璇峰喅瑁侊紒");
+return;
+}
+window.open("/apex/UploadOBPM?id=" + '{!URLENCODE(Campaign.Id)}','UploadOBPM','height=400,width=650,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no');
+
+}
+foo();*/
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js-meta.xml b/force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js-meta.xml
new file mode 100644
index 0000000..f784980
--- /dev/null
+++ b/force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexUploadOBPM">
+    <apiVersion>51.0</apiVersion>
+    <isExposed>true</isExposed>
+    <targets>
+        <target>lightning__RecordPage</target>
+        <target>lightning__AppPage</target>
+        <target>lightning__HomePage</target>
+        <target>lightning__RecordAction</target>
+    </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/pages/CampaignMemberBMEEditAndDelete.page b/force-app/main/default/pages/CampaignMemberBMEEditAndDelete.page
index 3e77a27..2db9de1 100644
--- a/force-app/main/default/pages/CampaignMemberBMEEditAndDelete.page
+++ b/force-app/main/default/pages/CampaignMemberBMEEditAndDelete.page
@@ -1,5 +1,5 @@
 <apex:page standardcontroller="BMEFollowup__c" extensions="CampaignMemberEditAndDeleteController"   
-sidebar="true" showHeader="true" id="allPage" action="{!init}">
+sidebar="true" showHeader="true" id="allPage" action="{!init}" lightningStylesheets="true">
 <apex:form >
     <div style="font-size: 18px;text-align: center;">
         <apex:outputPanel rendered="{!RecordTypecheck}">
diff --git a/force-app/main/default/pages/CheckPlanDeleteButton.page b/force-app/main/default/pages/CheckPlanDeleteButton.page
index a7156ea..05fd30d 100644
--- a/force-app/main/default/pages/CheckPlanDeleteButton.page
+++ b/force-app/main/default/pages/CheckPlanDeleteButton.page
@@ -1,4 +1,4 @@
-<apex:page standardController="Inspectup_Plan__c" >
+<apex:page standardController="Inspectup_Plan__c" lightningStylesheets="true">
 <div style="position: relative; margin-top: 10px; margin-left: 10px;">
 <span style="font-weight: bold; font-size: 12pt;">{!$Label.YouCantDeleteEvent1}</span>
 
diff --git a/force-app/main/default/pages/RepairPCL.page b/force-app/main/default/pages/RepairPCL.page
index 0226fd9..e6b265a 100644
--- a/force-app/main/default/pages/RepairPCL.page
+++ b/force-app/main/default/pages/RepairPCL.page
@@ -9,6 +9,13 @@
 <apex:includeScript value="{!URLFOR($Resource.OpportunityPCLJs)}"/>
 
 <style>
+   
+    /*div#out_Div_L table th, div#out_Div_L>table>tbody>tr.headerRow>td,*/
+    div#out_Div table th, div#out_Div>table>tbody>tr.headerRow>td{
+        white-space: normal;
+    }
+    
+
     td .dateFormat  {
         display: none;
     }
@@ -23,25 +30,27 @@
   position:relative;
   overflow: hidden;
   float:left;
-  width:1400px;
+  width:700px;
 }
 div#out_Div_L {
   position:relative;
   overflow: hidden;
   float:left;
+  width: 547px;
 }
 div#in_Div {/* tbody銇屽叆銇c仸銇勩倠銆傘亾銇撱亴銈广偗銉兗銉璞�*/
   position:relative;
   overflow: auto;  /*銈广偗銉兗銉儛銉�*/
   float:left;
-  width:1400px;
-  height: 100px; /* tbody銈掕〃绀恒仚銈嬮珮銇曘�佸緦銇s銇仸瑾挎暣 */
+  width:700px;
+  height: 300px; /* tbody銈掕〃绀恒仚銈嬮珮銇曘�佸緦銇s銇仸瑾挎暣 */
 }
 div#in_Div_L {
   position:relative;
   overflow: hidden;
   float:left;
-  height: 100px;
+  height: 300px;
+  width: 547px;
 }
 
 body .pbBody table.list tr.headerRow td {
@@ -69,6 +78,7 @@
 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 {table-layout: fixed;}
 table.list td {width:100px;}
 table.list td select {width:95%;}
 table.list td input {width:95%;}
@@ -77,36 +87,46 @@
   width:90%;
 }
 
-table.list .col_Name {width:99px;}
+table.list .col_Name {width:110px;}
 table.list .col_Service_Repair_No__c {width:49px;}
-table.list .col_Account__c {width:109px;}
+table.list .col_Account__c {width:115px;}
 table.list .col_Department_Name__c {width:59px;}
-table.list .col_State_Hospital__c {width:49px;}
-table.list .col_OwnershipMachine_No__c {width:49px;}
-table.list .col_SerialNumber__c {width:49px;}
-table.list .col_FSE_owner__c {width:98px;}
+table.list .col_State_Hospital__c {width:69px;}
+table.list .col_OwnershipMachine_No__c {width:69px;}
+table.list .col_SerialNumber__c {width:69px;}
+
+
+table.list .col_FSE_owner__c {width:104px;}
 table.list .col_On_site_repair_c__c {width:118px;}
 table.list .col_Contract_status__c {width:98px;}
 table.list .col_Status1__c {width:98px;}
 table.list .col_Repair_Severity_Rank__c {width:98px;}
 table.list .col_Repair_Rank__c {width:78px;}
-table.list .col_Failure_Occurrence_Date__c {width:88px;}
-table.list .col_On_Site_Repair_Order_Date__c {width:88px;}
-table.list .col_Send_To_RC_Date__c {width:88px;}
-table.list .col_Repair_Ordered_Date__c {width:88px;}
-table.list .col_Repair_Inspection_Date__c {width:88px;}
-table.list .col_Repair_Firstestimated_Date_formula__c {width:88px;}
-table.list .col_Repair_Estimated_date_formula__c {width:88px;}
-table.list .col_Repair_Discount_Date_formula__c {width:88px;}
-table.list .col_Repair_Discount_approval_Date_formula__c {width:88px;}
-table.list .col_Agreed_Date__c {width:88px;}
-table.list .col_Repair_Start_Date__c {width:88px;}
-table.list .col_Repair_Completed_Date__c {width:88px;}
-table.list .col_Repair_Shipped_Date__c {width:88px;}
-table.list .col_Input_user_return_day__c {width:88px;}
-table.list .col_Return_Without_Repair__c {width:58px;}
+table.list .col_Failure_Occurrence_Date__c {width:94px;}
+table.list .col_On_Site_Repair_Order_Date__c {width:94px;}
+table.list .col_Send_To_RC_Date__c {width:94px;}
+table.list .col_Repair_Ordered_Date__c {width:94px;}
+table.list .col_Repair_Inspection_Date__c {width:94px;}
+table.list .col_Repair_Firstestimated_Date_formula__c {width:94px;}
+table.list .col_Repair_Estimated_date_formula__c {width:94px;}
+table.list .col_Repair_Discount_Date_formula__c {width:94px;}
+table.list .col_Repair_Discount_approval_Date_formula__c {width:94px;}
+table.list .col_Agreed_Date__c {width:94px;}
+table.list .col_Repair_Start_Date__c {width:94px;}
+table.list .col_Repair_Completed_Date__c {width:94px;}
+table.list .col_Repair_Shipped_Date__c {width:94px;}
+table.list .col_Repair_Returned_To_HP_Date__c {width:94px;}
+table.list .col_Input_user_return_day__c {width:105px;}
+table.list .col_Return_Without_Repair__c {width:65px;}
 table.list .col_Return_Without_Repair_Reason__c {width:138px;}
+table.list .col_SAPRepairNo__c {width:108px;}
 
+div#in_Div input[type="checkbox"] {
+        width:15px ;
+}
+div#in_Div .col_Return_Without_Repair__c {
+    text-align: center;
+}
 body .pbBody table.list tr.headerRow td.colViewing {
   /* 銉囥儠銈┿儷銉堝�ゃ�佹渶灏忓寲銈€偆銈炽兂銈掕〃绀� */
   background-image:url('{!URLFOR($Resource.IconResizeMinus_5)}') ;
@@ -141,18 +161,18 @@
         
         <apex:outputPanel id="allPanel">
             <apex:pageBlock id="searchBlock" tabStyle="Report">
-                <table style="border-bottom-width: 0px; font-size:12px;">
+                <table style="border-bottom-width: 0px; font-size:12px;margin-bottom: 10px;">
                     <tr>
                         <td width="150px">
                             <apex:commandButton action="{!save}" value="淇濆瓨" rerender="allPanel" onclick="blockme();" oncomplete="unblockUI();" style="height:30px;width:60px;"/>&nbsp;&nbsp;
-                            <apex:commandButton value="妫�绱�" onclick="searchOppJs();return false;" style="height:30px;width:60px;"/>
+                            <apex:commandButton value="妫�绱�" onclick="searchOppJs();return false;"  style="height:30px;width:60px;"/>
                         </td>
                         <td width="1000px">
                             <apex:pageMessages />
                         </td>
                     </tr>
                 </table>
-                <table style="border-bottom-width: 0px; font-size:12px;margin-bottom: 10px">
+                <table style="border-bottom-width: 0px; font-size:12px;margin-bottom: 10px;">
                     <tr>
                         <td width="250px">鍖婚櫌&nbsp;<apex:inputText value="{!accSearch}" style="width:150px"/>銆�</td>
                         <td width="40px">鍒涘缓浜�</td>
@@ -163,9 +183,7 @@
                                   浠�&nbsp;<apex:inputField value="{!con1.BirthDate}" id="fromDateId"/>銆�
                                  鍒�&nbsp;<apex:inputField value="{!con2.BirthDate}" id="toDateId"/>
                         </td>
-<!--                         <td width="30px"><apex:commandButton value="鏍囪" onclick="markOpp('{!$Label.BackgroundColor}');return false;" rerender="allPanel"/></td> -->
-<!--                         <td width="10px"></td> -->
-<!--                         <td width="80px">鍙浠�&nbsp;<apex:inputCheckbox value="{!onlyOpp}" /></td> -->
+
                         <td>鏄剧ず銆�<apex:selectList value="{!limits}" size="1" onchange="searchOppJs();return false;"><apex:selectOptions value="{!limitOpts}"/></apex:selectList>銆�鏉℃暟鎹�</td>
                         <td width="10px"></td>
                         <td width="70px"><a href="#" onclick="expandAll();return false;" style="text-decoration: underline;">鍏ㄩ儴灞曞紑</a></td>
@@ -199,7 +217,6 @@
             </apex:pageBlock>
             
             <apex:pageBlock id="oppBlock" tabStyle="Report">
-<!--                <apex:pageblocksection columns="1" id="oppSection">-->
                 <apex:outputPanel >
                     <apex:inputHidden id="oppCount" value="{!oppCount}"/>
                     <div id="out_Div_L">
@@ -224,7 +241,7 @@
                         </table>
                     </div>
                     <div id="out_Div">
-                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader">
+                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout: fixed;" border="" id="tableHeader">
                             <tr class="dataRow" height="1px">
                             <apex:variable value="{!0}" var="cnt" />
                             <apex:repeat value="{!titleRight}" var="t">
@@ -295,7 +312,7 @@
                         </table>
                     </div>
                     <div id="in_Div">
-                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData">
+                        <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="{!oppRecords}" 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);}">
@@ -362,14 +379,11 @@
             tableWidth += headerCol.width();
         }
     });
-    j$('table#tableData').css('width', (tableWidth + 2) + 'px');
-    j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
+    j$('table#tableData').css('width', (tableWidth + 20) + 'px');
+    j$('table#tableHeader').css('width', (tableWidth + 20) + 'px');
 
     // list 銇� headerRow 銇� td銇� toggleWidth() 銈掕拷鍔�
     bindTdToggleWidth();
-
-
-
 
 });
 var elements = document.getElementsByTagName("select");
@@ -384,7 +398,7 @@
 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%";
+        input_l[i].style.width = "99%";
     }
 }
 var tbl = document.getElementById("tableData");
@@ -392,18 +406,17 @@
 for (i = 0; i < input.length; i++) {
     var id = input[i].id + '_lkid';
     if (document.getElementById(id) != null) {
-        input[i].style.width = "75%";
+        input[i].style.width = "95%";
     }
 }
 j$('div#in_Div').scroll(function() {
     j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
-    console.log(j$(this).scrollLeft());
 });
 j$('div#in_Div').scroll(function() {
     j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
-    console.log(j$(this).scrollTop());
 });
-windowResize();
+resizeTable();
+// windowResize();
 </script>
         </apex:outputPanel>
     </apex:form>
diff --git a/force-app/main/default/pages/UploadOBPM.page b/force-app/main/default/pages/UploadOBPM.page
index 56febb1..c78c43f 100644
--- a/force-app/main/default/pages/UploadOBPM.page
+++ b/force-app/main/default/pages/UploadOBPM.page
@@ -1,4 +1,4 @@
-<apex:page controller="UploadOBPMController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="涓婁紶OBPM">
+<apex:page controller="UploadOBPMController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="涓婁紶OBPM" lightningStylesheets="true">
     <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
     <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
     <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
diff --git a/force-app/main/default/pages/eSignFormAttachment.page b/force-app/main/default/pages/eSignFormAttachment.page
index 016c01a..e358110 100644
--- a/force-app/main/default/pages/eSignFormAttachment.page
+++ b/force-app/main/default/pages/eSignFormAttachment.page
@@ -163,16 +163,16 @@
                                     </tr>
                                     <apex:repeat value="{!acccData}" var="or" id="oppTable">
                                         <apex:variable value="{!1}" var="cnt"/>
-                                        <apex:variable value="trcnt" var="trcnt" rendered="{!IF(or.accessory.ContentType == '缁忛攢鍟�', true, false)}">
-                                        <tr style="cursor:pointer;" onclick="changeColor('{!or.accessory.Id}');onShowImge('{!or.accessory.Id}',this);" 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="trcnt" var="trcnt" rendered="{!IF(or.accessory.Description == '缁忛攢鍟�', true, false)}">
+                                        <tr style="cursor:pointer;" onclick="changeColor('{!or.accessory.ContentDocumentId}');onShowImge('{!or.accessory.ContentDocumentId}',this);" 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);}">
                                             <td align="center" id="" style="border-right-width:thin">
-                                                <a href="#"><apex:outputText value="{!or.accessory.Name}" /></a>
+                                                <a href="#"><apex:outputText value="{!or.accessory.Title}.{!or.accessory.FileType}" /></a>
                                             </td>
                                             <td width="55px" align="center">
-                                                <apex:outputText value="{!or.accessory.ContentType}" />
+                                                <apex:outputText value="{!or.accessory.Description}" />
                                             </td>
                                             <td style="display:none">
-                                                <apex:outputText value="{!or.accessory.Id}"/>
+                                                <apex:outputText value="{!or.accessory.ContentDocumentId}"/>
                                             </td>
                                         </tr>
                                         </apex:variable>
@@ -197,16 +197,16 @@
                                     </apex:variable>
                                     <apex:repeat value="{!acccData}" var="or" id="oppTable2">
                                         <apex:variable value="{!1}" var="cnt"/>
-                                        <apex:variable value="trcnt" var="trcnt" rendered="{!IF(or.accessory.ContentType == '鍖婚櫌', true, false)}">
-                                        <tr style="cursor:pointer;" onclick="changeColor('{!or.accessory.Id}');onShowImge('{!or.accessory.Id}',this);" 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="trcnt" var="trcnt" rendered="{!IF(or.accessory.Description == '鍖婚櫌', true, false)}">
+                                        <tr style="cursor:pointer;" onclick="changeColor('{!or.accessory.ContentDocumentId}');onShowImge('{!or.accessory.ContentDocumentId}',this);" 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);}">
                                             <td align="center" id="" style="border-right-width:thin">
-                                                <a href="#"><apex:outputText value="{!or.accessory.Name}" /></a>
+                                                <a href="#"><apex:outputText value="{!or.accessory.Title}.{!or.accessory.FileType}" /></a>
                                             </td>
                                             <td width="55px" align="center">
-                                                <apex:outputText value="{!or.accessory.ContentType}" />
+                                                <apex:outputText value="{!or.accessory.Description}" />
                                             </td>
                                             <td style="display:none">
-                                                <apex:outputText value="{!or.accessory.Id}"/>
+                                                <apex:outputText value="{!or.accessory.ContentDocumentId}"/>
                                             </td>
                                         </tr>
                                         </apex:variable>
@@ -340,7 +340,7 @@
                 }else{
                     //濡傛灉涓嶆槸鍥剧墖锛岄偅涔堜笅杞芥枃浠�
                     //window.open('https://ocsm--stagefull--c.documentforce.com/servlet/servlet.FileDownload?file='+accId);
-                    window.open('https://ocsm--c.ap0.content.force.com/servlet/servlet.FileDownload?file='+accId);
+                    window.open('/sfc/servlet.shepherd/document/download/'+accId);
                     debugger
                     //鍙宠竟鐨勭敾甯冩樉绀�
                     showPdf();
@@ -478,7 +478,8 @@
             }
             //鍥剧墖鍔犺浇鍜宑anvas 鐢诲浘
             function imgShow(accId,accContentType){
-                var imageUrl = "/servlet/servlet.FileDownload?file="+accId;
+                // var imageUrl = "/servlet/servlet.FileDownload?file="+accId;
+                var imageUrl = "/sfc/servlet.shepherd/document/download/"+accId;
                 //js鍔ㄦ�佽祴鍊�
                 document.getElementById("j_id0:testImg").src = imageUrl;
                 //js鍔ㄦ�佽祴鍊�
diff --git a/force-app/main/default/staticresources/OpportunityPCLJs.js b/force-app/main/default/staticresources/OpportunityPCLJs.js
index 3c06350..6533d6e 100644
--- a/force-app/main/default/staticresources/OpportunityPCLJs.js
+++ b/force-app/main/default/staticresources/OpportunityPCLJs.js
@@ -155,7 +155,37 @@
     }
 }
 
+function resizeTable() {
+    blockHeight = j$(window).innerHeight() - j$(escapeVfId('allPage:allForm:searchBlock')).height() - heightAjustment;
+    sbwidth = scrollbarWidth();
+    blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#in_Div_L').width() - widthAjustment - sbwidth;
+    j$(escapeVfId('allPage:allForm:oppBlock')).css('height', blockHeight + 78 + 'px');
+    j$('div#in_Div').css('width', blockWidth + 'px');
+    j$('div#out_Div').css('width', blockWidth + 'px');
+    
 
+
+    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 + 20) + 'px');
+    j$('table#tableHeader').css('width', (tableWidth + 20) + 'px');
+
+
+
+     if (j$('table#tableData').height() > j$('div#in_Div').height()) {
+        j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px');
+    } else {
+       j$('div#out_Div').css('width', (blockWidth + sbwidth) + 'px');
+        j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px');
+    }
+    
+}
 
 function sortTableJs_Account(key) {
     if (typeof event.stopPropagation != "undefined") {
@@ -215,24 +245,16 @@
     });
     windowResize();
     // 銈广偗銉兗銉�e嫊
-     j$('div#in_Div').scroll(function() {
-        j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
-        console.log(j$(this).scrollLeft());
-    });
     j$('div#in_Div').scroll(function() {
+        j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
         j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
-        console.log(j$(this).scrollTop());
     });
-    // 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());
-    // });
+    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 windowResize() {
     blockHeight = j$(window).innerHeight() - j$(escapeVfId('allPage:allForm:searchBlock')).height() - heightAjustment;
diff --git a/force-app/main/default/staticresources/RelationListPagingCmpJS.js b/force-app/main/default/staticresources/RelationListPagingCmpJS.js
index 2432941..0ed2bd5 100644
--- a/force-app/main/default/staticresources/RelationListPagingCmpJS.js
+++ b/force-app/main/default/staticresources/RelationListPagingCmpJS.js
@@ -400,9 +400,12 @@
             tableWidth += listColClassWidthMap[colClass] + 2 - hiddenWidth;    // 2 is border
         }
     }
-    
-    j$('table#tableData').css('width', (tableWidth + 2) + 'px');
-    j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
+    // 2023-05-04   zyh   lightning鍗囩骇   start
+    // j$('table#tableData').css('width', (tableWidth + 2) + 'px');
+    j$('table#tableData').css('width', (150) + '%');
+    // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
+    j$('table#tableHeader').css('width', (150) + '%');
+    // 2023-05-04   zyh   lightning鍗囩骇   end
 }
 function getColClassName(pObj) {
 

--
Gitblit v1.9.1