buli
2023-07-14 e6068da47c1bef5517c9e5fdc8c726766867ad4e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<apex:page id="Page" controller="LostByCompany" action="{!search}" sidebar="false" showHeader="false" >
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <script>
        function setProductOne(i,lineNo){
            debugger
            var result_name = j$(escapeVfId("Page:mainForm:j_id10:"+ i +":result_name")).text();
            
            // window.opener.j$(escapeVfId("allPage:allForm:allBlock:EditPage:LostBrands:"+lineNo+":LostBrand:productTable:0:LostBrandName_1")).val(result_name);
            var queryCopy = '{!queryCopy}';
            if(!queryCopy || queryCopy!=result_name){
                window.opener.j$(escapeVfId("allPage:allForm:allBlock:EditPage:LostBrands:"+lineNo+":LostBrand:BrandContent:Lost_By_CompanyOut:Lost_By_Company")).val(result_name);
                window.opener.j$(escapeVfId("allPage:allForm:allBlock:EditPage:LostBrands:"+lineNo+":LostBrand:BrandContent:AgencyMannualOut1:Lost_By_Company_Hidden")).val(result_name);
                window.opener.setLostTotalAmount();
                window.opener.setBrandName(lineNo);
            }
            top.window.close();
        }
        function searchOneJs(){
            debugger
            var SearchName = j$(escapeVfId("Page:mainForm:searchName")).val();
            searchOne(SearchName);
        }
    </script>
    <apex:form id="mainForm">
    <apex:actionFunction name="searchOne" action="{!searchOne}" oncomplete="unblockUI();" rerender="allForm">
        <apex:param assignTo="{!SearchName}" name="SearchName" value="" />
    </apex:actionFunction>
        <table width="330" border="0" style="background-color:#DCDCDC">
            <tr>
                <td><apex:inputText id="searchName" value="{!SearchName}" style="width:200px" required="false"/></td>
                <td><apex:commandButton value="{!$Label.Search}" onclick="searchOneJs()" action="{!searchOne}" style="width:100px" /></td>
            </tr>
        </table>
        <table width="330" border="1" cellspacing="0" >
            <apex:repeat value="{!results}" var="result" >
                <tr>
                    <td>
                        <!-- <span class="result_name">{!result}</span><br/><span class="result_id" style="display:none">{!result}</span><br/> -->
                        <apex:outputLink id="result_name" value="{!result.retvalue}" onclick="setProductOne('{!result.idx}','{!lineNo}');return false;">{!result.retvalue}</apex:outputLink>
                    </td>
                </tr>
            </apex:repeat>
        </table>
        
    </apex:form>
    
</apex:page>