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

<!-- right content start  -->
<div class="content-right" data-is-goods-single-category-mode="{{$is_goods_single_category_mode}}">
	<div class="content">
        <!-- nav start -->
        {{if !isset($is_theme_data_admin) or $is_theme_data_admin eq 0}}
            {{:ModuleInclude('public/admin_nav', [
                'title'     => MyLang('goods.base_nav_title').(empty($data['id']) ? MyLang('created_title') : MyLang('edit_title')),
                'back_url'  => MyUrl('admin/goods/index', $params)
            ])}}
        {{/if}}
        <!-- nav end -->

        {{if !empty($goods_category_list)}}
            <!-- 商品分类选择 -->
            {{if $is_goods_single_category_mode eq 1}}
                <div class="system-goods-category-choice" 
                    data-please-choice-goods-category-tips="{{:MyLang('common_service.goodscategory.please_choice_goods_category_tips')}}" 
                    data-please-choice-complete-goods-category-level-tips="{{:MyLang('common_service.goodscategory.please_choice_complete_goods_category_level_tips')}}" 
                >
                    <div class="goods-category-choice {{if !empty($data)}}am-hide{{/if}}">
                        <p class="am-text-center am-text-lg">{{:MyLang('common_service.goodscategory.goods_category_choice_text')}}</p>
                        <div class="am-margin-top-sm layout-category-choice">
                            {{:ModuleInclude('../../../module/view/layout/public/common/goods_category_choice', $goods_category_list)}}
                        </div>
                        <div class="am-text-center am-margin-top-xl">
                            <button type="button" class="am-btn am-btn-primary am-radius am-btn-xs confirm-next-submit" data-base-template-url="{{:MyUrl('admin/goods/basetemplate')}}">{{:MyLang('continue_next_step_title')}}</button>
                        </div>
                    </div>
                </div>
            {{/if}}

            <!-- form start -->
            <form class="am-form form-validation am-form-full-screen am-form-popup-sticky {{if $is_goods_single_category_mode eq 1 and empty($data)}}am-hide{{/if}}" action="{{:MyUrl('admin/goods/save')}}" method="POST" request-type="{{if !isset($is_theme_data_admin) or $is_theme_data_admin eq 0}}ajax-url{{else /}}ajax-reload{{/if}}" request-value="{{if !isset($is_theme_data_admin) or $is_theme_data_admin eq 0}}{{:MyUrl('admin/goods/index', $params)}}{{else /}}parent{{/if}}">
                <!-- 商品分类信息 -->
                {{if $is_goods_single_category_mode eq 1}}
                    <div class="am-margin-top-sm goods-category-form-content am-flex am-flex-items-center am-gap-1 am-margin-bottom-lg">
                        <input type="hidden" name="category_id" value="{{if !empty($category_level) and !empty($category_level['value'])}}{{$category_level.value}}{{/if}}" />
                        <div class="am-margin-right-sm">
                            <span>{{:MyLang('common_service.goodscategory.already_choice_goods_category_text')}}</span>
                            <span class="text-tips">{{if !empty($category_level) and !empty($category_level['text'])}}{{$category_level.text}}{{else /}}...{{/if}}</span>
                        </div>
                        {{if empty($goods_base_forbid_operate_data) or !in_array('category_ids', $goods_base_forbid_operate_data)}}
                            <button type="button" class="am-btn am-btn-primary am-radius am-btn-xs goods-category-form-again-choice" data-value="{{if !empty($category_level) and !empty($category_level['ids'])}}{{$category_level.ids}}{{/if}}">{{:MyLang('reselect_title')}}</button>
                        {{/if}}
                    </div>
                {{/if}}

                {{:ModuleInclude('public/nav_switch_btn', [
                    'nav_data' => [
                        [
                            'name' => $goods_admin_nav_list.base.name,
                            'key'  => 'base',
                        ],
                        [
                            'name' => $goods_admin_nav_list.spec.name,
                            'key'  => 'spec',
                        ],
                        [
                            'name' => $goods_admin_nav_list.parameters.name,
                            'key'  => 'parameters',
                        ],
                        [
                            'name' => $goods_admin_nav_list.photo.name . '/' . $goods_admin_nav_list.video.name,
                            'key'  => 'photo-video',
                        ],
                        [
                            'name' => $goods_admin_nav_list.app.name,
                            'key'  => 'app',
                        ],
                        [
                            'name' => $goods_admin_nav_list.web.name,
                            'key'  => 'web',
                        ],
                        [
                            'name' => $goods_admin_nav_list.fictitious.name,
                            'key'  => 'fictitious',
                        ],
                        [
                            'name' => $goods_admin_nav_list.extends.name,
                            'key'  => 'extends',
                        ],
                        [
                            'name' => $goods_admin_nav_list.use_guide.name,
                            'key'  => 'use_guide',
                        ],
                        [
                            'name' => $goods_admin_nav_list.seo.name,
                            'key'  => 'seo',
                        ],
                    ]
                ])}}

                <div class="nav-content">
                    <!-- 基础信息 -->
                    <div id="goods-nav-base" class="item am-active" data-key="base">
                        {{if !empty($goods_admin_nav_list['base']['tips'])}}
                            <div class="am-operate-stretch-tips">
                                <div class="title">
                                    <i class="iconfont icon-tips"></i>
                                    <strong title="{{:MyLang('operate_list_tips_msg')}}">{{:MyLang('operate_list_tips_button_text')}}</strong>
                                    <i class="iconfont icon-retract-diagonal contract" title="{{:MyLang('operate_list_tips_retract_text')}}"></i> 
                                </div>
                                <p>{{if is_array($goods_admin_nav_list['base']['tips'])}}{{:implode('</p><p>', $goods_admin_nav_list.base.tips)}}{{else /}}{{$goods_admin_nav_list.base.tips}}{{/if}}</p>
                            </div>
                        {{/if}}
                        <div class="am-form-group">
                            <label>{{:MyLang('common_service.goods.form_item_title')}}<span class="am-form-group-label-tips-must">*</span></label>
                            <div class="am-input-group am-input-group-sm am-flex am-gap-1-half am-flex-items-center">
                                <input type="text" name="title" placeholder="{{:MyLang('common_service.goods.form_item_title_message')}}" minlength="2" maxlength="160" data-validation-message="{{:MyLang('common_service.goods.form_item_title_message')}}" class="am-form-field am-radius" {{if !empty($data['title'])}} value="{{$data.title}}" {{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('title', $goods_base_forbid_operate_data)}} readonly {{/if}} {{if !empty($data['title_color'])}} style="color:{{$data.title_color}};" {{/if}} required />
                                <div class="colorpicker-container colorpicker-simple">
                                    <input type="hidden" name="title_color" value="{{if !empty($data['title_color'])}}{{$data.title_color}}{{/if}}" />
                                    <div class="colorpicker-submit" data-color="{{if !empty($data['title_color'])}}{{$data.title_color}}{{/if}}" data-input-tag="input[name='title']" data-color-tag="input[name='title_color']"></div>
                                    <img class="imitate-colorpicker-submit" src="{{:StaticAttachmentUrl('colorpicker.png')}}" width="24" height="24" />
                                </div>
                            </div>
                        </div>
                        {{if $is_goods_single_category_mode neq 1}}
                            <div class="am-form-group">
                                <label class="am-block">{{:MyLang('common_service.goods.form_item_category_id')}}<span class="am-form-group-label-tips-must">*</span></label>
                                <select name="category_id" class="am-radius chosen-select goods-category-choice-base-template-event" data-base-template-url="{{:MyUrl('admin/goods/basetemplate')}}" multiple="multiple" minchecked="1" data-placeholder="{{:MyLang('please_select_tips')}}" data-validation-message="{{:MyLang('common_service.goods.form_item_category_id_message')}}" {{if !empty($goods_base_forbid_operate_data) and in_array('category_ids', $goods_base_forbid_operate_data)}} disabled {{/if}} required>
                                    {{if !empty($goods_category_list)}}
                                        {{foreach $goods_category_list as $v}}
                                            <option value="{{$v.id}}" {{if !empty($data['category_ids']) and in_array($v['id'], $data['category_ids'])}}selected{{/if}}>{{$v.name}}</option>
                                            {{if !empty($v['items'])}}
                                                {{foreach $v.items as $vs}}
                                                    <option style="padding-left: 20px;" value="{{$vs.id}}" {{if !empty($data['category_ids']) and in_array($vs['id'], $data['category_ids'])}}selected{{/if}}>{{if empty($vs['items'])}}├{{else /}}└{{/if}}² {{$vs.name}}</option>
                                                    {{if !empty($vs['items'])}}
                                                        {{foreach $vs.items as $kss=>$vss}}
                                                            <option style="padding-left: 40px;" value="{{$vss.id}}" {{if !empty($data['category_ids']) and in_array($vss['id'], $data['category_ids'])}}selected{{/if}}>{{if $kss eq count($vs['items'])-1}}└{{else /}}├{{/if}}³ {{$vss.name}}</option>
                                                        {{/foreach}}
                                                    {{/if}}
                                                {{/foreach}}
                                            {{/if}}
                                        {{/foreach}}
                                    {{/if}}
                                </select>
                            </div>
                        {{/if}}
                        <div class="am-form-group">
                            <label>{{:MyLang('common_service.goods.form_item_simple_desc')}}{{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['simple_desc']) and $goods_base_template['required_fields']['simple_desc'] eq 1}}<span class="am-form-group-label-tips-must">*</span>{{/if}}</label>
                            <input type="text" name="simple_desc" placeholder="{{:MyLang('common_service.goods.form_item_simple_desc_message')}}" maxlength="230" data-validation-message="{{:MyLang('common_service.goods.form_item_simple_desc_message')}}" class="am-radius" {{if !empty($data['simple_desc'])}} value="{{$data.simple_desc}}"{{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('simple_desc', $goods_base_forbid_operate_data)}} readonly {{/if}} {{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['simple_desc']) and $goods_base_template['required_fields']['simple_desc'] eq 1}} required {{/if}} />
                        </div>
                        <div class="am-form-group">
                            <label>{{:MyLang('common_service.goods.form_item_spec_desc')}}{{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['spec_desc']) and $goods_base_template['required_fields']['spec_desc'] eq 1}}<span class="am-form-group-label-tips-must">*</span>{{/if}}</label>
                            <input type="text" name="spec_desc" placeholder="{{:MyLang('common_service.goods.form_item_spec_desc_message')}}" maxlength="230" data-validation-message="{{:MyLang('common_service.goods.form_item_spec_desc_message')}}" class="am-radius" {{if !empty($data['spec_desc'])}} value="{{$data.spec_desc}}"{{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('spec_desc', $goods_base_forbid_operate_data)}} readonly {{/if}} {{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['spec_desc']) and $goods_base_template['required_fields']['spec_desc'] eq 1}} required {{/if}} />
                        </div>
                        <div class="am-form-group">
                            <label>{{:MyLang('common_service.goods.form_item_approval_number')}}{{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['approval_number']) and $goods_base_template['required_fields']['approval_number'] eq 1}}<span class="am-form-group-label-tips-must">*</span>{{/if}}</label>
                            <input type="text" name="approval_number" placeholder="{{:MyLang('common_service.goods.form_item_approval_number_message')}}" maxlength="180" data-validation-message="{{:MyLang('common_service.goods.form_item_approval_number_message')}}" class="am-radius" {{if !empty($data['approval_number'])}} value="{{$data.approval_number}}"{{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('approval_number', $goods_base_forbid_operate_data)}} readonly {{/if}} {{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['approval_number']) and $goods_base_template['required_fields']['approval_number'] eq 1}} required {{/if}} />
                        </div>
                        <div class="am-form-group">
                            <label>{{:MyLang('common_service.goods.form_item_approval_number_expire')}}{{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['approval_number_expire']) and $goods_base_template['required_fields']['approval_number_expire'] eq 1}}<span class="am-form-group-label-tips-must">*</span>{{/if}}</label>
                            <input type="text" autocomplete="off" name="approval_number_expire" class="Wdate am-radius" placeholder="{{:MyLang('common_service.goods.form_item_approval_number_expire')}}" data-validation-message="{{:MyLang('common_service.goods.form_item_approval_number_expire_message')}}" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})" {{if !empty($data['approval_number_expire']) and !empty($data['approval_number_expire'])}}value="{{$data.approval_number_expire}}"{{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('approval_number_expire', $goods_base_forbid_operate_data)}} readonly {{/if}} {{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['approval_number_expire']) and $goods_base_template['required_fields']['approval_number_expire'] eq 1}} required {{/if}} />
                        </div>
                        <div class="am-form-group">
                            <label>{{:MyLang('common_service.goods.form_item_batch_number')}}{{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['batch_number']) and $goods_base_template['required_fields']['batch_number'] eq 1}}<span class="am-form-group-label-tips-must">*</span>{{/if}}</label>
                            <input type="text" name="batch_number" placeholder="{{:MyLang('common_service.goods.form_item_batch_number_message')}}" maxlength="180" data-validation-message="{{:MyLang('common_service.goods.form_item_batch_number_message')}}" class="am-radius" {{if !empty($data['batch_number'])}} value="{{$data.batch_number}}"{{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('batch_number', $goods_base_forbid_operate_data)}} readonly {{/if}} {{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['batch_number']) and $goods_base_template['required_fields']['batch_number'] eq 1}} required {{/if}} />
                        </div>
                        <div class="am-form-group">
                            <label>{{:MyLang('common_service.goods.form_item_batch_number_expire')}}{{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['batch_number_expire']) and $goods_base_template['required_fields']['batch_number_expire'] eq 1}}<span class="am-form-group-label-tips-must">*</span>{{/if}}</label>
                            <input type="text" autocomplete="off" name="batch_number_expire" class="Wdate am-radius" placeholder="{{:MyLang('common_service.goods.form_item_batch_number_expire')}}" data-validation-message="{{:MyLang('common_service.goods.form_item_batch_number_expire_message')}}" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})" {{if !empty($data['batch_number_expire']) and !empty($data['batch_number_expire'])}}value="{{$data.batch_number_expire}}"{{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('batch_number_expire', $goods_base_forbid_operate_data)}} readonly {{/if}} {{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['batch_number_expire']) and $goods_base_template['required_fields']['batch_number_expire'] eq 1}} required {{/if}} />
                        </div>
                        <div class="am-form-group">
                            <label>{{:MyLang('common_service.goods.form_item_coding')}}{{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['coding']) and $goods_base_template['required_fields']['coding'] eq 1}}<span class="am-form-group-label-tips-must">*</span>{{/if}}</label>
                            <input type="text" name="coding" placeholder="{{:MyLang('common_service.goods.form_item_coding_message')}}" maxlength="180" data-validation-message="{{:MyLang('common_service.goods.form_item_coding_message')}}" class="am-radius" {{if !empty($data['coding'])}} value="{{$data.coding}}"{{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('coding', $goods_base_forbid_operate_data)}} readonly {{/if}} {{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['coding']) and $goods_base_template['required_fields']['coding'] eq 1}} required {{/if}} />
                        </div>
                        <div class="am-form-group">
                            <label>{{:MyLang('common_service.goods.form_item_model')}}{{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['model']) and $goods_base_template['required_fields']['model'] eq 1}}<span class="am-form-group-label-tips-must">*</span>{{/if}}</label>
                            <input type="text" name="model" placeholder="{{:MyLang('common_service.goods.form_item_model_message')}}" maxlength="180" data-validation-message="{{:MyLang('common_service.goods.form_item_model_message')}}" class="am-radius" {{if !empty($data['model'])}} value="{{$data.model}}"{{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('model', $goods_base_forbid_operate_data)}} readonly {{/if}} {{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['model']) and $goods_base_template['required_fields']['model'] eq 1}} required {{/if}} />
                        </div>
                        <div class="am-form-group">
                            <label class="am-block">{{:MyLang('common_service.goods.form_item_brand_id')}}{{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['brand_id']) and $goods_base_template['required_fields']['brand_id'] eq 1}}<span class="am-form-group-label-tips-must">*</span>{{/if}}</label>
                            <select name="brand_id" class="am-radius chosen-select" data-placeholder="{{:MyLang('please_select_tips')}}" data-validation-message="{{:MyLang('common_service.goods.form_item_brand_id_message')}}" {{if !empty($goods_base_forbid_operate_data) and in_array('brand_id', $goods_base_forbid_operate_data)}} disabled {{/if}} {{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['brand_id']) and $goods_base_template['required_fields']['brand_id'] eq 1}} required {{/if}}>
                                {{if !empty($brand_list)}}
                                    <option value="">{{:MyLang('please_select_tips')}}</option>
                                    {{foreach $brand_list as $v}}
                                        <option value="{{$v.id}}" {{if isset($data['brand_id']) and $data['brand_id'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
                                    {{/foreach}}
                                {{/if}}
                            </select>
                        </div>
                        <div class="am-form-group">
                            <label>{{:MyLang('common_service.goods.form_item_produce_company')}}{{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['produce_company']) and $goods_base_template['required_fields']['produce_company'] eq 1}}<span class="am-form-group-label-tips-must">*</span>{{/if}}</label>
                            <input type="text" name="produce_company" placeholder="{{:MyLang('common_service.goods.form_item_produce_company_message')}}" maxlength="180" data-validation-message="{{:MyLang('common_service.goods.form_item_produce_company_message')}}" class="am-radius" {{if !empty($data['produce_company'])}} value="{{$data.produce_company}}"{{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('produce_company', $goods_base_forbid_operate_data)}} readonly {{/if}} {{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['produce_company']) and $goods_base_template['required_fields']['produce_company'] eq 1}} required {{/if}} />
                        </div>
                        <div class="am-form-group">
                            <label class="am-block">{{:MyLang('common_service.goods.form_item_produce_region')}}{{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['produce_region']) and $goods_base_template['required_fields']['produce_region'] eq 1}}<span class="am-form-group-label-tips-must">*</span>{{/if}}</label>
                            <select name="produce_region" class="am-radius chosen-select" data-placeholder="{{:MyLang('please_select_tips')}}" data-validation-message="{{:MyLang('common_service.goods.form_item_produce_region_message')}}" {{if !empty($goods_base_forbid_operate_data) and in_array('produce_region', $goods_base_forbid_operate_data)}} disabled {{/if}} {{if !empty($goods_base_template) and !empty($goods_base_template['required_fields']) and isset($goods_base_template['required_fields']['produce_region']) and $goods_base_template['required_fields']['produce_region'] eq 1}} required {{/if}}>
                                <option value="">{{:MyLang('please_select_tips')}}</option>
                                {{if !empty($region_province_list)}}
                                    {{foreach $region_province_list as $v}}
                                        <option value="{{$v.id}}" {{if !empty($data['produce_region']) and $v['id'] eq $data['produce_region']}}selected{{/if}}>{{$v.name}}</option>
                                    {{/foreach}}
                                {{/if}}
                            </select>
                        </div>
                        <div class="am-form-group">
                            <label>{{:MyLang('common_service.goods.form_item_inventory_unit')}}<span class="am-form-group-label-tips-must">*</span></label>
                            <input type="text" name="inventory_unit" placeholder="{{:MyLang('common_service.goods.form_item_inventory_unit_message')}}" minlength="1" maxlength="6" data-validation-message="{{:MyLang('common_service.goods.form_item_inventory_unit_message')}}" class="am-radius" {{if !empty($data['inventory_unit'])}} value="{{$data.inventory_unit}}"{{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('inventory_unit', $goods_base_forbid_operate_data)}} readonly {{/if}} required />
                        </div>
                        <div class="am-form-group">
                            <label>
                                {{:MyLang('common_service.goods.form_item_give_integral')}}
                                {{if is_array(MyLang('common_service.goods.form_item_give_integral_tips'))}}
                                    <a href="javascript:;" class="am-icon-question-circle am-margin-left-xs" data-am-popover="{content: '{{:implode('<br />', MyLang('common_service.goods.form_item_give_integral_tips'))}}', trigger: 'hover focus', theme: 'sm'}"></a>
                                {{/if}}
                            </label>
                            <input type="number" name="give_integral" placeholder="{{:MyLang('common_service.goods.form_item_give_integral_placeholder')}}(%)" min="0" data-validation-message="{{:MyLang('common_service.goods.form_item_give_integral_message')}}" class="am-form-field am-radius" {{if !empty($data['give_integral'])}} value="{{$data.give_integral}}"{{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('give_integral', $goods_base_forbid_operate_data)}} readonly {{/if}} />
                        </div>
                        <div class="am-form-group">
                            <label>
                                {{:MyLang('common_service.goods.form_item_sort_level')}}
                                {{if is_array(MyLang('common_service.goods.form_item_sort_level_tips'))}}
                                    <a href="javascript:;" class="am-icon-question-circle am-margin-left-xs" data-am-popover="{content: '{{:implode('<br />', MyLang('common_service.goods.form_item_sort_level_tips'))}}', trigger: 'hover focus', theme: 'sm'}"></a>
                                {{/if}}
                            </label>
                            <input type="number" name="sort_level" placeholder="{{:MyLang('common_service.goods.form_item_sort_level')}}" min="0" data-validation-message="{{:MyLang('common_service.goods.form_item_sort_level_message')}}" class="am-form-field am-radius" {{if !empty($data['sort_level'])}} value="{{$data.sort_level}}"{{/if}} {{if !empty($goods_base_forbid_operate_data) and in_array('sort_level', $goods_base_forbid_operate_data)}} readonly {{/if}} />
                        </div>
                        <div class="am-form-group">
                            <label>
                                {{:MyLang('common_service.goods.form_item_site_type')}}
                                {{if is_array(MyLang('common_service.goods.form_item_site_type_tips'))}}
                                    <a href="javascript:;" class="am-icon-question-circle am-margin-left-xs" data-am-popover="{content: '{{:implode('</p><p>', MyLang('common_service.goods.form_item_site_type_tips'))}}', trigger: 'hover focus', theme: 'sm'}"></a>
                                {{/if}}
                            </label>
                            <select name="site_type" class="am-radius chosen-select" data-placeholder="{{:MyLang('optional_tips')}}" data-validation-message="{{:MyLang('common_service.goods.form_item_site_type_message')}}" {{if !empty($goods_base_forbid_operate_data) and in_array('site_type', $goods_base_forbid_operate_data)}} disabled {{/if}}>
                                <option value="">{{:MyLang('optional_tips')}}</option>
                                {{if !empty($common_site_type_list)}}
                                    {{foreach $common_site_type_list as $v}}
                                        <option value="{{$v.value}}" {{if isset($data['site_type']) and $v['value'] eq $data['site_type']}}selected{{/if}}>{{$v.name}}</option>
                                    {{/foreach}}
                                {{/if}}
                            </select>
                        </div>
                        <div class="am-form-group am-form-file">
                            <label class="am-block">{{:MyLang('common_service.goods.form_item_images')}}<a href="javascript:;" class="am-icon-question-circle am-margin-left-xs" data-am-popover="{content: '{{:MyLang('common_service.goods.form_item_images_tips')}}', trigger: 'hover focus', theme: 'sm'}"></a></label>
                            <div class="am-form-file-upload-container">
                                <ul class="plug-file-upload-view goods-recommended-images-view" data-form-name="images" data-max-number="1" data-dialog-type="images" data-is-eye="1">
                                    <li class="plug-file-upload-submit" data-view-tag="ul.goods-recommended-images-view">
                                        {{if empty($data['images'])}}
                                            <i class="iconfont icon-add"></i>
                                        {{else /}}
                                            <input type="text" name="images" value="{{$data.images}}" />
                                            <img src="{{$data.images}}" />
                                            {{if empty($goods_base_forbid_operate_data) or !in_array('images', $goods_base_forbid_operate_data)}}
                                                <i class="iconfont icon-close"></i>
                                            {{/if}}
                                            <i class="iconfont icon-eye"></i>
                                        {{/if}}
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-block">{{:MyLang('common_service.goods.form_item_is_deduction_inventory')}}<a href="javascript:;" class="am-icon-question-circle am-margin-left-xs" data-am-popover="{content: '{{:MyLang('common_service.goods.form_item_is_deduction_inventory_tips')}}', trigger: 'hover focus', theme: 'sm'}"></a></label>
                            <input name="is_deduction_inventory" value="1" type="checkbox" data-off-text="{{:MyLang('no_title')}}" data-on-text="{{:MyLang('yes_title')}}" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch {{if (isset($data['is_deduction_inventory']) and $data['is_deduction_inventory'] eq 1) or empty($data)}}checked="true"{{/if}} />
                        </div>
                        <div class="am-form-group">
                            <label class="am-block">{{:MyLang('common_service.goods.form_item_is_shelves')}}<a href="javascript:;" class="am-icon-question-circle am-margin-left-xs" data-am-popover="{content: '{{:MyLang('common_service.goods.form_item_is_shelves_tips')}}', trigger: 'hover focus', theme: 'sm'}"></a></label>
                            <input name="is_shelves" value="1" type="checkbox" data-off-text="{{:MyLang('no_title')}}" data-on-text="{{:MyLang('yes_title')}}" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch {{if (isset($data['is_shelves']) and $data['is_shelves'] eq 1) or empty($data)}}checked="true"{{/if}} />
                        </div>
                    </div>

                    <!-- 商品规格 -->
                    <div id="goods-nav-spec" class="item" data-key="spec">
                        {{if !empty($goods_admin_nav_list['spec']['tips'])}}
                            <div class="am-operate-stretch-tips">
                                <div class="title">
                                    <i class="iconfont icon-tips"></i>
                                    <strong title="{{:MyLang('operate_list_tips_msg')}}">{{:MyLang('operate_list_tips_button_text')}}</strong>
                                    <i class="iconfont icon-retract-diagonal contract" title="{{:MyLang('operate_list_tips_retract_text')}}"></i> 
                                </div>
                                <p>{{if is_array($goods_admin_nav_list['spec']['tips'])}}{{:implode('</p><p>', $goods_admin_nav_list.spec.tips)}}{{else /}}{{$goods_admin_nav_list.spec.tips}}{{/if}}</p>
                            </div>
                        {{/if}}
                        <div class="am-form-group">
                            <label>{{$goods_admin_nav_list.spec.name}}<span class="am-form-group-label-tips-must">*</span></label>
                            <div>
                                {{:ModuleInclude('goods/spec')}}
                            </div>
                        </div>
                    </div>

                    <!-- 商品参数 -->
                    <div id="goods-nav-parameters" class="item" data-key="parameters">
                        {{if !empty($goods_admin_nav_list['parameters']['tips'])}}
                            <div class="am-operate-stretch-tips">
                                <div class="title">
                                    <i class="iconfont icon-tips"></i>
                                    <strong title="{{:MyLang('operate_list_tips_msg')}}">{{:MyLang('operate_list_tips_button_text')}}</strong>
                                    <i class="iconfont icon-retract-diagonal contract" title="{{:MyLang('operate_list_tips_retract_text')}}"></i> 
                                </div>
                                <p>{{if is_array($goods_admin_nav_list['parameters']['tips'])}}{{:implode('</p><p>', $goods_admin_nav_list.parameters.tips)}}{{else /}}{{$goods_admin_nav_list.parameters.tips}}{{/if}}</p>
                            </div>
                        {{/if}}
                        <div class="am-form-group am-flex-col am-gap-1">
                            <label>{{:MyLang('common_service.goods.form_params_choice_text')}}</label>
                            <!-- 参数操作 -->
                            {{:ModuleInclude('goods/params_operate')}}
                            <!-- 参数自定义模式 -->
                            {{if $is_goods_parameters_custom_mode eq 1}}
                                {{:ModuleInclude('public/goodsparamstemplate/table_custom')}}
                            {{else /}}
                                <!-- 参数使用表格 -->
                                {{:ModuleInclude('public/goodsparamstemplate/table_use')}}
                            {{/if}}
                            <!-- 参数提示 -->
                            <div class="am-margin-top-sm">
                                {{:ModuleInclude('public/goodsparamstemplate/tips')}}
                            </div>
                        </div>
                    </div>

                    <!-- 相册/视频 -->
                    <div id="goods-nav-photo-video" class="item" data-key="photo-video">
                        {{if !empty($goods_admin_nav_list['photo']['tips']) or !empty($goods_admin_nav_list['video']['tips'])}}
                            <div class="am-operate-stretch-tips">
                                <div class="title">
                                    <i class="iconfont icon-tips"></i>
                                    <strong title="{{:MyLang('operate_list_tips_msg')}}">{{:MyLang('operate_list_tips_button_text')}}</strong>
                                    <i class="iconfont icon-retract-diagonal contract" title="{{:MyLang('operate_list_tips_retract_text')}}"></i> 
                                </div>
                                {{if !empty($goods_admin_nav_list['photo']['tips'])}}
                                    <p>{{if is_array($goods_admin_nav_list['photo']['tips'])}}{{:implode('</p><p>', $goods_admin_nav_list.photo.tips)}}{{else /}}{{$goods_admin_nav_list.photo.tips}}{{/if}}</p>
                                {{/if}}
                                {{if !empty($goods_admin_nav_list['video']['tips'])}}
                                    <p>{{if is_array($goods_admin_nav_list['video']['tips'])}}{{:implode('</p><p>', $goods_admin_nav_list.video.tips)}}{{else /}}{{$goods_admin_nav_list.video.tips}}{{/if}}</p>
                                {{/if}}
                            </div>
                        {{/if}}
                        <div id="goods-nav-photo" class="am-form-group am-form-file">
                            <label>{{$goods_admin_nav_list.photo.name}}<span class="am-form-group-label-tips-must">*</span><a href="javascript:;" class="am-icon-question-circle am-margin-left-xs" data-am-popover="{content: '{{:MyLang('common_service.goods.form_photo_top_tips')}}', trigger: 'hover focus', theme: 'sm'}"></a></label>
                            <div class="am-form-file-upload-container">
                                <ul class="plug-file-upload-view goods-photo-view" data-form-name="photo[]" data-max-number="30" data-dialog-type="images" data-is-eye="1">
                                    {{if !empty($data['photo'])}}
                                        {{foreach $data.photo as $v}}
                                            <li>
                                                <input type="text" name="photo[]" value="{{$v.images}}" />
                                                <img src="{{$v.images}}" />
                                                {{if empty($goods_base_forbid_operate_data) or !in_array('photo', $goods_base_forbid_operate_data)}}
                                                    <i class="iconfont icon-close"></i>
                                                {{/if}}
                                                <i class="iconfont icon-eye"></i>
                                            </li>
                                        {{/foreach}}
                                    {{/if}}
                                </ul>
                                {{if empty($goods_base_forbid_operate_data) or !in_array('photo', $goods_base_forbid_operate_data)}}
                                    <div class="plug-file-upload-submit" data-view-tag="ul.goods-photo-view">
                                        <i class="iconfont icon-add"></i>
                                    </div>
                                {{/if}}
                            </div>
                        </div>
                        <!-- 视频 -->
                        <div id="goods-nav-video" class="am-form-group am-form-file">
                            <label>{{$goods_admin_nav_list.video.name}}<a href="javascript:;" class="am-icon-question-circle am-margin-left-xs" data-am-popover="{content: '{{:MyLang('common_service.goods.form_video_top_tips')}}', trigger: 'hover focus', theme: 'sm'}"></a></label>
                            <div class="am-form-file-upload-container">
                                <ul class="plug-file-upload-view plug-file-upload-view-video goods-video-view" data-form-name="video" data-max-number="1" data-dialog-type="video" data-is-eye="1">
                                    <li class="plug-file-upload-submit" data-view-tag="ul.goods-video-view">
                                        {{if empty($data['video'])}}
                                            <i class="iconfont icon-add"></i>
                                        {{else /}}
                                            <input type="text" name="video" value="{{$data.video}}" />
                                            <video src="{{$data.video}}" controls>your browser does not support the video tag</video>
                                            {{if empty($goods_base_forbid_operate_data) or !in_array('video', $goods_base_forbid_operate_data)}}
                                                <i class="iconfont icon-close"></i>
                                            {{/if}}
                                            <i class="iconfont icon-eye"></i>
                                        {{/if}}
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <!-- 手机详情 -->
                    <div id="goods-nav-app" class="item" data-key="app">
                        {{if !empty($goods_admin_nav_list['app']['tips'])}}
                            <div class="am-operate-stretch-tips">
                                <div class="title">
                                    <i class="iconfont icon-tips"></i>
                                    <strong title="{{:MyLang('operate_list_tips_msg')}}">{{:MyLang('operate_list_tips_button_text')}}</strong>
                                    <i class="iconfont icon-retract-diagonal contract" title="{{:MyLang('operate_list_tips_retract_text')}}"></i> 
                                </div>
                                <p>{{if is_array($goods_admin_nav_list['app']['tips'])}}{{:implode('</p><p>', $goods_admin_nav_list.app.tips)}}{{else /}}{{$goods_admin_nav_list.app.tips}}{{/if}}</p>
                            </div>
                        {{/if}}
                        <div class="am-form-group">
                            <ul class="content-app-items" 
                                data-max-count="10" 
                                data-required="1" 
                                data-images-name="content_app_images" 
                                data-content-name="content_app_text" 
                                data-images-title="{{:MyLang('form_upload_images_title')}}" 
                                data-content-title="{{:MyLang('common_service.goods.form_app_value_title')}}" 
                                data-delete-title="{{:MyLang('delete_title')}}" 
                                data-drag-title="{{:MyLang('sort_title')}}"
                            >
                                {{if !empty($data['content_app'])}}
                                    {{foreach $data.content_app as $v}}
                                        <li>
                                            <div class="am-flex am-flex-warp am-gap-32">
                                                <div class="am-form-group am-form-file content-app-left am-padding-bottom-0">
                                                    <label class="am-block">{{:MyLang('images_title')}}</label>
                                                    <div class="am-form-file-upload-container">
                                                        <ul class="plug-file-upload-view goods-content-app-images-view-{{$v.id}}" data-form-name="content_app_images_{{$v.id}}" data-max-number="1" data-dialog-type="images" data-is-eye="1">
                                                            <li class="plug-file-upload-submit" data-view-tag="ul.goods-content-app-images-view-{{$v.id}}">
                                                                {{if empty($v['images'])}}
                                                                    <i class="iconfont icon-add"></i>
                                                                {{else /}}
                                                                    <input type="text" name="content_app_images_{{$v.id}}" value="{{$v.images}}" />
                                                                    <img src="{{$v.images}}" />
                                                                    <i class="iconfont icon-close"></i>
                                                                    <i class="iconfont icon-eye"></i>
                                                                {{/if}}
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </div>
                                                <div class="am-form-group content-app-right am-padding-bottom-0">
                                                    <label>{{:MyLang('common_service.goods.form_app_value_title')}}</label>
                                                    <textarea rows="5" name="content_app_text_{{$v.id}}" class="am-radius" placeholder="{{:MyLang('common_service.goods.form_app_value_title')}}" data-validation-message="{{:MyLang('common_service.goods.form_app_value_message')}}">{{if !empty($v)}}{{$v.content_old|raw}}{{/if}}</textarea>
                                                </div>
                                            </div>
                                            <div class="am-flex am-flex-items-center am-gap-32 am-margin-top-sm">
                                                <a href="javascript:;" class="am-text-xs am-text-danger content-app-items-rem-sub am-flex am-flex-items-center">
                                                    <i class="iconfont icon-delete"></i>
                                                    {{:MyLang('delete_title')}}
                                                </a>
                                                <a href="javascript:;" class="am-text-xs drag-sort-submit am-flex am-flex-items-center">
                                                    <i class="iconfont icon-sort"></i>
                                                    {{:MyLang('sort_title')}}
                                                </a>
                                            </div>
                                        </li>
                                    {{/foreach}}
                                {{/if}}
                            </ul>
                            <span class="business-operations-submit content-app-items-add-sub am-border-0 am-text-sm">
                                <i class="iconfont icon-add"></i>
                                {{:MyLang('common_service.goods.form_app_button_add_name')}}
                            </span>
                        </div>
                    </div>

                    <!-- 电脑详情 -->
                    <div id="goods-nav-web" class="item" data-key="web">
                        {{if !empty($goods_admin_nav_list['web']['tips'])}}
                            <div class="am-operate-stretch-tips">
                                <div class="title">
                                    <i class="iconfont icon-tips"></i>
                                    <strong title="{{:MyLang('operate_list_tips_msg')}}">{{:MyLang('operate_list_tips_button_text')}}</strong>
                                    <i class="iconfont icon-retract-diagonal contract" title="{{:MyLang('operate_list_tips_retract_text')}}"></i> 
                                </div>
                                <p>{{if is_array($goods_admin_nav_list['web']['tips'])}}{{:implode('</p><p>', $goods_admin_nav_list.web.tips)}}{{else /}}{{$goods_admin_nav_list.web.tips}}{{/if}}</p>
                            </div>
                        {{/if}}
                        <div class="am-form-group">
                            <label>{{$goods_admin_nav_list.web.name}}</label>
                            <textarea class="am-radius" name="content_web" id="editor-tag" data-validation-message="{{:MyLang('common_service.goods.form_web_content_message')}}">{{if !empty($data['content_web'])}}{{$data.content_web}}{{/if}}</textarea>
                        </div>
                    </div>

                    <!-- 虚拟信息 -->
                    <div id="goods-nav-fictitious" class="item" data-key="fictitious">
                        {{if !empty($goods_admin_nav_list['fictitious']['tips'])}}
                            <div class="am-operate-stretch-tips">
                                <div class="title">
                                    <i class="iconfont icon-tips"></i>
                                    <strong title="{{:MyLang('operate_list_tips_msg')}}">{{:MyLang('operate_list_tips_button_text')}}</strong>
                                    <i class="iconfont icon-retract-diagonal contract" title="{{:MyLang('operate_list_tips_retract_text')}}"></i> 
                                </div>
                                <p>{{if is_array($goods_admin_nav_list['fictitious']['tips'])}}{{:implode('</p><p>', $goods_admin_nav_list.fictitious.tips)}}{{else /}}{{$goods_admin_nav_list.fictitious.tips}}{{/if}}</p>
                            </div>
                        {{/if}}
                        <div class="am-form-group">
                            <label>{{$goods_admin_nav_list.fictitious.name}}</label>
                            <textarea id="goods-fictitious-container" name="fictitious_goods_value">{{if !empty($data['fictitious_goods_value'])}}{{$data.fictitious_goods_value|raw}}{{/if}}</textarea>
                        </div>
                    </div>

                    <!-- 扩展数据 -->
                    <div id="goods-nav-extends" class="item" data-key="extends">
                        {{if !empty($goods_admin_nav_list['extends']['tips'])}}
                            <div class="am-operate-stretch-tips">
                                <div class="title">
                                    <i class="iconfont icon-tips"></i>
                                    <strong title="{{:MyLang('operate_list_tips_msg')}}">{{:MyLang('operate_list_tips_button_text')}}</strong>
                                    <i class="iconfont icon-retract-diagonal contract" title="{{:MyLang('operate_list_tips_retract_text')}}"></i> 
                                </div>
                                <p>{{if is_array($goods_admin_nav_list['extends']['tips'])}}{{:implode('</p><p>', $goods_admin_nav_list.extends.tips)}}{{else /}}{{$goods_admin_nav_list.extends.tips}}{{/if}}</p>
                            </div>
                        {{/if}}
                        <div class="am-form-group">
                            <label>{{$goods_admin_nav_list.extends.name}}</label>
                            <div class="am-flex am-flex-col am-gap-32 am-margin-top-sm">
                                <!-- 插件扩展数据 start -->
                                {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                                    <div class="plugins-tag">
                                        <span>plugins_view_admin_goods_save</span>
                                    </div>
                                {{/if}}
                                {{if !empty($plugins_view_admin_goods_save_data) and is_array($plugins_view_admin_goods_save_data) and !empty(array_filter($plugins_view_admin_goods_save_data))}}
                                    {{foreach $plugins_view_admin_goods_save_data as $hook}}
                                        {{if is_string($hook) or is_int($hook)}}
                                            {{$hook|raw}}
                                        {{/if}}
                                    {{/foreach}}
                                {{else /}}
                                    {{:ModuleInclude('public/not_data')}}
                                {{/if}}
                                <!-- 插件扩展数据 end -->
                            </div>
                        </div>
                    </div>

                    <!-- 使用指南 -->
                    <div id="goods-nav-use-guide" class="item" data-key="use_guide">
                        {{if !empty($goods_admin_nav_list['use_guide']['tips'])}}
                            <div class="am-operate-stretch-tips">
                                <div class="title">
                                    <i class="iconfont icon-tips"></i>
                                    <strong title="{{:MyLang('operate_list_tips_msg')}}">{{:MyLang('operate_list_tips_button_text')}}</strong>
                                    <i class="iconfont icon-retract-diagonal contract" title="{{:MyLang('operate_list_tips_retract_text')}}"></i> 
                                </div>
                                <p>{{if is_array($goods_admin_nav_list['use_guide']['tips'])}}{{:implode('</p><p>', $goods_admin_nav_list.use_guide.tips)}}{{else /}}{{$goods_admin_nav_list.use_guide.tips}}{{/if}}</p>
                            </div>
                        {{/if}}
                        <div class="am-form-group">
                            <label>{{$goods_admin_nav_list.use_guide.name}}</label>
                            <textarea id="goods-use-guide-container" name="use_guide">{{if !empty($data['use_guide'])}}{{$data.use_guide|raw}}{{/if}}</textarea>
                        </div>
                    </div>

                    <!-- SEO信息 -->
                    <div id="goods-nav-seo" class="item" data-key="seo">
                        {{if !empty($goods_admin_nav_list['seo']['tips'])}}
                            <div class="am-operate-stretch-tips">
                                <div class="title">
                                    <i class="iconfont icon-tips"></i>
                                    <strong title="{{:MyLang('operate_list_tips_msg')}}">{{:MyLang('operate_list_tips_button_text')}}</strong>
                                    <i class="iconfont icon-retract-diagonal contract" title="{{:MyLang('operate_list_tips_retract_text')}}"></i> 
                                </div>
                                <p>{{if is_array($goods_admin_nav_list['seo']['tips'])}}{{:implode('</p><p>', $goods_admin_nav_list.seo.tips)}}{{else /}}{{$goods_admin_nav_list.seo.tips}}{{/if}}</p>
                            </div>
                        {{/if}}
                        {{:ModuleInclude('lib/seo', empty($data) ? [] : $data, ['is_share_images'=>1])}}
                    </div>
                </div>

                <div class="am-form-popup-submit">
                    <input type="hidden" name="id" {{if isset($data) and !empty($data['id']) and (!isset($is_copy) or $is_copy neq 1)}} value="{{$data.id}}"{{/if}} />
                    <button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner: 'circle-o-notch', loadingText:'{{:MyLang('save_title')}}'}">
                        <i class="am-icon-save"></i>
                        <span>{{:MyLang('save_title')}}</span>
                    </button>
                </div>
            </form>
            <!-- form end -->
        {{else /}}
            <div class="am-alert am-alert-warning">
                <span>{{:MyLang('common_service.goods.goods_category_no_data_tips')}}</span>
            </div>
        {{/if}}
	</div>
</div>
<!-- right content end  -->

<!-- 规格扩展数据弹层 -->
{{:ModuleInclude('goods/spec_extends')}}

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

<script type="text/javascript">
// 规格扩展返回处理
function SpecificationsExtendsBack(data)
{
	var $extends_popup = $('#specifications-extends-popup');
    $('.specifications-table').find($extends_popup.attr('data-line-extend')).find('.line-extend-input').val(JSON.stringify(data));
    $extends_popup.modal('close');
}
</script>