CB2-20200827ONU\Administrator
2021-10-08 d789099e9dc45e7fa3ee0eb73ee97f80b1963466
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CorporateClientsList.aspx.cs" Inherits="CY.WebForm.Pages.business.CorporateClientsList" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>合作客户管理</title>
    <uc:CMSHead ID="CMSHead1" runat="server" />
    <style type="text/css">
        .tableStyle th {
            padding: 1px;
        }
 
        .tableStyle td {
            padding: 1px;
        }
    </style>
    <script type="text/javascript">
        ///添加
        function addModel() {
            top.Dialog.open({ URL: "/Pages/business/CorporateClientsEdit.aspx", Title: "新增客户", Width: 900, Height: 750 });
        }
 
        //查看
        function onView(keyid) {
            top.Dialog.open({ URL: "/Pages/business/CorporateClientsDetail.aspx?Keyid=" + keyid, Title: "查看客户", Width: 900, Height: 750 });
        }
        //查看
        function onViewWeihu(keyid) {
            top.Dialog.open({ URL: "/Pages/business/CorporateClientsVisit.aspx?Keyid=" + keyid, Title: "查看客户维护记录", Width: 900, Height: 750 });
        }
 
        //修改
        function onEdit(keyid) {
            top.Dialog.open({ URL: "/Pages/business/CorporateClientsEdit.aspx?Keyid=" + keyid, Title: "修改客户", Width: 900, Height: 750 });
        }
 
        //删除
        function onDelete(keyid) {
            top.Dialog.confirm("确定要删除该客户吗?", function () {
                window.location = "/Pages/business/CorporateClientsList.aspx?delete=" + keyid;
            });
        }
 
        //订单关联
        function onChange(keyid) {
            top.Dialog.confirm("确认向此客户开通订单关联吗?", function () {
                $.ajax({
                    url: "/Pages/common/CommonAjax.aspx?data=" + (new Date()).valueOf(),
                    type: "POST",
                    dataType: "html",
                    data: { customchangetype: "customchangetype", keyid: keyid },
                    global: false,
                    cache: false,
                    async: false,
                    success: function (data) {
                        alertMsg(data);
                        window.location = "/Pages/business/CorporateClientsList.aspx";
                    }
                });
            });
        }
 
        //设置询价参数
        function SetInquiryPar(keyid) {
            window.location.href = "/Pages/sysInquiry/InquiryParameterList.aspx?CustomerId=" + keyid;
        }
 
        //合并客户
        function mergerModel() {
            var keyid = "";
            var num = 0;
            $(".SelectCheck:checked").each(function (ii, vv) {
                keyid = keyid + "|" + $(vv).attr("value_kid");
                num++;
            });
            if (num == 0)
                alertMsg("未选中任何客户");
            else if (num != 2)
                alertMsg("单次合并只能选择两个客户");
            else
                top.Dialog.open({ URL: "/Pages/business/CorporateClientsMerger.aspx?Keyid=" + keyid, Title: "合并客户", Width: 500, Height: 300, Modal: false });
        }
 
        //维护
        function onViewuplod(keyid) {
        
            top.Dialog.open({ URL: "/Pages/business/CorporateClientsUpLoadContract.aspx?Keyid=" + keyid, Title: "查看合同", Width: 900, Height: 750 });
        }
    </script>
    <script type="text/javascript">
        $(function () {
            $("#selOrderMoney").change(function () {
                $("#txtOrderMoney").val("");
            });
            $("#selLastOrderTime").change(function () {
                $("#txtLastOrderTime").val("");
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server" class="form">
        <div id="scrollContent">
            <div class="box1" paneltitle="功能面板" roller="false">
                <table class="TableNewStyle" width="100%">
                    <tr>
                        <td class="ali03">建档时间:
                        </td>
                        <td>
                            <input id="txtRegTimeStart" type="text" class="date w90px" datefmt="yyyy-MM-dd" runat="server" />-<input id="txtRegTimeEnd" type="text" class="date w90px" datefmt="yyyy-MM-dd" runat="server" />
                        </td>
                        <td class="ali03">客户编号:
                        </td>
                        <td>
                            <input type="text" runat="server" id="txtUserNum" />
                        </td>
                        <td class="ali03">客户名称:
                        </td>
                        <td>
                            <input type="text" runat="server" id="txtquery_userName" />
                        </td>
                        <td class="ali03">客户来源:
                        </td>
                        <td>
                            <select id="selSourcesInfoId" runat="server" datatextfield="Name" datavaluefield="Keyid" keepdefaultstyle='true'>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td class="ali03 ">客户类型:
                        </td>
                        <td>
                            <select id="selCustomerTypeId" runat="server" datatextfield="Name" datavaluefield="Keyid" keepdefaultstyle='true'>
                            </select>
                        </td>
                        <td class="ali03">所属行业:
                        </td>
                        <td>
                            <select id="selCustomerIndustriesId" runat="server" datatextfield="Name" datavaluefield="Keyid" keepdefaultstyle='true'>
                            </select>
                        </td>
                        <td class="ali03 ">客户级别:
                        </td>
                        <td>
                            <select id="selDegreeImportanId" runat="server" datatextfield="Name" datavaluefield="Keyid" keepdefaultstyle='true'>
                            </select>
                        </td>
                        <td class="ali03 ">客户信誉:
                        </td>
                        <td>
                            <select id="selTurnoverIntentionId" runat="server" datatextfield="Name" datavaluefield="Keyid" keepdefaultstyle='true'>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td class="ali03">所在区域:
                        </td>
                        <td>
                            <asp:DropDownList ID="selectProvince" runat="server" keepDefaultStyle="true" AutoPostBack="true" OnSelectedIndexChanged="ChangeProvince" Width="70px">
                            </asp:DropDownList>
                            <asp:DropDownList ID="selectCity" runat="server" keepDefaultStyle="true" AutoPostBack="true" OnSelectedIndexChanged="ChangeCity" Width="70px">
                            </asp:DropDownList>
                            <asp:DropDownList ID="selectCounty" runat="server" keepDefaultStyle="true" AutoPostBack="false" Width="70px">
                            </asp:DropDownList>
                        </td>
                        <td class="ali03 ">业务经理:
                        </td>
                        <td>
                            <select id="selBusinessManagerId" runat="server" keepdefaultstyle='true'>
                                <option value="">全部</option>
                            </select>
                        </td>
                        <td class="ali03 ">客户经理:
                        </td>
                        <td>
                            <select id="selAccountManagerId" runat="server" keepdefaultstyle='true'>
                                <option value="">全部</option>
                            </select>
                        </td>
                        <td class="ali03">下单数量:
                        </td>
                        <td>
                            <select id="selOrderCount" keepdefaultstyle="true" runat="server" style="width: 74px">
                                <option selected="selected" value="">全部</option>
                                <option value="&gt;=">>=</option>
                                <option value="&lt;="><=</option>
                            </select>
                            <input type="text" class="w40px" runat="server" id="txtOrderCount" />
                        </td>
                    </tr>
                    <tr>
                        <td class="ali03">下单产值:
                        </td>
                        <td>
                            <select id="selOrderMoney" runat="server" keepdefaultstyle="true" style="width: 74px">
                                <option selected="selected" value="">全部</option>
                                <option value="&gt;=">>=</option>
                                <option value="&lt;="><=</option>
                            </select>
                            <input type="text" class="w40px" runat="server" id="txtOrderMoney" />
                        </td>
                        <td class="ali03">未下单时间(天):
                        </td>
                        <td>
                            <select id="selLastOrderTime" runat="server" style="width: 74px" keepdefaultstyle="true">
                                <option selected="selected" value="">全部</option>
                                <option value="&gt;=">>=</option>
                                <option value="&lt;="><=</option>
                            </select>
                            <input type="text" class="w40px" runat="server" id="txtLastOrderTime" />
                        </td>
                        <td class="ali03 ">是否完结:
                        </td>
                        <td>
                            <select id="selShifouwanjie" runat="server" keepdefaultstyle='true'>
                                <option value="">未完结</option>
                            </select>
                        </td>
                        <td class="ali03" colspan="3">&nbsp;</td>
                        <td>
                            <asp:Button CssClass="button" ID="btn_Search" Text="查询" runat="server" padding="0px" OnClick="btn_Search_Click" />
                            <input type="button" onclick="resetSearch()" value="重置" />
                        </td>
                    </tr>
                </table>
            </div>
            <div class="box_tool_min ">
                <div class="center">
                    <div class="left">
                        <div class="padding_top5 padding_left10">
                            <a href="javascript:;" onclick="addModel()" menu_member_case_id="case_addCorporateClients" menu_member_case_name="新增客户"><span class="icon_add">新增客户</span></a>
                            <div class="box_tool_line">
                            </div>
                            <a href="javascript:;" onclick="mergerModel()" menu_member_case_id="case_megarCorporateClients" menu_member_case_name="合并客户"><span class="icon_add">合并客户</span></a> <span style="padding-left: 5px; color: #999;">(绿色字样客户为线上客户,黑色字样客户为线下客户)</span>
                            <div class="clear">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
            <div>
                <asp:Repeater ID="RepClientList" runat="server">
                    <HeaderTemplate>
                        <table class="tableStyle" useclick="false" usecheckbox="true" sortmode="true" style="text-align: center;">
                            <tr>
                                <th width="25"></th>
                                <th style="text-align: center;">编号
                                </th>
                                <th style="text-align: center;">建档时间
                                </th>
                                <th style="text-align: center;">到期时间
                                </th>
                                <th style="text-align: center;">所在区域
                                </th>
                                <th style="text-align: center;">名称
                                </th>
                                <%--     <th style="text-align: center;">
                                信誉
                            </th>--%>
                                <th style="text-align: center;">联系人
                                </th>
                                <th style="text-align: center;">联系手机
                                </th>
                                <%--   <th style="text-align: center;" class="case_email">
                                电子邮箱
                            </th>--%>
                                <th style="text-align: center;">客户级别
                                </th>
                                <th style="text-align: center;">预付款余额
                                </th>
                                <%-- <th style="text-align: center;">
                                授信额度
                            </th>--%>
                                <th style="text-align: center;">下单数量
                                </th>
                                 <th style="text-align: center;">应收款订单
                                </th>
                                <th style="text-align: center;">下单产值
                                </th>
                                <th style="text-align: center;">未下单金额
                                </th>
                                <th style="text-align: center;">完结状态
                                </th>
                                <th>操作
                                </th>
                            </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td>
                                <input type="checkbox" class="SelectCheck" value_mobile="<%#Eval("Mobile")%>" value_email="<%#Eval("Email")%>" value_cid="<%#Eval("CustomerId")%>" value_kid="<%#Eval("Keyid")%>" />
                            </td>
                            <td>
                                <%#Eval("CustomerId")%>
                            </td>
                            <td>
                                <%# Eval("CreateTime", "{0:yyyy-MM-dd}")                                      %>
                            </td>
                            <td>
                                
                                <%#Eval("Expiretype")!=null&&Eval("Expiretype").ToString()=="2"? "金额执行完毕" :    Eval("ExpireTime", "{0:yyyy-MM-dd}")%>
                            </td>
 
                            <td>
                                <%#Eval("City").ToString().IndexOf("其他") >= 0 ? Eval("Province") : Eval("City")%><%#Eval("County")%>
                            </td>
                            <td>
                                <a class="a_under" style="color: <%#Eval("Keyid").ToString() == Eval("MemberId").ToString() ? "" : "green"%>;" href="/Pages/financial/OrderFinancial.aspx?customeid=<%#Eval("MemberId")%>" title="点击查看订单记录">
                                    <%#Eval("CompanyName")%></a>
                            </td>
                            <%--  <td>
                            <%#Eval("CreditIdName")%>
                        </td>--%>
                            <td>
                                <%#Eval("BusinessManagers")%>
                            </td>
                            <td>
                                <%#Eval("Mobile")%>
                            </td>
                            <%-- <td class="case_email">
                            <%#Eval("Email")%>
                        </td>--%>
                            <td>
                                <%#Eval("DegreeImportanIdName")%>
                            </td>
                            <td class="green">
                                <%#Eval("Prepayments", "{0:F2}")%>
                            </td>
                            <%-- <td>
                            <%#Eval("Credit", "{0:F2}")%>
                        </td>--%>
                            <td>
                                <%#Eval("OrderCount")%>
                            </td>
 
                             <td>
                                   <a class="a_under" style="color: <%#Eval("Keyid").ToString() == Eval("MemberId").ToString() ? "" : "green"%>;" href="/Pages/financial/OrderFinancial.aspx?customeid=<%#Eval("MemberId")%>" title="点击查看订单记录">
                                    <%#Eval("NoOverOderCount")%></a>
                                
                            </td>
 
                            <td>
                                <%#Eval("OrderMoney", "{0:F2}")%>
                            </td>
                               <td  > 
                                <%#Eval("Contractmoney","{0:F2}").ToString()=="0.00"||Eval("Contractmoney","{0:F2}").ToString()=="" ?"未设置合同金额"  : Eval("LessOrderMoneyProperty","{0:F2}")%>
                            </td>
                            <td>
                                <%#Eval("ShifouwanjieName")%>
                            </td>
                            <td style="text-align: left;" class="Operate">
                                <span onclick="onView('<%#Eval("Keyid")%>')">查看</span>
                                <span menu_member_case_id="case_updateCorporateClients" menu_member_case_name="修改" onclick="onEdit('<%#Eval("Keyid")%>')">修改</span>
                                <span menu_member_case_id="case_deleteCorporateClients" menu_member_case_name="删除" onclick="onDelete('<%#Eval("Keyid")%>')">删除</span>
                                <span menu_member_case_id="case_setinquiryCorporateClients" menu_member_case_name="询价设置" onclick="SetInquiryPar('<%#Eval("Keyid")%>')">询价设置</span> 
                                <span menu_member_case_id="case_orderapplyCorporateClients" menu_member_case_name="订单关联" onclick="onChange('<%#Eval("Keyid")%>')" title="线下客户转换为线上客户" style="display: <%#Eval("Keyid").ToString() == Eval("MemberId").ToString() ? "inline" : "none"%>;">订单关联</span>
                                <span onclick="onViewWeihu('<%#Eval("Keyid")%>')">维护记录</span>
                               
                                <span onclick="onViewuplod('<%#Eval("Keyid")%>')"  <%#Eval("ContractCount").ToString() == "0" ? "hidden" : ""%>>查看合同</span>
                                
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
                <div id="page">
                    <uc:UCPager ID="UCPager1" runat="server" />
                </div>
            </div>
        </div>
    </form>
</body>
</html>