username@email.com
2025-05-15 9be7596c0b251c392ab0788f3d18806502c6ee76
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
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoicingApply.aspx.cs" Inherits="CY.WebForm.Pages.business.InvoicingApply" %>
 
 
<!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 id="Head1" runat="server">
    <title>订单列表</title>
    <uc:cmshead id="CMSHead1" runat="server" />
    <script src="../../js/business/Order.js" type="text/javascript"></script>
    <script type="text/javascript">
        //查看客户资料
        function Viewkehu(Keyid, SellerOrderId) {
            top.Dialog.open({ URL: "/Pages/business/OrderKehuqianshou.aspx?Keyid=" + Keyid + "&SellerOrderId=" + SellerOrderId, Title: "客户签收", Width: 300, Height: 300 });
        }
 
        //查看客户资料
        function Viewkaipiao(Keyid, SellerOrderId) {
            //window.open("/Pages/business/InvoicingOrderPrint.aspx?Keyid=" + Keyid + "&SellerOrderId=" + SellerOrderId, '', '');
            top.Dialog.open({ URL: "/Pages/business/InvoicingOrderPrint.aspx?Keyid=" + Keyid + "&SellerOrderId=" + SellerOrderId, Title: "查看订单", Width: 1080, Height: 650 });
        }
 
        function ViewRemark(str) {
            var re = /<br>/g;
            //str = str.replace(re, "\n");
            alertMsg(str);
        }
 
        //查看客户资料
        function View(personId) {
            top.Dialog.open({ URL: "/Pages/business/CorporateClientsDetail.aspx?Keyid=" + personId, Title: "查看客户", Width: 900, Height: 580 });
        }
 
        /*
打印送货单
*/
        function ToPrintdelev() {
            var SQBeginDate = $("#txtSQBeginDate").val();
            var SQEndDate = $("#txtSQEndDate").val();
            var Kaipiaoshenqing = $("#selKaipiaoshenqing").val();
            var Kehuqianshou = $("#selKehuqianshou").val();
            var PayStates = $("#selPayStates").val();
            var CustormerName = $("#txtCustormerName").val();
            var BusinessManager = $("#selBusinessManager").val();
 
            // OpenWindowByUrl();
            window.open('/Pages/business/InvoicingApplyPrint.aspx?SQBeginDate=' + SQBeginDate + '&SQEndDate=' + SQEndDate + '&Kaipiaoshenqing=' + Kaipiaoshenqing +
                '&Kehuqianshou=' + Kehuqianshou + '&PayStates=' + PayStates + '&CustormerName=' + CustormerName + '&BusinessManager=' + BusinessManager, '', '');
        }
    </script>
    <style type="text/css">
        .tableStyleXS th { padding: 1px 0 1px 3px; background-image:none; border-bottom:1px solid #CCC; }
        .tableStyleXS td { padding: 1px 0 1px 3px; }
        .TableNewStyle select { width: 80px; }
        .td_hide span { text-decoration: default; display: none; text-align: center; }
        span.hand_no { cursor: default; display: block; font-size: 12px; }
        span.hand_no:hover { text-decoration: none; }
        span.hand_yes { cursor: pointer; display: block; font-size: 12px; }
        .td_hide { cursor: pointer; }
        .auto-style1 {
            width: 39px;
        }
        .auto-style3 {
            width: 13px;
        }
        .auto-style4 {
            width: 55px;
        }
        .auto-style5 {
            width: 26px;
        }
        .auto-style6 {
            cursor: pointer;
            width: 26px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="scrollContent" style="width: auto;">
        <div class="box1">
            <table class="TableNewStyle" style="width: 100%;">
                <tr>
                    <td class="ali03">
                        申请开票时间:
                    </td>
                    <td style="width: 215px">
                        <input id="txtSQBeginDate" type="text" runat="server" class='date w80px' maxlength='10' />-<input id="txtSQEndDate" type="text" runat="server" class='date w80px' maxlength='10' />
                    </td>
 
                    <td class="ali03">
                        开票状态:
                    </td>
                    <td>
                        <select keepdefaultstyle='true' class=' firstfocus' id='selKaipiaoshenqing' runat="server" datatextfield="Name" datavaluefield="MeanValue">
                        </select>
                    </td>
                    <td class="ali03">
                        客户签收:
                    </td>
                    <td>
                        <select keepdefaultstyle='true' id='selKehuqianshou' runat="server" datatextfield="Name" datavaluefield="MeanValue">
                        </select>
                    </td>
                     <td class="ali03">
                      <%--  收款状态:--%>
                    </td>
                    <td>
                       <%-- <select keepdefaultstyle='true' id='selPayStates' runat="server" datatextfield="Name" datavaluefield="MeanValue">
                        </select>--%>
                    </td>
                   
 
                    
                </tr>
                <tr style="padding-left: 50px">
                     <td class="ali03">
                        客户名称:
                    </td>
                    <td>
                        <input id='txtCustormerName' runat="server" maxlength='50' />
                    </td>
                   
                    <td class="ali03">
                        业务经理:
                    </td>
                    <td>
                        <select keepdefaultstyle='true' id='selBusinessManager' runat="server" datatextfield='Name' datavaluefield='Keyid'>
                        </select>
                    </td>
                     
                   
                    <td colspan="4">
                        <asp:button id="btn_Search" text="查询" runat="server" />&nbsp;<input type="button" value='重置' onclick='document.body.innerHTML="";window.location=window.location;' />
                        &nbsp;<input type="button" value='打印' onclick='ToPrintdelev();' />
                    </td>
                </tr>
            </table>
        </div>
       
        <div clear="fl" dir="ltr">
            <table class="tableStyle tableStyleXS" useclick="false" usecheckbox="true" sortmode="false" id="test_table">
                <thead>
                    <tr>
                       <%-- <th width="25">
                        </th>--%>
                        <th width="25">编号</th>
                        <th style="text-align: center;" width="70">
                           申请开票时间
                        </th>
                           <th style="text-align: center;" width="70">
                           业务经理
                        </th>
                        <th style="text-align: center;" width="70">
                            开票申请单号
                        </th>
                        <th style="text-align: center;"width="150">
                            客户名称
                        </th>
                        
                        <th width="36">
                            订单数量
                        </th>
                         <th width="60">
                            金额
                        </th>
                       <th width="50">
                            备注
                        </th>                        
                         <th width="60">
                           开票状态
                        </th>
                         <th width="60">
                          客户签收
 
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <asp:repeater id="rptData" runat="server">
                        <itemtemplate>
                            <tr>
                               <%-- <td>
                                    <input type="checkbox" name='ckId' value_keyid="<%#Eval("Keyid")%>" value="{
                                    id:<%#Eval("Keyid")%>,
                                    buyerId:'<%#Eval("BuyerId")%>',
                                    orderId:'<%#Eval("SellerOrderId")%>',
                                    orderType:<%#Eval("OrderTypeId")%>,
                                    orderState:<%#Eval("OrderState")%>,
                                    ordershowId:'<%#Eval("SellerOrderId")%>',
                                    pdName:'<%#Eval("DocumentName")%>', 
                                    printName:'<%#Eval("PrintType.PrintName")%>', 
                                    printNum:<%#Eval("OrderExtend.PrintNum")%>, 
                                    deliverPrice:<%#Eval("SumPrice")%>, 
                                    sumPrice:<%#Eval("SumPrice")%>,
                                    Kaipiaoshenqing:<%#Eval("Kaipiaoshenqing")%>,
                                    PayState:<%#Eval("PayState")%>
                                    }" id='ckBox<%#Container.ItemIndex%>' id='ckBox<%#Container.ItemIndex%>' class='ckBox' />
                                </td>--%>
                                <td>
                                    <%#Container.ItemIndex +1 /*(UCPager1.PageSize *( UCPager1.PageIndex-1)+1)*/%>
                                </td>
                                <td>
                                   <%#Eval("CreateTime", "{0:yyyy-MM-dd}")%>
                                     
                                </td>
                                 <td style="text-align: center;">
                                        <%#Eval("BusinessManager")%>
                                </td>
                                <td style="text-align: center;">
                                        <%#Eval("SellerOrderId")%>
                                </td>
                                 
                                <td style="text-align: center;">
                                 <div style="width: 140px; word-wrap: break-word; text-align:justify;">
                                    <a href='javascript:void(0)' title='点击查看 <%#Eval("BuyerName").ToString()%> 资料' class='a_under' onclick='View("<%#Eval("BuyerId")%>")'><%#Eval("BuyerName").ToString().Length > 10 ? (Eval("BuyerName").ToString().Substring(0, 10) + "..") : Eval("BuyerName").ToString()%></a>
                                        </div>
                                </td>
                                
                                <td>                                    
                                      <a href='javascript:void(0)' title=' <%#Eval("shuliang")%> ' class='a_under' onclick='Viewkaipiao("<%#Eval("Keyid")%>","<%#Eval("SellerOrderId")%>")'> <%#Eval("shuliang")%>    </a>
                                    
                                </td>
                                                            
                                <td>
                                    <%#Eval("jine", "{0:F}")%>
                                </td>
                                <td>
                                     <a href="javascript:void(0)" title="<%#Eval("remark").ToString().Replace("\r\n", "<br />")%>" class="a_under" onclick="ViewRemark('<%# Eval("remark").ToString().Replace("\r\n", "<br>")%>')"><%#Eval("remark").ToString().Length>0?"点击查看":"" %> </a>
                                    
                                </td>
                                 <td>                                   
                                      <%#Eval("KaipiaoshenqingName")%>
                                </td>
                                 <td>
                                       <a href='javascript:void(0)' title=' <%#Eval("KehuqianshouName")%> ' class='a_under' onclick='<%#Eval("Kehuqianshou").ToString()=="1"?"Viewkehu(\""+Eval("Keyid")+"\",\""+Eval("SellerOrderId")+"\")":"" %>    '> <%#Eval("KehuqianshouName")%>    </a>
                                    
                                </td>
                               
                                
                            </tr>
                        </itemtemplate>
                    </asp:repeater>
                </tbody>
            </table>
            <uc:ucpager id="UCPager1" runat="server" />
        </div>
    </div>
    </form>
</body>
  <script type="text/javascript" language="javascript">
      /*
确认批量开票申请
*/
      function ToBatchInvoicingList() {
 
          var ids = '';
          var cks = $("input[name='ckId']:checked");
          if (cks.length == 0) { alertMsg('没有选中任何项!'); return; } else { }
          var isCan = true;
          var Kaipiaoshenqing = 2;
 
          var idssss = '';
 
          cks.each(
              function () {
                  var ckVal = $(this).val();
 
                  var ckValJson = eval('(' + ckVal + ')');
                  Kaipiaoshenqing = ckValJson.Kaipiaoshenqing;
                  //剔除已经开票申请的单据
                  if (Kaipiaoshenqing == 2) {
                      ids = ids + ',' + ckValJson.id;
                  } else {
                      idssss = idssss + ',' + ckValJson.orderId;
                  }
 
 
              }
          );
          if (idssss != '') {
              idssss = idssss.substring(1);
 
          }
          if (idssss != '') {
              alertMsg('您选中的订单中有订单已经提交了开票申请!撤销“开票申请”后才能重新提交开票申请!\n' + idssss);
              return;
          }
 
          if (!isCan) {
              // alertMsg('请选择未受理的订单!');
          }
          else {
              if (ids != '') {
                  ids = ids.substring(1);
 
              } else {
                  alertMsg('没有选中未申请开票订单!');
                  return;
              }
 
              var msg = ('确认开票申请吗?');
              top.Dialog.confirm(msg, function () {
                  DoAcceptAll3(ids);
              });
          }
      }
 
      /*
批量处理开票申请
*/
      var DoAcceptAll3 = function (orderIds) {
          window.submitUrl = "/Pages/business/OrderListBatchOperation.aspx"
          CallServer({ Target: "deleteOrderAll3", ids: orderIds }, function (data, textStatus) {
              if ('1' == data) {
                  alertMsg('操作成功!');
                  RefreshDIVOpener();   //关闭页面
              } else {
                  alertMsg('-1' == data ? '开票申请失败!' : '开票申请失败!');
                  //dialog.close();
              }
          });
      }
 
 
      /*
确认批量去除
*/
      function ToBatchRemove() {
 
          var ids = '';
          var cks = $("input[name='ckId']:checked");
          if (cks.length == 0) { alertMsg('没有选中任何项!'); return; } else { }
          var isCan = true;
 
 
 
 
          cks.each(
              function () {
                  //var ckVal = $(this).val();
 
                  //var ckValJson = eval('(' + ckVal + ')');
 
                  //ids = ids + ',' + ckValJson.id;
                  n = $(this).parents("tr").index() + 1;  // 获取checkbox所在行的顺序
                  $("table#test_table").find("tr:eq(" + n + ")").remove();
 
              }
          );
 
 
          //if (!isCan) {
          //    // alertMsg('请选择未受理的订单!');
          //}
          //else {
          //    if (ids != '') {
          //        ids = ids.substring(1);
 
          //    }
 
          //    var msg = ('确认去除吗?');
          //    top.Dialog.confirm(msg, function () {
          //        DoAcceptAll2(ids );
          //    });
          //}
      }
 
      /*
批量处理受理订单
*/
      var DoAcceptAll2 = function (orderIds) {
          window.submitUrl = "/Pages/business/OrderListBatchOperation.aspx"
          CallServer({ Target: "deleteOrderAll2", ids: orderIds }, function (data, textStatus) {
              if ('1' == data) {
                  alertMsg('操作成功!');
                  RefreshDIVOpener();   //关闭页面
              } else {
                  alertMsg('-1' == data ? '去除订单失败!' : '去除订单失败!');
                  //dialog.close();
              }
          });
      }
 
 
      /*
确认批量开票申请
*/
      function ToBatchPayList() {
 
          var ids = '';
          var cks = $("input[name='ckId']:checked");
          if (cks.length == 0) { alertMsg('没有选中任何项!'); return; } else { }
          var isCan = true;
          var PayState = 2;
          var SellerOrderIds = '';
 
 
          cks.each(
              function () {
                  var ckVal = $(this).val();
 
                  var ckValJson = eval('(' + ckVal + ')');
                  PayState = ckValJson.PayState;
                  //剔除已经开票申请的单据
                  if (PayState != -1) {
                      ids = ids + ',' + ckValJson.id;
 
                  } else {
                      SellerOrderIds = SellerOrderIds + ',' + ckValJson.orderId;
                  }
 
 
              }
          );
 
          if (SellerOrderIds != '') {
              SellerOrderIds = SellerOrderIds.substring(1);
 
          }
          if (SellerOrderIds != '') {
              alertMsg('您选中的订单中有订单已经支付完毕!\n' + SellerOrderIds);
              return;
          }
 
 
          if (!isCan) {
              // alertMsg('请选择未受理的订单!');
          }
          else {
              if (ids != '') {
                  ids = ids.substring(1);
                  SellerOrderIds = SellerOrderIds.substring(1);
 
              } else {
                  alertMsg('没有选中未支付订单!');
                  return;
              }
 
              top.Dialog.open({ URL: '/Pages/financial/OrderMoneyBatchReceive.aspx?id=' + ids, Title: '批量收款', Height: 400, Width: 600 });
          }
      }
 
 
  </script>
</html>