<?php /*a:1:{s:70:"D:\phpstudy\WWW\12xz\app\admin\view/default\articlecategory\index.html";i:1785760822;}*/ ?>
<?php echo ModuleInclude('public/header'); ?>

<!-- right content start  -->
<div class="content-right">
    <div class="content">
        <?php if(AdminIsPower('articlecategory', 'save')): ?>
            <!-- operation start -->
            <div class="am-flex am-flex-justify-between am-flex-items-center am-gap-2">
                <button class="am-btn am-btn-primary am-radius am-btn-xs tree-submit-add" data-am-modal="{target: '#data-save-win'}">
                    <i class="iconfont icon-add am-show-sm-only"></i>
                    <span><?php echo MyLang('add_title'); ?></span>
                </button>
            </div>
            <!-- operation end -->
            <!-- save win start -->
            <div class="am-popup am-radius" id="data-save-win">
                <div class="am-popup-inner">
                    <div class="am-popup-hd">
                        <h4 class="am-popup-title" data-add-title="<?php echo MyLang('articlecategory.base_nav_title'); ?><?php echo MyLang('add_title'); ?>" data-edit-title="<?php echo MyLang('articlecategory.base_nav_title'); ?><?php echo MyLang('edit_title'); ?>"><?php echo MyLang('articlecategory.base_nav_title'); ?><?php echo MyLang('add_title'); ?></h4>
                        <span data-am-modal-close class="am-close">&times;</span>
                    </div>
                    <div class="am-popup-bd">
                        <!-- form start -->
                        <form class="am-form form-validation am-form-popup-fixed" action="<?php echo MyUrl('admin/articlecategory/save'); ?>" method="POST" request-type="ajax-fun" request-value="CardFormSaveBack">
                            <div class="am-form-group row">
                                <label><?php echo MyLang('common_service.articlecategory.form_item_name'); ?><span class="am-form-group-label-tips-must">*</span></label>
                                <input type="text" placeholder="<?php echo MyLang('common_service.articlecategory.form_item_name_message'); ?>" name="name" minlength="1" maxlength="60" data-validation-message="<?php echo MyLang('common_service.articlecategory.form_item_name_message'); ?>" class="am-radius" required />
                            </div>
                            <?php echo ModuleInclude('lib/sort', ['is_row'=>1]); ?>
                            <?php echo ModuleInclude('lib/is_enable', ['is_row'=>1]); ?>
                            <div class="am-form-popup-submit">
                                <input type="hidden" name="id" />
                                <button type="button" class="am-btn am-btn-warning am-radius am-btn-xs" data-am-modal-close>
                                    <i class="am-icon-paint-brush"></i>
                                    <span><?php echo MyLang('cancel_title'); ?></span>
                                </button>
                                <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:'<?php echo MyLang('save_title'); ?>'}">
                                    <i class="am-icon-save"></i>
                                    <span><?php echo MyLang('save_title'); ?></span>
                                </button>
                            </div>
                        </form>
                        <!-- form end -->
                    </div>
                </div>
            </div>
            <!-- save win end -->



        <?php endif; ?>
        <!-- list start -->
        <div id="tree" 
        class="am-margin-top-sm" 
        data-head='[{"name":"ID","field":"id"},{"name":"<?php echo MyLang("name_title"); ?>","field":"name","is_arrow":"1","value_style":{"style":"color:#999","value_style_key":"is_enable","value_style_key_status":"0"}},{"name":"<?php echo MyLang("icon_title"); ?>","field":"icon","type":"img"},{"name":"<?php echo MyLang("form_is_enable_title"); ?>","field":"is_enable","type":"status"},{"name":"<?php echo MyLang("operate_title"); ?>","type":"operate"}]' 
        data-additional='[{"field":"is_home_recommended", "value":"0", "type":"input"},{"field":"bg_color", "value":"", "type":"input"}, {"field":"bg_color", "value":"", "type":"css", "tag":".colorpicker-submit", "style":"background-color"}, {"field":"icon", "value":"", "type":"input"}, {"field":"icon", "value":"", "type":"annex", "tag":"ul.goods-category-icon-images-view", "style":"src"}, {"field":"icon_active", "value":"", "type":"input"}, {"field":"icon_active", "value":"", "type":"annex", "tag":"ul.goods-category-icon-active-images-view", "style":"src"}, {"field":"realistic_images", "value":"", "type":"input"}, {"field":"realistic_images", "value":"", "type":"annex", "tag":"ul.goods-category-realistic_images-images-view", "style":"src"}, {"field":"big_images", "value":"", "type":"input"}, {"field":"big_images", "value":"", "type":"annex", "tag":"ul.goods-category-big_images-images-view", "style":"src"}]' 
        data-node-url="<?php echo MyUrl('admin/articlecategory/getnodeson'); ?>" 
        data-del-url="<?php if(AdminIsPower('articlecategory', 'delete')): ?><?php echo MyUrl('admin/articlecategory/delete'); ?><?php endif; ?>" 
        data-status-url="<?php if(AdminIsPower('articlecategory', 'statusupdate')): ?><?php echo MyUrl('admin/articlecategory/statusupdate'); ?><?php endif; ?>" 
        data-popup-tag="#data-save-win" data-rank="3">
            <?php echo ModuleInclude('public/loading'); ?>
        </div>
        <!-- list end -->
    </div>
</div>
<!-- right content end  -->

<!-- footer start -->
<?php echo ModuleInclude('public/footer'); ?>

<script type="text/javascript">
	// 初始化
	Tree(0, $('#tree').data('node-url'), 0, 1);

	// 回调处理
	function CardFormSaveBack(e)
	{
		CardFormSaveBackHandle(e);
	}
</script>