app/views/educode_sales/sales/index.html.erb in educode_sales-0.5.1 vs app/views/educode_sales/sales/index.html.erb in educode_sales-0.5.2
- old
+ new
@@ -1,9 +1,9 @@
<div class="section">
<h4><span>销售人员列表</span></h4>
<hr>
- <table class="layui-hide" id="table"></table>
+ <table class="layui-hide" id="table" lay-filter="table" ></table>
</div>
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<button class="layui-btn layui-btn-sm" lay-event="getCheckData">添加</button>
</div>
@@ -16,10 +16,30 @@
<script type="text/html" id="business_b">
<div class="layui-text">
<a href="/missions/businesses?clazz_id={{d.b_clazz_id}}&staff_id={{d.id}}">{{d.business_b}}</a>
</div>
</script>
+<script type="text/html" id="business_c">
+ <div class="layui-text">
+ <a href="/missions/businesses?clazz_id={{d.c_clazz_id}}&staff_id={{d.id}}">{{d.business_c}}</a>
+ </div>
+</script>
+<script type="text/html" id="business_d">
+ <div class="layui-text">
+ <a href="/missions/businesses?clazz_id={{d.d_clazz_id}}&staff_id={{d.id}}">{{d.business_d}}</a>
+ </div>
+</script>
+<script type="text/html" id="business_e">
+ <div class="layui-text">
+ <a href="/missions/businesses?clazz_id={{d.e_clazz_id}}&staff_id={{d.id}}">{{d.business_e}}</a>
+ </div>
+</script>
+<script type="text/html" id="business_o">
+ <div class="layui-text">
+ <a href="/missions/businesses?clazz_id={{d.o_clazz_id}}&staff_id={{d.id}}">{{d.business_o}}</a>
+ </div>
+</script>
<script>
layui.use('table', function () {
var table = layui.table;
table.render({
@@ -43,31 +63,77 @@
}, {
field: 'business_a',
title: 'A类商机',
templet: "#business_a",
totalRow:true,
+ sort:true,
width: 120
- }, {
+ },
+ {
field: 'business_b',
title: 'B类商机',
templet: "#business_b",
- totalRow:true,
+ totalRow:true,sort:true,
width: 120
- }, {
+ },
+ {
+ field: 'business_c',
+ title: 'C类商机',
+ templet: "#business_c",
+ totalRow:true,sort:true,
+ width: 120
+ },
+ {
+ field: 'business_d',
+ title: 'D类商机',
+ templet: "#business_d",
+ totalRow:true,sort:true,
+ width: 120
+ },
+ {
+ field: 'business_e',
+ title: 'E类商机',
+ templet: "#business_e",
+ totalRow:true,sort:true,
+ width: 120
+ },
+ {
+ field: 'business_o',
+ title: 'O类商机',
+ templet: "#business_o",
+ totalRow:true,sort:true,
+ width: 120
+ },
+ {
field: 'goal',
title: '中标金额',
- totalRow:true,
+ totalRow:true,sort:true,
width: 120
}, {
field: 'return_money',
title: '回款',
- totalRow:true,
+ totalRow:true,sort:true,
width: 120
}
]
],
limit: 20,
limits: [10,15,20,30,40,50,60,70,80,90],
page: true
});
+
+ // var sort = {}, search = {};
+ // table.on('sort(table)', function (obj) {
+ // sort.field = obj.field;
+ // sort.order = obj.type;
+ // table.reload('table', {
+ // initSort: obj,
+ // where: {
+ // sort: sort,
+ // q: search
+ // }
+ // });
+ // })
+
+
});
</script>
\ No newline at end of file