educode_sales 0.9.48 → 0.9.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/images/educode_sales/indexlogo.png +0 -0
- data/app/controllers/educode_sales/idea_recycles_controller.rb +100 -0
- data/app/controllers/educode_sales/ideas_controller.rb +130 -0
- data/app/controllers/educode_sales/logs_controller.rb +21 -0
- data/app/controllers/educode_sales/teacher_follows_controller.rb +82 -2
- data/app/controllers/educode_sales/teachers_controller.rb +18 -3
- data/app/models/educode_sales/common.rb +2 -0
- data/app/models/educode_sales/idea.rb +87 -0
- data/app/models/educode_sales/idea_history.rb +8 -0
- data/app/views/educode_sales/idea_recycles/activities.json.jbuilder +9 -0
- data/app/views/educode_sales/idea_recycles/add_courses.html.erb +133 -0
- data/app/views/educode_sales/idea_recycles/add_event.html.erb +49 -0
- data/app/views/educode_sales/idea_recycles/add_keys.html.erb +334 -0
- data/app/views/educode_sales/idea_recycles/course_list.json.jbuilder +23 -0
- data/app/views/educode_sales/idea_recycles/course_subject.json.jbuilder +10 -0
- data/app/views/educode_sales/idea_recycles/daily_paper.html.erb +68 -0
- data/app/views/educode_sales/idea_recycles/detail.html.erb +144 -0
- data/app/views/educode_sales/idea_recycles/edit.html.erb +193 -0
- data/app/views/educode_sales/idea_recycles/edit_follow_record.html.erb +87 -0
- data/app/views/educode_sales/idea_recycles/history.html.erb +41 -0
- data/app/views/educode_sales/idea_recycles/import.html.erb +41 -0
- data/app/views/educode_sales/idea_recycles/index.html.erb +321 -0
- data/app/views/educode_sales/idea_recycles/index.json.jbuilder +16 -0
- data/app/views/educode_sales/idea_recycles/new.html.erb +204 -0
- data/app/views/educode_sales/idea_recycles/new_follow_record.html.erb +93 -0
- data/app/views/educode_sales/idea_recycles/search_new.html.erb +138 -0
- data/app/views/educode_sales/idea_recycles/show_class.html.erb +107 -0
- data/app/views/educode_sales/idea_recycles/show_follow.html.erb +504 -0
- data/app/views/educode_sales/idea_recycles/show_follow.json.jbuilder +23 -0
- data/app/views/educode_sales/idea_recycles/show_follow_record.html.erb +36 -0
- data/app/views/educode_sales/idea_recycles/unfinish_plans.json.jbuilder +14 -0
- data/app/views/educode_sales/ideas/activities.json.jbuilder +9 -0
- data/app/views/educode_sales/ideas/add_courses.html.erb +133 -0
- data/app/views/educode_sales/ideas/add_event.html.erb +49 -0
- data/app/views/educode_sales/ideas/add_keys.html.erb +334 -0
- data/app/views/educode_sales/ideas/course_list.json.jbuilder +23 -0
- data/app/views/educode_sales/ideas/course_subject.json.jbuilder +10 -0
- data/app/views/educode_sales/ideas/daily_paper.html.erb +68 -0
- data/app/views/educode_sales/ideas/detail.html.erb +144 -0
- data/app/views/educode_sales/ideas/edit.html.erb +182 -0
- data/app/views/educode_sales/ideas/edit_follow_record.html.erb +87 -0
- data/app/views/educode_sales/ideas/history.html.erb +41 -0
- data/app/views/educode_sales/ideas/import.html.erb +41 -0
- data/app/views/educode_sales/ideas/index.html.erb +335 -0
- data/app/views/educode_sales/ideas/index.json.jbuilder +16 -0
- data/app/views/educode_sales/ideas/new.html.erb +182 -0
- data/app/views/educode_sales/ideas/new_follow_record.html.erb +93 -0
- data/app/views/educode_sales/ideas/search_new.html.erb +138 -0
- data/app/views/educode_sales/ideas/show_class.html.erb +107 -0
- data/app/views/educode_sales/ideas/show_follow.html.erb +504 -0
- data/app/views/educode_sales/ideas/show_follow.json.jbuilder +23 -0
- data/app/views/educode_sales/ideas/show_follow_record.html.erb +36 -0
- data/app/views/educode_sales/ideas/unfinish_plans.json.jbuilder +14 -0
- data/app/views/educode_sales/logs/index.html.erb +48 -0
- data/app/views/educode_sales/logs/index.json.jbuilder +16 -0
- data/app/views/educode_sales/staffs/edit.html.erb +0 -1
- data/app/views/educode_sales/teacher_follows/index.json.jbuilder +20 -0
- data/app/views/educode_sales/teachers/_follows.html.erb +256 -0
- data/app/views/educode_sales/teachers/_index.html.erb +677 -0
- data/app/views/educode_sales/teachers/daily_paper.html.erb +22 -22
- data/app/views/educode_sales/teachers/index.html.erb +11 -651
- data/app/views/educode_sales/teachers/index.json.jbuilder +10 -0
- data/app/views/educode_sales/teachers/new.html.erb +9 -3
- data/app/views/educode_sales/teachers/new_follow_record.html.erb +6 -0
- data/app/views/layouts/educode_sales/application.html.erb +36 -7
- data/config/routes.rb +19 -0
- data/db/migrate/20230227061043_create_educode_sales_ideas.rb +28 -0
- data/db/migrate/20230227070206_change_to_educode_sales_ideas.rb +5 -0
- data/db/migrate/20230227125936_add_follow_at_to_teachers.rb +6 -0
- data/db/migrate/20230228063555_create_educode_sales_idea_histories.rb +10 -0
- data/db/migrate/20230302074324_change_manager_for_ideas.rb +6 -0
- data/lib/educode_sales/version.rb +1 -1
- metadata +66 -6
@@ -0,0 +1,256 @@
|
|
1
|
+
<div style="margin: 10px 10px 10px 10px">
|
2
|
+
<form class="layui-form layui-form-pane" lay-filter="search_follows">
|
3
|
+
<div class="layui-form-item">
|
4
|
+
<div class="layui-inline">
|
5
|
+
<label class="layui-form-label">教师姓名</label>
|
6
|
+
<div class="layui-input-inline">
|
7
|
+
<input type="text" name="name" class="layui-input">
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
<div class="layui-inline">
|
11
|
+
<label class="layui-form-label">单位</label>
|
12
|
+
<div class="layui-input-inline">
|
13
|
+
<input type="text" name="department" class="layui-input">
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="layui-inline">
|
17
|
+
<label class="layui-form-label">生态经理</label>
|
18
|
+
<div class="layui-input-inline">
|
19
|
+
<%= select_tag "staff_id", options_for_select(@staff_manage, params[:staff_id]), { 'lay-filter': 'staff_id', include_blank: true } %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<div class="layui-inline">
|
23
|
+
<label class="layui-form-label">区域</label>
|
24
|
+
<div class="layui-input-inline">
|
25
|
+
<%= select_tag "area", options_for_select(EducodeSales::Common.where(clazz: 'area').pluck(:name, :id)), { include_blank: true } %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<div class="layui-inline">
|
29
|
+
<label class="layui-form-label">跟进时间</label>
|
30
|
+
<div class="layui-input-inline">
|
31
|
+
<input type="text" class="layui-input" id="follows_date" name="follows_date" autocomplete="off" placeholder=" - ">
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
<div class="layui-inline">
|
35
|
+
<label class="layui-form-label">最新进展</label>
|
36
|
+
<div class="layui-input-inline">
|
37
|
+
<input type="text" name="description" class="layui-input">
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div class="layui-inline">
|
42
|
+
<button type="reset" class="layui-btn layui-btn-primary" lay-submit lay-filter="reset_follows_search">重置
|
43
|
+
</button>
|
44
|
+
<button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="search_follows">搜 索
|
45
|
+
</button>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</form>
|
49
|
+
</div>
|
50
|
+
<div class="">
|
51
|
+
<table class="layui-hide" id="teacher_follows_table" style="min-height: 300px;" lay-filter="teacher_follows_table"></table>
|
52
|
+
</div>
|
53
|
+
<script type="text/html" id="toolbarDemo_follows">
|
54
|
+
<div class="layui-btn-container">
|
55
|
+
<span class="table-label">跟进动态</span>
|
56
|
+
<a class="layui-btn layui-btn-normal layui-btn-sm" style="margin-left: 20px;" lay-event="report_day">日报</a>
|
57
|
+
</div>
|
58
|
+
</script>
|
59
|
+
<script type="text/html" id="currentTableBar_follows">
|
60
|
+
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="detail">详情</a>
|
61
|
+
</script>
|
62
|
+
<script type="text/html" id="teacher_name">
|
63
|
+
{{# if (d.login) { }}
|
64
|
+
<a href="<%= base_url%>/users/{{d.login}}" class="layui-table-link" target="_blank">{{ d.teacher }}</a>
|
65
|
+
{{# } else {}}
|
66
|
+
<a href="javascript:;" class="">{{ d.teacher }}</a>
|
67
|
+
{{# }}}
|
68
|
+
</script>
|
69
|
+
<script type="text/html" id="school">
|
70
|
+
<a href="<%= base_url%>/colleges/{{d.school_id}}/statistics" class="layui-table-link" target="_blank">{{ d.school }}</a>
|
71
|
+
</script>
|
72
|
+
|
73
|
+
|
74
|
+
<script>
|
75
|
+
layui.use(['form', 'table', 'miniPage', 'element', 'request', 'laydate'], function () {
|
76
|
+
var $ = layui.jquery,
|
77
|
+
form = layui.form,
|
78
|
+
request = layui.request,
|
79
|
+
dropdown = layui.dropdown,
|
80
|
+
miniPage = layui.miniPage,
|
81
|
+
laydate = layui.laydate;
|
82
|
+
|
83
|
+
var laydate = layui.laydate;
|
84
|
+
|
85
|
+
laydate.render({
|
86
|
+
elem: '#follows_date',
|
87
|
+
range: true
|
88
|
+
});
|
89
|
+
|
90
|
+
table = layui.table;
|
91
|
+
table.render({
|
92
|
+
elem: '#teacher_follows_table',
|
93
|
+
url: '/missions/teacher_follows',
|
94
|
+
toolbar: '#toolbarDemo_follows',
|
95
|
+
defaultToolbar: ['filter'],
|
96
|
+
initSort: {
|
97
|
+
field: 'created_at' ,type: 'desc' //排序方式 asc: 升序、desc: 降序、null: 默认排序
|
98
|
+
},
|
99
|
+
cols: [
|
100
|
+
[
|
101
|
+
{
|
102
|
+
field: 'id',
|
103
|
+
width: 60,
|
104
|
+
title:'序号',type: 'numbers',
|
105
|
+
},
|
106
|
+
{
|
107
|
+
field: 'description',
|
108
|
+
title: '最新进展',
|
109
|
+
templet:'<div><span title="{{d.description}}">{{d.description}}</span></div>'
|
110
|
+
},
|
111
|
+
{
|
112
|
+
width: 120,
|
113
|
+
title: '教师姓名',
|
114
|
+
templet:'#teacher_name'
|
115
|
+
},
|
116
|
+
{
|
117
|
+
field: 'school',
|
118
|
+
width: 150,
|
119
|
+
title: '单位',
|
120
|
+
templet:'#school'
|
121
|
+
},
|
122
|
+
{
|
123
|
+
field: 'mobile',
|
124
|
+
width: 120,
|
125
|
+
title: '联系电话',
|
126
|
+
templet:'<div><span title="{{d.mobile}}">{{d.mobile}}</span></div>'
|
127
|
+
},
|
128
|
+
{
|
129
|
+
field: 'attitude',
|
130
|
+
title: '态度',
|
131
|
+
width: 90,
|
132
|
+
templet:'<div><span title="{{d.attitude}}">{{d.attitude}}</span></div>'
|
133
|
+
},
|
134
|
+
{
|
135
|
+
field: 'staff_manage',
|
136
|
+
width: 160,
|
137
|
+
title: '生态经理',
|
138
|
+
},
|
139
|
+
{
|
140
|
+
field: 'staff',
|
141
|
+
width: 120,
|
142
|
+
title: '最新跟进人',
|
143
|
+
},
|
144
|
+
{
|
145
|
+
field: 'created_at',
|
146
|
+
width: 180,
|
147
|
+
title: '跟进时间',
|
148
|
+
sort: true,
|
149
|
+
templet:'<div><span title="{{d.created_at}}">{{d.created_at}}</span></div>'
|
150
|
+
},
|
151
|
+
{
|
152
|
+
field: 'advise',
|
153
|
+
width: 120,
|
154
|
+
title: '团队建议',
|
155
|
+
templet:'<div><span title="{{d.advise}}">{{d.advise}}</span></div>'
|
156
|
+
},
|
157
|
+
|
158
|
+
{
|
159
|
+
title: '操作',
|
160
|
+
width: 80,
|
161
|
+
toolbar: '#currentTableBar_follows',
|
162
|
+
align: "center",
|
163
|
+
fixed: 'right'
|
164
|
+
}
|
165
|
+
]
|
166
|
+
],
|
167
|
+
limit: 20,
|
168
|
+
page: true,
|
169
|
+
limits: [10,15,20,30,40,50,60,70,80,90]
|
170
|
+
});
|
171
|
+
|
172
|
+
var sort = {}, search = {};
|
173
|
+
table.on('sort(teacher_follows_table)', function (obj) {
|
174
|
+
sort.field = obj.field;
|
175
|
+
sort.order = obj.type;
|
176
|
+
table.reload('teacher_follows_table', {
|
177
|
+
initSort: obj,
|
178
|
+
where: {
|
179
|
+
sort: sort,
|
180
|
+
q: search
|
181
|
+
}
|
182
|
+
});
|
183
|
+
})
|
184
|
+
|
185
|
+
// 监听搜索操作
|
186
|
+
form.on('submit(search_follows)', function (data) {
|
187
|
+
search = data.field
|
188
|
+
table.reload('teacher_follows_table', {
|
189
|
+
page: {
|
190
|
+
curr: 1
|
191
|
+
},
|
192
|
+
where: {q: search, sort: sort}
|
193
|
+
}, 'data');
|
194
|
+
|
195
|
+
return false;
|
196
|
+
});
|
197
|
+
|
198
|
+
form.on('submit(reset_follows_search)', function (data) {
|
199
|
+
var field = data.field;
|
200
|
+
form.val('search_follows', {
|
201
|
+
area: "",
|
202
|
+
follows_date: "",
|
203
|
+
name: "",
|
204
|
+
department: "",
|
205
|
+
description: "",
|
206
|
+
staff_id: ""
|
207
|
+
})
|
208
|
+
return false;
|
209
|
+
});
|
210
|
+
|
211
|
+
table.on('toolbar(teacher_follows_table)', function(obj){
|
212
|
+
if (obj.event === 'report_day') {
|
213
|
+
content = miniPage.getHrefContent('/missions/teachers/daily_paper');
|
214
|
+
openWH = miniPage.getOpenWidthHeight();
|
215
|
+
index = layer.open({
|
216
|
+
title: '',
|
217
|
+
type: 1,
|
218
|
+
shade: 0.2,
|
219
|
+
shadeClose: true,
|
220
|
+
area: ['600px', '600px'],
|
221
|
+
content: content
|
222
|
+
});
|
223
|
+
$(window).on("resize", function () {
|
224
|
+
layer.full(index);
|
225
|
+
});
|
226
|
+
}
|
227
|
+
})
|
228
|
+
table.on('tool(teacher_follows_table)', function (obj) {
|
229
|
+
var data = obj.data;
|
230
|
+
id = data.teacher_id;
|
231
|
+
if (obj.event === 'detail') { // 监听添加操作
|
232
|
+
content = miniPage.getHrefContent('/missions/teachers/show_follow?id=' + data.teacher_id);
|
233
|
+
openWH = miniPage.getOpenWidthHeight();
|
234
|
+
index = layer.open({
|
235
|
+
title: '跟进记录',
|
236
|
+
type: 1,
|
237
|
+
shade: 0.2,
|
238
|
+
maxmin: true,
|
239
|
+
shadeClose: true,
|
240
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
241
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
242
|
+
content: content
|
243
|
+
});
|
244
|
+
$(window).on("resize", function () {
|
245
|
+
layer.full(index);
|
246
|
+
});
|
247
|
+
}
|
248
|
+
});
|
249
|
+
|
250
|
+
});
|
251
|
+
</script>
|
252
|
+
<style>
|
253
|
+
.layui-table-tool-temp{
|
254
|
+
padding-right: 30px; !important;
|
255
|
+
}
|
256
|
+
</style>
|