educode_sales 0.9.74 → 0.9.75
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3360ea7a50189fd2b8954d7111e05c3e2592d403072661f4eca95a7f1a0ef3e1
|
4
|
+
data.tar.gz: af8e512e5f7e91c7eb8a211406817f19701311b205ed191982abae08cfc536dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df64d18c074d376248f60469c2b0dcac72eafeff9b145420bfc8aa3f9b88e610471e686263a1b26cee7d2096a4094cf533c2af3a0182134c39157aeacb57a60a
|
7
|
+
data.tar.gz: c3dac636495d444ac104ff6b4fdd7f65844645120127e0b1b2ccd4fe1a7a70e287dddb4e8238ef1f7b9a4c080b4aef83d8ff620d292e0c62085d793d619ad23f
|
@@ -27,14 +27,14 @@ module EducodeSales
|
|
27
27
|
# business_ids = Business.joins(last_follow_up: :assign_follow_ups).where("educode_sales_assign_follow_ups.staff_id = ?", @current_admin.id).pluck(:id)
|
28
28
|
# @businesses = Business.where("educode_sales_businesses.staff_id = ? OR educode_sales_businesses.id in (?)", @current_admin.id, business_ids)
|
29
29
|
idea_ids = Idea.all.pluck(:other_staff_ids).flatten.uniq
|
30
|
-
@ideas = Idea.where("educode_sales_ideas.
|
30
|
+
@ideas = Idea.where("educode_sales_ideas.creator_id = ? OR educode_sales_ideas.id in (?)", @current_admin.id, idea_ids)
|
31
31
|
when '区域'
|
32
32
|
# 查看区域商机,需要排除掉其它人员手上的监管学校
|
33
33
|
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
|
34
34
|
|
35
35
|
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
|
36
36
|
idea_ids = Idea.all.pluck(:other_staff_ids).flatten.uniq
|
37
|
-
@ideas = @ideas.joins(department: :school).where("schools.id in (?) OR educode_sales_ideas.
|
37
|
+
@ideas = @ideas.joins(department: :school).where("schools.id in (?) OR educode_sales_ideas.creator_id = ? OR educode_sales_ideas.id in (?)", school_ids, @current_admin.id, idea_ids)
|
38
38
|
else
|
39
39
|
@ideas = @ideas
|
40
40
|
end
|
@@ -183,10 +183,10 @@
|
|
183
183
|
search_created_at: "",
|
184
184
|
search_content: "",
|
185
185
|
search_status: "",
|
186
|
-
|
186
|
+
search_school: "",
|
187
187
|
search_money: "",
|
188
188
|
search_advise: "",
|
189
|
-
|
189
|
+
search_sale_staff_id: "",
|
190
190
|
search_idea_staff: "",
|
191
191
|
})
|
192
192
|
return false;
|
@@ -112,7 +112,9 @@
|
|
112
112
|
<% if can? :destroy, EducodeSales::Idea %>
|
113
113
|
<a class="layui-btn layui-btn-danger layui-btn-xs data-count-edit" lay-event="idea_recycle">移除</a>
|
114
114
|
<% end %>
|
115
|
-
|
115
|
+
<% if can? :advise, EducodeSales::Idea %>
|
116
|
+
<a class="layui-btn layui-btn-default layui-btn-xs data-count-edit" lay-event="add_advise">团队建议</a>
|
117
|
+
<% end %>
|
116
118
|
<% if can? :show_file, EducodeSales::Idea %>
|
117
119
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="file">附件</a>
|
118
120
|
<% end %>
|