高章伟
2022-03-18 4bfe21c4b5ddc089ae5a95f4b10f6cff148b690d
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<apex:page id="Page" Controller="TenderDeleteController" showheader="false" sidebar="false" action="{!init}">
<head>
    <title>关联招投标</title>
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.AccessorySelectCss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
    <script>
        // function AddTenInfoJs(TenId) {
        //     blockme();
        //     AddTenInfo(TenId);
        // }
        function chooseTenSaveJs(){
            var RetTen = j$(escapeVfId('Page:allForm:chooseTen:RetTen')).value();
            if(RetTen){
                blockme();
                saveTenInfo();
                
                // CloseJs();
            }else{
                alert('保留的招投标:必填!');
            }
        }
        function CloseJs() {
        var RetTen = j$(escapeVfId('Page:allForm:chooseTen:RetTen')).value();
        // body...
        // var saveErrorflag = j$(escapeVfId('saveErrorflag')).value();
        // alert(saveErrorflag);
        if(RetTen){
            // window.opener.top.location.href = '/{!TenInfo.id}';
            // window.opener.top.location.reload();
            // window.opener.top.location.href = '/{!TenInfo.id}';
            // window.opener.parent location.href="/"+"{!TenInfo.id}";
            alert('保存成功');
            window.opener.parent.location.href = '/{!TenInfo.id}';
            window.close();
 
            //window.opener.location.reload();  //20211111 lt add
            //window.parent.location.reload();  //20211111 lt add
 
            unblockUI();
        }
        // else{
        //     unblockUI();
        // }
        }
 
    </script>
 
</head>
 
<body>
    <apex:form id="allForm">
        <apex:actionFunction name="saveTenInfo" action="{!saveTenInfo}" rerender="allForm">
        </apex:actionFunction>
        <input type="hidden" value="{!saveErrorflag}" id="saveErrorflag"/>
         <apex:outputPanel id="allPanel">
 
            <!-- <span style="font-size: 18px;"> 删除成功 </span><br/> -->
 
            <apex:pageBlock id="chooseTen" title="选择招投标">
                <apex:pageBlockButtons location="top">
                    <apex:commandButton onclick="chooseTenSaveJs();" value="保存" oncomplete="CloseJs();"/>
                </apex:pageBlockButtons>
                <table class="edittable" border="0" style="border-collapse: collapse; width:300px; table-layout:fixed;">
                    <tr>
                        <td>{!$ObjectType.Tender_information__c.fields.Retain_Tender__c.Label}:</td>
                        <td><apex:inputField id="RetTen" value="{!TenInfo.Retain_Tender__c}" style="width: 90%"/></td>
                    </tr>
                </table>
            </apex:pageBlock>
 
 
            <!-- <apex:pageBlock id="searchTen" title="检索条件">
                <table>
                    <tr>
                        <td align="right">{!$ObjectType.Tender_information__c.fields.ProjectId__c.Label}:</td>
                        <td style="text-align:left; width:70px;" colspan = "3">
                             <apex:inputText value="{!inputTenId}"/>
                        </td>
                        
                        <td align="right" rowspan = "3"><apex:commandButton value="检索" style="width: 100px;" onclick="searchTenderJs();return false;" /></td>
                    </tr>
                </table>
            </apex:pageBlock>
 
            <apex:pageBlock id="listBlock" title="检索结果">
                <table class="list" border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                    <tr class="headerRow">
                        <th>操作</th>
                        <th>{!$ObjectType.Tender_information__c.fields.InfoTitle__c.Label}</th>
                        <th>项目Id</th>
                    </tr>
                    <apex:repeat value="{!TenInfoList}" var="records" id="TenInfoList">
                        <tr class="dataRow">
 
                             <td class="dataCell">
                                <apex:outputField value="{!records.Ten.InfoTitle__c}"/>
                            </td>
                            <td class="dataCell">
                                <apex:outputField value="{!records.Ten.ProjectId__c}"/>
                            </td>
                            
                            
                        </tr>
                    </apex:repeat>
                </table>
            </apex:pageBlock> -->
        </apex:outputPanel>
    </apex:form>
</body>
</apex:page>