Sha256: a75be9632f33452df85ed8825df40ad6d79588a80552d259b4ea1ffc38920481

Contents?: true

Size: 1.76 KB

Versions: 1

Compression:

Stored size: 1.76 KB

Contents

<%= 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>
        <li class="contracts_product_li">产品目录</li>
    </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>
        <div class="layui-tab-item contracts_product_div">
          <div id="contract_product_wraper"></div>
        </div>
    </div>
</div>

<script>
    layui.use(['form', 'table', 'miniPage', 'element', 'request', 'laydate', 'element'], function() {
        var $ = layui.jquery,
            form = layui.form,
            request = layui.request,
            dropdown = layui.dropdown,
            miniPage = layui.miniPage,
            element = layui.element,
            laydate = layui.laydate;
        var laydate = layui.laydate;



        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 && $("#product_list").length == 0) {
            loadPage('/missions/contracts/product_list')
          }
        });


        function loadPage(url) {
          var layer_index = layer.load(0, {shade: [0.1, '#fff']});
          Rails.ajax({
            url: url,
            type: 'GET',
            dataType: "script",
            success: function (res) {
              layer.close(layer_index);
            }
          });
        }
    })
</script>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
educode_sales-0.9.76 app/views/educode_sales/contracts/index.html.erb