educode_sales 0.9.68 → 0.9.69

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 (38) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/educode_sales/indexlogo.png +0 -0
  3. data/app/assets/javascripts/educode_sales/extent/treeTable.js +235 -0
  4. data/app/controllers/educode_sales/customers_controller.rb +107 -0
  5. data/app/controllers/educode_sales/follow_ups_controller.rb +6 -0
  6. data/app/controllers/educode_sales/projects_controller.rb +420 -0
  7. data/app/controllers/educode_sales/roles_controller.rb +4 -1
  8. data/app/controllers/educode_sales/teachers_controller.rb +38 -13
  9. data/app/helpers/educode_sales/application_helper.rb +1 -0
  10. data/app/models/educode_sales/business.rb +21 -5
  11. data/app/models/educode_sales/business_history.rb +8 -0
  12. data/app/models/educode_sales/permission.rb +2 -1
  13. data/app/models/educode_sales/project.rb +53 -0
  14. data/app/models/educode_sales/role_area.rb +2 -1
  15. data/app/views/educode_sales/activities/show_teachers.html.erb +1 -1
  16. data/app/views/educode_sales/businesses/index.html.erb +5 -0
  17. data/app/views/educode_sales/businesses/index.json.jbuilder +3 -0
  18. data/app/views/educode_sales/businesses/time_line.html.erb +9 -5
  19. data/app/views/educode_sales/customers/edit_major.html.erb +872 -0
  20. data/app/views/educode_sales/customers/list.html.erb +602 -0
  21. data/app/views/educode_sales/customers/list.json.jbuilder +33 -0
  22. data/app/views/educode_sales/follow_ups/index.json.jbuilder +2 -2
  23. data/app/views/educode_sales/projects/detail.html.erb +269 -0
  24. data/app/views/educode_sales/projects/edit.html.erb +246 -0
  25. data/app/views/educode_sales/projects/history.html.erb +41 -0
  26. data/app/views/educode_sales/projects/index.html.erb +688 -0
  27. data/app/views/educode_sales/projects/index.json.jbuilder +69 -0
  28. data/app/views/educode_sales/teachers/_index.html.erb +17 -1
  29. data/app/views/educode_sales/teachers/index.json.jbuilder +2 -0
  30. data/app/views/layouts/educode_sales/application.html.erb +25 -0
  31. data/config/routes.rb +12 -0
  32. data/db/migrate/20230411134203_add_realname_to_teacher.rb +5 -0
  33. data/db/migrate/20230412083510_add_p_staff_id_to_businesses.rb +20 -0
  34. data/db/migrate/20230412092000_create_business_histories.rb +10 -0
  35. data/db/migrate/20230413015619_add_permissions_to_projects.rb +11 -0
  36. data/db/migrate/20230413031029_add_pre_time_to_businesses.rb +5 -0
  37. data/lib/educode_sales/version.rb +1 -1
  38. metadata +24 -6
@@ -65,7 +65,7 @@
65
65
  {
66
66
  field: 'name',
67
67
  width: 90,
68
- title: '姓名',
68
+ title: '用户名',
69
69
  templet: "#name"
70
70
  },
71
71
  {
@@ -416,6 +416,11 @@
416
416
  templet: '<div><span title="{{d.department}}">{{d.department}}</span></div>',
417
417
  hide: gon.filter.department
418
418
  },
419
+ {
420
+ field: 'majors',
421
+ width: 160,
422
+ title: '专业',
423
+ },
419
424
  {
420
425
  field: 'follow_ups_count',
421
426
  title: '跟进',
@@ -31,6 +31,9 @@ json.data do
31
31
  json.divide_money d.divide_amount.to_f.round(2)
32
32
  json.budget_amount d.budget_amount.to_f.round(2) #d.follow_ups.where(stage_id: @budget_stage_ids).order("created_at desc").first&.total_amount&.round(2) || 0
33
33
  json.area d.department&.school&.province
34
+
35
+ json.majors d.department&.department_majors&.pluck(:name).present? ? d.department&.department_majors&.pluck(:name).join(",") : ""
36
+
34
37
  # school_property = d.department.school.school_property
35
38
  # property = []
36
39
 
@@ -24,7 +24,7 @@
24
24
  <a href="javascript:;" class="add_key" data-is_latest="<%= f.id == @latest&.id %>" data-id=<%= f.id %> data-flag="<%= f.created_at.present? ? (Time.now - f.created_at).to_f/3600 < 24 : false %>">添加关键人</a>
25
25
  <% end %>
26
26
  <br/>
27
- 评论: <span></span> <a href="javascript:;" class="add_comment" data-id=<%= f.id %>>评论</a>
27
+ 评论: <span><%= f.comment %></span> <a href="javascript:;" class="add_comment" data-id=<%= f.id %>>评论</a>
28
28
  </p>
29
29
  </div>
30
30
  </li>
@@ -44,7 +44,7 @@
44
44
  miniPage = layui.miniPage;
45
45
  form = layui.form;
46
46
 
47
- });
47
+
48
48
  $(".add_key").on("click", function(e) {
49
49
  var data = e.currentTarget.dataset;
50
50
  follow_up_id = data.id;
@@ -86,9 +86,12 @@
86
86
  if (l.find("textarea").val().trim() == '') {
87
87
  layer.msg('内容不能为空')
88
88
  return false;
89
- } else {
90
- e.currentTarget.previousElementSibling.innerHTML = l.find("textarea").val().trim();
91
- layer.close(index);
89
+ } else {
90
+ var comment = l.find("textarea").val().trim();
91
+ request.put('missions/follow_ups/' + follow_up_id + "/comment", {comment: comment}, function (res) {
92
+ e.currentTarget.previousElementSibling.innerHTML = comment;
93
+ layer.close(index);
94
+ })
92
95
  }
93
96
  return false
94
97
  },
@@ -117,4 +120,5 @@
117
120
  layer.full(sindex);
118
121
  });
119
122
  }
123
+ });
120
124
  </script>