educode_sales 0.8.2 → 0.8.5

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 (29) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/educode_sales/table2excel.js +2759 -0
  3. data/app/controllers/educode_sales/assessments_controller.rb +23 -9
  4. data/app/controllers/educode_sales/businesses_controller.rb +8 -0
  5. data/app/controllers/educode_sales/follow_ups_controller.rb +1 -1
  6. data/app/controllers/educode_sales/money_plans_controller.rb +0 -2
  7. data/app/helpers/educode_sales/application_helper.rb +1 -1
  8. data/app/models/educode_sales/filter.rb +0 -3
  9. data/app/models/educode_sales/follow_up.rb +8 -0
  10. data/app/models/educode_sales/staff.rb +1 -1
  11. data/app/views/educode_sales/assessments/_progress.html.erb +214 -146
  12. data/app/views/educode_sales/assessments/_setup.html.erb +247 -192
  13. data/app/views/educode_sales/assessments/edit.html.erb +53 -45
  14. data/app/views/educode_sales/assessments/index.html.erb +16 -4
  15. data/app/views/educode_sales/assessments/index.json.jbuilder +17 -17
  16. data/app/views/educode_sales/assessments/new.html.erb +113 -114
  17. data/app/views/educode_sales/assessments/progress.json.jbuilder +52 -52
  18. data/app/views/educode_sales/businesses/edit_follow_record.html.erb +13 -0
  19. data/app/views/educode_sales/businesses/index.html.erb +206 -187
  20. data/app/views/educode_sales/businesses/index.json.jbuilder +6 -0
  21. data/app/views/educode_sales/businesses/new_follow_record.html.erb +17 -3
  22. data/app/views/educode_sales/businesses/show_follow.html.erb +5 -0
  23. data/app/views/educode_sales/businesses/show_follow.json.jbuilder +7 -0
  24. data/app/views/educode_sales/businesses/show_follow_record.html.erb +15 -5
  25. data/db/migrate/20220512031715_add_column_o_business_deployment_to_follow_ups.rb +5 -0
  26. data/db/migrate/20220523023609_update_assessment_month_column_to_assessment_settings.rb +9 -0
  27. data/db/migrate/20220523101628_update_column_to_follow_ups.rb +8 -0
  28. data/lib/educode_sales/version.rb +1 -1
  29. metadata +6 -2
@@ -4,59 +4,59 @@ json.data do
4
4
  # 目标任务
5
5
  json.name assessment.staff.user.real_name
6
6
  json.id assessment.id
7
- json.annual assessment.annual.to_i
8
- json.first_quarter assessment.first_quarter.to_i
9
- json.january assessment.january.to_i
10
- json.february assessment.february.to_i
11
- json.march assessment.march.to_i
12
- json.second_quarter assessment.second_quarter.to_i
13
- json.april assessment.april.to_i
14
- json.may assessment.may.to_i
15
- json.june assessment.june.to_i
16
- json.third_quarter assessment.third_quarter.to_i
17
- json.july assessment.july.to_i
18
- json.august assessment.august.to_i
19
- json.september assessment.september.to_i
20
- json.fourth_quarter assessment.fourth_quarter.to_i
21
- json.october assessment.october.to_i
22
- json.november assessment.november.to_i
23
- json.december assessment.december.to_i
7
+ json.annual assessment.annual.to_f
8
+ json.first_quarter assessment.first_quarter.to_f
9
+ json.january assessment.january.to_f
10
+ json.february assessment.february.to_f
11
+ json.march assessment.march.to_f
12
+ json.second_quarter assessment.second_quarter.to_f
13
+ json.april assessment.april.to_f
14
+ json.may assessment.may.to_f
15
+ json.june assessment.june.to_f
16
+ json.third_quarter assessment.third_quarter.to_f
17
+ json.july assessment.july.to_f
18
+ json.august assessment.august.to_f
19
+ json.september assessment.september.to_f
20
+ json.fourth_quarter assessment.fourth_quarter.to_f
21
+ json.october assessment.october.to_f
22
+ json.november assessment.november.to_f
23
+ json.december assessment.december.to_f
24
24
  # 实际任务
25
- json.annual_progress assessment.annual_progress.to_i
26
- json.first_quarter_progress assessment.first_quarter_progress.to_i
27
- json.january_progress assessment.january_progress.to_i
28
- json.february_progress assessment.february_progress.to_i
29
- json.march_progress assessment.march_progress.to_i
30
- json.second_quarter_progress assessment.second_quarter_progress.to_i
31
- json.april_progress assessment.april_progress.to_i
32
- json.may_progress assessment.may_progress.to_i
33
- json.june_progress assessment.june_progress.to_i
34
- json.third_quarter_progress assessment.third_quarter_progress.to_i
35
- json.july_progress assessment.july_progress.to_i
36
- json.august_progress assessment.august_progress.to_i
37
- json.september_progress assessment.september_progress.to_i
38
- json.fourth_quarter_progress assessment.fourth_quarter_progress.to_i
39
- json.october_progress assessment.october_progress.to_i
40
- json.november_progress assessment.november_progress.to_i
41
- json.december_progress assessment.december_progress.to_i
25
+ json.annual_progress assessment.annual_progress.to_f
26
+ json.first_quarter_progress assessment.first_quarter_progress.to_f
27
+ json.january_progress assessment.january_progress.to_f
28
+ json.february_progress assessment.february_progress.to_f
29
+ json.march_progress assessment.march_progress.to_f
30
+ json.second_quarter_progress assessment.second_quarter_progress.to_f
31
+ json.april_progress assessment.april_progress.to_f
32
+ json.may_progress assessment.may_progress.to_f
33
+ json.june_progress assessment.june_progress.to_f
34
+ json.third_quarter_progress assessment.third_quarter_progress.to_f
35
+ json.july_progress assessment.july_progress.to_f
36
+ json.august_progress assessment.august_progress.to_f
37
+ json.september_progress assessment.september_progress.to_f
38
+ json.fourth_quarter_progress assessment.fourth_quarter_progress.to_f
39
+ json.october_progress assessment.october_progress.to_f
40
+ json.november_progress assessment.november_progress.to_f
41
+ json.december_progress assessment.december_progress.to_f
42
42
  # 差值 dif
43
- json.annual_dif assessment.annual.to_i - assessment.annual_progress.to_i
44
- json.first_quarter_dif assessment.first_quarter.to_i - assessment.first_quarter_progress.to_i
45
- json.january_dif assessment.january.to_i - assessment.january_progress.to_i
46
- json.february_dif assessment.february.to_i - assessment.february_progress.to_i
47
- json.march_dif assessment.march.to_i - assessment.may_progress.to_i
48
- json.second_quarter_dif assessment.second_quarter.to_i - assessment.second_quarter_progress.to_i
49
- json.april_dif assessment.april.to_i - assessment.april_progress.to_i
50
- json.may_dif assessment.may.to_i - assessment.may_progress.to_i
51
- json.june_dif assessment.june.to_i - assessment.june_progress.to_i
52
- json.third_quarter_dif assessment.third_quarter.to_i - assessment.third_quarter_progress.to_i
53
- json.july_dif assessment.july.to_i - assessment.july_progress.to_i
54
- json.august_dif assessment.august.to_i - assessment.august_progress.to_i
55
- json.september_dif assessment.september.to_i - assessment.september_progress.to_i
56
- json.fourth_quarter_dif assessment.fourth_quarter.to_i - assessment.fourth_quarter_progress.to_i
57
- json.october_dif assessment.october.to_i - assessment.october_progress.to_i
58
- json.november_dif assessment.november.to_i - assessment.november_progress.to_i
59
- json.december_dif assessment.december.to_i - assessment.december_progress.to_i
43
+ json.annual_dif assessment.annual.to_f - assessment.annual_progress.to_f
44
+ json.first_quarter_dif assessment.first_quarter.to_f - assessment.first_quarter_progress.to_f
45
+ json.january_dif assessment.january.to_f - assessment.january_progress.to_f
46
+ json.february_dif assessment.february.to_f - assessment.february_progress.to_f
47
+ json.march_dif assessment.march.to_f - assessment.may_progress.to_f
48
+ json.second_quarter_dif assessment.second_quarter.to_f - assessment.second_quarter_progress.to_f
49
+ json.april_dif assessment.april.to_f - assessment.april_progress.to_f
50
+ json.may_dif assessment.may.to_f - assessment.may_progress.to_f
51
+ json.june_dif assessment.june.to_f - assessment.june_progress.to_f
52
+ json.third_quarter_dif assessment.third_quarter.to_f - assessment.third_quarter_progress.to_f
53
+ json.july_dif assessment.july.to_f - assessment.july_progress.to_f
54
+ json.august_dif assessment.august.to_f - assessment.august_progress.to_f
55
+ json.september_dif assessment.september.to_f - assessment.september_progress.to_f
56
+ json.fourth_quarter_dif assessment.fourth_quarter.to_f - assessment.fourth_quarter_progress.to_f
57
+ json.october_dif assessment.october.to_f - assessment.october_progress.to_f
58
+ json.november_dif assessment.november.to_f - assessment.november_progress.to_f
59
+ json.december_dif assessment.december.to_f - assessment.december_progress.to_f
60
60
  # 完成率completion_rate
61
61
  json.annual_rate completion_rate(assessment.annual, assessment.annual_progress)
62
62
  json.first_quarter_rate completion_rate(assessment.first_quarter, assessment.first_quarter_progress)
@@ -160,7 +160,7 @@ json.data do
160
160
 
161
161
  end
162
162
 
163
- json.code 1
163
+ json.code 0
164
164
  json.count @assessments.count
165
165
 
166
166
 
@@ -70,6 +70,12 @@
70
70
  <input type="text" class="layui-input required" id="service_time" name="service_time" placeholder=" - " autocomplete="off" value="<%= (@follow_up.service_start_time.present? && @follow_up.service_end_time.present?) ? (@follow_up.service_start_time.to_s + ' - ' + @follow_up.service_end_time.to_s) : '' %>">
71
71
  </div>
72
72
  </div>
73
+ <div class="layui-inline deployment_type layui-hide">
74
+ <label class="layui-form-label required">部署类型</label>
75
+ <div class="layui-input-inline">
76
+ <%= select_tag "o_business_deployment", options_for_select(@deployment_type, @follow_up&.o_business_deployment), class: 'required' %>
77
+ </div>
78
+ </div>
73
79
  <br class="service_show layui-hide">
74
80
  <div class="layui-inline">
75
81
  <label class="layui-form-label">总额(万)</label>
@@ -168,6 +174,7 @@
168
174
  <%=@follow_up&.clazz_id == EducodeSales::Common.where(extras: EducodeSales::Common::OTYPE).first&.id %>
169
175
  if (flag) {
170
176
  $(".service_show").removeClass('layui-hide')
177
+ $(".deployment_type").removeClass('layui-hide')
171
178
  }
172
179
 
173
180
  form.on('select(clazz_id)', function (data) {
@@ -175,8 +182,10 @@
175
182
  const value = data.value;
176
183
  if (value == <%= EducodeSales::Common.where(extras: EducodeSales::Common::OTYPE).first&.id %>) {
177
184
  $(".service_show").removeClass('layui-hide')
185
+ $(".deployment_type").removeClass('layui-hide')
178
186
  } else {
179
187
  console.log(data.value)
188
+ $(".deployment_type").addClass('layui-hide')
180
189
  $(".service_show").addClass('layui-hide')
181
190
  }
182
191
  })
@@ -276,6 +285,10 @@
276
285
  layer.msg('请选择服务期', {time: 2000, icon: 2, shade: 0.01});
277
286
  return false;
278
287
  }
288
+ if (data.field.o_business_deployment === ''){
289
+ layer.msg('请选择部署类型');
290
+ return false // 退出添加该条记录
291
+ }
279
292
  }
280
293
  var assign_follow = [];
281
294
  sales_list.getValue().forEach(function (d) {
@@ -257,72 +257,64 @@
257
257
  console.log(data);
258
258
 
259
259
  table = layui.table;
260
- var business_table = table.render({
261
- elem: '#businesses_table',
262
- url: '/missions/businesses',
263
- where: {q: data},
264
- toolbar: '#bussinessBar',
265
- defaultToolbar: ['filter'],
266
- title: '商机数据表',
267
- totalRow: true,//开启合并行
268
- cols: [
269
- [
270
- {
271
- field: 'id',
272
- width: 60,
273
- title: '序号', type: 'numbers',
274
- totalRowText: '合计',
275
- fixed: "left"
276
- },
277
- {
278
- field: 'name',
279
- width: 170,
280
- title: '商机名称',
281
- templet: '<div><span title="{{d.name}}">{{d.name}}</span></div>',
282
- fixed: 'left',
283
- hide: gon.filter.name
284
- },
285
- {
286
- field: 'school',
287
- width: 150,
288
- title: '单位',
289
- templet: '#school_name',
290
- hide: gon.filter.school
291
- },
292
- {
293
- field: 'department',
294
- width: 150,
295
- title: '部门',
296
- templet: '<div><span title="{{d.department}}">{{d.department}}</span></div>',
297
- hide: gon.filter.department
298
- },
299
- {
300
- field: 'follow_ups_count',
301
- title: '跟进',
302
- width: 60,
303
- templet: '#show_follow',
304
- totalRow: true,
305
- hide: gon.filter.follow_ups_count
306
- },
307
- // {
308
- // field: 'teachers_count',
309
- // width: 100,
310
- // title: '关键人',
311
- // templet: '#show_keys'
312
- // },
313
- {
314
- field: 'clazz',
315
- width: 80,
316
- title: '类型',
317
- templet: '<div><span title="{{d.clazz}}">{{d.clazz}}</span></div>',
318
- hide: gon.filter.clazz
319
- },
320
- {
321
- field: 'stage',
322
- width: 90,
323
- title: '阶段',
324
- hide: gon.filter.stage
325
- },
260
+ var cols_table = [
261
+ [
262
+ {
263
+ field: 'id',
264
+ width: 60,
265
+ title: '序号', type: 'numbers',
266
+ totalRowText: '合计',
267
+ fixed: "left"
268
+ },
269
+ {
270
+ field: 'name',
271
+ width: 170,
272
+ title: '商机名称',
273
+ templet: '<div><span title="{{d.name}}">{{d.name}}</span></div>',
274
+ fixed: 'left',
275
+ hide: gon.filter.name
276
+ },
277
+ {
278
+ field: 'school',
279
+ width: 150,
280
+ title: '单位',
281
+ templet: '#school_name',
282
+ hide: gon.filter.school
283
+ },
284
+ {
285
+ field: 'department',
286
+ width: 150,
287
+ title: '部门',
288
+ templet: '<div><span title="{{d.department}}">{{d.department}}</span></div>',
289
+ hide: gon.filter.department
290
+ },
291
+ {
292
+ field: 'follow_ups_count',
293
+ title: '跟进',
294
+ width: 60,
295
+ templet: '#show_follow',
296
+ totalRow: true,
297
+ hide: gon.filter.follow_ups_count
298
+ },
299
+ // {
300
+ // field: 'teachers_count',
301
+ // width: 100,
302
+ // title: '关键人',
303
+ // templet: '#show_keys'
304
+ // },
305
+ {
306
+ field: 'clazz',
307
+ width: 80,
308
+ title: '类型',
309
+ templet: '<div><span title="{{d.clazz}}">{{d.clazz}}</span></div>',
310
+ hide: gon.filter.clazz
311
+ },
312
+ {
313
+ field: 'stage',
314
+ width: 90,
315
+ title: '阶段',
316
+ hide: gon.filter.stage
317
+ },
326
318
  {
327
319
  field: 'source',
328
320
  width: 90,
@@ -342,117 +334,133 @@
342
334
  sort: true,
343
335
  hide: gon.filter.latest_time
344
336
  },
345
- {
346
- field: 'invitation_at',
347
- width: 105,
348
- title: '招标时间',
349
- sort: true,
350
- hide: gon.filter.invitation_at
351
- },
352
- {
353
- field: 'bidded_date',
354
- width: 105,
355
- title: '中标时间',
356
- sort: true,
357
- hide: gon.filter.bidded_date
358
- },
359
- {
360
- field: 'signed_date',
361
- width: 105,
362
- title: '签单时间',
363
- sort: true,
364
- hide: gon.filter.signed_date
365
- },
366
- {
367
- field: 'reception_at',
368
- width: 105,
369
- title: '验收时间',
370
- sort: true,
371
- hide: gon.filter.reception_at
372
- },
373
- {
374
- field: 'service_end_time',
375
- width: 200,
376
- title: '服务期',
377
- sort: true,
378
- hide: gon.filter.service_end_time
379
- },
380
- {
381
- field: 'total_amount',
382
- width: 100,
383
- title: '总额',
384
- totalRow: true,
385
- sort: true,
386
- hide: gon.filter.total_amount
387
- },
388
- {
389
- field: 'actual_amount',
390
- width: 100,
391
- title: '合同额',
392
- totalRow: true,
393
- sort: true,
394
- hide: gon.filter.actual_amount
395
- },
396
- {
397
- field: 'return_money',
398
- width: 100,
399
- title: '回款',
400
- sort: true,
401
- totalRow: true,
402
- hide: gon.filter.return_money
403
- },
404
- {
405
- field: 'wait_return_money',
406
- width: 100,
407
- title: '待回款',
408
- sort: true,
409
- totalRow: true,
410
- hide: gon.filter.wait_return_money
411
- },
412
- {
413
- field: 'return_money_days',
414
- width: 150,
415
- title: '首次回款周期(天)',
416
- hide: gon.filter.return_money_days
417
- },
418
- {
419
- field: 'place',
420
- width: 160,
421
- title: '渠道',
422
- hide: gon.filter.place
423
- },
424
- {
425
- field: 'year',
426
- width: 105,
427
- title: '所属年度',
428
- sort: true,
429
- hide: gon.filter.year
430
- },
431
- {
432
- field: 'followed',
433
- templet:function(d){
434
- if (d.followed==1){
337
+ {
338
+ field: 'invitation_at',
339
+ width: 105,
340
+ title: '招标时间',
341
+ sort: true,
342
+ hide: gon.filter.invitation_at
343
+ },
344
+ {
345
+ field: 'bidded_date',
346
+ width: 105,
347
+ title: '中标时间',
348
+ sort: true,
349
+ hide: gon.filter.bidded_date
350
+ },
351
+ {
352
+ field: 'signed_date',
353
+ width: 105,
354
+ title: '签单时间',
355
+ sort: true,
356
+ hide: gon.filter.signed_date
357
+ },
358
+ {
359
+ field: 'reception_at',
360
+ width: 105,
361
+ title: '验收时间',
362
+ sort: true,
363
+ hide: gon.filter.reception_at
364
+ },
365
+ {
366
+ field: 'service_end_time',
367
+ width: 200,
368
+ title: '服务期',
369
+ sort: true,
370
+ hide: gon.filter.service_end_time
371
+ },
372
+ {
373
+ field: 'o_business_deployment',
374
+ width: 150,
375
+ title: '部署类型',
376
+ sort: true,
377
+ hide: gon.filter.o_business_deployment
378
+ },
379
+ {
380
+ field: 'total_amount',
381
+ width: 100,
382
+ title: '总额',
383
+ totalRow: true,
384
+ sort: true,
385
+ hide: gon.filter.total_amount
386
+ },
387
+ {
388
+ field: 'actual_amount',
389
+ width: 100,
390
+ title: '合同额',
391
+ totalRow: true,
392
+ sort: true,
393
+ hide: gon.filter.actual_amount
394
+ },
395
+ {
396
+ field: 'return_money',
397
+ width: 100,
398
+ title: '回款',
399
+ sort: true,
400
+ totalRow: true,
401
+ hide: gon.filter.return_money
402
+ },
403
+ {
404
+ field: 'wait_return_money',
405
+ width: 100,
406
+ title: '待回款',
407
+ sort: true,
408
+ totalRow: true,
409
+ hide: gon.filter.wait_return_money
410
+ },
411
+ {
412
+ field: 'return_money_days',
413
+ width: 150,
414
+ title: '首次回款周期(天)',
415
+ hide: gon.filter.return_money_days
416
+ },
417
+ {
418
+ field: 'place',
419
+ width: 160,
420
+ title: '渠道',
421
+ hide: gon.filter.place
422
+ },
423
+ {
424
+ field: 'year',
425
+ width: 105,
426
+ title: '所属年度',
427
+ sort: true,
428
+ hide: gon.filter.year
429
+ },
430
+ {
431
+ field: 'followed',
432
+ templet:function(d){
433
+ if (d.followed==1){
435
434
 
436
- return '<i class="layui-icon" style="color: goldenrod">&#xe658;</i> '
437
- }
435
+ return '<i class="layui-icon" style="color: goldenrod">&#xe658;</i> '
436
+ }
438
437
 
439
- else return ''
440
- },
441
- width: 105,
442
- title: '关注',
443
- align: "center",
444
- hide: gon.filter.followed
438
+ else return ''
439
+ },
440
+ width: 105,
441
+ title: '关注',
442
+ align: "center",
443
+ hide: gon.filter.followed
445
444
 
446
- },
447
- {
448
- title: '操作',
449
- minWidth: 220,
450
- toolbar: '#currentTableBar',
451
- align: "center",
452
- fixed: 'right',
453
- }
445
+ },
446
+ {
447
+ title: '操作',
448
+ minWidth: 220,
449
+ toolbar: '#currentTableBar',
450
+ align: "center",
451
+ fixed: 'right',
452
+ }
454
453
  ]
455
- ],
454
+ ]
455
+ var business_table = table.render({
456
+ elem: '#businesses_table',
457
+ url: '/missions/businesses',
458
+ where: {q: data},
459
+ toolbar: '#bussinessBar',
460
+ defaultToolbar: ['filter'],
461
+ title: '商机数据表',
462
+ totalRow: true,//开启合并行
463
+ cols: cols_table,
456
464
 
457
465
  limit: 20,
458
466
  limits: [10,15,20,30,40,50,60,70,80,90],
@@ -816,7 +824,6 @@
816
824
  data.field.business_type = business_type.toString();
817
825
  data.field.business_step = business_step.toString();
818
826
  search = data.field
819
- console.log(search);
820
827
  table.reload('businesses_table', {
821
828
  url: '/missions/businesses',
822
829
  page: {
@@ -825,7 +832,6 @@
825
832
  where: {q: search, sort: sort}
826
833
  }, 'data');
827
834
  table.reload('teachers_table', {
828
- url: '/missions/businesses',
829
835
  page: {
830
836
  curr: 1
831
837
  },
@@ -854,22 +860,35 @@
854
860
 
855
861
  return false;
856
862
  });
857
-
858
863
  table.on('toolbar(businesses_table)', function (obj) {
859
864
  switch (obj.event) {
860
865
  case 'LAYTABLE_COLS':
861
- layui.form.on('checkbox(LAY_TABLE_TOOL_COLS)', function(obj) {
862
- var value = obj.elem.checked
863
- var name = obj.elem.attributes[1].value
864
- request.get('missions/filter?type=businesses_list&name='+name+'&check='+value,{},function (res){
865
- let hide_type = "[data-field='"+name+"']"
866
- if (res.hidden === 1){
867
- $(hide_type).addClass("layui-hide")
868
- }else if(res.hidden === 0 ){
869
- $(hide_type).removeClass("layui-hide")
870
- }else if(res.status === 403){
866
+ layui.form.on('checkbox(LAY_TABLE_TOOL_COLS)', function(objs) {
867
+ var value = objs.elem.checked
868
+ var name = objs.elem.attributes[1].value
869
+ $.ajax({
870
+ url: "filter",
871
+ type: "GET",
872
+ data: "type=businesses_list&name=" + name + "&check=" + value,
873
+ success: function (data){
874
+ let hide_type = "[data-field='"+name+"']"
875
+ if (data.hidden === 1){
876
+ $(hide_type).addClass('layui-hide');
877
+ }else if (data.hidden === 0){
878
+ $(hide_type).removeClass('layui-hide');
879
+ }
880
+ //(因为触发筛选器出现的checkbox是根据cols的值得到 这里必须修改 cols的值 然后才会出现下次点击筛选器时 checkbox正常显示)
881
+ for (i=1;i<cols_table[0].length;i++){
882
+ if (name === cols_table[0][i].field ){
883
+ cols_table[0][i].hide = !value
884
+ objs.config.cols = cols_table
885
+ }
886
+ }
887
+ },
888
+ error: function (data){
871
889
  layer.msg("操作失败")
872
- }
890
+ },
891
+ dataType: 'Json'
873
892
  })
874
893
  });
875
894
  }
@@ -18,6 +18,12 @@ json.data do
18
18
  json.bidded_date d.last_follow_up&.bidded_date.to_s
19
19
  json.signed_date d.last_follow_up&.signed_date.to_s
20
20
  json.service_end_time d.last_follow_up&.service_start_time.to_s + "-" + d.last_follow_up&.service_end_time.to_s
21
+ EducodeSales::FollowUp::BUSINESS_DEPLOYMENT[1..-1].each do |m|
22
+ if d.last_follow_up&.o_business_deployment == m[1]
23
+ json.o_business_deployment m[0]
24
+ break
25
+ end
26
+ end
21
27
  json.year d.last_follow_up&.year.to_s
22
28
  json.total_amount d.last_follow_up&.total_amount
23
29
  json.actual_amount d.last_follow_up&.actual_amount