educode_sales 0.1.5 → 0.2.1

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 (98) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/educode_sales/indexlogo.png +0 -0
  3. data/app/assets/stylesheets/educode_sales/app.css +24 -0
  4. data/app/assets/stylesheets/educode_sales/public.css +4 -0
  5. data/app/controllers/educode_sales/businesses_controller.rb +12 -1
  6. data/app/controllers/educode_sales/follow_ups_controller.rb +14 -1
  7. data/app/controllers/educode_sales/home_controller.rb +7 -7
  8. data/app/controllers/educode_sales/operation_plans_controller.rb +2 -2
  9. data/app/controllers/educode_sales/operation_reports_controller.rb +3 -3
  10. data/app/controllers/educode_sales/plans_controller.rb +2 -2
  11. data/app/controllers/educode_sales/staffs_controller.rb +3 -2
  12. data/app/controllers/educode_sales/teacher_follows_controller.rb +1 -0
  13. data/app/controllers/educode_sales/teachers_controller.rb +1 -0
  14. data/app/models/educode_sales/activity.rb +1 -1
  15. data/app/models/educode_sales/common.rb +4 -0
  16. data/app/models/educode_sales/follow_up.rb +1 -1
  17. data/app/models/educode_sales/staff.rb +3 -3
  18. data/app/models/educode_sales/teacher.rb +14 -4
  19. data/app/views/educode_sales/activities/index.html.erb +32 -18
  20. data/app/views/educode_sales/activities/show_teachers.html.erb +14 -12
  21. data/app/views/educode_sales/businesses/edit_follow_record.html.erb +1 -0
  22. data/app/views/educode_sales/businesses/edit_plan.html.erb +7 -2
  23. data/app/views/educode_sales/businesses/index.html.erb +18 -10
  24. data/app/views/educode_sales/businesses/index.json.jbuilder +3 -1
  25. data/app/views/educode_sales/businesses/new.html.erb +1 -1
  26. data/app/views/educode_sales/businesses/new_follow_record.html.erb +12 -2
  27. data/app/views/educode_sales/businesses/show_follow.html.erb +24 -19
  28. data/app/views/educode_sales/businesses/show_follow.json.jbuilder +1 -0
  29. data/app/views/educode_sales/businesses/show_keys.html.erb +1 -1
  30. data/app/views/educode_sales/commons/edit.html.erb +1 -1
  31. data/app/views/educode_sales/commons/index.html.erb +2 -3
  32. data/app/views/educode_sales/home/index.html.erb +1 -1
  33. data/app/views/educode_sales/home/search_teacher.json.jbuilder +2 -2
  34. data/app/views/educode_sales/home/statistics.html.erb +1 -0
  35. data/app/views/educode_sales/operation_plans/_monthPlan.html.erb +2 -3
  36. data/app/views/educode_sales/operation_plans/_monthly.html.erb +2 -2
  37. data/app/views/educode_sales/operation_plans/_weekPlan.html.erb +2 -3
  38. data/app/views/educode_sales/operation_plans/_weekly.html.erb +2 -1
  39. data/app/views/educode_sales/operation_plans/edit_month.html.erb +4 -3
  40. data/app/views/educode_sales/operation_plans/edit_monthly.html.erb +3 -3
  41. data/app/views/educode_sales/operation_plans/edit_week.html.erb +4 -3
  42. data/app/views/educode_sales/operation_plans/edit_weekly.html.erb +3 -3
  43. data/app/views/educode_sales/operation_plans/new_month.html.erb +5 -4
  44. data/app/views/educode_sales/operation_plans/new_monthly.html.erb +3 -3
  45. data/app/views/educode_sales/operation_plans/new_week.html.erb +5 -4
  46. data/app/views/educode_sales/operation_plans/new_weekly.html.erb +3 -3
  47. data/app/views/educode_sales/operation_plans/show_monthly.html.erb +3 -3
  48. data/app/views/educode_sales/operation_plans/show_weekly.html.erb +3 -3
  49. data/app/views/educode_sales/operation_reports/audit.html.erb +3 -3
  50. data/app/views/educode_sales/operation_reports/edit.html.erb +4 -4
  51. data/app/views/educode_sales/operation_reports/show.html.erb +140 -28
  52. data/app/views/educode_sales/places/index.html.erb +6 -6
  53. data/app/views/educode_sales/plans/_monthPlan.html.erb +11 -7
  54. data/app/views/educode_sales/plans/_monthly.html.erb +2 -1
  55. data/app/views/educode_sales/plans/_weekPlan.html.erb +2 -1
  56. data/app/views/educode_sales/plans/_weekly.html.erb +2 -1
  57. data/app/views/educode_sales/plans/audit_weekly.html.erb +3 -3
  58. data/app/views/educode_sales/plans/edit_monthly.html.erb +3 -3
  59. data/app/views/educode_sales/plans/edit_week.html.erb +1 -1
  60. data/app/views/educode_sales/plans/edit_weekly.html.erb +1 -1
  61. data/app/views/educode_sales/plans/new_monthly.html.erb +1 -1
  62. data/app/views/educode_sales/plans/new_week.html.erb +3 -1
  63. data/app/views/educode_sales/plans/new_weekly.html.erb +2 -1
  64. data/app/views/educode_sales/plans/show_monthly.html.erb +3 -3
  65. data/app/views/educode_sales/plans/show_weekly.html.erb +1 -1
  66. data/app/views/educode_sales/roles/index.html.erb +2 -1
  67. data/app/views/educode_sales/sale_reports/audit.html.erb +2 -2
  68. data/app/views/educode_sales/sale_reports/edit.html.erb +4 -4
  69. data/app/views/educode_sales/sale_reports/show.html.erb +2 -2
  70. data/app/views/educode_sales/sale_trends/operations.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.html.erb +12 -7
  73. data/app/views/educode_sales/sales/index.json.jbuilder +1 -1
  74. data/app/views/educode_sales/sales/operations.html.erb +7 -5
  75. data/app/views/educode_sales/sales/operations.json.jbuilder +3 -2
  76. data/app/views/educode_sales/sales/school.html.erb +1 -2
  77. data/app/views/educode_sales/sales/xschool.html.erb +1 -2
  78. data/app/views/educode_sales/staffs/follow_up_departments.json.jbuilder +1 -2
  79. data/app/views/educode_sales/staffs/follow_up_schools.json.jbuilder +1 -2
  80. data/app/views/educode_sales/staffs/index.html.erb +6 -8
  81. data/app/views/educode_sales/staffs/new.html.erb +1 -1
  82. data/app/views/educode_sales/teachers/add_courses.html.erb +3 -3
  83. data/app/views/educode_sales/teachers/add_event.html.erb +1 -1
  84. data/app/views/educode_sales/teachers/add_keys.html.erb +11 -5
  85. data/app/views/educode_sales/teachers/course_list.json.jbuilder +1 -0
  86. data/app/views/educode_sales/teachers/course_subject.json.jbuilder +1 -1
  87. data/app/views/educode_sales/teachers/index.html.erb +11 -9
  88. data/app/views/educode_sales/teachers/index.json.jbuilder +3 -2
  89. data/app/views/educode_sales/teachers/new.html.erb +3 -5
  90. data/app/views/educode_sales/teachers/new_follow_record.html.erb +1 -0
  91. data/app/views/educode_sales/teachers/search_new.html.erb +2 -2
  92. data/app/views/educode_sales/teachers/show_class.html.erb +7 -1
  93. data/app/views/educode_sales/teachers/show_follow.html.erb +11 -9
  94. data/app/views/educode_sales/teachers/show_follow.json.jbuilder +1 -0
  95. data/app/views/layouts/educode_sales/application.html.erb +6 -9
  96. data/config/routes.rb +1 -0
  97. data/lib/educode_sales/version.rb +1 -1
  98. metadata +3 -2
@@ -115,7 +115,7 @@
115
115
  {
116
116
  field: 'id',
117
117
  width: 60,
118
- title: '序号',
118
+ title:'序号',type: 'numbers',
119
119
  },
120
120
  {
121
121
  field: 'name',
@@ -138,15 +138,15 @@
138
138
  width: 60,
139
139
  templet: '#show_follow'
140
140
  },
141
- {
142
- field: 'teachers_count',
143
- width: 100,
144
- title: '关键人',
145
- templet: '#show_keys'
146
- },
141
+ // {
142
+ // field: 'teachers_count',
143
+ // width: 100,
144
+ // title: '关键人',
145
+ // templet: '#show_keys'
146
+ // },
147
147
  {
148
148
  field: 'clazz',
149
- width: 80,
149
+ width: 60,
150
150
  title: '类型'
151
151
  },
152
152
  {
@@ -156,13 +156,13 @@
156
156
  },
157
157
  {
158
158
  field: 'invitation_at',
159
- width: 120,
159
+ width: 105,
160
160
  title: '招标时间',
161
161
  sort: true
162
162
  },
163
163
  {
164
164
  field: 'reception_at',
165
- width: 120,
165
+ width: 105,
166
166
  title: '验收时间',
167
167
  sort: true
168
168
  },
@@ -183,6 +183,11 @@
183
183
  width: 110,
184
184
  title: '渠道'
185
185
  },
186
+ {
187
+ field: 'last_follow_person',
188
+ width: 120,
189
+ title: '跟进人'
190
+ },
186
191
  {
187
192
  title: '操作',
188
193
  minWidth: 300,
@@ -192,6 +197,7 @@
192
197
  }
193
198
  ]
194
199
  ],
200
+ limit: 20,
195
201
  page: true,
196
202
  skin: 'line'
197
203
  });
@@ -317,6 +323,7 @@
317
323
  });
318
324
 
319
325
  } else if (obj.event === 'show_keys') {
326
+ business_id = obj.data.id
320
327
  follow_up_id = obj.data.follow_up_id;
321
328
  content = miniPage.getHrefContent('/educode_sales/businesses/show_keys');
322
329
  openWH = miniPage.getOpenWidthHeight();
@@ -338,6 +345,7 @@
338
345
  layer.full(index);
339
346
  });
340
347
  } else if (obj.event === 'show_follow') {
348
+ business_id = obj.data.id
341
349
  content = miniPage.getHrefContent('/educode_sales/businesses/show_follow?id=' + id);
342
350
  openWH = miniPage.getOpenWidthHeight();
343
351
  index = layer.open({
@@ -6,7 +6,8 @@ json.data do
6
6
  json.school d.department.school.name
7
7
  json.follow_ups_count d.follow_ups_count
8
8
  json.follow_up_id d.last_follow_up_id
9
- json.teachers_count d.follow_ups.sum(:key_people_count)
9
+ # json.teachers_count d.follow_ups.sum(:key_people_count)
10
+ # json.teachers_count EducodeSales::FollowUp.order(created_at: :desc).find_by(business_id: d.id).present? ? EducodeSales::FollowUp.order(created_at: :desc).find_by(business_id: d.id).key_people_count : 0
10
11
  json.clazz d.last_follow_up&.clazz&.name
11
12
  json.stage d.last_follow_up&.stage&.name
12
13
  json.invitation_at d.last_follow_up&.invitation_at.to_s
@@ -14,6 +15,7 @@ json.data do
14
15
  json.total_amount d.last_follow_up&.total_amount
15
16
  json.return_money d.return_money
16
17
  json.place d.last_follow_up&.place&.name
18
+ json.last_follow_person d.last_follow_up_id.present? ? EducodeSales::Staff.find(EducodeSales::Business.find_by(last_follow_up_id: d.last_follow_up_id).staff_id).user.real_name : ''
17
19
  end
18
20
  end
19
21
  json.code 0
@@ -1,7 +1,7 @@
1
1
  <div class="layui-form layuimini-form">
2
2
  <div class="layui-form-item" style="padding: 25px">
3
3
  <div class="layui-inline">
4
- <label class="layui-form-label required">名称</label>
4
+ <label class="layui-form-label required">商机名称</label>
5
5
  <div class="layui-input-block">
6
6
  <input type="text" name="name" autocomplete="off" lay-verify="required" class="layui-input" style="width: 300px;">
7
7
  </div>
@@ -124,8 +124,18 @@
124
124
  form.render();
125
125
 
126
126
  form.on('submit(add_follow_up)', function (data) {
127
- data.field.business_id = "<%= @business.id %>";
128
- request.authPost("educode_sales/follow_ups", data.field, function (res) {
127
+ console.log(data);
128
+ data.field.business_id = "<%= @business.id %>";
129
+ console.log(data.field.business_id);
130
+ request.authPut("educode_sales/businesses/" + data.field.business_id +"/updateMoney/", {
131
+ return_money: 0
132
+ }, function (res) {
133
+ if (res.success == false) {
134
+ layer.alert(res.msg)
135
+ } else {
136
+ }
137
+ })
138
+ request.authPost("educode_sales/follow_ups", data.field, function (res) {
129
139
  if (res.success == false) {
130
140
  layer.alert(res.msg)
131
141
  } else {
@@ -7,19 +7,21 @@
7
7
  </div>
8
8
  </script>
9
9
  <div class="edit-table">
10
- <table class="layui-hide" id="sale_plan_follow_table" lay-filter="sale_plan_follow_table" style="min-height: 300px;"></table>
10
+ <table class="layui-hide" id="sale_plan_follow_table" lay-filter="sale_plan_follow_table"></table>
11
11
  <table class="layui-hide" id="unfinish_table" lay-filter="unfinish_table" style="min-height: 300px;"></table>
12
12
  </div>
13
13
  <script type="text/html" id="currentTableBar_follow">
14
14
  <% if can? :follow, EducodeSales::Business %>
15
15
  <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="show">查看</a>
16
16
  <% end %>
17
+ {{# if(d.is_latest){ }}
17
18
  <% if can? :update_follow, EducodeSales::Business %>
18
19
  <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
19
20
  <% end %>
20
21
  <% if can? :destroy_follow, EducodeSales::Business %>
21
22
  <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
22
23
  <% end %>
24
+ {{# } }}
23
25
  </script>
24
26
 
25
27
  <!--关键人-->
@@ -34,7 +36,7 @@
34
36
  <!--未完成计划列表-->
35
37
  <script type="text/html" id="unfinish_table_tabar">
36
38
  <div class="layui-btn-container">
37
- <span class="table-label">未完成计划列表</span>
39
+ <span class="table-label">跟进计划列表</span>
38
40
  </div>
39
41
  </script>
40
42
 
@@ -68,7 +70,7 @@
68
70
  {
69
71
  field: 'id',
70
72
  width: 80,
71
- title: '序号'
73
+ title:'序号',type: 'numbers',
72
74
  },
73
75
  {
74
76
  field: 'created_at',
@@ -78,12 +80,12 @@
78
80
  },
79
81
  {
80
82
  field: 'clazz',
81
- width: 80,
83
+ width: 60,
82
84
  title: '类型',
83
85
  },
84
86
  {
85
87
  field: 'stage',
86
- width: 120,
88
+ width: 100,
87
89
  title: '阶段',
88
90
  },
89
91
  {
@@ -94,12 +96,12 @@
94
96
  },
95
97
  {
96
98
  field: 'invitation_at',
97
- width: 120,
99
+ width: 110,
98
100
  title: '招标时间',
99
101
  },
100
102
  {
101
103
  field: 'reception_at',
102
- width: 120,
104
+ width: 110,
103
105
  title: '验收时间',
104
106
  },
105
107
  {
@@ -147,8 +149,8 @@
147
149
  }
148
150
  ]
149
151
  ],
150
- limits: [10, 15, 20, 25, 50, 100],
151
- limit: 15,
152
+ height: 400,
153
+ limit: 20,
152
154
  page: true,
153
155
  skin: 'line'
154
156
  });
@@ -165,7 +167,9 @@
165
167
 
166
168
  table.on('toolbar(sale_plan_follow_table)', function (obj) {
167
169
  if (obj.event === 'add') { // 监听添加操作
168
- var content = miniPage.getHrefContent('/educode_sales/businesses/new_follow_record?id=' + parent.id);
170
+ console.log(parent.business_id);
171
+ business_id = parent.business_id
172
+ var content = miniPage.getHrefContent('/educode_sales/businesses/new_follow_record?id=' + parent.id);
169
173
  var openWH = miniPage.getOpenWidthHeight();
170
174
  sale_plan_index = layer.open({
171
175
  title: '添加',
@@ -190,10 +194,13 @@
190
194
  var data = obj.data;
191
195
  follow_up_id = obj.data.id;
192
196
  if (obj.event === 'delete') {
193
- layer.confirm('确定删除序号为' + data.id + "的跟进记录", function (index) {
197
+ console.log(data);
198
+ layer.confirm('确定删除ID为' + data.id + "的跟进记录", function (index) {
194
199
  request.authDelete("educode_sales/follow_ups/" + data.id, {}, function() {
195
200
  obj.del();
196
201
  layer.close(index);
202
+ table.reload("businesses_table");
203
+ table.reload("sale_plan_follow_table");
197
204
  })
198
205
  });
199
206
  } else if (obj.event === 'show') { // 监听添加操作
@@ -234,6 +241,7 @@
234
241
  } else if (obj.event === 'add_keys') { // 监听添加操作
235
242
  content = miniPage.getHrefContent('/educode_sales/teachers/add_keys?follow_up_id=' + obj.data.id);
236
243
  openWH = miniPage.getOpenWidthHeight();
244
+ is_latest = obj.data.is_latest
237
245
  keyindex = layer.open({
238
246
  title: '关键人',
239
247
  type: 1,
@@ -254,6 +262,7 @@
254
262
  } else if (obj.event === 'edit_plan') {
255
263
  content = miniPage.getHrefContent('/educode_sales/businesses/edit_plan');
256
264
  openWH = miniPage.getOpenWidthHeight();
265
+ is_latest = obj.data.is_latest
257
266
  plan_index = layer.open({
258
267
  title: '回款计划',
259
268
  type: 1,
@@ -285,7 +294,7 @@
285
294
  {
286
295
  field: 'id',
287
296
  width: 80,
288
- title: '序号'
297
+ title:'序号',type: 'numbers',
289
298
  },
290
299
  {
291
300
  field: 'staff',
@@ -325,8 +334,8 @@
325
334
  }
326
335
  ]
327
336
  ],
328
- limits: [10, 15, 20, 25, 50, 100],
329
- limit: 15,
337
+
338
+
330
339
  page: true,
331
340
  skin: 'line'
332
341
  });
@@ -394,10 +403,6 @@
394
403
  $(window).on("resize", function () {
395
404
  layer.full(index);
396
405
  });
397
- } else if (obj.event === 'delete') { // 监听删除操作
398
- var checkStatus = table.checkStatus('currentTableId'),
399
- data = checkStatus.data;
400
- layer.alert(JSON.stringify(data));
401
406
  }
402
407
  });
403
408
 
@@ -405,7 +410,7 @@
405
410
  var data = obj.data;
406
411
  plan_id = data.id;
407
412
  if (obj.event === 'delete') {
408
- layer.confirm('确定删除序号为' + data.id + "的计划", function (index) {
413
+ layer.confirm('确定删除ID为' + data.id + "的计划", function (index) {
409
414
  request.authDelete("educode_sales/plans/" + data.id, {}, function() {
410
415
  obj.del();
411
416
  layer.close(index);
@@ -14,6 +14,7 @@ json.data do
14
14
  json.place d.place&.name
15
15
  json.money_plans_count d.money_plans_count
16
16
  json.money d.money_plans.where(clazz: 1).sum(:amount)
17
+ json.is_latest d.id == @latest&.id
17
18
  end
18
19
  end
19
20
 
@@ -11,7 +11,7 @@
11
11
  {
12
12
  field: 'id',
13
13
  width: 80,
14
- title: '序号'
14
+ title:'序号',type: 'numbers',
15
15
  },
16
16
  {
17
17
  field: 'name',
@@ -73,7 +73,7 @@
73
73
  [{
74
74
  field: 'id',
75
75
  width: 80,
76
- title: 'ID',
76
+ title:'序号',type: 'numbers',
77
77
  sort: true
78
78
  }, {
79
79
  field: 'name',
@@ -29,7 +29,7 @@
29
29
  {
30
30
  field: 'i',
31
31
  width: 80,
32
- title: 'ID',
32
+ title:'序号',type: 'numbers',
33
33
  sort: true
34
34
  },
35
35
  {
@@ -49,8 +49,7 @@
49
49
  }
50
50
  ]
51
51
  ],
52
- limits: [10, 15, 20, 25, 50, 100],
53
- limit: 15,
52
+ limit: 20,
54
53
  page: true,
55
54
  skin: 'line'
56
55
  });
@@ -1 +1 @@
1
- <h4>欢迎使用头歌营销支撑系统</h4>
1
+ <div style="text-align:center;"><%= image_tag "educode_sales/indexlogo.png", width: "900" %></div>
@@ -3,9 +3,9 @@ json.data do
3
3
  if d.is_a? EducodeSales::Teacher
4
4
  json.value "t-#{d.id}"
5
5
  if d.department.present?
6
- json.name "#{d.name}--(#{d.department&.school&.name}--#{d.department&.name}) (来源教师列表)"
6
+ json.name "#{d.name}--(#{d.department&.school&.name}--#{d.department&.name}) (来源运营教师列表)"
7
7
  else
8
- json.name "#{d.name}--(来源教师列表)"
8
+ json.name "#{d.name}--(来源运营教师列表)"
9
9
  end
10
10
  json.extras [d.professional_title, d.job]
11
11
 
@@ -65,4 +65,5 @@
65
65
  </div>
66
66
  </div>
67
67
  </div>
68
+ </div>
68
69
  </div>
@@ -83,7 +83,7 @@
83
83
  {
84
84
  field: 'id',
85
85
  width: 80,
86
- title: '序号'
86
+ title:'序号',type: 'numbers',
87
87
  },
88
88
  {
89
89
  field: 'staff',
@@ -136,8 +136,7 @@
136
136
  }
137
137
  ]
138
138
  ],
139
- limits: [10, 15, 20, 25, 50, 100],
140
- limit: 15,
139
+ limit: 20,
141
140
  page: true,
142
141
  skin: 'line'
143
142
  });
@@ -84,7 +84,7 @@
84
84
  {
85
85
  field: 'id',
86
86
  width: 80,
87
- title: '序号'
87
+ title:'序号',type: 'numbers',
88
88
  },
89
89
  {
90
90
  field: 'staff',
@@ -164,6 +164,7 @@
164
164
  });
165
165
  })
166
166
  },
167
+ limit: 20,
167
168
  page: true
168
169
  });
169
170
 
@@ -258,7 +259,6 @@
258
259
  });
259
260
  return false;
260
261
  }else if (obj.event === 'show') {
261
-
262
262
  content = miniPage.getHrefContent('/educode_sales/operation_reports/' + data.id);
263
263
  openWH = miniPage.getOpenWidthHeight();
264
264
  index = layer.open({
@@ -84,7 +84,7 @@
84
84
  {
85
85
  field: 'id',
86
86
  width: 80,
87
- title: '序号'
87
+ title:'序号',type: 'numbers',
88
88
  },
89
89
  {
90
90
  field: 'staff',
@@ -147,8 +147,7 @@
147
147
  }
148
148
  ]
149
149
  ],
150
- limits: [10, 15, 20, 25, 50, 100],
151
- limit: 15,
150
+ limit: 20,
152
151
  page: true,
153
152
  skin: 'line'
154
153
  });
@@ -85,7 +85,7 @@
85
85
  {
86
86
  field: 'id',
87
87
  width: 80,
88
- title: '序号'
88
+ title:'序号',type: 'numbers',
89
89
  },
90
90
  {
91
91
  field: 'staff',
@@ -165,6 +165,7 @@
165
165
  });
166
166
  })
167
167
  },
168
+ limit: 20,
168
169
  page: true,
169
170
  });
170
171
 
@@ -31,9 +31,10 @@
31
31
  <%= select_tag "finish_rate", options_for_select(@finish_rates, @sale_plan.finish_rate) %>
32
32
  </div>
33
33
  </div>
34
- <div class="layui-inline">
35
- <button type="submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="update_sale_plan">提交
36
- </button>
34
+ <div class="layui-form-item m-t-20">
35
+ <div class="layui-input-block">
36
+ <button type="submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="update_sale_plan">提交</button>
37
+ </div>
37
38
  </div>
38
39
  </div>
39
40
  </form>
@@ -93,7 +93,7 @@
93
93
  {
94
94
  field: 'id',
95
95
  width: 80,
96
- title: '序号'
96
+ title:'序号',type: 'numbers',
97
97
  },
98
98
  {
99
99
  field: 'username',
@@ -161,8 +161,8 @@
161
161
  "rate": "100%",
162
162
  "updateTime": "2021-07-27",
163
163
  }],
164
- limits: [10, 15, 20, 25, 50, 100],
165
- limit: 15,
164
+
165
+
166
166
  page: true,
167
167
  skin: 'line'
168
168
  });
@@ -39,9 +39,10 @@
39
39
  <%= select_tag "finish_rate", options_for_select(@finish_rates, @sale_plan.finish_rate) %>
40
40
  </div>
41
41
  </div>
42
- <div class="layui-inline">
43
- <button type="submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="update_sale_plan">提交
44
- </button>
42
+ <div class="layui-form-item m-t-20">
43
+ <div class="layui-input-block">
44
+ <button type="submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="update_sale_plan">提交</button>
45
+ </div>
45
46
  </div>
46
47
  </div>
47
48
  </form>
@@ -91,7 +91,7 @@
91
91
  {
92
92
  field: 'id',
93
93
  width: 80,
94
- title: '序号'
94
+ title:'序号',type: 'numbers',
95
95
  },
96
96
  {
97
97
  field: 'username',
@@ -159,8 +159,8 @@
159
159
  "rate": "100%",
160
160
  "updateTime": "2021-07-27",
161
161
  }],
162
- limits: [10, 15, 20, 25, 50, 100],
163
- limit: 15,
162
+
163
+
164
164
  page: true,
165
165
  skin: 'line'
166
166
  });
@@ -9,7 +9,7 @@
9
9
  <div class="layui-inline">
10
10
  <label class="layui-form-label required">教师</label>
11
11
  <div class="layui-input-inline">
12
- <%= select_tag "teacher_id", options_for_select(@teachers), {"lay-verify": "required", include_blank: true} %>
12
+ <%= select_tag "teacher_id", options_for_select(@teachers, @teacher&.id), {"lay-verify": "required", include_blank: true} %>
13
13
  </div>
14
14
  </div>
15
15
  <div class="layui-form-item layui-form-text">
@@ -39,9 +39,10 @@
39
39
  </select>
40
40
  </div>
41
41
  </div>
42
- <div class="layui-inline">
43
- <button type="submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="add_month_plan">提交
44
- </button>
42
+ <div class="layui-form-item m-t-20">
43
+ <div class="layui-input-block">
44
+ <button type="submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="add_month_plan">提交</button>
45
+ </div>
45
46
  </div>
46
47
  </div>
47
48
  </div>
@@ -82,7 +82,7 @@
82
82
  {
83
83
  field: 'id',
84
84
  width: 80,
85
- title: '序号'
85
+ title:'序号',type: 'numbers',
86
86
  },
87
87
  {
88
88
  field: 'staff',
@@ -134,8 +134,8 @@
134
134
  }
135
135
  ]
136
136
  ],
137
- limits: [10, 15, 20, 25, 50, 100],
138
- limit: 15,
137
+
138
+
139
139
  page: true,
140
140
  skin: 'line'
141
141
  });
@@ -16,7 +16,7 @@
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), {"lay-verify": "required", include_blank: true} %>
19
+ <%= select_tag "teacher_id", options_for_select(@teachers, @teacher&.id), {"lay-verify": "required", include_blank: true} %>
20
20
  </div>
21
21
  </div>
22
22
  <div class="layui-form-item layui-form-text">
@@ -46,9 +46,10 @@
46
46
  </select>
47
47
  </div>
48
48
  </div>
49
- <div class="layui-inline">
50
- <button type="submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="add_week_plan">提交
51
- </button>
49
+ <div class="layui-form-item m-t-20">
50
+ <div class="layui-input-block">
51
+ <button type="submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="add_week_plan">提交</button>
52
+ </div>
52
53
  </div>
53
54
  </div>
54
55
  </div>
@@ -78,7 +78,7 @@
78
78
  {
79
79
  field: 'id',
80
80
  width: 80,
81
- title: '序号'
81
+ title:'序号',type: 'numbers',
82
82
  },
83
83
  {
84
84
  field: 'staff',
@@ -135,8 +135,8 @@
135
135
  }
136
136
  ]
137
137
  ],
138
- limits: [10, 15, 20, 25, 50, 100],
139
- limit: 15,
138
+
139
+
140
140
  page: true,
141
141
  skin: 'line'
142
142
  });
@@ -89,7 +89,7 @@
89
89
  {
90
90
  field: 'id',
91
91
  width: 80,
92
- title: '序号'
92
+ title:'序号',type: 'numbers',
93
93
  },
94
94
  {
95
95
  field: 'username',
@@ -157,8 +157,8 @@
157
157
  "rate": "100%",
158
158
  "updateTime": "2021-07-27",
159
159
  }],
160
- limits: [10, 15, 20, 25, 50, 100],
161
- limit: 15,
160
+
161
+
162
162
  page: true,
163
163
  skin: 'line'
164
164
  });
@@ -88,7 +88,7 @@
88
88
  {
89
89
  field: 'id',
90
90
  width: 80,
91
- title: '序号'
91
+ title:'序号',type: 'numbers',
92
92
  },
93
93
  {
94
94
  field: 'username',
@@ -156,8 +156,8 @@
156
156
  "rate": "100%",
157
157
  "updateTime": "2021-07-27",
158
158
  }],
159
- limits: [10, 15, 20, 25, 50, 100],
160
- limit: 15,
159
+
160
+
161
161
  page: true,
162
162
  skin: 'line'
163
163
  });