GWY
2022-05-16 a9baff8a4508c1850e650f68831d857b953eace4
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<apex:page controller="DataLoadAccountController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
 
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="/soap/ajax/29.0/connection.js"/>
    <apex:includeScript value="/soap/ajax/29.0/apex.js"/>
 
    <style type="text/css">
 
    </style>
 
    <script type="text/javascript">
 
        function saveJs() {
            blockme();
            save();
        }
        // 关闭导入页面
        function closeJs(){
            window.parent.opener=null;
            window.parent.open('', '_self', ''); 
            setTimeout('window.parent.close()', 10000);
        }
        // 调用父页面的方法刷新父页面
        function refreshPage(){
            window.opener.refreshPage(); 
            window.close();
        }
    </script>
    <apex:form id="allForm">
        <apex:actionFunction name="save" action="{!save}" rerender="allForm" onComplete="unblockUI();refreshPage();closeJs();"></apex:actionFunction>
        <input type="hidden" id="baseUrl" value="{!baseUrl}"/>
        <apex:pageBlock title="客户-市场活动关系" id="allBlock">
            <apex:pageblocksection columns="1" title="客户" id="CampaignRelationship">
                <apex:outputPanel >
                    <DIV style="OVERFLOW-Y: hidden; OVERFLOW-X:auto;width:1260px">
                         
                        <div id="CampaignRelationship:tablediv" style="OVERFLOW-X: hidden; OVERFLOW-Y:auto;width:1800px; height:400px">
 
                            <table id="theTable_header" border="0" style ="width:1800px;text-align: center;"   styleClass="list">
                            <thead>
                                <tr>
 
                                    <td style ="width: 1%;text-align: center" scope="col">No</td>
                                    <!-- 分野 -->
                                    <td style ="width: 2%;text-align: center" scope="col">分野</td>
                                    <!-- 客户 -->
                                    <td style ="width: 10%;text-align: center" scope="col">客户</td>
                                    <!-- 部门名称 -->
                                    <td style ="width: 5%;text-align: center" scope="col">部门名称.</td>
                                    <!-- 审批人 -->
                                    <td style ="width: 3%;;text-align: center" scope="col">审批人</td>
                                    <!-- 省 -->
                                    <td style ="width: 3%;text-align: center" scope="col">省</td>
                                    <!-- 城市 -->
                                    <td style ="width: 3%;text-align: center" scope="col">城市</td>
                                    <!-- 客户地址1 -->
                                    <td style ="width: 10%;text-align: center" scope="col">客户地址1 </td>
                                    <!-- 邮编 -->
                                    <td style ="width: 5%;text-align: center" scope="col">邮编</td>
                                    <!-- Sub Use -->
                                    <td style ="width: 5%;text-align: center" scope="col">Sub Use</td>
 
                                    
                                    <!-- 带教时长 -->
                                    <!-- 带教者意见建议 -->
                                    <td style ="width: 8%;text-align: center" scope="col">英文名称.</td>
                                    <!-- 被带教者反馈 -->
                                    <td style ="width: 4%;text-align: center" scope="col">客户来源. </td>
                                    <!-- 备注 -->
                                    <td style ="width: 5%;text-align: center" scope="col">用户属性</td>
                                    <td style ="width: 5%;text-align: center" scope="col">客户类型</td>
                                    <td style ="width: 5%;text-align: center" scope="col">备注</td>
                                    <td style ="width: 3%;text-align: center" scope="col">姓氏</td>
                                    <td style ="width: 10%;text-align: center" scope="col">联系人地址1.</td>
                                    <td style ="width: 5%;text-align: center" scope="col">手机.</td>
                                    <td style ="width: 3%;text-align: center" scope="col">邮政编码.</td>
                                    <td style ="width: 5%;text-align: center" scope="col">备注</td>
 
                                </tr>
                            </thead>
                        </table>
                            <apex:dataTable value="{!ACInfoList}"  var="acInfo" id="theTable_content" border="0" 
                            style="width:1800px;border-bottom-width: 0px; font-size:11px; border-spacing:0;text-align: center;" styleClass="list"> 
                                 <apex:column style="width: 1%">
                                    <apex:outputText value="{!acInfo.lineNo}" style="resize:vertical;width: 95%"/>
                                </apex:column>
                                 <apex:column style="width: 2%">
                                    <apex:outputField value="{!acInfo.accountpage.ProductSegment__c}" style="resize:vertical;width: 95%"/>
                                </apex:column>
                                <apex:column style="width: 10%">
                                    <!-- <apex:outputField value="{!acInfo.accountpage.FacilityNameD__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.accountpage.FacilityNameD__c}"/>
                                </apex:column>
                                <apex:column style="width: 5%">
                                    <!-- <apex:outputField value="{!acInfo.accountpage.DivisionName_D__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.accountpage.DivisionName_D__c}"/>
                                </apex:column>
                                <apex:column style="width: 3%">
                                    <apex:outputField value="{!acInfo.accountpage.DealerSelectOwner__c}" style="resize:vertical;width: 95%"/>
                                    <!-- <c:PDFWbr targetStr="{!acInfo.accountpage.DealerSelectOwner__r.Name}"/> -->
                                </apex:column>
                                <apex:column style="width: 3%">
                                    <!-- <apex:outputField value="{!acInfo.accountpage.Province__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.accountpage.Province__c}"/>
                                </apex:column>
                                <apex:column style="width: 3%">
                                    <!-- <apex:outputField value="{!acInfo.accountpage.CityD__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.accountpage.CityD__c}"/>
                                </apex:column>
                                <apex:column style="width: 10%">
                                    <!-- <apex:outputField value="{!acInfo.accountpage.Address1D__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.accountpage.Address1D__c}"/>
                                </apex:column>
                                <apex:column style="width: 5%">
                                    <!-- <apex:outputField value="{!acInfo.accountpage.PostCodeD__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.accountpage.PostCodeD__c}"/>
                                </apex:column>
                                <apex:column style="width: 5%">
                                    <!-- <apex:outputField value="{!acInfo.accountpage.Sub_UseD__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.accountpage.Sub_UseD__c}"/>
                                </apex:column>
                                <apex:column style="width: 8%">
                                    <!-- <apex:outputField value="{!acInfo.accountpage.EnglishNameD__c}"  style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.accountpage.EnglishNameD__c}"/>
                                </apex:column>
                                <apex:column style="width: 4%">
                                    <!-- <apex:outputField value="{!acInfo.accountpage.CustomerSource__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.accountpage.CustomerSource__c}"/>
                                </apex:column>
                                <apex:column style="width: 5%">
                                    <!-- <apex:outputField value="{!acInfo.accountpage.UserType__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.accountpage.UserType__c}"/>
                                </apex:column>
                                <apex:column style="width: 5%">
                                    <!-- <apex:outputField value="{!acInfo.accountpage.TargetCustomer__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.accountpage.TargetCustomer__c}"/>
                                </apex:column>
                                <apex:column style="width: 5%">
                                    <!-- <apex:outputField value="{!acInfo.accountpage.Remark__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.accountpage.Remark__c}"/>
                                </apex:column>
                                <apex:column style="width: 3%">
                                    <!-- <apex:outputField value="{!acInfo.contactpage.LastName}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.contactpage.LastName}"/>
                                </apex:column>
                                <apex:column style="width: 10%">
                                    <!-- <apex:outputField value="{!acInfo.contactpage.Address1D__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.contactpage.Address1D__c}"/>
                                </apex:column>
                                <apex:column style="width: 5%">
                                    <!-- <apex:outputField value="{!acInfo.contactpage.MobilePhoneD__c}"  style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.contactpage.MobilePhoneD__c}"/>
                                </apex:column>
                                <apex:column style="width: 4%">
                                    <!-- <apex:outputField value="{!acInfo.contactpage.PostcodeD__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.contactpage.PostcodeD__c}"/>
                                </apex:column>
                                <apex:column style="width: 5%">
                                    <!-- <td style ="width: 5%" scope="col">联系人备注</td> -->
                                    <!-- <apex:outputField value="{!acInfo.contactpage.Remark__c}" style="resize:vertical;width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!acInfo.contactpage.Remark__c}"/>
                                </apex:column>
                            </apex:dataTable>
 
                         </div>
                    </DIV>
                </apex:outputPanel>
                
            </apex:pageblocksection>
        </apex:pageBlock>
        <!-- <apex:commandButton action="{!save}"  value="保存" style="width: 70px;" oncomplete="unblockUI();"></apex:commandButton> -->
        <apex:commandButton onclick="saveJs();return false;"   value="保存" style="width: 70px;" oncomplete="unblockUI();"></apex:commandButton>
    </apex:form>
    <apex:form id="fileForm">
        <apex:outputPanel rendered="{!errorflag}" layout="none">
            <table width="100%">
                <tr>
                    <!-- <apex:messages styleClass="editListError" /> -->
                    <apex:messages />
                </tr>
            </table>
        </apex:outputPanel>
        <table border="0">
            <tr>
                <th>客户导入:</th>
                <th>1.<apex:inputFile value="{!contentFile}" filename="{!nameFile}"/></th>
            </tr>
            <tr>
                <th>&nbsp;</th>
                <th>2.&nbsp;<apex:commandButton action="{!csvRead}" value="读取CSV" /></th>
            </tr>
            
        </table>
    </apex:form>
</apex:page>