educode_sales 1.10.24 → 1.10.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,504 +1,85 @@
1
- <script type="text/html" id="toolbarDemo_follow">
2
- <div class="layui-btn-container">
3
- <span class="table-label">跟进记录</span>
4
- <% if can? :create, EducodeSales::TeacherFollow %>
5
- <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add"> 添加跟进记录</button>
6
- <% end %>
1
+ <%= Gon::Base.render_data %>
2
+ <div class="layui-form layuimini-form" id='myDiv'>
3
+ <div class="layui-form-item" style="padding: 25px">
4
+ <div class="layui-row">
5
+ <h2 style="padding-left: 25px">跟进</h2>
6
+ </div>
7
+ <div class="layui-row" style="padding-top: 15px">
8
+ <div class="layui-col-md6">
9
+ <labeL class="layui-form-label required">销售经理:</labeL>
10
+ <div class="layui-input-block">
11
+ <div id="new_sale_staff_id_show_follow"></div>
12
+ </div>
13
+ </div>
14
+ <div class="layui-col-md6">
15
+ <labeL class="layui-form-label">方案经理:</labeL>
16
+ <div class="layui-input-block">
17
+ <div id="new_idea_staff_id_show_follow"></div>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ <div class="layui-row" style="padding-top: 15px">
22
+ <div class="layui-col-md6">
23
+ <labeL class="layui-form-label">预算:</labeL>
24
+ <div class="layui-input-block">
25
+ <input type="number" name="money" autocomplete="off" placeholder="请输入硬件规模" value="<%= @idea_follow&.money %>" class="layui-input">
26
+ </div>
27
+ </div>
28
+ <div class="layui-col-md6">
29
+ <labeL class="layui-form-label">状态:</labeL>
30
+ <div class="layui-input-block">
31
+ <%= select_tag "status", options_for_select(EducodeSales::IdeaFollow.statuses.keys, @idea_follow&.status), { 'lay-filter': 'status', include_blank: false } %>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ <div class="layui-row" style="padding-top: 15px">
36
+ <labeL class="layui-form-label">团队建议:</labeL>
37
+ <div class="layui-input-block">
38
+ <textarea name="content" placeholder="团队建议" class="layui-textarea"><%= @idea_follow&.content.to_s %></textarea>
39
+ </div>
40
+ </div>
41
+ <div class="layui-row" style="padding-top: 15px">
42
+ <labeL class="layui-form-label">最新进展:</labeL>
43
+ <div class="layui-input-block">
44
+ <textarea name="content" placeholder="团队建议" class="layui-textarea"><%= @idea_follow&.content.to_s %></textarea>
45
+ </div>
46
+ </div>
47
+ <div class="layui-row" style="padding-top: 30px; float: left">
48
+ <div class="layui-input-block">
49
+ </div>
50
+ </div>
7
51
  </div>
8
- </script>
9
- <div class="z-index">
10
- <table class="layui-hide" id="sale_plan_follow_table" lay-filter="sale_plan_follow_table"></table>
11
52
  </div>
12
53
 
13
- <script type="text/html" id="currentTableBar_follow">
14
- <% if can? :read, EducodeSales::TeacherFollow %>
15
- <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="show">查看</a>
16
- <% end %>
17
- {{# if(d.is_latest){ }}
18
- <% if can? :update, EducodeSales::TeacherFollow %>
19
- <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
20
- <% end %>
21
- <% if can? :destroy, EducodeSales::TeacherFollow %>
22
- <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
23
- <% end %>
24
- {{# } }}
25
- </script>
26
-
27
-
28
- <script>
29
- layui.use(['form', 'table', 'miniPage', 'element'], function () {
30
- var $ = layui.jquery,
31
- form = layui.form,
32
- request =layui.request,
33
- miniPage = layui.miniPage;
34
-
35
- table = layui.table;
36
- table.render({
37
- elem: '#sale_plan_follow_table',
38
- url: '/missions/teachers/show_follow?id=' + parent.id ,
39
- toolbar: '#toolbarDemo_follow',
40
- defaultToolbar: ['filter'],
41
- cols: [
42
- [
43
- {
44
- field: 'id',
45
- width: 60,
46
- title:'序号',type: 'numbers',
47
- },
48
- {
49
- field: 'time',
50
- width: 120,
51
- title: '时间',
52
- sort: true
53
- },
54
- {
55
- field: 'teacher_attitude',
56
- width: 100,
57
- title: '教师态度',
58
- },
59
- {
60
- field: 'contact',
61
- width: 100,
62
- title: '跟进手段',
63
- // templet: '#showchance'
64
- },
65
- {
66
- field: 'course_plan',
67
- width: 100,
68
- title: '开课计划',
69
- // templet: '#add_keys'
70
- },
71
- {
72
- field: 'course_build',
73
- width: 100,
74
- title: '课堂建设',
75
- },
76
- {
77
- field: 'content',
78
- width: 200,
79
- title: '跟进小结',
80
- },
81
- {
82
- field: 'students_count',
83
- width: 120,
84
- title: '当前学生',
85
- },
86
- {
87
- field: 'courses_count',
88
- width: 100,
89
- title: '课堂',
90
- },
91
- {
92
- field: 'evaluates_count',
93
- width: 100,
94
- title: '评测次数',
95
- },
96
- {
97
- field: 'course_shixuns_count',
98
- width: 100,
99
- title: '使用项目',
100
- },
101
- {
102
- field: 'shixuns_count',
103
- width: 100,
104
- title: '创建项目',
105
- },
106
- {
107
- field: 'staff',
108
- width: 100,
109
- title: '跟进人',
110
- },
111
- {
112
- title: '操作',
113
- minWidth: 190,
114
- toolbar: '#currentTableBar_follow',
115
- align: "center",
116
- fixed: 'right'
117
- }
118
- ]
119
- ],
120
-
121
-
122
- page: true,
123
- skin: 'line'
124
- });
125
-
126
-
127
- /**
128
- * toolbar事件监听
129
- */
130
- table.on('toolbar(sale_plan_follow_table)', function (obj) {
131
- if (obj.event === 'add') { // 监听添加操作
132
- var content = miniPage.getHrefContent('/missions/teachers/new_follow_record?id=' +parent.id);
133
- var openWH = miniPage.getOpenWidthHeight();
134
- sale_plan_index = layer.open({
135
- title: '添加教师跟进记录',
136
- type: 1,
137
- shade: 0.2,
138
- maxmin: true,
139
- shadeClose: true,
140
- area: [openWH[0] + 'px', openWH[1] + 'px'],
141
- offset: [openWH[2] + 'px', openWH[3] + 'px'],
142
- content: content,
143
- success: function (layero, index) {
144
- // 重新渲染弹层中的下拉选择框select
145
- form.render('select');
146
- }
147
- });
148
- $(window).on("resize", function () {
149
- layer.full(index);
150
- });
151
- }
152
- });
153
-
154
- table.on('tool(sale_plan_follow_table)', function (obj) {
155
- var data = obj.data;
156
- var id = data.id
157
- if (obj.event === 'delete') {
158
- layer.confirm('确定删除ID为' + data.id + "的跟进记录", function (index) {
159
- request.authDelete("missions/teacher_follows/" + data.id, {}, function() {
160
- obj.del();
161
- layer.close(index);
162
- parent.table.reload('sale_plan_follow_table')
163
- parent.table.reload('teachers_table')
164
- parent.table.reload('weekPlanTable1')
165
- parent.table.reload('monthPlanTable')
166
- })
167
- });
168
- } else if (obj.event === 'show') { // 监听添加操作
169
- var content = miniPage.getHrefContent('/missions/teachers/show_follow_record?id=' + id);
170
- var openWH = miniPage.getOpenWidthHeight();
171
- sale_plan_index1 = layer.open({
172
- title: '查看教师跟进记录',
173
- type: 1,
174
- shade: 0.2,
175
- maxmin: true,
176
- shadeClose: true,
177
- area: [openWH[0] + 'px', openWH[1] + 'px'],
178
- offset: [openWH[2] + 'px', openWH[3] + 'px'],
179
- content: content,
180
- success: function (layero, index) {
181
- // 重新渲染弹层中的下拉选择框select
182
- form.render('select');
183
- }
184
- });
185
- $(window).on("resize", function () {
186
- layer.full(index);
187
- });
188
- } else if (obj.event === 'edit') {
189
- content = miniPage.getHrefContent('/missions/teachers/edit_follow_record?id='+ obj.data.id);
190
- openWH = miniPage.getOpenWidthHeight();
191
- edit_index1 = layer.open({
192
- title: '编辑教师跟进记录',
193
- type: 1,
194
- shade: 0.2,
195
- maxmin: true,
196
- shadeClose: true,
197
- area: [openWH[0] + 'px', openWH[1] + 'px'],
198
- offset: [openWH[2] + 'px', openWH[3] + 'px'],
199
- content: content,
200
- success: function (layero, index) {
201
- // 重新渲染弹层中的下拉选择框select
202
- form.render('select');
203
- }
204
- });
205
- $(window).on("resize", function () {
206
- layer.full(index);
207
- });
208
- } else if (obj.event === 'add_keys') { // 监听添加操作
209
- content = miniPage.getHrefContent('/missions/businesses/add_keys');
210
- openWH = miniPage.getOpenWidthHeight();
211
- index = layer.open({
212
- title: '关键人',
213
- type: 1,
214
- shade: 0.2,
215
- maxmin: true,
216
- shadeClose: true,
217
- area: [openWH[0] + 'px', openWH[1] + 'px'],
218
- offset: [openWH[2] + 'px', openWH[3] + 'px'],
219
- content: content,
220
- success: function (layero, index) {
221
- // 重新渲染弹层中的下拉选择框select
222
- form.render('select');
223
- }
224
- });
225
- $(window).on("resize", function () {
226
- layer.full(index);
227
- });
228
- } else if (obj.event === 'edit_plan') {
229
- content = miniPage.getHrefContent('/missions/businesses/edit_plan');
230
- openWH = miniPage.getOpenWidthHeight();
231
- index = layer.open({
232
- title: '回款计划',
233
- type: 1,
234
- shade: 0.2,
235
- maxmin: true,
236
- shadeClose: true,
237
- area: [openWH[0] + 'px', openWH[1] + 'px'],
238
- offset: [openWH[2] + 'px', openWH[3] + 'px'],
239
- content: content,
240
- success: function (layero, index) {
241
- // 重新渲染弹层中的下拉选择框select
242
- // form.render('select');
243
- }
244
- });
245
- $(window).on("resize", function () {
246
- layer.full(index);
247
- });
248
- }
249
- });
250
-
251
- });
252
- </script>
253
-
254
-
255
-
256
-
257
54
 
258
55
 
259
56
 
260
- <!--计划回款计划列表-->
261
- <script type="text/html" id="unfinish_toolbar">
262
- <div class="layui-btn-container">
263
- <span class="table-label">跟进计划列表</span>
264
- <!-- <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="addMonthPlan"> 添加月计划-->
265
- <!-- </button>-->
266
- <!-- <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="addWeekPlan"> 添加周计划-->
267
- <!-- </button>-->
268
- </div>
269
- </script>
270
-
271
- <table class="layui-hide" id="unfinish_table" lay-filter="unfinish_table"></table>
272
-
273
- <script type="text/html" id="currentTableBar1234">
274
- <% if can? :read, EducodeSales::OperationPlan %>
275
- <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="show">查看</a>
276
- <% end %>
277
- <% if can? :update, EducodeSales::OperationPlan %>
278
- <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
279
- <% end %>
280
- <% if can? :destroy, EducodeSales::OperationPlan %>
281
- <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
282
- <% end %>
283
- </script>
284
-
285
-
286
57
  <script>
287
- layui.use(['form', 'table', 'miniPage', 'element'], function () {
288
- var $ = layui.jquery,
289
- form = layui.form,
58
+ layui.use(['form', 'table', 'upload', 'layer', 'laytpl', 'request', 'laydate'], function () {
59
+ var form = layui.form,
60
+ layer = layui.layer,
290
61
  table = layui.table,
62
+ laytpl = layui.laytpl,
291
63
  request = layui.request,
292
- miniPage = layui.miniPage;
293
-
294
- table.render({
295
- elem: '#unfinish_table',
296
- url: '/missions/teachers/' + parent.id + "/unfinish_plans",
297
- toolbar: '#unfinish_toolbar',
298
- defaultToolbar: [],
299
- cols: [
300
- [
301
- {
302
- field: 'id',
303
- width: 100,
304
- title:'序号',type: 'numbers',
305
- },
306
- {
307
- field: 'staff',
308
- width: 100,
309
- title: '姓名'
310
- },
311
- {
312
- field: 'month',
313
- width: 100,
314
- title: '月份',
315
- },
316
- {
317
- field: 'weekly',
318
- width: 100,
319
- title: '周次'
320
- },
321
- {
322
- field: 'content',
323
- width: 300,
324
- title: '计划内容'
325
- },
326
- {
327
- field: 'finish_rate',
328
- width: 100,
329
- title: '完成率',
330
- },
331
- {
332
- field: 'updated_at',
333
- width: 190,
334
- title: '更新时间',
335
- },
336
- {
337
- title: '操作',
338
- minWidth: 190,
339
- toolbar: '#currentTableBar1234',
340
- align: "center"
341
- }
342
- ]
343
- ],
344
-
345
-
346
- page: true,
347
- skin: 'line'
348
- });
349
- // 监听搜索操作
350
- form.on('submit(data-search-btn)', function (data) {
351
- var result = JSON.stringify(data.field);
352
- layer.alert(result, {
353
- title: '最终的搜索信息'
354
- });
355
-
356
- //执行搜索重载
357
- table.reload('currentTableId', {
358
- page: {
359
- curr: 1
360
- },
361
- where: {
362
- searchParams: result
363
- }
364
- }, 'data');
365
-
366
- return false;
367
- });
368
-
369
- /**
370
- * toolbar事件监听
371
- */
372
- table.on('toolbar(unfinish_table)', function (obj) {
373
- if (obj.event === 'addWeekPlan') { // 监听添加操作
374
-
375
- var content = miniPage.getHrefContent('/missions/operation_plans/new_week');
376
- var openWH = miniPage.getOpenWidthHeight();
377
- var index = layer.open({
378
- title: '添加周计划',
379
- type: 1,
380
- shade: 0.2,
381
- maxmin: true,
382
- shadeClose: true,
383
- area: [openWH[0] + 'px', openWH[1] + 'px'],
384
- offset: [openWH[2] + 'px', openWH[3] + 'px'],
385
- content: content,
386
- success: function (layero, index) {
387
- // 重新渲染弹层中的下拉选择框select
388
- form.render('select');
389
- }
390
- });
391
- $(window).on("resize", function () {
392
- layer.full(index);
393
- });
394
- } else if (obj.event === 'addMonthPlan') { // 监听添加操作
395
- var content = miniPage.getHrefContent('/missions/operation_plans/new_month')
396
- var openWH = miniPage.getOpenWidthHeight();
397
- var index = layer.open({
398
- title: '添加月计划',
399
- type: 1,
400
- shade: 0.2,
401
- maxmin: true,
402
- shadeClose: true,
403
- area: [openWH[0] + 'px', openWH[1] + 'px'],
404
- offset: [openWH[2] + 'px', openWH[3] + 'px'],
405
- content: content,
406
- success: function (layero, index) {
407
- // 重新渲染弹层中的下拉选择框select
408
- form.render('select');
409
- }
410
- });
411
- $(window).on("resize", function () {
412
- layer.full(index);
413
- });
414
- } else if (obj.event === 'delete') { // 监听删除操作
415
- var checkStatus = table.checkStatus('currentTableId'),
416
- data = checkStatus.data;
417
- layer.alert(JSON.stringify(data));
418
- }
419
- });
420
-
421
- //监听表格复选框选择
422
- table.on('checkbox(unfinish_table)', function (obj) {
423
- console.log(obj)
424
- });
425
-
426
- table.on('tool(unfinish_table)', function (obj) {
427
- var data = obj.data;
428
- var id = data.id
429
- if (obj.event === 'delete') {
430
- layer.confirm('确定删除ID为' + data.id + "的计划", function (index) {
431
- request.authDelete("missions/operation_plans/" + data.id, {}, function() {
432
- obj.del();
433
- layer.close(index);
434
- })
435
-
436
- });
437
- } else if (obj.event === 'show') {
438
- content = miniPage.getHrefContent('/missions/operation_plans/show_week?id=' + data.id);
439
- openWH = miniPage.getOpenWidthHeight();
440
- index = layer.open({
441
- title: '查看计划',
442
- type: 1,
443
- shade: 0.2,
444
- maxmin: true,
445
- shadeClose: true,
446
- area: [openWH[0] + 'px', openWH[1] + 'px'],
447
- offset: [openWH[2] + 'px', openWH[3] + 'px'],
448
- content: content
449
- });
450
- $(window).on("resize", function () {
451
- layer.full(index);
452
- });
453
- return false;
454
- } else if (obj.event === 'edit') {
455
- content = miniPage.getHrefContent('/missions/operation_plans/edit_week?id=' + data.id);
456
- openWH = miniPage.getOpenWidthHeight();
457
- index10 = layer.open({
458
- title: '编辑',
459
- type: 1,
460
- shade: 0.2,
461
- maxmin: true,
462
- shadeClose: true,
463
- area: [openWH[0] + 'px', openWH[1] + 'px'],
464
- offset: [openWH[2] + 'px', openWH[3] + 'px'],
465
- content: content,
466
- success: function (layero, index) {
467
- // 重新渲染弹层中的下拉选择框select
468
- form.render('select');
469
- },
470
- });
471
- $(window).on("resize", function () {
472
- layer.full(sindex);
473
- });
474
- return false;
475
- } else if (obj.event === 'show_follow') {
476
- content = miniPage.getHrefContent('/missions/teachers/show_follow');
477
- openWH = miniPage.getOpenWidthHeight();
478
- index = layer.open({
479
- title: 'xxxx/跟进记录',
480
- type: 1,
481
- shade: 0.2,
482
- maxmin: true,
483
- shadeClose: true,
484
- area: [openWH[0] + 'px', openWH[1] + 'px'],
485
- offset: [openWH[2] + 'px', openWH[3] + 'px'],
486
- content: content,
487
- success: function (layero, index) {
488
- // 重新渲染弹层中的下拉选择框select
489
- // form.render('select');
490
- }
491
- });
492
- $(window).on("resize", function () {
493
- layer.full(index);
494
- });
495
- }
496
- });
497
-
64
+ laydate = layui.laydate,
65
+ $ = layui.$;
66
+ form.render();
67
+ var staff_list = xmSelect.render({
68
+ el: '#new_idea_staff_id_show_follow',
69
+ data: gon.idea_staffs,
70
+ filterable: true,
71
+ radio: true,
72
+ })
73
+ var sale_staff_list = xmSelect.render({
74
+ el: '#new_sale_staff_id_show_follow',
75
+ data: gon.sale_staffs,
76
+ filterable: true,
77
+ radio: true,
78
+ })
498
79
  });
499
80
  </script>
500
81
  <style>
501
- .z-index .layui-table-tool{
502
- z-index: 10000; !important;
82
+ #myDiv {
83
+ pointer-events: none;
503
84
  }
504
- </style>
85
+ </style>
data/config/routes.rb CHANGED
@@ -379,6 +379,9 @@ EducodeSales::Engine.routes.draw do
379
379
  get :history
380
380
  get :show_teachers
381
381
  get :new_follow_up
382
+ get :show_follow
383
+ get :follow_list
384
+ get :edit_follow_record
382
385
  get :follow_ups
383
386
  post :add_advise
384
387
  get :upload_file
@@ -459,5 +462,6 @@ EducodeSales::Engine.routes.draw do
459
462
  end
460
463
 
461
464
  resources :teacher_follows
465
+ resources :idea_follows
462
466
 
463
467
  end
@@ -1,3 +1,3 @@
1
1
  module EducodeSales
2
- VERSION = '1.10.24'
2
+ VERSION = '1.10.25'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: educode_sales
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.24
4
+ version: 1.10.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - anke1460
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-30 00:00:00.000000000 Z
11
+ date: 2023-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -105,6 +105,7 @@ files:
105
105
  - app/assets/images/educode_sales/icon-login.png
106
106
  - app/assets/images/educode_sales/icon.png
107
107
  - app/assets/images/educode_sales/indexLogo.png
108
+ - app/assets/images/educode_sales/indexlogo.png
108
109
  - app/assets/images/educode_sales/loading-0.gif
109
110
  - app/assets/images/educode_sales/loading-1.gif
110
111
  - app/assets/images/educode_sales/loading-2.gif
@@ -153,6 +154,7 @@ files:
153
154
  - app/controllers/educode_sales/customers_controller.rb
154
155
  - app/controllers/educode_sales/follow_ups_controller.rb
155
156
  - app/controllers/educode_sales/home_controller.rb
157
+ - app/controllers/educode_sales/idea_follows_controller.rb
156
158
  - app/controllers/educode_sales/idea_recycles_controller.rb
157
159
  - app/controllers/educode_sales/ideas_controller.rb
158
160
  - app/controllers/educode_sales/import_teachers_controller.rb
@@ -427,6 +429,8 @@ files:
427
429
  - app/views/educode_sales/ideas/edit_follow_record.html.erb
428
430
  - app/views/educode_sales/ideas/files.html.erb
429
431
  - app/views/educode_sales/ideas/files.json.jbuilder
432
+ - app/views/educode_sales/ideas/follow_list.html.erb
433
+ - app/views/educode_sales/ideas/follow_list.json.jbuilder
430
434
  - app/views/educode_sales/ideas/follow_ups.json.jbuilder
431
435
  - app/views/educode_sales/ideas/history.html.erb
432
436
  - app/views/educode_sales/ideas/import.html.erb
@@ -749,7 +753,7 @@ homepage: https://www.educoder.net
749
753
  licenses:
750
754
  - MIT
751
755
  metadata: {}
752
- post_install_message:
756
+ post_install_message:
753
757
  rdoc_options: []
754
758
  require_paths:
755
759
  - lib
@@ -764,8 +768,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
764
768
  - !ruby/object:Gem::Version
765
769
  version: '0'
766
770
  requirements: []
767
- rubygems_version: 3.0.0
768
- signing_key:
771
+ rubygems_version: 3.0.9
772
+ signing_key:
769
773
  specification_version: 4
770
774
  summary: Summary of EducodeSales.
771
775
  test_files: []