From 8ce78fa756a8c2af76d02858d09058beabe18161 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期四, 17 三月 2022 22:07:16 +0800
Subject: [PATCH] PIPLFunctionDeployV4

---
 force-app/main/default/pages/NewConsumApplyEquipmentSetDetail.page |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/pages/NewConsumApplyEquipmentSetDetail.page b/force-app/main/default/pages/NewConsumApplyEquipmentSetDetail.page
index 6f234b4..fd1e7f5 100644
--- a/force-app/main/default/pages/NewConsumApplyEquipmentSetDetail.page
+++ b/force-app/main/default/pages/NewConsumApplyEquipmentSetDetail.page
@@ -294,6 +294,37 @@
                         QueryConsumApplyFromAWS();
                     };
                     document.querySelector("[data-id='OwnerId']").classList.add("disabledbutton");
+
+                    jQuery(".lookupInput").each(function(i,e){
+                        let je =jQuery(e).find('input');
+                        je.attr("readonly","");
+                        je.css("background","unset");
+                        
+                        let dataid = je.attr('data-id');
+                        if(['Hospital_Name__c','Department_Class__c','OwnerId'].indexOf(dataid) > -1) return;
+                        jQuery(e).children(":last-child").before('<img class="closeIcon" data-id="'+dataid+'" generate="" alt="Clear" src="/s.gif" style="display: inline-block;">');
+                    })
+                    
+                    jQuery(".lookupInput").on("mouseenter","img[generate]",function(e){
+                        this.className = "closeIconOn";
+                    });
+                    
+                    jQuery(".lookupInput").on("mouseleave","img[generate]",function(e){
+                        this.className = "closeIcon"
+                    });
+                    
+                    jQuery(".lookupInput").on("click","img[generate]",function(e){
+                        let id = jQuery("input[data-id='"+jQuery(this).attr("data-id")+ "']").attr("id");
+                        let input = document.getElementById(id);
+                        if(input){
+                            input.value = '';
+                            let hidden = document.getElementById(id+'_lkid');
+                            if(hidden){
+                                hidden.value = '';
+                            }
+                        }
+                    });
+
                 });
             </script>
             <div class="pbBottomButtons">

--
Gitblit v1.9.1