educode_sales 0.9.50 → 0.9.52
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.
- checksums.yaml +4 -4
- data/app/controllers/educode_sales/businesses_controller.rb +3 -2
- data/app/controllers/educode_sales/teacher_follows_controller.rb +2 -2
- data/app/controllers/educode_sales/teachers_controller.rb +10 -1
- data/app/views/educode_sales/businesses/time_line.html.erb +33 -5
- data/app/views/educode_sales/teachers/_index.html.erb +2 -2
- data/app/views/educode_sales/teachers/daily_paper.html.erb +19 -19
- data/app/views/educode_sales/teachers/edit.html.erb +7 -0
- data/db/migrate/20230227061043_create_educode_sales_ideas.rb +3 -3
- data/lib/educode_sales/version.rb +1 -1
- metadata +6 -11
- data/app/assets/images/educode_sales/indexlogo.png +0 -0
- data/db/migrate/20221025094655_delete_business_number.rb +0 -5
- data/db/migrate/20230227070206_change_to_educode_sales_ideas.rb +0 -5
- data/db/migrate/20230227125936_add_follow_at_to_teachers.rb +0 -6
- data/db/migrate/20230302074324_change_manager_for_ideas.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3f113e3b9a8f55b0680230f5bfaabd5e6858866342a0aecd8f4195eba24c5b3
|
4
|
+
data.tar.gz: 8b3b11f2eac6297e680a765e0f633b63a97e6d63ee5c58b824bfd04805444636
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9311f0790f150cd5c1c38f1f403628570e7da76e27c40aca5b7640c1670decaeb476a7f2173136309cecd5246485d469f2133483249415d50e6af5fc989444fc
|
7
|
+
data.tar.gz: 5882f0b229d65d15efdefab83c7a8c0aefc761b5e8ae53140e7581b4e4b2de9eb3221e7a852da6ea0c787c1d6e27f726d54567acb47083ed4e0615c7e650b019
|
@@ -107,7 +107,7 @@ module EducodeSales
|
|
107
107
|
# 区域管理商机
|
108
108
|
# 排查看区域商机,需要排除掉其它人员手上的监管学校
|
109
109
|
other_staff_school_id = EducodeSales::StaffSchool.where.not(staff_id: @current_admin.id).where("school_id IN (SELECT school_id FROM educode_sales_staff_schools WHERE staff_id = #{@current_admin.id}) IS NOT TRUE").distinct.pluck :school_id
|
110
|
-
|
110
|
+
|
111
111
|
school_ids = School.where(province: @current_admin.areas.pluck(:name)).pluck(:id) + StaffSchool.where(staff_id: @current_admin.id).pluck(:school_id) - other_staff_school_id
|
112
112
|
@businesses = Business.joins("JOIN departments AS dp ON educode_sales_businesses.department_id = dp.id").where("dp.school_id in (?)", school_ids)
|
113
113
|
end
|
@@ -123,7 +123,7 @@ module EducodeSales
|
|
123
123
|
when '区域'
|
124
124
|
# 查看区域商机,需要排除掉其它人员手上的监管学校
|
125
125
|
other_staff_school_id = EducodeSales::StaffSchool.where.not(staff_id: @current_admin.id).where("school_id IN (SELECT school_id FROM educode_sales_staff_schools WHERE staff_id = #{@current_admin.id}) IS NOT TRUE").distinct.pluck :school_id
|
126
|
-
|
126
|
+
|
127
127
|
school_ids = School.where(province: @current_admin.areas.pluck(:name)).pluck(:id) + StaffSchool.where(staff_id: @current_admin.id).pluck(:school_id) - other_staff_school_id
|
128
128
|
if can?(:special, EducodeSales::Business)
|
129
129
|
# 专项商机
|
@@ -492,6 +492,7 @@ module EducodeSales
|
|
492
492
|
respond_to do |format|
|
493
493
|
format.html do
|
494
494
|
@follow_ups = @business.follow_ups.order(created_at: :desc)
|
495
|
+
@latest = @follow_ups.present? ? @follow_ups[0] : nil
|
495
496
|
render layout: false
|
496
497
|
end
|
497
498
|
end
|
@@ -71,7 +71,7 @@ module EducodeSales
|
|
71
71
|
staff = Staff.find(params[:q][:staff_id])
|
72
72
|
school_ids = School.where(province: staff.areas.pluck(:name)).pluck(:id)
|
73
73
|
teacher_ids = EducodeSales::Teacher.joins("JOIN departments ON educode_sales_teachers.department_id = departments.id").where("departments.school_id in (?)", school_ids).pluck(:id)
|
74
|
-
@follow_ups =
|
74
|
+
@follow_ups = @follow_ups.where(teacher_id: teacher_ids)
|
75
75
|
end
|
76
76
|
|
77
77
|
if params[:q].present? && params[:q][:department].present?
|
@@ -118,7 +118,7 @@ module EducodeSales
|
|
118
118
|
else
|
119
119
|
@follow_ups = @follow_ups.order("educode_sales_teacher_follows.created_at desc")
|
120
120
|
end
|
121
|
-
|
121
|
+
@follow_ups = @follow_ups.page(params[:page]).per(params[:limit])
|
122
122
|
end
|
123
123
|
|
124
124
|
private
|
@@ -346,7 +346,16 @@ module EducodeSales
|
|
346
346
|
end
|
347
347
|
|
348
348
|
def daily_paper
|
349
|
-
|
349
|
+
# 累计完成教师
|
350
|
+
@total_teachers_num = @current_admin.operation_plans.where("created_at >= ?", Time.now.beginning_of_month).distinct.count("teacher_id")
|
351
|
+
@today_teacher_num = @current_admin.operation_plans.where("created_at >= ?", Time.now.beginning_of_day).distinct.count("teacher_id")
|
352
|
+
user_ids = @current_admin.operation_plans.joins(:teacher).where("educode_sales_teachers.user_id IS NOT NULL").pluck(:user_id)
|
353
|
+
@today_course_num = Course.joins(:course_members).where(course_members: {user_id: user_ids}).where("is_delete = 0 and role != 4 and excellent = 0 and is_hidden = 0").where("courses.created_at > ?", Time.now.beginning_of_day).count
|
354
|
+
|
355
|
+
my_area = @current_admin.areas.pluck(:name)
|
356
|
+
@total_users_num = UserExtension.joins(department: :school).where(schools: {province: my_area}).where("user_extensions.created_at > ?", Time.now.beginning_of_month).count
|
357
|
+
@today_users_num = UserExtension.joins(department: :school).where(schools: {province: my_area}).where("user_extensions.created_at > ?", Time.now.beginning_of_day).count
|
358
|
+
|
350
359
|
render layout: false
|
351
360
|
end
|
352
361
|
|
@@ -20,6 +20,9 @@
|
|
20
20
|
<br>
|
21
21
|
关键人:<% teacher_ids = f.key_person.present? ? f.key_person.pluck(:teacher_id) : [] %>
|
22
22
|
<%= EducodeSales::Teacher.where(id: teacher_ids).pluck(:name).join("、") %>
|
23
|
+
<% if f.id == @latest&.id && (f.created_at.present? ? (Time.now - f.created_at).to_f/3600 < 24 : false) %>
|
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
|
+
<% end %>
|
23
26
|
</p>
|
24
27
|
</div>
|
25
28
|
</li>
|
@@ -33,13 +36,38 @@
|
|
33
36
|
<script type="text/javascript" charset="utf-8">
|
34
37
|
|
35
38
|
layui.use(['form', 'table', 'miniPage', 'element', 'request'], function () {
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
39
|
+
var $ = layui.jquery,
|
40
|
+
table = layui.table,
|
41
|
+
request = layui.request,
|
42
|
+
miniPage = layui.miniPage;
|
43
|
+
form = layui.form;
|
41
44
|
|
42
45
|
});
|
46
|
+
$(".add_key").on("click", function(e) {
|
47
|
+
var data = e.currentTarget.dataset;
|
48
|
+
follow_up_id = data.id;
|
49
|
+
content = miniPage.getHrefContent('/missions/teachers/add_keys?follow_up_id=' + data.id);
|
50
|
+
openWH = miniPage.getOpenWidthHeight();
|
51
|
+
is_latest = data.is_latest == "true";
|
52
|
+
flag = data.flag == "true"
|
53
|
+
keyindex = layer.open({
|
54
|
+
title: '关键人',
|
55
|
+
type: 1,
|
56
|
+
shade: 0.2,
|
57
|
+
maxmin: true,
|
58
|
+
shadeClose: true,
|
59
|
+
area: [openWH[0] + 'px', openWH[1] + 'px'],
|
60
|
+
offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
61
|
+
content: content,
|
62
|
+
success: function (layero, index) {
|
63
|
+
// 重新渲染弹层中的下拉选择框select
|
64
|
+
form.render('select');
|
65
|
+
}
|
66
|
+
});
|
67
|
+
$(window).on("resize", function () {
|
68
|
+
layer.full(keyindex);
|
69
|
+
});
|
70
|
+
})
|
43
71
|
function demo(){
|
44
72
|
layer.closeAll()
|
45
73
|
business_id = parent.business_id
|
@@ -223,7 +223,7 @@
|
|
223
223
|
{
|
224
224
|
field: 'follow_person',
|
225
225
|
width: 120,
|
226
|
-
title: '
|
226
|
+
title: '最新跟进人',
|
227
227
|
},
|
228
228
|
{
|
229
229
|
field: 'followup_at',
|
@@ -293,7 +293,7 @@
|
|
293
293
|
{
|
294
294
|
field: 'mobile',
|
295
295
|
width: 120,
|
296
|
-
title: '
|
296
|
+
title: '联系电话',
|
297
297
|
},
|
298
298
|
{
|
299
299
|
field: 'wechat',
|
@@ -5,37 +5,37 @@
|
|
5
5
|
|
6
6
|
<p>一、数据指标</p>
|
7
7
|
<p>1、【教师合作-老客户运营】</p>
|
8
|
-
<p
|
9
|
-
<p
|
10
|
-
<p>今日已完成沟通
|
11
|
-
<p style="margin-bottom: 30px;"
|
8
|
+
<p>本月目标 ** 人;</p>
|
9
|
+
<p>累计完成 <%= @total_teachers_num %> 人; </p>
|
10
|
+
<p>今日已完成沟通 <%= @today_teacher_num %> 人;</p>
|
11
|
+
<p style="margin-bottom: 30px;">今日已完成新建课堂 <%= @today_course_num %> 个;</p>
|
12
12
|
<p>2、【市场活动-新客户注册】</p>
|
13
|
-
<p
|
14
|
-
<p
|
15
|
-
<p style="margin-bottom: 30px;"
|
13
|
+
<p>本月目标 ** 人;</p>
|
14
|
+
<p>累计完成 <%= @total_users_num %> 人;</p>
|
15
|
+
<p style="margin-bottom: 30px;">今日已完成转化注册 <%= @today_users_num %> 人;</p>
|
16
16
|
<p>3、课程建设-新型态教材合作】</p>
|
17
|
-
<p
|
18
|
-
<p
|
19
|
-
<p style="margin-bottom: 30px;"
|
17
|
+
<p>本月目标 ** 门课程(教材);</p>
|
18
|
+
<p>累计完成 ** 门课程(教材);</p>
|
19
|
+
<p style="margin-bottom: 30px;">今日已完成挖掘 ** 门课程(教材);</p>
|
20
20
|
<p>二、客户跟进情况</p>
|
21
21
|
<p style="margin-bottom: 30px;">(填写每日重点客户沟通内容,可涵盖总部安排的重要工作事项) </p>
|
22
22
|
<p>三、商机与项目线索</p>
|
23
23
|
<p style="margin-bottom: 30px;">(在运营过程中发现的商机以及小toB非招标项目商机:saas课程、在线考试等)</p>
|
24
24
|
<p>四、需要协助支持事宜</p>
|
25
|
-
<p style="margin-bottom: 30px;">1
|
25
|
+
<p style="margin-bottom: 30px;">1、需支持运营目标院校 ** 学校,教师注册量 ** 人,活跃用户 ** 人,待运营 ** 人;</p>
|
26
26
|
</div>
|
27
27
|
|
28
28
|
<% text = "\n" %>
|
29
29
|
<% text += "一、数据指标\n" %>
|
30
30
|
<% text += "1、【教师合作-老客户运营】\n" %>
|
31
|
-
<% text += "
|
32
|
-
<% text += "
|
33
|
-
<% text += "
|
34
|
-
<% text += "
|
31
|
+
<% text += "本月目标 ** 人;\n" %>
|
32
|
+
<% text += "累计完成 #{@total_teachers_num} 人;\n" %>
|
33
|
+
<% text += "今日已完成沟通 #{@today_teacher_num} 人;\n" %>
|
34
|
+
<% text += "今日已完成新建课堂 #{@today_course_num } 个;\n\n" %>
|
35
35
|
<% text += "2、【市场活动-新客户注册】\n" %>
|
36
|
-
<% text += "
|
37
|
-
<% text += "
|
38
|
-
<% text += "
|
36
|
+
<% text += "本月目标 ** 人\n" %>
|
37
|
+
<% text += "累计完成 #{@total_users_num} 人\n" %>
|
38
|
+
<% text += "今日已完成转化注册 #{@today_users_num} 人\n\n" %>
|
39
39
|
<% text += "3、课程建设-新型态教材合作】\n" %>
|
40
40
|
<% text += "本月目标**门课程(教材);\n" %>
|
41
41
|
<% text += "累计完成**门课程(教材);\n" %>
|
@@ -45,7 +45,7 @@
|
|
45
45
|
<% text += "三、商机与项目线索\n" %>
|
46
46
|
<% text += "(在运营过程中发现的商机以及小toB非招标项目商机:saas课程、在线考试等)\n\n" %>
|
47
47
|
<% text += "四、需要协助支持事宜\n" %>
|
48
|
-
<% text += "1
|
48
|
+
<% text += "1、需支持运营目标院校 ** 学校,教师注册量 ** 人,活跃用户 ** 人,待运营 ** 人;\n\n" %>
|
49
49
|
<% text += "头歌营销系统 \n"%>
|
50
50
|
<% text += "#{Time.now.to_s}"%>
|
51
51
|
<div id="content" style="display: none;" data-content="生态经理日报-转正后<%=text %>"></div>
|
@@ -37,6 +37,13 @@
|
|
37
37
|
</div>
|
38
38
|
</div>
|
39
39
|
<br>
|
40
|
+
<div class="layui-inline">
|
41
|
+
<label class="layui-form-label ">手机号</label>
|
42
|
+
<div class="layui-input-block" style="width: 188px;">
|
43
|
+
<input type="text" name="mobile" autocomplete="off" class="layui-input" placeholder="请输入手机号" value="<%= @teacher.mobile %>">
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
<br>
|
40
47
|
<div class="layui-inline">
|
41
48
|
<label class="layui-form-label required">单位部门</label>
|
42
49
|
<div class="layui-input-block" id="add_department2" style="width: 400px"></div>
|
@@ -4,7 +4,7 @@ class CreateEducodeSalesIdeas < ActiveRecord::Migration[5.2]
|
|
4
4
|
t.references :school, index: true, comment: "学校"
|
5
5
|
t.string :name, comment: "名称"
|
6
6
|
t.integer :level, comment: "优先级"
|
7
|
-
t.integer :
|
7
|
+
t.integer :staff_id, comment: "指派人"
|
8
8
|
t.integer :status, comment: "状态"
|
9
9
|
t.integer :types, comment: "类型"
|
10
10
|
t.integer :model, comment: "部署模式"
|
@@ -19,8 +19,8 @@ class CreateEducodeSalesIdeas < ActiveRecord::Migration[5.2]
|
|
19
19
|
t.boolean :is_deleted, default: false, comment: "是否删除"
|
20
20
|
t.datetime :deleted_at, comment: "删除时间"
|
21
21
|
t.references :department, index: true, comment: "部门"
|
22
|
-
t.
|
23
|
-
t.
|
22
|
+
t.string :manager_name, comment: "负责人"
|
23
|
+
t.string :manager_phone, comment: "负责人电话"
|
24
24
|
t.text :history_record, comment: "修改记录"
|
25
25
|
t.timestamps
|
26
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: educode_sales
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.52
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- anke1460
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -105,7 +105,6 @@ files:
|
|
105
105
|
- app/assets/images/educode_sales/icon-login.png
|
106
106
|
- app/assets/images/educode_sales/icon.png
|
107
107
|
- app/assets/images/educode_sales/indexLogo.png
|
108
|
-
- app/assets/images/educode_sales/indexlogo.png
|
109
108
|
- app/assets/images/educode_sales/loading-0.gif
|
110
109
|
- app/assets/images/educode_sales/loading-1.gif
|
111
110
|
- app/assets/images/educode_sales/loading-2.gif
|
@@ -545,7 +544,6 @@ files:
|
|
545
544
|
- db/migrate/20220920080302_add_column_number_to_educode_sales_businesses.rb
|
546
545
|
- db/migrate/20220921131116_add_change_clazz_to_follow_up.rb
|
547
546
|
- db/migrate/20220923084102_create_table_to_busines_number_recoreds.rb
|
548
|
-
- db/migrate/20221025094655_delete_business_number.rb
|
549
547
|
- db/migrate/20221107122147_change_divide_rate_follow_ups.rb
|
550
548
|
- db/migrate/20230115080730_add_origin_business_id_to_follow_ups.rb
|
551
549
|
- db/migrate/20230117144025_create_educode_sales_business_clazz_changes.rb
|
@@ -554,10 +552,7 @@ files:
|
|
554
552
|
- db/migrate/20230215141612_add_mobile_to_teachers.rb
|
555
553
|
- db/migrate/20230220144737_add_clazz_id_to_business.rb
|
556
554
|
- db/migrate/20230227061043_create_educode_sales_ideas.rb
|
557
|
-
- db/migrate/20230227070206_change_to_educode_sales_ideas.rb
|
558
|
-
- db/migrate/20230227125936_add_follow_at_to_teachers.rb
|
559
555
|
- db/migrate/20230228063555_create_educode_sales_idea_histories.rb
|
560
|
-
- db/migrate/20230302074324_change_manager_for_ideas.rb
|
561
556
|
- lib/educode_sales.rb
|
562
557
|
- lib/educode_sales/engine.rb
|
563
558
|
- lib/educode_sales/version.rb
|
@@ -566,7 +561,7 @@ homepage: https://www.educoder.net
|
|
566
561
|
licenses:
|
567
562
|
- MIT
|
568
563
|
metadata: {}
|
569
|
-
post_install_message:
|
564
|
+
post_install_message:
|
570
565
|
rdoc_options: []
|
571
566
|
require_paths:
|
572
567
|
- lib
|
@@ -581,8 +576,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
581
576
|
- !ruby/object:Gem::Version
|
582
577
|
version: '0'
|
583
578
|
requirements: []
|
584
|
-
rubygems_version: 3.0.
|
585
|
-
signing_key:
|
579
|
+
rubygems_version: 3.0.0
|
580
|
+
signing_key:
|
586
581
|
specification_version: 4
|
587
582
|
summary: Summary of EducodeSales.
|
588
583
|
test_files: []
|
Binary file
|
@@ -1,6 +0,0 @@
|
|
1
|
-
class AddFollowAtToTeachers < ActiveRecord::Migration[5.2]
|
2
|
-
def change
|
3
|
-
add_column :educode_sales_teachers, :followup_at, :datetime unless column_exists?(:educode_sales_teachers, :followup_at)
|
4
|
-
add_column :educode_sales_teacher_follows, :advise, :text unless column_exists?(:educode_sales_teacher_follows, :advise)
|
5
|
-
end
|
6
|
-
end
|