src/Eccube/Resource/template/admin/Order/index.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends '@admin/default_frame.twig' %}
  9. {% set menus = ['order', 'order_master'] %}
  10. {% block title %}{{ 'admin.order.order_list'|trans }}{% endblock %}
  11. {% block sub_title %}{{ 'admin.order.order_management'|trans }}{% endblock %}
  12. {% form_theme searchForm '@admin/Form/bootstrap_4_layout.html.twig' %}
  13. {% block javascript %}
  14.     <script>
  15.         $(function() {
  16.             toggleBtnBulk('input[id^="check_"]', '.btn-bulk-wrapper');
  17.             $('input[id^="check_"]').on('change', function() {
  18.                 $('#toggle_check_all').prop('checked', false);
  19.                 toggleBtnBulk('input[id^="check_"]', '.btn-bulk-wrapper');
  20.             });
  21.             // 登録チェックボックス
  22.             $('#toggle_check_all').on('change', function() {
  23.                 var checked = $(this).prop('checked');
  24.                 if (checked) {
  25.                     $('input[id^="check_"]').prop('checked', true);
  26.                 } else {
  27.                     $('input[id^="check_"]').prop('checked', false);
  28.                 }
  29.                 toggleBtnBulk('input[id^="check_"]', '.btn-bulk-wrapper');
  30.             });
  31.             $('#btn_bulk_delete').on('click', function(event) {
  32.                 event.preventDefault();
  33.                 $('#form_bulk').attr('action', "{{ url('admin_order_bulk_delete') }}").submit();
  34.                 return false;
  35.             });
  36.             // PDF出力(複数)
  37.             $('#bulkExportPdf').on('click', function(event) {
  38.                 window.open('', 'newwin', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=700, height=700');
  39.                 $('#form_bulk').attr('action', "{{ url('admin_order_export_pdf') }}");
  40.                 $('#form_bulk').attr('target', 'newwin');
  41.                 $('#form_bulk').submit();
  42.                 return false;
  43.             });
  44.             // PDF出力(単一)
  45.             $('.pdf-print').click(function() {
  46.                 window.open(this.href, 'newwin', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=700, height=700');
  47.                 return false;
  48.             });
  49.             // 送り状番号
  50.             var updateTrackingNumber = function(id, url, tracking_number, callback) {
  51.                 $.ajax({
  52.                     type: 'PUT',
  53.                     url: url,
  54.                     data: {'tracking_number': tracking_number}
  55.                 }).done(function(data, textStatus, jqXHR) {
  56.                     if (data['status'] == 'OK') {
  57.                         $('#tracking_number_' + id).val(data['tracking_number']);
  58.                         if (typeof callback == 'function') {
  59.                             callback();
  60.                         }
  61.                     } else {
  62.                         alert('Update failed.');
  63.                     }
  64.                     return true;
  65.                 }).fail(function(jqXHR, textStatus, errorThrown) {
  66.                     var response = JSON.parse(jqXHR.responseText);
  67.                     var messages = '';
  68.                     for (var i = 0; i < response.messages.length; i++) {
  69.                         messages += response.messages[i] + "\n";
  70.                     }
  71.                     alert(messages);
  72.                     return false;
  73.                 });
  74.             };
  75.             $('button.update_tracking_number').prop('disabled', true);
  76.             // フォームに変更があったら更新ボタンを有効にする
  77.             $('input.update_tracking_number').on('keyup', function(event) {
  78.                 var $tracking_number = $(this);
  79.                 var $button = $("button[data-target='#" + $tracking_number.attr('id') + "']");
  80.                 $button.prop('disabled', false);
  81.                 $button.children('i')
  82.                     .removeClass('text-secondary')
  83.                     .addClass('text-success');
  84.             });
  85.             // enter キーで更新し、次のフォームへフォーカスを移動する
  86.             $('input.update_tracking_number').on('keypress', function(event) {
  87.                 var $tracking_number = $(this);
  88.                 var $button = $("button[data-target='#" + $tracking_number.attr('id') + "']");
  89.                 var code = event.which ? event.which : event.keyCode;
  90.                 if (code == 13) { // on press to enter
  91.                     var index = $('input.update_tracking_number').index(this);
  92.                     var callback = function() {
  93.                         $button.prop('disabled', true);
  94.                         $button.children('i')
  95.                             .removeClass('text-success')
  96.                             .addClass('text-secondary');
  97.                         $('input.update_tracking_number:gt(' + index + '):first').focus();
  98.                     };
  99.                     updateTrackingNumber($tracking_number.data('shipping_id'), $tracking_number.data('url'), $tracking_number.val(), callback);
  100.                     event.preventDefault();
  101.                 }
  102.             });
  103.             // 更新ボタンの制御
  104.             $('button.update_tracking_number').on('click', function(event) {
  105.                 event.preventDefault();
  106.                 var $button = $(this);
  107.                 var $target = $($(this).data('target'));
  108.                 var tracking_number = $target.val();
  109.                 var callback = function() {
  110.                     $button.prop('disabled', true);
  111.                     $button.children('i')
  112.                         .removeClass('text-success')
  113.                         .addClass('text-secondary');
  114.                 };
  115.         updateTrackingNumber($target.data('shipping_id'), $target.data('url'), tracking_number, callback);
  116.     });
  117.     // 完了ボタン
  118.     $('#bulkChangeComplete').on('click', function() {
  119.         location.href = '{{ url('admin_order', { 'resume': 1 }) }}';
  120.     });
  121. });
  122. </script>
  123. {{ include('@admin/Order/confirmationModal_js.twig') }}
  124. {% endblock javascript %}
  125. {% block main %}
  126.     <!--検索条件設定テーブルここから-->
  127.     <div class="c-outsideBlock">
  128.         <form name="search_form" id="search_form" method="POST" action="{{ url('admin_order') }}">
  129.             <div class="c-outsideBlock__contents">
  130.                 <div class="row">
  131.                     <div class="col-12">
  132.                         {{ form_widget(searchForm._token) }}
  133.                         <div>
  134.                             <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>
  135.                             {{ form_widget(searchForm.multi) }}
  136.                             {{ form_errors(searchForm.multi) }}
  137.                         </div>
  138.                         <div class="row">
  139.                             <div class="mb-3 col-12">
  140.                                 <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>
  141.                                 <div id="admin_search_order_status">
  142.                                     {% set statusForm = searchForm.status %}
  143.                                     <!-- 各対応状況の件数を表示する -->
  144.                                     {% for status_id, child in statusForm.children %}
  145.                                         <div class="form-check form-check-inline">
  146.                                             <input type="checkbox"
  147.                                                    id="{{ child.vars.id }}"
  148.                                                    name="{{ child.vars.full_name }}"
  149.                                                    class="form-check-input"
  150.                                                    value="{{ child.vars.value }}"{{ child.vars.checked ? ' checked="checked"' }}>
  151.                                             <label class="form-check-label" for="{{ child.vars.id }}">{{ child.vars.label }}</label>
  152.                                             {%- if statusForm.vars.order_count[status_id].display -%}
  153.                                                 (<a href="{{ url('admin_order', { 'order_status_id': status_id }) }}">{{ statusForm.vars.order_count[status_id].count }}</a>)
  154.                                             {%- endif %}
  155.                                         </div>
  156.                                     {% endfor %}
  157.                                 </div>
  158.                                 {{ form_errors(searchForm.status) }}
  159.                             </div>
  160.                         </div>
  161.                         <div class="d-inline-block mb-3 collapsed" data-bs-toggle="collapse" href="#searchDetail" aria-expanded="false" aria-controls="searchDetail">
  162.                             <a>
  163.                                 <i class="fa fw-bold me-1 fa-plus-square-o">
  164.                                     <span class="fw-bold">{{ 'admin.common.search_detail'|trans }}</span>
  165.                                 </i>
  166.                             </a>
  167.                         </div>
  168.                     </div>
  169.                 </div>
  170.             </div>
  171.             <div class="c-subContents ec-collapse collapse{{ has_errors ? ' show' }}" id="searchDetail">
  172.                 <div class="row">
  173.                     <div class="col">
  174.                         <label class="col-form-label">{{ 'admin.order.orderer_name'|trans }}</label>
  175.                         {{ form_widget(searchForm.name) }}
  176.                         {{ form_errors(searchForm.name) }}
  177.                     </div>
  178.                     <div class="col">
  179.                         <div class="row">
  180.                             <div class="col-12">
  181.                                 <p class="col-form-label">{{ 'admin.common.payment_method'|trans }}</p>
  182.                                 {{ form_widget(searchForm.payment, { 'label_attr': { 'class': 'checkbox-inline'}}) }}
  183.                                 {{ form_errors(searchForm.payment) }}
  184.                             </div>
  185.                         </div>
  186.                     </div>
  187.                 </div>
  188.                 <div class="row">
  189.                     <div class="col">
  190.                         <label class="col-form-label">{{ 'admin.order.orderer_kana'|trans }}</label>
  191.                         {{ form_widget(searchForm.kana) }}
  192.                         {{ form_errors(searchForm.kana) }}
  193.                     </div>
  194.                     <div class="col">
  195.                         <label class="col-form-label">{{ 'admin.order.order_date'|trans }}</label>
  196.                         <div class="row align-items-center">
  197.                             <div class="col">
  198.                                 {{ form_widget(searchForm.order_datetime_start) }}
  199.                                 {{ form_errors(searchForm.order_datetime_start) }}
  200.                             </div>
  201.                             <div class="col-auto text-center">{{ 'admin.common.separator__range'|trans }}</div>
  202.                             <div class="col">
  203.                                 {{ form_widget(searchForm.order_datetime_end) }}
  204.                                 {{ form_errors(searchForm.order_datetime_end) }}
  205.                             </div>
  206.                         </div>
  207.                     </div>
  208.                 </div>
  209.                 <div class="row">
  210.                     <div class="col">
  211.                         <label class="col-form-label">{{ 'admin.order.orderer_company_name'|trans }}</label>
  212.                         {{ form_widget(searchForm.company_name) }}
  213.                         {{ form_errors(searchForm.company_name) }}
  214.                     </div>
  215.                     <div class="col">
  216.                         <label class="col-form-label">{{ 'admin.order.payment_date'|trans }}</label>
  217.                         <div class="row align-items-center">
  218.                             <div class="col">
  219.                                 {{ form_widget(searchForm.payment_datetime_start) }}
  220.                                 {{ form_errors(searchForm.payment_datetime_start) }}
  221.                             </div>
  222.                             <div class="col-auto text-center">{{ 'admin.common.separator__range'|trans }}</div>
  223.                             <div class="col">
  224.                                 {{ form_widget(searchForm.payment_datetime_end) }}
  225.                                 {{ form_errors(searchForm.payment_datetime_end) }}
  226.                             </div>
  227.                         </div>
  228.                     </div>
  229.                 </div>
  230.                 <div class="row">
  231.                     <div class="col">
  232.                         <label class="col-form-label">{{ 'admin.common.mail_address'|trans }}</label>
  233.                         {{ form_widget(searchForm.email) }}
  234.                         {{ form_errors(searchForm.email) }}
  235.                     </div>
  236.                     <div class="col">
  237.                         <label class="col-form-label">{{ 'admin.common.update_date'|trans }}</label>
  238.                         <div class="row align-items-center">
  239.                             <div class="col">
  240.                                 {{ form_widget(searchForm.update_datetime_start) }}
  241.                                 {{ form_errors(searchForm.update_datetime_start) }}
  242.                             </div>
  243.                             <div class="col-auto text-center">{{ 'admin.common.separator__range'|trans }}</div>
  244.                             <div class="col">
  245.                                 {{ form_widget(searchForm.update_datetime_end) }}
  246.                                 {{ form_errors(searchForm.update_datetime_end) }}
  247.                             </div>
  248.                         </div>
  249.                     </div>
  250.                 </div>
  251.                 <div class="row">
  252.                     <div class="col">
  253.                         <label class="col-form-label">{{ 'admin.common.phone_number'|trans }}</label>
  254.                         {{ form_widget(searchForm.phone_number) }}
  255.                         {{ form_errors(searchForm.phone_number) }}
  256.                     </div>
  257.                     <div class="col">
  258.                         <label class="col-form-label">{{ 'admin.order.delivery_date'|trans }}</label>
  259.                         <div class="row align-items-center">
  260.                             <div class="col">
  261.                                 <div class="input-group">
  262.                                     {{ form_widget(searchForm.shipping_delivery_datetime_start) }}
  263.                                     {{ form_errors(searchForm.shipping_delivery_datetime_start) }}
  264.                                 </div>
  265.                             </div>
  266.                             <div class="col-auto text-center">{{ 'admin.common.separator__range'|trans }}</div>
  267.                             <div class="col">
  268.                                 <div class="input-group">
  269.                                     {{ form_widget(searchForm.shipping_delivery_datetime_end) }}
  270.                                     {{ form_errors(searchForm.shipping_delivery_datetime_end) }}
  271.                                 </div>
  272.                             </div>
  273.                         </div>
  274.                     </div>
  275.                 </div>
  276.                 <div class="row">
  277.                     <div class="col">
  278.                         <label class="col-form-label">{{ 'admin.order.order_no'|trans }}</label>
  279.                         {{ form_widget(searchForm.order_no) }}
  280.                         {{ form_errors(searchForm.order_no) }}
  281.                     </div>
  282.                     <div class="col">
  283.                         <label class="col-form-label">{{ 'admin.order.purchase_price'|trans }}</label>
  284.                         <div class="row align-items-center">
  285.                             <div class="col">
  286.                                 <div class="input-group">
  287.                                     {{ form_widget(searchForm.payment_total_start) }}
  288.                                     {{ form_errors(searchForm.payment_total_start) }}
  289.                                 </div>
  290.                             </div>
  291.                             <div class="col-auto text-center">{{ 'admin.common.separator__range'|trans }}</div>
  292.                             <div class="col">
  293.                                 <div class="input-group">
  294.                                     {{ form_widget(searchForm.payment_total_end) }}
  295.                                     {{ form_errors(searchForm.payment_total_end) }}
  296.                                 </div>
  297.                             </div>
  298.                         </div>
  299.                     </div>
  300.                 </div>
  301.                 <div class="row">
  302.                     <div class="col">
  303.                         <div class="row">
  304.                             <div class="col-12">
  305.                                 <p class="col-form-label">{{ 'admin.order.tracking_number'|trans }}</p>
  306.                                 {{ form_widget(searchForm.tracking_number) }}
  307.                                 {{ form_errors(searchForm.tracking_number) }}
  308.                             </div>
  309.                         </div>
  310.                     </div>
  311.                     <div class="col">
  312.                         <label class="col-form-label">{{ 'admin.order.purchase_product'|trans }}</label>
  313.                         {{ form_widget(searchForm.buy_product_name) }}
  314.                         {{ form_errors(searchForm.buy_product_name) }}
  315.                     </div>
  316.                 </div>
  317.                 <div class="row mb-2">
  318.                     <div class="col">
  319.                         <div class="row">
  320.                             <div class="col-12">
  321.                                 <p class="col-form-label">{{ 'admin.order.shipping_mail'|trans }}</p>
  322.                                 {{ form_widget(searchForm.shipping_mail,  { 'label_attr': { 'class': 'checkbox-inline' }}) }}
  323.                                 {{ form_errors(searchForm.shipping_mail) }}
  324.                             </div>
  325.                         </div>
  326.                     </div>
  327.                     <div class="col"></div>
  328.                 </div>
  329.                 {# エンティティ拡張の自動出力 #}
  330.                 {% for f in searchForm|filter(f => f.vars.eccube_form_options.auto_render) %}
  331.                     {# TODO 1項目1行になるのを改善 #}
  332.                     <div class="row mb-2">
  333.                         {% if f.vars.eccube_form_options.form_theme %}
  334.                             {% form_theme f f.vars.eccube_form_options.form_theme %}
  335.                             {{ form_row(f) }}
  336.                         {% else %}
  337.                             <div class="col">
  338.                                 <div class="mb-3">
  339.                                     <label>{{ f.vars.label|trans }}</label>
  340.                                     {{ form_widget(f) }}
  341.                                     {{ form_errors(f) }}
  342.                                 </div>
  343.                             </div>
  344.                         {% endif %}
  345.                     </div>
  346.                 {% endfor %}
  347.             </div>
  348.             <div class="c-outsideBlock__contents">
  349.                 <div class="row">
  350.                     <div class="mb-4">
  351.                         <div class="col-12">
  352.                             <button class="btn btn-ec-conversion px-5" type="submit" id="search_submit">{{ 'admin.common.search'|trans }}</button>
  353.                             {% if pagination %}
  354.                                 <span class="fw-bold ms-2" id="search_total_count">{{ 'admin.common.search_result'|trans({"%count%":pagination.totalItemCount})|raw }}</span>
  355.                             {% endif %}
  356.                         </div>
  357.                     </div>
  358.                 </div>
  359.             </div>
  360.             <div class="c-outsideBlock__contents mb-5">
  361.                 {{ include('@admin/search_items.twig', { 'form': searchForm }, ignore_missing = true) }}
  362.             </div>
  363.             {{ form_widget(searchForm.sortkey, {'attr': {'class': 'js-listSort-key'}}) }}
  364.             {{ form_widget(searchForm.sorttype, {'attr': {'class': 'js-listSort-type'}}) }}
  365.         </form>
  366.     </div>
  367.     <!--検索条件設定テーブルここまで-->
  368.     <div class="c-contentsArea__cols">
  369.         <div class="c-contentsArea__primaryCol">
  370.             <div class="c-primaryCol">
  371.                 {% if pagination and pagination.totalItemCount %}
  372.                     <form id="form_bulk" method="POST" action="">
  373.                         <input type="hidden" name="{{ constant('Eccube\\Common\\Constant::TOKEN_NAME') }}" value="{{ csrf_token(constant('Eccube\\Common\\Constant::TOKEN_NAME')) }}">
  374.                         <div class="row justify-content-between mb-2">
  375.                             <div class="col-7">
  376.                                 <div class="row justify-content-between">
  377.                                     <div class="col-auto d-none btn-bulk-wrapper">
  378.                                         <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>
  379.                                         <button id="bulkSendMail" type="button" class="btn btn-ec-regular me-2" data-type="mail" data-bulk-update="true">
  380.                                             {{ 'admin.order.send_mail'|trans }}
  381.                                         </button>
  382.                                         <button type="button" id="bulkExportPdf" class="btn btn-ec-regular me-2">{{ 'admin.order.output_delivery_note_short'|trans }}</button>
  383.                                         {# TODO 削除処理は将来バージョンで対応 <button type="button" class="btn btn-ec-delete" data-bs-toggle="modal" data-bs-target="#bulkDeleteModal">{{ 'admin.common.delete'|trans }}</button> #}
  384.                                     </div>
  385.                                     <div class="col d-none btn-bulk-wrapper">
  386.                                         <div class="d-inline-block me-2">
  387.                                             <select class="form-select" id="option_bulk_status">
  388.                                                 <option value="" selected>{{ 'admin.order.change_status'|trans }}</option>
  389.                                                 {% for status in OrderStatuses %}
  390.                                                     <option value="{{ status.id }}">{{ status.name }}</option>
  391.                                                 {% endfor %}
  392.                                             </select>
  393.                                         </div>
  394.                                         <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">
  395.                                             {{ 'admin.common.decision'|trans }}
  396.                                         </button>
  397.                                     </div>
  398.                                 </div>
  399.                             </div>
  400.                             <div class="col-5 text-end">
  401.                                 <div class="d-inline-block align-bottom">
  402.                                     <select class="form-select" onchange="location = this.value;">
  403.                                         {% for pageMax in pageMaxis %}
  404.                                             <option {% if pageMax.name == page_count %} selected {% endif %}
  405.                                                     value="{{ path('admin_order_page', {'page_no': 1, 'page_count': pageMax.name}) }}">
  406.                                                 {{ 'admin.common.count'|trans({ '%count%': pageMax.name }) }}</option>
  407.                                         {% endfor %}
  408.                                     </select>
  409.                                 </div>
  410.                                 <div class="d-inline-block">
  411.                                     <div class="btn-group" role="group">
  412.                                         <div class="btn-group" role="group">
  413.                                             <button type="button" class="btn btn-ec-regular" data-bs-toggle="dropdown" id="csvDownloadDropDown">
  414.                                                 <i class="fa fa-cloud-download me-1 text-secondary"></i>
  415.                                                 <span>{{ 'admin.common.csv_download'|trans }}</span>
  416.                                             </button>
  417.                                             <div class="dropdown-menu">
  418.                                                 <a class="dropdown-item" href="{{ url('admin_order_export_order') }}" id="orderCsvDownload">
  419.                                                     {{ 'admin.order.order_csv'|trans }}
  420.                                                 </a>
  421.                                                 <a class="dropdown-item" href="{{ url('admin_order_export_shipping') }}" id="shippingCsvDownload">
  422.                                                     {{ 'admin.order.shipping_csv'|trans }}
  423.                                                 </a>
  424.                                             </div>
  425.                                         </div>
  426.                                         <div class="btn-group" role="group">
  427.                                             <button type="button" class="btn btn-ec-regular" data-bs-toggle="dropdown" id="csvSettingDropDown">
  428.                                                 <i class="fa fa-cog me-1 text-secondary"></i>
  429.                                                 <span>{{ 'admin.setting.shop.csv_setting'|trans }}</span>
  430.                                             </button>
  431.                                             <div class="dropdown-menu">
  432.                                                 <a class="dropdown-item" href="{{ url('admin_setting_shop_csv', { id : constant('\\Eccube\\Entity\\Master\\CsvType::CSV_TYPE_ORDER') }) }}" id="orderCsvSetting">
  433.                                                     {{ 'admin.order.order_csv'|trans }}
  434.                                                 </a>
  435.                                                 <a class="dropdown-item" href="{{ url('admin_setting_shop_csv', { id : constant('\\Eccube\\Entity\\Master\\CsvType::CSV_TYPE_SHIPPING') }) }}" id="shippingCsvSetting">
  436.                                                     {{ 'admin.order.shipping_csv'|trans }}
  437.                                                 </a>
  438.                                             </div>
  439.                                         </div>
  440.                                     </div>
  441.                                 </div>
  442.                             </div>
  443.                         </div>
  444.                         <div class="card rounded border-0 mb-4 d-block">
  445.                             <div class="card-body p-0">
  446.                                 <table class="table table-sm" id="search_result">
  447.                                     <thead>
  448.                                     <tr>
  449.                                         <th class="border-top-0 pt-2 pb-2 text-center ps-3">
  450.                                             <input type="checkbox" id="toggle_check_all" name="filter" value="open">
  451.                                         </th>
  452.                                         <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>
  453.                                         <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>
  454.                                         <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>
  455.                                         <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>
  456.                                         <th class="border-top-0 pt-2 pb-2 text-center">{{ 'admin.order.message_short'|trans }}</th>
  457.                                         <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>
  458.                                         <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>
  459.                                         <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>
  460.                                         <th class="border-top-0 pt-2 pb-2 text-center pe-3"></th>
  461.                                     </tr>
  462.                                     </thead>
  463.                                     <tbody>
  464.                                     {% for Order in pagination %}
  465.                                         {% for Shipping in Order.Shippings %}
  466.                                             <tr>
  467.                                                 <td class="align-middle text-center ps-3">
  468.                                                     <input type="checkbox" id="check_{{ Shipping.id }}" data-id="{{ Shipping.id }}" name="ids[]" value="{{ Shipping.id }}"
  469.                                                            data-preview-notify-mail-url="{{ url('admin_shipping_preview_notify_mail', { id: Shipping.id}) }}"
  470.                                                            data-notify-mail-url="{{ url('admin_shipping_notify_mail', { id: Shipping.id}) }}"
  471.                                                            data-update-status-url="{{ url('admin_shipping_update_order_status', { id: Shipping.id}) }}"
  472.                                                     />
  473.                                                 </td>
  474.                                                 <td class="align-middle text-start">
  475.                                                     <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>
  476.                                                 </td>
  477.                                                 <td class="align-middle text-center">
  478.                                                     {{ Order.payment_method }}
  479.                                                 </td>
  480.                                                 <td class="align-middle text-center">
  481.                                                     <span class="badge badge-ec-blue" style="background-color: #fff; color: {{ Order.OrderStatusColor }}; border-color: {{ Order.OrderStatusColor }}">{{ Order.OrderStatus }}</span>
  482.                                                 </td>
  483.                                                 <td class="align-middle text-end">
  484.                                                     {{ Order.payment_total|price }}<br>
  485.                                                     {{ Order.payment_date ? Order.payment_date|date_day : 'admin.order.not_payment'|trans }}
  486.                                                 </td>
  487.                                                 <td class="align-middle text-center">
  488.                                                     {% if Order.message is not empty %}
  489.                                                         <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">
  490.                                                             <i class="fa fa-commenting fa-lg text-secondary" aria-hidden="true"></i>
  491.                                                         </a>
  492.                                                     {% elseif Order.note is not empty %}
  493.                                                         <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">
  494.                                                             <i class="fa fa-commenting fa-lg text-secondary" aria-hidden="true"></i>
  495.                                                         </a>
  496.                                                     {% endif %}
  497.                                                 </td>
  498.                                                 <td class="align-middle text-center">
  499.                                                     {% if Order.is_multiple %}
  500.                                                         <a href="{{ url('admin_shipping_edit', { id: Order.id }) }}">
  501.                                                             {% if Shipping.shipping_date %}
  502.                                                                 {{ Shipping.shipping_date|date_day }}
  503.                                                             {% else %}
  504.                                                                 {{ 'admin.order.unshipped'|trans }}
  505.                                                             {% endif %}
  506.                                                         </a>
  507.                                                     {% else %}
  508.                                                         {{ Shipping.shipping_date ? Shipping.shipping_date|date_day : 'admin.order.unshipped'|trans }}
  509.                                                     {% endif %}
  510.                                                     {% if Shipping.mail_send_date %}
  511.                                                         {% set send_mail_date = Shipping.mail_send_date|date_min %}
  512.                                                         <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>
  513.                                                     {% endif %}
  514.                                                 </td>
  515.                                                 <td class="align-middle text-center">
  516.                                                     <div class="input-group input-group-sm">
  517.                                                         <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 }}"/>
  518.                                                         <span class="input-group-btn">
  519.                                                     <button type="button" class="btn btn-default update_tracking_number" data-target="#tracking_number_{{ Shipping.id }}">
  520.                                                         <i class="fa fa-check fa-lg text-secondary" aria-hidden="true"></i>
  521.                                                     </button>
  522.                                                 </span>
  523.                                                     </div>
  524.                                                 </td>
  525.                                                 <td class="align-middle text-center">
  526.                                                     {{ Shipping.name01 ~ Shipping.name02 }}<br>
  527.                                                     {{ Shipping.Pref.name }}
  528.                                                 </td>
  529.                                                 <td class="align-middle pe-3">
  530.                                                     <div class="text-end">
  531.                                                         <div class="px-1 d-inline-block">
  532.                                                             <a class="btn btn-ec-actionIcon confirmationModal"
  533.                                                                data-type="mail" data-bulk-update="false"
  534.                                                                data-preview-notify-mail-url="{{ url('admin_shipping_preview_notify_mail', { id: Shipping.id}) }}"
  535.                                                                data-notify-mail-url="{{ url('admin_shipping_notify_mail', { id: Shipping.id}) }}"
  536.                                                                data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'admin.order.shipping_mail_send'|trans }}">
  537.                                                                 <i class="fa fa-send fa-lg text-secondary" aria-hidden="true"></i>
  538.                                                             </a>
  539.                                                         </div>
  540.                                                         <div class="px-1 d-inline-block">
  541.                                                             <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 }}">
  542.                                                                 <i class="fa fa-table fa-lg text-secondary" aria-hidden="true"></i>
  543.                                                             </a>
  544.                                                         </div>
  545.                                                         <div class="px-1 d-inline-block">
  546.                                                             <a class="btn btn-ec-actionIcon confirmationModal" href="javascript:;"
  547.                                                                data-id="{{ Shipping.id }}" data-type="status" data-bulk-update="false"
  548.                                                                data-update-status-id="{{ constant('Eccube\\Entity\\Master\\OrderStatus::DELIVERED') }}"
  549.                                                                data-update-status-url="{{ url('admin_shipping_update_order_status', { id: Shipping.id}) }}"
  550.                                                                data-preview-notify-mail-url="{{ url('admin_shipping_preview_notify_mail', { id: Shipping.id}) }}"
  551.                                                                data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'admin.order.to_shipped'|trans }}">
  552.                                                                 <i class="fa fa-check fa-lg text-secondary" aria-hidden="true"></i>
  553.                                                             </a>
  554.                                                         </div>
  555.                                                     </div>
  556.                                                 </td>
  557.                                             </tr>
  558.                                         {% endfor %}
  559.                                     {% endfor %}
  560.                                     </tbody>
  561.                                 </table>
  562.                                 <div class="row justify-content-md-center mb-4"></div>
  563.                             </div>
  564.                             <div class="row justify-content-md-center mb-4">
  565.                                 {% if pagination.totalItemCount > 0 %}
  566.                                     {% include "@admin/pager.twig" with { 'pages' : pagination.paginationData, 'routes' : 'admin_order_page' } %}
  567.                                 {% endif %}
  568.                             </div>
  569.                         </div>
  570.                     </form>
  571.                     {# 検索条件エラー時 #}
  572.                 {% elseif has_errors %}
  573.                     <div class="card rounded border-0">
  574.                         <div class="card-body p-4">
  575.                             <div class="text-center text-muted mb-4 h5">{{ 'admin.common.search_invalid_condition'|trans }}</div>
  576.                             <div class="text-center text-muted">{{ 'admin.common.search_try_change_condition'|trans }}</div>
  577.                         </div>
  578.                     </div>
  579.                     {# 検索結果なし #}
  580.                 {% else %}
  581.                     <div class="card rounded border-0">
  582.                         <div class="card-body p-4">
  583.                             <div class="text-center text-muted mb-4 h5">{{ 'admin.common.search_no_result'|trans }}</div>
  584.                             <div class="text-center text-muted">{{ 'admin.common.search_try_change_condition'|trans }}</div>
  585.                             <div class="text-center text-muted">{{ 'admin.common.search_try_advanced_search'|trans }}</div>
  586.                         </div>
  587.                     </div>
  588.                 {% endif %}
  589.                 <!-- 出荷済にする確認モーダル -->
  590.                 <div class="modal fade" id="sentUpdateModal" tabindex="-1" role="dialog" aria-labelledby="sentUpdateModal" aria-hidden="true" data-bs-keyboard="false" data-bs-backdrop="static">
  591.                     <div class="modal-dialog modal-lg" role="document">
  592.                         <div class="modal-content">
  593.                             <div class="modal-header">
  594.                                 <h5 class="modal-title fw-bold"><!--confirmationModal_js.twig--></h5>
  595.                                 <button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
  596.                             </div>
  597.                             <div class="modal-body">
  598.                                 <p class="modal-message"></p>
  599.                                 <ul id="bulkErrors"></ul>
  600.                                 <div id="bulk-options">
  601.                                     <div class="fw-bold mb-2 notificationMail">{{ 'admin.order.to_shipped__confirm_send_mail'|trans }}</div>
  602.                                     <div class="form-check form-check-inline">
  603.                                         <input class="form-check-input" type="checkbox" id="notificationMail">
  604.                                         <label class="form-check-label notificationMail">
  605.                                             {{ 'admin.order.to_shipped__confirm_send_mail_in_same_time'|trans }}
  606.                                         </label>
  607.                                     </div>
  608.                                     <div>
  609.                                         <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>
  610.                                         <div class="collapse bg-light p-4 ec-collapse bg-ec-formGray" id="viewEmail" style="word-wrap: break-word; word-break:break-all">
  611.                                             <pre></pre>
  612.                                         </div>
  613.                                     </div>
  614.                                 </div>
  615.                                 <div class="progress" style="display: none">
  616.                                     <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>
  617.                                 </div>
  618.                             </div>
  619.                             <div class="modal-footer">
  620.                                 <button class="btn btn-ec-sub" type="button" data-bs-dismiss="modal">{{ 'admin.common.cancel'|trans }}</button>
  621.                                 <button id="bulkChange" class="btn btn-ec-conversion" type="button"><!--confirmationModal_js.twig--></button>
  622.                                 <button id="bulkChangeComplete" class="btn btn-ec-regular" style="display: none" type="button">{{ 'admin.common.close'|trans }}</button>
  623.                             </div>
  624.                         </div>
  625.                     </div>
  626.                 </div>
  627.                 <!-- 一括削除の確認モーダル -->
  628.                 <div class="modal fade" id="bulkDeleteModal" tabindex="-1" role="dialog" aria-labelledby="discontinuance" aria-hidden="true" data-bs-keyboard="false" data-bs-backdrop="static">
  629.                     <div class="modal-dialog" role="document">
  630.                         <div class="modal-content">
  631.                             <div class="modal-header">
  632.                                 <h5 class="modal-title fw-bold">{{ 'admin.order.delete__confirm_title'|trans }}</h5>
  633.                                 <button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
  634.                             </div>
  635.                             <div class="modal-body text-start">
  636.                                 <p class="text-start">{{ 'admin.order.delete__confirm_message'|trans }}</p>
  637.                                 <ul id="bulkErrors"></ul>
  638.                                 <div class="progress" style="display: none">
  639.                                     <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>
  640.                                 </div>
  641.                             </div>
  642.                             <div class="modal-footer">
  643.                                 <button class="btn btn-ec-sub" type="button" data-bs-dismiss="modal">{{ 'admin.common.cancel'|trans }}</button>
  644.                                 <button class="btn btn-ec-delete" type="button" id="btn_bulk_delete">{{ 'admin.common.delete' | trans }}</button>
  645.                             </div>
  646.                         </div>
  647.                     </div>
  648.                 </div>
  649.             </div>
  650.         </div>
  651.     </div>
  652. {% endblock %}