app/views/educode_sales/activities/index.html.erb in educode_sales-0.9.60 vs app/views/educode_sales/activities/index.html.erb in educode_sales-0.9.61
- old
+ new
@@ -5,10 +5,58 @@
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="import">导入数据</button>
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add"> 添加活动</button>
<% end %>
</div>
</script>
+<div style="margin: 10px 10px 10px 10px">
+ <form class="layui-form layui-form-pane" lay-filter="search_ideas">
+ <div class="layui-form-item">
+ <div class="layui-inline ">
+ <label class="layui-form-label">活动名称</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="name" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">会议类型</label>
+ <div class="layui-input-inline">
+ <%= select_tag "clazz_id", options_for_select(['全国会议', '区域会议', '单校会议', '国赛', '省赛', '夏令营'], ""), { include_blank: true } %>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">销售经理</label>
+ <div class="layui-input-inline">
+ <%= select_tag "staff_id", options_for_select(@staffs, ""), { include_blank: true } %>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">生态经理</label>
+ <div class="layui-input-inline">
+ <%= select_tag "manage", options_for_select(@staffs, ""), { include_blank: true } %>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">协助人员</label>
+ <div class="layui-input-inline">
+ <%= select_tag "assists", options_for_select(@staffs, ""), { include_blank: true } %>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">报告专家</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="expert" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <button type="reset" class="layui-btn layui-btn-primary" lay-submit lay-filter="reset_activity_search">重置
+ </button>
+ <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="search_activity">搜 索
+ </button>
+ </div>
+ </div>
+ </form>
+</div>
<div class="min-height-table">
<table class="layui-hide" id="activities_table" lay-filter="activities_table"></table>
</div>
<script type="text/html" id="currentTableBar">
@@ -127,9 +175,20 @@
where: {
sort: sort
}
});
})
+ // 监听搜索操作
+ form.on('submit(search_activity)', function (data) {
+ search = data.field
+ table.reload('activities_table', {
+ page: {
+ curr: 1
+ },
+ where: {q: search, sort: sort}
+ }, 'data');
+ return false;
+ });
table.on('toolbar(activities_table)', function (obj) {
if (obj.event === 'add') { // 监听添加操作
var content = miniPage.getHrefContent('/missions/activities/new');
var openWH = miniPage.getOpenWidthHeight();
index = layer.open({
\ No newline at end of file