@{
    ViewBag.Title = "";
}
<style>
    input[type=checkbox] {
        margin: 0 5px;
    }

    .content-header {
        display: none;
    }
    .callout b{
        color:yellow;
    }
    .info-msg{
        display:block;
    }

    .categoryUp {
        position: absolute;
        right: 40px;
        top: 8px;
        display:none;
    }
    .categoryDown {
        position: absolute;
        right: 10px;
        top: 8px;
        display: none;
    }
    .fieldUp {
        position: absolute;
        right: 40px;
        top: 8px;
        display: none;
    }
    .fieldDown {
        position: absolute;
        right: 10px;
        top: 8px;
        display: none;
    }
    .tr-category-title:hover .categoryDown,
    .tr-category-title:hover .categoryUp,
    .tr-category-title:hover .fieldDown,
    .tr-category-title:hover .fieldUp {
        display: inline-block;
    }

    .tableEdit > thead > tr > td:first-child, .tableEdit > tbody > tr > td:first-child {
        text-align: right;
        padding-right: 20px;
        width: 100px;
    }
    .tr-show{

    }
    .tr-hide{
        display:none;
    }

    .order-template input[type=text].width-100 {
        width: 100% !important;
    }

    .td-materials span {
        margin-right: 15px;
    }
</style>

@if (ViewBag.type == 2)
{   
    <style>
        .isStockFactor{
            display:none;
        }
    </style>
}

<div class="callout callout-success lead">
    <span>订单模板配置</span>        
    
    <a href="/VersionList/doc.html" target="_blank" class="a-help">更多帮助</a> 
    <a target="_blank" href="/VersionList/doc.html?c=5&d=1" class="a-help">“计算公式”和“价格因子”是什么意思？</a>
</div>
<script src="../../Scripts/ordertemplate.js?vn=20180813"></script>
<script src="~/Scripts/sortable1.4.2min.js"></script>

<div style="margin:5px;">
</div>
<div class="">
    <div class="btn-group">
        <button class="btn btn-default" type="button" id='btnToggle1'>全部折叠</button>
        <button class="btn btn-default" type="button" id='btnToggle2'>全部展开</button>
    </div>
    &nbsp;
    <div class="btn-group">
        <button class="btn btn-default" type="button" id='btnAddCategory'>添加业务类型</button>
        <button class="btn btn-default" type="button" id='btnDeleteCategory'>删除业务类型</button>
    </div>
    &nbsp;
    <button style="display:none" class="btn btn-default" type="button" id='btnCopy'>从客户订单模板复制</button>
    &nbsp;
    <button class="btn btn-default" type="button" id='btnHistory'>模板历史记录</button>
    &nbsp;
    <button class="btn btn-primary" type="button" id='btnSave'>保存模板</button>
  

    <span id="errorMessageDetail" style="" class="errorSpan"></span>
</div>
<div id="divOrderTemplate" class="small-control order-template">
    <div style=" margin-top:5px;">
        <input type="checkbox" title="" class="selectAllCategory" /><span style="margin-left:2px;">全选</span>
        
    </div>
    @if (ViewBag.welcome == "1")
    {
        <div class="info-msg" style="display:block">模板修改成功！</div>
    }
    <div class="error-msg"></div>
    <div class="list">
        <ul id="divCategories"></ul>
    </div>
</div>

<div id="divHistory" title="模板版本历史" style="display:none">
    <div style="margin:0 0 10px 0;">
        <div class="list">
            <div>提示：</div>
            <ul style="padding-left:20px">
                <li>仅显示最近的10个历史版本。</li>
                <li>仅恢复模板业务类型及详细字段数据。</li>                
            </ul>           
          
            <table>
                <thead>
                    <tr class="title">             
                        <th style="width:100px">版本创建人</th>
                        <th>版本创建日期</th>
                        <th style="width:100px"></th>
                    </tr>
                </thead>
                <tbody id="HistoryList"></tbody>
            </table>
        </div>
    </div>

    <div style="text-align:right;">
        <button type="button" class="btn btn-default" id="btnPriceTipClose" onclick="$('#divHistory').dialog('close');">关闭</button>
    </div>

</div>

@Html.Hidden("type")
