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-10">
  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>
  401.                         <div style="margin: 10px; 0">
  402.                             <div class=" text-end">
  403.                                 <div class="d-inline-block align-bottom">
  404.                                     <select class="form-select" onchange="location = this.value;">
  405.                                         {% for pageMax in pageMaxis %}
  406.                                             <option {% if pageMax.name == page_count %} selected {% endif %}
  407.                                                     value="{{ path('admin_order_page', {'page_no': 1, 'page_count': pageMax.name}) }}">
  408.                                                 {{ 'admin.common.count'|trans({ '%count%': pageMax.name }) }}</option>
  409.                                         {% endfor %}
  410.                                     </select>
  411.                                 </div>
  412.                                 <div class="d-inline-block">
  413.                                     <div class="btn-group" role="group">
  414.                                         <div class="btn-group" role="group">
  415.                                             <button type="button" class="btn btn-ec-regular" data-bs-toggle="dropdown" id="csvDownloadDropDown">
  416.                                                 <i class="fa fa-cloud-download me-1 text-secondary"></i>
  417.                                                 <span>{{ 'admin.common.csv_download'|trans }}</span>
  418.                                             </button>
  419.                                             <div class="dropdown-menu">
  420.                                                 <a class="dropdown-item" href="{{ url('admin_order_export_order') }}" id="orderCsvDownload">
  421.                                                     {{ 'admin.order.order_csv'|trans }}
  422.                                                 </a>
  423.                                                 <a class="dropdown-item" href="{{ url('admin_order_export_shipping') }}" id="shippingCsvDownload">
  424.                                                     {{ 'admin.order.shipping_csv'|trans }}
  425.                                                 </a>
  426.                                             </div>
  427.                                         </div>
  428.                                         <div class="btn-group" role="group">
  429.                                             <button type="button" class="btn btn-ec-regular" data-bs-toggle="dropdown" id="csvSettingDropDown">
  430.                                                 <i class="fa fa-cog me-1 text-secondary"></i>
  431.                                                 <span>{{ 'admin.setting.shop.csv_setting'|trans }}</span>
  432.                                             </button>
  433.                                             <div class="dropdown-menu">
  434.                                                 <a class="dropdown-item" href="{{ url('admin_setting_shop_csv', { id : constant('\\Eccube\\Entity\\Master\\CsvType::CSV_TYPE_ORDER') }) }}" id="orderCsvSetting">
  435.                                                     {{ 'admin.order.order_csv'|trans }}
  436.                                                 </a>
  437.                                                 <a class="dropdown-item" href="{{ url('admin_setting_shop_csv', { id : constant('\\Eccube\\Entity\\Master\\CsvType::CSV_TYPE_SHIPPING') }) }}" id="shippingCsvSetting">
  438.                                                     {{ 'admin.order.shipping_csv'|trans }}
  439.                                                 </a>
  440.                                             </div>
  441.                                         </div>
  442.                                     </div>
  443.                                 </div>
  444.                             </div>
  445.                         </div>
  446.                         <div class="card rounded border-0 mb-4 d-block">
  447.                             <div class="card-body p-0">
  448.                                 <table class="table table-sm" id="search_result">
  449.                                     <thead>
  450.                                     <tr>
  451.                                         <th class="border-top-0 pt-2 pb-2 text-center ps-3">
  452.                                             <input type="checkbox" id="toggle_check_all" name="filter" value="open">
  453.                                         </th>
  454.                                         <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>
  455.                                         <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>
  456.                                         <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>
  457.                                         <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>
  458.                                         <th class="border-top-0 pt-2 pb-2 text-center">{{ 'admin.order.message_short'|trans }}</th>
  459.                                         <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>
  460.                                         <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>
  461.                                         <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>
  462.                                         <th class="border-top-0 pt-2 pb-2 text-center pe-3"></th>
  463.                                     </tr>
  464.                                     </thead>
  465.                                     <tbody>
  466.                                     {% for Order in pagination %}
  467.                                         {% for Shipping in Order.Shippings %}
  468.                                             <tr>
  469.                                                 <td class="align-middle text-center ps-3">
  470.                                                     <input type="checkbox" id="check_{{ Shipping.id }}" data-id="{{ Shipping.id }}" name="ids[]" value="{{ Shipping.id }}"
  471.                                                            data-preview-notify-mail-url="{{ url('admin_shipping_preview_notify_mail', { id: Shipping.id}) }}"
  472.                                                            data-notify-mail-url="{{ url('admin_shipping_notify_mail', { id: Shipping.id}) }}"
  473.                                                            data-update-status-url="{{ url('admin_shipping_update_order_status', { id: Shipping.id}) }}"
  474.                                                     />
  475.                                                 </td>
  476.                                                 <td class="align-middle text-start">
  477.                                                     <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>
  478.                                                 </td>
  479.                                                 <td class="align-middle text-center">
  480.                                                     {{ Order.payment_method }}
  481.                                                 </td>
  482.                                                 <td class="align-middle text-center">
  483.                                                     <span class="badge badge-ec-blue" style="background-color: #fff; color: {{ Order.OrderStatusColor }}; border-color: {{ Order.OrderStatusColor }}">{{ Order.OrderStatus }}</span>
  484.                                                 </td>
  485.                                                 <td class="align-middle text-end">
  486.                                                     {{ Order.payment_total|price }}<br>
  487.                                                     {{ Order.payment_date ? Order.payment_date|date_day : 'admin.order.not_payment'|trans }}
  488.                                                 </td>
  489.                                                 <td class="align-middle text-center">
  490.                                                     {% if Order.message is not empty %}
  491.                                                         <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">
  492.                                                             <i class="fa fa-commenting fa-lg text-secondary" aria-hidden="true"></i>
  493.                                                         </a>
  494.                                                     {% elseif Order.note is not empty %}
  495.                                                         <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">
  496.                                                             <i class="fa fa-commenting fa-lg text-secondary" aria-hidden="true"></i>
  497.                                                         </a>
  498.                                                     {% endif %}
  499.                                                 </td>
  500.                                                 <td class="align-middle text-center">
  501.                                                     {% if Order.is_multiple %}
  502.                                                         <a href="{{ url('admin_shipping_edit', { id: Order.id }) }}">
  503.                                                             {% if Shipping.shipping_date %}
  504.                                                                 {{ Shipping.shipping_date|date_day }}
  505.                                                             {% else %}
  506.                                                                 {{ 'admin.order.unshipped'|trans }}
  507.                                                             {% endif %}
  508.                                                         </a>
  509.                                                     {% else %}
  510.                                                         {{ Shipping.shipping_date ? Shipping.shipping_date|date_day : 'admin.order.unshipped'|trans }}
  511.                                                     {% endif %}
  512.                                                     {% if Shipping.mail_send_date %}
  513.                                                         {% set send_mail_date = Shipping.mail_send_date|date_min %}
  514.                                                         <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>
  515.                                                     {% endif %}
  516.                                                 </td>
  517.                                                 <td class="align-middle text-center">
  518.                                                     <div class="input-group input-group-sm">
  519.                                                         <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 }}"/>
  520.                                                         <span class="input-group-btn">
  521.                                                     <button type="button" class="btn btn-default update_tracking_number" data-target="#tracking_number_{{ Shipping.id }}">
  522.                                                         <i class="fa fa-check fa-lg text-secondary" aria-hidden="true"></i>
  523.                                                     </button>
  524.                                                 </span>
  525.                                                     </div>
  526.                                                 </td>
  527.                                                 <td class="align-middle text-center">
  528.                                                     {{ Shipping.name01 ~ Shipping.name02 }}<br>
  529.                                                     {{ Shipping.Pref.name }}
  530.                                                 </td>
  531.                                                 <td class="align-middle pe-3">
  532.                                                     <div class="text-end">
  533.                                                         <div class="px-1 d-inline-block">
  534.                                                             <a class="btn btn-ec-actionIcon confirmationModal"
  535.                                                                data-type="mail" data-bulk-update="false"
  536.                                                                data-preview-notify-mail-url="{{ url('admin_shipping_preview_notify_mail', { id: Shipping.id}) }}"
  537.                                                                data-notify-mail-url="{{ url('admin_shipping_notify_mail', { id: Shipping.id}) }}"
  538.                                                                data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'admin.order.shipping_mail_send'|trans }}">
  539.                                                                 <i class="fa fa-send fa-lg text-secondary" aria-hidden="true"></i>
  540.                                                             </a>
  541.                                                         </div>
  542.                                                         <div class="px-1 d-inline-block">
  543.                                                             <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 }}">
  544.                                                                 <i class="fa fa-table fa-lg text-secondary" aria-hidden="true"></i>
  545.                                                             </a>
  546.                                                         </div>
  547.                                                         <div class="px-1 d-inline-block">
  548.                                                             <a class="btn btn-ec-actionIcon confirmationModal" href="javascript:;"
  549.                                                                data-id="{{ Shipping.id }}" data-type="status" data-bulk-update="false"
  550.                                                                data-update-status-id="{{ constant('Eccube\\Entity\\Master\\OrderStatus::DELIVERED') }}"
  551.                                                                data-update-status-url="{{ url('admin_shipping_update_order_status', { id: Shipping.id}) }}"
  552.                                                                data-preview-notify-mail-url="{{ url('admin_shipping_preview_notify_mail', { id: Shipping.id}) }}"
  553.                                                                data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'admin.order.to_shipped'|trans }}">
  554.                                                                 <i class="fa fa-check fa-lg text-secondary" aria-hidden="true"></i>
  555.                                                             </a>
  556.                                                         </div>
  557.                                                     </div>
  558.                                                 </td>
  559.                                             </tr>
  560.                                         {% endfor %}
  561.                                     {% endfor %}
  562.                                     </tbody>
  563.                                 </table>
  564.                                 <div class="row justify-content-md-center"></div>
  565.                             </div>
  566.                             <div class="row justify-content-md-center pb-4 mb-4">
  567.                                 {% if pagination.totalItemCount > 0 %}
  568.                                     {% include "@admin/pager.twig" with { 'pages' : pagination.paginationData, 'routes' : 'admin_order_page' } %}
  569.                                 {% endif %}
  570.                             </div>
  571.                         </div>
  572.                     </form>
  573.                     {# 検索条件エラー時 #}
  574.                 {% elseif has_errors %}
  575.                     <div class="card rounded border-0">
  576.                         <div class="card-body p-4">
  577.                             <div class="text-center text-muted mb-4 h5">{{ 'admin.common.search_invalid_condition'|trans }}</div>
  578.                             <div class="text-center text-muted">{{ 'admin.common.search_try_change_condition'|trans }}</div>
  579.                         </div>
  580.                     </div>
  581.                     {# 検索結果なし #}
  582.                 {% else %}
  583.                     <div class="card rounded border-0">
  584.                         <div class="card-body p-4">
  585.                             <div class="text-center text-muted mb-4 h5">{{ 'admin.common.search_no_result'|trans }}</div>
  586.                             <div class="text-center text-muted">{{ 'admin.common.search_try_change_condition'|trans }}</div>
  587.                             <div class="text-center text-muted">{{ 'admin.common.search_try_advanced_search'|trans }}</div>
  588.                         </div>
  589.                     </div>
  590.                 {% endif %}
  591.                 <!-- 出荷済にする確認モーダル -->
  592.                 <div class="modal fade" id="sentUpdateModal" tabindex="-1" role="dialog" aria-labelledby="sentUpdateModal" aria-hidden="true" data-bs-keyboard="false" data-bs-backdrop="static">
  593.                     <div class="modal-dialog modal-lg" role="document">
  594.                         <div class="modal-content">
  595.                             <div class="modal-header">
  596.                                 <h5 class="modal-title fw-bold"><!--confirmationModal_js.twig--></h5>
  597.                                 <button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
  598.                             </div>
  599.                             <div class="modal-body">
  600.                                 <p class="modal-message"></p>
  601.                                 <ul id="bulkErrors"></ul>
  602.                                 <div id="bulk-options">
  603.                                     <div class="fw-bold mb-2 notificationMail">{{ 'admin.order.to_shipped__confirm_send_mail'|trans }}</div>
  604.                                     <div class="form-check form-check-inline">
  605.                                         <input class="form-check-input" type="checkbox" id="notificationMail">
  606.                                         <label class="form-check-label notificationMail">
  607.                                             {{ 'admin.order.to_shipped__confirm_send_mail_in_same_time'|trans }}
  608.                                         </label>
  609.                                     </div>
  610.                                     <div>
  611.                                         <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>
  612.                                         <div class="collapse bg-light p-4 ec-collapse bg-ec-formGray" id="viewEmail" style="word-wrap: break-word; word-break:break-all">
  613.                                             <pre></pre>
  614.                                         </div>
  615.                                     </div>
  616.                                 </div>
  617.                                 <div class="progress" style="display: none">
  618.                                     <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>
  619.                                 </div>
  620.                             </div>
  621.                             <div class="modal-footer">
  622.                                 <button class="btn btn-ec-sub" type="button" data-bs-dismiss="modal">{{ 'admin.common.cancel'|trans }}</button>
  623.                                 <button id="bulkChange" class="btn btn-ec-conversion" type="button"><!--confirmationModal_js.twig--></button>
  624.                                 <button id="bulkChangeComplete" class="btn btn-ec-regular" style="display: none" type="button">{{ 'admin.common.close'|trans }}</button>
  625.                             </div>
  626.                         </div>
  627.                     </div>
  628.                 </div>
  629.                 <!-- 一括削除の確認モーダル -->
  630.                 <div class="modal fade" id="bulkDeleteModal" tabindex="-1" role="dialog" aria-labelledby="discontinuance" aria-hidden="true" data-bs-keyboard="false" data-bs-backdrop="static">
  631.                     <div class="modal-dialog" role="document">
  632.                         <div class="modal-content">
  633.                             <div class="modal-header">
  634.                                 <h5 class="modal-title fw-bold">{{ 'admin.order.delete__confirm_title'|trans }}</h5>
  635.                                 <button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
  636.                             </div>
  637.                             <div class="modal-body text-start">
  638.                                 <p class="text-start">{{ 'admin.order.delete__confirm_message'|trans }}</p>
  639.                                 <ul id="bulkErrors"></ul>
  640.                                 <div class="progress" style="display: none">
  641.                                     <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>
  642.                                 </div>
  643.                             </div>
  644.                             <div class="modal-footer">
  645.                                 <button class="btn btn-ec-sub" type="button" data-bs-dismiss="modal">{{ 'admin.common.cancel'|trans }}</button>
  646.                                 <button class="btn btn-ec-delete" type="button" id="btn_bulk_delete">{{ 'admin.common.delete' | trans }}</button>
  647.                             </div>
  648.                         </div>
  649.                     </div>
  650.                 </div>
  651.             </div>
  652.         </div>
  653.     </div>
  654. {% endblock %}