<div class="version-manage cd-version-table-warp {{if select || crmActivityType ===2}}no-edit{{/if}}" style="height: {{height}};">
  <div class="main-con">
    <div class="header-bar" {{if versionType === 0 && isBi}}style="display:none"{{/if}}>
        
        <div class="version-tab">
            <div class="tab-warp" {{if materialPlanList && materialPlanList.length === 1}}style="position:relative;"{{/if}}>
                {{if materialPlanList && materialPlanList.length && materialPlanList.length > 1}}
                    {{each materialPlanList item index}}
                    <div data-index="{{index}}" class="tab-item J_version-item {{if index === versionIndex}}active{{/if}}">
                        <div class="index">{{index+1}}</div>
                        <div class="tool-right">
                            <p class="time">
                            {{if item.startTime}}
                            {{@(function(){
                                var timeArr = item.startTime.split(' ');
                                return timeArr[0]+"<br>"+timeArr[1]
                            })()}}
                            {{else}}
                            开始时间<br>
                            请选择
                            {{/if}}
                            </p>
                            {{if crmActivityType !==2}}
                            <div class="tool-con J_tool-con">
                                
                                <i data-index="{{index}}" data-tooltips="data-tooltips" data-direaction="top" data-content="选择开始时间" data-type="edit" class="icon-time icon edit-btn J_edit-time"></i>
                                <i data-index="{{index}}" data-tooltips="data-tooltips" data-direaction="top" data-content="拷贝" data-type="copy" class="icon-iconCopy icon copy-btn J_edit-version"></i>
                                <i data-tooltips="data-tooltips" data-direaction="top" data-content="删除" class="icon-iconDelete icon delete-btn J_delete-version"></i>
                                {{if (index !== versionIndex && (materialPlanList[index].materialList.length === 0 || !materialPlanList[index].startTime))}}<span data-tooltips="data-tooltips" data-direaction="top" data-content="请选择该分期，{{if !materialPlanList[index].startTime}}并选择开始时间{{else if materialPlanList[index].materialList.length === 0}}并添加{{versionType === 0 ? '广告' : '商品'}}{{/if}}!" class="icon-alert icon" style="color: #FAAD15;"></span>{{/if}}
                            </div>
                            {{/if}}
                        </div>
                    </div>
                    {{/each}}
                {{else}}
                <div class="tab-item J_version-item">
                    <p class="one-line-time">{{ if materialPlanList[0] && materialPlanList[0].startTime}}{{materialPlanList[0].startTime}}{{else}}{{versionType === 0 ? '广告' : '商品'}}生效时间{{/if}}</p>
                    {{if crmActivityType !==2}}
                    <div class="min-tool-con J_tool-con">
                        <i data-index="0" data-tooltips="data-tooltips" data-direaction="top" data-content="选择开始时间" data-type="edit" class="icon-time icon edit-btn J_edit-time"></i>
                        <i data-index="0" data-tooltips="data-tooltips" data-direaction="top" data-content="拷贝" data-type="copy" class="icon-iconCopy icon copy-btn J_edit-version"></i>
                    </div>
                    {{/if}}
                </div>
                {{/if}}
                {{if !materialPlanList || materialPlanList.length <= 9 && materialPlanList.length > 1}}
                <div data-type="new" class="add-version-btn J_edit-version">
                    <p>添加分期({{materialPlanList.length}}/10)</p>
                </div>
                {{/if}}
                {{if materialPlanList && materialPlanList.length === 1}}
                    {{if crmActivityType !==2 && moduleFlag !='mBlindBoxPreBlock'}}
                        <div class="one-time-msg">
                            <p>分期功能可以让{{versionType === 0 ? '广告' : '商品'}}按照指定的几组时间分期展示 <span data-type="new" class="J_edit-version">+ 增加分期</span></p>
                        </div>
                    {{/if}}
                {{/if}}
            </div>
        </div>
        {{if(materialPlanList && materialPlanList.length > 0)}}
        <div class="head-tool">
             {{if (materialPlanList && materialPlanList.length > 1)}}
             <span class="version-name">分期{{versionIndex+1}}</span>
             {{/if}}
             <div class="version-info-right">
                <span class="has-in">录入{{versionType === 0 ? '广告' : '商品'}}: <b>{{materialPlanList[versionIndex] &&materialPlanList[versionIndex].materialList && materialPlanList[versionIndex].materialList.length}}</b></span>
                {{if crmActivityType !==2}}
                {{if versionType == 0}}
                <span class="cd-middle-red-border-btn add-item J_edit-item">添加广告</span>
                {{else}}
                    {{if (materialPlanList[versionIndex] &&materialPlanList[versionIndex].materialList && materialPlanList[versionIndex].materialList.length)}}
                        <span class="cd-middle-red-border-btn add-item J_edit-item">添加商品</span>
                    {{/if}}
                {{/if}}
                {{/if}}
            </div>
        </div>
        {{/if}}
        
    </div>
    <div class="table-con" style="">
        {{@ table }}
    </div>
   

</div>
{{ if ((function(){
    var check = false;
    if(materialPlanList && materialPlanList.length && materialPlanList[versionIndex] && materialPlanList[versionIndex].materialList.length){
        for(var i = 0, l = materialPlanList[versionIndex].materialList.length; i < l; i++){
            if(materialPlanList[versionIndex].materialList[i].check){
                check = true;
                break;
            }
        }
    }
    return check;
})())}}
<span class="batch-delete-btn J_batch-delete"><i class="icon-iconDelete icon"></i>删除选中{{versionType === 0 ? '图片' : '商品'}}</span>
{{/if}}
</div>




