educode_sales 0.4.8 → 0.4.9

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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/educode_sales/businesses_controller.rb +67 -2
  3. data/app/controllers/educode_sales/follow_ups_controller.rb +1 -1
  4. data/app/controllers/educode_sales/home_controller.rb +1 -1
  5. data/app/controllers/educode_sales/operation_plans_controller.rb +11 -4
  6. data/app/controllers/educode_sales/operations_controller.rb +1 -1
  7. data/app/controllers/educode_sales/plans_controller.rb +15 -8
  8. data/app/controllers/educode_sales/sale_trends_controller.rb +5 -5
  9. data/app/controllers/educode_sales/sales_controller.rb +2 -2
  10. data/app/controllers/educode_sales/upload_files_controller.rb +99 -0
  11. data/app/models/educode_sales/common.rb +4 -0
  12. data/app/views/educode_sales/businesses/edit_follow_record.html.erb +15 -0
  13. data/app/views/educode_sales/businesses/file.html.erb +140 -0
  14. data/app/views/educode_sales/businesses/index.html.erb +55 -1
  15. data/app/views/educode_sales/businesses/index.json.jbuilder +3 -1
  16. data/app/views/educode_sales/businesses/new_follow_record.html.erb +17 -0
  17. data/app/views/educode_sales/businesses/show_follow.html.erb +38 -7
  18. data/app/views/educode_sales/businesses/show_follow.json.jbuilder +2 -0
  19. data/app/views/educode_sales/businesses/show_follow_record.html.erb +79 -1
  20. data/app/views/educode_sales/businesses/time_line.html.erb +58 -0
  21. data/app/views/educode_sales/businesses/upload_file.html.erb +43 -0
  22. data/app/views/educode_sales/operation_plans/_monthly.html.erb +4 -4
  23. data/app/views/educode_sales/operation_plans/_weekly.html.erb +4 -4
  24. data/app/views/educode_sales/operation_plans/new_month.html.erb +15 -1
  25. data/app/views/educode_sales/operation_plans/new_week.html.erb +19 -4
  26. data/app/views/educode_sales/operation_reports/audit.html.erb +9 -9
  27. data/app/views/educode_sales/operation_reports/edit.html.erb +9 -9
  28. data/app/views/educode_sales/operation_reports/show.html.erb +9 -9
  29. data/app/views/educode_sales/plans/_monthly.html.erb +4 -4
  30. data/app/views/educode_sales/plans/_weekly.html.erb +4 -4
  31. data/app/views/educode_sales/sale_reports/audit.html.erb +7 -7
  32. data/app/views/educode_sales/sale_reports/edit.html.erb +7 -7
  33. data/app/views/educode_sales/sale_reports/show.html.erb +2 -2
  34. data/app/views/educode_sales/sale_trends/trends.html.erb +6 -6
  35. data/app/views/educode_sales/upload_files/index.json.jbuilder +13 -0
  36. data/config/routes.rb +12 -0
  37. data/db/migrate/20211102085743_add_bidded_date_educode_sales_follow_ups.rb +6 -0
  38. data/lib/educode_sales/version.rb +1 -1
  39. metadata +8 -2
@@ -111,32 +111,32 @@
111
111
  cols: [
112
112
  [{
113
113
  field: 'id',
114
- width: 80,
114
+ width: 60,
115
115
  title:'序号',type: 'numbers',
116
116
  },
117
117
  {
118
118
  field: 'staff',
119
- width: 100,
119
+ width: 80,
120
120
  title: '姓名'
121
121
  },
122
122
  {
123
123
  field: 'teacher_name',
124
- width: 100,
124
+ width: 120,
125
125
  title: '教师姓名',
126
126
  },
127
127
  {
128
128
  field: 'school',
129
- width: 100,
129
+ width: 170,
130
130
  title: '单位'
131
131
  },
132
132
  {
133
133
  field: 'department',
134
- width: 100,
134
+ width: 170,
135
135
  title: '部门'
136
136
  },
137
137
  {
138
138
  field: 'week',
139
- width: 100,
139
+ width: 80,
140
140
  title: '周次',
141
141
  },
142
142
  {
@@ -146,18 +146,18 @@
146
146
  },
147
147
  {
148
148
  field: 'count',
149
- width: 100,
149
+ width: 80,
150
150
  title: '跟进',
151
151
  templet: '#show_follow_show'
152
152
  },
153
153
  {
154
154
  field: 'rate',
155
- width: 100,
155
+ width: 80,
156
156
  title: '完成率',
157
157
  },
158
158
  {
159
159
  field: 'updated_at',
160
- width: 190,
160
+ width: 170,
161
161
  title: '更新时间',
162
162
  sort: true,
163
163
  },
@@ -122,7 +122,7 @@
122
122
  },
123
123
  {
124
124
  field: 'level1_score',
125
- width: 180,
125
+ width: 120,
126
126
  title: '大区',
127
127
  templet: function (d) {
128
128
  return '<div class="star1"></div>'
@@ -130,7 +130,7 @@
130
130
  },
131
131
  {
132
132
  field: 'level2_score',
133
- width: 180,
133
+ width: 120,
134
134
  title: '总监',
135
135
  templet: function (d) {
136
136
  return '<div class="star2"></div>'
@@ -138,7 +138,7 @@
138
138
  },
139
139
  {
140
140
  field: 'level3_score',
141
- width: 180,
141
+ width: 120,
142
142
  title: '副总',
143
143
  templet: function (d) {
144
144
  return '<div class="star3"></div>'
@@ -146,7 +146,7 @@
146
146
  },
147
147
  {
148
148
  field: 'created_at',
149
- width: 300,
149
+ width: 200,
150
150
  title: '提交时间',
151
151
  },
152
152
  {
@@ -124,7 +124,7 @@
124
124
  },
125
125
  {
126
126
  field: 'level1_score',
127
- width: 180,
127
+ width: 120,
128
128
  title: '大区',
129
129
  templet: function (d) {
130
130
  return '<div class="star1"></div>'
@@ -132,7 +132,7 @@
132
132
  },
133
133
  {
134
134
  field: 'level2_score',
135
- width: 180,
135
+ width: 120,
136
136
  title: '总监',
137
137
  templet: function (d) {
138
138
  return '<div class="star2"></div>'
@@ -140,7 +140,7 @@
140
140
  },
141
141
  {
142
142
  field: 'level3_score',
143
- width: 180,
143
+ width: 120,
144
144
  title: '副总',
145
145
  templet: function (d) {
146
146
  return '<div class="star3"></div>'
@@ -149,7 +149,7 @@
149
149
  },
150
150
  {
151
151
  field: 'created_at',
152
- width: 300,
152
+ width: 200,
153
153
  title: '提交时间',
154
154
  },
155
155
  {
@@ -171,38 +171,38 @@
171
171
  },
172
172
  {
173
173
  field: 'staff',
174
- width: 120,
174
+ width: 80,
175
175
  title: '姓名'
176
176
  },
177
177
  {
178
178
  field: 'business_name',
179
- width: 270,
179
+ width: 170,
180
180
  title: '商机名称',
181
181
  },
182
182
  {
183
183
  field: 'school',
184
- width: 200,
184
+ width: 170,
185
185
  title: '单位'
186
186
  },
187
187
  {
188
188
  field: 'department',
189
- width: 190,
189
+ width: 170,
190
190
  title: '部门'
191
191
  },
192
192
  {
193
193
  field: 'weekly',
194
- width: 100,
194
+ width: 80,
195
195
  title: '周次',
196
196
  },
197
197
  {
198
198
  field: 'follow_ups_count',
199
- width: 100,
199
+ width: 80,
200
200
  title: '跟进',
201
201
  templet: '#show_follow'
202
202
  },
203
203
  {
204
204
  field: 'finish_rate',
205
- width: 100,
205
+ width: 80,
206
206
  title: '完成率',
207
207
  },
208
208
  {
@@ -108,38 +108,38 @@
108
108
  },
109
109
  {
110
110
  field: 'staff',
111
- width: 120,
111
+ width: 80,
112
112
  title: '姓名'
113
113
  },
114
114
  {
115
115
  field: 'business_name',
116
- width: 270,
116
+ width: 170,
117
117
  title: '商机名称',
118
118
  },
119
119
  {
120
120
  field: 'school',
121
- width: 200,
121
+ width: 170,
122
122
  title: '单位'
123
123
  },
124
124
  {
125
125
  field: 'department',
126
- width: 190,
126
+ width: 170,
127
127
  title: '部门'
128
128
  },
129
129
  {
130
130
  field: 'weekly',
131
- width: 100,
131
+ width: 80,
132
132
  title: '周次',
133
133
  },
134
134
  {
135
135
  field: 'follow_ups_count',
136
- width: 100,
136
+ width: 80,
137
137
  title: '跟进',
138
138
  templet: '#show_follow'
139
139
  },
140
140
  {
141
141
  field: 'finish_rate',
142
- width: 100,
142
+ width: 80,
143
143
  title: '完成率',
144
144
  },
145
145
  {
@@ -136,12 +136,12 @@
136
136
  },
137
137
  {
138
138
  field: 'business_name',
139
- width: 150,
139
+ width: 170,
140
140
  title: '商机名称',
141
141
  },
142
142
  {
143
143
  field: 'school',
144
- width: 120,
144
+ width: 170,
145
145
  title: '单位'
146
146
  },
147
147
  {
@@ -88,7 +88,7 @@
88
88
  <div class="panel layui-bg-number">
89
89
  <div class="panel-body">
90
90
  <div class="panel-title">
91
- <h5>现有商机</h5>
91
+ <h5>现有商机<a href="/missions/businesses?name=(销售态势-现有商机)" style="padding-left: 100px;color: #0000FF">查看商机</a></h5>
92
92
  </div>
93
93
  <div class="panel-content y-t-10">
94
94
  <h1 class="no-margins"><%= @business_amount %>万</h1>
@@ -101,7 +101,7 @@
101
101
  <div class="panel layui-bg-number">
102
102
  <div class="panel-body">
103
103
  <div class="panel-title">
104
- <h5>已中标</h5>
104
+ <h5>已中标<a href="/missions/businesses?name=(销售态势-已中标商机)" style="padding-left: 100px;color: #0000FF">查看商机</a></h5>
105
105
  </div>
106
106
  <div class="panel-content y-t-10">
107
107
  <h1 class="no-margins"><%= @goal_amount %>万</h1>
@@ -114,7 +114,7 @@
114
114
  <div class="panel layui-bg-number">
115
115
  <div class="panel-body">
116
116
  <div class="panel-title">
117
- <h5>已签单</h5>
117
+ <h5>已签单<a href="/missions/businesses?name=(销售态势-已签单商机)" style="padding-left: 100px;color: #0000FF">查看商机</a></h5>
118
118
  </div>
119
119
  <div class="panel-content y-t-10">
120
120
  <h1 class="no-margins"><%= @service_amount %>万</h1>
@@ -127,7 +127,7 @@
127
127
  <div class="panel layui-bg-number">
128
128
  <div class="panel-body">
129
129
  <div class="panel-title">
130
- <h5>已回款</h5>
130
+ <h5>已回款<a href="/missions/businesses?name=(销售态势-已回款商机)" style="padding-left: 100px;color: #0000FF">查看商机</a></h5>
131
131
  </div>
132
132
  <div class="panel-content y-t-10">
133
133
  <h1 class="no-margins"><%= @return_amount %>万</h1>
@@ -140,7 +140,7 @@
140
140
  <div class="panel layui-bg-number">
141
141
  <div class="panel-body">
142
142
  <div class="panel-title">
143
- <h5>A类商机</h5>
143
+ <h5>A类商机<a href="/missions/businesses?clazz_id=<%=EducodeSales::Common.find_by(extras: EducodeSales::Common::ATYPE)&.id %>" style="padding-left: 100px;color: #0000FF">查看商机</a></h5>
144
144
  </div>
145
145
  <div class="panel-content y-t-10">
146
146
  <h1 class="no-margins"><%= @a_amount %>万</h1>
@@ -153,7 +153,7 @@
153
153
  <div class="panel layui-bg-number">
154
154
  <div class="panel-body">
155
155
  <div class="panel-title">
156
- <h5>B类商机</h5>
156
+ <h5>B类商机<a href="/missions/businesses?clazz_id=<%=EducodeSales::Common.find_by(extras: EducodeSales::Common::BTYPE)&.id %>" style="padding-left: 100px;color: #0000FF">查看商机</a></h5>
157
157
  </div>
158
158
  <div class="panel-content y-t-10">
159
159
  <h1 class="no-margins"><%= @b_amount %>万</h1>
@@ -0,0 +1,13 @@
1
+ json.data do
2
+ json.array! @files do |d|
3
+ json.id d.id
4
+ json.name d.filename
5
+ json.size d.filesize < 1000000 ? (d.filesize.to_f / 1000).round(2).to_s + 'KB' : (d.filesize.to_f / 1000000).round(2).to_s + 'MB'
6
+ json.upload_time d.created_on.to_s
7
+ json.upload_person EducodeSales::Staff.find(d.author_id).user.real_name
8
+ json.disk_filename d.disk_filename
9
+ json.content_type d.content_type
10
+ end
11
+ end
12
+ json.code 0
13
+ json.count @files.total_count
data/config/routes.rb CHANGED
@@ -61,6 +61,9 @@ EducodeSales::Engine.routes.draw do
61
61
  get :show_follow_record
62
62
  get :edit_follow_record
63
63
  get :edit_plan
64
+ get :file
65
+ get :time_line
66
+ get :upload_file
64
67
  end
65
68
 
66
69
  member do
@@ -115,6 +118,15 @@ EducodeSales::Engine.routes.draw do
115
118
 
116
119
  resources :import_teachers
117
120
 
121
+ resources :upload_files do
122
+ collection do
123
+ get :download
124
+ end
125
+
126
+ member do
127
+ end
128
+ end
129
+
118
130
  resources :teachers do
119
131
  collection do
120
132
  get :import
@@ -0,0 +1,6 @@
1
+ class AddBiddedDateEducodeSalesFollowUps < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :educode_sales_follow_ups, :bidded_date, :date
4
+ add_column :educode_sales_follow_ups, :signed_date, :date
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module EducodeSales
2
- VERSION = '0.4.8'
2
+ VERSION = '0.4.9'
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.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - anke1460
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-01 00:00:00.000000000 Z
11
+ date: 2021-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -153,6 +153,7 @@ files:
153
153
  - app/controllers/educode_sales/staffs_controller.rb
154
154
  - app/controllers/educode_sales/teacher_follows_controller.rb
155
155
  - app/controllers/educode_sales/teachers_controller.rb
156
+ - app/controllers/educode_sales/upload_files_controller.rb
156
157
  - app/helpers/educode_sales/activities_helper.rb
157
158
  - app/helpers/educode_sales/application_helper.rb
158
159
  - app/helpers/educode_sales/business_helper.rb
@@ -196,6 +197,7 @@ files:
196
197
  - app/views/educode_sales/businesses/edit.html.erb
197
198
  - app/views/educode_sales/businesses/edit_follow_record.html.erb
198
199
  - app/views/educode_sales/businesses/edit_plan.html.erb
200
+ - app/views/educode_sales/businesses/file.html.erb
199
201
  - app/views/educode_sales/businesses/index.html.erb
200
202
  - app/views/educode_sales/businesses/index.json.jbuilder
201
203
  - app/views/educode_sales/businesses/new.html.erb
@@ -204,7 +206,9 @@ files:
204
206
  - app/views/educode_sales/businesses/show_follow.json.jbuilder
205
207
  - app/views/educode_sales/businesses/show_follow_record.html.erb
206
208
  - app/views/educode_sales/businesses/show_keys.html.erb
209
+ - app/views/educode_sales/businesses/time_line.html.erb
207
210
  - app/views/educode_sales/businesses/unfinish_plans.json.jbuilder
211
+ - app/views/educode_sales/businesses/upload_file.html.erb
208
212
  - app/views/educode_sales/commons/edit.html.erb
209
213
  - app/views/educode_sales/commons/index.html.erb
210
214
  - app/views/educode_sales/commons/index.json.jbuilder
@@ -318,6 +322,7 @@ files:
318
322
  - app/views/educode_sales/teachers/show_follow.json.jbuilder
319
323
  - app/views/educode_sales/teachers/show_follow_record.html.erb
320
324
  - app/views/educode_sales/teachers/unfinish_plans.json.jbuilder
325
+ - app/views/educode_sales/upload_files/index.json.jbuilder
321
326
  - app/views/layouts/educode_sales/application.html.erb
322
327
  - app/views/layouts/educode_sales/login.html.erb
323
328
  - config/locales/sale.zh-CN.yml
@@ -353,6 +358,7 @@ files:
353
358
  - db/migrate/20211013060712_create_educode_sales_assign_follow_ups.rb
354
359
  - db/migrate/20211018054256_add_extras_to_commons.rb
355
360
  - db/migrate/20211022085324_add_teacher_used_to_teachers.rb
361
+ - db/migrate/20211102085743_add_bidded_date_educode_sales_follow_ups.rb
356
362
  - lib/educode_sales.rb
357
363
  - lib/educode_sales/engine.rb
358
364
  - lib/educode_sales/version.rb