李金换
2022-03-23 47b2e621c2a5ea58cee946c36a3307f6fe8e6982
【委托】金华众智-ET耗材无法入库问题解决
2个文件已修改
277 ■■■■ 已修改文件
force-app/main/default/classes/ArriveGoodsController.cls 163 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ArriveGoods.page 114 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/ArriveGoodsController.cls
@@ -15,7 +15,7 @@
    public List<Consumable_order_details2__c> consumableorderdetails2Insert= new List<Consumable_order_details2__c>();
    public List<Consumable_order_details2__c> consumableorderdetails2Nobox= new List<Consumable_order_details2__c>();
    public List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordserror { get; set; }
    public List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordsdummy { get; set; }
    public transient List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordsdummy { get; set; }
    public List<ConsumableorderdetailsInfo> ShowGoodsofReturnList{get;set;}
    public List<ConsumableorderdetailsInfo> ShowGoodsofRemoveBoxReturnList{get;set;}
    //add by rentx 20210602 CHAN-C3K4ZQ
@@ -34,15 +34,16 @@
        return ConsumableorderdetailsRecordserror.size();
    }
    Set<String> noboxBarcodeList = new Set<String>();
    Map<String, String> ExistIdMap = new Map<String, String>();
    Map<String, String> ErrorIdMap = new Map<String, String>();
    Map<String, String> AllMap = new Map<String, String>();
    public transient Map<String, String> ExistIdMap = new Map<String, String>();
    public transient Map<String, String> ErrorIdMap = new Map<String, String>();
    public transient Map<String, String> AllMap = new Map<String, String>();
    Map<String, String> otherAgencyMap = new Map<String, String>();
    Map<String, String> barMcodeMap = new Map<String, String>();
    public transient Map<String, String> barMcodeMap = new Map<String, String>();
    Map<String, Integer> BarcodeCntMap = new Map<String, Integer>();
    public List<String> BarCodeListP = new List<String>();
    //qi
    public transient List<String> BarCodeListP = new List<String>();
    Map<String, String> OrderAllMap = new Map<String, String>();
    // public transient Map<String, String> OrderAllMap = new Map<String, String>();
    Map<String, Decimal> orderProductCunMap = new Map<String, Decimal>();
    Map<String, Decimal> orderProductArrivedCunMap = new Map<String, Decimal>();
    Map<String, Decimal> orderWantArriveCunMap = new Map<String, Decimal>();
@@ -65,7 +66,7 @@
    list<String> exitBarCodeList = new list<String>();
    Map<String, Consumable_order_details2__c> reallMap = new Map<String, Consumable_order_details2__c>();
    // Map<String, Consumable_order_details2__c> reallMap = new Map<String, Consumable_order_details2__c>();
    Map<String,String> HosErrorMap = new Map<String,String>();
    List<String> HosErrorList = new List<String>();
    public String baseUrl {get;private set;}
@@ -108,18 +109,23 @@
        //add by rentx 20210602 CHAN-C3K4ZQ start 
        consumableorderdetailsRecordsview = new List<List<ConsumableorderdetailsInfo>>();
        //add by rentx 20210602 CHAN-C3K4ZQ end 
        // OrderAllMap = new Map<String, String>();
    }
    //add by rentx 20210602 CHAN-C3K4ZQ start 出错的原因是页面最多展示1000条数据,但是需要展示的数据超过了1000条,现在把展示上线改为2000
    //add by rentx 20210602 CHAN-C3K4ZQ start 出错的原因是页面最多展示1000条数据,但是需要展示的数据超过了1000条,现在把展示上线改为1000 * 1000
    public void makeRecordsView(List<ConsumableorderdetailsInfo> recordsdummy){
        //拆分暂用list
        consumableorderdetailsRecordsview = new List<List<ConsumableorderdetailsInfo>>();
        if(recordsdummy.size() > 1000){
        List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordsbreak = new List<ConsumableorderdetailsInfo>();
        List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecordsbreakover = new List<ConsumableorderdetailsInfo>();
        ConsumableorderdetailsInfo c = null;
        ConsumableorderdetailsRecordsbreak.clear();
        ConsumableorderdetailsRecordsbreakover.clear();
        consumableorderdetailsRecordsview.clear();
            //选择产品view
            ConsumableorderdetailsRecordsbreak = new List<ConsumableorderdetailsInfo>();
            ConsumableorderdetailsRecordsbreakover = new List<ConsumableorderdetailsInfo>();
        if(recordsdummy.size() > 1000){
            for(Integer i = 0; i < recordsdummy.size(); i++){
                if(i < 1000){
@@ -135,9 +141,33 @@
        }else{
            consumableorderdetailsRecordsview.add(recordsdummy);
        }
            // Integer count = recordsdummy.size() / 1000;
            // Integer last = recordsdummy.size() - (1000*count);
            // for(Integer i = 0; i < count ; i++){
            //     List<ConsumableorderdetailsInfo> tempList = new List<ConsumableorderdetailsInfo>();
            //     for(Integer j=0; j < 1000; j++){
            //         tempList.add(recordsdummy.get(i * count + j ));
            //         // itemList.add(resList.get(i*count+j));
            //     }
            //     consumableorderdetailsRecordsview.add(tempList);
            // }
            // if (last > 0) {
            //     List<ConsumableorderdetailsInfo> tempList = new List<ConsumableorderdetailsInfo>();
            //     for(Integer j=0; j < last; j++){
            //         tempList.add(recordsdummy.get(count * 1000 + j ));
            //         // itemList.add(resList.get(i*count+j));
            //     }
            //     consumableorderdetailsRecordsview.add(tempList);
            // }
        }else{
            consumableorderdetailsRecordsview.add(recordsdummy);
        }
    }
    //add by rentx 20210602 CHAN-C3K4ZQ end
    public void init() {
        // String userId = '00510000007cthP';
        String userId = UserInfo.getUserId();
        List<user> Useracc = New List<user>();
        Useracc = [SELECT accountid, Work_Location__c,UserPro_Type__c FROM user WHERE id =:userId];
@@ -235,14 +265,16 @@
                        AND Dealer_Arrive__c = true
                        AND Box_Piece__c != '个' ];
            for (Integer i = 0; i < reSet1.size(); i++) {
                OrderAllMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
                ConsumableorderdetailsRecordsdummy.add(new ConsumableorderdetailsInfo(reSet1[i]));
                // OrderAllMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
                //init的时候不展示已经入库的明细 by rentx 20210617 CHAN-C3K4ZQ
                // ConsumableorderdetailsRecordsdummy.add(new ConsumableorderdetailsInfo(reSet1[i]));
                //update by rentx 20210617 end CHAN-C3K4ZQ
                if(orderProductArrivedCunMap.containsKey(reSet1[i].Asset_Model_No__c)){
                   orderProductArrivedCunMap.put(reSet1[i].Asset_Model_No__c,orderProductArrivedCunMap.get(reSet1[i].Asset_Model_No__c)+1);
                }
            }
            //add by rentx 20210602 start CHAN-C3K4ZQ
            makeRecordsView(ConsumableorderdetailsRecordsdummy);
            // makeRecordsView(ConsumableorderdetailsRecordsdummy);
            //add by rentx 20210602 end CHAN-C3K4ZQ
        }
    }
@@ -264,7 +296,7 @@
               barMcodeMap.put(B,tracingCode);
            }
            outPut.add(B);
        }
        }system.debug('barMcodeMap等于'+barMcodeMap);
        return outPut;
    }
@@ -287,12 +319,15 @@
        noboxBarcodeList.clear();
        //再检索项目清空
        ConsumableorderdetailsRecordserror = new List<ConsumableorderdetailsInfo>();
        ErrorIdMap = new Map<String, String>();
        ErrorIdMap.clear();
        AllMap = new Map<String, String>();
        AllMap.clear();
        ExistIdMap = new Map<String, String>();
        ExistIdMap.clear();
        consumableorderdetails2Insert = new List<Consumable_order_details2__c>();
        ConsumableorderdetailsRecordsdummy = new List<ConsumableorderdetailsInfo>();
        if(EsetId != null && EsetId != ''){
        /*if(EsetId != null && EsetId != ''){
            List<Consumable_order_details2__c> reSet1 = [SELECT Id,
                            Name,
                            Intra_Trade_List_RMB__c,
@@ -316,10 +351,7 @@
                            Report_Product_Approbation__c,
                            Report_Product_Expiration__c
                            //add by rentx 2020-10-14 start
                           ,ContractNo_text__c/*,ContractNo__c1*/
                           // tcm start
                           ,Consumable_order_minor__r.ContractNo__c
                           // tcm end
                            ,ContractNo_text__c,/*ContractNo__c1*
                            //add by rentx 2020-10-14 end
                            ,hospitalSpecialOffer__c
                        FROM Consumable_order_details2__c
@@ -328,19 +360,22 @@
                        AND Arrive_Owner_Work_Location__c =: userWorkLocation
                        AND Dealer_Arrive__c = true ];
            for (Integer i = 0; i < reSet1.size(); i++) {
                OrderAllMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
                // OrderAllMap.put(reSet1[i].Bar_Code__c,reSet1[i].Bar_Code__c);
                //add by rentx 2021-01-27
                reallMap.put(reSet1[i].Bar_Code__C, reSet1[i]);
                // reallMap.put(reSet1[i].Bar_Code__C, reSet1[i]);
                //add by rentx 2021-01-27
                ConsumableorderdetailsRecordsdummy.add(new ConsumableorderdetailsInfo(reSet1[i]));
                //不需要展示已到货的明细 update by rentx 20210617 start CHAN-C3K4ZQ
                // ConsumableorderdetailsRecordsdummy.add(new ConsumableorderdetailsInfo(reSet1[i]));
                //不需要展示已到货的明细 update by rentx 20210617 end CHAN-C3K4ZQ
                //if(orderProductArrivedCunMap.containsKey(reSet1[i].Asset_Model_No__c)){
                //   orderProductArrivedCunMap.put(reSet1[i].Asset_Model_No__c,orderProductArrivedCunMap.get(reSet1[i].Asset_Model_No__c)+1);
                //}
            }
        }
        }*/
        ConsumableorderdetailsRecords = new List<ConsumableorderdetailsInfo>();
        BarCodeListP = new List<String>();
        BarCodeListP = ParseBarCode(barcode);
        Consumable_order_details2__c p = new Consumable_order_details2__c();
        List<Consumable_order_details2__c> Ins = New List<Consumable_order_details2__c>();
@@ -351,7 +386,7 @@
            return;
        }
        //对比全部库存中是否存在管理编码一样,barcode号不一样的产品
        reSet1 = [SELECT Id,  Name,TracingCode__c,Bar_Code__c
        reSet1 = [SELECT Id,  Name,TracingCode__c,Bar_Code__c,Report_Product_Expiration__c
                    FROM Consumable_order_details2__c
                    WHERE Dealer_Arrive__c = true
                    AND Dealer_Shipment__c = false
@@ -385,7 +420,7 @@
                        Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
                        Deliver_date__c,Bar_Code__c,Box_Piece__c,
                        Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
                        TracingCode__c
                        TracingCode__c,Report_Product_Expiration__c
                    FROM Consumable_order_details2__c
                    WHERE Bar_Code__c in :BarCodeListP
                    AND Dealer_Info_text__c = :accountName
@@ -451,7 +486,7 @@
                                Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
                                Deliver_date__c,Bar_Code__c,Box_Piece__c,
                                Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c,OwnerId
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c,OwnerId,Report_Product_Expiration__c
                            FROM Consumable_order_details2__c
                            WHERE Dealer_Saled__c = true
                            AND  Dealer_Returned__c = false
@@ -483,7 +518,7 @@
                                Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
                                Deliver_date__c,Bar_Code__c,Box_Piece__c,
                                Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
                            FROM Consumable_order_details2__c
                            WHERE Dealer_Shipment__c = true
                            AND  Dealer_Returned__c = false
@@ -508,7 +543,7 @@
                                Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
                                Deliver_date__c,Bar_Code__c,Lose_Flag__c,Box_Piece__c,
                                Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
                            FROM Consumable_order_details2__c
                            WHERE Dealer_Arrive__c = true
                            AND  Dealer_Returned__c = false
@@ -537,7 +572,7 @@
                                Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
                                Deliver_date__c,Bar_Code__c,Box_Piece__c,
                                Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
                            FROM Consumable_order_details2__c
                            WHERE Dealer_Arrive__c = true
                            AND  Bar_Code__c in :BarCodeListP
@@ -583,6 +618,7 @@
                                //add by rentx 2021-03-22 start
                                ,hospitalSpecialOffer__c
                                ,exchangeOutPattern__c 
                                ,Report_Product_Expiration__c
                                //add by rentx 2021-03-22 end
                            FROM Consumable_order_details2__c
                            WHERE Dealer_Arrive__c = TRUE
@@ -661,8 +697,9 @@
                                //add by rentx 2020-10-13 end
                                //add by rentx 2021-03-22 start
                                if (reSet1[i].Lose_Flag__c == true){
                                    codsIns.exchangeOutPattern__c = reSet1[i].hospitalSpecialOffer__c;
                                // if (reSet1[i].Lose_Flag__c == true){
                                if (reSet1[i].hospitalSpecialOffer__c == true && reSet1[i].SummonsForDirction_det__c == '互相调货'){
                                    codsIns.exchangeOutPattern__c = true;
                                }
                                //add by rentx 2021-03-22 end
@@ -698,7 +735,7 @@
                                //add by rentx 2020-10-13 end   互相调货时,借入方记录SAP合同号
                                ,hospitalSpecialOffer__c
                                ,exchangeOutPattern__c
                                ,Lose_Flag__c
                                ,Lose_Flag__c,Report_Product_Expiration__c
                            FROM Consumable_order_details2__c
                            WHERE Dealer_Arrive__c = FALSE
                            AND  Dealer_Shipment__c= FALSE
@@ -778,8 +815,9 @@
                                //add by rentx 2020-10-13 end   互相调货时,借入方记录SAP合同号
                                //add by rentx 2021-03-22 start
                                if (reSet1[i].Lose_Flag__c == true){
                                    codsIns.exchangeOutPattern__c = reSet1[i].hospitalSpecialOffer__c;
                                // if (reSet1[i].Lose_Flag__c == true){
                                if (reSet1[i].hospitalSpecialOffer__c == true && reSet1[i].SummonsForDirction_det__c == '互相调货'){
                                    codsIns.exchangeOutPattern__c = true;
                                }
                                //add by rentx 2021-03-22 end
@@ -839,6 +877,7 @@
                            // tcm start
                            ,Consumable_order_minor__r.ContractNo__c
                            // tcm end
                            ,Report_Product_Expiration__c
                            //add by rentx 2020-10-14 end
                        FROM Consumable_order_details2__c
                        WHERE Dealer_Arrive__c = FALSE 
@@ -870,6 +909,7 @@
                                // tcm start
                                ,Consumable_order_minor__r.ContractNo__c
                                // tcm end
                                , Report_Product_Expiration__c
                                //add by rentx 2020-10-14 end
                            FROM Consumable_order_details2__c
                            WHERE Dealer_Arrive__c = true
@@ -1075,8 +1115,14 @@
                        }
                        ExistIdMap.put(reSet[i].Bar_Code__c,reSet[i].Bar_Code__c);
                        for(String str : barMcodeMap.keySet()){
                            // BarCode不一致时的警告信息
                            if(reSet[i].Bar_Code__c != str){
                                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,'此管理编码已入库且BarCode不一致,请核对管理编码('+ str +')的入库及库存数据。'));
                            }
                            if(barMcodeMap.get(str) == reSet[i].TracingCode__c){
                                reSet[i].Bar_Code__c = str;
                                //=====================================
                                // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,'入库BarCode('+ str +')和库存条码不一致。'));
                                ExistIdMap.put(str,str);
                            }
                        }
@@ -1088,7 +1134,7 @@
            // CHAN-BD43NK 关闭直接返品功能  追加 barcode不一致判断
            reSet1 = [SELECT Id,Name,TracingCode__c,Bar_Code__c,Sale_orderName__c
            reSet1 = [SELECT Id,Name,TracingCode__c,Bar_Code__c,Sale_orderName__c,Report_Product_Expiration__c
                        FROM Consumable_order_details2__c
                        WHERE Dealer_Arrive__c = true
                        AND (Dealer_Shipment__c = true
@@ -1170,7 +1216,7 @@
                                Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
                                Deliver_date__c,Bar_Code__c,Box_Piece__c,
                                Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
                            FROM Consumable_order_details2__c
                            WHERE Dealer_Arrive__c = FALSE 
                            AND  Dealer_Shipment__c= FALSE
@@ -1197,7 +1243,7 @@
                                Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
                                Deliver_date__c,Bar_Code__c,Box_Piece__c,
                                Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
                            FROM Consumable_order_details2__c
                            WHERE Dealer_Saled__c = true
                            AND  Dealer_Returned__c =false
@@ -1222,7 +1268,7 @@
                                Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
                                Deliver_date__c,Bar_Code__c,Box_Piece__c,
                                Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
                            FROM Consumable_order_details2__c
                            WHERE Dealer_Shipment__c = true
                            AND   Dealer_Returned__c =false
@@ -1247,7 +1293,7 @@
                                Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
                                Deliver_date__c,Bar_Code__c,Lose_Flag__c,Box_Piece__c,
                                Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
                            FROM Consumable_order_details2__c
                            WHERE Dealer_Arrive__c = true
                            AND   Dealer_Returned__c =false
@@ -1275,7 +1321,7 @@
                                Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c,
                                Deliver_date__c,Bar_Code__c,Box_Piece__c,
                                Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c,
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c
                                recordtypeid,Consumable_order_minor__r.Arrive_Order__c,Report_Product_Expiration__c
                            FROM Consumable_order_details2__c
                            WHERE Consumable_order_minor__c != :ESetId
                            AND  Bar_Code__c in :BarCodeListP
@@ -2669,11 +2715,15 @@
    //到货确认
    public PageReference ArriveGoodsConfim() {
        //add by rentx 20210618 start CHAN-C3K4ZQ 跳过不必要的查询
        StaticParameter.ConsumableOrderTrigger = true;
        //add by rentx 20210618 end CHAN-C3K4ZQ 跳过不必要的查询
        cancellationProList = new List<String>();
        List<Consumable_order_details2__c> ins = New List<Consumable_order_details2__c>();
        String resultcheck = '';
        List<String> resultcheckWithoutOrder = new List<String>();
        Savepoint sp = Database.setSavepoint();
        if(ConsumableorderdetailsRecords.size()<1 && consumableInventory.size()<1){
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'不存在到货明细'));
            return null;
@@ -3016,6 +3066,7 @@
                            ,Consumable_order_minor__r.ContractNo__c
                            // tcm end
                            //add by rentx 2020-10-14 end
                            ,Report_Product_Expiration__c
                    FROM    Consumable_order_details2__c
                    WHERE   ((Dealer_Arrive__c = true
                            AND(  Dealer_Shipment__c = true
@@ -3124,6 +3175,7 @@
                             // tcm start
                             ,Consumable_order_minor__r.ContractNo__c
                             // tcm end
                            ,Report_Product_Expiration__c
                            //add by rentx 2020-10-13 end
                    FROM    Consumable_order_details2__c
                    WHERE
@@ -3520,11 +3572,11 @@
                    //add by rentx 2020-10-14 start
                    // retorddetail.ContractNo_text__c         = /*ass.esd.ContractNo__c*/;
                    // tcm start
                    // if (String.isBlank(ass.esd.Consumable_order_minor__r.ContractNo__c)) {
                    //     retorddetail.ContractNo_text__c= ass.esd.ContractNo_text__c;
                    // }else {
                     if (String.isBlank(ass.esd.Consumable_order_minor__r.ContractNo__c)) {
                        retorddetail.ContractNo_text__c= ass.esd.ContractNo_text__c;
                     }else {
                        retorddetail.ContractNo_text__c= ass.esd.Consumable_order_minor__r.ContractNo__c;
                    // }
                     }
                    // tcm end
                    //add by rentx 2020-10-14 end
@@ -3618,7 +3670,10 @@
            }
        }catch(Exception e){
            //Database.rollback(sp);
            ApexPages.addMessages(e);
            throw new ControllerUtil.myException('e::'+e + '  linenumber::'+e.getLineNumber());
            // ApexPages.addMessages(e);
            // ApexPages.addMessages(e.getLineNumber() + '  11111111111111111');
            //return null;
        }
    }
@@ -3661,12 +3716,18 @@
        public Integer intMark { get; set; }
        public Decimal arriveAmount { get; set; }
        public Decimal arrivedCount { get; set; }
        public String ReportProductExpirationDate {get;set;}
        public ConsumableorderdetailsInfo(Consumable_order_details2__c e,string str) {
            esd                = e;
            Prod               = e.Consumable_Product__r;
            oldConsumableCount = e.name;
            ErrorReason        = str;
            intMark = 1;
            if (e.Report_Product_Expiration__c != null) {
                ReportProductExpirationDate = e.Report_Product_Expiration__c.format();
            }
        }
        public ConsumableorderdetailsInfo(Consumable_order_details2__c e) {
            canEdit = false;
@@ -3678,6 +3739,10 @@
            esd                = e;
            Prod               = e.Consumable_Product__r;
            oldConsumableCount = e.name;
            if (e.Report_Product_Expiration__c != null) {
                ReportProductExpirationDate = e.Report_Product_Expiration__c.format();
            }
        }
        public ConsumableorderdetailsInfo(Product2__c e,List<String> barinfoL) {
@@ -3702,6 +3767,10 @@
            }
            serialNoorLotNo = barinfoL[2];
            tracingCodeNo = barinfoL[3];
            if (e.Report_Product_Expiration__c != null) {
                ReportProductExpirationDate = e.Report_Product_Expiration__c.format();
            }
        }
        public ConsumableorderdetailsInfo(Product2__c e) {
            Prod = e;
force-app/main/default/pages/ArriveGoods.page
@@ -33,11 +33,25 @@
    }
}
//用法如下//add by rentx 20210617 start
function cancleKongbai(){
    var aEle=document.getElementById('tableId').getElementsByTagName('td');
    for(var i=0;i<aEle.length;i++){
        if(aEle[i].className=='data2Col' || aEle[i].className=='data2Col last')
        {
            aEle[i].style.display = 'none';
        }
    }
};
//用法如下//add by rentx 20210617 end
window.sfdcPage.appendToOnloadQueue(function() { calonLoad() });
</script>
<apex:form id="allForm">
        <apex:actionFunction name="SearchPro" action="{!SearchPro}" rerender="ConsumableorderdetailsSection,ConsumableorderdetailsSection1,ConsumabledetailsofReturn,productInventorydetails, message,detailsSummary" onComplete="unblockUI();">
        <apex:actionFunction name="SearchPro" action="{!SearchPro}" rerender="ConsumableorderdetailsSection,ConsumableorderdetailsSection1,ConsumabledetailsofReturn,productInventorydetails, message,detailsSummary" onComplete="unblockUI();cancleKongbai();">
        </apex:actionFunction>
        <apex:actionFunction name="ArriveGoodsConfim" action="{!ArriveGoodsConfim}" rerender="ConsumableorderdetailsSection,ConsumableorderdetailsSection1,ConsumabledetailsofReturn,productInventorydetails,message,EDCline_1,orderinfo,messageText" onComplete="unblockUI();">
        </apex:actionFunction>
@@ -154,39 +168,73 @@
                        </apex:pageblocktable>
                    </apex:pageblocksection>
                </apex:pageBlock>
                 <apex:pageBlock title="到货明细" rendered="{!!ReturnFLGbln}">
                     <apex:pageblocksection columns="1" id="ConsumableorderdetailsSection">
                     <!-- //add by rentx CHAN-C3K4ZQ 20210602 start -->
                 <apex:pageBlock title="到货明细" rendered="{!!ReturnFLGbln}" id="ConsumableorderdetailsSection">
                     <!-- <apex:pageblocksection columns="1" id="ConsumableorderdetailsSection">add by rentx CHAN-C3K4ZQ 20210618 -->
                     <table class="list"  border="0" cellpadding="0" cellspacing="0" id="tableId" >
                        <colgroup>
                            <col width="160px"/>
                            <col width="160px"/>
                            <col width="160px"/>
                            <col width="160px"/>
                            <col width="160px"/>
                            <col width="160px"/>
                            <col width="200px"/>
                        </colgroup>
                        <tr class="headerRow">
                            <th width="16%">消耗品名称</th>
                            <th width="16%">规格</th>
                            <th width="16%">CFDA状态</th>
                            <th width="16%">注册证编码号</th>
                            <th width="16%">注册证效期</th>
                            <th width="20%">BarCode</th>
                        </tr>
                        <apex:repeat value="{!ConsumableorderdetailsRecordsview}" var="records" id="ConsumableorderdetailsTableOuter" >
                            <apex:repeat value="{!records}" var="item" id="ConsumableorderdetailsTable">
                                <tr class="dataRow">
                                    <td> {!item.Prod.Name__c} </td>
                                    <td> {!item.esd.ProductPacking_list_manual__c} </td>
                                    <td> {!item.esd.CFDA_Status__c} </td>
                                    <td> {!item.esd.Report_Product_Approbation__c} </td>
                                    <td> {!item.ReportProductExpirationDate} </td>
                                    <td> {!item.esd.Bar_Code__c} </td>
                                </tr>
                            </apex:repeat>
                        </apex:repeat>
                    </table>
                    <!-- add by rentx CHAN-C3K4ZQ 20210618 -->
                     <!-- //add by rentx CHAN-C3K4ZQ 20210602 start 注释by rentx start 20210618 -->
                        <!-- <apex:repeat value="{!ConsumableorderdetailsRecordsview}" var="records" id="ConsumableorderdetailsTableOuter" > -->
                     <!-- //add by rentx CHAN-C3K4ZQ 20210602 end -->
                     <!-- //update by rentx CHAN-C3K4ZQ 20210602 start -->
                            <!-- <apex:pageblocktable value="{!ConsumableorderdetailsRecordsdummy}" var="records" id="ConsumableorderdetailsTable"> -->
                            <apex:pageblocktable value="{!records}" var="records" id="ConsumableorderdetailsTable">
                            <!-- <apex:pageblocktable value="{!records}" var="records" id="ConsumableorderdetailsTable"> -->
                            <!-- <apex:pageblocktable value="{!records}" var="records" id="ConsumableorderdetailsTable"> -->
                     <!-- //update by rentx CHAN-C3K4ZQ 20210602 end -->
                                 <apex:column width="80">
                                     <apex:facet name="header">消耗品名称</apex:facet>
                                     <apex:outputField value="{!records.Prod.Name__c}"/>
                                 </apex:column>
                                 <apex:column width="80" style="text-align: center;">
                                     <apex:facet name="header">规格</apex:facet>
                                     <apex:outputField value="{!records.esd.ProductPacking_list_manual__c}"/>
                                 </apex:column>
                                 <apex:column width="80">
                                     <apex:facet name="header">CFDA状态</apex:facet>
                                     <apex:outputField value="{!records.esd.CFDA_Status__c}"/>
                                 </apex:column>
                                 <apex:column width="80">
                                     <apex:facet name="header">注册证编码号</apex:facet>
                                     <apex:outputField value="{!records.esd.Report_Product_Approbation__c}"/>
                                 </apex:column>
                                 <apex:column width="80">
                                     <apex:facet name="header">注册证效期</apex:facet>
                                     <apex:outputField value="{!records.esd.Report_Product_Expiration__c}"/>
                                 </apex:column>
                                  <apex:column width="80">
                                     <apex:facet name="header">BarCode</apex:facet>
                                     <apex:outputField value="{!records.esd.Bar_Code__c}"/>
                                 </apex:column>
                                 <!-- <apex:column width="80"> -->
                                     <!-- <apex:facet name="header">消耗品名称</apex:facet> -->
                                     <!-- <apex:outputField value="{!records.Prod.Name__c}"/> -->
                                 <!-- </apex:column> -->
                                 <!-- <apex:column width="80" style="text-align: center;"> -->
                                     <!-- <apex:facet name="header">规格</apex:facet> -->
                                     <!-- <apex:outputField value="{!records.esd.ProductPacking_list_manual__c}"/> -->
                                 <!-- </apex:column> -->
                                 <!-- <apex:column width="80"> -->
                                     <!-- <apex:facet name="header">CFDA状态</apex:facet> -->
                                     <!-- <apex:outputField value="{!records.esd.CFDA_Status__c}"/> -->
                                 <!-- </apex:column> -->
                                 <!-- <apex:column width="80"> -->
                                     <!-- <apex:facet name="header">注册证编码号</apex:facet> -->
                                     <!-- <apex:outputField value="{!records.esd.Report_Product_Approbation__c}"/> -->
                                 <!-- </apex:column> -->
                                 <!-- <apex:column width="80"> -->
                                     <!-- <apex:facet name="header">注册证效期</apex:facet> -->
                                     <!-- <apex:outputField value="{!records.esd.Report_Product_Expiration__c}"/> -->
                                 <!-- </apex:column> -->
                                  <!-- <apex:column width="80"> -->
                                     <!-- <apex:facet name="header">BarCode</apex:facet> -->
                                     <!-- <apex:outputField value="{!records.esd.Bar_Code__c}"/> -->
                                 <!-- </apex:column> -->
                                <!-- <apex:column width="80">
                                     <apex:facet name="header">发货日期</apex:facet>
                                     <apex:outputField value="{!records.esd.Deliver_date__c}"/>
@@ -195,9 +243,9 @@
                                     <apex:facet name="header">{!$ObjectType.Consumable_order_details__c.fields.IsArrival__c.label}</apex:facet>
                                     <apex:outputField value="{!records.esd.IsArrival__c}"/>
                                 </apex:column> -->
                            </apex:pageblocktable>
                        </apex:repeat>
                    </apex:pageblocksection>
                            <!-- </apex:pageblocktable> -->
                        <!-- </apex:repeat> -->
                    <!-- </apex:pageblocksection> 注释byrentx end 20210618 end-->
                </apex:pageBlock>
                <apex:pageBlock title="返品明细" rendered="{!ReturnFLGbln}" id="returnTable">