educode_sales 0.1.0 → 0.1.4

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 (107) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/educode_sales/app.css +2 -1
  3. data/app/controllers/educode_sales/activities_controller.rb +7 -1
  4. data/app/controllers/educode_sales/application_controller.rb +0 -1
  5. data/app/controllers/educode_sales/businesses_controller.rb +16 -9
  6. data/app/controllers/educode_sales/follow_ups_controller.rb +12 -8
  7. data/app/controllers/educode_sales/operation_plans_controller.rb +155 -0
  8. data/app/controllers/educode_sales/operation_reports_controller.rb +125 -0
  9. data/app/controllers/educode_sales/places_controller.rb +3 -4
  10. data/app/controllers/educode_sales/plans_controller.rb +12 -10
  11. data/app/controllers/educode_sales/roles_controller.rb +11 -0
  12. data/app/controllers/educode_sales/sale_reports_controller.rb +5 -4
  13. data/app/controllers/educode_sales/sales_controller.rb +4 -1
  14. data/app/controllers/educode_sales/sessions_controller.rb +2 -1
  15. data/app/controllers/educode_sales/teacher_follows_controller.rb +146 -0
  16. data/app/controllers/educode_sales/teachers_controller.rb +113 -11
  17. data/app/models/ability.rb +0 -1
  18. data/app/models/educode_sales/activity.rb +2 -1
  19. data/app/models/educode_sales/business.rb +0 -1
  20. data/app/models/educode_sales/common.rb +1 -0
  21. data/app/models/educode_sales/course_subject.rb +1 -1
  22. data/app/models/educode_sales/money_plan.rb +3 -3
  23. data/app/models/educode_sales/operation_plan.rb +2 -0
  24. data/app/models/educode_sales/place.rb +1 -0
  25. data/app/models/educode_sales/sale_plan.rb +2 -0
  26. data/app/models/educode_sales/staff.rb +5 -3
  27. data/app/models/educode_sales/teacher.rb +20 -1
  28. data/app/views/educode_sales/activities/edit.html.erb +4 -4
  29. data/app/views/educode_sales/activities/index.html.erb +23 -8
  30. data/app/views/educode_sales/activities/index.json.jbuilder +1 -1
  31. data/app/views/educode_sales/activities/new.html.erb +4 -3
  32. data/app/views/educode_sales/businesses/edit_follow_record.html.erb +2 -2
  33. data/app/views/educode_sales/businesses/edit_plan.html.erb +12 -7
  34. data/app/views/educode_sales/businesses/index.html.erb +137 -141
  35. data/app/views/educode_sales/businesses/index.json.jbuilder +2 -1
  36. data/app/views/educode_sales/businesses/new.html.erb +1 -1
  37. data/app/views/educode_sales/businesses/show_follow.html.erb +18 -3
  38. data/app/views/educode_sales/businesses/show_follow_record.html.erb +1 -1
  39. data/app/views/educode_sales/home/search_users.json.jbuilder +1 -1
  40. data/app/views/educode_sales/operation_plans/_monthPlan.html.erb +82 -88
  41. data/app/views/educode_sales/operation_plans/_monthly.html.erb +126 -97
  42. data/app/views/educode_sales/operation_plans/_weekPlan.html.erb +103 -90
  43. data/app/views/educode_sales/operation_plans/_weekly.html.erb +116 -87
  44. data/app/views/educode_sales/operation_plans/edit_month.html.erb +44 -32
  45. data/app/views/educode_sales/operation_plans/edit_monthly.html.erb +1 -1
  46. data/app/views/educode_sales/operation_plans/edit_week.html.erb +49 -39
  47. data/app/views/educode_sales/operation_plans/edit_weekly.html.erb +1 -1
  48. data/app/views/educode_sales/operation_plans/index.html.erb +35 -5
  49. data/app/views/educode_sales/operation_plans/index.json.jbuilder +19 -0
  50. data/app/views/educode_sales/operation_plans/my_month.json.jbuilder +18 -0
  51. data/app/views/educode_sales/operation_plans/my_week.json.jbuilder +19 -0
  52. data/app/views/educode_sales/operation_plans/new_month.html.erb +13 -10
  53. data/app/views/educode_sales/operation_plans/new_monthly.html.erb +162 -72
  54. data/app/views/educode_sales/operation_plans/new_week.html.erb +14 -7
  55. data/app/views/educode_sales/operation_plans/new_weekly.html.erb +205 -120
  56. data/app/views/educode_sales/operation_plans/show_month.html.erb +4 -10
  57. data/app/views/educode_sales/operation_plans/show_week.html.erb +20 -25
  58. data/app/views/educode_sales/operation_plans/show_weekly.html.erb +6 -6
  59. data/app/views/educode_sales/operation_reports/audit.html.erb +214 -0
  60. data/app/views/educode_sales/operation_reports/edit.html.erb +234 -0
  61. data/app/views/educode_sales/operation_reports/index.json.jbuilder +18 -0
  62. data/app/views/educode_sales/operation_reports/plans.json.jbuilder +19 -0
  63. data/app/views/educode_sales/operation_reports/show.html.erb +139 -0
  64. data/app/views/educode_sales/operations/trends.html.erb +8 -0
  65. data/app/views/educode_sales/places/index.html.erb +6 -0
  66. data/app/views/educode_sales/places/index.json.jbuilder +1 -1
  67. data/app/views/educode_sales/plans/_monthPlan.html.erb +9 -1
  68. data/app/views/educode_sales/plans/_monthly.html.erb +10 -2
  69. data/app/views/educode_sales/plans/_weekPlan.html.erb +17 -5
  70. data/app/views/educode_sales/plans/_weekly.html.erb +10 -2
  71. data/app/views/educode_sales/plans/audit_weekly.html.erb +6 -0
  72. data/app/views/educode_sales/plans/edit_monthly.html.erb +8 -0
  73. data/app/views/educode_sales/plans/edit_week.html.erb +8 -2
  74. data/app/views/educode_sales/plans/edit_weekly.html.erb +8 -0
  75. data/app/views/educode_sales/plans/index.json.jbuilder +1 -1
  76. data/app/views/educode_sales/plans/my_month.json.jbuilder +1 -1
  77. data/app/views/educode_sales/plans/my_week.json.jbuilder +1 -1
  78. data/app/views/educode_sales/plans/new_month.html.erb +7 -3
  79. data/app/views/educode_sales/plans/new_monthly.html.erb +8 -0
  80. data/app/views/educode_sales/plans/new_week.html.erb +8 -2
  81. data/app/views/educode_sales/plans/new_weekly.html.erb +7 -1
  82. data/app/views/educode_sales/roles/index.html.erb +33 -2
  83. data/app/views/educode_sales/sale_reports/index.json.jbuilder +1 -1
  84. data/app/views/educode_sales/sale_trends/trends.html.erb +8 -0
  85. data/app/views/educode_sales/sales/index.html.erb +2 -1
  86. data/app/views/educode_sales/sales/operations.html.erb +5 -2
  87. data/app/views/educode_sales/sessions/login.html.erb +1 -1
  88. data/app/views/educode_sales/staffs/edit.html.erb +2 -3
  89. data/app/views/educode_sales/staffs/index.html.erb +4 -4
  90. data/app/views/educode_sales/staffs/new.html.erb +1 -1
  91. data/app/views/educode_sales/teachers/add_courses.html.erb +100 -19
  92. data/app/views/educode_sales/teachers/course_subject.json.jbuilder +10 -0
  93. data/app/views/educode_sales/teachers/edit.html.erb +54 -18
  94. data/app/views/educode_sales/teachers/edit_follow_record.html.erb +49 -30
  95. data/app/views/educode_sales/teachers/index.html.erb +20 -11
  96. data/app/views/educode_sales/teachers/index.json.jbuilder +2 -0
  97. data/app/views/educode_sales/teachers/new.html.erb +8 -6
  98. data/app/views/educode_sales/teachers/new_follow_record.html.erb +54 -29
  99. data/app/views/educode_sales/teachers/show_follow.html.erb +150 -170
  100. data/app/views/educode_sales/teachers/show_follow.json.jbuilder +20 -0
  101. data/app/views/educode_sales/teachers/show_follow_record.html.erb +11 -42
  102. data/app/views/educode_sales/teachers/unfinish_plans.json.jbuilder +14 -0
  103. data/app/views/layouts/educode_sales/application.html.erb +23 -2
  104. data/config/routes.rb +22 -4
  105. data/db/migrate/20210915061738_add_students_count_teacher_follow_ups.rb +9 -0
  106. data/lib/educode_sales/version.rb +1 -1
  107. metadata +19 -6
@@ -1,16 +1,24 @@
1
1
  <script type="text/html" id="toolbarDemo_follow">
2
2
  <div class="layui-btn-container">
3
3
  <span class="table-label">跟进记录</span>
4
+ <% if can? :create, EducodeSales::TeacherFollow %>
4
5
  <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add"> 添加跟进记录</button>
6
+ <% end %>
5
7
  </div>
6
8
  </script>
7
9
 
8
- <table class="layui-hide" id="followTable" lay-filter="sale_plan_follow_table"></table>
10
+ <table class="layui-hide" id="sale_plan_follow_table" lay-filter="sale_plan_follow_table"></table>
9
11
 
10
12
  <script type="text/html" id="currentTableBar_follow">
13
+ <% if can? :read, EducodeSales::TeacherFollow %>
11
14
  <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="show">查看</a>
15
+ <% end %>
16
+ <% if can? :update, EducodeSales::TeacherFollow %>
12
17
  <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
18
+ <% end %>
19
+ <% if can? :destroy, EducodeSales::TeacherFollow %>
13
20
  <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
21
+ <% end %>
14
22
  </script>
15
23
 
16
24
 
@@ -18,109 +26,94 @@
18
26
  layui.use(['form', 'table', 'miniPage', 'element'], function () {
19
27
  var $ = layui.jquery,
20
28
  form = layui.form,
21
- table = layui.table,
29
+ request =layui.request,
22
30
  miniPage = layui.miniPage;
23
31
 
24
- table.render({
25
- elem: '#followTable',
26
- // url: 'api/table.json',
27
- toolbar: '#toolbarDemo_follow',
28
- defaultToolbar: [],
29
- cols: [
30
- [
31
- {
32
- field: 'id',
33
- width: 100,
34
- title: '序号'
35
- },
36
- {
37
- field: 'time',
38
- width: 120,
39
- title: '时间',
40
- sort: true
41
- },
42
- {
43
- field: 'type',
44
- width: 120,
45
- title: '教师态度',
46
- },
47
- {
48
- field: 'step',
49
- width: 120,
50
- title: '跟进手段',
51
- // templet: '#showchance'
52
- },
53
- {
54
- field: 'key',
55
- width: 150,
56
- title: '开课计划',
57
- // templet: '#add_keys'
58
- },
59
- {
60
- field: 'upTime',
61
- width: 120,
62
- title: '课堂建设',
63
- },
64
- {
65
- field: 'downTime',
66
- width: 120,
67
- title: '当前学生',
68
- },
69
- {
70
- field: 'upmoney',
71
- width: 100,
72
- title: '课堂',
73
- },
74
- {
75
- field: 'downmoney',
76
- width: 100,
77
- title: '评测次数',
78
- },
79
- {
80
- field: 'rate',
81
- width: 100,
82
- title: '使用项目',
83
- },
84
- {
85
- field: 'backmoney',
86
- width: 100,
87
- title: '创建项目',
88
- },
89
- {
90
- field: 'plan',
91
- width: 100,
92
- title: '跟进人',
93
- // templet: '#edit_plan'
94
- },
95
- {
96
- title: '操作',
97
- minWidth: 150,
98
- toolbar: '#currentTableBar_follow',
99
- align: "center"
100
- }
101
- ]
102
- ],
103
- data: [{
104
- "id": "1",
105
- "time": "2021-07-27",
106
- "type": "A类",
107
- "step": "初步接洽",
108
- "key": "2",
109
- "upTime": "2021-07-21",
110
- "downTime": "2021-02-04",
111
- "upmoney": "100",
112
- "downmoney": "100",
113
- "rate": "100%",
114
- "backmoney": "100",
115
- "plan": "10",
116
- "follow": "丁亚莲",
117
- "ways": "康源科技有限公司",
118
- }],
119
- limits: [10, 15, 20, 25, 50, 100],
120
- limit: 15,
121
- page: true,
122
- skin: 'line'
123
- });
32
+ table = layui.table;
33
+ table.render({
34
+ elem: '#sale_plan_follow_table',
35
+ url: '/educode_sales/teachers/show_follow?id=' + parent.id ,
36
+ toolbar: '#toolbarDemo_follow',
37
+ defaultToolbar: [],
38
+ cols: [
39
+ [
40
+ {
41
+ field: 'id',
42
+ width: 100,
43
+ title: '序号'
44
+ },
45
+ {
46
+ field: 'time',
47
+ width: 120,
48
+ title: '时间',
49
+ sort: true
50
+ },
51
+ {
52
+ field: 'teacher_attitude',
53
+ width: 120,
54
+ title: '教师态度',
55
+ },
56
+ {
57
+ field: 'contact',
58
+ width: 120,
59
+ title: '跟进手段',
60
+ // templet: '#showchance'
61
+ },
62
+ {
63
+ field: 'course_plan',
64
+ width: 150,
65
+ title: '开课计划',
66
+ // templet: '#add_keys'
67
+ },
68
+ {
69
+ field: 'course_build',
70
+ width: 120,
71
+ title: '课堂建设',
72
+ },
73
+ {
74
+ field: 'students_count',
75
+ width: 120,
76
+ title: '当前学生',
77
+ },
78
+ {
79
+ field: 'courses_count',
80
+ width: 100,
81
+ title: '课堂',
82
+ },
83
+ {
84
+ field: 'evaluates_count',
85
+ width: 100,
86
+ title: '评测次数',
87
+ },
88
+ {
89
+ field: 'course_shixuns_count',
90
+ width: 100,
91
+ title: '使用项目',
92
+ },
93
+ {
94
+ field: 'shixuns_count',
95
+ width: 100,
96
+ title: '创建项目',
97
+ },
98
+ {
99
+ field: 'staff',
100
+ width: 100,
101
+ title: '跟进人',
102
+ },
103
+ {
104
+ title: '操作',
105
+ minWidth: 190,
106
+ toolbar: '#currentTableBar_follow',
107
+ align: "center",
108
+ fixed: 'right'
109
+ }
110
+ ]
111
+ ],
112
+ limits: [10, 15, 20, 25, 50, 100],
113
+ limit: 15,
114
+ page: true,
115
+ skin: 'line'
116
+ });
124
117
 
125
118
 
126
119
  /**
@@ -128,9 +121,9 @@
128
121
  */
129
122
  table.on('toolbar(sale_plan_follow_table)', function (obj) {
130
123
  if (obj.event === 'add') { // 监听添加操作
131
- var content = miniPage.getHrefContent('/educode_sales/teachers/new_follow_record');
124
+ var content = miniPage.getHrefContent('/educode_sales/teachers/new_follow_record?id=' +parent.id);
132
125
  var openWH = miniPage.getOpenWidthHeight();
133
- var index = layer.open({
126
+ sale_plan_index = layer.open({
134
127
  title: '添加',
135
128
  type: 1,
136
129
  shade: 0.2,
@@ -147,10 +140,6 @@
147
140
  $(window).on("resize", function () {
148
141
  layer.full(index);
149
142
  });
150
- } else if (obj.event === 'delete') { // 监听删除操作
151
- var checkStatus = table.checkStatus('currentTableId'),
152
- data = checkStatus.data;
153
- layer.alert(JSON.stringify(data));
154
143
  }
155
144
  });
156
145
 
@@ -158,14 +147,20 @@
158
147
  var data = obj.data;
159
148
  var id = data.id
160
149
  if (obj.event === 'delete') {
161
- layer.confirm('真的删除行么', function (index) {
162
- obj.del();
163
- layer.close(index);
150
+ layer.confirm('确定删除序号为' + data.id + "的跟进记录", function (index) {
151
+ request.authDelete("educode_sales/teacher_follows/" + data.id, {}, function() {
152
+ obj.del();
153
+ layer.close(index);
154
+ parent.table.reload('sale_plan_follow_table')
155
+ parent.table.reload('teachers_table')
156
+ parent.table.reload('weekPlanTable1')
157
+ parent.table.reload('monthPlanTable')
158
+ })
164
159
  });
165
160
  } else if (obj.event === 'show') { // 监听添加操作
166
- var content = miniPage.getHrefContent('/educode_sales/teachers/show_follow_record');
161
+ var content = miniPage.getHrefContent('/educode_sales/teachers/show_follow_record?id=' + id);
167
162
  var openWH = miniPage.getOpenWidthHeight();
168
- var index = layer.open({
163
+ sale_plan_index1 = layer.open({
169
164
  title: '查看',
170
165
  type: 1,
171
166
  shade: 0.2,
@@ -183,9 +178,9 @@
183
178
  layer.full(index);
184
179
  });
185
180
  } else if (obj.event === 'edit') {
186
- content = miniPage.getHrefContent('/educode_sales/teachers/edit_follow_record');
181
+ content = miniPage.getHrefContent('/educode_sales/teachers/edit_follow_record?id='+ obj.data.id);
187
182
  openWH = miniPage.getOpenWidthHeight();
188
- index = layer.open({
183
+ edit_index1 = layer.open({
189
184
  title: '编辑',
190
185
  type: 1,
191
186
  shade: 0.2,
@@ -255,22 +250,28 @@
255
250
 
256
251
 
257
252
  <!--未完成计划列表-->
258
- <script type="text/html" id="weekPlanToolbar">
253
+ <script type="text/html" id="unfinish_toolbar">
259
254
  <div class="layui-btn-container">
260
255
  <span class="table-label">未完成计划列表</span>
261
- <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="addMonthPlan"> 添加月计划
262
- </button>
263
- <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="addWeekPlan"> 添加周计划
264
- </button>
256
+ <!-- <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="addMonthPlan"> 添加月计划-->
257
+ <!-- </button>-->
258
+ <!-- <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="addWeekPlan"> 添加周计划-->
259
+ <!-- </button>-->
265
260
  </div>
266
261
  </script>
267
262
 
268
- <table class="layui-hide" id="weekPlanTable" lay-filter="currentTableFilter1"></table>
263
+ <table class="layui-hide" id="unfinish_table" lay-filter="unfinish_table"></table>
269
264
 
270
265
  <script type="text/html" id="currentTableBar1234">
266
+ <% if can? :read, EducodeSales::OperationPlan %>
271
267
  <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="show">查看</a>
268
+ <% end %>
269
+ <% if can? :update, EducodeSales::OperationPlan %>
272
270
  <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
271
+ <% end %>
272
+ <% if can? :destroy, EducodeSales::OperationPlan %>
273
273
  <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
274
+ <% end %>
274
275
  </script>
275
276
 
276
277
 
@@ -279,12 +280,13 @@
279
280
  var $ = layui.jquery,
280
281
  form = layui.form,
281
282
  table = layui.table,
283
+ request = layui.request,
282
284
  miniPage = layui.miniPage;
283
285
 
284
286
  table.render({
285
- elem: '#weekPlanTable',
286
- // url: 'api/table.json',
287
- toolbar: '#weekPlanToolbar',
287
+ elem: '#unfinish_table',
288
+ url: '/educode_sales/teachers/' + parent.id + "/unfinish_plans",
289
+ toolbar: '#unfinish_toolbar',
288
290
  defaultToolbar: [],
289
291
  cols: [
290
292
  [
@@ -294,7 +296,7 @@
294
296
  title: '序号'
295
297
  },
296
298
  {
297
- field: 'username',
299
+ field: 'staff',
298
300
  width: 100,
299
301
  title: '姓名'
300
302
  },
@@ -304,46 +306,33 @@
304
306
  title: '月份',
305
307
  },
306
308
  {
307
- field: 'company',
309
+ field: 'weekly',
308
310
  width: 100,
309
311
  title: '周次'
310
312
  },
311
313
  {
312
- field: 'dep',
314
+ field: 'content',
313
315
  width: 300,
314
316
  title: '计划内容'
315
317
  },
316
318
  {
317
- field: 'week',
319
+ field: 'finish_rate',
318
320
  width: 100,
319
321
  title: '完成率',
320
322
  },
321
323
  {
322
- field: 'plan',
323
- width: 150,
324
+ field: 'updated_at',
325
+ width: 190,
324
326
  title: '更新时间',
325
327
  },
326
328
  {
327
329
  title: '操作',
328
- minWidth: 150,
330
+ minWidth: 190,
329
331
  toolbar: '#currentTableBar1234',
330
332
  align: "center"
331
333
  }
332
334
  ]
333
335
  ],
334
- data: [{
335
- "id": "1",
336
- "username": "丁亚莲",
337
- "month": "2021-08",
338
- "chance": "人工智能实验室建设",
339
- "company": "2021-33周",
340
- "dep": "对接决策人",
341
- "week": "100%",
342
- "plan": "2021-07-27",
343
- "follow": "120",
344
- "rate": "100%",
345
- "updateTime": "2021-07-27",
346
- }],
347
336
  limits: [10, 15, 20, 25, 50, 100],
348
337
  limit: 15,
349
338
  page: true,
@@ -372,7 +361,7 @@
372
361
  /**
373
362
  * toolbar事件监听
374
363
  */
375
- table.on('toolbar(currentTableFilter1)', function (obj) {
364
+ table.on('toolbar(unfinish_table)', function (obj) {
376
365
  if (obj.event === 'addWeekPlan') { // 监听添加操作
377
366
 
378
367
  var content = miniPage.getHrefContent('/educode_sales/operation_plans/new_week');
@@ -422,47 +411,42 @@
422
411
  });
423
412
 
424
413
  //监听表格复选框选择
425
- table.on('checkbox(currentTableFilter1)', function (obj) {
414
+ table.on('checkbox(unfinish_table)', function (obj) {
426
415
  console.log(obj)
427
416
  });
428
417
 
429
- table.on('tool(currentTableFilter1)', function (obj) {
418
+ table.on('tool(unfinish_table)', function (obj) {
430
419
  var data = obj.data;
431
420
  var id = data.id
432
421
  if (obj.event === 'delete') {
433
- layer.confirm('真的删除行么', function (index) {
434
- obj.del();
435
- layer.close(index);
422
+ layer.confirm('确定删除序号为' + data.id + "的计划", function (index) {
423
+ request.authDelete("educode_sales/operation_plans/" + data.id, {}, function() {
424
+ obj.del();
425
+ layer.close(index);
426
+ })
427
+
436
428
  });
437
429
  } else if (obj.event === 'show') {
438
- content = miniPage.getHrefContent('/educode_sales/operation_plans/show_week');
430
+ content = miniPage.getHrefContent('/educode_sales/operation_plans/show_week?id=' + data.id);
439
431
  openWH = miniPage.getOpenWidthHeight();
440
432
  index = layer.open({
441
- title: '查看',
433
+ title: '查看计划',
442
434
  type: 1,
443
435
  shade: 0.2,
444
436
  maxmin: true,
445
437
  shadeClose: true,
446
438
  area: [openWH[0] + 'px', openWH[1] + 'px'],
447
439
  offset: [openWH[2] + 'px', openWH[3] + 'px'],
448
- content: content,
449
- success: function (layero, index) {
450
- $("#show_chance1").val(data.chance);
451
- $("#show_plan1").val(data.plan);
452
- $("#show_rate1").val(data.rate);
453
- $("#show_week1").val(data.week);
454
- // 重新渲染弹层中的下拉选择框select
455
- form.render('select');
456
- },
440
+ content: content
457
441
  });
458
442
  $(window).on("resize", function () {
459
443
  layer.full(index);
460
444
  });
461
445
  return false;
462
446
  } else if (obj.event === 'edit') {
463
- content = miniPage.getHrefContent('/educode_sales/operation_plans/edit_week');
447
+ content = miniPage.getHrefContent('/educode_sales/operation_plans/edit_week?id=' + data.id);
464
448
  openWH = miniPage.getOpenWidthHeight();
465
- index = layer.open({
449
+ index10 = layer.open({
466
450
  title: '编辑',
467
451
  type: 1,
468
452
  shade: 0.2,
@@ -472,20 +456,16 @@
472
456
  offset: [openWH[2] + 'px', openWH[3] + 'px'],
473
457
  content: content,
474
458
  success: function (layero, index) {
475
- $("#edit_chance1").val(data.chance);
476
- $("#edit_plan1").val(data.plan);
477
- $("#edit_rate1").val(data.rate);
478
- $("#edit_week1").val(data.week);
479
459
  // 重新渲染弹层中的下拉选择框select
480
460
  form.render('select');
481
461
  },
482
462
  });
483
463
  $(window).on("resize", function () {
484
- layer.full(index);
464
+ layer.full(sindex);
485
465
  });
486
466
  return false;
487
- } else if (obj.event === 'show_follow') {
488
- content = miniPage.getHrefContent('/educode_sales/businesses/show_follow');
467
+ } else if (obj.event === 'show_follow') {
468
+ content = miniPage.getHrefContent('/educode_sales/teachers/show_follow');
489
469
  openWH = miniPage.getOpenWidthHeight();
490
470
  index = layer.open({
491
471
  title: 'xxxx/跟进记录',