app/views/educode_sales/contracts/index.html.erb in educode_sales-0.9.86 vs app/views/educode_sales/contracts/index.html.erb in educode_sales-0.9.89

- old
+ new

@@ -1,18 +1,26 @@ <%= Gon::Base.render_data %> <div class="layui-tab" lay-filter="contract_tab"> <ul class="layui-tab-title"> <li class="layui-this follows_li">跟进动态</li> <li class="contracts_list_li">合同列表</li> + <% if can? :read_sales_detail, EducodeSales::Business %> + <li class="sales_list_li">销售明细</li> + <% end %> </ul> <div class="layui-tab-content"> <div class="layui-tab-item follows_div layui-show"> <%=render 'follows' %> </div> <div class="layui-tab-item contracts_list_div"> <div id="contract_list_wraper"></div> </div> + <% if can? :read_sales_detail, EducodeSales::Business %> + <div class="layui-tab-item sales_list_div"> + <div id="sales_list_wraper"></div> + </div> + <% end %> </div> </div> <script> layui.use(['form', 'table', 'miniPage', 'element', 'request', 'laydate', 'element'], function() { @@ -29,9 +37,11 @@ element.render(); element.on('tab(contract_tab)', function(data) { if (data.index == 1 && $("#contract_list").length == 0) { loadPage('/missions/contracts/list') + } else if (data.index == 2 && $("#sales_list").length == 0) { + loadPage('/missions/sales_details') } }); function loadPage(url) { \ No newline at end of file