educode_sales 0.9.12 → 0.9.14
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/assets/images/educode_sales/indexlogo.png +0 -0
- data/app/controllers/educode_sales/businesses_controller.rb +5 -0
- data/app/controllers/educode_sales/follow_ups_controller.rb +3 -3
- 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 +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c96d308e38b3de53258837e9620c73e99e233e96f4bd7d0662485eafebeeba5
|
4
|
+
data.tar.gz: 194d1bfeeb27862245d9f850fcb8ca86d550fdf60c524fefa913b01efd1cc4b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0f3e2d3860c449a219f96082530b443765b314807ca616099f9e7fbd04cbff9e5a93e484f68769fc40eb43c3c198af7ff8b37455e1301e8a90cbbd0a1b61177
|
7
|
+
data.tar.gz: 250941523ed39042ee6de95bad6aabe860f03b45451bf98ddeef35a0eb4262160d41842c3589e8e4affc9e83ec7b8f1b448da94b27aa0a5b7fa79b3c40b03d71
|
Binary file
|
@@ -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)
|
@@ -244,12 +244,12 @@ module EducodeSales
|
|
244
244
|
def add_business_number
|
245
245
|
if ( @business.number.blank?) && params[:clazz_id] == '74'
|
246
246
|
totual_count = EducodeSales::Business.unscoped.where("number like :data",data: "#{Time.now.year}%").count + 1 + Time.now.year*1000.to_i
|
247
|
-
@business_number_record = BusinessNumberRecord.
|
248
|
-
while @business_number_record.include?(totual_count)
|
247
|
+
@business_number_record = BusinessNumberRecord.find_or_create_by(id: 1)
|
248
|
+
while @business_number_record.value.include?(totual_count) || Business.pluck(:number).include?(totual_count.to_s)
|
249
249
|
totual_count += 1
|
250
250
|
end
|
251
|
+
@business_number_record.update(value: @business_number_record.value | [ totual_count ])
|
251
252
|
@business.update(number: totual_count.to_s)
|
252
|
-
BusinessNumberRecord.first.update(value: @business_number_record | [ totual_count ])
|
253
253
|
end
|
254
254
|
end
|
255
255
|
|
@@ -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.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- anke1460
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -105,6 +105,7 @@ 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
|
108
109
|
- app/assets/images/educode_sales/loading-0.gif
|
109
110
|
- app/assets/images/educode_sales/loading-1.gif
|
110
111
|
- app/assets/images/educode_sales/loading-2.gif
|
@@ -234,6 +235,7 @@ files:
|
|
234
235
|
- app/views/educode_sales/assessments/new.html.erb
|
235
236
|
- app/views/educode_sales/assessments/progress.json.jbuilder
|
236
237
|
- app/views/educode_sales/businesses/_follows.html.erb
|
238
|
+
- app/views/educode_sales/businesses/daily_paper.html.erb
|
237
239
|
- app/views/educode_sales/businesses/edit.html.erb
|
238
240
|
- app/views/educode_sales/businesses/edit_follow_record.html.erb
|
239
241
|
- app/views/educode_sales/businesses/edit_plan.html.erb
|
@@ -485,7 +487,7 @@ homepage: https://www.educoder.net
|
|
485
487
|
licenses:
|
486
488
|
- MIT
|
487
489
|
metadata: {}
|
488
|
-
post_install_message:
|
490
|
+
post_install_message:
|
489
491
|
rdoc_options: []
|
490
492
|
require_paths:
|
491
493
|
- lib
|
@@ -500,8 +502,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
500
502
|
- !ruby/object:Gem::Version
|
501
503
|
version: '0'
|
502
504
|
requirements: []
|
503
|
-
rubygems_version: 3.0.
|
504
|
-
signing_key:
|
505
|
+
rubygems_version: 3.0.9
|
506
|
+
signing_key:
|
505
507
|
specification_version: 4
|
506
508
|
summary: Summary of EducodeSales.
|
507
509
|
test_files: []
|