{{:ModuleInclude('public/header')}}

<!-- header top nav -->
{{:ModuleInclude('public/header_top_nav')}}

<!-- header simple nav -->
{{:ModuleInclude('public/header_nav_simple')}}

<!-- 面包屑导航 -->
{{:ModuleInclude('public/breadcrumb_data')}}
<!-- content -->
<div class="am-container user-main am-margin-top-0 am-background-white am-radius-lg">
    <!-- content start -->
    <div class="user-content">
        <div class="user-content-body">
            <!-- 用户订单详情内顶部-开始 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_user_order_detail_inside_top</span>
                </div>
            {{/if}}
            {{php}}
                $hook_name = 'plugins_view_user_order_detail_inside_top';
                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                if(!empty($hook_data) && is_array($hook_data))
                {
                    foreach($hook_data as $hook)
                    {
                        if(is_string($hook) || is_int($hook))
                        {
                            echo htmlspecialchars_decode($hook);
                        }
                    }
                }
            {{/php}}
            <!-- 用户订单详情内顶部-结束 -->

            <h1 class="am-text-xl am-font-weight">{{:MyLang('order.detail_base_nav_title')}}</h1>
            <!-- 用户订单详情状态环节顶部-开始 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_user_order_detail_progress_top</span>
                </div>
            {{/if}}
            {{php}}
                $hook_name = 'plugins_view_user_order_detail_progress_top';
                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                if(!empty($hook_data) && is_array($hook_data))
                {
                    foreach($hook_data as $hook)
                    {
                        if(is_string($hook) || is_int($hook))
                        {
                            echo htmlspecialchars_decode($hook);
                        }
                    }
                }
            {{/php}}
            <!-- 用户订单详情状态环节顶部-结束 -->

            <!-- 进度环节 -->
            {{if !empty($step_data)}}
                <ul class="progress progress-{{:count($step_data)}}">
                    {{foreach $step_data as $k=>$v}}
                        <li class="{{if $v['is_check'] eq 1}} steps-success{{/if}} {{if $v['is_current'] eq 1}} current{{/if}}">
                            {{if $k gt 0}}
                                <i class="step"></i>
                            {{/if}}
                            <p class="digital"></p>
                            <div class="base">
                                <p class="title">{{$v.title}}</p>
                                {{if !empty($v['time'])}}
                                    <p class="date am-margin-top-xs">{{$v.time}}</p>
                                {{/if}}
                            </div>
                        </li>
                    {{/foreach}}
                </ul>
            {{/if}}

            <!-- 用户订单详情基础信息顶部-开始 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_user_order_detail_base_top</span>
                </div>
            {{/if}}
            {{php}}
                $hook_name = 'plugins_view_user_order_detail_base_top';
                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                if(!empty($hook_data) && is_array($hook_data))
                {
                    foreach($hook_data as $hook)
                    {
                        if(is_string($hook) || is_int($hook))
                        {
                            echo htmlspecialchars_decode($hook);
                        }
                    }
                }
            {{/php}}
            <!-- 用户订单详情基础信息顶部-结束 -->
            <!-- 订单状态 -->
            <div class="order-state">
                <div class="am-panel am-panel-default am-radius">
                    <div class="am-panel-hd">{{:MyLang('order.order_status_title')}}</div>
                    <div class="am-panel-bd">
                        <h1 class="am-text-xl am-font-weight {{if !empty($data['operate_data'])}}{{if $data['operate_data']['is_pay'] eq 1}}am-color-main{{/if}}{{/if}}">{{$data.status_name}}</h1>
                        <div class="items am-cf">
                            <div class="items-title am-fl">{{:MyLang('order.order_base_order_no_title')}}</div>
                            <div class="items-detail am-fl text-copy-submit" data-value="{{$data.order_no}}">
                                <span>{{$data.order_no}}</span>
                                <span class="am-badge am-badge-success am-radius">{{:MyLang('copy_title')}}</span>
                            </div>
                        </div>

                        <!-- 快递信息、一条快递信息 -->
                        {{if $data['order_model'] eq 0 and in_array($data['status'], [3,4]) and !empty($data.express_data) and is_array($data.express_data) and !empty($data.express_data[0]) and count($data['express_data']) eq 1}}
                            <div class="logistics">
                                <div class="items am-cf">
                                    <div class="items-title am-fl">{{:MyLang('order.form_table_express.name')}}</div>
                                    <div class="items-detail am-fl">
                                        {{if empty($data['express_data'][0]['express_website_url'])}}
                                            {{if !empty($data['express_data'][0]['express_icon'])}}
                                                <img src="{{$data['express_data'][0]['express_icon']}}" class="am-img-thumbnail am-radius am-vertical-align-middle" width="20" height="20" alt="{{$data['express_data'][0]['express_name']}}" />
                                            {{/if}}
                                            <span class="am-vertical-align-middle">{{$data['express_data'][0]['express_name']}}</span>
                                        {{else /}}
                                            <a href="{{$data['express_data'][0]['express_website_url']}}" target="_blank">
                                                {{if !empty($data['express_data'][0]['express_icon'])}}
                                                    <img src="{{$data['express_data'][0]['express_icon']}}" class="am-img-thumbnail am-radius am-vertical-align-middle" width="20" height="20" alt="{{$data['express_data'][0]['express_name']}}" />
                                                {{/if}}
                                                <span class="am-vertical-align-middle">{{$data['express_data'][0]['express_name']}}</span>
                                            </a>
                                        {{/if}}
                                    </div>
                                </div>
                                <div class="items am-cf">
                                    <div class="items-title am-fl">{{:MyLang('order.form_table_express.number')}}</div>
                                    <div class="items-detail am-fl">{{$data['express_data'][0]['express_number']}}</div>
                                </div>
                                {{if !empty($data['express_data'][0]['note'])}}
                                    <div class="items am-cf">
                                        <div class="items-title am-fl">{{:MyLang('order.form_table_express.note')}}</div>
                                        <div class="items-detail am-fl">{{$data['express_data'][0]['note']}}</div>
                                    </div>
                                {{/if}}
                                {{if !empty($data['express_data'][0]['add_time'])}}
                                    <div class="items am-cf">
                                        <div class="items-title am-fl">{{:MyLang('order.form_table_express.time')}}</div>
                                        <div class="items-detail am-fl">{{$data['express_data'][0]['add_time']}}</div>
                                    </div>
                                {{/if}}
                            </div>
                        {{/if}}
                        <!-- 线下支付方式提示信息 -->
                        {{if in_array($data['status'], [1]) and $data['is_under_line'] eq 1}}
                            <div class="am-alert am-alert-warning">
                                <p>{{:MyLang('common_service.order.order_under_line_tips', ['payment'=>'<strong class="am-text-success">'.$data['payment_name'].'</strong>'])}}</p>
                            </div>
                        {{/if}}

                        <!-- 待发货提示信息 -->
                        {{if in_array($data['status'], [2])}}
                            <div class="am-alert am-alert-primary">
                                <p>{{:MyLang('common_service.order.order_delivery_tips')}}</p>
                            </div>
                        {{/if}}

                        <!-- 订单详情操作顶部钩子 -->
                        {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                            <div class="plugins-tag">
                                <span>plugins_view_index_order_detail_operate_top</span>
                            </div>
                        {{/if}}
                        {{php}}
                            $hook_name = 'plugins_view_index_order_detail_operate_top';
                            $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'id'=>$data['id'], 'data'=>$data]);
                            if(!empty($hook_data) && is_array($hook_data))
                            {
                                foreach($hook_data as $hook)
                                {
                                    if(is_string($hook) || is_int($hook))
                                    {
                                        echo htmlspecialchars_decode($hook);
                                    }
                                }
                            }
                        {{/php}}

                        <!-- 订单详情操作 -->
                        <div class="operation">
                            <!-- 0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭 -->
                            {{if !empty($data['operate_data'])}}
                                {{if $data['operate_data']['is_pay'] eq 1}}
                                    <!-- 去支付 -->
                                    <button class="am-btn am-btn-primary am-btn-sm am-radius submit-pay" data-id="{{$data.id}}" data-payment-id="{{$data.payment_id}}">
                                        {{:MyLang('go_payment_title')}}
                                    </button>
                                {{/if}}
                                {{if $data['operate_data']['is_cancel'] eq 1}}
                                    <!-- 取消 -->
                                    <button type="button" class="am-btn am-btn-primary-plain am-btn-sm am-radius submit-ajax submit-cancel" data-url="{{:MyUrl('index/order/cancel')}}" data-id="{{$data.id}}" data-view="reload">
                                        {{:MyLang('cancel_order_title')}}
                                    </button>
                                {{/if}}
                                {{if $data['operate_data']['is_collect'] eq 1}}
                                    <!-- 确认收货 -->
                                    <button type="button" class="am-btn am-btn-primary am-btn-sm am-radius submit-ajax submit-confirm" data-url="{{:MyUrl('index/order/collect')}}" data-id="{{$data.id}}" data-view="reload" data-msg="{{:MyLang('collect_confirm_tips')}}">
                                        {{:MyLang('confirm_collect_title')}}
                                    </button>
                                {{/if}}
                                {{if $data['operate_data']['is_comments'] eq 1}}
                                    <!-- 评价 -->
                                    <a href="{{:MyUrl('index/order/comments', ['id'=>$data['id']])}}" target="_blank" class="am-btn am-btn-primary-plain am-btn-sm am-radius">
                                        {{:MyLang('go_comment_title')}}
                                    </a>
                                {{/if}}
                                {{if $data['operate_data']['is_delete'] eq 1}}
                                    <!-- 删除订单 -->
                                    <button type="button" class="am-btn am-btn-primary-plain am-btn-sm am-radius submit-delete" data-url="{{:MyUrl('index/order/delete')}}" data-id="{{$data.id}}" data-view="jump" data-value="{{:MyUrl('index/order/index')}}">
                                        {{:MyLang('delete_order_title')}}
                                    </button>
                                {{/if}}
                            {{/if}}
    
                            <!-- 订单详情操作钩子 -->
                            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                                <div class="plugins-tag">
                                    <span>plugins_view_index_order_detail_operate</span>
                                </div>
                            {{/if}}
                            {{php}}
                                $hook_name = 'plugins_view_index_order_detail_operate';
                                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'id'=>$data['id'], 'data'=>$data]);
                                if(!empty($hook_data) && is_array($hook_data))
                                {
                                    foreach($hook_data as $hook)
                                    {
                                        if(is_string($hook) || is_int($hook))
                                        {
                                            echo htmlspecialchars_decode($hook);
                                        }
                                    }
                                }
                            {{/php}}
                        </div>

                        <!-- 订单详情操作底部钩子 -->
                        {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                            <div class="plugins-tag">
                                <span>plugins_view_index_order_detail_operate_buttom</span>
                            </div>
                        {{/if}}
                        {{php}}
                            $hook_name = 'plugins_view_index_order_detail_operate_buttom';
                            $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'id'=>$data['id'], 'data'=>$data]);
                            if(!empty($hook_data) && is_array($hook_data))
                            {
                                foreach($hook_data as $hook)
                                {
                                    if(is_string($hook) || is_int($hook))
                                    {
                                        echo htmlspecialchars_decode($hook);
                                    }
                                }
                            }
                        {{/php}}

                        <!-- 自提模式下 - 取货码 -->
                        {{if $data['order_model'] eq 2 and in_array($data['status'], [2,3]) and !empty($data['extraction_data'])}}
                            <div class="extraction-take-container am-inline-block am-background-body am-radius am-text-center am-padding-lg">
                                {{if !empty($data['extraction_data']['images'])}}
                                    <p class="am-margin-bottom-xs">
                                        <img class="qrcode-images am-img-thumbnail am-radius am-block common-annex-view-event" src="{{$data.extraction_data.images}}" alt="{{:MyLang('order.order_base_take_code_title')}}" width="130" height="130" data-is-download="1" />
                                    </p>
                                {{/if}}
                                <p class="am-text-sm">
                                    <span class="am-vertical-align-middle">{{:MyLang('order.order_base_take_code_title')}}</span>
                                    {{if empty($data['extraction_data']['code'])}}
                                        <span class="am-text-danger am-vertical-align-middle">{{:MyLang('order.order_base_take_code_no_exist_tips')}}</span>
                                    {{else /}}
                                        <span class="extraction-take-title am-text-default am-font-weight text-copy-submit am-vertical-align-middle" data-value="{{$data.extraction_data.code}}">{{$data.extraction_data.code}}</span>
                                    {{/if}}
                                </p>
                                {{if !empty($data['extraction_data']['name']) or !empty($data['extraction_data']['tel'])}}
                                    <p class="am-margin-top-xs">
                                        {{if !empty($data['extraction_data']['name'])}}
                                            <span class="text-copy-submit am-margin-right-sm">{{$data.extraction_data.name}}</span>
                                        {{/if}}
                                        {{if !empty($data['extraction_data']['tel'])}}
                                            <span class="text-copy-submit">{{$data.extraction_data.tel}}</span>
                                        {{/if}}
                                    </p>
                                {{/if}}
                            </div>
                        {{/if}}
                    </div>
                </div>
            </div>

            <!-- 用户订单详情状态信息底部-开始 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_user_order_detail_order_state_bottom</span>
                </div>
            {{/if}}
            {{php}}
                $hook_name = 'plugins_view_user_order_detail_order_state_bottom';
                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                if(!empty($hook_data) && is_array($hook_data))
                {
                    foreach($hook_data as $hook)
                    {
                        if(is_string($hook) || is_int($hook))
                        {
                            echo htmlspecialchars_decode($hook);
                        }
                    }
                }
            {{/php}}
            <!-- 用户订单详情状态信息底部-结束 -->

            <!-- 订单快递、多条快递信息 -->
            {{if in_array($data['order_model'], [0,1]) and in_array($data['status'], [3,4]) and !empty($data.express_data) and is_array($data.express_data) and count($data['express_data']) gt 1}}
                <div class="order-express">
                    <div class="am-panel am-panel-default business-panel">
                        <div class="am-panel-hd">{{:MyLang('common_service.order.delivery_express_info')}}</div>
                        <div class="am-panel-bd">
                            <div class="am-scrollable-horizontal">
                                <table class="am-table am-text-left am-margin-bottom-0  am-text-nowrap">
                                    <thead>
                                        <tr>
                                            <th>{{:MyLang('order.form_table_express.name')}}</th>
                                            <th>{{:MyLang('order.form_table_express.number')}}</th>
                                            <th>{{:MyLang('order.form_table_express.note')}}</th>
                                            <th>{{:MyLang('order.form_table_express.time')}}</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {{foreach $data.express_data as $v}}
                                            <tr class="am-nbfc am-padding-vertical-sm">
                                                <td>
                                                    {{if empty($v['express_website_url'])}}
                                                        {{if !empty($v['express_icon'])}}
                                                            <img src="{{$v.express_icon}}" class="am-img-thumbnail am-radius am-vertical-align-middle" width="20" height="20" alt="{{$v.express_name}}" />
                                                        {{/if}}
                                                        <span class="am-vertical-align-middle">{{$v.express_name}}</span>
                                                    {{else /}}
                                                        <a href="{{$v.express_website_url}}" target="_blank">
                                                            {{if !empty($v['express_icon'])}}
                                                                <img src="{{$v.express_icon}}" class="am-img-thumbnail am-radius am-vertical-align-middle" width="20" height="20" alt="{{$v.express_name}}" />
                                                            {{/if}}
                                                            <span class="am-vertical-align-middle">{{$v.express_name}}</span>
                                                        </a>
                                                    {{/if}}
                                                </td>
                                                <td>
                                                    <span class="text-copy-submit">{{$v.express_number}}</span>
                                                </td>
                                                <td>{{$v.note}}</td>
                                                <td>{{$v.add_time}}</td>
                                            </tr>
                                        {{/foreach}}
                                    </tbody>
                                </table>
                            </div>

                            <!-- 用户订单详情快递信息内部底部-开始 -->
                            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                                <div class="plugins-tag">
                                    <span>plugins_view_user_order_detail_express_inside_bottom</span>
                                </div>
                            {{/if}}
                            {{php}}
                                $hook_name = 'plugins_view_user_order_detail_express_inside_bottom';
                                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                                if(!empty($hook_data) && is_array($hook_data))
                                {
                                    foreach($hook_data as $hook)
                                    {
                                        if(is_string($hook) || is_int($hook))
                                        {
                                            echo htmlspecialchars_decode($hook);
                                        }
                                    }
                                }
                            {{/php}}
                            <!-- 用户订单详情快递信息内部底部-结束 -->
                        </div>
                    </div>
                </div>
            {{/if}}

            <!-- 用户订单详情快递信息底部-开始 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_user_order_detail_express_bottom</span>
                </div>
            {{/if}}
            {{php}}
                $hook_name = 'plugins_view_user_order_detail_express_bottom';
                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                if(!empty($hook_data) && is_array($hook_data))
                {
                    foreach($hook_data as $hook)
                    {
                        if(is_string($hook) || is_int($hook))
                        {
                            echo htmlspecialchars_decode($hook);
                        }
                    }
                }
            {{/php}}
            <!-- 用户订单详情快递信息底部-结束 -->

            <!-- 订单服务 -->
            {{if !empty($data['service_data'])}}
                <div class="order-service">
                    <div class="am-panel am-panel-default business-panel">
                        <div class="am-panel-hd">{{:MyLang('order.detail_service_title')}}</div>
                        <div class="am-panel-bd">
                            <div class="am-scrollable-horizontal">
                                <table class="am-table am-text-left am-margin-bottom-0 am-text-nowrap">
                                    <thead>
                                        <tr>
                                            <th>{{:MyLang('order.order_base_service_name')}}</th>
                                            <th>{{:MyLang('order.order_base_service_mobile')}}</th>
                                            <th>{{:MyLang('order.order_base_service_time')}}</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {{foreach $data.service_data as $v}}
                                            <tr>
                                                <td>
                                                    <span class="text-copy-submit">{{$v.service_name}}</span>
                                                </td>
                                                <td>
                                                    <span class="text-copy-submit">{{$v.service_mobile}}</span>
                                                </td>
                                                <td>
                                                    <span class="text-copy-submit">
                                                        {{if !empty($v['service_duration_minute_text'])}}
                                                            <span class="am-fr"><i class="am-icon-history"></i> {{$v.service_duration_minute_text}}</span>
                                                        {{/if}}
                                                        {{if !empty($v['service_start_time'])}}
                                                            <p>{{$v.service_start_time}}</p>
                                                        {{/if}}
                                                        {{if !empty($v['service_end_time'])}}
                                                            <p>{{$v.service_end_time}}</p>
                                                        {{/if}}
                                                    </span>
                                                </td>
                                            </tr>
                                        {{/foreach}}
                                    </tbody>
                                </table>
                            </div>

                            <!-- 用户订单详情服务信息内部底部-开始 -->
                            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                                <div class="plugins-tag">
                                    <span>plugins_view_user_order_detail_service_inside_bottom</span>
                                </div>
                            {{/if}}
                            {{php}}
                                $hook_name = 'plugins_view_user_order_detail_service_inside_bottom';
                                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                                if(!empty($hook_data) && is_array($hook_data))
                                {
                                    foreach($hook_data as $hook)
                                    {
                                        if(is_string($hook) || is_int($hook))
                                        {
                                            echo htmlspecialchars_decode($hook);
                                        }
                                    }
                                }
                            {{/php}}
                            <!-- 用户订单详情服务信息内部底部-结束 -->
                        </div>
                    </div>
                </div>
            {{/if}}

            <!-- 用户订单详情服务信息底部-开始 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_user_order_detail_service_bottom</span>
                </div>
            {{/if}}
            {{php}}
                $hook_name = 'plugins_view_user_order_detail_service_bottom';
                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                if(!empty($hook_data) && is_array($hook_data))
                {
                    foreach($hook_data as $hook)
                    {
                        if(is_string($hook) || is_int($hook))
                        {
                            echo htmlspecialchars_decode($hook);
                        }
                    }
                }
            {{/php}}
            <!-- 用户订单详情服务信息底部-结束 -->

            <!-- 订单地址 -->
            {{if !empty($data['address_data'])}}
                <div class="order-address">
                    <div class="am-panel am-panel-default business-panel">
                        <div class="am-panel-hd">{{if $data.order_model eq 2}}{{:MyLang('order.detail_take_title')}}{{else /}}{{:MyLang('order.detail_shipping_address_title')}}{{/if}}</div>
                        <div class="am-panel-bd">
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{if $data['order_model'] eq 2}}{{:MyLang('order.order_contact_title')}}{{else /}} {{:MyLang('order.order_consignee_title')}}{{/if}}：</div>
                                <div class="items-detail am-fl">{{$data.address_data.name}}</div>
                            </div>
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_phone_title')}}：</div>
                                <div class="items-detail am-fl">{{$data.address_data.tel}}</div>
                            </div>
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{if $data.order_model eq 2}}{{:MyLang('order.detail_take_title')}}{{else /}}{{:MyLang('order.detail_shipping_address_title')}}{{/if}}：</div>
                                <div class="items-detail am-fl">
                                    {{if $data['order_model'] eq 0}}
                                        {{if !empty($data['address_data']['alias'])}}
                                            <span class="am-badge am-badge-primary">{{$data.address_data.alias}}</span>
                                        {{/if}}
                                    {{else /}}
                                        <span class="am-badge am-badge-primary">{{:MyLang('self_pickup_point_title')}}</span>
                                    {{/if}}
                                    <span>{{$data.address_data.province_name}} {{$data.address_data.city_name}} {{$data.address_data.county_name}} {{$data.address_data.address}}</span>
                                    {{if isset($data['address_data']['lng']) and isset($data['address_data']['lat']) and $data['address_data']['lng'] neq 0 and $data['address_data']['lat'] neq 0}}
                                        <button type="button" class="am-btn am-view-map submit-map-popup" data-lng="{{$data.address_data.lng}}" data-lat="{{$data.address_data.lat}}" data-title="{{:MyLang('view_map_title')}}">
                                            {{:MyLang('view_map_title')}}
                                        </button>
                                    {{/if}}
                                </div>
                            </div>
                            {{if !empty($data['address_data']['extraction_contact_name']) or !empty($data['address_data']['extraction_contact_tel']) or !empty($data['address_data']['appoint_time'])}}
                                <hr data-am-widget="divider" class="am-divider am-divider-dashed am-margin-vertical-xs">
                                <div class="items am-cf">
                                    {{if !empty($data['address_data']['extraction_contact_name']) or !empty($data['address_data']['extraction_contact_tel'])}}
                                        <div class="items-title am-fl">{{:MyLang('customer_info_title')}}：</div>
                                        <div class="items-detail am-fl">
                                            {{if !empty($data['address_data']['extraction_contact_name'])}}
                                                <span class="text-copy-submit am-margin-right-sm">{{$data.address_data.extraction_contact_name}}</span>
                                            {{/if}}
                                            {{if !empty($data['address_data']['extraction_contact_tel'])}}
                                                <span class="text-copy-submit am-margin-right-sm">{{$data.address_data.extraction_contact_tel}}</span>
                                            {{/if}}
                                        </div>
                                    {{/if}}
                                </div>
                                {{if !empty($data['address_data']['appoint_time'])}}
                                    <div class="items am-cf">
                                        <div class="items-title am-fl">{{:MyLang('appoint_time_title')}}：</div>
                                        <div class="items-detail am-fl">
                                            <span class="text-copy-submit am-color-red">{{$data.address_data.appoint_time}}</span>
                                        </div>
                                    </div>
                                {{/if}}
                            {{/if}}

                            <!-- 用户订单详情地址信息内部底部-开始 -->
                            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                                <div class="plugins-tag">
                                    <span>plugins_view_user_order_detail_address_inside_bottom</span>
                                </div>
                            {{/if}}
                            {{php}}
                                $hook_name = 'plugins_view_user_order_detail_address_inside_bottom';
                                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                                if(!empty($hook_data) && is_array($hook_data))
                                {
                                    foreach($hook_data as $hook)
                                    {
                                        if(is_string($hook) || is_int($hook))
                                        {
                                            echo htmlspecialchars_decode($hook);
                                        }
                                    }
                                }
                            {{/php}}
                            <!-- 用户订单详情地址信息内部底部-结束 -->
                        </div>
                    </div>
                </div>
            {{/if}}

            <!-- 用户订单详情地址信息底部-开始 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_user_order_detail_address_bottom</span>
                </div>
            {{/if}}
            {{php}}
                $hook_name = 'plugins_view_user_order_detail_address_bottom';
                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                if(!empty($hook_data) && is_array($hook_data))
                {
                    foreach($hook_data as $hook)
                    {
                        if(is_string($hook) || is_int($hook))
                        {
                            echo htmlspecialchars_decode($hook);
                        }
                    }
                }
            {{/php}}
            <!-- 用户订单详情地址信息底部-结束 -->

            <!-- 虚拟销售信息 -->
            {{if $data['order_model'] eq 3 and $data['pay_status'] eq 1 and in_array($data['status'], [3,4])}}
                <div class="order-virtually">
                    <div class="am-panel am-panel-default am-radius business-panel">
                        <div class="am-panel-hd">{{$site_fictitious.title}}</div>
                        <div class="am-panel-bd">
                            {{if !empty($site_fictitious['tips'])}}
                                <div class="am-alert am-alert-warning am-margin-top-xs am-margin-bottom-0 am-margin-horizontal-sm" data-am-alert>
                                    {{$site_fictitious.tips|raw}}
                                </div>
                            {{/if}}
                            {{if !empty($data.items)}}
                                <ul class="am-list am-margin-bottom-0">
                                    {{foreach $data.items as $goods}}
                                        <li class="am-g am-list-item-thumb-left">
                                            <div class="am-list-thumb virtually-left am-radius am-border-grey">
                                                <img src="{{$goods.images}}" alt="{{$goods.title}}" />
                                            </div>
                                            <div class="am-list-item-text richtext virtually-right am-padding-left-xl">
                                                {{if !empty($goods['spec_text'])}}
                                                    <p>
                                                        <strong>{{$goods.spec_text}}</strong>
                                                    </p>
                                                {{/if}}
                                                {{if empty($goods['fictitious_goods_value'])}}
                                                    <span class="am-text-grey am-text-xs">{{:MyLang('no_config_data_tips')}}</span>
                                                {{else /}}
                                                    {{$goods.fictitious_goods_value|raw}}
                                                {{/if}}
                                            </div>
                                        </li>
                                    {{/foreach}}
                                </ul>
                            {{else /}}
                                <div class="table-no">
                                    <i class="am-icon-skyatlas am-icon-lg"></i>
                                    <p>{{:MyLang('order.order_goods_no_data_tips')}}</p>
                                </div>
                            {{/if}}

                            <!-- 用户订单详情虚拟信息内部底部-开始 -->
                            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                                <div class="plugins-tag">
                                    <span>plugins_view_user_order_detail_fictitious_inside_bottom</span>
                                </div>
                            {{/if}}
                            {{php}}
                                $hook_name = 'plugins_view_user_order_detail_fictitious_inside_bottom';
                                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                                if(!empty($hook_data) && is_array($hook_data))
                                {
                                    foreach($hook_data as $hook)
                                    {
                                        if(is_string($hook) || is_int($hook))
                                        {
                                            echo htmlspecialchars_decode($hook);
                                        }
                                    }
                                }
                            {{/php}}
                            <!-- 用户订单详情虚拟信息内部底部-结束 -->
                        </div>
                    </div>
                </div>
            {{/if}}

            <!-- 用户订单详情虚拟信息底部-开始 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_user_order_detail_fictitious_bottom</span>
                </div>
            {{/if}}
            {{php}}
                $hook_name = 'plugins_view_user_order_detail_fictitious_bottom';
                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                if(!empty($hook_data) && is_array($hook_data))
                {
                    foreach($hook_data as $hook)
                    {
                        if(is_string($hook) || is_int($hook))
                        {
                            echo htmlspecialchars_decode($hook);
                        }
                    }
                }
            {{/php}}
            <!-- 用户订单详情虚拟信息底部-结束 -->

            <!-- 订单信息 -->
            <div class="order-info">
                <div class="am-panel am-panel-default am-radius business-panel">
                    <div class="am-panel-hd">{{:MyLang('order.order_base_title')}}</div>
                    <div class="am-panel-bd">
                        {{if !empty($data['warehouse_name'])}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_warehouse_title')}}</div>
                                <div class="items-detail am-fl">
                                    <span class="warehouse-item-container">
                                        {{if !empty($data['warehouse_icon'])}}
                                            {{if IsUrl($data['warehouse_icon'])}}
                                                <img src="{{$data.warehouse_icon}}" alt="{{$data.warehouse_name}}" class="warehouse-icon" />
                                            {{else /}}
                                                <i class="{{$data.warehouse_icon}}"></i>
                                            {{/if}}
                                        {{/if}}
                                        {{if empty($data['warehouse_url'])}}
                                            <span class="warehouse-name">{{$data.warehouse_name}}</span>
                                        {{else /}}
                                            <a href="{{$data.warehouse_url}}" target="_blank" class="text-deco-none">
                                                <span class="warehouse-name">{{$data.warehouse_name}}</span>
                                            </a>
                                        {{/if}}
                                    </span>
                                </div>
                            </div>
                        {{/if}}
                        <div class="items am-cf">
                            <div class="items-title am-fl">{{:MyLang('order.order_base_model_title')}}</div>
                            <div class="items-detail am-fl">{{$data.order_model_name}}</div>
                        </div>
                        <div class="items am-cf">
                            <div class="items-title am-fl">{{:MyLang('order.order_base_order_no_title')}}</div>
                            <div class="items-detail am-fl text-copy-submit" data-value="{{$data.order_no}}">
                                <span>{{$data.order_no}}</span>
                                <span class="am-badge am-badge-success am-radius">{{:MyLang('copy_title')}}</span>
                            </div>
                        </div>
                        {{if !empty($data.status_name)}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_status_title')}}</div>
                                <div class="items-detail am-fl">{{$data.status_name}}</div>
                            </div>
                        {{/if}}
                        {{if !empty($data.pay_status_name)}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_pay_status_title')}}</div>
                                <div class="items-detail am-fl">{{$data.pay_status_name}}</div>
                            </div>
                        {{/if}}
                        {{if !empty($data.payment_name)}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_payment_title')}}</div>
                                <div class="items-detail am-fl">
                                    <span>{{$data.payment_name}}</span>
                                    {{if !empty($data['is_under_line_text'])}}
                                        <span class="am-badge am-badge-danger">{{$data.is_under_line_text}}</span>
                                    {{/if}}
                                </div>
                            </div>
                        {{/if}}
                        {{if !empty($data.total_price)}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_total_price_title')}}</div>
                                <div class="items-detail am-fl">{{$data.total_price}}</div>
                            </div>
                        {{/if}}
                        {{if !empty($data.buy_number_count)}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_buy_number_title')}}</div>
                                <div class="items-detail am-fl">{{$data.buy_number_count}}</div>
                            </div>
                        {{/if}}
                        {{if !empty($data.returned_quantity)}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_returned_quantity_title')}}</div>
                                <div class="items-detail am-fl">{{$data.returned_quantity}}</div>
                            </div>
                        {{/if}}
                        {{if !empty($data.user_note)}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_user_note_title')}}</div>
                                <div class="items-detail am-fl">{{$data.user_note}}</div>
                            </div>
                        {{/if}}
                        {{if !empty($data.add_time)}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_add_time_title')}}</div>
                                <div class="items-detail am-fl">{{$data.add_time}}</div>
                            </div>
                        {{/if}}
                        {{if !empty($data.confirm_time)}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_confirm_time_title')}}</div>
                                <div class="items-detail am-fl">{{$data.confirm_time}}</div>
                            </div>
                        {{/if}}
                        {{if !empty($data.pay_time)}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_pay_time_title')}}</div>
                                <div class="items-detail am-fl">{{$data.pay_time}}</div>
                            </div>
                        {{/if}}
                        {{if !empty($data.collect_time)}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_collect_time_title')}}</div>
                                <div class="items-detail am-fl">{{$data.collect_time}}</div>
                            </div>
                        {{/if}}
                        {{if !empty($data.user_is_comments_time)}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_user_comments_time_title')}}</div>
                                <div class="items-detail am-fl">{{$data.user_is_comments_time}}</div>
                            </div>
                        {{/if}}
                        {{if in_array($data['status'], [5]) and !empty($data['cancel_time'])}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_cancel_time_title')}}</div>
                                <div class="items-detail am-fl">{{$data.cancel_time}}</div>
                            </div>
                        {{/if}}
                        {{if in_array($data['status'], [6]) and !empty($data['close_time'])}}
                            <div class="items am-cf">
                                <div class="items-title am-fl">{{:MyLang('order.order_base_close_time_title')}}</div>
                                <div class="items-detail am-fl">{{$data.close_time}}</div>
                            </div>
                        {{/if}}
                    </div>
                </div>
            </div>
            <!-- 用户订单详情基础信息底部-开始 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_user_order_detail_base_bottom</span>
                </div>
            {{/if}}
            {{php}}
                $hook_name = 'plugins_view_user_order_detail_base_bottom';
                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                if(!empty($hook_data) && is_array($hook_data))
                {
                    foreach($hook_data as $hook)
                    {
                        if(is_string($hook) || is_int($hook))
                        {
                            echo htmlspecialchars_decode($hook);
                        }
                    }
                }
            {{/php}}
            <!-- 用户订单详情基础信息底部-结束 -->

            <!-- 商品列表 -->
            {{if !empty($data.items)}}
                <div class="order-goods am-text-sm">
                    <table class="am-table am-table-centered">
                        <thead>
                            <tr>
                                <th>{{:MyLang('order.goods_list_thead_base')}}</th>
                                <th class="am-hide-sm-only">{{:MyLang('order.goods_list_thead_price')}}</th>
                                <th class="am-hide-sm-only">{{:MyLang('order.goods_list_thead_number')}}</th>
                                <th class="am-hide-sm-only">{{:MyLang('order.goods_list_thead_total')}}</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{foreach $data.items as $goods}}
                                <tr>
                                    <td>
                                        <div class="goods-shop-info am-text-left">
                                            <a href="{{$goods.goods_url}}" target="_blank" class="am-nbfc am-radius am-border-grey goods-shop-info-left">
                                                <img src="{{$goods.images}}" />
                                            </a>
                                            <div class="goods-shop-info-right am-nbfc">
                                                <a href="{{$goods.goods_url}}" target="_blank" class="am-text-truncate-2 {{if ($data['is_can_launch_aftersale'] eq 1 or !empty($goods['orderaftersale'])) and !empty($goods['orderaftersale_btn_text'])}} goods-right-title{{/if}}">{{$goods.title}}</a>
                                                {{if ($data['is_can_launch_aftersale'] eq 1 or !empty($goods['orderaftersale'])) and !empty($goods['orderaftersale_btn_text'])}}
                                                    <div class="am-pa am-top-0 am-right-0">
                                                        <a href="{{:MyUrl('index/orderaftersale/detail', ['oid'=>$data['id'], 'did'=>$goods['id']])}}" target="_blank" class="am-color-blue">
                                                            {{if empty($goods['orderaftersale'])}}
                                                                {{$goods.orderaftersale_btn_text}}
                                                            {{else /}}
                                                                <span class="{{if $goods['orderaftersale']['status'] eq 3}}am-text-success{{else /}}am-text-secondary{{/if}}">{{$goods.orderaftersale_btn_text}}</span>
                                                            {{/if}}
                                                        </a>
                                                    </div>
                                                {{/if}}
                                                {{if !empty($goods.spec_text)}}
                                                    <div class="am-margin-top-xs am-color-grey am-text-xs">{{$goods.spec_text}}</div>
                                                {{/if}}

                                                <!-- 商品基础数据 -->
                                                {{if !empty($goods['base_data']) or !empty($goods['goods_params']) or !empty($goods['goods_content_app']) or !empty($goods['goods_content_web'])}}
                                                    <section data-am-widget="accordion" class="am-accordion am-accordion-basic am-margin-top-xs am-margin-left-0 am-margin-right-0 am-margin-bottom-0" data-am-accordion='{ "multiple": true }'>
                                                        {{if !empty($goods['base_data'])}}
                                                            <dl class="am-accordion-item">
                                                                <dt class="am-accordion-title">
                                                                    {{:MyLang('goods_base')}}
                                                                </dt>
                                                                <dd class="am-accordion-bd am-collapse">
                                                                    <div class="am-accordion-content">
                                                                        <table class="am-table am-table-bordered am-table-compact am-table-radius am-text-left am-margin-bottom-0">
                                                                            <thead>
                                                                                <tr>
                                                                                    <th width="130">{{:MyLang('name_title')}}</th>
                                                                                    <th>{{:MyLang('data_title')}}</th>
                                                                                </tr>
                                                                            </thead>
                                                                            <tbody class="am-background-white">
                                                                                {{foreach $goods.base_data as $v}}
                                                                                    <tr>
                                                                                        <td>{{$v.name}}</td>
                                                                                        <td>
                                                                                            <span class="text-copy-submit">{{$v.value}}</span>
                                                                                        </td>
                                                                                    </tr>
                                                                                {{/foreach}}
                                                                            </tbody>
                                                                        </table>
                                                                    </div>
                                                                </dd>
                                                            </dl>
                                                        {{/if}}
                                                        {{if !empty($goods['goods_params'])}}
                                                            <dl class="am-accordion-item">
                                                                <dt class="am-accordion-title">
                                                                    {{:MyLang('goods_params')}}
                                                                </dt>
                                                                <dd class="am-accordion-bd am-collapse ">
                                                                    <div class="am-accordion-content">
                                                                        <table class="am-table am-table-bordered am-table-compact am-table-radius am-text-left am-margin-bottom-0">
                                                                            <thead>
                                                                                <tr>
                                                                                    <th width="80">{{:MyLang('type_title')}}</th>
                                                                                    <th width="130">{{:MyLang('name_title')}}</th>
                                                                                    <th>{{:MyLang('data_title')}}</th>
                                                                                </tr>
                                                                            </thead>
                                                                            <tbody class="am-background-white">
                                                                                {{foreach $goods.goods_params as $v}}
                                                                                    <tr>
                                                                                        <td>
                                                                                            {{if $v['scope'] eq 1}}
                                                                                                {{:MyLang('detail_title')}}
                                                                                            {{elseif $v['scope'] eq 2 /}}
                                                                                                {{:MyLang('base_title')}}
                                                                                            {{else /}}
                                                                                                {{:MyLang('all_title')}}
                                                                                            {{/if}}
                                                                                        </td>
                                                                                        <td>{{$v.name}}</td>
                                                                                        <td>
                                                                                            <span class="text-copy-submit">{{$v.value}}</span>
                                                                                        </td>
                                                                                    </tr>
                                                                                {{/foreach}}
                                                                            </tbody>
                                                                        </table>
                                                                    </div>
                                                                </dd>
                                                            </dl>
                                                        {{/if}}
                                                        {{if !empty($goods['goods_content_web']) or !empty($goods['goods_content_app'])}}
                                                            <dl class="am-accordion-item">
                                                                <dt class="am-accordion-title">
                                                                    {{:MyLang('goods_detail')}}
                                                                </dt>
                                                                <dd class="am-accordion-bd am-collapse">
                                                                    <div class="am-accordion-content">
                                                                        <div class="am-tabs" data-am-tabs="{noSwipe: 1}">
                                                                            <ul class="am-tabs-nav am-nav am-nav-tabs">
                                                                                <li class="am-active"><a href="javascript: void(0)">{{:MyLang('web_title')}}</a></li>
                                                                                <li><a href="javascript: void(0)">{{:MyLang('app_title')}}</a></li>
                                                                            </ul>
                                                                            <div class="am-tabs-bd">
                                                                                <div class="am-tab-panel am-active">
                                                                                    {{if empty($goods['goods_content_web'])}}
                                                                                        <span class="am-color-grey">{{:MyLang('no_data')}}</span>
                                                                                    {{else /}}
                                                                                        <div class="am-scrollable-horizontal richtext">{{$goods.goods_content_web|raw}}</div>
                                                                                    {{/if}}
                                                                                </div>
                                                                                <div class="am-tab-panel">
                                                                                    {{if empty($goods['goods_content_app'])}}
                                                                                        <span class="am-color-grey">{{:MyLang('no_data')}}</span>
                                                                                    {{else /}}
                                                                                        {{foreach $goods.goods_content_app as $v}}
                                                                                            {{if !empty($v['images'])}}
                                                                                                <img src="{{$v.images}}" class="am-block am-max-wh-auto common-annex-view-event" />
                                                                                            {{/if}}
                                                                                            {{if !empty($v['content'])}}
                                                                                                <p>{{:implode('<br />', $v['content'])}}</p>
                                                                                            {{/if}}
                                                                                        {{/foreach}}
                                                                                    {{/if}}
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </dd>
                                                            </dl>
                                                        {{/if}}
                                                    </section>
                                                {{/if}}
                                            </div>
                                        </div>
                                        <div class="wap-base am-show-sm-only am-padding-top-main">
                                            {{if $goods['original_price'] gt 0}}
                                                <span class="original-price am-padding-right-sm">{{$data.currency_data.currency_symbol}}{{$goods.original_price}}</span>
                                            {{/if}}
                                            <span class="price am-padding-right-sm">
                                                <strong>{{$data.currency_data.currency_symbol}}{{$goods.price}}</strong>
                                            </span>
                                            <span class="wap-number am-padding-right-sm">x{{$goods.buy_number}}</span>
                                            {{if isset($goods['returned_quantity']) and $goods['returned_quantity'] gt 0}}
                                                <span class="am-color-yellow am-text-xs">{{:MyLang('already_retreat_title')}} {{$goods.returned_quantity}}</span>
                                            {{/if}}
                                        </div>
                                    </td>
                                    <td class="price am-hide-sm-only">
                                        <p class="line-price">{{$data.currency_data.currency_symbol}}{{$goods.price}}</p>
                                        {{if $goods['original_price'] gt 0}}
                                            <p class="original-price am-text-xs am-color-grey">{{$data.currency_data.currency_symbol}}{{$goods.original_price}}</p>
                                        {{/if}}
                                    </td>
                                    <td class="number am-hide-sm-only">
                                        <span>x{{$goods.buy_number}}</span>
                                        {{if isset($goods['returned_quantity']) and $goods['returned_quantity'] gt 0}}
                                            <span class="am-color-yellow am-text-xs">{{:MyLang('already_retreat_title')}} x{{$goods.returned_quantity}}</span>
                                        {{/if}}
                                    </td>
                                    <td class="price am-hide-sm-only">
                                        <span class="total-price-content am-color-black">{{$data.currency_data.currency_symbol}}{{$goods.total_price}}</span>
                                        {{if isset($goods['refund_price']) and $goods['refund_price'] gt 0}}
                                            <span class="am-color-yellow am-text-xs">{{:MyLang('already_retreat_title')}} x{{$goods.refund_price}}</span>
                                        {{/if}}
                                    </td>
                                </tr>
                            {{/foreach}}
                        </tbody>
                    </table>
                </div>

                <!-- 用户订单详情商品信息底部-开始 -->
                {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                    <div class="plugins-tag">
                        <span>plugins_view_user_order_detail_goods_inside_bottom</span>
                    </div>
                {{/if}}
                {{php}}
                    $hook_name = 'plugins_view_user_order_detail_goods_inside_bottom';
                    $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                    if(!empty($hook_data) && is_array($hook_data))
                    {
                        foreach($hook_data as $hook)
                        {
                            if(is_string($hook) || is_int($hook))
                            {
                                echo htmlspecialchars_decode($hook);
                            }
                        }
                    }
                {{/php}}
                <!-- 用户订单详情商品信息底部-结束 -->

                {{if !empty($data['extension_data'])}}
                    <div class="order-extension">
                        <div class="am-alert am-alert-warning am-radius-sm">
                            {{foreach $data.extension_data as $ertk=>$ext}}
                                <div class="items am-nbfc">
                                    <div class="items-detail">{{$ext.tips}}</div>
                                    <div class="items-title">{{$ext.name}}{{if !empty($ext['tips'])}}：{{/if}}</div>
                                </div>
                            {{/foreach}}
                        </div>
                    </div>
                {{/if}}

                <div class="order-total am-border-bottom-grey">
                  {{if !empty($data.price) and $data.price gt 0}}
                        <div class="items am-cf">
                            <div class="items-detail">{{$data.currency_data.currency_symbol}}{{$data.price}}</div>
                            <div class="items-title">{{:MyLang('order.order_base_price_title')}}</div>
                        </div>
                    {{/if}}
                    {{if !empty($data.increase_price) and $data.increase_price gt 0}}
                        <div class="items am-cf">
                            <div class="items-detail">+{{$data.currency_data.currency_symbol}}{{$data.increase_price}}</div>
                            <div class="items-title">{{:MyLang('order.order_base_increase_price_title')}}</div>
                        </div>
                    {{/if}}
                    {{if !empty($data.preferential_price) and $data.preferential_price gt 0}}
                        <div class="items am-cf">
                            <div class="items-detail am-color-yellow">-{{$data.currency_data.currency_symbol}}{{$data.preferential_price}}</div>
                            <div class="items-title">{{:MyLang('order.order_base_preferential_price_title')}}</div>
                        </div>
                    {{/if}}
                    {{if !empty($data.refund_price) and $data.refund_price gt 0}}
                        <div class="items am-cf">
                            <div class="items-detail am-color-yellow">-{{$data.currency_data.currency_symbol}}{{$data.refund_price}}</div>
                            <div class="items-title">{{:MyLang('order.order_base_refund_price_title')}}</div>
                        </div>
                    {{/if}}
                    {{if !empty($data.pay_price) and $data.pay_price gt 0}}
                        <div class="items am-cf">
                            <div class="items-detail">{{$data.currency_data.currency_symbol}}{{$data.pay_price}}</div>
                            <div class="items-title">{{:MyLang('order.order_base_pay_price_title')}}</div>
                        </div>
                    {{/if}}
                    {{if !empty($data.total_price)}}
                        <div class="items am-cf">
                            <div class="items-detail line-price am-color-main am-text-lg am-font-weight">{{$data.currency_data.currency_symbol}}{{$data.total_price}}</div>
                            <div class="items-title am-color-main">{{:MyLang('order.order_base_total_price_title')}}</div>
                        </div>
                    {{/if}}
                </div>
            {{/if}}

            <!-- 用户订单详情商品信息底部-开始 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_user_order_detail_goods_bottom</span>
                </div>
            {{/if}}
            {{php}}
                $hook_name = 'plugins_view_user_order_detail_goods_bottom';
                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                if(!empty($hook_data) && is_array($hook_data))
                {
                    foreach($hook_data as $hook)
                    {
                        if(is_string($hook) || is_int($hook))
                        {
                            echo htmlspecialchars_decode($hook);
                        }
                    }
                }
            {{/php}}
            <!-- 用户订单详情商品信息底部-结束 -->

            <!-- 追溯 -->
            {{if !empty($data['items']) and !empty($data['trace_source_data'])}}
                <div class="am-panel am-panel-default am-radius use-guide-panel am-margin-top-xl">
                    <div class="am-panel-hd">{{:MyLang('order.detail_trace_source_title')}}</div>
                    <div class="am-panel-bd">
                        {{foreach $data.items as $k=>$v}}
                            <div class="am-flex am-gap-1">
                                <a href="{{$v.goods_url}}" target="_blank">
                                    <img src="{{$v.images}}" class="am-radius am-border-grey" width="60" height="60" />
                                </a>
                                <div>
                                    <a href="{{$v.goods_url}}" target="_blank" class="am-text-truncates">{{$v.title}}</a>
                                    <p>{{$data.currency_data.currency_symbol}}{{$v.price}} x{{$v.buy_number}}</p>
                                </div>
                            </div>
                            <div class="am-margin-top-sm">
                                <table class="am-table am-table-bordered am-table-compact am-table-radius am-text-left am-margin-bottom-xl">
                                    <thead>
                                        <tr>
                                            <th>{{:MyLang('number_title')}}</th>
                                            <th>{{:MyLang('common_service.order.form_item_trace_source_code')}}</th>
                                            <th>{{:MyLang('common_service.order.form_item_trace_source_batch_number')}}</th>
                                            <th>{{:MyLang('common_service.order.form_item_trace_source_batch_number_expire')}}</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {{for start="1" end="$v.buy_number" comparison="elt"}}
                                            <tr>
                                                <td>
                                                    {{:MyLang('number_title')}}{{$i}}
                                                </td>
                                                <td>
                                                    {{if !empty($data['trace_source_data']) and !empty($data['trace_source_data'][$v['id']]) and !empty($data['trace_source_data'][$v['id']][$i]) and !empty($data['trace_source_data'][$v['id']][$i]['code'])}}
                                                        <span class="text-copy-submit">{{$data['trace_source_data'][$v['id']][$i]['code']}}</span>
                                                    {{/if}}
                                                </td>
                                                <td>
                                                    {{if !empty($data['trace_source_data']) and !empty($data['trace_source_data'][$v['id']]) and !empty($data['trace_source_data'][$v['id']][$i]) and !empty($data['trace_source_data'][$v['id']][$i]['batch_number'])}}
                                                        <span class="text-copy-submit">{{$data['trace_source_data'][$v['id']][$i]['batch_number']}}</span>
                                                    {{/if}}
                                                </td>
                                                <td>
                                                    {{if !empty($data['trace_source_data']) and !empty($data['trace_source_data'][$v['id']]) and !empty($data['trace_source_data'][$v['id']][$i]) and !empty($data['trace_source_data'][$v['id']][$i]['batch_number_expire'])}}
                                                        <span class="text-copy-submit">{{$data['trace_source_data'][$v['id']][$i]['batch_number_expire']}}</span>
                                                    {{/if}}
                                                </td>
                                            </tr>
                                        {{/for}}
                                    </tbody>
                                </table>
                            </div>
                        {{/foreach}}
                    </div>
                </div>
            {{/if}}

            <!-- 用户订单详情追溯底部-开始 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_user_order_detail_trace_source_bottom</span>
                </div>
            {{/if}}
            {{php}}
                $hook_name = 'plugins_view_user_order_detail_trace_source_bottom';
                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                if(!empty($hook_data) && is_array($hook_data))
                {
                    foreach($hook_data as $hook)
                    {
                        if(is_string($hook) || is_int($hook))
                        {
                            echo htmlspecialchars_decode($hook);
                        }
                    }
                }
            {{/php}}
            <!-- 用户订单详情追溯底部-结束 -->

            <!-- 使用指南 -->
            {{if !empty($data['use_guide_data']) and !empty($data['use_guide_data']['data'])}}
                <div class="am-panel am-panel-default am-radius use-guide-panel am-margin-top-xl">
                    <div class="am-panel-hd">{{$data.use_guide_data.title}}</div>
                    <div class="am-panel-bd">
                        {{if !empty($data['use_guide_data']['desc'])}}
                            <p class="am-color-grey am-margin-bottom-sm">{{$data.use_guide_data.desc}}</p>
                        {{/if}}
                        <section data-am-widget="accordion" class="am-accordion am-accordion-default am-margin-0" data-am-accordion='{ "multiple": true }'>
                            {{foreach $data.use_guide_data.data as $k=>$v}}
                                <dl class="am-accordion-item {{if $k eq 0}}am-active{{/if}}">
                                    <dt class="am-accordion-title">
                                        <img src="{{$v.images}}" class="am-radius am-border-grey am-vertical-align-middle" width="25" height="25" />
                                        <span class="am-vertical-align-middle">{{$v.title}}</span>
                                    </dt>
                                    <dd class="am-accordion-bd am-collapse {{if $k eq 0}}am-in{{/if}}">
                                        <div class="am-accordion-content">
                                            {{if empty($v['goods_use_guide'])}}
                                                <p class="am-color-grey">{{:MyLang('no_data')}}</p>
                                            {{else /}}
                                                <div class="richtext">{{$v.goods_use_guide|raw}}</div>
                                            {{/if}}
                                        </div>
                                    </dd>
                                </dl>
                            {{/foreach}}
                        </section>
                    </div>
                </div>
            {{/if}}

            <!-- 用户订单详情使用指南底部-开始 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_user_order_detail_use_guide_bottom</span>
                </div>
            {{/if}}
            {{php}}
                $hook_name = 'plugins_view_user_order_detail_use_guide_bottom';
                $hook_data = MyEventTrigger($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$data]);
                if(!empty($hook_data) && is_array($hook_data))
                {
                    foreach($hook_data as $hook)
                    {
                        if(is_string($hook) || is_int($hook))
                        {
                            echo htmlspecialchars_decode($hook);
                        }
                    }
                }
            {{/php}}
            <!-- 用户订单详情使用指南底部-结束 -->
        </div>

        <!-- 支付弹窗 -->
        {{:ModuleInclude('order/payment_popup')}}
    </div>
    <!-- content end -->
</div>

<!-- footer start -->
{{:ModuleInclude('public/footer')}}