unknown
2023-05-10 6316cdaa2ac17f6a9210035ac2f57b964f273516
Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
25个文件已修改
24个文件已添加
3811 ■■■■■ 已修改文件
force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAuraController.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/ConsumApplyCancelController.cls 2739 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/UploadOBPMController.cls 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/buttonAccountCtl.cls 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/buttonAccountCtl.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/eSignFormAttachmentController.cls 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.js 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAppCancelSubmit/lexAppCancelSubmit.js 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAppSubmitButton/lexAppSubmitButton.js 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexBidAnnouncementApplyForButton/lexBidAnnouncementApplyForButton.js 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexBidAnnouncementConsentButton/lexBidAnnouncementConsentButton.js 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancelApply/lexCancelApply.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateNewServiceContract/__tests__/lexCreateNewServiceContract.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISSC/lexQISSC.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRentalApplyESetRefreshStatus/lexRentalApplyESetRefreshStatus.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSubmitApprovalProcess/lexSubmitApprovalProcess.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.css 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/CampaignMemberBMEEditAndDelete.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/CheckPlanDeleteButton.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RepairPCL.page 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/UploadOBPM.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/eSignFormAttachment.page 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/OpportunityPCLJs.js 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/RelationListPagingCmpJS.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp
New file
@@ -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>
force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp-meta.xml
New file
@@ -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>
force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAuraController.js
New file
@@ -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);
        }
    }
})
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 申请书ID
    **/
    public ConsumApplyCancelController() {
        this.objId = ApexPages.currentPage().getParameters().get('objId');
    }
    /**
    * @description ConsumApplyCancelController 初始化方法
    **/
    public void init() {
        try{
          if (String.isBlank(this.objId)) {
             throw new ControllerUtil.myException('请设置耗材借出申请的Id');
          }
          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 仇yj 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 仇yj 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代表当天,1代表第二天
    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 的目的是、为了取得ed の 下一个工作日
                 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条,所以改在WebService做出库指示
    WebService static String setShipment_requests(String raid, String raesid) {
    Savepoint sp = Database.setSavepoint();
    try {
        System.debug(raid);
        //一览情况下检索一览对应的申请书Id,soql子查询不能和主查询是同一个表,单独检索一次
        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 == '販売店'){
            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 '经销商SP订单不在申请期内,不能申请备品';
                    }
                }else{
                    return '经销商SP订单状态不符合备品申请资格,不能申请备品';
                }
            }else{
                return '注残销售渠道类别不在可申请备品范围内';
            }
        }else if(Sac.Opportunity__r.Sales_Root__c == 'OCM直接販売'){
            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++;
    }
}
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; }
force-app/main/default/classes/buttonAccountCtl.cls
New file
@@ -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;
     }
}
force-app/main/default/classes/buttonAccountCtl.cls-meta.xml
New file
@@ -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>
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;
force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="ApplicationCancelSubmit" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.js
New file
@@ -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)
        })
     }
}
force-app/main/default/lwc/lexAllReceivedBtns/lexAllReceivedBtns.js-meta.xml
New file
@@ -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>
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,'获取当前登陆人id')
            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());
    }
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,'获取当前登陆人id')
            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());
    }
}
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(){
        //'获取当前登陆人id'
        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());
    }
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());
    }
}
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();
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();
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();
//     }
}
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");     
force-app/main/default/lwc/lexCreateNewServiceContract/__tests__/lexCreateNewServiceContract.test.js
New file
@@ -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);
    });
});
force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="exampleHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js
New file
@@ -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;
    }
}
force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js-meta.xml
New file
@@ -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>
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);
            }
force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.css
New file
@@ -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 */
force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="VOCSubmitHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js
New file
@@ -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(() => {
        });
        }
}
force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js-meta.xml
New file
@@ -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>
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 : '需要先点击[OSH检查受理]',
                            message: '',
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;
force-app/main/default/lwc/lexQISSC/lexQISSC.js
@@ -82,7 +82,7 @@
                            message: '',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
                }
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.css
New file
@@ -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 */
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.html
New file
@@ -0,0 +1,5 @@
<template>
 <div class="exampleHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
New file
@@ -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(() => {
        });
    }
}
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js-meta.xml
New file
@@ -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>
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: '',
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');
            
        }
            
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());
                }
            });
            
        }        
force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.css
New file
@@ -0,0 +1,12 @@
.exampleHolder{
    position: relative;
    top: 0;
    width: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
}
.uiContainerManager {
    display:none;
}
force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.html
New file
@@ -0,0 +1,3 @@
<template>
</template>
force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js
New file
@@ -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();*/
force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js-meta.xml
New file
@@ -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>
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}">
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>
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が入っている。ここがスクロール対象*/
  position:relative;
  overflow: auto;  /*スクロールバー*/
  float:left;
  width:1400px;
  height: 100px; /* tbodyを表示する高さ、後でjsにて調整 */
  width:700px;
  height: 300px; /* tbodyを表示する高さ、後でjsにて調整 */
}
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>
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)}"/>
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 @@
            }
            //图片加载和canvas 画图
            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动态赋值
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();
    // スクロール連動
     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;
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) {