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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 518dc2f8c5a04be4e9865d17425ef4e3f51624fef4994db928233361ec5a9ac9
4
- data.tar.gz: 1366d52aaac7c5ac23c4c495a61a46445ac5b99984dcdb2bede6f77bf7307f1e
3
+ metadata.gz: 4db1ec1643645ed1b2f0aa28039be04b70269e6b24514a0519781e4b7b69ea0f
4
+ data.tar.gz: bf98a690a3f4b0da0780a136507b47bfd2d34ac12cb662f653e42a97bf248536
5
5
  SHA512:
6
- metadata.gz: bcd5a2e3f17724446da729dd715201550ad4b8719ec68238ad39ce87ca2b37d1fb2f993cdbae4ec7e71e2a8afa80958e08d469150f3a229ea8394f83d8def798
7
- data.tar.gz: 4ba4ac0b4b3ba8d62b53152d6d58056245e07b6e32305aa1b8bc77dca6e05f5b53f2a7f510db69fab4dc26017a43245e6f615c3f5512297ee29dbd950c8dce6e
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
@@ -106,6 +106,7 @@ EducodeSales::Engine.routes.draw do
106
106
  get :upload_file
107
107
  get :following_businesses
108
108
  get :followed
109
+ get :daily_paper
109
110
  end
110
111
 
111
112
  member do
@@ -1,3 +1,3 @@
1
1
  module EducodeSales
2
- VERSION = '0.9.12'
2
+ VERSION = '0.9.13'
3
3
  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.12
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-14 00:00:00.000000000 Z
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