buli
2022-05-09 0953b3b5fcf19c627c6479a6b86648df653c40db
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<apex:page id="page" Controller="SearchManagementController" sidebar="false" showHeader="false" action="{!init}">
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
    <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
 
    <script>
        function doSearch() {
            blockme();
            serUserFaultInfo();
        }
 
        function saveJS() {
            blockme();
            save();
        }
 
        // 关闭导入页面
        function closeJs(){
            window.parent.opener=null;
            window.parent.open('', '_self', ''); 
            setTimeout('window.parent.close()', 10000);
        }
        // 调用父页面的方法刷新父页面
        function refreshPage(){
            // alert('test');
            var ErrorNum = j$(escapeVfId("ErrorNum")).value();
            if (parseInt(ErrorNum) != 1) {
                //alert(parseInt(ErrorNum));
                return;
            }
            var fromUserFaultInfoId = j$(escapeVfId("fromUserFaultInfoId")).value();
            var lineno = j$(escapeVfId("lineno")).value();
 
            // alert(fromUserFaultInfoId);
            // alert(lineno);
            // 
            window.opener.refreshPage(fromUserFaultInfoId,lineno); 
            window.close();
        }
    </script>
 
    <style type="text/css">
        div#iframelike {
            color : #fff;
            height : 300px;
            overflow-y : auto;
            overflow-x : hidden;
        }
    </style> 
 
    <apex:outputPanel id="all">
        <apex:outputPanel id="message1">
            <apex:messages styleClass="editListError"/>
        </apex:outputPanel>
        <apex:form id="mainForm">
            <apex:actionFunction action="{!serUserFaultInfo}" name="serUserFaultInfo" reRender="mainForm,message1" oncomplete="unblockUI();"/>
            <apex:actionFunction action="{!save}" name="save" reRender="mainForm,message1" oncomplete="unblockUI();refreshPage();closeJs();"/>
            <input type="hidden" id="ErrorNum" value="{!ErrorNum}"/>
            <input type="hidden" id="fromUserFaultInfoId" value="{!fromUserFaultInfoId}"/>
            <input type="hidden" id="lineno" value="{!lineno}"/>
            <!-- <input type="hidden" id="specialDealer" value="{!specialDealer}"/> -->
            <!-- <input type="hidden" id="businessActivityId" value="{!businessActivityId}"/> -->
            <apex:pageBlock id="idSearchSetProdcut" title="{!$Label.Product_Search}">
                <table width="900" border="0" style="background-color:#DCDCDC">
                    <colgroup>
                        <col width="12"/>
                        <col width="20"/>
                        <col width="20"/>
                        <col width="100"/>
                        <col width="20"/>
                        <col width="100"/>
                        <col width="100"/>
                        <col width="120"/>
                        <col width="208"/>
                    </colgroup>
                    <tr>
                        <td> </td>
                        <th></th><!-- {!$Label.Search_Condition} -->
                        <td> </td>
                        <td>{!$Label.Management_Code}</td>
                        <td> </td>
                        <td>{!$Label.OperatingHours}</td>
                        <td> {!$ObjectType.BusinessActivity__c.fields.BusinessAAccount__c.label}</td>
                        <td> </td>
                        <td></td>  
                    </tr>
                    <tr>
                        <td> </td>
                        <td> </td>
                        <td> </td>
                        <td>
                            <apex:inputText id="searchManagementCode" value="{!searchManagementCode}" style="width:100px" required="false"/>
                        </td>
                        <td> </td>
                        <td>
                            <apex:inputField id="UserFaultInfoReportDate" value="{!UserFaultInfo.UserFaultInfoReportDate__c}" style="width:100" required="false"/>
                        </td>
                        <td>
                            <apex:inputField id="searchAccount" value="{!UserFaultInfo.UFAccount__c }" style="width:200px" required="false"/>
                        </td>
                        <td><apex:commandButton value="{!$Label.Search}" onclick="doSearch();return false;" style="width:100px"/>
                        </td>
                        <td><apex:commandButton value="保存" onclick="saveJS();return false;" style="width:100px"/>
                        </td>
                    </tr>
                    <tr>
                        <td style="border-bottom: 1px solid #888;" colspan="15"></td>
                    </tr>
                </table>
                <table width="900" border="0" style="background-color:#DCDCDC">
                    <tr>
                        <td width="12"></td>
                        <th valign="top">{!$Label.Search_Result}</th>
                        <td width="20"></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td width="12"></td>
                        <td>
                            <table border="0" style="background-color:#DCDCDC">
                                    <tr>
                                        <td width="12"></td>
                                        <td>
                                            <div id="iframelike" style="width:800px">
                                                <apex:pageBlockTable id="UserFaultInfoList" value="{!UserFaultInfoList}" var="UserFaultInfo" border="1" columns="7" columnsWidth="5px,50px,125px,90px,95px,130,210px">
                                                    
                                                    <apex:column >
                                                        <apex:outputText style="display: none;" id="hidId" value="{!UserFaultInfo.Id}"/>
                                                        
                                                        <apex:facet name="header">&nbsp;&nbsp;</apex:facet>
                                                        <apex:inputCheckbox value="{!UserFaultInfo.UserFaultInfoBeSelected__c}" style="width:10px;"/>
                                                    </apex:column>
 
                                                    <apex:column >
                                                        <apex:facet name="header">{!$ObjectType.User_FaultInfo__c.fields.UFManagementCode__c.label}</apex:facet>
                                                        <apex:outputField id="UFManagementCode" value="{!UserFaultInfo.UFManagementCode__c}" />
                                                    </apex:column> 
 
                                                   
                                                     <apex:column >
                                                        <apex:facet name="header">用户单位名称</apex:facet>
                                                        <apex:outputField id="UserFaultInfoCustomerUnit__c" value="{!UserFaultInfo.UserFaultInfoCustomerUnit__c}" />
                                                    
                                                    </apex:column> 
                                                     <apex:column >
                                                        <apex:facet name="header">机型</apex:facet>
                                                        <apex:outputField id="UserFaultInfoModel__c" value="{!UserFaultInfo.UserFaultInfoModel__c}" />
                                                    
                                                    </apex:column> 
                                                     <apex:column >
                                                        <apex:facet name="header">故障内容</apex:facet>
                                                        <apex:outputField id="UFFaultContent__c" value="{!UserFaultInfo.UFFaultContent__c}" />
                                                    
                                                    </apex:column> 
                                                     <apex:column >
                                                        <apex:facet name="header">{!$ObjectType.User_FaultInfo__c.fields.UserFaultInfoServiceContent__c.label}</apex:facet>
                                                        <apex:outputField id="BusinessAServiceContent" value="{!UserFaultInfo.UserFaultInfoServiceContent__c}" />
                                                    
                                                    </apex:column> 
 
                                                </apex:pageBlockTable>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        <td width="20"></td>
                        <td></td>
                    </tr>
                </table>
            </apex:pageBlock>
 
        </apex:form>
    </apex:outputPanel>
 
</apex:page>