educode_sales 0.1.3 → 0.1.8

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 (85) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/educode_sales/app.css +1 -0
  3. data/app/controllers/educode_sales/activities_controller.rb +1 -1
  4. data/app/controllers/educode_sales/businesses_controller.rb +14 -9
  5. data/app/controllers/educode_sales/commons_controller.rb +1 -1
  6. data/app/controllers/educode_sales/follow_ups_controller.rb +3 -3
  7. data/app/controllers/educode_sales/operation_plans_controller.rb +7 -7
  8. data/app/controllers/educode_sales/operation_reports_controller.rb +2 -2
  9. data/app/controllers/educode_sales/places_controller.rb +1 -1
  10. data/app/controllers/educode_sales/plans_controller.rb +6 -6
  11. data/app/controllers/educode_sales/roles_controller.rb +1 -1
  12. data/app/controllers/educode_sales/sale_reports_controller.rb +2 -2
  13. data/app/controllers/educode_sales/sales_controller.rb +2 -2
  14. data/app/controllers/educode_sales/sessions_controller.rb +1 -0
  15. data/app/controllers/educode_sales/staffs_controller.rb +3 -3
  16. data/app/controllers/educode_sales/teacher_follows_controller.rb +2 -2
  17. data/app/controllers/educode_sales/teachers_controller.rb +5 -5
  18. data/app/models/educode_sales/common.rb +4 -0
  19. data/app/models/educode_sales/follow_up.rb +1 -1
  20. data/app/models/educode_sales/operation_plan.rb +0 -1
  21. data/app/models/educode_sales/sale_plan.rb +0 -1
  22. data/app/models/educode_sales/teacher.rb +11 -2
  23. data/app/views/educode_sales/activities/index.html.erb +24 -10
  24. data/app/views/educode_sales/activities/index.json.jbuilder +1 -1
  25. data/app/views/educode_sales/activities/show_teachers.html.erb +13 -7
  26. data/app/views/educode_sales/businesses/edit_follow_record.html.erb +3 -2
  27. data/app/views/educode_sales/businesses/edit_plan.html.erb +2 -1
  28. data/app/views/educode_sales/businesses/index.json.jbuilder +1 -0
  29. data/app/views/educode_sales/businesses/show_follow.html.erb +1 -0
  30. data/app/views/educode_sales/businesses/show_follow.json.jbuilder +1 -1
  31. data/app/views/educode_sales/businesses/unfinish_plans.json.jbuilder +1 -1
  32. data/app/views/educode_sales/commons/index.json.jbuilder +1 -1
  33. data/app/views/educode_sales/follow_ups/money_plans.json.jbuilder +1 -1
  34. data/app/views/educode_sales/follow_ups/teachers.json.jbuilder +1 -1
  35. data/app/views/educode_sales/operation_plans/_monthPlan.html.erb +5 -4
  36. data/app/views/educode_sales/operation_plans/_monthly.html.erb +4 -4
  37. data/app/views/educode_sales/operation_plans/_weekPlan.html.erb +9 -4
  38. data/app/views/educode_sales/operation_plans/_weekly.html.erb +4 -5
  39. data/app/views/educode_sales/operation_plans/edit_month.html.erb +3 -1
  40. data/app/views/educode_sales/operation_plans/index.html.erb +35 -5
  41. data/app/views/educode_sales/operation_plans/index.json.jbuilder +1 -1
  42. data/app/views/educode_sales/operation_plans/my_month.json.jbuilder +2 -2
  43. data/app/views/educode_sales/operation_plans/my_week.json.jbuilder +1 -1
  44. data/app/views/educode_sales/operation_plans/new_month.html.erb +3 -1
  45. data/app/views/educode_sales/operation_plans/new_monthly.html.erb +136 -30
  46. data/app/views/educode_sales/operation_plans/new_week.html.erb +4 -3
  47. data/app/views/educode_sales/operation_plans/new_weekly.html.erb +173 -81
  48. data/app/views/educode_sales/operation_reports/audit.html.erb +1 -1
  49. data/app/views/educode_sales/operation_reports/edit.html.erb +1 -1
  50. data/app/views/educode_sales/operation_reports/index.json.jbuilder +1 -1
  51. data/app/views/educode_sales/operation_reports/plans.json.jbuilder +1 -1
  52. data/app/views/educode_sales/operation_reports/show.html.erb +1 -1
  53. data/app/views/educode_sales/places/index.json.jbuilder +1 -1
  54. data/app/views/educode_sales/plans/_monthPlan.html.erb +10 -7
  55. data/app/views/educode_sales/plans/_monthly.html.erb +2 -2
  56. data/app/views/educode_sales/plans/_weekPlan.html.erb +7 -2
  57. data/app/views/educode_sales/plans/_weekly.html.erb +1 -1
  58. data/app/views/educode_sales/plans/edit_week.html.erb +1 -1
  59. data/app/views/educode_sales/plans/index.json.jbuilder +1 -1
  60. data/app/views/educode_sales/plans/my_month.json.jbuilder +1 -1
  61. data/app/views/educode_sales/plans/my_week.json.jbuilder +1 -1
  62. data/app/views/educode_sales/plans/new_monthly.html.erb +1 -1
  63. data/app/views/educode_sales/plans/new_week.html.erb +3 -1
  64. data/app/views/educode_sales/plans/new_weekly.html.erb +2 -1
  65. data/app/views/educode_sales/roles/index.json.jbuilder +1 -1
  66. data/app/views/educode_sales/sale_reports/audit.html.erb +1 -1
  67. data/app/views/educode_sales/sale_reports/edit.html.erb +1 -1
  68. data/app/views/educode_sales/sale_reports/index.json.jbuilder +1 -1
  69. data/app/views/educode_sales/sale_reports/plans.json.jbuilder +1 -1
  70. data/app/views/educode_sales/sale_reports/show.html.erb +1 -1
  71. data/app/views/educode_sales/sale_trends/trends.html.erb +1 -1
  72. data/app/views/educode_sales/sales/index.json.jbuilder +1 -1
  73. data/app/views/educode_sales/sales/operations.json.jbuilder +1 -1
  74. data/app/views/educode_sales/staffs/follow_up_departments.json.jbuilder +1 -1
  75. data/app/views/educode_sales/staffs/index.json.jbuilder +1 -1
  76. data/app/views/educode_sales/teachers/course_list.json.jbuilder +1 -0
  77. data/app/views/educode_sales/teachers/index.html.erb +3 -3
  78. data/app/views/educode_sales/teachers/index.json.jbuilder +4 -2
  79. data/app/views/educode_sales/teachers/new.html.erb +3 -5
  80. data/app/views/educode_sales/teachers/new_follow_record.html.erb +2 -0
  81. data/app/views/educode_sales/teachers/show_class.html.erb +6 -0
  82. data/app/views/educode_sales/teachers/show_follow.json.jbuilder +1 -1
  83. data/app/views/educode_sales/teachers/unfinish_plans.json.jbuilder +1 -1
  84. data/lib/educode_sales/version.rb +1 -1
  85. metadata +2 -2
@@ -18,4 +18,4 @@ json.data do
18
18
  end
19
19
 
20
20
  json.code 0
21
- json.count @follow_ups.count
21
+ json.count @follow_ups.total_count
@@ -11,4 +11,4 @@ json.data do
11
11
  end
12
12
 
13
13
  json.code 0
14
- json.count @plans.count
14
+ json.count @plans.total_count
@@ -10,4 +10,4 @@ json.data do
10
10
  end
11
11
 
12
12
  json.code 0
13
- json.count @commons.size
13
+ json.count @commons.total_count
@@ -8,4 +8,4 @@ json.data do
8
8
  end
9
9
 
10
10
  json.code 0
11
- json.count @money_plans.count
11
+ json.count @money_plans.total_count
@@ -13,4 +13,4 @@ json.data do
13
13
  end
14
14
 
15
15
  json.code 0
16
- json.count @teachers.count
16
+ json.count @teachers.total_count
@@ -7,6 +7,7 @@
7
7
  </div>
8
8
  </script>
9
9
  <!--搜索-->
10
+ <div class="layuimini-main min-height-table" id="o_month_table_wraper">
10
11
  <form class="layui-form layui-form-pane" lay-filter="month_plan_form_filter">
11
12
  <div class="layui-form-item">
12
13
  <div class="layui-inline">
@@ -36,7 +37,7 @@
36
37
  </div>
37
38
  </form>
38
39
  <table class="layui-hide" id="monthPlanTable" lay-filter="currentTableFilter3"></table>
39
-
40
+ </div>
40
41
  <script type="text/html" id="currentTableBar">
41
42
  <% if can? :read, EducodeSales::OperationPlan %>
42
43
  <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="show">查看</a>
@@ -181,7 +182,7 @@
181
182
  console.log("a");
182
183
  var content = miniPage.getHrefContent('/educode_sales/operation_plans/new_month');
183
184
  var openWH = miniPage.getOpenWidthHeight();
184
- var index = layer.open({
185
+ monthPlanIndex = layer.open({
185
186
  title: '添加计划',
186
187
  type: 1,
187
188
  shade: 0.2,
@@ -236,7 +237,7 @@
236
237
  } else if (obj.event === 'edit') {
237
238
  content = miniPage.getHrefContent('/educode_sales/operation_plans/edit_month?id='+data.id);
238
239
  openWH = miniPage.getOpenWidthHeight();
239
- index = layer.open({
240
+ indexOfmonthPlan = layer.open({
240
241
  title: '编辑',
241
242
  type: 1,
242
243
  shade: 0.2,
@@ -258,7 +259,7 @@
258
259
  content = miniPage.getHrefContent('/educode_sales/teachers/show_follow?id=' + data.teacher_id);
259
260
  openWH = miniPage.getOpenWidthHeight();
260
261
  index = layer.open({
261
- title: 'xxxx/跟进记录',
262
+ title: data.teacher_name + '/跟进记录',
262
263
  type: 1,
263
264
  shade: 0.2,
264
265
  maxmin: true,
@@ -7,7 +7,7 @@
7
7
  </div>
8
8
  </script>
9
9
  <!--搜索-->
10
- <div class="layuimini-main edit-table" id="monthly_table_wraper">
10
+ <div class="layuimini-main min-height-table" id="o_monthly_table_wraper">
11
11
 
12
12
  <form class="layui-form layui-form-pane" lay-filter="monthly_form_filter">
13
13
  <div class="layui-form-item">
@@ -139,7 +139,7 @@
139
139
  }
140
140
  ]
141
141
  ], done: function (res) {
142
- $("#monthly_table_wraper .star1").each(function (i) {
142
+ $("#o_monthly_table_wraper .star1").each(function (i) {
143
143
  rate.render({
144
144
  elem: this,
145
145
  value: res.data[i].level1_score,
@@ -147,7 +147,7 @@
147
147
  readonly: true
148
148
  });
149
149
  })
150
- $("#monthly_table_wraper .star2").each(function (i) {
150
+ $("#o_monthly_table_wraper .star2").each(function (i) {
151
151
  rate.render({
152
152
  elem: this,
153
153
  value: res.data[i].level2_score,
@@ -155,7 +155,7 @@
155
155
  readonly: true
156
156
  });
157
157
  })
158
- $("#monthly_table_wraper .star3").each(function (i) {
158
+ $("#o_monthly_table_wraper .star3").each(function (i) {
159
159
  rate.render({
160
160
  elem: this,
161
161
  value: res.data[i].level3_score,
@@ -7,8 +7,8 @@
7
7
  </div>
8
8
  </script>
9
9
  <!--搜索-->
10
- <div class="layuimini-main edit-table" id="week_table_wraper">
11
- <div class="layui-form layui-form-pane edit-table" lay-filter="week_plan_form_filter">
10
+ <div class="layuimini-main min-height-table" id="o_week_table_wraper">
11
+ <div class="layui-form layui-form-pane" lay-filter="week_plan_form_filter">
12
12
  <div class="layui-form-item">
13
13
  <div class="layui-inline">
14
14
  <label class="layui-form-label">人员</label>
@@ -106,6 +106,11 @@
106
106
  width: 190,
107
107
  title: '部门'
108
108
  },
109
+ {
110
+ field: 'month',
111
+ width: 100,
112
+ title: '月份',
113
+ },
109
114
  {
110
115
  field: 'week',
111
116
  width: 100,
@@ -187,7 +192,7 @@
187
192
  if (obj.event === 'add') { // 监听添加操作
188
193
  var content = miniPage.getHrefContent('/educode_sales/operation_plans/new_week');
189
194
  var openWH = miniPage.getOpenWidthHeight();
190
- var index = layer.open({
195
+ new_weelPlan_index = layer.open({
191
196
  title: '添加计划',
192
197
  type: 1,
193
198
  shade: 0.2,
@@ -276,7 +281,7 @@
276
281
  content = miniPage.getHrefContent('/educode_sales/teachers/show_follow?id=' + data.teacher_id);
277
282
  openWH = miniPage.getOpenWidthHeight();
278
283
  index = layer.open({
279
- title: 'xxxx/跟进记录',
284
+ title: data.teacher_name + '/跟进记录',
280
285
  type: 1,
281
286
  shade: 0.2,
282
287
  maxmin: true,
@@ -7,8 +7,7 @@
7
7
  </div>
8
8
  </script>
9
9
  <!--搜索-->
10
- <div class="layuimini-main edit-table" id="sales_weelky_table">
11
-
10
+ <div class="layuimini-main min-height-table" id="o_sales_weelky_table">
12
11
  <form class="layui-form layui-form-pane" lay-filter="weekly_plan_form_filter">
13
12
  <div class="layui-form-item">
14
13
  <div class="layui-inline">
@@ -141,7 +140,7 @@
141
140
  }
142
141
  ]
143
142
  ], done: function (res) {
144
- $("#sales_weelky_table .star1").each(function (i) {
143
+ $("#o_sales_weelky_table .star1").each(function (i) {
145
144
  rate.render({
146
145
  elem: this,
147
146
  value: res.data[i].level1_score,
@@ -149,7 +148,7 @@
149
148
  readonly: true
150
149
  });
151
150
  })
152
- $("#sales_weelky_table .star2").each(function (i) {
151
+ $("#o_sales_weelky_table .star2").each(function (i) {
153
152
  rate.render({
154
153
  elem: this,
155
154
  value: res.data[i].level2_score,
@@ -157,7 +156,7 @@
157
156
  readonly: true
158
157
  });
159
158
  })
160
- $("#sales_weelky_table .star3").each(function (i) {
159
+ $("#o_sales_weelky_table .star3").each(function (i) {
161
160
  rate.render({
162
161
  elem: this,
163
162
  value: res.data[i].level3_score,
@@ -60,8 +60,10 @@
60
60
  if (res.success == false) {
61
61
  layer.alert(res.msg)
62
62
  } else {
63
- layer.closeAll()
63
+ layer.close(parent.indexOfmonthPlan)
64
+ layer.close(parent.indexOfmonthly)
64
65
  table.reload('monthPlanTable')
66
+ table.reload("newMonthlyTable")
65
67
  }
66
68
  })
67
69
  return false;
@@ -1,9 +1,9 @@
1
- <div class="layui-tab">
1
+ <div class="layui-tab" lay-filter="operation_tab">
2
2
  <ul class="layui-tab-title">
3
- <li class="layui-this">周计划</li>
4
- <li>周报</li>
5
- <li>月计划</li>
6
- <li>月报</li>
3
+ <li class="layui-this" data="week">周计划</li>
4
+ <li data="weekly">周报</li>
5
+ <li data="month">月计划</li>
6
+ <li data="monthly">月报</li>
7
7
  </ul>
8
8
  <div class="layui-tab-content">
9
9
  <div class="layui-tab-item layui-show">
@@ -20,3 +20,33 @@
20
20
  </div>
21
21
  </div>
22
22
  </div>
23
+ <script>
24
+ layui.use(['element', 'table', 'jquery'], function () {
25
+ var $ = layui.jquery,
26
+ table = layui.table,
27
+ element = layui.element;
28
+ element.on('tab(operation_tab)', function (data) {
29
+ var status = $(this).attr('data')
30
+ switch (status) {
31
+ case 'week':
32
+ $("#o_week_table_wraper .layui-table-fixed-r")[0].classList.remove('layui-hide');
33
+ $("#o_week_table_wraper .layui-table-fixed-r .layui-table-body")[0].style.height = "auto";
34
+ break;
35
+ case 'weekly':
36
+ $("#o_sales_weelky_table .layui-table-fixed-r")[0].classList.remove('layui-hide');
37
+ $("#o_sales_weelky_table .layui-table-fixed-r .layui-table-body")[0].style.height = "auto";
38
+ break;;
39
+ case 'monthly':
40
+ $("#o_monthly_table_wraper .layui-table-fixed-r")[0].classList.remove('layui-hide');
41
+ $("#o_monthly_table_wraper .layui-table-fixed-r .layui-table-body")[0].style.height = "auto";
42
+ break;
43
+ case 'month':
44
+ $("#o_month_table_wraper .layui-table-fixed-r")[0].classList.remove('layui-hide');
45
+ $("#o_month_table_wraper .layui-table-fixed-r .layui-table-body")[0].style.height = "auto";
46
+ break;
47
+ }
48
+
49
+
50
+ })
51
+ })
52
+ </script>
@@ -16,4 +16,4 @@ json.data do
16
16
  end
17
17
 
18
18
  json.code 0
19
- json.count @sale_plans.count
19
+ json.count @sale_plans.total_count
@@ -8,11 +8,11 @@ json.data do
8
8
  json.month d.month.strftime("%Y-%m")
9
9
  json.teacher_id d.teacher_id
10
10
  json.content d.content.truncate(30)
11
- # json.follow_ups_count d.teacher.follow_ups_count
11
+ json.count d.teacher.teacher_follows_count
12
12
  json.rate "#{d.finish_rate}%"
13
13
  json.updated_at d.updated_at.to_s
14
14
  end
15
15
  end
16
16
 
17
17
  json.code 0
18
- json.count @sale_plans.count
18
+ json.count @sale_plans.total_count
@@ -16,4 +16,4 @@ json.data do
16
16
  end
17
17
 
18
18
  json.code 0
19
- json.count @sale_plans.count
19
+ json.count @sale_plans.total_count
@@ -69,8 +69,10 @@
69
69
  if (res.success == false) {
70
70
  layer.alert(res.msg)
71
71
  } else {
72
- layer.closeAll()
72
+ layer.close(parent.new_monthly_index)
73
+ layer.close(parent.monthPlanIndex)
73
74
  table.reload('monthPlanTable')
75
+ table.reload("newMonthlyTable")
74
76
  }
75
77
  })
76
78
  return false;
@@ -8,7 +8,7 @@
8
8
  <div class="layui-form-item">
9
9
  <div class="layui-inline" style="margin:18px; font-weight: bold">
10
10
  <label>完成率:</label>
11
- <span><%= @rate %></span>
11
+ <span><%= @rate %>%</span>
12
12
  <%= hidden_field_tag 'finish_rate', @rate, {id: 'monthly_rate_hide'} %>
13
13
  </div>
14
14
  <div class="layui-inline" style="margin:18px; font-weight: bold">
@@ -35,7 +35,7 @@
35
35
  </form>
36
36
 
37
37
  <!--表格-->
38
- <table class="layui-hide" id="newMonthlyTable" lay-filter="currentMonthly"></table>
38
+ <table class="layui-hide" id="newMonthlyTable" lay-filter="newMonthlyToolbar"></table>
39
39
 
40
40
  <script type="text/html" id="currentMonthly">
41
41
  <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="show">查看</a>
@@ -43,6 +43,11 @@
43
43
  <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
44
44
  </script>
45
45
 
46
+ <script type="text/html" id="show_follow_newMonthly">
47
+ <a href="javascript:void(0);" lay-event="show_follow_newMonthly" class="layui-table-link">{{ d.count }}</a>
48
+ </script>
49
+
50
+
46
51
  <script>
47
52
  layui.use(['rate', 'table'], function () {
48
53
  var rate = layui.rate,
@@ -69,7 +74,7 @@
69
74
 
70
75
  table.render({
71
76
  elem: '#newMonthlyTable',
72
- // url: 'api/table.json',
77
+ url: '/educode_sales/operation_plans/my_month',
73
78
  toolbar: '#newMonthlyToolbar',
74
79
  defaultToolbar: [],
75
80
  cols: [
@@ -80,39 +85,35 @@
80
85
  title: '序号'
81
86
  },
82
87
  {
83
- field: 'username',
88
+ field: 'staff',
84
89
  width: 100,
85
90
  title: '姓名'
86
91
  },
87
92
  {
88
- field: 'chance',
93
+ field: 'teacher_name',
89
94
  width: 100,
90
95
  title: '教师姓名',
91
96
  },
92
97
  {
93
- field: 'company',
94
- width: 100,
98
+ field: 'school',
99
+ width: 190,
95
100
  title: '单位'
96
101
  },
97
102
  {
98
- field: 'dep',
99
- width: 100,
103
+ field: 'department',
104
+ width: 190,
100
105
  title: '部门'
101
106
  },
102
107
  {
103
- field: 'week',
104
- width: 100,
105
- title: '周次',
106
- },
107
- {
108
- field: 'plan',
109
- width: 300,
108
+ field: 'content',
109
+ width: 400,
110
110
  title: '计划内容',
111
111
  },
112
112
  {
113
- field: 'follow',
113
+ field: 'count',
114
114
  width: 100,
115
115
  title: '跟进',
116
+ templet: '#show_follow_newMonthly'
116
117
  },
117
118
  {
118
119
  field: 'rate',
@@ -120,7 +121,7 @@
120
121
  title: '完成率',
121
122
  },
122
123
  {
123
- field: 'updateTime',
124
+ field: 'updated_at',
124
125
  width: 150,
125
126
  title: '更新时间',
126
127
  sort: true,
@@ -133,25 +134,130 @@
133
134
  }
134
135
  ]
135
136
  ],
136
- data: [{
137
- "id": "1",
138
- "username": "丁亚莲",
139
- "chance": "人工智能实验室建设",
140
- "company": "中南大学",
141
- "dep": "计算机学院",
142
- "week": "2021-33周",
143
- "plan": "对接决策人",
144
- "follow": "120",
145
- "rate": "100%",
146
- "updateTime": "2021-07-27",
147
- }],
148
137
  limits: [10, 15, 20, 25, 50, 100],
149
138
  limit: 15,
150
139
  page: true,
151
140
  skin: 'line'
152
141
  });
142
+
143
+
144
+
145
+
146
+ /**
147
+ * toolbar事件监听
148
+ */
149
+ table.on('toolbar(newMonthlyToolbar)', function (obj) {
150
+ if (obj.event === 'add') { // 监听添加操作
151
+ var content = miniPage.getHrefContent('/educode_sales/operation_plans/new_month');
152
+ var openWH = miniPage.getOpenWidthHeight();
153
+ new_monthly_index = layer.open({
154
+ title: '添加计划',
155
+ type: 1,
156
+ shade: 0.2,
157
+ maxmin: true,
158
+ shadeClose: true,
159
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
160
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
161
+ content: content,
162
+ success: function (layero, index) {
163
+ // 重新渲染弹层中的下拉选择框select
164
+ form.render('select');
165
+ }
166
+ });
167
+ $(window).on("resize", function () {
168
+ layer.full(index);
169
+ });
170
+ }
171
+ });
172
+
173
+
174
+ table.on('tool(newMonthlyToolbar)', function (obj) {
175
+ var data = obj.data;
176
+ if (obj.event === 'delete') {
177
+ layer.confirm('确定删除' + data.id, function (index) {
178
+ console.log("aaaaa");
179
+ request.delete('educode_sales/operation_plans/' + data.id, {}, function (res) {
180
+ layer.close(index);
181
+ table.reload("newMonthlyTable")
182
+ })
183
+ });
184
+ }
185
+ else if (obj.event === 'show') {
186
+ content = miniPage.getHrefContent('/educode_sales/operation_plans/show_week?id='+ data.id);
187
+ openWH = miniPage.getOpenWidthHeight();
188
+ index = layer.open({
189
+ title: '查看',
190
+ type: 1,
191
+ shade: 0.2,
192
+ maxmin: true,
193
+ shadeClose: true,
194
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
195
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
196
+ content: content,
197
+ success: function (layero, index) {
198
+ form.render('select');
199
+ },
200
+ });
201
+ $(window).on("resize", function () {
202
+ layer.full(index);
203
+ });
204
+ return false;
205
+ } else if (obj.event === 'edit') {
206
+ content = miniPage.getHrefContent('/educode_sales/operation_plans/edit_month?id='+data.id);
207
+ openWH = miniPage.getOpenWidthHeight();
208
+ indexOfmonthly = layer.open({
209
+ title: '编辑',
210
+ type: 1,
211
+ shade: 0.2,
212
+ maxmin: true,
213
+ shadeClose: true,
214
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
215
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
216
+ content: content,
217
+ success: function (layero, index) {
218
+ form.render('select');
219
+ },
220
+ });
221
+ $(window).on("resize", function () {
222
+ layer.full(index);
223
+ });
224
+ return false;
225
+ }else if (obj.event === 'show_follow_newMonthly') {
226
+ id = data.teacher_id
227
+ content = miniPage.getHrefContent('/educode_sales/teachers/show_follow?id=' + data.teacher_id);
228
+ openWH = miniPage.getOpenWidthHeight();
229
+ index = layer.open({
230
+ title: data.teacher_name + '/跟进记录',
231
+ type: 1,
232
+ shade: 0.2,
233
+ maxmin: true,
234
+ shadeClose: true,
235
+ area: [openWH[0] + 'px', openWH[1] + 'px'],
236
+ offset: [openWH[2] + 'px', openWH[3] + 'px'],
237
+ content: content,
238
+ success: function (layero, index) {
239
+ // 重新渲染弹层中的下拉选择框select
240
+ // form.render('select');
241
+ }
242
+ });
243
+ $(window).on("resize", function () {
244
+ layer.full(index);
245
+ });
246
+ }
247
+ });
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
153
258
  })
154
259
  </script>
260
+
155
261
  <style>
156
262
  .layui-form-item {
157
263
  margin-bottom: 0px;
@@ -16,7 +16,6 @@
16
16
  <label class="layui-form-label required">教师</label>
17
17
  <div class="layui-input-inline">
18
18
 
19
- <%#= select_tag "teacher_id", options_for_select(@teachers, @teacher&.id), {"lay-verify": "required", include_blank: true} %>
20
19
  <%= select_tag "teacher_id", options_for_select(@teachers), {"lay-verify": "required", include_blank: true} %>
21
20
  </div>
22
21
  </div>
@@ -76,8 +75,10 @@
76
75
  if (res.success == false) {
77
76
  layer.alert(res.msg)
78
77
  } else {
79
- layer.closeAll()
80
- table.reload('weekPlanTable1')
78
+ layer.close(parent.add_new_weeklyIndex)
79
+ layer.close(parent.new_weelPlan_index)
80
+ table.reload("weekPlanTable1")
81
+ table.reload("newWeeklyTable")
81
82
  }
82
83
  })
83
84
  return false;