-
Notifications
You must be signed in to change notification settings - Fork 653
/
index.twig
678 lines (652 loc) · 45.8 KB
/
index.twig
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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends '@admin/default_frame.twig' %}
{% set menus = ['order', 'order_master'] %}
{% block title %}{{ 'admin.order.order_list'|trans }}{% endblock %}
{% block sub_title %}{{ 'admin.order.order_management'|trans }}{% endblock %}
{% form_theme searchForm '@admin/Form/bootstrap_4_layout.html.twig' %}
{% block javascript %}
<script>
$(function() {
toggleBtnBulk('input[id^="check_"]', '.btn-bulk-wrapper');
$('input[id^="check_"]').on('change', function() {
$('#toggle_check_all').prop('checked', false);
toggleBtnBulk('input[id^="check_"]', '.btn-bulk-wrapper');
});
// 登録チェックボックス
$('#toggle_check_all').on('change', function() {
var checked = $(this).prop('checked');
if (checked) {
$('input[id^="check_"]').prop('checked', true);
} else {
$('input[id^="check_"]').prop('checked', false);
}
toggleBtnBulk('input[id^="check_"]', '.btn-bulk-wrapper');
});
$('#btn_bulk_delete').on('click', function(event) {
event.preventDefault();
$('#form_bulk').attr('action', "{{ url('admin_order_bulk_delete') }}").submit();
return false;
});
// PDF出力(複数)
$('#bulkExportPdf').on('click', function(event) {
window.open('', 'newwin', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=700, height=700');
$('#form_bulk').attr('action', "{{ url('admin_order_export_pdf') }}");
$('#form_bulk').attr('target', 'newwin');
$('#form_bulk').submit();
return false;
});
// PDF出力(単一)
$('.pdf-print').click(function() {
window.open(this.href, 'newwin', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=700, height=700');
return false;
});
// 送り状番号
var updateTrackingNumber = function(id, url, tracking_number, callback) {
$.ajax({
type: 'PUT',
url: url,
data: {'tracking_number': tracking_number}
}).done(function(data, textStatus, jqXHR) {
if (data['status'] == 'OK') {
$('#tracking_number_' + id).val(data['tracking_number']);
if (typeof callback == 'function') {
callback();
}
} else {
alert('Update failed.');
}
return true;
}).fail(function(jqXHR, textStatus, errorThrown) {
var response = JSON.parse(jqXHR.responseText);
var messages = '';
for (var i = 0; i < response.messages.length; i++) {
messages += response.messages[i] + "\n";
}
alert(messages);
return false;
});
};
$('button.update_tracking_number').prop('disabled', true);
// フォームに変更があったら更新ボタンを有効にする
$('input.update_tracking_number').on('keyup', function(event) {
var $tracking_number = $(this);
var $button = $("button[data-target='#" + $tracking_number.attr('id') + "']");
$button.prop('disabled', false);
$button.children('i')
.removeClass('text-secondary')
.addClass('text-success');
});
// enter キーで更新し、次のフォームへフォーカスを移動する
$('input.update_tracking_number').on('keypress', function(event) {
var $tracking_number = $(this);
var $button = $("button[data-target='#" + $tracking_number.attr('id') + "']");
var code = event.which ? event.which : event.keyCode;
if (code == 13) { // on press to enter
var index = $('input.update_tracking_number').index(this);
var callback = function() {
$button.prop('disabled', true);
$button.children('i')
.removeClass('text-success')
.addClass('text-secondary');
$('input.update_tracking_number:gt(' + index + '):first').focus();
};
updateTrackingNumber($tracking_number.data('shipping_id'), $tracking_number.data('url'), $tracking_number.val(), callback);
event.preventDefault();
}
});
// 更新ボタンの制御
$('button.update_tracking_number').on('click', function(event) {
event.preventDefault();
var $button = $(this);
var $target = $($(this).data('target'));
var tracking_number = $target.val();
var callback = function() {
$button.prop('disabled', true);
$button.children('i')
.removeClass('text-success')
.addClass('text-secondary');
};
updateTrackingNumber($target.data('shipping_id'), $target.data('url'), tracking_number, callback);
});
// 完了ボタン
$('#bulkChangeComplete').on('click', function() {
location.href = '{{ url('admin_order', { 'resume': 1 }) }}';
});
});
</script>
{{ include('@admin/Order/confirmationModal_js.twig') }}
{% endblock javascript %}
{% block main %}
<!--検索条件設定テーブルここから-->
<div class="c-outsideBlock">
<form name="search_form" id="search_form" method="POST" action="{{ url('admin_order') }}">
<div class="c-outsideBlock__contents">
<div class="row">
<div class="col-12">
{{ form_widget(searchForm._token) }}
<div>
<label class="col-form-label" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.multi_search_label'|trans }}">{{ 'admin.order.multi_search_label'|trans }}<i class="fa fa-question-circle fa-lg ms-1"></i></label>
{{ form_widget(searchForm.multi) }}
{{ form_errors(searchForm.multi) }}
</div>
<div class="row">
<div class="mb-3 col-12">
<label class="col-form-label" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.order_search_status'|trans }}">{{ 'admin.order.order_status'|trans }}<i class="fa fa-question-circle fa-lg ms-1"></i></label>
<div id="admin_search_order_status">
{% set statusForm = searchForm.status %}
<!-- 各対応状況の件数を表示する -->
{% for status_id, child in statusForm.children %}
<div class="form-check form-check-inline">
<input type="checkbox"
id="{{ child.vars.id }}"
name="{{ child.vars.full_name }}"
class="form-check-input"
value="{{ child.vars.value }}"{{ child.vars.checked ? ' checked="checked"' }}>
<label class="form-check-label" for="{{ child.vars.id }}">{{ child.vars.label }}</label>
{%- if statusForm.vars.order_count[status_id].display -%}
(<a href="{{ url('admin_order', { 'order_status_id': status_id }) }}">{{ statusForm.vars.order_count[status_id].count }}</a>)
{%- endif %}
</div>
{% endfor %}
</div>
{{ form_errors(searchForm.status) }}
</div>
</div>
<div class="d-inline-block mb-3 collapsed" data-bs-toggle="collapse" href="#searchDetail" aria-expanded="false" aria-controls="searchDetail">
<a>
<i class="fa fw-bold me-1 fa-plus-square-o">
<span class="fw-bold">{{ 'admin.common.search_detail'|trans }}</span>
</i>
</a>
</div>
</div>
</div>
</div>
<div class="c-subContents ec-collapse collapse{{ has_errors ? ' show' }}" id="searchDetail">
<div class="row">
<div class="col">
<label class="col-form-label">{{ 'admin.order.orderer_name'|trans }}</label>
{{ form_widget(searchForm.name) }}
{{ form_errors(searchForm.name) }}
</div>
<div class="col">
<div class="row">
<div class="col-12">
<p class="col-form-label">{{ 'admin.common.payment_method'|trans }}</p>
{{ form_widget(searchForm.payment, { 'label_attr': { 'class': 'checkbox-inline'}}) }}
{{ form_errors(searchForm.payment) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<label class="col-form-label">{{ 'admin.order.orderer_kana'|trans }}</label>
{{ form_widget(searchForm.kana) }}
{{ form_errors(searchForm.kana) }}
</div>
<div class="col">
<label class="col-form-label">{{ 'admin.order.order_date'|trans }}</label>
<div class="row align-items-center">
<div class="col">
{{ form_widget(searchForm.order_datetime_start) }}
{{ form_errors(searchForm.order_datetime_start) }}
</div>
<div class="col-auto text-center">{{ 'admin.common.separator__range'|trans }}</div>
<div class="col">
{{ form_widget(searchForm.order_datetime_end) }}
{{ form_errors(searchForm.order_datetime_end) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<label class="col-form-label">{{ 'admin.order.orderer_company_name'|trans }}</label>
{{ form_widget(searchForm.company_name) }}
{{ form_errors(searchForm.company_name) }}
</div>
<div class="col">
<label class="col-form-label">{{ 'admin.order.payment_date'|trans }}</label>
<div class="row align-items-center">
<div class="col">
{{ form_widget(searchForm.payment_datetime_start) }}
{{ form_errors(searchForm.payment_datetime_start) }}
</div>
<div class="col-auto text-center">{{ 'admin.common.separator__range'|trans }}</div>
<div class="col">
{{ form_widget(searchForm.payment_datetime_end) }}
{{ form_errors(searchForm.payment_datetime_end) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<label class="col-form-label">{{ 'admin.common.mail_address'|trans }}</label>
{{ form_widget(searchForm.email) }}
{{ form_errors(searchForm.email) }}
</div>
<div class="col">
<label class="col-form-label">{{ 'admin.common.update_date'|trans }}</label>
<div class="row align-items-center">
<div class="col">
{{ form_widget(searchForm.update_datetime_start) }}
{{ form_errors(searchForm.update_datetime_start) }}
</div>
<div class="col-auto text-center">{{ 'admin.common.separator__range'|trans }}</div>
<div class="col">
{{ form_widget(searchForm.update_datetime_end) }}
{{ form_errors(searchForm.update_datetime_end) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<label class="col-form-label">{{ 'admin.common.phone_number'|trans }}</label>
{{ form_widget(searchForm.phone_number) }}
{{ form_errors(searchForm.phone_number) }}
</div>
<div class="col">
<label class="col-form-label">{{ 'admin.order.delivery_date'|trans }}</label>
<div class="row align-items-center">
<div class="col">
<div class="input-group">
{{ form_widget(searchForm.shipping_delivery_datetime_start) }}
{{ form_errors(searchForm.shipping_delivery_datetime_start) }}
</div>
</div>
<div class="col-auto text-center">{{ 'admin.common.separator__range'|trans }}</div>
<div class="col">
<div class="input-group">
{{ form_widget(searchForm.shipping_delivery_datetime_end) }}
{{ form_errors(searchForm.shipping_delivery_datetime_end) }}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<label class="col-form-label">{{ 'admin.order.order_no'|trans }}</label>
{{ form_widget(searchForm.order_no) }}
{{ form_errors(searchForm.order_no) }}
</div>
<div class="col">
<label class="col-form-label">{{ 'admin.order.purchase_price'|trans }}</label>
<div class="row align-items-center">
<div class="col">
<div class="input-group">
{{ form_widget(searchForm.payment_total_start) }}
{{ form_errors(searchForm.payment_total_start) }}
</div>
</div>
<div class="col-auto text-center">{{ 'admin.common.separator__range'|trans }}</div>
<div class="col">
<div class="input-group">
{{ form_widget(searchForm.payment_total_end) }}
{{ form_errors(searchForm.payment_total_end) }}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="row">
<div class="col-12">
<p class="col-form-label">{{ 'admin.order.tracking_number'|trans }}</p>
{{ form_widget(searchForm.tracking_number) }}
{{ form_errors(searchForm.tracking_number) }}
</div>
</div>
</div>
<div class="col">
<label class="col-form-label">{{ 'admin.order.purchase_product'|trans }}</label>
{{ form_widget(searchForm.buy_product_name) }}
{{ form_errors(searchForm.buy_product_name) }}
</div>
</div>
<div class="row mb-2">
<div class="col">
<div class="row">
<div class="col-12">
<p class="col-form-label">{{ 'admin.order.shipping_mail'|trans }}</p>
{{ form_widget(searchForm.shipping_mail, { 'label_attr': { 'class': 'checkbox-inline' }}) }}
{{ form_errors(searchForm.shipping_mail) }}
</div>
</div>
</div>
<div class="col"></div>
</div>
{# エンティティ拡張の自動出力 #}
{% for f in searchForm|filter(f => f.vars.eccube_form_options.auto_render) %}
{# TODO 1項目1行になるのを改善 #}
<div class="row mb-2">
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
{% else %}
<div class="col">
<div class="mb-3">
<label>{{ f.vars.label|trans }}</label>
{{ form_widget(f) }}
{{ form_errors(f) }}
</div>
</div>
{% endif %}
</div>
{% endfor %}
</div>
<div class="c-outsideBlock__contents">
<div class="row">
<div class="mb-4">
<div class="col-12">
<button class="btn btn-ec-conversion px-5" type="submit" id="search_submit">{{ 'admin.common.search'|trans }}</button>
{% if pagination %}
<span class="fw-bold ms-2" id="search_total_count">{{ 'admin.common.search_result'|trans({"%count%":pagination.totalItemCount})|raw }}</span>
{% endif %}
</div>
</div>
</div>
</div>
<div class="c-outsideBlock__contents mb-5">
{{ include('@admin/search_items.twig', { 'form': searchForm }, ignore_missing = true) }}
</div>
{{ form_widget(searchForm.sortkey, {'attr': {'class': 'js-listSort-key'}}) }}
{{ form_widget(searchForm.sorttype, {'attr': {'class': 'js-listSort-type'}}) }}
</form>
</div>
<!--検索条件設定テーブルここまで-->
<div class="c-contentsArea__cols">
<div class="c-contentsArea__primaryCol">
<div class="c-primaryCol">
{% if pagination and pagination.totalItemCount %}
<form id="form_bulk" method="POST" action="">
<input type="hidden" name="{{ constant('Eccube\\Common\\Constant::TOKEN_NAME') }}" value="{{ csrf_token(constant('Eccube\\Common\\Constant::TOKEN_NAME')) }}">
<div class="row justify-content-between mb-2">
<div class="col-7">
<div class="row justify-content-between">
<div class="col-auto d-none btn-bulk-wrapper">
<label class="me-2" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.bulk_actions'|trans }}">{{ 'admin.common.bulk_actions'|trans }}<i class="fa fa-question-circle fa-lg ms-1"></i></label>
<button id="bulkSendMail" type="button" class="btn btn-ec-regular me-2" data-type="mail" data-bulk-update="true">
{{ 'admin.order.send_mail'|trans }}
</button>
<button type="button" id="bulkExportPdf" class="btn btn-ec-regular me-2">{{ 'admin.order.output_delivery_note_short'|trans }}</button>
{# TODO 削除処理は将来バージョンで対応 <button type="button" class="btn btn-ec-delete" data-bs-toggle="modal" data-bs-target="#bulkDeleteModal">{{ 'admin.common.delete'|trans }}</button> #}
</div>
<div class="col d-none btn-bulk-wrapper">
<div class="d-inline-block me-2">
<select class="form-select" id="option_bulk_status">
<option value="" selected>{{ 'admin.order.change_status'|trans }}</option>
{% for status in OrderStatuses %}
<option value="{{ status.id }}">{{ status.name }}</option>
{% endfor %}
</select>
</div>
<button type="button" id="btn_bulk_status" class="btn btn-ec-regular me-2 progressModal" data-type="status" data-bulk-update="true" data-submit="bulk">
{{ 'admin.common.decision'|trans }}
</button>
</div>
</div>
</div>
<div class="col-5 text-end">
<div class="d-inline-block align-bottom">
<select class="form-select" onchange="location = this.value;">
{% for pageMax in pageMaxis %}
<option {% if pageMax.name == page_count %} selected {% endif %}
value="{{ path('admin_order_page', {'page_no': 1, 'page_count': pageMax.name}) }}">
{{ 'admin.common.count'|trans({ '%count%': pageMax.name }) }}</option>
{% endfor %}
</select>
</div>
<div class="d-inline-block">
<div class="btn-group" role="group">
<div class="btn-group" role="group">
<button type="button" class="btn btn-ec-regular" data-bs-toggle="dropdown" id="csvDownloadDropDown">
<i class="fa fa-cloud-download me-1 text-secondary"></i>
<span>{{ 'admin.common.csv_download'|trans }}</span>
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="{{ url('admin_order_export_order') }}" id="orderCsvDownload">
{{ 'admin.order.order_csv'|trans }}
</a>
<a class="dropdown-item" href="{{ url('admin_order_export_shipping') }}" id="shippingCsvDownload">
{{ 'admin.order.shipping_csv'|trans }}
</a>
</div>
</div>
<div class="btn-group" role="group">
<button type="button" class="btn btn-ec-regular" data-bs-toggle="dropdown" id="csvSettingDropDown">
<i class="fa fa-cog me-1 text-secondary"></i>
<span>{{ 'admin.setting.shop.csv_setting'|trans }}</span>
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="{{ url('admin_setting_shop_csv', { id : constant('\\Eccube\\Entity\\Master\\CsvType::CSV_TYPE_ORDER') }) }}" id="orderCsvSetting">
{{ 'admin.order.order_csv'|trans }}
</a>
<a class="dropdown-item" href="{{ url('admin_setting_shop_csv', { id : constant('\\Eccube\\Entity\\Master\\CsvType::CSV_TYPE_SHIPPING') }) }}" id="shippingCsvSetting">
{{ 'admin.order.shipping_csv'|trans }}
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card rounded border-0 mb-4 d-block">
<div class="card-body p-0">
<table class="table table-sm" id="search_result">
<thead>
<tr>
<th class="border-top-0 pt-2 pb-2 text-center ps-3">
<input type="checkbox" id="toggle_check_all" name="filter" value="open">
</th>
<th class="border-top-0 pt-2 pb-2 text-center">{{ 'admin.common.id'|trans }}<a href="#" class="js-listSort" data-sortkey="orderer"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>{{ 'admin.order.orderer'|trans }}<a href="#" class="js-listSort" data-sortkey="order"><i class="fa fa-arrow-up" aria-hidden="true"></i></a></th>
<th class="border-top-0 pt-2 pb-2 text-center text-nowrap">{{ 'admin.common.payment_method'|trans }}<a href="#" class="js-listSort" data-sortkey="payment_method"><i class="fa fa-arrow-up" aria-hidden="true"></i></a></th>
<th class="border-top-0 pt-2 pb-2 text-center">{{ 'admin.order.order_status'|trans }}<a href="#" class="js-listSort" data-sortkey="order_status"><i class="fa fa-arrow-up" aria-hidden="true"></i></a></th>
<th class="border-top-0 pt-2 pb-2 text-center">{{ 'admin.order.purchase_price'|trans }}<a href="#" class="js-listSort" data-sortkey="purchase_price"><i class="fa fa-arrow-up" aria-hidden="true"></i></a></th>
<th class="border-top-0 pt-2 pb-2 text-center">{{ 'admin.order.message_short'|trans }}</th>
<th class="border-top-0 pt-2 pb-2 text-center text-nowrap">{{ 'admin.order.shipping_status'|trans }}<a href="#" class="js-listSort" data-sortkey="shipping_status"><i class="fa fa-arrow-up" aria-hidden="true"></i></a></th>
<th class="border-top-0 pt-2 pb-2 text-center">{{ 'admin.order.tracking_number'|trans }}<a href="#" class="js-listSort" data-sortkey="tracking_number"><i class="fa fa-arrow-up" aria-hidden="true"></i></a></th>
<th class="border-top-0 pt-2 pb-2 text-center">{{ 'admin.order.delivery'|trans }}<a href="#" class="js-listSort" data-sortkey="delivery"><i class="fa fa-arrow-up" aria-hidden="true"></i></a></th>
<th class="border-top-0 pt-2 pb-2 text-center pe-3"></th>
</tr>
</thead>
<tbody>
{% for Order in pagination %}
{% for Shipping in Order.Shippings %}
<tr>
<td class="align-middle text-center ps-3">
<input type="checkbox" id="check_{{ Shipping.id }}" data-id="{{ Shipping.id }}" name="ids[]" value="{{ Shipping.id }}"
data-preview-notify-mail-url="{{ url('admin_shipping_preview_notify_mail', { id: Shipping.id}) }}"
data-notify-mail-url="{{ url('admin_shipping_notify_mail', { id: Shipping.id}) }}"
data-update-status-url="{{ url('admin_shipping_update_order_status', { id: Shipping.id}) }}"
/>
</td>
<td class="align-middle text-start">
<a class="action-edit" href="{{ url('admin_order_edit', { id : Order.id }) }}">{{ Order.order_no }}<br>{{ Order.name01 ~ Order.name02 }}<br>{{ Order.order_date|date_min }}</a>
</td>
<td class="align-middle text-center">
{{ Order.payment_method }}
</td>
<td class="align-middle text-center">
<span class="badge badge-ec-blue" style="background-color: #fff; color: {{ Order.OrderStatusColor }}; border-color: {{ Order.OrderStatusColor }}">{{ Order.OrderStatus }}</span>
</td>
<td class="align-middle text-end">
{{ Order.payment_total|price }}<br>
{{ Order.payment_date ? Order.payment_date|date_day : 'admin.order.not_payment'|trans }}
</td>
<td class="align-middle text-center">
{% if Order.message is not empty %}
<a class="btn btn-ec-actionIcon" href="{{ url('admin_order_edit', { id : Order.id }) }}#order_message" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ Order.message }}" aria-describedby="tooltip819464">
<i class="fa fa-commenting fa-lg text-secondary" aria-hidden="true"></i>
</a>
{% elseif Order.note is not empty %}
<a class="btn btn-ec-actionIcon" href="{{ url('admin_order_edit', { id : Order.id }) }}#order_note" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ Order.note }}" aria-describedby="tooltip819464">
<i class="fa fa-commenting fa-lg text-secondary" aria-hidden="true"></i>
</a>
{% endif %}
</td>
<td class="align-middle text-center">
{% if Order.is_multiple %}
<a href="{{ url('admin_shipping_edit', { id: Order.id }) }}">
{% if Shipping.shipping_date %}
{{ Shipping.shipping_date|date_day }}
{% else %}
{{ 'admin.order.unshipped'|trans }}
{% endif %}
</a>
{% else %}
{{ Shipping.shipping_date ? Shipping.shipping_date|date_day : 'admin.order.unshipped'|trans }}
{% endif %}
{% if Shipping.mail_send_date %}
{% set send_mail_date = Shipping.mail_send_date|date_min %}
<i class="fa fa-envelope fa-lg text-secondary" aria-hidden="true" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'admin.order.shipping_mail__completed'|trans({'%date%': send_mail_date}) }}"></i>
{% endif %}
</td>
<td class="align-middle text-center">
<div class="input-group input-group-sm">
<input type="text" id="tracking_number_{{ Shipping.id }}" class="form-control update_tracking_number" placeholder="{{ 'admin.order.tracking_number'|trans }}" value="{{ Shipping.trackingNumber }}" data-shipping_id="{{ Shipping.id }}" data-url="{{ url('admin_shipping_update_tracking_number', { id : Shipping.id }) }}" tabindex="{{ loop.index }}"/>
<span class="input-group-btn">
<button type="button" class="btn btn-default update_tracking_number" data-target="#tracking_number_{{ Shipping.id }}">
<i class="fa fa-check fa-lg text-secondary" aria-hidden="true"></i>
</button>
</span>
</div>
</td>
<td class="align-middle text-center">
{{ Shipping.name01 ~ Shipping.name02 }}<br>
{{ Shipping.Pref.name }}
</td>
<td class="align-middle pe-3">
<div class="text-end">
<div class="px-1 d-inline-block">
<a class="btn btn-ec-actionIcon confirmationModal"
data-type="mail" data-bulk-update="false"
data-preview-notify-mail-url="{{ url('admin_shipping_preview_notify_mail', { id: Shipping.id}) }}"
data-notify-mail-url="{{ url('admin_shipping_notify_mail', { id: Shipping.id}) }}"
data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'admin.order.shipping_mail_send'|trans }}">
<i class="fa fa-send fa-lg text-secondary" aria-hidden="true"></i>
</a>
</div>
<div class="px-1 d-inline-block">
<a class="btn btn-ec-actionIcon pdf-print" href="{{ url('admin_order_export_pdf') }}?ids[]={{ Shipping.id }}" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'admin.order.output_delivery_note_short'|trans }}">
<i class="fa fa-table fa-lg text-secondary" aria-hidden="true"></i>
</a>
</div>
<div class="px-1 d-inline-block">
<a class="btn btn-ec-actionIcon confirmationModal" href="javascript:;"
data-id="{{ Shipping.id }}" data-type="status" data-bulk-update="false"
data-update-status-id="{{ constant('Eccube\\Entity\\Master\\OrderStatus::DELIVERED') }}"
data-update-status-url="{{ url('admin_shipping_update_order_status', { id: Shipping.id}) }}"
data-preview-notify-mail-url="{{ url('admin_shipping_preview_notify_mail', { id: Shipping.id}) }}"
data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'admin.order.to_shipped'|trans }}">
<i class="fa fa-check fa-lg text-secondary" aria-hidden="true"></i>
</a>
</div>
</div>
</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
<div class="row justify-content-md-center"></div>
</div>
<div class="row justify-content-md-center pb-4 mb-4">
{% if pagination.totalItemCount > 0 %}
{% include "@admin/pager.twig" with { 'pages' : pagination.paginationData, 'routes' : 'admin_order_page' } %}
{% endif %}
</div>
</div>
</form>
{# 検索条件エラー時 #}
{% elseif has_errors %}
<div class="card rounded border-0">
<div class="card-body p-4">
<div class="text-center text-muted mb-4 h5">{{ 'admin.common.search_invalid_condition'|trans }}</div>
<div class="text-center text-muted">{{ 'admin.common.search_try_change_condition'|trans }}</div>
</div>
</div>
{# 検索結果なし #}
{% else %}
<div class="card rounded border-0">
<div class="card-body p-4">
<div class="text-center text-muted mb-4 h5">{{ 'admin.common.search_no_result'|trans }}</div>
<div class="text-center text-muted">{{ 'admin.common.search_try_change_condition'|trans }}</div>
<div class="text-center text-muted">{{ 'admin.common.search_try_advanced_search'|trans }}</div>
</div>
</div>
{% endif %}
<!-- 出荷済にする確認モーダル -->
<div class="modal fade" id="sentUpdateModal" tabindex="-1" role="dialog" aria-labelledby="sentUpdateModal" aria-hidden="true" data-bs-keyboard="false" data-bs-backdrop="static">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title fw-bold"><!--confirmationModal_js.twig--></h5>
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p class="modal-message"></p>
<ul id="bulkErrors"></ul>
<div id="bulk-options">
<div class="fw-bold mb-2 notificationMail">{{ 'admin.order.to_shipped__confirm_send_mail'|trans }}</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="notificationMail">
<label class="form-check-label notificationMail">
{{ 'admin.order.to_shipped__confirm_send_mail_in_same_time'|trans }}
</label>
</div>
<div>
<div class="d-inline-block" data-bs-toggle="collapse" href="#viewEmail" aria-expanded="false" aria-controls="viewEmail"><a><i class="fa fa-plus-square-o fw-bold me-1"></i><span class="fw-bold">{{ 'admin.order.bulk_action__confirm_view_mail_body'|trans }}</span></a></div>
<div class="collapse bg-light p-4 ec-collapse bg-ec-formGray" id="viewEmail" style="word-wrap: break-word; word-break:break-all">
<pre></pre>
</div>
</div>
</div>
<div class="progress" style="display: none">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-ec-sub" type="button" data-bs-dismiss="modal">{{ 'admin.common.cancel'|trans }}</button>
<button id="bulkChange" class="btn btn-ec-conversion" type="button"><!--confirmationModal_js.twig--></button>
<button id="bulkChangeComplete" class="btn btn-ec-regular" style="display: none" type="button">{{ 'admin.common.close'|trans }}</button>
</div>
</div>
</div>
</div>
<!-- 一括削除の確認モーダル -->
<div class="modal fade" id="bulkDeleteModal" tabindex="-1" role="dialog" aria-labelledby="discontinuance" aria-hidden="true" data-bs-keyboard="false" data-bs-backdrop="static">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title fw-bold">{{ 'admin.order.delete__confirm_title'|trans }}</h5>
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body text-start">
<p class="text-start">{{ 'admin.order.delete__confirm_message'|trans }}</p>
<ul id="bulkErrors"></ul>
<div class="progress" style="display: none">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-ec-sub" type="button" data-bs-dismiss="modal">{{ 'admin.common.cancel'|trans }}</button>
<button class="btn btn-ec-delete" type="button" id="btn_bulk_delete">{{ 'admin.common.delete' | trans }}</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}