educode_sales 1.10.23 → 1.10.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/educode_sales/businesses_controller.rb +13 -0
  3. data/app/controllers/educode_sales/contracts_controller.rb +55 -0
  4. data/app/controllers/educode_sales/follow_ups_controller.rb +34 -0
  5. data/app/controllers/educode_sales/idea_follows_controller.rb +146 -0
  6. data/app/controllers/educode_sales/ideas_controller.rb +37 -0
  7. data/app/controllers/educode_sales/money_plan_records_controller.rb +14 -10
  8. data/app/controllers/educode_sales/money_plans_controller.rb +5 -3
  9. data/app/controllers/educode_sales/plans_controller.rb +28 -5
  10. data/app/helpers/educode_sales/sale_trends_helper.rb +11 -1
  11. data/app/models/educode_sales/common.rb +3 -1
  12. data/app/models/educode_sales/money_plan_claim.rb +1 -1
  13. data/app/models/educode_sales/permission.rb +2 -1
  14. data/app/models/educode_sales/sale_plan.rb +2 -0
  15. data/app/views/educode_sales/businesses/index.html.erb +123 -80
  16. data/app/views/educode_sales/ideas/_follows.html.erb +3 -2
  17. data/app/views/educode_sales/ideas/_index.html.erb +37 -7
  18. data/app/views/educode_sales/ideas/edit_follow_record.html.erb +67 -49
  19. data/app/views/educode_sales/ideas/follow_list.html.erb +252 -0
  20. data/app/views/educode_sales/ideas/follow_list.json.jbuilder +16 -0
  21. data/app/views/educode_sales/ideas/follow_ups.json.jbuilder +2 -1
  22. data/app/views/educode_sales/ideas/index.json.jbuilder +1 -0
  23. data/app/views/educode_sales/ideas/new_follow_up.html.erb +2 -0
  24. data/app/views/educode_sales/ideas/show_follow.html.erb +72 -491
  25. data/app/views/educode_sales/money_plans/index.json.jbuilder +4 -4
  26. data/app/views/educode_sales/plans/_monthPlan.html.erb +5 -0
  27. data/app/views/educode_sales/plans/_weekPlan.html.erb +5 -0
  28. data/app/views/educode_sales/plans/_yearPlan.html.erb +4 -4
  29. data/app/views/educode_sales/plans/edit_month.html.erb +6 -0
  30. data/app/views/educode_sales/plans/edit_week.html.erb +6 -0
  31. data/app/views/educode_sales/plans/index.json.jbuilder +1 -0
  32. data/app/views/educode_sales/plans/new_month.html.erb +14 -0
  33. data/app/views/educode_sales/plans/new_week.html.erb +14 -0
  34. data/config/routes.rb +4 -0
  35. data/db/migrate/20230629130033_add_clazz_to_money_plans.rb +6 -0
  36. data/lib/educode_sales/version.rb +1 -1
  37. metadata +6 -2
@@ -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>
@@ -34,8 +34,8 @@ json.data do
34
34
  end
35
35
  json.claim_num d['claim_num']
36
36
 
37
- json.return_money d['return_money'] || 0
38
- json.residue_money (d.amount - d['return_money'].to_f) > 0 ? d.amount - d['return_money'].to_f : 0
37
+ json.return_money (d['return_money'] || 0).round(6)
38
+ json.residue_money ((d.amount - d['return_money'].to_f) > 0 ? d.amount - d['return_money'].to_f : 0).round(6)
39
39
  if d['claim_num'] > 0
40
40
  json.accounts_state ''
41
41
  else
@@ -53,10 +53,10 @@ json.data do
53
53
  when '已开票'
54
54
  json.accounts_state '开票应收款'
55
55
  end
56
-
56
+
57
57
  end
58
58
  json.created_at d.created_at.to_s
59
-
59
+
60
60
  end
61
61
  end
62
62
 
@@ -115,6 +115,11 @@
115
115
  width: 100,
116
116
  title: '月份',
117
117
  },
118
+ {
119
+ field: 'assign',
120
+ width: 100,
121
+ title: '指定者',
122
+ },
118
123
  {
119
124
  field: 'content',
120
125
  width: 300,
@@ -120,6 +120,11 @@
120
120
  width: 60,
121
121
  title: '周次',
122
122
  },
123
+ {
124
+ field: 'assign',
125
+ width: 100,
126
+ title: '指定者',
127
+ },
123
128
  {
124
129
  field: 'content',
125
130
  width: 300,
@@ -23,9 +23,9 @@
23
23
  </div>
24
24
  </div>
25
25
  <div class="layui-inline">
26
- <button type="reseet" class="layui-btn layui-btn-primary" lay-submit lay-filter="month_plan_reset_btn">重置
26
+ <button type="reseet" class="layui-btn layui-btn-primary" lay-submit lay-filter="year_plan_reset_btn">重置
27
27
  </button>
28
- <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="month_plan_seach_btn">检索
28
+ <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="year_plan_seach_btn">检索
29
29
  </button>
30
30
  </div>
31
31
  </div>
@@ -149,7 +149,7 @@
149
149
  })
150
150
 
151
151
  // 监听搜索操作
152
- form.on('submit(month_plan_seach_btn)', function (data) {
152
+ form.on('submit(year_plan_seach_btn)', function (data) {
153
153
  search = data.field
154
154
  table.reload('yearPlanTable', {
155
155
  page: {
@@ -161,7 +161,7 @@
161
161
  return false;
162
162
  });
163
163
 
164
- form.on('submit(month_plan_reset_btn)', function(data){
164
+ form.on('submit(year_plan_reset_btn)', function(data){
165
165
  var field = data.field;
166
166
  form.val('month_plan_search_form', { staff_id: '', year: '', month: '', year: ''})
167
167
  return false;
@@ -6,6 +6,12 @@
6
6
  <input type="text" class="layui-input" id="edit_month_plan_month" autocomplete="off" name="month">
7
7
  </div>
8
8
  </div>
9
+ <div class="layui-inline">
10
+ <label class="layui-form-label required">计划类型</label>
11
+ <div class="layui-input-inline">
12
+ <%= select_tag "common_id", options_for_select(@commons, @sale_plan.common_id), class: 'required' %>
13
+ </div>
14
+ </div>
9
15
  <div class="layui-inline">
10
16
  <label class="layui-form-label required">商机</label>
11
17
  <div class="layui-input-inline" style="width: 500px">