educode_sales 0.6.9 → 0.7.0
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 +2 -2
- data/app/controllers/educode_sales/customers_controller.rb +1 -1
- data/app/controllers/educode_sales/money_plans_controller.rb +1 -1
- data/app/controllers/educode_sales/operation_plans_controller.rb +1 -1
- data/app/controllers/educode_sales/plans_controller.rb +1 -1
- data/app/controllers/educode_sales/teachers_controller.rb +1 -1
- data/app/views/educode_sales/businesses/index.html.erb +28 -3
- data/app/views/educode_sales/businesses/index.json.jbuilder +3 -1
- data/app/views/educode_sales/businesses/show_follow.html.erb +37 -3
- data/app/views/educode_sales/businesses/show_follow.json.jbuilder +1 -0
- data/app/views/educode_sales/customers/index.html.erb +1 -0
- data/app/views/educode_sales/roles/edit.html.erb +6 -6
- data/app/views/educode_sales/staffs/edit.html.erb +1 -5
- data/app/views/educode_sales/staffs/index.html.erb +6 -0
- data/app/views/educode_sales/staffs/index.json.jbuilder +1 -0
- data/db/migrate/20210902064109_create_educode_sales_role_permissions.rb +5 -0
- data/lib/educode_sales/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c243136aa29c06071bc7f5178e7c6eab7a7711c29a664ed12b4141b823102e1
|
4
|
+
data.tar.gz: db224456ae6c27346fadb5ae65b2ed6973ba11e1c384f2b833f994e6371540cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5df7256338dc4a0bcc7f3ef6933c573f79b186a77ba12fcb10bcbfc80a11cfb3253d57ae2ea2325346a76c089fe9c9a71751407697bb4e3706ee6b58e11abf1
|
7
|
+
data.tar.gz: fa152803f2738331a1324e530275b6c31ff0420f5f725c537587b754555ae6eaeb0ce4bf5e522ef81ae109224e74b65effdf4435e7cb71e88fd11d6409c42580
|
@@ -31,7 +31,7 @@ module EducodeSales
|
|
31
31
|
gon.menus << { title: '附件管理', event: 'file' }
|
32
32
|
end
|
33
33
|
if can?(:update, EducodeSales::Business)
|
34
|
-
gon.menus << { title: '编辑', event: 'edit' }
|
34
|
+
# gon.menus << { title: '编辑', event: 'edit' }
|
35
35
|
end
|
36
36
|
if can?(:destroy, EducodeSales::Business)
|
37
37
|
gon.menus << { title: '删除', event: 'delete' }
|
@@ -52,7 +52,7 @@ module EducodeSales
|
|
52
52
|
business_ids = Business.joins(last_follow_up: :assign_follow_ups).where("educode_sales_assign_follow_ups.staff_id = ?", @current_admin.id).pluck(:id)
|
53
53
|
@businesses = Business.where("educode_sales_businesses.staff_id = ? OR educode_sales_businesses.id in (?)", @current_admin.id, business_ids)
|
54
54
|
when '区域'
|
55
|
-
school_ids = School.where(province: @current_admin.areas.pluck(:name)).pluck(:id)
|
55
|
+
school_ids = School.where(province: @current_admin.areas.pluck(:name)).pluck(:id) + StaffSchool.where(staff_id: @current_admin.id).pluck(:school_id)
|
56
56
|
business_ids = Business.joins(last_follow_up: :assign_follow_ups).where("educode_sales_assign_follow_ups.staff_id = ?", @current_admin.id).pluck(:id)
|
57
57
|
@businesses = Business.joins("JOIN departments ON educode_sales_businesses.department_id = departments.id").where("departments.school_id in (?) OR educode_sales_businesses.staff_id = #{@current_admin.id} OR educode_sales_businesses.id in (?)", school_ids, business_ids)
|
58
58
|
else
|
@@ -51,7 +51,7 @@ module EducodeSales
|
|
51
51
|
when '区域'
|
52
52
|
a_school_ids = School.where(province: @current_admin.areas.pluck(:name)).ids
|
53
53
|
b_school_ids = CustomerExtension.where(customer_staff_id: @current_admin.id).pluck(:school_id)
|
54
|
-
school_ids = a_school_ids + b_school_ids
|
54
|
+
school_ids = a_school_ids + b_school_ids + StaffSchool.where(staff_id: @current_admin.id).pluck(:school_id)
|
55
55
|
@customers = School.where(id: school_ids)
|
56
56
|
else
|
57
57
|
@customers = School.all
|
@@ -22,7 +22,7 @@ module EducodeSales
|
|
22
22
|
@money_plans = MoneyPlan.joins(:follow_up).where("educode_sales_follow_ups.clazz_id != ?", x_id).where(follow_up_id: follow_up_ids).where(staff_id: @current_admin.id)
|
23
23
|
when '区域'
|
24
24
|
a_ids = MoneyPlan.where(follow_up_id: follow_up_ids).where(staff_id: @current_admin.id).ids
|
25
|
-
school_ids = School.where(province: @current_admin.areas.pluck(:name)).pluck(:id)
|
25
|
+
school_ids = School.where(province: @current_admin.areas.pluck(:name)).pluck(:id) + StaffSchool.where(staff_id: @current_admin.id).pluck(:school_id)
|
26
26
|
b_ids = Business.where(school_id: school_ids).pluck(:last_follow_up_id)
|
27
27
|
ids = a_ids + b_ids
|
28
28
|
@money_plans = MoneyPlan.joins(:follow_up).where("educode_sales_follow_ups.clazz_id != ?", x_id).where(id: ids)
|
@@ -20,7 +20,7 @@ module EducodeSales
|
|
20
20
|
when '自己'
|
21
21
|
@sale_plans = OperationPlan.where(staff_id: @current_admin.id)
|
22
22
|
when '区域'
|
23
|
-
staff_ids = Staff.joins(user: [user_extension: [department: :school]]).where("schools.province in (?)", @current_admin.areas.pluck(:name)).pluck(:id)
|
23
|
+
staff_ids = Staff.joins(user: [user_extension: [department: :school]]).where("schools.province in (?) OR schools.id in (?)", @current_admin.areas.pluck(:name), StaffSchool.where(staff_id: @current_admin.id).pluck(:school_id)).pluck(:id)
|
24
24
|
@sale_plans = OperationPlan.where("staff_id in (?) OR educode_sales_operation_plans.staff_id = ?", staff_ids, @current_admin.id)
|
25
25
|
else
|
26
26
|
@sale_plans = OperationPlan
|
@@ -21,7 +21,7 @@ module EducodeSales
|
|
21
21
|
when '自己'
|
22
22
|
@sale_plans = SalePlan.where(staff_id: @current_admin.id)
|
23
23
|
when '区域'
|
24
|
-
staff_ids = Staff.joins(user: [user_extension: [department: :school]]).where("schools.province in (?)", @current_admin.areas.pluck(:name)).pluck(:id)
|
24
|
+
staff_ids = Staff.joins(user: [user_extension: [department: :school]]).where("schools.province in (?) OR schools.id in (?)", @current_admin.areas.pluck(:name),StaffSchool.where(staff_id: @current_admin.id).pluck(:school_id)).pluck(:id)
|
25
25
|
@sale_plans = SalePlan.where("staff_id in (?) OR educode_sales_sale_plans.staff_id = ?", staff_ids, @current_admin.id)
|
26
26
|
else
|
27
27
|
@sale_plans = SalePlan
|
@@ -48,7 +48,7 @@ module EducodeSales
|
|
48
48
|
teacher_ids = EducodeSales::Teacher.where(staff_id: 0).pluck(:id) - EducodeSales::TeacherAssignFollow.all.pluck(:Teacher_id) + EducodeSales::TeacherAssignFollow.where(staff_id: @current_admin.id).pluck(:teacher_id) + @teachers.ids
|
49
49
|
@teachers = Teacher.where(id: teacher_ids)
|
50
50
|
when '区域'
|
51
|
-
school_ids = School.where(province: @current_admin.areas.pluck(:name)).pluck(:id)
|
51
|
+
school_ids = School.where(province: @current_admin.areas.pluck(:name)).pluck(:id) + StaffSchool.where(staff_id: @current_admin.id).pluck(:school_id)
|
52
52
|
@teachers = Teacher.joins("JOIN departments ON educode_sales_teachers.department_id = departments.id").where(is_key: false).where("departments.school_id in (?) OR educode_sales_teachers.staff_id = #{@current_admin.id}", school_ids)
|
53
53
|
teacher_ids = EducodeSales::Teacher.where(staff_id: 0).pluck(:id) - EducodeSales::TeacherAssignFollow.all.pluck(:Teacher_id) + EducodeSales::TeacherAssignFollow.where(staff_id: @current_admin.id).pluck(:teacher_id) + @teachers.ids
|
54
54
|
@teachers = Teacher.where(id: teacher_ids)
|
@@ -88,7 +88,9 @@
|
|
88
88
|
<script type="text/html" id="bussinessBar">
|
89
89
|
<div class="layui-btn-container">
|
90
90
|
<span class="table-label">商机列表</span>
|
91
|
+
<% if can?(:export_business, EducodeSales::Business) %>
|
91
92
|
<button class="layui-btn layui-btn-primary layui-border-green layui-btn-sm data-count-edit export_more-btn pull-right" style="color: #0000FF;" data-name="export" data-id="export">导出<i class="layui-icon layui-icon-down layui-nav-more"></i></button>
|
93
|
+
<% end %>
|
92
94
|
<% if can? :create, EducodeSales::Business %>
|
93
95
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add"> 添加商机</button>
|
94
96
|
<% end %>
|
@@ -97,15 +99,37 @@
|
|
97
99
|
</div>
|
98
100
|
</script>
|
99
101
|
<script type="text/html" id="currentTableBar">
|
100
|
-
<%
|
102
|
+
<%unless !can?(:add_follow, EducodeSales::Business) && can?(:self_add_follow, EducodeSales::Business)%>
|
103
|
+
<% if can? :add_follow, EducodeSales::Business %>
|
101
104
|
<% if @current_admin.is_admin %>
|
102
105
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="add_event">添加跟进记录</a>
|
103
106
|
<% else %>
|
104
107
|
{{# if ( d.assign_follow_ups.length > 0 && d.assign_follow_ups.indexOf(d.current_staff_id) >=0 || (d.assign_follow_ups.length == 0) || (d.current_staff_id == d.staff_id) ) {}}
|
105
108
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="add_event">添加跟进记录</a>
|
106
109
|
{{# }}}
|
110
|
+
<% end %>
|
111
|
+
<% end %>
|
112
|
+
<% end %>
|
113
|
+
<%if !can?(:add_follow, EducodeSales::Business) && can?(:self_add_follow, EducodeSales::Business)%>
|
114
|
+
{{# if (d.self_flag) {}}
|
115
|
+
<% if @current_admin.is_admin %>
|
116
|
+
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="add_event">添加跟进记录</a>
|
117
|
+
<% else %>
|
118
|
+
{{# if ( d.assign_follow_ups.length > 0 && d.assign_follow_ups.indexOf(d.current_staff_id) >=0 || (d.assign_follow_ups.length == 0) || (d.current_staff_id == d.staff_id) ) {}}
|
119
|
+
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="add_event">添加跟进记录</a>
|
120
|
+
{{# }}}
|
121
|
+
<% end %>
|
122
|
+
{{# }}}
|
123
|
+
<% end %>
|
124
|
+
<%if can?(:update, EducodeSales::Business)%>
|
125
|
+
<%unless !can?(:update, EducodeSales::Business) && can?(:self_edit_business, EducodeSales::Business)%>
|
126
|
+
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
|
127
|
+
<% end %>
|
107
128
|
<% end %>
|
108
|
-
|
129
|
+
<%if !can?(:update, EducodeSales::Business) && can?(:self_edit_business, EducodeSales::Business)%>
|
130
|
+
{{# if (d.self_flag) {}}
|
131
|
+
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
|
132
|
+
{{# }}}
|
109
133
|
<% end %>
|
110
134
|
<% if @more %>
|
111
135
|
<a class="layui-btn-xs data-count-edit more-btn" data-name={{d.name}} data-id={{d.id}}>更多<i class="layui-icon layui-icon-down layui-nav-more"></i></a>
|
@@ -347,7 +371,7 @@
|
|
347
371
|
},
|
348
372
|
{
|
349
373
|
title: '操作',
|
350
|
-
minWidth:
|
374
|
+
minWidth: 220,
|
351
375
|
toolbar: '#currentTableBar',
|
352
376
|
align: "center",
|
353
377
|
fixed: 'right'
|
@@ -862,6 +886,7 @@
|
|
862
886
|
layer.full(index);
|
863
887
|
});
|
864
888
|
} else if (obj.event === 'show_follow') {
|
889
|
+
self_flag = data.self_flag
|
865
890
|
business_id = obj.data.id
|
866
891
|
business_name = data.name
|
867
892
|
content = miniPage.getHrefContent('/missions/businesses/show_follow?id=' + id);
|
@@ -1,3 +1,4 @@
|
|
1
|
+
follow_up_ids = EducodeSales::AssignFollowUp.where(staff_id: @current_admin.id).pluck(:follow_up_id)
|
1
2
|
follow_count = 0
|
2
3
|
json.data do
|
3
4
|
json.array! @businesses do |d|
|
@@ -29,7 +30,8 @@ json.data do
|
|
29
30
|
json.current_staff_id @current_admin.id
|
30
31
|
json.staff_id d.staff_id
|
31
32
|
json.latest_time d.last_follow_up.present? ? d.last_follow_up.created_at.to_s : ''
|
32
|
-
|
33
|
+
json.self_flag (d.staff_id == @current_admin.id) || (d.last_follow_up_id.in? follow_up_ids)
|
34
|
+
end
|
33
35
|
end
|
34
36
|
|
35
37
|
json.totalRow do
|
@@ -2,13 +2,22 @@
|
|
2
2
|
<div class="layui-btn-container">
|
3
3
|
<span class="table-label">跟进记录</span>
|
4
4
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="time_line"> 时间线视图>></button>
|
5
|
-
<%
|
5
|
+
<%unless !can?(:add_follow, EducodeSales::Business) && can?(:self_add_follow, EducodeSales::Business)%>
|
6
|
+
<% if can? :add_follow, EducodeSales::Business %>
|
6
7
|
<% if @current_admin.is_admin %>
|
7
8
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add"> 添加跟进记录</button>
|
8
9
|
<% elsif @business.staff_id == @current_admin.id || @business.last_follow_up.nil? || @business.last_follow_up.assign_follow_ups.blank? || (@business.last_follow_up.assign_follow_ups.pluck(:staff_id).include?(@current_admin.id)) %>
|
9
10
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add"> 添加跟进记录</button>
|
10
11
|
<% end %>
|
11
12
|
<% end %>
|
13
|
+
<% end %>
|
14
|
+
<%if !can?(:add_follow, EducodeSales::Business) && can?(:self_add_follow, EducodeSales::Business)%>
|
15
|
+
<% if @current_admin.is_admin %>
|
16
|
+
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right add_follow" lay-event="add"> 添加跟进记录</button>
|
17
|
+
<% elsif @business.staff_id == @current_admin.id || @business.last_follow_up.nil? || @business.last_follow_up.assign_follow_ups.blank? || (@business.last_follow_up.assign_follow_ups.pluck(:staff_id).include?(@current_admin.id)) %>
|
18
|
+
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right add_follow" lay-event="add"> 添加跟进记录</button>
|
19
|
+
<% end %>
|
20
|
+
<% end %>
|
12
21
|
<span class="table-label pull-right" style="padding-right: 20px">温馨提示:仅可以在24小时之内,编辑/删除最新的跟进记录</span>
|
13
22
|
</div>
|
14
23
|
</script>
|
@@ -23,16 +32,37 @@
|
|
23
32
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="show">查看</a>
|
24
33
|
<% end %>
|
25
34
|
{{# if(d.is_latest && d.flag){ }}
|
26
|
-
|
35
|
+
|
36
|
+
<%unless !can?(:update_follow, EducodeSales::Business) && can?(:self_edit_follow, EducodeSales::Business)%>
|
37
|
+
<% if can? :update_follow, EducodeSales::Business %>
|
27
38
|
<% if @current_admin.is_admin %>
|
28
39
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
|
29
40
|
<% elsif @business.staff_id == @current_admin.id || @business.last_follow_up.nil? || @business.last_follow_up.assign_follow_ups.blank? || (@business.last_follow_up.assign_follow_ups.pluck(:staff_id).include?(@current_admin.id)) %>
|
30
41
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
|
31
42
|
<% end %>
|
32
43
|
<% end %>
|
33
|
-
<%
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
<%if !can?(:update_follow, EducodeSales::Business) && can?(:self_edit_follow, EducodeSales::Business)%>
|
47
|
+
{{# if(d.self_flag){ }}
|
48
|
+
<% if @current_admin.is_admin %>
|
49
|
+
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
|
50
|
+
<% elsif @business.staff_id == @current_admin.id || @business.last_follow_up.nil? || @business.last_follow_up.assign_follow_ups.blank? || (@business.last_follow_up.assign_follow_ups.pluck(:staff_id).include?(@current_admin.id)) %>
|
51
|
+
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
|
52
|
+
<% end %>
|
53
|
+
{{# } }}
|
54
|
+
<% end %>
|
55
|
+
|
56
|
+
<%unless !can?(:destroy_follow, EducodeSales::Business) && can?(:self_delete_follow, EducodeSales::Business)%>
|
57
|
+
<% if can? :destroy_follow, EducodeSales::Business %>
|
34
58
|
<a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
|
35
59
|
<% end %>
|
60
|
+
<% end %>
|
61
|
+
<%if !can?(:destroy_follow, EducodeSales::Business) && can?(:self_delete_follow, EducodeSales::Business)%>
|
62
|
+
{{# if(d.self_flag){ }}
|
63
|
+
<a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
|
64
|
+
{{# } }}
|
65
|
+
<% end %>
|
36
66
|
{{# } }}
|
37
67
|
</script>
|
38
68
|
|
@@ -201,6 +231,10 @@
|
|
201
231
|
});
|
202
232
|
})
|
203
233
|
|
234
|
+
if(!parent.self_flag){
|
235
|
+
$('.add_follow').addClass("layui-hide");
|
236
|
+
}
|
237
|
+
|
204
238
|
table.on('toolbar(sale_plan_follow_table)', function (obj) {
|
205
239
|
if (obj.event === 'add') { // 监听添加操作
|
206
240
|
business_id = parent.business_id
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<label class="layui-form-label">商机管理</label>
|
33
33
|
<div class="layui-input-block">
|
34
34
|
<%= radio_button_tag("business", "自己", @areas.include?("商机管理-自己"), {title: '本人创建列表', id: 1}) %>
|
35
|
-
<%= radio_button_tag("business", "区域", @areas.include?("商机管理-区域"), {title: '
|
35
|
+
<%= radio_button_tag("business", "区域", @areas.include?("商机管理-区域"), {title: '本人负责区域及监管院校列表', id: 2}) %>
|
36
36
|
<%= radio_button_tag("business", "全部", @areas.include?("商机管理-全部"), {title: '全部列表', id: 3}) %>
|
37
37
|
</div>
|
38
38
|
</div>
|
@@ -40,7 +40,7 @@
|
|
40
40
|
<label class="layui-form-label">回款管理</label>
|
41
41
|
<div class="layui-input-block">
|
42
42
|
<%= radio_button_tag("money_plan", "自己", @areas.include?("回款管理-自己"), {title: '本人负责列表', id: 16}) %>
|
43
|
-
<%= radio_button_tag("money_plan", "区域", @areas.include?("回款管理-区域"), {title: '
|
43
|
+
<%= radio_button_tag("money_plan", "区域", @areas.include?("回款管理-区域"), {title: '本人负责区域及监管院校列表', id: 17}) %>
|
44
44
|
<%= radio_button_tag("money_plan", "全部", @areas.include?("回款管理-全部"), {title: '全部列表', id: 18}) %>
|
45
45
|
</div>
|
46
46
|
</div>
|
@@ -48,7 +48,7 @@
|
|
48
48
|
<label class="layui-form-label">客户管理</label>
|
49
49
|
<div class="layui-input-block">
|
50
50
|
<%= radio_button_tag("customer", "自己", @areas.include?("客户管理-自己"), {title: '本人负责列表', id: 13}) %>
|
51
|
-
<%= radio_button_tag("customer", "区域", @areas.include?("客户管理-区域"), {title: '
|
51
|
+
<%= radio_button_tag("customer", "区域", @areas.include?("客户管理-区域"), {title: '本人负责区域及监管院校列表', id:14}) %>
|
52
52
|
<%= radio_button_tag("customer", "全部", @areas.include?("客户管理-全部"), {title: '全部列表', id: 15}) %>
|
53
53
|
</div>
|
54
54
|
</div>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
<label class="layui-form-label">销售计划</label>
|
57
57
|
<div class="layui-input-block">
|
58
58
|
<%= radio_button_tag("sale_plan", "自己", @areas.include?("销售计划-自己"), {title: '本人创建列表', id: 4}) %>
|
59
|
-
<%= radio_button_tag("sale_plan", "区域", @areas.include?("销售计划-区域"), {title: '
|
59
|
+
<%= radio_button_tag("sale_plan", "区域", @areas.include?("销售计划-区域"), {title: '本人负责区域及监管院校列表', id: 5}) %>
|
60
60
|
<%= radio_button_tag("sale_plan", "全部", @areas.include?("销售计划-全部"), {title: '全部列表', id: 6}) %>
|
61
61
|
</div>
|
62
62
|
</div>
|
@@ -64,7 +64,7 @@
|
|
64
64
|
<label class="layui-form-label">教师运营</label>
|
65
65
|
<div class="layui-input-block">
|
66
66
|
<%= radio_button_tag("teacher", "自己", @areas.include?("教师运营-自己"), {title: '本人创建列表', id: 7}) %>
|
67
|
-
<%= radio_button_tag("teacher", "区域", @areas.include?("教师运营-区域"), {title: '
|
67
|
+
<%= radio_button_tag("teacher", "区域", @areas.include?("教师运营-区域"), {title: '本人负责区域及监管院校列表', id:8}) %>
|
68
68
|
<%= radio_button_tag("teacher", "全部", @areas.include?("教师运营-全部"), {title: '全部列表', id: 9}) %>
|
69
69
|
</div>
|
70
70
|
</div>
|
@@ -72,7 +72,7 @@
|
|
72
72
|
<label class="layui-form-label">运营计划</label>
|
73
73
|
<div class="layui-input-block">
|
74
74
|
<%= radio_button_tag("operation", "自己", @areas.include?("运营计划-自己"), {title: '本人创建列表', id: 10}) %>
|
75
|
-
<%= radio_button_tag("operation", "区域", @areas.include?("运营计划-区域"), {title: '
|
75
|
+
<%= radio_button_tag("operation", "区域", @areas.include?("运营计划-区域"), {title: '本人负责区域及监管院校列表', id:11}) %>
|
76
76
|
<%= radio_button_tag("operation", "全部", @areas.include?("运营计划-全部"), {title: '全部列表', id: 12}) %>
|
77
77
|
</div>
|
78
78
|
</div>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
</div>
|
26
26
|
</div>
|
27
27
|
<div class="layui-form-item">
|
28
|
-
<label class="layui-form-label
|
28
|
+
<label class="layui-form-label">负责区域</label>
|
29
29
|
<div class="layui-input-block">
|
30
30
|
<div id="area" class="demo-transfer"></div>
|
31
31
|
</div>
|
@@ -136,10 +136,6 @@
|
|
136
136
|
sales_list.getValue().forEach(function(d) {
|
137
137
|
schools.push(d.value);
|
138
138
|
})
|
139
|
-
if (area_ids.length == 0) {
|
140
|
-
layer.alert("请选择负责区域");
|
141
|
-
return false;
|
142
|
-
}
|
143
139
|
data.field['school_ids'] = schools;
|
144
140
|
data.field['area_ids'] = area_ids;
|
145
141
|
request.authPut("missions/staffs/" + parent.staff_id, data.field, function (res) {
|
@@ -87,6 +87,12 @@
|
|
87
87
|
{
|
88
88
|
field: 'area',
|
89
89
|
title: '负责区域',
|
90
|
+
templet:'<div><span title="{{d.area}}">{{d.area}}</span></div>'
|
91
|
+
},
|
92
|
+
{
|
93
|
+
field: 'schools',
|
94
|
+
title: '监管学校',
|
95
|
+
templet:'<div><span title="{{d.schools}}">{{d.schools}}</span></div>'
|
90
96
|
},
|
91
97
|
{
|
92
98
|
field: 'month',
|
@@ -4,6 +4,7 @@ json.data do
|
|
4
4
|
json.id d.id
|
5
5
|
json.name d.user.real_name
|
6
6
|
json.role d.role&.name
|
7
|
+
json.schools d.staff_schools.map(&:school).map(&:name).join("、")
|
7
8
|
json.job_type EducodeSales::Common.job_type_name[d.job_type]
|
8
9
|
json.month d.month
|
9
10
|
json.enabled_at d.enabled_at ? d.enabled_at.to_s(:date) : ''
|
@@ -15,6 +15,11 @@ class CreateEducodeSalesRolePermissions < ActiveRecord::Migration[5.2]
|
|
15
15
|
EducodeSales::Permission.create(name: '上传附件', subject: 'Business', action: 'upload_file', clazz: 'business', position: '11')
|
16
16
|
EducodeSales::Permission.create(name: '下载附件', subject: 'Business', action: 'download_file', clazz: 'business', position: '11')
|
17
17
|
EducodeSales::Permission.create(name: '删除附件', subject: 'Business', action: 'delete_file', clazz: 'business', position: '11')
|
18
|
+
#商机个人权限
|
19
|
+
EducodeSales::Permission.create(name: '编辑商机(本人商机)', subject: 'Business', action: 'self_edit_business', clazz: 'business', position: '5')
|
20
|
+
EducodeSales::Permission.create(name: '添加跟进记录(本人商机)', subject: 'Business', action: 'self_add_follow', clazz: 'business', position: '8')
|
21
|
+
EducodeSales::Permission.create(name: '编辑跟进记录(本人创建)', subject: 'Business', action: 'self_edit_follow', clazz: 'business', position: '9')
|
22
|
+
EducodeSales::Permission.create(name: '删除跟进记录(本人创建)', subject: 'Business', action: 'self_delete_follow', clazz: 'business', position: '10')
|
18
23
|
#回款管理权限
|
19
24
|
EducodeSales::Permission.create(name: '查看回款列表', subject: 'MoneyPlan', action: 'read', clazz: 'money_plan', position: '15')
|
20
25
|
|
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.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- anke1460
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|