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.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/educode_sales/indexlogo.png +0 -0
  3. data/app/controllers/educode_sales/idea_recycles_controller.rb +100 -0
  4. data/app/controllers/educode_sales/ideas_controller.rb +130 -0
  5. data/app/controllers/educode_sales/logs_controller.rb +21 -0
  6. data/app/controllers/educode_sales/teacher_follows_controller.rb +82 -2
  7. data/app/controllers/educode_sales/teachers_controller.rb +18 -3
  8. data/app/models/educode_sales/common.rb +2 -0
  9. data/app/models/educode_sales/idea.rb +87 -0
  10. data/app/models/educode_sales/idea_history.rb +8 -0
  11. data/app/views/educode_sales/idea_recycles/activities.json.jbuilder +9 -0
  12. data/app/views/educode_sales/idea_recycles/add_courses.html.erb +133 -0
  13. data/app/views/educode_sales/idea_recycles/add_event.html.erb +49 -0
  14. data/app/views/educode_sales/idea_recycles/add_keys.html.erb +334 -0
  15. data/app/views/educode_sales/idea_recycles/course_list.json.jbuilder +23 -0
  16. data/app/views/educode_sales/idea_recycles/course_subject.json.jbuilder +10 -0
  17. data/app/views/educode_sales/idea_recycles/daily_paper.html.erb +68 -0
  18. data/app/views/educode_sales/idea_recycles/detail.html.erb +144 -0
  19. data/app/views/educode_sales/idea_recycles/edit.html.erb +193 -0
  20. data/app/views/educode_sales/idea_recycles/edit_follow_record.html.erb +87 -0
  21. data/app/views/educode_sales/idea_recycles/history.html.erb +41 -0
  22. data/app/views/educode_sales/idea_recycles/import.html.erb +41 -0
  23. data/app/views/educode_sales/idea_recycles/index.html.erb +321 -0
  24. data/app/views/educode_sales/idea_recycles/index.json.jbuilder +16 -0
  25. data/app/views/educode_sales/idea_recycles/new.html.erb +204 -0
  26. data/app/views/educode_sales/idea_recycles/new_follow_record.html.erb +93 -0
  27. data/app/views/educode_sales/idea_recycles/search_new.html.erb +138 -0
  28. data/app/views/educode_sales/idea_recycles/show_class.html.erb +107 -0
  29. data/app/views/educode_sales/idea_recycles/show_follow.html.erb +504 -0
  30. data/app/views/educode_sales/idea_recycles/show_follow.json.jbuilder +23 -0
  31. data/app/views/educode_sales/idea_recycles/show_follow_record.html.erb +36 -0
  32. data/app/views/educode_sales/idea_recycles/unfinish_plans.json.jbuilder +14 -0
  33. data/app/views/educode_sales/ideas/activities.json.jbuilder +9 -0
  34. data/app/views/educode_sales/ideas/add_courses.html.erb +133 -0
  35. data/app/views/educode_sales/ideas/add_event.html.erb +49 -0
  36. data/app/views/educode_sales/ideas/add_keys.html.erb +334 -0
  37. data/app/views/educode_sales/ideas/course_list.json.jbuilder +23 -0
  38. data/app/views/educode_sales/ideas/course_subject.json.jbuilder +10 -0
  39. data/app/views/educode_sales/ideas/daily_paper.html.erb +68 -0
  40. data/app/views/educode_sales/ideas/detail.html.erb +144 -0
  41. data/app/views/educode_sales/ideas/edit.html.erb +182 -0
  42. data/app/views/educode_sales/ideas/edit_follow_record.html.erb +87 -0
  43. data/app/views/educode_sales/ideas/history.html.erb +41 -0
  44. data/app/views/educode_sales/ideas/import.html.erb +41 -0
  45. data/app/views/educode_sales/ideas/index.html.erb +335 -0
  46. data/app/views/educode_sales/ideas/index.json.jbuilder +16 -0
  47. data/app/views/educode_sales/ideas/new.html.erb +182 -0
  48. data/app/views/educode_sales/ideas/new_follow_record.html.erb +93 -0
  49. data/app/views/educode_sales/ideas/search_new.html.erb +138 -0
  50. data/app/views/educode_sales/ideas/show_class.html.erb +107 -0
  51. data/app/views/educode_sales/ideas/show_follow.html.erb +504 -0
  52. data/app/views/educode_sales/ideas/show_follow.json.jbuilder +23 -0
  53. data/app/views/educode_sales/ideas/show_follow_record.html.erb +36 -0
  54. data/app/views/educode_sales/ideas/unfinish_plans.json.jbuilder +14 -0
  55. data/app/views/educode_sales/logs/index.html.erb +48 -0
  56. data/app/views/educode_sales/logs/index.json.jbuilder +16 -0
  57. data/app/views/educode_sales/staffs/edit.html.erb +0 -1
  58. data/app/views/educode_sales/teacher_follows/index.json.jbuilder +20 -0
  59. data/app/views/educode_sales/teachers/_follows.html.erb +256 -0
  60. data/app/views/educode_sales/teachers/_index.html.erb +677 -0
  61. data/app/views/educode_sales/teachers/daily_paper.html.erb +22 -22
  62. data/app/views/educode_sales/teachers/index.html.erb +11 -651
  63. data/app/views/educode_sales/teachers/index.json.jbuilder +10 -0
  64. data/app/views/educode_sales/teachers/new.html.erb +9 -3
  65. data/app/views/educode_sales/teachers/new_follow_record.html.erb +6 -0
  66. data/app/views/layouts/educode_sales/application.html.erb +36 -7
  67. data/config/routes.rb +19 -0
  68. data/db/migrate/20230227061043_create_educode_sales_ideas.rb +28 -0
  69. data/db/migrate/20230227070206_change_to_educode_sales_ideas.rb +5 -0
  70. data/db/migrate/20230227125936_add_follow_at_to_teachers.rb +6 -0
  71. data/db/migrate/20230228063555_create_educode_sales_idea_histories.rb +10 -0
  72. data/db/migrate/20230302074324_change_manager_for_ideas.rb +6 -0
  73. data/lib/educode_sales/version.rb +1 -1
  74. metadata +66 -6
@@ -0,0 +1,677 @@
1
+ <div style="margin: 10px 10px 10px 10px">
2
+ <form class="layui-form layui-form-pane" lay-filter="search_teachers">
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="school" 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 "professional_title", options_for_select(['教授', '研究员', '副教授', '副研究员', '讲师', '助理研究员', '助理教授'], @person&.professional_title), { include_blank: true } %>
20
+ </div>
21
+ </div>
22
+ <div class="layui-inline show_item" style="display:none;">
23
+ <label class="layui-form-label">导流来源</label>
24
+ <div class="layui-input-inline">
25
+ <%= select_tag "teacher_source", options_for_select(EducodeSales::Common.where(clazz: 'teacher_source').pluck(:name, :id)), { include_blank: true } %>
26
+ </div>
27
+ </div>
28
+ <div class="layui-inline show_item" style="display:none;">
29
+ <label class="layui-form-label">态度</label>
30
+ <div class="layui-input-inline">
31
+
32
+ <%= select_tag "attitude", options_for_select(EducodeSales::Common.where(clazz: 'teacher_attitude').pluck(:name, :id)), { include_blank: true } %>
33
+ </div>
34
+ </div>
35
+ <div class="layui-inline show_item" style="display:none;">
36
+ <label class="layui-form-label">注册时间</label>
37
+ <div class="layui-input-inline">
38
+ <input type="text" class="layui-input" id="time" placeholder="请选择时间" autocomplete="off" name="regist_at">
39
+ </div>
40
+ </div>
41
+ <div class="layui-inline show_item" style="display:none;">
42
+ <label class="layui-form-label">注册状态</label>
43
+ <div class="layui-input-inline">
44
+ <%= select_tag "status", options_for_select([["已注册","1"],["未注册","0"]]), { include_blank: true } %>
45
+ </div>
46
+ </div>
47
+ <div class="layui-inline show_item" style="display:none;">
48
+ <label class="layui-form-label">区域</label>
49
+ <div class="layui-input-inline">
50
+ <%= select_tag "area", options_for_select(EducodeSales::Common.where(clazz: 'area').pluck(:name, :id)), { include_blank: true } %>
51
+ </div>
52
+ </div>
53
+ <div class="layui-inline show_item" style="display:none;">
54
+ <label class="layui-form-label">起止时间</label>
55
+ <div class="layui-input-inline">
56
+ <input type="text" class="layui-input" id="date" name="date" autocomplete="off" placeholder=" - ">
57
+ </div>
58
+ </div>
59
+ <div class="layui-inline show_item" style="display:none;">
60
+ <label class="layui-form-label">教研助理</label>
61
+ <div class="layui-input-inline">
62
+ <%= select_tag "assist", options_for_select(@staffs, params[:assist]), { 'lay-filter': 'assist', include_blank: true } %>
63
+ </div>
64
+ </div>
65
+
66
+ <div class="layui-inline">
67
+ <button type="reset" class="layui-btn layui-btn-primary" lay-submit lay-filter="reset_business_search">重置
68
+ </button>
69
+ <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="search_teachers">搜 索
70
+ </button>
71
+ <a style="padding-left: 20px;color: #0000FF" href="javascript:;" type="submit" class="" lay-submit lay-filter="show_hide">高级搜索
72
+ </a>
73
+ </div>
74
+ </div>
75
+ </form>
76
+ </div>
77
+
78
+ <script type="text/html" id="toolbarDemo">
79
+ <div class="layui-btn-container">
80
+ <span class="table-label">教师列表</span>
81
+ <% if can? :create, EducodeSales::Teacher %>
82
+ <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="import">导入数据</button>
83
+ <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add">添加老师</button>
84
+ <% end %>
85
+ </button>
86
+ </div>
87
+ </script>
88
+ <div class="">
89
+ <table class="layui-hide" id="teachers_table" style="min-height: 300px;" lay-filter="teachers_table"></table>
90
+ </div>
91
+ <script type="text/html" id="currentTableBar">
92
+ <% if can? :create, EducodeSales::TeacherFollow %>
93
+ <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="add_event">添加跟进记录</a>
94
+ <% end %>
95
+ <% if @more %>
96
+ <a class="layui-btn-xs data-count-edit more-btn" data-name={{d.name}} data-id={{d.id}}>更多<i class="layui-icon layui-icon-down layui-nav-more"></i></a>
97
+ <% end %>
98
+ </script>
99
+ <script type="text/html" id="name">
100
+ {{# if (d.login) { }}
101
+ <a href="<%= base_url%>/users/{{d.login}}" class="layui-table-link" target="_blank">{{ d.name }}</a>
102
+ {{# } else {}}
103
+ <a href="javascript:;" class="">{{ d.name }}</a>
104
+ {{# }}}
105
+ </script>
106
+ <script type="text/html" id="courses">
107
+ <a href="javascript:void(0);" lay-event="courses" class="layui-table-link">{{ d.course_subjects_count }}</a>
108
+ </script>
109
+ <script type="text/html" id="event">
110
+ <a href="javascript:void(0);" lay-event="event" class="layui-table-link">{{ d.activities_count }}</a>
111
+ </script>
112
+ <script type="text/html" id="class">
113
+ <a href="javascript:void(0);" lay-event="class" class="layui-table-link">{{ d.courses_count }}</a>
114
+ </script>
115
+ <script type="text/html" id="follow">
116
+ <a href="javascript:void(0);" lay-event="follow" class="layui-table-link">{{ d.teacher_follows_count }}</a>
117
+ </script>
118
+
119
+ <script>
120
+ layui.use(['form', 'table', 'miniPage', 'element', 'request', 'laydate'], function () {
121
+ var $ = layui.jquery,
122
+ form = layui.form,
123
+ request = layui.request,
124
+ dropdown = layui.dropdown,
125
+ miniPage = layui.miniPage,
126
+ laydate = layui.laydate;
127
+
128
+ var laydate = layui.laydate;
129
+
130
+ laydate.render({
131
+ elem: '#date',
132
+ range: true
133
+ });
134
+ laydate.render({
135
+ elem: '#time',
136
+ });
137
+
138
+ table = layui.table;
139
+ table.render({
140
+ elem: '#teachers_table',
141
+ url: '/missions/teachers',
142
+ where: {q: form.val('search_form')},
143
+ toolbar: '#toolbarDemo',
144
+ totalRow:true,
145
+ defaultToolbar: ['filter'],
146
+ cols: [
147
+ [
148
+ {
149
+ field: 'id',
150
+ width: 60,
151
+ title:'序号',type: 'numbers',
152
+ totalRowText:'合计',
153
+ fixed: 'left'
154
+
155
+ },
156
+ {
157
+ field: 'name',
158
+ width: 100,
159
+ title: '姓名',
160
+ fixed: 'left',
161
+ templet: "#name"
162
+ },
163
+ {
164
+ field: 'school',
165
+ width: 160,
166
+ title: '单位',
167
+ templet:'<div><span title="{{d.school}}">{{d.school}}</span></div>'
168
+
169
+ },
170
+ {
171
+ field: 'area',
172
+ width: 80,
173
+ title: '区域',
174
+ },
175
+ {
176
+ field: 'department',
177
+ width: 130,
178
+ title: '部门',
179
+ templet:'<div><span title="{{d.department}}">{{d.department}}</span></div>'
180
+
181
+ },
182
+ {
183
+ field: 'professional_title',
184
+ title: '职称',
185
+ width: 80,
186
+ templet: '#show_follow'
187
+ },
188
+ {
189
+ field: 'job',
190
+ width: 80,
191
+ title: '职务',
192
+ templet: '#show_keys'
193
+
194
+ },
195
+ {
196
+ field: 'source',
197
+ width: 90,
198
+ title: '来源',
199
+ },
200
+ {
201
+ field: 'attitude',
202
+ width: 60,
203
+ title: '态度',
204
+ },
205
+ {
206
+ field: 'course_subjects_count',
207
+ width: 90,
208
+ title: '课程方向',
209
+ templet: "#courses"
210
+ },
211
+ {
212
+ field: 'teacher_follows_count',
213
+ width: 90,
214
+ title: '跟进情况',
215
+ totalRow:true,
216
+ templet: "#follow"
217
+ },
218
+ {
219
+ field: 'staff_manage',
220
+ width: 160,
221
+ title: '生态经理',
222
+ },
223
+ {
224
+ field: 'follow_person',
225
+ width: 120,
226
+ title: '跟进人',
227
+ },
228
+ {
229
+ field: 'followup_at',
230
+ width: 120,
231
+ title: '最新跟进时间',
232
+ },
233
+ {
234
+ field: 'latest_time',
235
+ width: 120,
236
+ title: '无跟进天数',
237
+ sort: true,
238
+ },
239
+ {
240
+ field: 'teacher_used',
241
+ width: 120,
242
+ title: '学院渗透率',
243
+ },
244
+ {
245
+ field: 'students',
246
+ width: 60,
247
+ totalRow:'{{ parseInt(d.TOTAL_NUMS) }}',
248
+ title: '学生',
249
+ },
250
+ {
251
+ field: 'courses_count',
252
+ width: 60,
253
+ title: '课堂',
254
+ totalRow:true,
255
+ templet: "#class"
256
+ },
257
+ {
258
+ field: 'activities_count',
259
+ width: 100,
260
+ title: '参与活动',
261
+ templet: "#event"
262
+ },
263
+ {
264
+ field: 'created_on',
265
+ width: 120,
266
+ title: '注册时间',
267
+ sort: true,
268
+ },
269
+ {
270
+ field: 'last_login_on',
271
+ width: 120,
272
+ title: '最近登录',
273
+ sort: true,
274
+ },
275
+ {
276
+ field: 'created_at',
277
+ width: 120,
278
+ title: '添加时间',
279
+ sort: true,
280
+ },
281
+ {
282
+ field: 'experience',
283
+ width: 120,
284
+ title: '经验值',
285
+ sort: true,
286
+ },
287
+ {
288
+ field: 'grade',
289
+ width: 120,
290
+ title: '金币',
291
+ sort: true,
292
+ },
293
+ {
294
+ field: 'mobile',
295
+ width: 120,
296
+ title: '手机号',
297
+ },
298
+ {
299
+ field: 'wechat',
300
+ width: 120,
301
+ title: '微信号',
302
+ },
303
+ {
304
+ field: 'teacher_assist',
305
+ width: 120,
306
+ title: '教研助理',
307
+ },
308
+ {
309
+ title: '操作',
310
+ minWidth: 170,
311
+ toolbar: '#currentTableBar',
312
+ align: "center",
313
+ fixed: 'right'
314
+ }
315
+ ]
316
+ ],
317
+
318
+ limit: 20,
319
+ limits: [10,15,20,30,40,50,60,70,80,90],
320
+ page: true,
321
+ done: function (res) {
322
+ drowpdwonRender()
323
+ }
324
+ });
325
+ var dropmenu = gon.menus;
326
+
327
+ drowpdwonRender = function() {
328
+ dropdown.render({
329
+ elem: '.more-btn',
330
+ data: dropmenu,
331
+ click: function(data, othis){
332
+ var elem = $(this.elem);
333
+ id = elem.data('id');
334
+ switch (data.event) {
335
+ case 'week':
336
+ week(id);
337
+ break;
338
+ case 'month':
339
+ month(id);
340
+ break;
341
+ case 'edit':
342
+ edit(id);
343
+ break;
344
+ case 'delete':
345
+ deleteBusiness(id, elem.data('name'));
346
+ break;
347
+ }
348
+ }
349
+ });
350
+ }
351
+
352
+ function week(id) {
353
+ var content = miniPage.getHrefContent('/missions/operation_plans/new_week?teacher_id=' + id);
354
+ var openWH = miniPage.getOpenWidthHeight();
355
+
356
+ teacherindex1 = layer.open({
357
+ title: '添加周计划',
358
+ type: 1,
359
+ shade: 0.2,
360
+ maxmin: true,
361
+ shadeClose: true,
362
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
363
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
364
+ content: content
365
+ });
366
+ $(window).on("resize", function () {
367
+ layer.full(sindex);
368
+ });
369
+ }
370
+
371
+ function edit(id) {
372
+ var content = miniPage.getHrefContent('/missions/teachers/' + id + '/edit');
373
+ var openWH = miniPage.getOpenWidthHeight();
374
+ sindex = layer.open({
375
+ title: '编辑',
376
+ type: 1,
377
+ shade: 0.2,
378
+ maxmin: true,
379
+ shadeClose: true,
380
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
381
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
382
+ content: content
383
+ });
384
+ $(window).on("resize", function () {
385
+ layer.full(sindex);
386
+ });
387
+ }
388
+
389
+ function month(id) {
390
+ var content = miniPage.getHrefContent('/missions/operation_plans/new_month?teacher_id=' + id);
391
+ var openWH = miniPage.getOpenWidthHeight();
392
+ teacherindex2 = layer.open({
393
+ title: '添加月计划',
394
+ type: 1,
395
+ shade: 0.2,
396
+ maxmin: true,
397
+ shadeClose: true,
398
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
399
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
400
+ content: content
401
+ });
402
+ $(window).on("resize", function () {
403
+ layer.full(sindex);
404
+ });
405
+ }
406
+
407
+ function deleteBusiness(id, name) {
408
+ layer.confirm('确定删除' + name, function (index) {
409
+ request.delete('missions/teachers/' + id, {}, function (res) {
410
+ layer.close(index);
411
+ table.reload("teachers_table")
412
+ })
413
+ });
414
+ }
415
+
416
+ var sort = {}, search = {};
417
+ table.on('sort(teachers_table)', function (obj) {
418
+ sort.field = obj.field;
419
+ sort.order = obj.type;
420
+ table.reload('teachers_table', {
421
+ initSort: obj,
422
+ where: {
423
+ sort: sort,
424
+ q: search
425
+ }
426
+ });
427
+ })
428
+
429
+ // 监听搜索操作
430
+ form.on('submit(search_teachers)', function (data) {
431
+ search = data.field
432
+ table.reload('teachers_table', {
433
+ page: {
434
+ curr: 1
435
+ },
436
+ where: {q: search, sort: sort}
437
+ }, 'data');
438
+ return false;
439
+ });
440
+
441
+ form.on('submit(reset_business_search)', function (data) {
442
+ var field = data.field;
443
+ form.val('search_teachers', {
444
+ area: "",
445
+ date: "",
446
+ attitude: "",
447
+ name: "",
448
+ professional_title: "",
449
+ regist_at: "",
450
+ status: "",
451
+ school: "",
452
+ assist: "",
453
+ teacher_source: ""
454
+ })
455
+ return false;
456
+ });
457
+ form.on('submit(show_hide)', function (data) {
458
+ $(".show_item").toggle()
459
+ return false;
460
+ });
461
+ /**
462
+ * toolbar事件监听
463
+ */
464
+ table.on('toolbar(teachers_table)', function (obj) {
465
+ if (obj.event === 'add') { // 手动添加
466
+ var content = miniPage.getHrefContent('/missions/teachers/new');
467
+ var openWH = miniPage.getOpenWidthHeight();
468
+ index = layer.open({
469
+ title: '添加老师',
470
+ type: 1,
471
+ shade: 0.2,
472
+ maxmin: true,
473
+ shadeClose: true,
474
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
475
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
476
+ content: content,
477
+ });
478
+ $(window).on("resize", function () {
479
+ layer.full(index);
480
+ });
481
+ }else if (obj.event === 'import') { //
482
+ var content = miniPage.getHrefContent('/missions/teachers/import');
483
+ var openWH = miniPage.getOpenWidthHeight();
484
+ import_index = layer.open({
485
+ title: '导入数据',
486
+ type: 1,
487
+ shade: 0.2,
488
+ shadeClose: true,
489
+ area: ['200px', '100px'],
490
+ offset: 'auto',
491
+ closeBtn: 0,
492
+ content: content,
493
+ });
494
+ $(window).on("resize", function () {
495
+ layer.full(index);
496
+ });
497
+ } else if (obj.event === 'search_new') { // 搜索添加
498
+ content = miniPage.getHrefContent('/missions/teachers/search_new');
499
+ openWH = miniPage.getOpenWidthHeight();
500
+ index = layer.open({
501
+ title: '搜索添加',
502
+ type: 1,
503
+ shade: 0.2,
504
+ maxmin: true,
505
+ shadeClose: true,
506
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
507
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
508
+ content: content,
509
+ });
510
+ $(window).on("resize", function () {
511
+ layer.full(index);
512
+ });
513
+ }
514
+ });
515
+
516
+ //监听表格复选框选择
517
+ table.on('checkbox(teachers_table)', function (obj) {
518
+ console.log(obj)
519
+ });
520
+
521
+ table.on('tool(teachers_table)', function (obj) {
522
+ var data = obj.data;
523
+ id = data.id
524
+ if (obj.event === 'add_event') { // 监听添加操作
525
+ teacher_id = data.id
526
+ var content = miniPage.getHrefContent('/missions/teachers/new_follow_record?id=' + data.id);
527
+ var openWH = miniPage.getOpenWidthHeight();
528
+ sale_plan_index = layer.open({
529
+ title: '添加教师跟进记录',
530
+ type: 1,
531
+ shade: 0.2,
532
+ maxmin: true,
533
+ shadeClose: true,
534
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
535
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
536
+ content: content,
537
+ success: function (layero, index) {
538
+ form.render('select');
539
+ }
540
+ });
541
+ $(window).on("resize", function () {
542
+ layer.full(sale_plan_index);
543
+ });
544
+ } else if (obj.event === 'delete') {
545
+ layer.confirm('确定删除' + data.name, function (index) {
546
+ request.delete('missions/teachers/' + data.id, {}, function (res) {
547
+ layer.close(index);
548
+ table.reload("teachers_table")
549
+ })
550
+ });
551
+ } else if (obj.event === 'addWeek') {
552
+ var content = miniPage.getHrefContent('/missions/operation_plans/new_week?teacher_id=' + obj.data.id);
553
+ var openWH = miniPage.getOpenWidthHeight();
554
+
555
+ teacherindex1 = layer.open({
556
+ title: '添加周计划',
557
+ type: 1,
558
+ shade: 0.2,
559
+ maxmin: true,
560
+ shadeClose: true,
561
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
562
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
563
+ content: content
564
+ });
565
+ $(window).on("resize", function () {
566
+ layer.full(sindex);
567
+ });
568
+ } else if (obj.event === 'addMonth') {
569
+ var content = miniPage.getHrefContent('/missions/operation_plans/new_month?teacher_id=' + obj.data.id);
570
+ var openWH = miniPage.getOpenWidthHeight();
571
+ teacherindex2 = layer.open({
572
+ title: '添加月计划',
573
+ type: 1,
574
+ shade: 0.2,
575
+ maxmin: true,
576
+ shadeClose: true,
577
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
578
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
579
+ content: content
580
+ });
581
+ $(window).on("resize", function () {
582
+ layer.full(sindex);
583
+ });
584
+
585
+ } else if (obj.event === 'courses') {
586
+ teacher_id = data.id
587
+ content = miniPage.getHrefContent('/missions/teachers/add_courses?id='+data.id);
588
+ openWH = miniPage.getOpenWidthHeight();
589
+ index = layer.open({
590
+ title: '课程方向',
591
+ type: 1,
592
+ shade: 0.2,
593
+ maxmin: true,
594
+ shadeClose: true,
595
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
596
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
597
+ content: content,
598
+ success: function (layero, index) {
599
+ // 重新渲染弹层中的下拉选择框select
600
+ // form.render('select');
601
+ }
602
+ });
603
+ $(window).on("resize", function () {
604
+ layer.full(index);
605
+ });
606
+ } else if (obj.event === 'event') {
607
+ content = miniPage.getHrefContent('/missions/teachers/add_event');
608
+ openWH = miniPage.getOpenWidthHeight();
609
+ teacher_id = obj.data.id;
610
+ index = layer.open({
611
+ title: '参与活动',
612
+ type: 1,
613
+ shade: 0.2,
614
+ maxmin: true,
615
+ shadeClose: true,
616
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
617
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
618
+ content: content,
619
+ success: function (layero, index) {
620
+ // 重新渲染弹层中的下拉选择框select
621
+ // form.render('select');
622
+ }
623
+ });
624
+ $(window).on("resize", function () {
625
+ layer.full(index);
626
+ });
627
+ } else if (obj.event === 'class') {
628
+ content = miniPage.getHrefContent('/missions/teachers/show_class');
629
+ openWH = miniPage.getOpenWidthHeight();
630
+ user_id = obj.data.user_id;
631
+ index = layer.open({
632
+ title: '课堂列表',
633
+ type: 1,
634
+ shade: 0.2,
635
+ maxmin: true,
636
+ shadeClose: true,
637
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
638
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
639
+ content: content,
640
+ success: function (layero, index) {
641
+ // 重新渲染弹层中的下拉选择框select
642
+ // form.render('select');
643
+ }
644
+ });
645
+ $(window).on("resize", function () {
646
+ layer.full(index);
647
+ });
648
+ } else if (obj.event === 'follow') {
649
+ content = miniPage.getHrefContent('/missions/teachers/show_follow?id=' + data.id);
650
+ openWH = miniPage.getOpenWidthHeight();
651
+ index = layer.open({
652
+ title: '跟进记录',
653
+ type: 1,
654
+ shade: 0.2,
655
+ maxmin: true,
656
+ shadeClose: true,
657
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
658
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
659
+ content: content,
660
+ success: function (layero, index) {
661
+ // 重新渲染弹层中的下拉选择框select
662
+ // form.render('select');
663
+ }
664
+ });
665
+ $(window).on("resize", function () {
666
+ layer.full(index);
667
+ });
668
+ }
669
+ });
670
+
671
+ });
672
+ </script>
673
+ <style>
674
+ .layui-table-tool-temp{
675
+ padding-right: 30px; !important;
676
+ }
677
+ </style>