educode_sales 0.9.12 → 0.9.13
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 +5 -0
- data/app/views/educode_sales/businesses/_follows.html.erb +19 -1
- data/app/views/educode_sales/businesses/daily_paper.html.erb +27 -0
- data/config/routes.rb +1 -0
- data/lib/educode_sales/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4db1ec1643645ed1b2f0aa28039be04b70269e6b24514a0519781e4b7b69ea0f
|
4
|
+
data.tar.gz: bf98a690a3f4b0da0780a136507b47bfd2d34ac12cb662f653e42a97bf248536
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8aa2131475a00d57a73206c74b63b8406db8297c25bd078e3765f93d2323aebc1f9e9358f492786f7e059acb6585b8d8e30426615484e390750bf1375d1a2a2
|
7
|
+
data.tar.gz: a7dac1cd0912e660b80b570b518a547c5720731843ec77f50331e9f83caac82acabb7e7455623c99ebd34970f5127d4437e78c00f9aa6e2453bd419bf63fe70d
|
@@ -257,6 +257,11 @@ module EducodeSales
|
|
257
257
|
end
|
258
258
|
end
|
259
259
|
|
260
|
+
def daily_paper
|
261
|
+
@followups = EducodeSales::FollowUp.where(staff_id: @current_admin.id).where("updated_at > ?", Time.now.beginning_of_day).order("updated_at")
|
262
|
+
render layout: false
|
263
|
+
end
|
264
|
+
|
260
265
|
def create
|
261
266
|
department = Department.find(params[:department_id])
|
262
267
|
business = @current_admin.businesses.build(name: params[:name], department_id: department.id, source: params[:source], school_id: department.school_id)
|
@@ -53,6 +53,7 @@
|
|
53
53
|
<script type="text/html" id="toolbarDemo_follows">
|
54
54
|
<div class="layui-btn-container">
|
55
55
|
<span class="table-label">跟进动态</span>
|
56
|
+
<a class="layui-btn layui-btn-normal layui-btn-sm" style="margin-left: 20px;" lay-event="report_day">日报</a>
|
56
57
|
</div>
|
57
58
|
</script>
|
58
59
|
<script type="text/html" id="currentTableBar_follows">
|
@@ -218,6 +219,24 @@
|
|
218
219
|
})
|
219
220
|
return false;
|
220
221
|
});
|
222
|
+
table.on('toolbar(teachers_table)', function(obj){
|
223
|
+
if (obj.event === 'report_day') {
|
224
|
+
content = miniPage.getHrefContent('/missions/businesses/daily_paper');
|
225
|
+
openWH = miniPage.getOpenWidthHeight();
|
226
|
+
index = layer.open({
|
227
|
+
title: '',
|
228
|
+
type: 1,
|
229
|
+
shade: 0.2,
|
230
|
+
// maxmin: true,
|
231
|
+
shadeClose: true,
|
232
|
+
area: ['600px', '600px'],
|
233
|
+
content: content
|
234
|
+
});
|
235
|
+
$(window).on("resize", function () {
|
236
|
+
layer.full(index);
|
237
|
+
});
|
238
|
+
}
|
239
|
+
})
|
221
240
|
table.on('tool(teachers_table)', function (obj) {
|
222
241
|
var data = obj.data;
|
223
242
|
id = data.id
|
@@ -238,7 +257,6 @@
|
|
238
257
|
layer.full(index);
|
239
258
|
});
|
240
259
|
} else if (obj.event === 'business') {
|
241
|
-
console.log(data);
|
242
260
|
business_id = data.business_id
|
243
261
|
business_name = data.business
|
244
262
|
content = miniPage.getHrefContent('/missions/businesses/show_follow?id=' + data.business_id);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div style="padding: 15px;" id="day_content">
|
2
|
+
<h2>今日跟进动态</h2>
|
3
|
+
<hr>
|
4
|
+
<div style="height: 480px;overflow: auto;">
|
5
|
+
<% text = "\n" %>
|
6
|
+
<% @followups.each_with_index do |d, i| %>
|
7
|
+
<% text += "#{i+1}、**学校--**商机:#{d .description}\n" %>
|
8
|
+
<p style="margin-bottom: 10px;"><%= i+1 %>、**学校--**商机:<%= d .description%></p>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div id="content" style="display: none;" data-content="今日跟进动态<%=text %>"></div>
|
13
|
+
<button type="button" onclick="copy()" style=" margin-right: 20px; float: right;" class="layui-btn layui-btn-primary">复制</button>
|
14
|
+
</div>
|
15
|
+
<script>
|
16
|
+
function copy() {
|
17
|
+
var copyText = document.getElementById("content").dataset.content;
|
18
|
+
var textArea = document.createElement("textarea");
|
19
|
+
textArea.value = copyText;
|
20
|
+
document.body.appendChild(textArea);
|
21
|
+
textArea.select();
|
22
|
+
if (document.execCommand("Copy")) {
|
23
|
+
layer.msg('已复制到剪贴板');
|
24
|
+
textArea.remove();
|
25
|
+
}
|
26
|
+
}
|
27
|
+
</script>
|
data/config/routes.rb
CHANGED
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.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- anke1460
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -234,6 +234,7 @@ files:
|
|
234
234
|
- app/views/educode_sales/assessments/new.html.erb
|
235
235
|
- app/views/educode_sales/assessments/progress.json.jbuilder
|
236
236
|
- app/views/educode_sales/businesses/_follows.html.erb
|
237
|
+
- app/views/educode_sales/businesses/daily_paper.html.erb
|
237
238
|
- app/views/educode_sales/businesses/edit.html.erb
|
238
239
|
- app/views/educode_sales/businesses/edit_follow_record.html.erb
|
239
240
|
- app/views/educode_sales/businesses/edit_plan.html.erb
|